Earphone control method and device, bluetooth earphone and storage medium
Patent Information
- Application Number
- CN202311788471.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-25
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2039-12-25
AI Technical Summary
TWS耳机通常分为主耳机与从耳机,但目前的主耳机与从耳机的切换方式难以保证与电子之间的数据传输质量
[0010]第五方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述第一方面提供的方法。
Smart Images

Figure CN117528330B_ABST
Abstract
Description
[0001] Cross-references to related applications
[0002] This application claims priority to Chinese application No. 201911359923.5, filed on December 25, 2019, the entire contents of which are incorporated herein by reference for all purposes. Technical Field
[0003] This application relates to the field of Bluetooth headset technology, and more specifically, to a headset control method, device, Bluetooth headset, and storage medium. Background Technology
[0004] Electronic devices, such as computers and mobile phones, have become among 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 using electronic devices, especially True Wireless Stereo (TWS) headphones with wirelessly separated left and right channels. TWS headphones are usually divided into master and slave earphones, but the current switching method between master and slave earphones makes it difficult to guarantee the data transmission quality between the earphone and the device. Summary of the Invention
[0005] In view of the above problems, this application proposes a headphone control method, device, Bluetooth headphone, and storage medium.
[0006] In a first aspect, embodiments of this application provide a headphone control method applied to a first Bluetooth headphone. When the first Bluetooth headphone is connected to an electronic device as a master headphone, a second Bluetooth headphone is connected to the first Bluetooth headphone as a slave headphone. The method includes: acquiring a first signal strength of the first Bluetooth headphone and a second signal strength of the second Bluetooth headphone, wherein the first signal strength is the signal strength between the first Bluetooth headphone and the electronic device, and the second signal strength is the signal strength between the second Bluetooth headphone and the electronic device; determining that the first signal strength and the second signal strength satisfy a preset strength condition; and sending switching indication information to the second Bluetooth headphone, the switching indication information being used to instruct the second Bluetooth headphone to establish a connection with the electronic device as a master headphone.
[0007] Secondly, embodiments of this application provide an earphone control device applied to a first Bluetooth earphone. When the first Bluetooth earphone is connected to an electronic device as a master earphone, a second Bluetooth earphone is connected to the first Bluetooth earphone as a slave earphone. The device includes: a signal acquisition module, a condition determination module, and an earphone switching module. The signal acquisition module is used to acquire a first signal strength of the first Bluetooth earphone and a second signal strength of the second Bluetooth earphone, wherein the first signal strength is the signal strength between the first Bluetooth earphone and the electronic device, and the second signal strength is the signal strength between the second Bluetooth earphone and the electronic device. The condition determination module is used to determine that the first signal strength and the second signal strength satisfy a preset strength condition. The earphone switching module is used to send switching indication information to the second Bluetooth earphone, the switching indication information being used to instruct the second Bluetooth earphone to establish a connection with the electronic device as a master earphone.
[0008] Thirdly, embodiments of this application provide a Bluetooth headset, including: a first Bluetooth headset and a second Bluetooth headset. The first Bluetooth headset is connected to an electronic device as a master headset, and the second Bluetooth headset is connected to the first Bluetooth headset as a slave headset. The first Bluetooth headset is used to acquire a first signal strength of the first Bluetooth headset and a second signal strength of the second Bluetooth headset. The first signal strength is the signal strength between the first Bluetooth headset and the electronic device, and the second signal strength is the signal strength between the second Bluetooth headset and the electronic device. The first Bluetooth headset is further used to determine that the first signal strength and the second signal strength satisfy a preset strength condition, and send switching indication information to the second Bluetooth headset. The switching indication information is used to instruct the second Bluetooth headset to establish a connection with the electronic device as a master headset. The second Bluetooth headset is used to respond to the switching indication information and connect to the electronic device as a master headset.
[0009] Fourthly, embodiments of this application provide 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, and the one or more applications are configured to perform the method provided in the first aspect above.
[0010] Fifthly, embodiments of this application provide a computer-readable storage medium storing program code, which can be invoked by a processor to execute the method provided in the first aspect above.
[0011] The solution provided in this application allows for the following configuration: When a first Bluetooth headset is connected to an electronic device as the primary headset, a second Bluetooth headset is connected to the first Bluetooth headset as the secondary headset. The first Bluetooth headset acquires a first signal strength and a second signal strength of the second Bluetooth headset, where the first signal strength is the signal strength between the first Bluetooth headset and the electronic device, and the second signal strength is the signal strength between the second Bluetooth headset and the electronic device. If the first and second signal strengths meet a preset strength condition, a switching instruction is sent to the second Bluetooth headset. This switching instruction instructs the second Bluetooth headset to establish a connection with the electronic device as the primary headset. This enables the second Bluetooth headset to be switched to the primary headset when the signal strengths of the first and second Bluetooth headsets meet the preset strength condition, reducing packet loss and ensuring data transmission quality between the two devices. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A flowchart of a headphone control method according to an embodiment of this application is shown.
[0014] Figure 2 A schematic diagram of a scenario provided in an embodiment of this application is shown.
[0015] Figure 3 A flowchart of a headphone control method according to another embodiment of this application is shown.
[0016] Figure 4 A flowchart of a headphone control method according to yet another embodiment of this application is shown.
[0017] Figure 5 A flowchart of a headphone control method according to another embodiment of this application is shown.
[0018] Figure 6 A flowchart of a headphone control method according to another embodiment of this application is shown.
[0019] Figure 7 A block diagram of an earphone control device according to an embodiment of this application is shown.
[0020] Figure 8This is a block diagram of a mobile terminal for executing the headphone control method according to an embodiment of this application.
[0021] Figure 9 This is a storage unit in this application embodiment for storing or carrying program code that implements the headphone control method according to this application embodiment. Detailed Implementation
[0022] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0023] Currently, most electronic devices, such as computers, mobile phones, and music players, can play audio data. With further technological advancements and increasing user demand, electronic devices can connect to external audio playback devices, enabling them to play audio data. These audio playback devices can include headphones, speakers, and in-vehicle systems. These devices can receive and play audio data transmitted from the electronic device. The electronic device can connect to the audio playback device via wired or wireless connections.
[0024] When users actually use audio playback devices to play audio data transmitted by electronic devices, they often use wireless communication headphones to play the audio data. For example, headphones using Wireless Fidelity (WiFi) or Bluetooth (BT) communication are used for audio playback. Especially for users with higher demands, true wireless stereo (TWS) headphones with wirelessly separate left and right channels are used for audio playback. These true wireless stereo headphones allow for true Bluetooth left and right channel wireless separation, meaning that neither earbud needs a wired connection. When playing audio data using true wireless stereo headphones, an electronic device can connect to the main earpiece of the wireless stereo headphones, and the secondary earpiece can also connect to the main earpiece. The main earpiece sends link information (including but not limited to Bluetooth address information) to the secondary earpiece, allowing the secondary earpiece to obtain audio data from the electronic device (e.g., the audio source device) via Bluetooth snooping. Both the primary and secondary earpieces directly obtain audio data from the electronic device. Alternatively, in some methods, the main earpiece can receive audio data from the electronic device and then send it to the secondary earpiece. This achieves stereo playback with separate left and right channels, improving listening to music, making calls, and comfort.
[0025] In traditional wireless stereo headphones, the master-slave switching between the master and slave headphones is usually based on changes in the headphones' own status, such as abnormal connection between the master headphone and electronic devices, the master headphone being placed in the charging case, or the master headphone having low battery.
[0026] After a long period of research, the inventors discovered that the traditional master-slave switching method between master and slave earphones does not take into account changes in the surrounding environment. This means that in some scenarios, the signal strength of the slave earphone and the master earphone is significantly more suitable as the master earphone for connecting to electronic devices and transmitting data between them.
[0027] For example, Bluetooth calls have high real-time requirements for the transmission link. The transmission link can only transmit the same audio data packet a maximum of three times. If the electronic device still hasn't received the corresponding audio data packet after three transmissions, it means the electronic device has lost the data packet, resulting in lost voice content during the call and a poor user experience. Similarly, in some special scenarios when using TWS earphones for calls (such as when the TWS earphones and the main device are in environments with strong interference, or when communication between the main device and the primary ear requires penetrating the body, in which case the signal strength between the secondary ear and the main device is significantly better than the signal strength between the primary ear and the electronic device), packet loss may frequently occur during the transmission of call data from the primary ear microphone. Although the signal from the secondary ear is relatively better in these situations, the secondary ear microphone cannot transmit data, leading to a poor user experience (such as stuttering or lag in the other party's voice).
[0028] To address the aforementioned issues, the inventors have proposed a headphone control method, device, Bluetooth headset, and storage medium as provided in the embodiments of this application. When the first Bluetooth headset is used as the master headset and the second Bluetooth headset is used as the slave headset, the connection between the second Bluetooth headset and the electronic device is switched to the master headset when the signal strength between the first Bluetooth headset and the electronic device (e.g., an audio source device) and the signal strength between the second Bluetooth headset and the electronic device meet preset strength conditions, thereby ensuring the quality of data transmission between the two devices. In this invention, when the second Bluetooth headset is a slave headset, the second signal strength is obtained based on the second Bluetooth headset monitoring the communication between the electronic device and the first Bluetooth headset. The headset control method disclosed in this invention can be applied in one scenario where both the master and slave headsets obtain audio data from an audio source device. In this case, the master headset is Bluetooth connected to the audio source device, thus allowing the determination of the first signal strength between the master headset and the audio source device. The slave headset obtains audio data by monitoring the link between the master headset and the audio source device, thereby determining the second signal strength between the slave headset and the audio source device. In another scenario, this method can be applied where the master headset obtains audio data from the audio source device and then forwards it to the slave headset. However, in this case, the slave headset can obtain the second signal strength by monitoring the link between the master headset and the audio source device. That is, in this case, the slave headset monitors to obtain the second signal strength, not necessarily to obtain audio data for playback. Specific headset control methods will be described in detail in subsequent embodiments.
[0029] Please see Figure 1 , Figure 1 A flowchart illustrating an embodiment of the headphone control method provided in this application is shown. The headphone control method is used to switch between the master and slave headphones based on the signal strength of the master and slave headphones, ensuring data transmission quality with the electronic device. In a specific embodiment, the headphone control method is applied to a first Bluetooth headphone. The specific flow of this embodiment will be described below using the first Bluetooth headphone as an example. The following will focus on... Figure 1 The process shown will be described in detail. The headphone control method may specifically include the following steps:
[0030] Step S110: Obtain the first signal strength of the first Bluetooth headset and the second signal strength of the second Bluetooth headset.
[0031] Currently, many users connect electronic devices to Bluetooth headphones to transmit audio data captured by the headphones and play back audio data. This is especially true for users with higher demands who use TWS (True Wireless Stereo) headphones for data transmission between themselves and their electronic devices. In actual use of TWS headphones, typically one master earbud establishes a Bluetooth link with the electronic device, while the slave earbud establishes a Bluetooth link with the master earbud. Furthermore, to obtain the signal strength between the slave earbud and the electronic device, it needs to obtain the link information between the electronic device and the master earbud. This allows it to monitor the communication between the electronic device and the master earbud, thus obtaining a second signal strength between the slave earbud and the electronic device.
[0032] In the embodiments of this application, please refer to Figure 2 When the first Bluetooth headset 702 is connected to the electronic device 701 as the master headset, the second Bluetooth headset 703 can be connected to the first Bluetooth headset 702 as the slave headset. The first Bluetooth headset can play left channel audio data, and the second Bluetooth headset can play right channel audio data; alternatively, the first Bluetooth headset can play right channel audio data, and the second Bluetooth headset can play left channel audio data.
[0033] Because the signal strength between the main earbud and the electronic device, and between the slave earbud and the electronic device, may change due to environmental factors during actual use of TWS earbuds, monitoring these signal strengths is crucial. This allows for master / slave switching when the signal strength between the slave earbud and the electronic device is more suitable for connection. Understandably, the main earbud and the electronic device have a established Bluetooth link, allowing for the determination of their Bluetooth signal strength. While the slave earbud doesn't have a Bluetooth link, it can establish a monitoring link to monitor audio data transmission between the main and slave earbuds, thus also determining their signal strength.
[0034] In some implementations, the first Bluetooth headset, acting as the primary headset, can begin monitoring and recording the Bluetooth signal strength between itself and the electronic device after establishing a Bluetooth link. For example, in a call scenario, the Bluetooth signal strength between the first Bluetooth headset and the electronic device can be monitored and recorded.
[0035] In this embodiment, the first Bluetooth headset can use the acquired Bluetooth signal strength between the first Bluetooth headset and the electronic device as the first signal strength. The acquired first signal strength can be the Bluetooth signal strength between the first Bluetooth headset and the electronic device at a certain moment, the Bluetooth signal strength between the first Bluetooth headset and the electronic device at multiple moments, or the average Bluetooth signal strength between the first Bluetooth headset and the electronic device over a period of time; no limitation is made here.
[0036] In this embodiment, the first Bluetooth earphone, acting as the master earphone, obtains the second signal strength of the second Bluetooth earphone (the slave earphone) through its Bluetooth connection link with the second Bluetooth earphone (the slave earphone). Specifically, it obtains the Bluetooth signal strength between the second Bluetooth earphone and the electronic device. Further, the master earphone can compare the first and second signal strengths and determine whether the master-slave switching condition is met based on the comparison result. If met, it sends a switching command to the slave earphone through the Bluetooth link between the master and slave earphones, causing the slave earphone to switch master-slave, and the master earphone itself also switches. Similarly, obtaining the second signal strength of the second Bluetooth earphone can also be obtaining the Bluetooth signal strength between the second Bluetooth earphone and the electronic device at a certain moment, the Bluetooth signal strength between the second Bluetooth earphone and the electronic device at multiple moments, or the average Bluetooth signal strength between the second Bluetooth earphone and the electronic device over a period of time.
[0037] Step S120: Determine that the first signal strength and the second signal strength satisfy a preset strength condition.
[0038] In this embodiment, 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, acting as the main headset, can determine whether the first and second signal strengths meet a preset strength condition. If the first and second signal strengths meet the preset strength condition, it indicates that the main headset needs to be switched to the second Bluetooth headset; if the first and second signal strengths do not meet the preset strength condition, it indicates that the main headset does not need to be switched to the second Bluetooth headset. In this case, the first Bluetooth headset can remain connected to the electronic device as the main headset without switching the main headset.
[0039] In some implementations, the preset strength condition can be a signal strength characteristic that makes the second Bluetooth headset more suitable as the main headset. For example, the preset strength condition can be that the second signal strength of the second Bluetooth headset is greater than the first signal strength of the first Bluetooth headset; another example is that the preset strength condition can 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; yet another example is that the preset strength condition can be that the first signal strength of the first Bluetooth headset is less than a certain value, and so on.
[0040] It should be noted that the determination of whether the preset strength condition is met can be made by the main earphone acquiring the signal strength of both earphones, or by the earphone acquiring the signal strength of both earphones.
[0041] Step S130: If the signal strength of the first Bluetooth headset and the signal strength of the second Bluetooth headset meet a preset strength condition, a switching instruction message is sent to the second Bluetooth headset. The switching instruction message is used to instruct the second Bluetooth headset to establish a connection with the electronic device as the master headset.
[0042] In this embodiment, when the first signal strength of the first Bluetooth headset and the second signal strength of the second Bluetooth headset meet a preset strength condition, a switch is made between the master and slave headsets, so that the first Bluetooth headset switches to the slave headset and the second Bluetooth headset switches to the master headset. Specifically, the first Bluetooth headset sends a switching instruction message to itself, which instructs the second Bluetooth headset to establish a Bluetooth connection with the electronic device as the master headset. In some embodiments, after sending the switching instruction message to the second Bluetooth headset, the first Bluetooth headset may wait until it receives an instruction message from the second Bluetooth headset indicating that it is ready to establish a Bluetooth connection with the electronic device before switching to the slave headset, disconnecting the Bluetooth link with the electronic device, and simultaneously sending a connection instruction message to the second Bluetooth headset. Upon receiving the connection instruction message, the second Bluetooth headset immediately establishes a connection with the electronic device. Because the first Bluetooth headset does not immediately switch to the slave headset after sending the switching instruction message, but only after the second Bluetooth headset is ready, the problem of data transmission interruption caused by the first Bluetooth headset disconnecting the Bluetooth link with the electronic device before the second Bluetooth headset has established a Bluetooth link with the electronic device can be avoided.
[0043] It should be noted that the first Bluetooth earphone can refer to the Bluetooth earphone currently serving as the master earphone in TWS earphones. All Bluetooth earphones serving as the master earphones can automatically switch between master and slave earphones during use according to the earphone control method provided in the embodiments of this application.
[0044] The headphone control method provided in this application embodiment involves a first Bluetooth headset connected to an electronic device as a master headset, and a second Bluetooth headset connected to the first Bluetooth headset as a slave headset. The first Bluetooth headset acquires its first signal strength and the second signal strength of the second Bluetooth headset. If, based on the first and second signal strengths, it is determined that both meet a preset strength condition, a switching instruction is sent to the second Bluetooth headset. This switching instruction is used to instruct the second Bluetooth headset to connect to the electronic device as a master headset. This achieves the switching between master and slave headsets when the signal strength of the slave headset indicates that the slave headset is more suitable as the master headset. This allows the first Bluetooth headset to switch to slave headset and the second Bluetooth headset to switch to master headset, reducing the packet loss rate of data transmission with the electronic device and ensuring the quality of data transmission with the electronic device.
[0045] Please see Figure 3 , Figure 3 A flowchart illustrating another embodiment of the headphone control method provided in this application is shown. This headphone control method is applied to the aforementioned first Bluetooth headphone, and will be discussed below. Figure 3 The process shown will be described in detail. The headphone control method may specifically include the following steps:
[0046] Step S210: Obtain the first signal strength of the first Bluetooth headset and the second signal strength of the second Bluetooth headset.
[0047] In this embodiment, step S210 can be referred to the content of the foregoing embodiments, and will not be repeated here.
[0048] Step S220: Determine that the strength of the second signal is not less than the first threshold.
[0049] In this embodiment, after acquiring the first signal strength between the first Bluetooth earphone and the electronic device, and the second signal strength between the second Bluetooth earphone and the electronic device, the first Bluetooth earphone, acting as the main earphone, can compare the signal strength of the second Bluetooth earphone with a first threshold. The first threshold can be the signal strength condition that allows the Bluetooth earphone in the TWS earphone to function as the main earphone for data transmission with the electronic device. If the signal strength of the Bluetooth earphone is less than or equal to the first threshold, it indicates that the Bluetooth earphone cannot function as the main earphone for data transmission with the electronic device; if the signal strength of the Bluetooth earphone is greater than the first threshold, it indicates that the Bluetooth earphone can function as the main earphone for data transmission with the electronic device.
[0050] Step S230: Determine that the first signal strength and the second signal strength satisfy a preset strength condition.
[0051] In this embodiment, when the signal strength of the second Bluetooth headset is greater than the first threshold, it indicates that the Bluetooth headset can be used as the main headset for data transmission with the electronic device. Therefore, it can be further determined whether the first signal strength of the first Bluetooth headset and the second signal strength of the second Bluetooth headset meet a preset strength condition. If the preset strength condition is met, a switching instruction can be sent to the second Bluetooth headset to switch the main headset to the second Bluetooth headset, which is more suitable for data transmission with the electronic device.
[0052] In some implementations, when the signal strength of the second Bluetooth headset is less than or equal to the first threshold, steps S230 and S240 may not be executed. In other words, when the second Bluetooth headset cannot be used as the main headset, the subsequent judgment on whether the first signal strength and the second signal strength meet the preset strength conditions, and the switching operation of the main headset when the preset strength conditions are met, may not be performed. This effectively reduces the workload of the primary earphone, thereby lowering the power consumption of the TWS earphones. Understandably, when the second signal strength is less than or equal to the first threshold, the first signal strength may be greater than the first threshold. In this case, the first Bluetooth earphone satisfies the requirement of being the primary earphone for data transmission with the electronic device, while the second Bluetooth earphone does not. In this situation, the first Bluetooth earphone is more suitable as the primary earphone, so switching to primary earphone is unnecessary. Conversely, if both the first and second signal strengths are less than or equal to the first threshold, neither the first nor the second Bluetooth earphone satisfies the requirement of being the primary earphone for data transmission with the electronic device. Therefore, switching to primary earphone is also unnecessary. This avoids invalid switching caused by the first and second Bluetooth earphones' signal strengths meeting preset strength conditions when both are less than or equal to the first threshold, thus effectively reducing the power consumption of the TWS earphones.
[0053] In some implementations, when both the first signal strength and the second signal strength are less than or equal to the first threshold, neither the first Bluetooth headset nor the second Bluetooth headset can transmit data with the electronic device. In this case, the first Bluetooth headset can issue a prompt message (e.g., output a prompt voice) to prompt the user to change the position of the Bluetooth headset so that the signal strength of the first Bluetooth headset can be improved and the data transmission with the electronic device can be satisfied.
[0054] Step S240: Send a switching instruction message to the second Bluetooth headset, the switching instruction message being used to instruct the second Bluetooth headset to establish a connection with the electronic device as the master headset.
[0055] The headphone control method provided in this application embodiment, when a first Bluetooth headset is connected to an electronic device as a master headset, and a second Bluetooth headset is connected to the first Bluetooth headset as a slave headset, allows the first Bluetooth headset to acquire its first signal strength and the second Bluetooth headset's second signal strength. The first Bluetooth headset then compares the second Bluetooth headset's signal strength with a first threshold. Only when the second Bluetooth headset's signal strength is greater than the first threshold is a switch indication sent to the second Bluetooth headset, indicating that the first and second signal strengths meet a preset strength condition. This switch indication instructs the second Bluetooth headset to connect to the electronic device as the master headset. This not only allows switching between master and slave headsets based on signal strength (determining the slave headset is more suitable as the master headset, thus switching the first Bluetooth headset to slave and the second Bluetooth headset to master, reducing packet loss and ensuring data transmission quality with the electronic device), but also avoids power consumption caused by the first Bluetooth headset performing subsequent processing steps when the second Bluetooth headset's signal strength is less than or equal to the first threshold, which would prevent it from meeting the data transmission requirements as the master headset.
[0056] Please see Figure 4 , Figure 4 A flowchart illustrating another embodiment of the headphone control method provided in this application is shown. This headphone control method is applied to the aforementioned first Bluetooth headphone, and will be discussed below. Figure 4 The process shown will be described in detail. The headphone control method may specifically include the following steps:
[0057] Step S310: Determine that the first Bluetooth headset, as the main headset, is in the state of transmitting audio data with the electronic device.
[0058] In this embodiment of the application, when the first Bluetooth earphone, which is the main earphone, determines that the first Bluetooth earphone is in the state of transmitting audio data with the electronic device, such as when TWS earphones are used for audio calls or music playback, the first Bluetooth earphone can acquire the first signal strength of the first Bluetooth earphone and the signal strength of the second Bluetooth earphone.
[0059] In some implementations, the first Bluetooth headset can determine whether it is transmitting audio data with the electronic device based on the data type transmitted between the first Bluetooth headset and the electronic device. If the data type transmitted between the first Bluetooth headset and the electronic device is an audio data type, it can be determined that the first Bluetooth headset and the electronic device are transmitting audio data; if the data type transmitted between the first Bluetooth headset and the electronic device is not an audio data type, it can be determined that the first Bluetooth headset and the electronic device are not transmitting audio data.
[0060] It should be noted that step S310 in this embodiment can also be applied to other embodiments.
[0061] Step S320: Periodically acquire the average signal strength between the first Bluetooth headset, the second Bluetooth headset and the electronic device, respectively, as the first signal strength and the second signal strength.
[0062] In this embodiment, the first Bluetooth headset acquires the signal strengths of both the first and second Bluetooth headsets by periodically acquiring the average signal strength between the first and second Bluetooth headsets and the electronic device. The specific value of the period is not limited; for example, the period could be 1 minute, 2 minutes, etc.
[0063] In some implementations, the first Bluetooth headset can monitor the Bluetooth signal strength between itself and the electronic device, thereby obtaining the relationship between the Bluetooth signal strength and time, or the Bluetooth signal strength at multiple moments. The first Bluetooth headset can periodically acquire an average signal strength based on the obtained relationship between the Bluetooth signal strength and time, or the Bluetooth signal strength at multiple moments.
[0064] In some implementations, the second Bluetooth headset can also monitor the Bluetooth signal strength between itself and the electronic device, thereby obtaining the relationship between the Bluetooth signal strength and time, or the Bluetooth signal strength at multiple moments. Based on the obtained relationship between the Bluetooth signal strength and time, or the Bluetooth signal strength at multiple moments, the second Bluetooth headset can periodically acquire an average signal strength. After acquiring the average signal strength, the second Bluetooth headset can send the statistically averaged signal strength to the first Bluetooth headset, so that the first Bluetooth headset can obtain the average signal strength between the second Bluetooth headset and the electronic device.
[0065] Of course, the second Bluetooth headset can 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 can periodically calculate the average signal strength between the second Bluetooth headset and the electronic device.
[0066] In some implementations, the first Bluetooth headset periodically acquires the average signal strength between itself and the electronic device, and the second Bluetooth headset acquires the average signal strength between itself and the electronic device. This can be achieved by acquiring the average signal strength over at least one period adjacent to the current time. The resulting first and second signal strengths better reflect the signal strength between the first and second Bluetooth headsets and the electronic device, providing an accurate basis for master-slave switching between the master and slave headsets.
[0067] Step S330: Obtain the difference between the second signal strength and the first signal strength.
[0068] In this embodiment of the application, when the first Bluetooth headset determines whether the first signal strength and the second signal strength meet the preset strength condition based on the obtained first signal strength and second signal strength, it can calculate the difference between the second signal strength and the first signal strength, and determine whether the preset strength condition is met based on the calculated difference.
[0069] Step S340: Determine that the difference is not less than the second threshold.
[0070] In this embodiment, after the first Bluetooth headset calculates the difference between the second signal strength and the first signal strength, it can compare the calculated difference with a second threshold. If the difference is less than the second threshold, meaning the difference between the first and second signal strengths is not significant, it indicates that the first and second signal strengths do not meet a preset strength condition, and therefore, switching to the primary headset is unnecessary. If the difference is not less than (i.e., less than or equal to) the second threshold, meaning the second signal strength is greater than the first signal strength by a certain value, it indicates that the first and second signal strengths meet the preset strength condition, and switching to the primary headset is required. The specific value of the second threshold is not limited and can be set according to actual needs.
[0071] It should be noted that the method by which the first signal strength and the second signal strength determined in steps S330 and S340 of this application satisfy the preset strength condition can also be applied to the foregoing embodiments.
[0072] Step S350: Send a switching instruction message to the second Bluetooth headset, the switching instruction message being used to instruct the second Bluetooth headset to establish a connection with the electronic device as the master headset.
[0073] In this embodiment, step S350 can be referred to the content of the foregoing embodiments, and will not be repeated here.
[0074] The headphone control method provided in this application embodiment, when the first Bluetooth headset, currently acting as the master headset, determines that it is in an audio data transmission state with the electronic device, acquires the average signal strength between the first Bluetooth headset and the second Bluetooth headset and the electronic device, and then calculates the difference between the average signal strength of the second Bluetooth headset and the average signal strength of the first Bluetooth headset. If the difference is not less than a second threshold, a switching instruction information is sent to the second Bluetooth headset. This switching instruction information is used to instruct the second Bluetooth headset to connect to the electronic device as the master headset, thereby realizing the switching between the master headset and the slave headset when the signal strength of the slave headset indicates that the slave headset is more suitable as the master headset, so that the first Bluetooth headset switches to the slave headset and the second Bluetooth headset switches to the master headset, reducing the packet loss rate of data transmission with the electronic device and ensuring the data transmission quality with the electronic device.
[0075] Please see Figure 5 , Figure 5 A flowchart illustrating another embodiment of the headphone control method provided in this application is shown. This headphone control method is applied to the aforementioned first Bluetooth headphone, and will be discussed below. Figure 5 The process shown will be described in detail. The headphone control method may specifically include the following steps:
[0076] Step S410: Obtain the first signal strength of the first Bluetooth headset and the second signal strength of the second Bluetooth headset.
[0077] In this embodiment, step S410 can be referred to the content of the foregoing embodiments, and will not be repeated here.
[0078] Step S420: Obtain the first rate of change and the second rate of change corresponding to the first signal strength and the second signal strength, respectively.
[0079] In this embodiment of the application, when the first Bluetooth headset, which is the main headset, determines whether the first signal strength and the second signal strength meet the preset strength condition based on the first signal strength and the second signal strength, it can obtain the first rate of change corresponding to the first signal strength and the second rate of change corresponding to the second signal strength, respectively, based on the first signal strength and the second signal strength.
[0080] In some implementations, the first signal strength acquired by the first Bluetooth headset can be the signal strength between the first Bluetooth headset and the electronic device at multiple moments within a preset time period prior to the current moment, and the second signal strength can be the signal strength between the second Bluetooth headset and the electronic device at multiple moments within the preset time period prior to the current moment. The first Bluetooth headset can calculate the average rate of change of signal strength within the preset time period based on the signal strength at the multiple moments corresponding to the first Bluetooth headset, and use the calculated average rate of change of signal strength corresponding to the first Bluetooth headset as the first rate of change. Similarly, the first Bluetooth headset can calculate the average rate of change of signal strength within the preset time period based on the signal strength at the multiple moments corresponding to the second Bluetooth headset, and use the calculated average rate of change of signal strength corresponding to the second Bluetooth headset as the second rate of change.
[0081] In other embodiments, the first signal strength acquired by the first Bluetooth headset can also be a first curve showing the change of the signal strength of the first Bluetooth headset over time, and the second signal strength can also be a second curve showing the change of the signal strength of the first Bluetooth headset over time. Based on the first curve showing the change of the signal strength of the first Bluetooth headset over time, the rate of change of the signal strength at the current time (i.e., the slope of the first curve at the current moment) can be obtained, and this rate of change can be used as the first rate of change. Similarly, based on the second curve showing the change of the signal strength of the second Bluetooth headset over time, the rate of change of the signal strength at the current time (i.e., the slope of the second curve at the current moment) can also be obtained, and this rate of change can be used as the second rate of change.
[0082] Step S430: Determine that the second rate of change is greater than the first rate of change.
[0083] In this embodiment, after obtaining a first rate of change of the first signal strength and a second rate of change of the second signal strength, the first Bluetooth headset can compare the second rate of change with the first rate of change. If the second rate of change is greater than the first rate of change, it can be determined that the first signal strength and the second signal strength meet a preset strength condition, meaning the second Bluetooth headset is more suitable as the main headset 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 can be determined that the first signal strength and the second signal strength do not meet the preset strength condition, meaning there is no need to switch to the main headset.
[0084] Understandably, when the second rate of change is greater than the first rate of change, both the first and second rates of change may be positive. This indicates that the signal strength between the second Bluetooth headset and the electronic device increases faster than that between the first Bluetooth headset and the electronic device. In other words, the signal strength of the second Bluetooth headset may subsequently be greater than that of the first Bluetooth headset. Therefore, it can be determined that the first and second signal strengths meet the preset strength condition, meaning the second Bluetooth headset is more suitable as the primary headset for data transmission with the electronic device. Conversely, if the second rate of change is greater than the first rate of change, both the first and second rates of change may be negative. This indicates that the signal strength between the second Bluetooth headset and the electronic device decreases slower than that between the first Bluetooth headset and the electronic device. In other words, the signal strength of the second Bluetooth headset may subsequently be greater than that of the first Bluetooth headset. Therefore, it can also be determined that the first and second signal strengths meet the preset strength condition, meaning the second Bluetooth headset is more suitable as the primary headset for data transmission with the electronic device. If the second rate of change is greater than the first rate of change, or if the first rate of change is negative while the second rate of change is always positive, it means the signal strength of the first Bluetooth headset is decreasing while the signal strength of the second Bluetooth headset is increasing. In this case, the signal strength of the second Bluetooth headset will subsequently be greater than that of the first Bluetooth headset. Therefore, it can be determined that the first and second signal strengths meet the preset strength condition, meaning the second Bluetooth headset is more suitable as the primary headset for data transmission with the electronic device. Conversely, if the second rate of change is greater than the first rate of change, the signal strength of the first Bluetooth headset will subsequently be greater than that of the second Bluetooth headset, thus eliminating the need to switch to the primary headset. The rate of change of signal strength can be understood as representing the trend of signal strength change over a preset time period, i.e., the average slope of the signal strength curve over that preset time period.
[0085] Step S440: Send a switching instruction message to the second Bluetooth headset, the switching instruction message being used to instruct the second Bluetooth headset to establish a connection with the electronic device as the master headset.
[0086] In this embodiment, step S440 can be referred to the content of the foregoing embodiments, and will not be repeated here.
[0087] In this embodiment, before sending a switching instruction to the second Bluetooth headset, the first Bluetooth headset can also obtain the headset status of the second Bluetooth headset, which includes a wearing state and a non-wearing state. The wearing state refers to the state where the Bluetooth headset is placed in the user's ear, and the non-wearing state refers to the state where the Bluetooth headset is not placed in the user's ear, i.e., the state where the Bluetooth headset is removed from the user's ear.
[0088] In some implementations, the second Bluetooth headset can detect its own headset status. Specifically, this can involve acquiring data detected by the second Bluetooth headset to determine its headset status, such as pressure data, detected temperature, ambient light intensity, and capacitance measurements. Based on this data, the second Bluetooth headset can determine whether it is being worn or not. After determining its headset status, the second Bluetooth headset can send the headset status information to the first Bluetooth headset, allowing the first Bluetooth headset to obtain the headset status of the second Bluetooth headset.
[0089] Furthermore, after obtaining the status of the second Bluetooth headset, it can be determined whether the headset is being worn. If it is being worn, it means the second Bluetooth headset is being used by the user, and therefore the primary headset can be switched to the second Bluetooth headset. If it is not being worn, it means the second Bluetooth headset is not currently being used by the user, and there is no need to switch the primary headset to the second Bluetooth headset.
[0090] The headphone control method provided in this application embodiment involves a first Bluetooth headset acting as the master headset. The first Bluetooth headset acquires a first signal strength and a second signal strength of a second Bluetooth headset. Then, it acquires a first rate of change of the first signal strength and a second rate of change of the second signal strength. When the second rate of change is greater than the first rate of change, it determines that the second signal strength and the first signal strength meet a preset strength condition. At this time, it sends a switching instruction to the second Bluetooth headset. This switching instruction instructs the second Bluetooth headset to connect to the electronic device as the master headset. This allows for a switch between the master and slave headsets when the signal strength indicates that the slave headset is more suitable as the master headset. The first Bluetooth headset switches to the slave headset, and the second Bluetooth headset switches to the master headset, reducing the packet loss rate of data transmission with the electronic device and ensuring the quality of data transmission.
[0091] Please see Figure 6 , Figure 6 A flowchart illustrating another embodiment of the headphone control method provided in this application is shown. This headphone control method is applied to the aforementioned first Bluetooth headphone. When the first Bluetooth headphone is connected to an electronic device as a master headphone, a second Bluetooth headphone is connected to the first Bluetooth headphone as a slave headphone, and the number of second Bluetooth headphones is more than one. The following will focus on... Figure 6 The process shown will be described in detail. The headphone control method may specifically include the following steps:
[0092] Step S510: Obtain the first signal strength of the first Bluetooth headset and the second signal strength of the second Bluetooth headset.
[0093] In this embodiment, there may be multiple second Bluetooth headsets serving as slave headsets. For example, in a remote conferencing scenario, one master headset is connected to an electronic device, while other slave headsets are connected to the master headset to transmit audio data during the remote meeting. In this case, the first Bluetooth headset can acquire the second signal strength of each second Bluetooth headset.
[0094] Step S520: Obtain the differences between the second signal strength and the first signal strength corresponding to the second Bluetooth headset.
[0095] In this embodiment of the application, the first Bluetooth headset can obtain the difference between the second signal strength and the first signal strength of each second Bluetooth headset, and obtain multiple differences.
[0096] Step S530: Determine that among the plurality of differences there are several differences that are not less than a third threshold.
[0097] In this embodiment of the application, after obtaining the differences between multiple second signal strengths and first signal strengths, it can be determined whether there is a difference among the multiple differences that is not less than a third threshold. If there is a difference that is not less than the third threshold, it means that the second Bluetooth headset corresponding to the difference that is not less than the third threshold is more suitable as the main headset to connect with the electronic device than the first Bluetooth headset. Therefore, it can be determined that the preset strength condition is met.
[0098] Step S540: Obtain the second Bluetooth headset corresponding to the difference of the plurality of values not less than the third threshold, and use it as the target Bluetooth headset.
[0099] In this embodiment, the first Bluetooth headset can determine the second Bluetooth headset corresponding to each difference not less than a third threshold, and use the determined second Bluetooth headset as the target Bluetooth headset. It is understood that if there are multiple differences not less than the third threshold, multiple target Bluetooth headsets can be determined; if there is only one difference not less than the third threshold, only one target Bluetooth headset can be determined.
[0100] Step S550: Send the switching instruction information to the target Bluetooth headset with the strongest signal strength, highest battery level, or largest amount of collected audio data. The switching instruction information is used to instruct the target Bluetooth headset to establish a connection with the electronic device as the master headset.
[0101] In this embodiment, when switching the primary earphone, if there are multiple target Bluetooth earphones identified above, a single target Bluetooth earphone can be determined based on its signal strength, battery level, or the amount of audio data collected. A switching instruction is then sent to this identified target Bluetooth earphone to switch it to the primary earphone and connect it to the electronic device. If there is only one target Bluetooth earphone identified, the switching instruction can be sent directly to that target Bluetooth earphone.
[0102] In some implementations, when there are multiple target Bluetooth headsets, the target Bluetooth headset with the strongest signal strength can be determined from among the multiple target Bluetooth headsets based on the signal strength between each target Bluetooth headset and the electronic device, and a switching instruction message can be sent to the target Bluetooth headset with the strongest signal strength to switch the target Bluetooth headset with the strongest signal strength to the main headset, thereby ensuring the quality of data transmission.
[0103] In other implementations, when there are multiple target Bluetooth earphones, the target Bluetooth earphone with the largest remaining battery level can be determined from among the multiple target Bluetooth earphones based on the remaining battery level of each target Bluetooth earphone, and a switching instruction message can be sent to the target Bluetooth earphone with the largest remaining battery level to switch the target Bluetooth earphone with the largest remaining battery level to the main earphone, thereby ensuring the persistence of data transmission and thus ensuring the quality of data transmission.
[0104] In some implementations, audio data may also be collected from the earpiece and transmitted to the electronic device via the main earpiece. For example, in a remote conference, both the main and secondary earpiece users can speak and collect audio data through their earpieces. In this case, the amount of audio data collected by each target Bluetooth earpiece can be obtained separately (e.g., the amount of data collected within a set time period). Then, the target Bluetooth earpiece with the largest data volume can be selected, and a switching instruction message can be sent to that earpiece to switch it to the main earpiece. This reduces the amount of audio data collected by the larger earpiece that needs to be relayed through the main earpiece before being transmitted to the electronic device, effectively saving data transmission volume from the Bluetooth earpiece.
[0105] The headphone control method provided in this application embodiment involves a first Bluetooth headphone connected to an electronic device as a master headphone, and a second Bluetooth headphone connected to the first Bluetooth headphone as a slave headphone, wherein there are multiple second Bluetooth headphones. The first Bluetooth headphone acquires its first signal strength and acquires the second signal strength of each second Bluetooth headphone. Then, it calculates the difference between each second signal strength and the first signal strength, obtaining multiple differences. When it is determined that several differences are not less than a third threshold, a target Bluetooth headphone is selected from the target Bluetooth headphones corresponding to these differences, and a switching instruction is sent to the selected target Bluetooth headphone. This enables master-slave switching between master and slave headphones based on the signal strength of each headphone in application scenarios with multiple slave headphones, reducing packet loss rate and ensuring data transmission quality between the headphone and the electronic device.
[0106] The following describes the headphone control method provided in the embodiments of this application using a call scenario.
[0107] In a real-world call scenario, before a call begins, the electronic device establishes a connection with the first Bluetooth headset (the master headset). The first Bluetooth headset can synchronize the connection parameters between the electronic device and the master headset to the second Bluetooth headset (the slave headset). This allows the second Bluetooth headset to establish a monitoring link based on the connection parameters, or subsequently connect to the electronic device as the master headset based on these parameters. During the call, the electronic device successfully establishes the connection and notifies the first Bluetooth headset to begin the call. Upon receiving the notification, the first Bluetooth headset can begin periodically monitoring signal strength and also notify the second Bluetooth headset to begin periodically monitoring signal strength. After a cycle is reached, the second Bluetooth headset synchronously transmits the signal strength statistics to the first Bluetooth headset. The first Bluetooth headset, based on its own signal strength statistics and the signal strength transmitted by the second Bluetooth headset, determines whether the two meet a preset strength condition (e.g., whether the signal strength of the first Bluetooth headset is less than a certain value compared to the signal strength of the second Bluetooth headset). If the preset strength condition is met, the first Bluetooth headset can synchronously transmit master-slave switching information to the second Bluetooth headset, i.e., send a switching instruction message to the second Bluetooth headset. Then, the first and second Bluetooth headsets simultaneously perform master-slave switching between the master and slave headsets. This allows the master headset to be switched to the slave headset with better signal strength during a call, reducing the data packet loss rate and thus improving the user experience during calls.
[0108] Please see Figure 7This document illustrates a structural block diagram of an earphone control device 400 provided in an embodiment of this application. The earphone control device 400 utilizes the aforementioned first Bluetooth earphone. When the first Bluetooth earphone is connected to an electronic device as a master earphone, a second Bluetooth earphone is connected to the first Bluetooth earphone as a slave earphone. The earphone control device 400 includes: a signal acquisition module 410, a condition determination module 420, and an earphone switching module 430. The signal acquisition module 410 acquires a first signal strength of the first Bluetooth earphone and a second signal strength of the second Bluetooth earphone, wherein the first signal strength is the signal strength between the first Bluetooth earphone and the electronic device, and the second signal strength is the signal strength between the second Bluetooth earphone and the electronic device. The condition determination module 420 determines that the first signal strength and the second signal strength satisfy a preset strength condition. The earphone switching module 430 sends switching instruction information to the second Bluetooth earphone, the switching instruction information indicating that the second Bluetooth earphone establishes a connection with the electronic device as a master earphone.
[0109] In this embodiment, the headphone control device 400 may further include an intensity determination module. The intensity determination module is used to determine that the second signal strength is not less than a first threshold before determining that the first signal strength and the second signal strength meet a preset intensity condition.
[0110] In this embodiment of the application, the signal acquisition module can be specifically used to: periodically acquire the average signal strength between the first Bluetooth headset, the second Bluetooth headset and the electronic device, respectively, as the first signal strength and the second signal strength.
[0111] In some implementations, the condition determination module 420 may include a first difference acquisition unit and a first difference determination unit. The first difference acquisition unit is used to acquire the difference between the second signal strength and the first signal strength; the first difference determination unit is used to determine that the difference is not less than a second threshold.
[0112] In some embodiments, the headset control device may further include a rate of change acquisition module. The rate of change acquisition module is used to acquire, after acquiring the first signal strength of the first Bluetooth headset and the second signal strength of the second Bluetooth headset, a first rate of change and a second rate of change corresponding to the first signal strength and the second signal strength, respectively. The condition determination module 420 may specifically be used to determine that the second rate of change is greater than the first rate of change.
[0113] In some embodiments, the number of second Bluetooth earphones 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 acquisition unit is used to acquire the differences between a plurality of second signal strengths corresponding to the second Bluetooth earphones and the first signal strength; the second difference determination unit is used to determine that among the plurality of differences, there are several differences not less than a third threshold.
[0114] Furthermore, the headphone switching module 430 may include a headphone acquisition unit and an indication sending unit. The headphone acquisition unit is used to acquire second Bluetooth headphones corresponding to the differences of the plurality of values not less than a third threshold as target Bluetooth headphones; the indication sending unit is used to send the switching indication information to the target Bluetooth headphone with the strongest signal strength, the highest battery level, or the largest amount of audio data collected.
[0115] In some embodiments, the headset control device 400 may further include a status acquisition module and a first status determination module. The status acquisition module is used to acquire the headset status of the second Bluetooth headset before sending the switching instruction information to the second Bluetooth headset, the headset status including a wearing state and a non-wearing state; the first status determination module is used to determine that the second Bluetooth headset is in the wearing state.
[0116] In some embodiments, the headset control device 400 may further include a second state determination module. The second state determination module is used to determine, before acquiring the first signal strength of the first Bluetooth headset and the second signal strength of the second Bluetooth headset, that the first Bluetooth headset, as the master headset, is in an audio data transmission state with the electronic device.
[0117] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0118] In the several embodiments provided in this application, the coupling between modules can be electrical, mechanical, or other forms of coupling.
[0119] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0120] One embodiment of this application provides a Bluetooth headset, which includes a first Bluetooth headset and a second Bluetooth headset. The first Bluetooth headset is connected to an electronic device as a master headset, and the second Bluetooth headset is connected to the first Bluetooth headset as a slave headset. The first Bluetooth headset is used to acquire a first signal strength of the first Bluetooth headset and a second signal strength of the second Bluetooth headset; the first Bluetooth headset is also used to determine that the first signal strength and the second signal strength meet a preset strength condition, and send switching indication information to the second Bluetooth headset, the switching indication information being used to instruct the second Bluetooth headset to establish a connection with the electronic device as the master headset; the second Bluetooth headset is used to respond to the switching indication information and connect to the electronic device as the master headset.
[0121] In summary, the solution provided in this application allows for the following connection: when the first Bluetooth headset is connected to the electronic device as the primary headset, the second Bluetooth headset is connected to the first Bluetooth headset as the secondary headset. The first Bluetooth headset acquires its first signal strength and the second signal strength. If the first and second signal strengths meet a preset strength condition, the first Bluetooth headset sends a switching instruction to the second Bluetooth headset. This switching instruction instructs the second Bluetooth headset to establish a connection with the electronic device as the primary headset. This enables the second Bluetooth headset to be switched to the primary headset when the signal strengths of the first and second Bluetooth headsets meet the preset strength condition, reducing packet loss and ensuring data transmission quality between the two devices.
[0122] Please refer to Figure 8 This diagram illustrates a structural block diagram of a Bluetooth headset according to an embodiment of this application. The Bluetooth headset 100 can be any of the TWS headsets. The Bluetooth headset 100 in this application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more applications are configured to perform the methods described in the foregoing method embodiments.
[0123] Processor 110 may include one or more processing cores. Processor 110 connects to various parts within the Bluetooth headset 100 via various interfaces and lines, and performs various functions and processes data of the Bluetooth headset 100 by running or executing instructions, programs, code sets, or instruction sets stored in memory 120, and by calling data stored in memory 120. Optionally, processor 110 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 110 may integrate one or more of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 110 and may be implemented separately through a communication chip.
[0124] The memory 120 may include random access memory (RAM) or read-only memory (ROM). The memory 120 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created during use by the Bluetooth headset 100 (such as phonebook data, audio and video data, chat log data, etc.).
[0125] Please refer to Figure 9 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 800 stores program code that can be called by a processor to execute the methods described in the above method embodiments.
[0126] The computer-readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 800 includes a 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. This program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A headphone control method, characterized in that, Applied to a first Bluetooth headset, 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 includes: The first signal strength of the first Bluetooth headset and the second signal strength of the second Bluetooth headset are obtained, wherein the first signal strength is the signal strength between the first Bluetooth headset and the electronic device, the second signal strength is the signal strength between the second Bluetooth headset and the electronic device, and the second signal strength is determined based on the monitoring link between the second Bluetooth headset and the electronic device, the monitoring link being used to monitor the transmission of audio data between the first Bluetooth headset and the electronic device; The first signal strength and the second signal strength are determined to satisfy a preset strength condition. The preset strength condition includes that the second signal strength is greater than the first signal strength and the difference between the second signal strength and the first signal strength is greater than a second threshold, or that the preset strength condition includes that the second rate of change corresponding to the second signal strength is greater than the first rate of change corresponding to the first signal strength. A switching instruction message is sent to the second Bluetooth headset, the switching instruction message being used to instruct the second Bluetooth headset to establish a connection with the electronic device as the master headset.
2. The method according to claim 1, characterized in that, The second signal strength is obtained based on the second Bluetooth headset monitoring the communication between the electronic device and the first Bluetooth headset; Before determining that the first signal strength and the second signal strength satisfy a preset strength condition, the method further includes: The strength of the second signal is determined to be no less than the first threshold.
3. The method according to claim 1, characterized in that, The step of obtaining the first signal strength of the first Bluetooth headset and the second signal strength of the second Bluetooth headset includes: The average signal strength between the first Bluetooth headset, the second Bluetooth headset, and the electronic device is periodically acquired and used as the first signal strength and the second signal strength.
4. The method according to claim 1, characterized in that, The number of second Bluetooth headsets is more than one, and determining that the first signal strength and the second signal strength satisfy a preset strength condition includes: The differences between the second signal strength and the first signal strength corresponding to the second Bluetooth headset are obtained respectively. It is determined that among the multiple differences, there are several differences that are not less than a third threshold.
5. The method according to claim 4, characterized in that, Sending the switching instruction information to the second Bluetooth headset includes: The second Bluetooth headset corresponding to the difference of the plurality of values not less than the third threshold is selected as the target Bluetooth headset; The switching instruction information is sent to the target Bluetooth headset with the strongest signal strength, the highest battery level, or the largest amount of audio data collected.
6. The method according to any one of claims 1-5, characterized in that, Before sending the switching instruction information to the second Bluetooth headset, the method further includes: Obtain the earphone status of the second Bluetooth earphone, including the wearing status and the non-wearing status; It is confirmed that the second Bluetooth headset is being worn.
7. The method according to any one of claims 1-5, characterized in that, Before acquiring the first signal strength of the first Bluetooth headset and the second signal strength of the second Bluetooth headset, the method further includes: It is determined that the first Bluetooth headset, acting as the main headset, is in a state of audio data transmission with the electronic device.
8. A headphone control device, characterized in that, An application is made to a first Bluetooth headset, wherein when the first Bluetooth headset is connected to an electronic device as a master headset, a second Bluetooth headset is connected to the first Bluetooth headset as a slave headset. The device includes: a signal acquisition module, a condition determination module, and a headset switching module. The signal acquisition module is used to acquire the first signal strength of the first Bluetooth headset and the second signal strength of the second Bluetooth headset. The first signal strength is the signal strength between the first Bluetooth headset and the electronic device, and the second signal strength is the signal strength between the second Bluetooth headset and the electronic device. The second signal strength is determined based on the monitoring link between the second Bluetooth headset and the electronic device. The monitoring link is used to monitor the transmission of audio data between the first Bluetooth headset and the electronic device. The condition determination module is used to determine that the first signal strength and the second signal strength meet a preset strength condition. The preset strength condition includes that the second signal strength is greater than the first signal strength and the difference between the second signal strength and the first signal strength is greater than a second threshold, or that the preset strength condition includes that the second rate of change corresponding to the second signal strength is greater than the first rate of change corresponding to the first signal strength. The headphone switching module is used to send switching instruction information to the second Bluetooth headphone, and the switching instruction information is used to instruct the second Bluetooth headphone to establish a connection with the electronic device as the master headphone.
9. A Bluetooth headset, characterized in that, include: A first Bluetooth headset and a second Bluetooth headset, wherein the first Bluetooth headset acts as the master headset connected to the electronic device, and the second Bluetooth headset acts as the slave headset connected to the first Bluetooth headset. The first Bluetooth headset is used to acquire a first signal strength of the first Bluetooth headset and a second signal strength of the second Bluetooth headset, wherein the first signal strength is the signal strength between the first Bluetooth headset and the electronic device, the second signal strength is the signal strength between the second Bluetooth headset and the electronic device, and the second signal strength is determined based on the monitoring link between the second Bluetooth headset and the electronic device, the monitoring link being used to monitor the transmission of audio data between the first Bluetooth headset and the electronic device; The first Bluetooth headset is further configured to determine that the first signal strength and the second signal strength meet a preset strength condition, and send a switching indication information to the second Bluetooth headset. The switching indication information is used to instruct the second Bluetooth headset to establish a connection with the electronic device as the master headset. The preset strength condition includes that the second signal strength is greater than the first signal strength and the difference between the second signal strength and the first signal strength is greater than a second threshold, or the preset strength condition includes that the second rate of change corresponding to the second signal strength is greater than the first rate of change corresponding to the first signal strength. The second Bluetooth headset is used to respond to the switching instruction information and connect to the electronic device as the main headset.
10. A Bluetooth headset, characterized in that, include: One or more processors; 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 being configured to perform the method as described in any one of claims 1-7.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code that can be invoked by a processor to execute the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Method and device of connecting bilateral Bluetooth earphones
CN107145330A
Wireless Bluetooth earphones and master-slave switching optimization method for wireless Bluetooth earphones
CN109660906A