CN117528330A - 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
CN117528330A
CN117528330A CN202311788471.9A CN202311788471A CN117528330A CN 117528330 A CN117528330 A CN 117528330A CN 202311788471 A CN202311788471 A CN 202311788471A CN 117528330 A CN117528330 A CN 117528330A
Authority
CN
China
Prior art keywords
bluetooth headset
bluetooth
headset
earphone
signal intensity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311788471.9A
Other languages
Chinese (zh)
Inventor
刘佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202311788471.9A priority Critical patent/CN117528330A/en
Publication of CN117528330A publication Critical patent/CN117528330A/en
Pending legal-status Critical Current

Links

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 earphone control method, device, bluetooth headset and storage medium, this earphone control method is applied to first bluetooth headset, when first bluetooth headset is as main earphone and electronic equipment are connected, second bluetooth headset regard as from earphone with first bluetooth headset is connected, this earphone control method includes: acquiring first signal intensity of the first Bluetooth headset and 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 with the electronic equipment.

Description

Earphone control method and device, bluetooth earphone and storage medium
Cross Reference to Related Applications
The present application claims priority from chinese application No. 201911359923.5 filed on date 2019, 12, 25, which is incorporated herein by reference in its entirety for all purposes.
Technical Field
The present application relates to the field of bluetooth headphones, and in particular, to a method and apparatus for controlling a bluetooth headphone, and a storage medium.
Background
Electronic devices, such as computers, mobile phones, etc., have become one of the most commonly used consumer electronics products in people's daily lives. With the development of wireless communication technology, users often use bluetooth headphones to listen to sound when playing the sound with electronic devices, especially real wireless stereo (True Wireless Stereo, TWS) headphones with wireless separation of left and right channels. TWS headphones are generally divided into a master headphone and a slave headphone, but the current switching manner of the master headphone and the slave headphone is difficult to ensure the quality of data transmission with the electronics.
Disclosure of Invention
In view of the above problems, the present application proposes a headset control method, a device, a bluetooth headset, and a storage medium.
In a first aspect, an embodiment of the present application provides an earphone control method, applied to a first bluetooth earphone, where 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, where the method includes: acquiring first signal intensity of the first Bluetooth headset and second signal intensity of the second Bluetooth headset, wherein the first signal intensity is signal intensity between the first Bluetooth headset and the electronic equipment, and the second signal intensity is signal intensity between the second Bluetooth headset and the electronic equipment; 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 an earphone control device, applied to a first bluetooth earphone, when the 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, and the device includes: the Bluetooth headset comprises a signal acquisition module, a condition determination module and a headset switching module, wherein the signal acquisition module is used for acquiring first signal intensity of the first Bluetooth headset and second signal intensity of the second Bluetooth headset, wherein the first signal intensity is signal intensity between the first Bluetooth headset and the electronic equipment, and the second signal intensity is signal intensity between the second Bluetooth headset 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 Bluetooth device comprises a first Bluetooth headset and a second Bluetooth headset, wherein the first Bluetooth headset is used as a master headset and is connected with electronic equipment, the second Bluetooth headset is used as a slave headset and is connected with the first Bluetooth headset, the first Bluetooth headset is used for acquiring first signal intensity of the first Bluetooth headset and second signal intensity of the second Bluetooth headset, the first signal intensity is signal intensity between the first Bluetooth headset and the electronic equipment, and the second signal intensity is signal intensity between the second Bluetooth headset and the electronic equipment; the first Bluetooth headset is further used for determining that the first signal intensity and the second signal intensity meet a preset intensity 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 be connected with the electronic equipment; and the second Bluetooth headset is used for responding to the switching indication information and is used as a main headset to be connected with the electronic equipment.
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 applications configured to perform the method provided in the first aspect above.
In a fifth aspect, embodiments of the present application provide a computer readable storage medium having stored therein program code that is callable by a processor to perform the method provided in the first aspect above.
According to the scheme, when the first Bluetooth headset is used as a main 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, the first Bluetooth headset is used for acquiring the first signal intensity of the first Bluetooth headset and the second signal intensity of the second Bluetooth headset, wherein the first signal intensity is the signal intensity between the first Bluetooth headset and the electronic equipment, the second signal intensity is the signal intensity between the second Bluetooth headset and the electronic equipment, and if the first signal intensity and the second signal intensity meet the 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 equipment as the main headset. Therefore, when the signal intensity of the first Bluetooth headset and the signal intensity of the second Bluetooth headset meet the preset intensity condition, the second Bluetooth headset is switched to serve as a main headset to be connected with the electronic equipment, the packet loss rate of data transmission between the electronic equipment is reduced, and the data transmission quality between the electronic equipment is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a flowchart of a headset control method according to one embodiment of the present application.
Fig. 2 shows a schematic view of a scenario provided in an embodiment of the present application.
Fig. 3 shows a flowchart of a headset control method according to another embodiment of the present application.
Fig. 4 shows a flowchart of a headset control method according to a further embodiment of the present application.
Fig. 5 shows a flowchart of a headset control method according to yet another embodiment of the present application.
Fig. 6 shows a flowchart 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 a headset control method according to an embodiment of the present application.
Fig. 9 is a storage unit for storing or carrying program codes for implementing the earphone control method according to the embodiment of the present application.
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions in the embodiments of the present application with reference to the accompanying 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. Along with further development of the technology level and increase of demands of users, the electronic device can be connected with the external audio playing device, so that the electronic device 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 headset in a wireless communication manner to play the audio data by using, for example, a headset that uses wireless fidelity (Wireless Fidelity, wiFi) communication or a headset that uses Bluetooth (BT) communication. Particularly for users with high demands, the playing of audio data is performed by means of real wireless stereo (True Wireless Stereo, TWS) headphones with a wireless separation of the left channel from the right channel. The real wireless stereo headset can realize the wireless separation of the real Bluetooth left channel and the real Bluetooth right channel, namely, the two headsets of the real wireless stereo headset do not need wired connection. When playing audio data by using the real wireless stereo headset, the electronic device may connect to a master headset of the wireless stereo headset, and the slave headset is connected to the master headset, where the master headset transmits link information (including, but not limited to, bluetooth address and other information) between the slave headset and the electronic device to the slave headset, so that the slave headset may acquire audio data of the electronic device (e.g., an audio source device) by means of bluetooth listening (snip), thereby directly acquiring audio data from the electronic device with the master headset, and in some manners, the master headset may also transmit the audio data to the slave headset after receiving the audio data transmitted by the electronic device by means of the master headset. Therefore, stereo playing with separated left and right sound channels is realized, and song listening, conversation and wearing are all promoted.
In the conventional wireless stereo headset, a mode of performing master-slave switching between a master headset and a slave headset generally uses a change of state of the headset as a switching basis, for example, abnormal connection between the master headset and an electronic device, the fact that the master headset is put into a charging box, the electric quantity of the master headset is too low, and the like as the switching basis.
The inventor discovers through long-time research that in the traditional master-slave switching mode between the master earphone and the slave earphone, the change of the surrounding environment is not considered, so that in some scenes, the signal strength of the slave earphone and the host is obviously more suitable for being used as the master earphone connected with the electronic equipment to carry out data transmission with the electronic equipment.
For example, the real-time requirement of the bluetooth call scene on the transmission link is relatively high, the transmission link allows transmission for three times at most when transmitting the same packet of call audio data, if the electronic device still does not receive the corresponding audio data packet after the transmission for three times, it means that the electronic device loses the data packet, and then the voice content is lost in the call, so that bad experience is brought to the user. When the TWS earphone is used for conversation in some special situations (for example, when the TWS earphone and the host device are in an environment with stronger interference or communication between the host device and the main ear needs to penetrate through the body, the signal intensity of the slave ear and the host device is obviously better than that of the main ear and the electronic device), the main ear microphone conversation data can often generate packet loss phenomenon during transmission, and although the slave ear signal is relatively better, the slave ear microphone cannot transmit data at the moment, so that bad inspection (such as a phenomenon that a conversation partner hears a sound with a jam) can be brought to a user.
In view of the above problems, the inventors propose an earphone control method, an apparatus, a bluetooth earphone, and a storage medium provided in the embodiments of the present application, where when a first bluetooth earphone is used as a master earphone and a second bluetooth earphone is used as a slave earphone, according to signal strength between the first bluetooth earphone and an electronic device (e.g., a sound source device) and signal strength between the second bluetooth earphone and the electronic device, when the signal strength between the second bluetooth earphone and the electronic device meets a preset strength condition, the first bluetooth earphone is switched to be connected with the electronic device as the master earphone, so as to ensure data transmission quality between the second bluetooth earphone and the electronic device. When the second Bluetooth headset is a slave headset, the second signal intensity is obtained by monitoring the communication between the electronic equipment and the first Bluetooth headset based on the second Bluetooth headset; the earphone control method disclosed by the invention can be suitable for the situation that the main earphone and the auxiliary earphone acquire audio data from the sound source device, wherein the main earphone is connected with the sound source device through Bluetooth, so that the first signal intensity between the main earphone and the sound source device can be determined, the auxiliary earphone acquires the audio data through monitoring the link between the main earphone and the sound source device, so that the second signal intensity between the auxiliary earphone and the sound source device can be determined, and can be suitable for the situation that the main earphone acquires the audio data from the sound source device and then the main earphone forwards the audio data to the auxiliary earphone, but the auxiliary earphone can acquire the second signal intensity through monitoring the link between the main earphone and the sound source device, namely, in the situation, the auxiliary earphone monitors to acquire the second signal intensity, not necessarily to acquire the audio data for playing. The specific earphone control method is described in detail in the following embodiments.
Referring to fig. 1, fig. 1 is a flow chart illustrating a headset 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 guaranteeing the data transmission quality between the master earphone and the slave earphone and the electronic equipment. In a specific embodiment, the earphone control method is applied to a first bluetooth earphone. The specific flow of this embodiment will be described below using the first bluetooth headset as an example. The following describes the flowchart shown in fig. 1 in detail, and the earphone control method specifically includes 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 are connected with a Bluetooth headset by using an electronic device, so as to realize the transmission of audio data collected by the headset and the playing of audio data to be played, and especially for users with higher demands, the users can use a TWS headset to perform data transmission with the electronic device. In actual use of the TWS headset, a master headset typically establishes a bluetooth link with the electronic device for connection, and a slave headset establishes a bluetooth link with the master headset for connection. Further, 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 communication between the electronic device and the master earphone can be monitored, and further second signal strength between the slave earphone and the electronic device is obtained.
In this embodiment, 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 audio data of a left channel, and the second bluetooth headset may be a headset for playing audio data of a right channel, and of course, the first bluetooth headset may also be a headset for playing audio data of a right channel, and the second bluetooth headset is a headset for playing audio data of a left channel.
Because the TWS earphone is in actual use, the signal intensity between the master earphone and the electronic device and the signal intensity between the slave earphone and the electronic device are possibly changed due to the influence of the actual environment, the signal intensity between the master earphone and the electronic device and the signal intensity between the slave earphone and the electronic device can be monitored, so that when the signal intensity between the slave earphone and the electronic device is more suitable for being connected with the electronic device as the master earphone, master-slave switching between the master earphone and the slave earphone is performed. It can be understood that, since the main earphone and the electronic device are established with a bluetooth link, the bluetooth signal strength between the main earphone and the electronic device can be determined; while the slave earphone does not establish a bluetooth connection link with the electronic device, the slave earphone in the TWS earphone may establish a listening link with the electronic device, where the listening link is used to listen to the transmission condition of audio data between the master earphone and the electronic device, so that the signal strength between the slave earphone and the electronic device may also be determined.
In some embodiments, the first bluetooth headset as the master headset may begin monitoring and recording bluetooth signal strength between the first bluetooth headset and the electronic device after the bluetooth link with the electronic device is established. 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 present application, the first bluetooth headset may use the bluetooth signal strength between the acquired 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 a plurality of times, or 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, the first bluetooth headset as the master headset obtains the second signal intensity of the second bluetooth headset through its bluetooth link with the second bluetooth headset (slave headset), obtain the bluetooth signal intensity between second bluetooth headset and the electronic equipment promptly, further, the master headset can compare first signal intensity and the second signal intensity, judge whether satisfy the master slave switching condition according to the comparison result, if satisfy, send the switching command to the slave headset through the bluetooth link between master headset and the slave headset, so that the slave headset carries out master slave switching, and master headset itself also switches. Likewise, the second signal intensity of the second bluetooth headset may be obtained, or the bluetooth signal intensity of the second bluetooth headset between a certain time and the electronic device may be obtained, or the bluetooth signal intensity of the second bluetooth headset between a plurality of times and the electronic device may be obtained, or the average bluetooth signal intensity of the second bluetooth headset between a period of time and the electronic device may be obtained.
Step S120: and determining that the first signal intensity and the second signal intensity meet a preset intensity condition.
In this embodiment of the present application, after obtaining the first signal strength between the first bluetooth headset and the electronic device and the 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 meet the preset strength condition according to the first signal strength and the second signal strength. If the first signal intensity and the second signal intensity meet the preset intensity condition, the main earphone is required to be switched to the second Bluetooth earphone; if the first signal intensity and the second signal intensity indicate that the main earphone is not required to be switched to the second Bluetooth earphone, at this time, the first Bluetooth earphone can be kept connected with the electronic device 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 of the second bluetooth headset as more suitable as the master 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, 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, 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, whether the preset intensity condition is satisfied may be determined after the signal intensities of the two headphones are acquired by the master headphone, or whether the preset intensity condition is satisfied may be determined after the signal intensities of the two headphones are acquired by the slave headphone.
Step S130: and if the signal intensity of the first Bluetooth headset and the signal intensity of the second Bluetooth headset meet the preset intensity condition, 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 be connected with the electronic equipment.
In this application embodiment, when determining that the first signal intensity of the first bluetooth headset and the second signal intensity of the second bluetooth headset meet the preset intensity condition, the switching between the master headset and the slave headset is performed, so that the first bluetooth headset is switched into the slave headset, and the second bluetooth headset is switched into 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 instruct the second bluetooth headset to establish bluetooth connection with the electronic device as a master headset. In some embodiments, after the first bluetooth headset sends the switch indication information to the second bluetooth headset, the first bluetooth headset may switch itself to the slave headset after receiving the indication information sent by the second bluetooth headset and used for indicating that the second bluetooth headset is ready to establish a 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 to switch to the slave headset, where the second bluetooth headset immediately establishes a connection with the electronic device 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 the data transmission is interrupted due to the fact that the first Bluetooth headset is disconnected from the electronic device under the condition that the second Bluetooth headset does not establish a Bluetooth link between the completion and the electronic device is avoided.
It should be noted that, the first bluetooth headset may refer to a bluetooth headset currently used as a master headset in the TWS headset, and all bluetooth headsets used 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.
According to the earphone control method, when the first Bluetooth earphone is used as the master earphone and connected with the electronic equipment, the second Bluetooth earphone is used as the slave earphone and connected with the first Bluetooth earphone, the first Bluetooth earphone obtains the first signal intensity of the first Bluetooth earphone and obtains the second signal intensity of the second Bluetooth earphone, if the first signal intensity and the second signal intensity are determined to meet the preset intensity conditions, switching indication information is sent to the second Bluetooth earphone, the switching indication information is used for indicating the second Bluetooth earphone to serve as the master earphone and be connected with the electronic equipment, so that when the signal intensity representation slave earphone of the master earphone and the slave earphone is more suitable for serving as the master earphone, the switching between the master earphone and the slave earphone is conducted, the first Bluetooth earphone is switched into the slave earphone, the second Bluetooth earphone is switched into the master earphone, the packet loss rate of data transmission between the second Bluetooth earphone and the electronic equipment is reduced, and the data transmission quality between the second Bluetooth earphone and the electronic equipment is guaranteed.
Referring to fig. 3, fig. 3 is a flow chart illustrating a headset 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 respect to the flow shown in fig. 3, where the earphone control method specifically includes 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 content of the foregoing embodiment, which is not described herein.
Step S220: determining that the second signal strength is not less than a first threshold.
In this embodiment of the present application, after the first bluetooth headset serving as the master headset obtains the first signal strength between the first bluetooth headset and the electronic device, and the second signal strength between the second bluetooth headset and the electronic device, the signal strength of the second bluetooth headset may be compared with the first threshold. The first threshold may be a signal strength condition that a bluetooth headset in the TWS headset may be used as a main headset to perform data transmission with the electronic device, if the signal strength of the bluetooth headset is less than or equal to the first threshold, the bluetooth headset may not be used as the main headset to perform data transmission with the electronic device, and if the signal strength of the bluetooth headset is greater than the first threshold, the bluetooth headset may be used as the main headset to perform data transmission with the electronic device.
Step S230: and determining that the first signal intensity and the second signal intensity meet a preset intensity condition.
In this embodiment of the present application, when the signal strength of the second bluetooth headset is greater than the first threshold, it indicates that the bluetooth headset may serve as the master headset for data transmission with the electronic device. Therefore, it can be determined whether the first signal strength of the first bluetooth headset and the second signal strength of the second bluetooth headset meet the preset strength condition, and if the preset strength condition is met, the switching indication information can be sent to the second bluetooth headset so as to switch the main headset to the second bluetooth headset which is more suitable for data transmission with the electronic device.
In some embodiments, when the signal strength of the second bluetooth headset is less than or equal to the first threshold, step S230 and step S240 may not be performed, that is, when the second bluetooth headset cannot be used as the master headset, the subsequent determination of whether the first signal strength and the second signal strength meet the preset strength condition may not be performed, and the switching operation of the master headset when the preset strength condition is met. Thus, the workload of the main earphone can be effectively saved, and 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, at the moment, the first Bluetooth earphone can be used as the main earphone to carry out data transmission with the electronic equipment, and the second Bluetooth earphone can not be used as the main earphone to carry out data transmission with the electronic equipment, at the moment, the first Bluetooth earphone is more suitable for being used as the main earphone, so that the switching of the main earphone can be omitted; of course, the first signal strength and the second signal strength may be both smaller than or equal to the first threshold, and at this time, the first bluetooth headset and the second bluetooth headset do not meet the requirement of performing data transmission with the electronic device as the main headset, so that switching of the main headset may not be performed, and when the signal strength of the first bluetooth headset and the signal strength of the second bluetooth headset are both smaller than or equal to the first threshold, the signal strength of the first bluetooth headset and the signal strength of the second bluetooth headset meet the preset strength condition, and ineffective switching caused by switching operation of the main headset is performed, so that power consumption of the TWS headset is effectively reduced.
In some embodiments, when the first signal strength and the second signal strength are both less than or equal to the first threshold, since the first bluetooth headset and the second bluetooth headset cannot meet the requirement of data transmission with the electronic device, the first bluetooth headset can send out a prompt message (such as outputting a prompt voice) to prompt a user to replace the position of the bluetooth headset, so that the signal strength of the first bluetooth headset is improved, and the data transmission with the electronic device can be met.
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, when the first Bluetooth earphone is used as a master earphone and connected with the electronic equipment, the second Bluetooth earphone is used as a slave earphone and connected with the first Bluetooth earphone, the first Bluetooth earphone obtains the first signal intensity of the first Bluetooth earphone and obtains the second signal intensity of the second Bluetooth earphone, then the signal intensity of the second Bluetooth earphone is compared with the first threshold value, when the signal intensity of the second Bluetooth earphone is larger than the first threshold value, the first signal intensity and the second signal intensity are determined to meet the preset intensity condition, 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 equipment as the master earphone. Therefore, when the signal intensity of the master earphone and the slave earphone is used for determining that the slave earphone is more suitable as the master earphone, the switching between the master earphone and the slave earphone is carried out, so that the first Bluetooth earphone is switched into the slave earphone, the second Bluetooth earphone is switched into the master earphone, the packet loss rate of data transmission between the slave earphone and the electronic equipment is reduced, and the data transmission quality between the slave earphone and the electronic equipment is ensured. And when the signal intensity of the second Bluetooth headset is smaller than or equal to the first threshold value, the power consumption caused by the subsequent processing steps of the first Bluetooth headset under the condition that the second Bluetooth headset does not meet the requirement of data transmission between the main headset and the electronic equipment can be avoided.
Referring to fig. 4, fig. 4 is a flow chart illustrating a headset 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 respect to the flow shown in fig. 4, where the earphone control method specifically includes the following steps:
step S310: and determining that the first Bluetooth headset is used as a main headset and is in a transmission state of audio data with the electronic equipment.
In this embodiment of the present application, when determining that the first bluetooth headset is in the transmission state of audio data between the main headset and the electronic device, for example, the TWS headset is used for a scene such as an audio call scene, a music playing scene, etc., the first signal strength of the first bluetooth headset and the signal strength of the second bluetooth headset may be obtained.
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 the audio data type, determining that the data between the first Bluetooth headset and the electronic equipment is in the transmission state of the audio data; if the data type of the data transmitted between the first Bluetooth headset and the electronic equipment is not the audio data type, the fact that the data between the first Bluetooth headset and the electronic equipment is not in the transmission state of the audio data can be determined.
It should be noted that, step S310 in the embodiment of the present application may be equally applicable to other embodiments.
Step S320: and periodically and respectively acquiring the average signal intensity among the first Bluetooth headset, the second Bluetooth headset and the electronic equipment as a first signal intensity and a second signal intensity.
In this embodiment of the present application, the signal intensity of the first bluetooth headset and the second bluetooth headset may be obtained by the first bluetooth headset, the second bluetooth headset, and the electronic device periodically and respectively. The specific value of the period may be, but not limited to, 1 minute, 2 minutes, or the like.
In some embodiments, the first bluetooth headset may monitor the bluetooth signal strength between itself and the electronic device, so that a time-varying relationship of the bluetooth signal strength may be obtained, or bluetooth signal strengths at multiple times may be obtained. The first bluetooth headset may periodically obtain the average signal strength according to a relationship of the obtained bluetooth signal strength varying with time or bluetooth signal strengths at a plurality of moments.
In some embodiments, the second bluetooth headset may also monitor the bluetooth signal strength between itself and the electronic device, so that a time-varying relationship of the bluetooth signal strength may be obtained, or bluetooth signal strengths at multiple times may be obtained. The second bluetooth headset may periodically obtain the average signal strength according to the relationship of the obtained bluetooth signal strength with time variation or the bluetooth signal strength at a plurality of moments. After the second Bluetooth headset obtains the average signal intensity, the counted average signal intensity can be sent to the first Bluetooth headset, so that the first Bluetooth headset can obtain the average signal intensity between the second Bluetooth headset and the electronic equipment.
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 average signal strength between the second bluetooth headset and the electronic device may be obtained by obtaining an average signal strength in at least one period adjacent to the current time. Therefore, the obtained first signal intensity and second signal intensity can embody the signal intensity between the first Bluetooth earphone and the electronic equipment as well as the second Bluetooth earphone, and an accurate basis is provided for master-slave switching of the master earphone and the slave earphone.
Step S330: and obtaining a difference value between the second signal intensity and the first signal intensity.
In this embodiment of the present application, the first bluetooth headset may determine, according to the obtained first signal strength and the second signal strength, whether the first signal strength and the second signal strength meet a preset strength condition, and calculate a difference between the second signal strength and the first signal strength, so as to determine, according to the calculated difference, whether the preset strength condition is met.
Step S340: determining that the difference is not less than a second threshold.
In this embodiment of the present application, 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 the 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, the first signal strength and the second signal strength do not meet the preset strength condition, and switching of the main earphone is not needed. If the difference is not smaller than (i.e. smaller 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 be indicated that the first signal strength and the second signal strength meet the preset strength condition, and the switching of the main earphone is required. The specific value of the second threshold may not be limited, and may be set according to actual requirements.
It should be noted that, the manner in which the first signal strength and the second signal strength determined in step S330 and step S340 satisfy the preset strength condition in the embodiment of the present application may also be applicable to the foregoing embodiment.
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 this embodiment, step S350 may refer to the content of the foregoing embodiment, which is not described herein.
According to the earphone control method, when the first Bluetooth earphone serving as the master earphone is in the transmission state of audio data with the electronic equipment, the average signal intensity between the first Bluetooth earphone and the second Bluetooth earphone and the electronic equipment is obtained, then the difference between the average signal intensity of the second Bluetooth earphone and the average signal intensity of the first Bluetooth earphone is calculated, if the difference is not smaller than the second threshold, switching indication information is sent to the second Bluetooth earphone and used for indicating the second Bluetooth earphone to serve as the master earphone to be connected with the electronic equipment, so that when the signal intensity characterization slave earphone of the master earphone and the slave earphone is more suitable for serving as the master earphone, switching between the master earphone and the slave earphone is conducted, the first Bluetooth earphone is switched into the slave earphone, the second Bluetooth earphone is switched into the master earphone, the packet loss rate of data transmission between the second Bluetooth earphone and the electronic equipment is reduced, and the data transmission quality between the second Bluetooth earphone and the electronic equipment is guaranteed.
Referring to fig. 5, fig. 5 is a flowchart illustrating a headset 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 respect to the flow shown in fig. 5, where the earphone control method specifically includes 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 this embodiment, step S410 may refer to the content of the foregoing embodiment, which is not described herein.
Step S420: and respectively acquiring a first change rate and a second change rate corresponding to the first signal intensity and the second signal intensity.
In this embodiment of the present application, when determining, according to the first signal strength and the second signal strength, whether the first signal strength and the second signal strength meet the preset strength condition, the first bluetooth headset serving as the main headset may respectively obtain, according to the obtained first signal strength and the obtained second signal strength, a first rate of change corresponding to the first signal strength, and a second rate of change corresponding to the second signal strength.
In some embodiments, the first signal strength obtained by the first bluetooth headset may be signal strengths 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 signal strengths 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 can calculate the average change rate of the signal intensity in the preset duration according to the signal intensity of the first bluetooth headset at a plurality of moments corresponding to the first bluetooth headset, and the calculated average change rate of the signal intensity corresponding to the first bluetooth headset is used as the first change rate. Similarly, the first bluetooth headset may calculate an average rate of change of the signal strength within the preset duration according to the signal strengths of the second bluetooth headset at a plurality of moments, and use the calculated average rate of change of the signal strength corresponding to the second bluetooth headset as the second rate of change.
In other embodiments, the first signal strength obtained by the first bluetooth headset may also be a first change curve of the signal strength corresponding to the first bluetooth headset, where the first change curve of the signal strength corresponding to the first bluetooth headset changes with time, and the second signal strength may also be a second change curve of the signal strength corresponding to the first bluetooth headset, where the second change curve of the signal strength corresponding to the first bluetooth headset changes with time. According to a first change curve of the signal intensity corresponding to the first Bluetooth headset, which changes along with time, the change rate of the current signal intensity (namely the slope of the first change curve at the current moment) can be obtained, and the obtained change rate is taken 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 moment) can 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 this embodiment, after obtaining the first rate of change of the first signal strength and the second rate of change of the second signal strength, the first bluetooth headset may compare the second rate of change with the first rate of change. If the second change rate is larger than the first change rate, it can be determined that the first signal strength and the second signal strength meet the preset 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 meet the preset strength condition, that is, the switching of the master earphone is not required.
It can be understood that when the second rate of change is greater than the first rate of change, the first rate of change and the second rate of change may be both positive, which indicates that the rate of increase of the signal strength between the second bluetooth headset and the electronic device is greater than the rate of increase 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, so that it may be determined that the first signal strength and the second signal strength meet the preset strength condition, that is, the second bluetooth headset is more suitable for data transmission with the electronic device as the main headset. If the second rate of change is greater than the first rate of change, the first rate of change and the second rate of change may be both negative, which indicates that the speed of signal strength decrease between the second bluetooth headset and the electronic device is less than the speed of signal strength decrease 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, so that it may be determined that the first signal strength and the second signal strength meet the preset 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 greater than the first rate of change, also probably the first rate of change is negative, and the second rate of change is positive, that is to say that the signal strength of first bluetooth headset is decreasing, and the signal strength of second bluetooth headset is increasing, so, the signal strength of follow-up second bluetooth headset can be greater than the signal strength of first bluetooth headset, consequently can confirm that first signal strength and second signal strength satisfy preset intensity condition, and that is to say that second bluetooth headset is more suitable for carrying out data transmission as main earphone and electronic equipment. On the contrary, when the second change rate is greater than the first change rate, the signal intensity of the subsequent first bluetooth headset is greater than the signal intensity 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 characterizes the trend of the signal intensity over a predetermined period of time, i.e. the average slope of the signal intensity curve over the predetermined period of time.
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 content of the foregoing embodiment, which is not described herein.
In this embodiment of the present 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 on the ear of the user, and the non-wearing state refers to a state that the Bluetooth headset is not worn on the ear of the user, namely, a state that the Bluetooth headset is taken out from the ear of the user.
In some embodiments, the second bluetooth headset may detect the headset state, and specifically may acquire data detected by the second bluetooth headset and used for determining the headset state, for example, the received pressure data, the detected temperature, the ambient light intensity, the capacitance measurement value, and the like, and determine that the second bluetooth headset is in the wearing state or the non-wearing state according to the data used for determining the headset state. After the second Bluetooth headset determines the headset state, the headset state can be sent to the first Bluetooth headset, and the first Bluetooth headset can obtain the headset state of the second Bluetooth headset.
Further, after acquiring the earphone state of the second bluetooth earphone, it may be determined whether the earphone state is a wearing state, and if so, it indicates that the second bluetooth earphone is being used by the user, so that the main earphone may be switched to the second bluetooth earphone. If the second Bluetooth headset is not in the wearing state, the second Bluetooth headset is not used by the user currently, and the main headset does not need to be switched to the second Bluetooth headset.
According to the earphone control method, the first Bluetooth earphone serving as the master earphone is used for acquiring the first signal intensity of the first Bluetooth earphone and the second signal intensity of the second Bluetooth earphone, then acquiring the first change rate of the first signal intensity and the second change rate of the second signal intensity, determining that the second signal intensity and the first signal intensity meet the preset intensity condition when the second change rate is larger than the first change rate, and sending switching indication information to the second Bluetooth earphone at the moment, wherein the switching indication information is used for indicating the second Bluetooth earphone to serve as the master earphone to be connected with the electronic equipment, so that when the signal intensity characterization slave earphone of the master earphone and the slave earphone is more suitable for serving as the master earphone, switching between the master earphone and the slave earphone is conducted, the first Bluetooth earphone is conveniently switched into the slave earphone, the second Bluetooth earphone is switched into the master earphone, the packet loss rate of data transmission between the second Bluetooth earphone and the electronic equipment is reduced, and the data transmission quality between the second Bluetooth earphone and the electronic equipment is guaranteed.
Referring to fig. 6, fig. 6 is a flow chart illustrating a headset control method according to still another embodiment of the present application. The earphone control method is applied to the first Bluetooth earphone, when the first Bluetooth earphone is used as a master earphone and connected with the electronic equipment, the second Bluetooth earphone is used as a slave earphone and connected with the first Bluetooth earphone, and the number of the second Bluetooth earphone is more than one. The following details about the flowchart shown in fig. 6, the earphone control method specifically may 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 this embodiment of the present application, the number of second bluetooth headsets serving as slave headsets may be plural, for example, in a teleconference scenario, one master headset is connected to the electronic device, and the other slave headsets are connected to the master headset, so as to implement transmission of audio data in the teleconference. In this case, the first bluetooth headset may acquire the second signal strength of each of the second bluetooth headsets.
Step S520: and respectively acquiring the difference values of the second signal intensities corresponding to the second Bluetooth headset and the first signal intensities.
In this embodiment of the present application, the first bluetooth headset may obtain a difference between the second signal strength and the first signal strength of each second bluetooth headset, so as to obtain a plurality of differences.
Step S530: determining that a plurality of differences are not smaller than a third threshold value.
In this embodiment of the present application, after obtaining the differences between the plurality of second signal intensities and the first signal intensities, it may be determined whether a difference no smaller than a third threshold exists in the plurality of differences, and if a difference no smaller than the third threshold exists, it indicates that a second bluetooth headset corresponding to the difference no smaller than the third threshold is more suitable to be connected to the electronic device as a master headset than the first bluetooth headset, so that it may be determined that a preset intensity condition is satisfied.
Step S540: and acquiring the second Bluetooth headset corresponding to the difference value which is not smaller than the third threshold as a target Bluetooth headset.
In this embodiment of the present application, the first bluetooth headset may determine a second bluetooth headset corresponding to each difference value that is not less than the third threshold, and use the determined second bluetooth headset as the target bluetooth headset. It can be appreciated that if the above determined difference value not smaller than the third threshold value is a plurality of, a plurality of target bluetooth headsets can be determined; if the determined difference value not smaller than the third threshold value is 1, 1 target Bluetooth headset can be determined.
Step S550: and sending the switching indication information to a target Bluetooth headset with the maximum signal strength, the highest electric quantity or the maximum data quantity of the collected audio data, wherein the switching indication information is used for indicating the target Bluetooth headset to be used as a main headset to establish connection with the electronic equipment.
In this embodiment of the present application, when the switching of the main headset is performed, if the number of the above-determined target bluetooth headsets is multiple, a target bluetooth headset may be determined according to the signal strength, the electric quantity, or the data quantity of the collected audio data of the target bluetooth headset, and then switching indication information is sent to the determined target bluetooth headset, so that the target bluetooth headset is switched into the main headset to be connected with the electronic device. And if the determined number of the target Bluetooth headsets is 1, the switching indication information can be directly sent to the target Bluetooth headsets.
In some embodiments, when the number of the target bluetooth headsets is multiple, one target bluetooth headset with the maximum signal strength may be determined from the multiple target bluetooth headsets according to the signal strength between each target bluetooth headset and the electronic device, and the switching indication information may be sent to the one target bluetooth headset with the maximum signal strength, so as to switch the target bluetooth headset with the maximum signal strength into the master headset, thereby ensuring the quality of data transmission.
In other embodiments, when the number of the target bluetooth headsets is multiple, one target bluetooth headset with the maximum residual electric quantity can be determined from the multiple target bluetooth headsets according to the residual electric quantity of each target bluetooth headset, and switching indication information is sent to the one target bluetooth headset with the maximum residual electric quantity, so that the target bluetooth headset with the maximum residual electric quantity is switched to a main headset, the durability of data transmission is ensured, and the quality of data transmission is further ensured.
In still other embodiments, audio data may also be collected from the headset and transmitted to the electronic device via the master headset, e.g., in a teleconference, both the master headset and the user of the slave headset may speak and collect audio data via their headset. Under the condition, the data volume of the audio data collected by each target Bluetooth headset (for example, the data volume collected in a set time period) can be obtained respectively, then one target Bluetooth headset with the largest data volume is obtained, and switching indication information is sent to one target Bluetooth headset with the largest data volume, so that the target Bluetooth headset with the largest data volume is switched to a main headset, the audio data collected by the Bluetooth headset with the larger data volume can be reduced, the audio data can be transmitted to the electronic equipment only after being transferred by the main headset, and the data transmission volume of the Bluetooth headset is effectively saved.
According to the earphone control method, 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 earphone 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, 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 a plurality of difference values not smaller than a third threshold value when determining that the plurality of difference values are not smaller than the third threshold value, and sends switching indication information to the determined target Bluetooth headsets. Therefore, in the application scene of the plurality of slave earphones, master-slave switching of the master earphone and the slave earphone is performed according to the signal intensity of each earphone, the packet loss rate of data transmission with the electronic equipment is reduced, and the data transmission quality with the electronic equipment is ensured.
The following describes the earphone control method provided in the embodiment of the present application in a call scenario.
In an actual conversation scenario, before conversation is performed, the electronic device establishes connection with a first bluetooth headset (master headset), and the first bluetooth headset can synchronize connection parameters of the electronic device and the master headset to a second bluetooth headset (slave headset), so that the second bluetooth headset can establish a listening link according to the connection parameters, or can be subsequently connected with the electronic device as the master headset according to the connection parameters. When the communication is carried out, the electronic equipment establishes a pass and notifies the first Bluetooth headset to start the communication, the first Bluetooth headset can start to count the signal intensity periodically after receiving the notification, and notifies the second Bluetooth headset to start to count the signal intensity periodically. After a period is reached, the second Bluetooth earphone synchronously counts the signal intensity to the first Bluetooth earphone, the first Bluetooth earphone judges whether the signal intensity of the first Bluetooth earphone and the signal intensity of the second Bluetooth earphone meet a preset intensity condition (for example, whether the signal intensity of the first Bluetooth earphone is smaller than a certain value than the signal intensity of the second Bluetooth earphone), if the preset intensity condition is met, the first Bluetooth earphone can synchronously switch information from the master Bluetooth earphone to the second Bluetooth earphone, namely, send switch instruction information to the second Bluetooth earphone, and then the first Bluetooth earphone and the second Bluetooth earphone simultaneously switch master earphone and slave earphone, so that the master earphone is switched into the slave earphone with better signal intensity in the conversation, the packet loss rate of data in the conversation is reduced, and the user experience in the conversation is improved.
Referring to fig. 7, a block diagram of an earphone control device 400 according to an embodiment of the present application is shown. The headset control device 400 is applied to the first bluetooth headset, and when the first bluetooth headset is used as a master headset and connected with the electronic device, the second bluetooth headset is used as a slave headset and connected with the first bluetooth headset. The earphone control device 400 includes: a signal acquisition module 410, a condition determination module 420, and an earphone switch 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 meet 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 instruct the second bluetooth earphone to establish connection with the electronic device as a master earphone.
In the embodiment of the present application, the headset control device 400 may further include: and an intensity determination module. The intensity determining module is used for determining that the second signal intensity is not smaller than a first threshold value before the first signal intensity and the second signal intensity are determined to meet a preset intensity condition.
In this embodiment of the present application, the signal acquisition module may be specifically configured to: and periodically and respectively acquiring the average signal intensity among the first Bluetooth headset, the second Bluetooth headset and the electronic equipment as a first signal intensity and a second signal intensity.
In some implementations, the condition determination module 420 may include: a first difference acquisition unit and a first difference determination unit. The first difference value acquisition unit is used for acquiring a difference value between the second signal intensity and the first signal intensity; the first difference determining unit is used for determining that the difference is not smaller than a second threshold.
In some embodiments, the headset control device may further include a rate of change 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 of the first bluetooth headset after the first signal strength and the second signal strength of the second bluetooth headset are obtained. The condition determination 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 determination module 420 may include: a second difference acquisition unit and a second difference determination unit. The second difference value obtaining unit is used for obtaining differences between a plurality of second signal intensities corresponding to the second Bluetooth headset and the first signal intensities respectively; the second difference determining unit is used for determining that a plurality of differences which are not smaller than a third threshold exist in the plurality of differences.
Further, the earphone switching module 430 may include: earphone acquisition unit and instruction sending unit. The earphone acquisition unit is used for acquiring a plurality of second Bluetooth earphones corresponding to the difference value which is not smaller than a third threshold value as target Bluetooth earphones; the indication sending unit is used for sending the switching indication information to one 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 headset control device 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 headset control device 400 may further include a second state determination module. The second state determining module is configured to determine, before the first signal strength of the first bluetooth headset and the second signal strength of the second bluetooth headset are obtained, that the first bluetooth headset is in a transmission state of audio data between the first bluetooth headset and the electronic device as a master headset.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus and modules described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
In several embodiments provided herein, the coupling of the modules to each other may be electrical, mechanical, or other.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
An embodiment of the present application provides a bluetooth headset, which includes a first bluetooth headset and a second bluetooth headset. The first Bluetooth headset is connected with the electronic equipment as a master headset, and the second Bluetooth headset is connected with the first Bluetooth headset as a slave headset. The first Bluetooth headset is used for acquiring first signal intensity of the first Bluetooth headset and second signal intensity of the second Bluetooth headset; the first Bluetooth headset is further used for determining that the first signal intensity and the second signal intensity meet a preset intensity 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 be connected with the electronic equipment; and the second Bluetooth headset is used for responding to the switching indication information and is used as a main headset to be connected with the electronic equipment.
To sum up, the scheme that this application provided, when first bluetooth headset was connected with electronic equipment as main earphone, second bluetooth headset was connected with first bluetooth headset as slave earphone, and first bluetooth headset is through obtaining first signal strength and the second signal strength of second bluetooth headset of first bluetooth headset, if first signal strength and second signal strength satisfy preset intensity condition, sends switching instruction information to second bluetooth headset, and this switching instruction information is used for instructing second bluetooth headset to establish with electronic equipment as main earphone and is connected. Therefore, when the signal intensity of the first Bluetooth headset and the signal intensity of the second Bluetooth headset meet the preset intensity condition, the second Bluetooth headset is switched to serve as a main headset to be connected with the electronic equipment, the packet loss rate of data transmission between the electronic equipment is reduced, and the data transmission quality between the electronic equipment is ensured.
Please refer to fig. 8, which illustrates a block diagram of a bluetooth headset according to an embodiment of the present application. The bluetooth headset 100 may be any one of the 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 application programs, wherein the one or more application programs may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more program(s) configured to perform the method as described in the foregoing 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, 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 invoking data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 110 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 110 and may be implemented solely by a single communication chip.
The Memory 120 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Memory 120 may be used to store instructions, programs, code, sets of codes, or sets of instructions. 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 the various method embodiments described below, etc. The storage data area may also store data created by the bluetooth headset 100 in use (e.g., phonebook, 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 program code which can be invoked by a processor to perform the methods described in the method embodiments described above.
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. Optionally, the computer readable storage medium 800 comprises a non-volatile computer readable medium (non-transitory computer-readable storage medium). The computer readable storage medium 800 has storage space for program code 810 that performs any of the method steps described above. The program code can be read from or written to one or more computer program products. Program code 810 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, one of ordinary skill in the art will appreciate that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not drive the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (13)

1. A headset control method, 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, the method comprising:
acquiring first signal intensity of the first Bluetooth headset and second signal intensity of the second Bluetooth headset, wherein the first signal intensity is signal intensity between the first Bluetooth headset and the electronic equipment, the second signal intensity is signal intensity between the second Bluetooth headset and the electronic equipment, the second signal intensity is determined according to a monitoring link between the second Bluetooth headset and the electronic equipment, and the monitoring link is used for monitoring transmission conditions of audio data between the first Bluetooth headset and the electronic equipment;
Determining that the first signal strength and the second signal strength meet a preset strength condition, wherein the preset strength condition comprises that the second signal strength is larger than the first signal strength;
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 for communications of the electronic device with a first bluetooth headset;
before the determining that the first signal strength and the second signal strength meet a preset strength condition, the method further includes:
determining that the second signal strength is not less than a first threshold.
3. The method of claim 1, wherein the 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 headset, the second Bluetooth headset 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:
acquiring a difference value between the second signal intensity and the first signal intensity;
determining that the difference is not less than a second threshold.
5. The method of claim 1, wherein after said obtaining a first signal strength of said first bluetooth headset and a second signal strength of said second bluetooth headset, said method further comprises:
respectively acquiring a first change rate and a second change rate corresponding to the first signal intensity and the second signal intensity;
the determining that the first signal strength and the second signal strength meet 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 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 values of a plurality of second signal intensities corresponding to the second Bluetooth headset and the first signal intensities;
Determining that a plurality of differences are not smaller than a third threshold value.
7. The method of claim 6, wherein the sending the handoff indication information to the second bluetooth headset comprises:
acquiring a plurality of second Bluetooth headsets corresponding to the difference values which are not smaller than a third threshold as target Bluetooth headsets;
and sending the switching indication information to a target Bluetooth headset with the maximum signal strength, the highest electric quantity or the maximum data quantity of the collected audio data.
8. The method according to any one of claims 1-7, wherein prior to said sending the handoff direction information to the second bluetooth headset, the method further comprises:
acquiring an earphone state of the second Bluetooth earphone, wherein the earphone state comprises a wearing state and a non-wearing state;
and determining that the second Bluetooth headset is in a wearing state.
9. The method of any of claims 1-7, wherein prior to the acquiring 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 used as a main headset and is in a transmission state of audio data with the electronic equipment.
10. An earphone control device, characterized in that it is applied to a first bluetooth earphone, and when the 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 device comprising: the system comprises a signal acquisition module, a condition determination module and a headset switching module, wherein,
the signal acquisition module is used for acquiring first signal intensity of the first Bluetooth headset and second signal intensity of the second Bluetooth headset, wherein the first signal intensity is signal intensity between the first Bluetooth headset and the electronic equipment, the second signal intensity is signal intensity between the second Bluetooth headset and the electronic equipment, the second signal intensity is determined according to a monitoring link between the second Bluetooth headset and the electronic equipment, and the monitoring link is used for monitoring transmission conditions of audio data between the first Bluetooth headset and the electronic equipment;
the condition determining module is used for determining that the first signal intensity and the second signal intensity meet a preset intensity condition, wherein the preset intensity condition comprises that the second signal intensity is larger than the first signal intensity;
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: the first Bluetooth earphone is used as a master earphone to be connected with the electronic equipment, and the second Bluetooth earphone is used as a slave earphone to be connected with the first Bluetooth earphone,
the first Bluetooth headset is used for acquiring first signal intensity of the first Bluetooth headset and second signal intensity of the second Bluetooth headset, wherein the first signal intensity is signal intensity between the first Bluetooth headset and the electronic equipment, the second signal intensity is signal intensity between the second Bluetooth headset and the electronic equipment, the second signal intensity is determined according to a monitoring link between the second Bluetooth headset and the electronic equipment, and the monitoring link is used for monitoring transmission conditions of audio data between the first Bluetooth headset and the electronic equipment;
the first Bluetooth headset is further used for determining that the first signal strength and the second signal strength meet a preset strength condition, switching indication information is sent to the second Bluetooth headset, the switching indication information is used for indicating the second Bluetooth headset to be used as a main headset to be connected with the electronic equipment, and the preset strength condition comprises that the second signal strength is larger than the first signal strength;
And the second Bluetooth headset is used for responding to the switching indication information and is used as a main headset to be connected with the electronic equipment.
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 applications configured to perform the method of any of claims 1-9.
13. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a program code, which is callable by a processor for executing the method according to any one of claims 1-9.
CN202311788471.9A 2019-12-25 2019-12-25 Earphone control method and device, bluetooth earphone and storage medium Pending CN117528330A (en)

Priority Applications (1)

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

Applications Claiming Priority (2)

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
CN202311788471.9A CN117528330A (en) 2019-12-25 2019-12-25 Earphone control method and device, bluetooth earphone and storage medium

Related Parent Applications (1)

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

Publications (1)

Publication Number Publication Date
CN117528330A true CN117528330A (en) 2024-02-06

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 After (1)

Application Number Title Priority Date Filing Date
CN201911359923.5A Active CN113038317B (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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114501239B (en) * 2022-02-25 2024-05-10 Oppo广东移动通信有限公司 Master-slave switching method and device of earphone, bluetooth earphone and storage medium

Family Cites Families (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
CN108337074B (en) * 2018-06-22 2018-09-11 恒玄科技(上海)有限公司 The bluetooth headset wireless communications method of high reliability
CN109413526B (en) * 2018-09-30 2020-02-14 Oppo广东移动通信有限公司 Earphone control method, earphone control 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
CN109660971B (en) * 2018-12-05 2021-11-23 恒玄科技(上海)股份有限公司 Wireless earphone and communication method for wireless earphone
CN109660906B (en) * 2019-03-12 2019-06-25 恒玄科技(上海)有限公司 Wireless Bluetooth headsets, wireless Bluetooth headsets master-slave swap optimization method

Also Published As

Publication number Publication date
CN113038317B (en) 2024-01-16
CN113038317A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
US10931805B2 (en) Method and apparatus for controlling application program, and electronic device
CN108718467B (en) Voice data transmission method, wireless headset and TWS headset
CN109445740B (en) Audio playing method and device, electronic equipment and storage medium
CN109413555B (en) Audio output method and device, earphone and electronic equipment
CN108886653B (en) Earphone sound channel control method, related equipment and system
CN109151212B (en) Equipment control method and device and electronic equipment
CN109104684B (en) Microphone hole blockage detection method and related product
CN113038316A (en) Earphone control method and device, Bluetooth earphone and storage medium
WO2017181708A1 (en) Audio switching method and device for terminal, and electronic device
CN111436041A (en) Method and device for switching master and slave Bluetooth earphones, Bluetooth earphones and system
CN109271131B (en) Earphone control method and device, electronic equipment and storage medium
CN109379490B (en) Audio playing method and device, electronic equipment and computer readable medium
US20160330541A1 (en) Audio duplication using dual-headsets to enhance auditory intelligibility
CN107621933B (en) Audio playing method and device and related medium product
CN112013949A (en) Earphone wearing state determining method and device and earphone
CN111436042A (en) Bluetooth headset and dynamic master-slave switching method, device and system thereof
CN110602683B (en) Bluetooth control method, device, mobile terminal and storage medium
JP2015177226A (en) Radio equipment and short-range radio communication method
CN113038317B (en) Earphone control method and device, bluetooth earphone and storage medium
CN113553025B (en) Control method and system of Bluetooth headset based on game mode
CN109298846B (en) Audio transmission method and device, electronic equipment and storage medium
WO2020082391A1 (en) Wireless earphone control method and relevant product
CN113573202A (en) Data transmission control method and system of Bluetooth headset
CN110248347B (en) Call abnormity detection method, device, equipment and storage medium
CN114501239B (en) Master-slave switching method and device of earphone, bluetooth earphone and storage medium

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