Bluetooth-based Control Method, Device, Electronic Device and Storage Medium

By sending pairing instructions from the second electronic device to the first electronic device after Bluetooth connection, causing it to enter the pairing state, the problem of cumbersome pairing methods of existing Bluetooth devices is solved, and the effect of simplifying operations and enriching pairing methods is achieved.

CN115776661BActive Publication Date: 2025-08-05GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111050876.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-08
Publication Date
2025-08-05
Estimated Expiration
2041-09-08

AI Technical Summary

Technical Problem

The way existing Bluetooth devices enter pairing state is cumbersome and single, affecting the user experience.

Method used

After the first electronic device establishes a Bluetooth connection with the second electronic device, the second electronic device sends a pairing instruction to the first electronic device, causing the first electronic device to enter the pairing state, simplifying the operation and enriching the pairing method.

Benefits of technology

The pairing process of electronic devices is simplified, the user experience is improved, the impact on normal use is avoided, and the diversity of pairing methods is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115776661B_ABST
    Figure CN115776661B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a control method, device, electronic device and storage medium based on Bluetooth. The method is applied to a first electronic device, and the method may include: when the first electronic device establishes a Bluetooth connection with at least one second electronic device, receiving a first pairing instruction sent by the second electronic device; entering a pairing state according to the first pairing instruction, so that other electronic devices can scan the first electronic device, and the other electronic devices include electronic devices that do not store connection information corresponding to the first electronic device. The control method, device, electronic device and storage medium based on Bluetooth disclosed in the embodiments of the present application can simplify the way of making an electronic device enter a pairing state, and make the way of making an electronic device enter a pairing state more diverse.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a Bluetooth-based control method, device, electronic device, and storage medium. Background Art

[0002] Bluetooth is a radio technology that supports short-range communication between devices. It enables wireless information exchange between multiple Bluetooth-enabled electronic devices, making data transmission between electronic devices faster and more efficient. To improve the security of Bluetooth communication, if the two electronic devices establishing a Bluetooth connection have not been connected before, pairing is required during the Bluetooth connection process. Currently, the method for pairing electronic devices is relatively cumbersome and simple. Summary of the Invention

[0003] The embodiments of the present application disclose a Bluetooth-based control method, device, electronic device, and storage medium, which can simplify the way of making an electronic device enter a pairing state and provide more diverse ways of making an electronic device enter a pairing state.

[0004] The present application discloses a Bluetooth-based control method, which is applied to a first electronic device. The method includes:

[0005] When the first electronic device establishes a Bluetooth connection with at least one second electronic device, receiving a first pairing instruction sent by the second electronic device;

[0006] Entering a pairing state according to the first pairing instruction so that other electronic devices can scan the first electronic device, the other electronic devices including electronic devices that do not store connection information corresponding to the first electronic device.

[0007] The present application discloses a Bluetooth-based control method, which is applied to a second electronic device. The method includes:

[0008] When a Bluetooth connection is established between the second electronic device and the first electronic device, a first pairing instruction is sent to the first electronic device, where the first pairing instruction is used to instruct the first electronic device to enter a pairing state so that other electronic devices can scan the first electronic device; wherein the other electronic device includes an electronic device that does not store connection information corresponding to the first electronic device.

[0009] The present application embodiment discloses a Bluetooth-based control device, which is applied to a first electronic device. The device includes:

[0010] an instruction receiving module, configured to receive a first pairing instruction sent by at least one second electronic device when the first electronic device establishes a Bluetooth connection with the second electronic device;

[0011] The pairing module is configured to enter a pairing state according to the first pairing instruction so that other electronic devices can scan the first electronic device, where the other electronic devices include electronic devices that do not store connection information corresponding to the first electronic device.

[0012] The present application discloses a Bluetooth-based control device, which is applied to a second electronic device. The device includes:

[0013] An instruction sending module is used to send a first pairing instruction to the first electronic device when a Bluetooth connection is established between the second electronic device and the first electronic device, wherein the first pairing instruction is used to trigger the first electronic device to enter a pairing state so that other electronic devices can scan the first electronic device; wherein the other electronic device includes an electronic device that does not store connection information corresponding to the first electronic device.

[0014] An embodiment of the present application discloses an electronic device, including a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor implements the method applied to the first electronic device as described above.

[0015] An embodiment of the present application discloses an electronic device, including a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor implements the method applied to the second electronic device as described above.

[0016] An embodiment of the present application discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method applied to the first electronic device as described above is implemented.

[0017] An embodiment of the present application discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method applied to the second electronic device as described above is implemented.

[0018] The Bluetooth-based control method, device, electronic device and storage medium disclosed in the embodiments of the present application, when a first electronic device establishes a Bluetooth connection with at least one second electronic device, the second electronic device sends a first pairing instruction to the first electronic device, and the first electronic device enters a pairing state based on receiving the first pairing instruction so that other electronic devices can scan the first electronic device. The other electronic devices include electronic devices that do not store connection information corresponding to the first electronic device. The second electronic device connected to the first electronic device sends the first pairing instruction to the first electronic device to put the first electronic device into the pairing state. This will not affect the normal Bluetooth communication between the second electronic device and the first electronic device, but can also simplify the way of putting the electronic device into the pairing state, and provide more diverse ways for electronic devices to enter the pairing state. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 This is a diagram of an application scenario of a Bluetooth-based control method in one embodiment;

[0021] Figure 2 is a flowchart of a Bluetooth-based control method in one embodiment;

[0022] Figure 3 is an interaction sequence diagram of an electronic device entering a pairing state in one embodiment;

[0023] Figure 4 is a flowchart of a Bluetooth-based control method in another embodiment;

[0024] Figure 5 is a schematic diagram of an interface of a second electronic device in one embodiment;

[0025] Figure 6A This is an interaction sequence diagram for an electronic device in a connection grabbing scenario according to an embodiment;

[0026] Figure 6B This is an interaction sequence diagram for a headphone device connection grabbing scenario in one embodiment;

[0027] Figure 7A This is an interactive sequence diagram of connecting a headphone device to two electronic devices in one embodiment;

[0028] Figure 7B This is an interaction sequence diagram of connecting a headphone device to two electronic devices in another embodiment;

[0029] Figure 8 is a flowchart of a Bluetooth-based control method in yet another embodiment;

[0030] Figure 9 is a block diagram of a Bluetooth-based control device in one embodiment;

[0031] Figure 10 is a block diagram of a Bluetooth-based control device in another embodiment;

[0032] Figure 11 FIG. 4 is a structural block diagram of an electronic device in an embodiment. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0034] It should be noted that the terms "including," "having," and any variations thereof in the embodiments and drawings of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to the process, method, product, or apparatus.

[0035] It should be understood that the terms "first," "second," and the like used herein may be used to describe various components, but these components are not limited by these terms. These terms are used solely to distinguish a first component from another component. For example, a first earphone may be referred to as a second earphone, and similarly, a second earphone may be referred to as a first earphone, without departing from the scope of this application. The first earphone and the second earphone are both earphones, but they are not the same earphone. Furthermore, it should be noted that the terms "plurality" and the like used in the embodiments of this application refer to two or more.

[0036] In related technologies, there are problems with the method of putting electronic devices into pairing state, which is relatively cumbersome and single. Taking the electronic device as a wireless headset that supports Bluetooth as an example, when the user needs to put the wireless headset into the pairing state, the wireless headset needs to be placed in the charging box and the pairing button on the charging box is pressed to put the wireless headset into the pairing state. The operation process is cumbersome and will affect the user's normal use of the wireless headset, causing inconvenience to the user.

[0037] The embodiments of the present application provide a Bluetooth-based control method, device, electronic device, and storage medium, which can simplify the way in which an electronic device enters a pairing state and provide more diverse ways in which an electronic device enters a pairing state.

[0038] Figure 1 FIG. 1 is an application scenario diagram of a control method based on Bluetooth in one embodiment. Figure 1 As shown, the first electronic device 10 can establish a Bluetooth connection with at least one second electronic device 20 and can communicate based on the Bluetooth connection.

[0039] The first electronic device 10 may include, but is not limited to, earphones, mobile phones, wearable devices (such as wristbands, smart watches, smart glasses, etc.), in-vehicle terminals, tablet computers, etc., wherein the earphones may include, but are not limited to, headphones, in-ear headphones, earbud headphones, and earphones that support Bluetooth communication. For example, the earphones may be True Wireless Stereo (TWS) Bluetooth headphones, etc. The second electronic device 20 may include, but is not limited to, wearable devices, in-vehicle terminals, mobile phones, tablet computers, laptop computers, etc.

[0040] A variety of Bluetooth connection methods can be used between the first electronic device 10 and the second electronic device 20. For example, the first electronic device 10 may be a TWS headset, which may include a first headset and a second headset. Optionally, the first headset and the second headset can distinguish between a master and a slave headset. As one connection method, the master headset of the first and second headsets can establish a Bluetooth connection with the second electronic device 20, and the slave headset can establish a Bluetooth connection with the master headset. The slave headset can obtain connection information between the master headset and the second electronic device 20 through the Bluetooth connection with the master headset, thereby monitoring the communication between the master headset and the second electronic device 20 and achieving synchronization between the master and the slave headsets. As an embodiment, the master headset can also establish a Bluetooth connection with the second electronic device 20, and the master headset can also establish a Bluetooth connection with the slave headset. After receiving data sent by the second electronic device 20, the master headset forwards it to the slave headset, thereby achieving synchronization between the master and the slave headsets. It is understood that other Bluetooth connection methods can also be used between the first electronic device 10 and the second electronic device 20. The specific Bluetooth connection method is not limited in the embodiments of this application.

[0041] In an embodiment of the present application, when a first electronic device 10 establishes a Bluetooth connection with at least one second electronic device 20, the second electronic device 20 may send a first pairing instruction to the first electronic device 10. The first electronic device 10 receives the first pairing instruction and enters a pairing state according to the first pairing instruction, so that other electronic devices can scan the first electronic device 10. The other electronic devices may include electronic devices that do not store connection information corresponding to the first electronic device 10.

[0042] By having the second electronic device 20 connected to the first electronic device 10 send a first pairing instruction to the first electronic device 10 to put the first electronic device 10 into the pairing state, it will not affect the normal data transmission between the second electronic device 20 and the first electronic device 10, and can also simplify the way of putting the first electronic device 10 into the pairing state. Taking the first electronic device 10 as a wireless headset as an example, the wireless headset does not need to be placed in the charging box to put the wireless headset into the pairing state, which simplifies the user operation and the user can continue to use the wireless headset; taking the first electronic device 10 as a wearable device as an example, the display screen of the wearable device is usually small. With this solution, the user does not need to click on the small display screen to enter the Bluetooth settings page, and then click the pairing start button on the Bluetooth settings page to put the wearable device into the pairing state, which improves the simplicity of operation. At the same time, it also enriches the way of putting electronic devices into the pairing state, which meets the needs of users in different scenarios.

[0043] like Figure 2 As shown, in one embodiment, a Bluetooth-based control method is provided, which can be applied to the first electronic device mentioned above. The method may include the following steps:

[0044] Step 210: When a Bluetooth connection is established between a first electronic device and at least one second electronic device, a first pairing instruction sent by a second electronic device is received.

[0045] The first electronic device may be an electronic device that supports Bluetooth "one-to-one" or an electronic device that supports Bluetooth "one-to-many", such as Bluetooth "one-to-two", "one-to-three", "one-to-four", etc. Supporting Bluetooth "one-to-many" means that the maximum number N of Bluetooth connections supported by the first electronic device can be an integer greater than or equal to 2, that is, the first electronic device can maintain Bluetooth connections with at least two devices at the same time. Taking supporting Bluetooth "one-to-two" as an example, the first electronic device can maintain Bluetooth connections with two devices at the same time.

[0046] When a first electronic device establishes a Bluetooth connection with at least one second electronic device, the second electronic device may send a first pairing instruction to the first electronic device, and the first pairing instruction is used to instruct the first electronic device to enter a pairing state. Optionally, any second electronic device may send the first pairing instruction to the first electronic device, or a designated electronic device in the second electronic device may send the first pairing instruction to the first electronic device. For example, when a user needs to put the first electronic device into a pairing state, the user may control any second electronic device so that the controlled second electronic device sends a first pairing instruction to the first electronic device, so that the first electronic device enters a pairing state. For another example, the user may also select a designated electronic device from among the second electronic devices connected to the first electronic device, and set pairing setting information in the designated electronic device (such as setting a fixed time point for the first electronic device to enter a pairing state, or setting a scenario for the first electronic device to enter a pairing state, etc.), and the designated electronic device may send a first pairing instruction to the first electronic device according to the pairing setting information.

[0047] It should be noted that when a first electronic device establishes a Bluetooth connection with multiple second electronic devices, the user can send a pairing instruction through a specific second electronic device, or through any second electronic device, or of course, through multiple second electronic devices, without limitation here.

[0048] Step 220: Entering a pairing state according to the first pairing instruction, so that other electronic devices can scan the first electronic device.

[0049] The first electronic device may enter a pairing state according to a first pairing instruction sent by the second electronic device, so that other electronic devices can scan the first electronic device, wherein the other electronic devices may include electronic devices that do not store connection information corresponding to the first electronic device. The connection information may include device information and pairing information, etc. The device information may include but is not limited to the MAC (Media Access Control) address and device name of the first electronic device, and the pairing information may include but is not limited to a pairing key and a pairing code. It is understandable that when other electronic devices have the connection information, even if the discoverable state (inquiry scan mode) of the first electronic device is not started, the other electronic devices may directly send a Bluetooth connection request to the first electronic device according to the connection information to establish a Bluetooth connection. The specific connection method may refer to the relevant Bluetooth protocol, such as the Bluetooth standard protocol, and the specific connection method may also be adjusted as the protocol changes. The Bluetooth connection request may include a paging page.

[0050] The pairing state may refer to the first electronic device turning on the inquiry scan mode and the page scan mode. In the inquiry scan mode, the first electronic device allows to be scanned and searched by other electronic devices (i.e., it can be discovered); in the page scan mode, the first electronic device allows to be connected by other electronic devices, and the first electronic device can receive Bluetooth connection requests sent by other electronic devices. That is, in the pairing state, the first electronic device is in the discoverable state and the connectable state at the same time. Other electronic devices can turn on the Bluetooth scanning function to scan the surrounding Bluetooth devices, and then they can scan the first electronic device and send a Bluetooth request to the first electronic device. The first electronic device can respond to the Bluetooth request sent by the other electronic device and establish a Bluetooth connection with the other electronic device. Since the other electronic device does not store the connection information corresponding to the first electronic device (such as it has not been connected to the first electronic device before, or it has been connected but the connection information has been deleted, etc.), pairing can be performed during the process of establishing a Bluetooth connection between the first electronic device and the other electronic device. Optionally, the pairing may include exchanging pairing codes, agreeing on a key between the two, and other processes to ensure the security of the transmission.

[0051] In some embodiments, the above method may also include: when the first electronic device is in a pairing state, receiving a scan request sent by a third electronic device; sending a scan response to the third electronic device according to the scan request; receiving a first connection request sent by the third electronic device, and establishing a Bluetooth connection with the third electronic device according to the first connection request.

[0052] Taking the third electronic device as an example, the third electronic device may be a device that has not been connected to the first electronic device. When the first electronic device is in pairing mode, the third electronic device may enable scanning mode and scan for surrounding Bluetooth devices. The third electronic device may send a scanning request (inquiry request) to the first electronic device. The first electronic device receives the scanning request sent by the third electronic device and may send a scanning response (inquiry response) to the third electronic device based on the scanning request.

[0053] After receiving the scan response, the third electronic device may obtain the device information of the first electronic device and send a first connection request to the first electronic device based on the device information. The first connection request may be understood as a Bluetooth connection request.

[0054] Optionally, after obtaining the device information of the first electronic device, the third electronic device may display the device information, and the user may perform a selection operation on the device information to trigger the third electronic device to establish a Bluetooth connection with the first electronic device. After the third electronic device receives the selection operation, it may send a first connection request to the first electronic device based on the device information of the first electronic device to request to establish a Bluetooth connection with the first electronic device. After receiving the first connection request, the first electronic device may respond to the first connection request and establish a Bluetooth connection with the third electronic device. Since the third electronic device has not been connected to the first electronic device and has not been paired with the first electronic device, pairing can be performed during the process of establishing the Bluetooth connection.

[0055] For example, Figure 3 FIG. 1 is an interactive sequence diagram of an electronic device entering a pairing state in one embodiment. Figure 3 As shown, a Bluetooth connection is established between electronic device A and electronic device B. Electronic device B can send a first pairing instruction to electronic device A, and electronic device A enters the pairing state (simultaneously in inquiry scan mode and page scan mode) according to the first pairing instruction. Electronic device A can be a device that supports Bluetooth "one-to-two" and electronic device C can be a device that does not store connection information corresponding to electronic device A. When electronic device A is in the pairing state, electronic device C can send a scan request to electronic device A. After receiving the scan request, electronic device A can send a scan response to electronic device C. Electronic device C can send a Bluetooth connection request to electronic device A. Electronic device A can process the Bluetooth connection request, establish a Bluetooth connection with electronic device C, and pair with electronic device C during the Bluetooth connection process.

[0056] In some embodiments, the other electronic devices may also include electronic devices that store connection information corresponding to the first electronic device, that is, they may be electronic devices that have been successfully paired with the first electronic device. When the first electronic device is in page scan mode (i.e., ready to connect), or is simultaneously in inquiry scan mode and page scan mode (i.e., the pairing state described above), it can receive Bluetooth connection requests sent by other electronic devices. The other paired electronic devices can send Bluetooth connection requests to the first electronic device based on the connection information to request to establish a Bluetooth connection with the first electronic device. Since the pairing information such as the pairing key has been stored in the previous pairing, there is no need to pair again.

[0057] As a specific embodiment, the Bluetooth connection request can be a paging data packet. The other electronic device can use frequency hopping to send the paging data packet to page the first electronic device. In page scan mode, the first electronic device can scan for externally sent paging data packets at fixed intervals. If the first electronic device scans the paging data packet sent by the other electronic device, it can be considered to have received the Bluetooth connection request. The specific process of Bluetooth connection can be referred to the provisions of the Bluetooth standard protocol.

[0058] In some embodiments, establishing the Bluetooth connection mentioned above may include establishing a Bluetooth physical link, such as an ACL (Asynchronous Connectionless) physical link.

[0059] In some embodiments, the first electronic device can also be controlled to turn off the pairing state through a second electronic device connected to the first electronic device. The second electronic device can send a shutdown instruction to the first electronic device, and the first electronic device can turn off the pairing state (i.e., turn off the inquiry scan mode) according to the shutdown instruction. At this time, the first electronic device can also be in pagescan mode (i.e., connectable state) and can receive Bluetooth connection requests sent by other electronic devices.

[0060] Optionally, the second electronic device that sends the shutdown instruction to the first electronic device and the second electronic device that sends the first pairing instruction to the first electronic device can be the same device or a different device, and this embodiment of the application is not limited to this. The second electronic device can flexibly turn on / off the pairing status of the first electronic device, thereby improving convenience and flexibility.

[0061] It is understandable that the first electronic device can also turn off the pairing state by itself, for example, turning off the pairing state by itself after entering the pairing state for a certain period of time (such as 2 minutes, 3 minutes, etc.), or turning off the pairing state after establishing a Bluetooth connection with other electronic devices.

[0062] In an embodiment of the present application, when a first electronic device establishes a Bluetooth connection with at least one second electronic device, the second electronic device sends a first pairing instruction to the first electronic device, and the first electronic device enters a pairing state based on receiving the first pairing instruction so that other electronic devices can scan the first electronic device. The second electronic device connected to the first electronic device sends the first pairing instruction to the first electronic device to allow the first electronic device to enter a pairing state. This will not affect the normal Bluetooth communication between the second electronic device and the first electronic device, but can also simplify the way in which the electronic device enters the pairing state, and provide more diverse ways for the electronic device to enter the pairing state.

[0063] In some embodiments, when the first electronic device has not established a Bluetooth connection with any second electronic device, if the first electronic device is electrically connected to an accessory device, it receives a second pairing instruction sent by the accessory device and enters a pairing state according to the second pairing instruction, wherein the second pairing instruction is generated by the accessory device according to a detected pairing trigger operation.

[0064] If the first electronic device has not established a Bluetooth connection with any second electronic device, the user can use other methods to pair the first electronic device. The first electronic device may correspond to an accessory device that can be used (or sold) in conjunction with the first electronic device. For example, if the first electronic device is a wireless headset, the accessory device may be a charging box for the wireless headset; if the first electronic device is a smartwatch, the accessory device may be a watch strap or a processing module disposed on the watch strap, etc., but the present invention is not limited thereto.

[0065] When the first electronic device is electrically connected to the accessory device, the first electronic device can transmit signals with the accessory device. The user can perform a pairing trigger operation on the accessory device, and the pairing trigger operation can be a pre-set operation. For example, the first electronic device is a wireless headset, and the accessory device is a charging box for the wireless headset. The pairing trigger operation can be that the user presses and holds the pairing button on the charging box for more than 3 seconds; the first electronic device is a smart watch, and the accessory device is a processing module provided on the watch strap. The processing module can be provided with a touch sensor. The pairing trigger operation can be that the user touches the surface of the processing module for more than 2 seconds, etc. The pairing trigger operation can be set according to actual product requirements and user needs. The embodiment of the present application does not limit the specific operation method of the pairing trigger operation.

[0066] If the accessory device detects a pairing trigger operation, it may send a second pairing instruction to the first electronic device, and the first electronic device may enter a pairing state according to the second pairing instruction.

[0067] It should be noted that, if the first electronic device has not established a Bluetooth connection with any second electronic device, other methods may be used to put the first electronic device into a pairing state. For example, the first electronic device may be provided with one or more different sensors, such as a distance sensor, a touch sensor, a pressure sensor, a temperature sensor, etc., which can detect a pairing trigger operation (such as a press operation, a touch operation, a distance sensing operation, etc.) performed by the user through the one or more sensors, and enter the pairing state when the pairing trigger operation is detected.

[0068] In the embodiments of the present application, a variety of different ways of allowing electronic devices to enter the pairing state can be provided, which enriches the ways of allowing electronic devices to enter the pairing state, can meet the needs of users in different situations, and improve users' product stickiness.

[0069] like Figure 4 As shown, in another embodiment, a Bluetooth-based control method is provided, which can be applied to the first electronic device mentioned above. The method may include the following steps:

[0070] Step 402: When a Bluetooth connection is established between a first electronic device and at least one second electronic device, a first pairing instruction sent by a second electronic device is received.

[0071] Step 404: Entering a pairing state according to the first pairing instruction, so that other electronic devices can scan the first electronic device.

[0072] The description of steps 402 to 404 may refer to the relevant descriptions in the above embodiments, and will not be repeated here.

[0073] In some embodiments, the second electronic device may send a pairing instruction to the first electronic device in any of the following ways:

[0074] Method 1: The second electronic device sends a first pairing instruction to the first electronic device in response to a status-enabling operation on the first electronic device. When a Bluetooth connection is established between the second electronic device and the first electronic device, the user can perform a status-enabling operation on the second electronic device to put the first electronic device into pairing mode. The status-enabling operation may include, but is not limited to, touch control, voice control, gesture control, and gaze control.

[0075] In one embodiment, the second electronic device may display a Bluetooth device management interface, which may include device information and a pairing control of the first electronic device. The user may touch the pairing control to activate the state, thereby allowing the first electronic device to enter the pairing state. If the second electronic device detects a touch operation on the pairing control, i.e., detects an activation operation on the first electronic device, it may send a first pairing instruction to the first electronic device, and the first electronic device may enter the pairing state according to the first pairing instruction.

[0076] For example, Figure 5 FIG. 1 is a schematic diagram of an interface of a second electronic device in an embodiment. Figure 5 As shown, the second electronic device 20 can display the device name of the first electronic device 10 (Bluetooth headset) and the pairing control 202. The user can click the pairing control 202, and the second electronic device 20 can send a first pairing instruction to the first electronic device 10 to put the first electronic device 10 into a pairing state.

[0077] Method 2: The second electronic device sends a first pairing instruction to the first electronic device according to the set time information. This time information can be set by the user according to actual needs, or it can be time information uniformly set before the first electronic device leaves the factory. Optionally, when the second electronic device first establishes a Bluetooth connection with the first electronic device, the first electronic device can send the set time information to the second electronic device for storage.

[0078] In some embodiments, the time information may be a fixed time point, for example, the first electronic device is put into pairing mode at 12:00 noon every day, or the first electronic device is put into pairing mode at 8:00 a.m. every Monday, etc. The time information may also be a time period, and after the second electronic device is connected to the first electronic device, the first pairing instruction may be sent to the first electronic device according to the time period, for example, once every hour, once every two hours, etc., but is not limited thereto.

[0079] Method 3: When the second electronic device detects that the first electronic device is in a set target scene, it sends a first pairing instruction to the first electronic device. The target scene can be set by the user according to actual needs, or it can be a scene that is uniformly set before the first electronic device leaves the factory. Optionally, when the second electronic device first establishes a Bluetooth connection with the first electronic device, the first electronic device can send scene information of the set target scene to the second electronic device for storage. This scene information can be used to describe the target scene.

[0080] In some embodiments, the target scenario may include a connection scenario of the first electronic device. For example, the target scenario may be that the number of devices currently connected to the first electronic device has not reached the maximum number N; or it may be that the duration for which the first electronic device has not received business data has reached a target duration (that is, within the target duration, no second electronic device connected to the first electronic device has sent business data to the first electronic device). The business data may include audio data, call voice data, files, etc., but is not limited to this.

[0081] When the second electronic device detects that the first electronic device is in a set target scenario, it can be considered that the first electronic device is very likely to need to establish a Bluetooth connection with other electronic devices, and a first pairing instruction can be sent to the first electronic device. Taking the second electronic device as supporting Bluetooth "one to multiple" and the target scenario as an example where the number of devices currently connected to the first electronic device does not reach the maximum number N, the second electronic device can obtain the number of devices currently connected to the first electronic device in real time or at time intervals (such as 2 minutes, 3 minutes), and determine whether the number of devices has reached the maximum number N supported by the first device to establish Bluetooth connections, so as to determine whether the first electronic device is in the target scenario.

[0082] It should be noted that other methods can also be used to trigger the second electronic device to send the first pairing instruction to the first electronic device, and are not limited to the above-mentioned methods. For example, the second electronic device can also send the first pairing instruction to the first electronic device when the remaining power is lower than the power threshold. When the remaining power of the second electronic device is lower than the power threshold, the second electronic device may be out of power at any time and disconnect the Bluetooth connection with the first electronic device. Therefore, the second electronic device can enter the pairing state and establish a Bluetooth connection with other electronic devices, which can avoid the situation where the second electronic device suddenly runs out of power and the user is unable to use the first electronic device.

[0083] Step 406: When the first electronic device establishes Bluetooth connections with N second electronic devices, a first connection request sent by a third electronic device is received.

[0084] It can be understood that the establishment of a Bluetooth connection between a first electronic device and N second electronic devices may refer to the maintenance of a Bluetooth connection between the first electronic device and the N second electronic devices. When the first electronic device is in a pairing state, if the first electronic device has established a Bluetooth connection with N second electronic devices, the maximum number of Bluetooth connections that the first electronic device can support has been reached. If a first connection request is received from a third electronic device, the Bluetooth connection with one of the second electronic devices needs to be disconnected before the first electronic device can successfully establish a Bluetooth connection with the third electronic device, which is equivalent to the third electronic device preempting the Bluetooth connection between one of the second electronic devices and the first electronic device. That is, when the first electronic device establishes Bluetooth connections with N second electronic devices respectively, if the first electronic device receives a Bluetooth connection request from a third electronic device, the first electronic device is in a connection grabbing scenario.

[0085] Step 408 : Perform a disconnection process corresponding to the target electronic device among the N second electronic devices, and establish a Bluetooth connection with the third electronic device according to the first connection request.

[0086] In the case where a first electronic device establishes Bluetooth connections with N second electronic devices respectively, if the first electronic device enters a pairing state, in related technologies, the first electronic device will directly disconnect the Bluetooth connection with at least some of the second electronic devices. Even if no third electronic device requests to connect to the first electronic device, the first electronic device and the at least some of the second electronic devices are in a disconnected state, and the user needs to manually restore the Bluetooth connection.

[0087] In an embodiment of the present application, when the first electronic device enters the pairing state according to the first pairing instruction, it can maintain a Bluetooth connection with N second electronic devices. When the first electronic device is in a connection rush scenario (i.e., it receives a first connection request sent by a third electronic device), the first electronic device can perform a disconnection process corresponding to the target electronic device among the N second electronic devices, and establish a Bluetooth connection with the third electronic device according to the first connection request. Among them, the disconnection process can be used to disconnect the Bluetooth connection between the first electronic device and the target electronic device. The first electronic device does not need to disconnect the Bluetooth connection between the first electronic device and at least some of the second electronic devices after entering the pairing state. This can avoid the situation where there is no third electronic device requesting to connect to the first electronic device, resulting in the user having to manually restore the Bluetooth connection, which is more in line with user needs.

[0088] In some embodiments, before performing a disconnection process corresponding to a target electronic device among the N second electronic devices, the first electronic device may determine a target electronic device among the N second electronic devices. In some embodiments, if N is 1, i.e., the first electronic device has established a Bluetooth connection with only one second electronic device, then the second electronic device is the target electronic device. If N is an integer greater than or equal to 2, i.e., the first electronic device has established Bluetooth connections with multiple second electronic devices, then the first electronic device may select one of the multiple second electronic devices as the target electronic device.

[0089] Optionally, the target electronic device may be any second electronic device among the N second electronic devices, and the first electronic device may randomly select the target electronic device from the N second electronic devices. As another embodiment, the first electronic device may also select the target electronic device from the N second electronic devices according to a preset selection rule. For example, based on the priorities of the second electronic devices, the second electronic device with the lowest priority may be selected as the target electronic device, or the second electronic device with the lowest activity (i.e., the least amount of data transmitted) may be selected as the target electronic device, or the second electronic device that establishes a Bluetooth connection the earliest may be selected as the target electronic device, etc., but the present invention is not limited thereto.

[0090] In one embodiment, the first electronic device may select, according to the priorities of the respective second electronic devices, a second electronic device whose priority satisfies a priority condition from among the N second electronic devices as the target electronic device.

[0091] The first electronic device may obtain the priority corresponding to each second electronic device with which a Bluetooth connection is established. Optionally, the priority of each second electronic device may be determined based on a device status parameter of each second electronic device. The device status parameter may include, but is not limited to, one or more of a service data output parameter, a sequence parameter for indicating the order in which Bluetooth connections are established with the first electronic device, a device type parameter, a device remaining battery parameter, and a historical connection frequency.

[0092] The service data output parameter may be used to indicate whether the second electronic device is currently outputting service data to the first electronic device via a Bluetooth connection. A second electronic device that is currently outputting service data to the first electronic device may have a higher priority than a second electronic device that is not currently outputting service data to the first electronic device.

[0093] The sequence parameter can be used to characterize the order in which Bluetooth connections are established with the first electronic device. As an embodiment, the first electronic device may store the connection time when each second electronic device most recently established a Bluetooth connection with the first electronic device, and determine the connection duration of each second electronic device based on the connection time corresponding to each second electronic device. The connection duration is the time from the connection moment to the current moment. The sequence parameter of each second electronic device can be determined based on the connection duration of each second electronic device. The longer the connection duration, the higher the order indicated by the sequence parameter, which means that the second electronic device established a Bluetooth connection with the first electronic device earlier.

[0094] As another embodiment, the first electronic device may also establish a connection queue, and may store the device information of each second electronic device in the connection queue in the order in which each second electronic device establishes a Bluetooth connection with the first electronic device. The closer the second electronic device is arranged in the connection queue, the earlier the second electronic device establishes a Bluetooth connection with the first electronic device. Optionally, the priority of the second electronic device that establishes a Bluetooth connection with the first electronic device earlier may be lower.

[0095] The device type parameter can be used to characterize the device type of the second electronic device, which may include but is not limited to mobile phones, smart watches, wristbands, smart home devices, etc. Priorities corresponding to each device type can be pre-set. The first electronic device can determine the device type of each first electronic device based on the device type parameters of each second electronic device and obtain the priority corresponding to the device type.

[0096] The device remaining power parameter may be used to represent the current remaining power of the second electronic device. The priority of the second electronic device with a larger remaining power may be higher than the priority of the second electronic device with a smaller remaining power.

[0097] The historical connection frequency can be used to characterize the historical connection status of the second electronic device and the first electronic device. The historical connection frequency can be the connection frequency in the past period of time (such as the past week, the past month, etc.). The first electronic device can store the connection status data of each connected electronic device. The connection status data may include the device information, connection time, connection duration, etc. of each connected electronic device. The first electronic device can count the historical connection frequencies of the N second electronic devices currently connected to the first electronic device in the past period of time based on the stored connection status data. The priority of the second electronic device with a high historical connection frequency can be higher than the priority of the second electronic device with a low historical connection frequency.

[0098] The first electronic device can determine the priority corresponding to each second electronic device based on one or more device status parameters of each second electronic device. If the priority corresponding to each second electronic device is determined based on multiple device status parameters, a weight can be assigned to each device status parameter. Taking device A among the second electronic devices as an example, device A can be any second electronic device. The baseline priority corresponding to each device status parameter can be determined based on each device status parameter of device A. For example, if the service data output parameter of device A is 1, indicating that service data is currently being output to the first electronic device, the baseline priority corresponding to the service data output parameter can be 4; if the device remaining power parameter of device A indicates that the current remaining power of device A is greater than 50%, the baseline priority corresponding to the device remaining power can be 2, and so on. Then, based on the baseline priorities corresponding to each device status parameter of device A and the assigned weights of each device status parameter, a weighted sum calculation or a weighted average calculation can be performed to obtain the priority corresponding to device A.

[0099] It should be noted that the method of determining the priority of each second electronic device is not limited to the above-mentioned methods. For example, the priority rules can also be set directly. The second electronic device that is currently outputting business data to the first electronic device has the highest priority. Among the second electronic devices that are not currently outputting business data to the first electronic device, the second electronic device with the lowest remaining power has the lowest priority. Based on the priority rules and the device status parameters of each second electronic device, the priority of each second electronic device can be determined.

[0100] The first electronic device selects a second electronic device whose priority satisfies a priority condition from N second electronic devices as the target electronic device. Optionally, the priority condition may include any one of a priority lower than a priority threshold, a lowest priority, etc. Further, the first electronic device may directly select the second electronic device with the lowest priority as the target electronic device, or may first select a second electronic device with a priority lower than the priority threshold. If there are multiple second electronic devices with priorities lower than the priority threshold, one of them may be randomly selected as the target electronic device, or the second electronic device with the lowest priority may be selected as the target electronic device. Determining the target electronic device based on the priority of each second electronic device can make the target electronic device for disconnecting the Bluetooth connection more in line with user needs, and can reduce the adverse effects of disconnecting the Bluetooth connection on the user's normal use.

[0101] It should be noted that the priority of each second electronic device can change according to specific circumstances and is not necessarily fixed. It is understood that if the priority of a second electronic device changes before the first electronic device receives the Bluetooth connection request, the target electronic device will be selected according to the latest priority of each second electronic device when the Bluetooth connection request is received.

[0102] For example, if the first electronic device enters the pairing state and receives the first connection request sent by the third electronic device, if none of the second electronic devices transmits business data to the first electronic device, the second electronic device A that is connected first can be disconnected first according to the Bluetooth connection order of each second electronic device. If the first electronic device enters the pairing state, if the second electronic device A transmits business data (such as voice data, audio data, etc.) to the first electronic device before the first electronic device receives the first connection request sent by the third electronic device, then the priority of the second electronic device A changes. At this time, if the first electronic device receives the first connection request, it will not disconnect the Bluetooth connection with the second electronic device A. At this time, which second electronic device is disconnected is determined according to the set priority rule. It can be seen that the first electronic device does not disconnect when entering the pairing state, but disconnects after receiving the Bluetooth connection request, which largely guarantees the user's use of the first electronic device.

[0103] After determining the target electronic device, the first electronic device may send a disconnection instruction to the target electronic device to disconnect the Bluetooth connection with the target electronic device.

[0104] For example, Figure 6A FIG. 1 is an interactive sequence diagram of an electronic device in a connection grabbing scenario in an embodiment. Figure 6AAs shown, electronic device A can be a device that supports Bluetooth "one to two", and electronic device A can establish Bluetooth connections with electronic device B and electronic device D respectively. Electronic device B can send a first pairing instruction to electronic device A, and electronic device A enters the pairing state (in inquiry scan mode and page scan mode at the same time) according to the first pairing instruction, and maintains the Bluetooth connection with electronic device B and electronic device D before entering the pairing state. Electronic device C can be a device that does not store connection information corresponding to electronic device A. When electronic device A is in the pairing state, electronic device C can send a scan request to electronic device A. After receiving the scan request, electronic device A can send a scan response to electronic device C. Electronic device C can send a Bluetooth connection request to electronic device A. After receiving the Bluetooth connection request, electronic device A can establish a connection with the target electronic device (such as Figure 6A The electronic device B) in the disconnection process corresponds to disconnecting the Bluetooth connection with the target electronic device, and establishing a Bluetooth connection with the electronic device C, and pairing with the electronic device C during the Bluetooth connection process.

[0105] In an embodiment of the present application, when a first electronic device establishes a Bluetooth connection with N second electronic devices, the first electronic device does not disconnect the Bluetooth connection with at least some of the second electronic devices when entering the pairing state. When the first electronic device receives a first connection request sent by a third electronic device, that is, when it is in a connection rush scenario, the disconnection operation is performed. This can avoid the situation where there is no third electronic device requesting to connect to the first electronic device, resulting in the user having to manually restore the Bluetooth connection, which is more in line with user needs.

[0106] In some embodiments, the first electronic device may include a headphone device, which may include a first headphone and a second headphone. Step 408 may include: disconnecting the target electronic device from the N second electronic devices through the first headphone, and establishing a Bluetooth connection with the third electronic device through the second headphone according to the first connection request.

[0107] When the headphone device is in a connection-grabbing scenario and needs to disconnect the Bluetooth connection with a second electronic device, in an embodiment of the present application, the disconnection process can be performed by the first headphone of the headphone device, and the first connection request sent by the third electronic device can be processed by the second headphone of the headphone device to establish a Bluetooth connection with the third electronic device. The first headphone and the second headphone can perform the disconnection and connection operations in parallel, and the headphone device does not need to wait for the disconnection process to be completed before responding to the first connection request sent by the third electronic device. This can increase the speed of the third electronic device's connection grabbing to the headphone device and improve the connection grabbing efficiency.

[0108] Optionally, the first earphone is the master earphone of the earphone device, and the second earphone can be the slave earphone of the earphone device. The first earphone can establish Bluetooth connections with N second electronic devices respectively, and a Bluetooth connection can be established between the first earphone and the second earphone. As an embodiment, if the first earphone receives data sent by any second electronic device, the first earphone sends the data to the second earphone through the Bluetooth connection with the second earphone, thereby achieving master-slave synchronization. As another embodiment, the first earphone can synchronize the connection information of each second electronic device to the second earphone through the Bluetooth connection with the second earphone, so that the second earphone monitors the Bluetooth connection between the first earphone and the N second electronic devices according to the connection information, thereby achieving master-slave synchronization.

[0109] When the headset device is in a connection-grabbing scenario, the first headset can directly disconnect the Bluetooth connection with the target electronic device and send a disconnection instruction to the target electronic device. The second headset can establish a Bluetooth connection with the third electronic device according to the first connection request sent by the third electronic device.

[0110] In some embodiments, after the second headset establishes a Bluetooth connection with the third electronic device, the connection information of the third electronic device may be synchronized to the first headset via the second headset. The connection information may include but is not limited to frequency hopping information, channel information, clock information, etc. After the second headset synchronizes the connection information of the third electronic device to the first headset, the Bluetooth connection target of the third electronic device is switched from the second headset to the first headset, and the second headset monitors the Bluetooth connection between the first headset and the third electronic device; after the second headset synchronizes the connection information of the third electronic device to the first headset, or, the Bluetooth connection target of the third electronic device is switched from the second headset to the first headset, the first headset synchronizes data transmitted between the third electronic device and the second headset.

[0111] After obtaining the connection information, the first earphone can directly transmit data with the third electronic device based on the connection information. The physical link between the second earphone and the third electronic device is transitioned to the physical link between the first earphone and the third electronic device, and the Bluetooth connection object of the third electronic device is switched from the second earphone to the first earphone. The second earphone can monitor the physical link between the first earphone and the third electronic device, or the first earphone can forward the data transmitted between the third electronic device and the second earphone to achieve master-slave synchronization. Through the synchronization of information between the earphones, all electronic devices that establish a Bluetooth connection with the earphone device can use the first earphone (i.e., the master earphone) to connect and the second earphone (i.e., the slave ear) to monitor or receive the data forwarded by the first earphone, which is more convenient for management of the connected electronic devices and data transmission.

[0112] In some embodiments, after the first earphone completes the disconnection process, the first earphone may synchronize disconnection information to the second earphone, and the disconnection information may at least include device information of the target electronic device that disconnects the Bluetooth connection, and the second earphone may no longer monitor the Bluetooth connection between the target electronic device and the first earphone.

[0113] For example, Figure 6B FIG. 1 is an interactive sequence diagram of a headphone device in a connection grabbing scenario in an embodiment. Figure 6B As shown, the headphone device may be a device that supports Bluetooth "one to two", and the headphone device may establish Bluetooth connections with electronic device B and electronic device D respectively. Electronic device C may be a device that does not store connection information corresponding to the headphone device, and the headphone device may enter the pairing state, and maintain Bluetooth connections with electronic device B and electronic device D before entering the pairing state. Electronic device C may send a scan request to the headphone device, and after receiving the scan request, the headphone device may send a scan response to electronic device C through the first earphone and / or the second earphone. In the pairing state, the headphone device is in inquiry scan and page scan modes at the same time. When electronic device C determines that it needs to establish a Bluetooth connection with the headphone device, it may send a Bluetooth connection request to the headphone device. After the headphone device receives the Bluetooth connection request sent by electronic device C, the first earphone may establish a connection with the target electronic device (for example, Figure 6B The second headset may process the Bluetooth connection request, establish a Bluetooth connection with the target electronic device (D), and pair with the target electronic device (C) during the Bluetooth connection process. After the first headset disconnects from the target electronic device, the first headset may synchronize the disconnection information with the second headset. After the second headset successfully establishes a Bluetooth connection with the target electronic device (C), the second headset may synchronize the connection information with the first headset, thereby achieving information synchronization and switching the Bluetooth connection target of the target electronic device (C) from the second headset to the first headset.

[0114] In some embodiments, after the Bluetooth connection object of the third electronic device is switched from the second earphone to the first earphone, a Bluetooth physical link is established between the first earphone and the third electronic device. Furthermore, the first earphone can further establish A2DP (Advanced Audio Distribution Profile, Bluetooth audio transmission model agreement), HFP (Hands-free Profile) and other service connections with the third electronic device based on the Bluetooth physical link, so that the third electronic device can transmit audio data, voice data and other service data to the first earphone.

[0115] Optionally, the first earphone mentioned above can also be a slave earphone of the earphone device, and the second earphone can be a master earphone of the earphone device. When the earphone device is in a connection-grabbing scenario, the first earphone can monitor the Bluetooth connection between the second earphone and the target electronic device, and send a disconnection request to the target electronic device on the transmission channel between the second earphone and the target electronic device. The disconnection request can be used to trigger the disconnection of the Bluetooth connection between the target electronic device and the second earphone. The second earphone can process the Bluetooth request sent by the third electronic device and establish a Bluetooth connection with the third electronic device.

[0116] In an embodiment of the present application, when a third electronic device preempts the Bluetooth connection to the headset device, the disconnection and reconnection operations are performed simultaneously on the first and second headsets, respectively. This can increase the speed at which the third electronic device reconnects to the headset device and improve the reconnection efficiency. After the disconnection and reconnection operations are completed, the first and second headsets synchronize information, switching the Bluetooth connection target of the third electronic device from the second headset to the first headset. This makes it easier to manage all established Bluetooth connections and ensures data transmission efficiency.

[0117] In some embodiments, after the first electronic device enters the pairing state according to the first pairing instruction, the above method may further include: if a first connection request sent by a third electronic device and a second connection request sent by a fourth electronic device are received within the first time period, establishing a Bluetooth connection with the third electronic device according to the first connection request, and establishing a Bluetooth connection with the fourth electronic device according to the second connection request.

[0118] It can be understood that the first connection request and the second connection request may be Bluetooth connection requests.

[0119] The first electronic device may be a device that supports the "one-to-many" function of Bluetooth. After the first electronic device enters the pairing state, if it receives a first connection request sent by a third electronic device and a second connection request sent by a fourth electronic device within a first time period, it may indicate that the first electronic device needs to simultaneously or in conjunction with the third electronic device and the fourth electronic device to establish a Bluetooth connection. The first time period may be set according to actual needs, for example, the first time period may be 1 second, 2 seconds, etc.

[0120] In the case where a first electronic device is connected to M second electronic devices via Bluetooth, if a first connection request sent by a third electronic device and a second connection request sent by a fourth electronic device are received within a first time period, Bluetooth connections can be established with the third electronic device and the fourth electronic device, respectively. Wherein, M can be an integer greater than or equal to 0 and less than or equal to N-2. The establishment of Bluetooth connections between the first electronic device and the M second electronic devices may include the case where the first electronic device does not establish a Bluetooth connection with any second electronic device (i.e., M=0), or the case where the number of second electronic devices that establish a Bluetooth connection with the first electronic device is less than or equal to N-2, for example, N is 3, and the first electronic device only establishes a Bluetooth connection with one second electronic device.

[0121] When the first electronic device establishes Bluetooth connections with M second electronic devices, the first electronic device can also establish Bluetooth connections with NM electronic devices, where NM is greater than or equal to 2. Therefore, the first electronic device can establish Bluetooth connections with the third electronic device and the fourth electronic device respectively.

[0122] In some embodiments, when the number of second electronic devices that establish Bluetooth connections with the first electronic device reaches N-1, if a first connection request sent by a third electronic device and a second connection request sent by a fourth electronic device are received within a first time period, the target electronic device in the second electronic device may be disconnected first, and then Bluetooth connections may be established with the third electronic device and the fourth electronic device respectively. As another embodiment, a Bluetooth connection may be established with an electronic device that first receives the Bluetooth connection request (such as the third electronic device), and then the target electronic device in the second electronic device is disconnected, and a Bluetooth connection is established with another electronic device (such as the fourth electronic device). The specific disconnection processing method and Bluetooth connection process can be referred to the relevant descriptions in the above embodiments and the Bluetooth standard protocol, which will not be repeated here.

[0123] In some embodiments, the first electronic device may include a headset device, which may include a first headset and a second headset. The steps of establishing a Bluetooth connection with a third electronic device based on the first connection request and establishing a Bluetooth connection with a fourth electronic device based on the second connection request include: processing the first connection request through the first headset and establishing a Bluetooth connection with the third electronic device, and processing the second connection request through the second headset and establishing a Bluetooth connection with the fourth electronic device.

[0124] If the headphone device receives a first connection request sent by a third electronic device and a second connection request sent by a fourth electronic device within a first time period, it indicates that the headphone device needs to establish Bluetooth connections with the third electronic device and the fourth electronic device simultaneously or continuously. It is very likely that the headphone device will receive another Bluetooth connection request before completing one Bluetooth connection request. Therefore, a Bluetooth connection can be established with the third electronic device through the first headphone, and a Bluetooth connection can be established with the fourth electronic device through the second headphone in parallel. The first headphone and the second headphone can perform connection operations in parallel to establish Bluetooth connections with the third electronic device and the fourth electronic device respectively. The serial connection establishment process is changed to a parallel connection establishment process to reduce the connection waiting time.

[0125] Optionally, the first time period can be set according to actual needs. For example, the first time period can be 1 second, 2 seconds, etc. The first time period can also be set according to the speed at which the headset device establishes a Bluetooth connection. The faster the headset device establishes a Bluetooth connection, the shorter the first time period can be; the slower the headset device establishes a Bluetooth connection, the longer the first time period can be. Furthermore, the first time period can be the duration of time it takes for the headset device to normally establish a Bluetooth connection with other electronic devices.

[0126] In some embodiments, when the headphone device is in pairing state, the inquiry scan mode and the pagescan mode are turned on, and it can be scanned by other electronic devices. In the case that neither the third electronic device nor the fourth electronic device stores the connection information corresponding to the headphone device, the third electronic device and the fourth electronic device can send a scan request to the headphone device, and the headphone device can send a scan response to the third electronic device and the fourth electronic device respectively according to the scan request. Optionally, the scan response can be sent to the third electronic device and the fourth electronic device respectively through the first headphone, or the scan response can be sent to the third electronic device and the fourth electronic device respectively through the second headphone, or the scan response can be sent to the third electronic device through the first headphone, and the scan response can be sent to the fourth electronic device through the second headphone.

[0127] After receiving the scan response, the third electronic device can send a first connection request to the headphone device, and the first headphone can establish a Bluetooth connection with the third electronic device based on the first connection request. Similarly, the fourth electronic device can also send a second connection request to the headphone device, and the second headphone can establish a Bluetooth connection with the fourth electronic device based on the second connection request.

[0128] In some embodiments, a Bluetooth connection can be established between a first headset and a second headset. After the first headset establishes a Bluetooth connection with a third electronic device, connection information of the third electronic device can be synchronized with the second headset via the first headset. After the second headset establishes a Bluetooth connection with a fourth electronic device, connection information of the fourth electronic device can be synchronized with the first headset via the second headset. This achieves information synchronization between the first headset and the second headset.

[0129] In some embodiments, the first earphone may be a master earphone in the headphone device, and the second earphone may be a slave earphone in the headphone device. After the second earphone synchronizes the connection information of the fourth electronic device to the first earphone, the Bluetooth connection target of the fourth electronic device may be switched from the second earphone to the first earphone, and the second earphone monitors the Bluetooth connection between the first earphone and the fourth electronic device; or after the second earphone synchronizes the connection information of the fourth electronic device to the first earphone, the Bluetooth connection target of the fourth electronic device may be switched from the second earphone to the first earphone, and the first earphone synchronizes data transmitted between the fourth electronic device and the second earphone.

[0130] After obtaining the synchronized connection information from the second headset, the first headset can directly transmit data to the fourth electronic device based on this connection information. The physical link between the second headset and the fourth electronic device is then switched to the physical link between the first headset and the fourth electronic device, and the Bluetooth connection of the fourth electronic device is switched from the second headset to the first headset. The second headset can monitor the Bluetooth physical link between the first headset and the fourth electronic device, or the first headset can forward data transmitted between the first headset and the fourth electronic device to the second headset, thus achieving master-slave synchronization.

[0131] After the first headset establishes a Bluetooth connection with a third electronic device, the first headset can also synchronize the connection information of the third electronic device to the second headset. The second headset can monitor the Bluetooth connection established between the first headset and the third electronic device based on the connection information. By synchronizing information between the headsets, all electronic devices that establish a Bluetooth connection with the headset device can use the first headset (i.e., the master headset) to connect, and the second headset (i.e., the slave headset) to monitor or receive data forwarded by the first headset, making it more convenient to manage the connected electronic devices and transmit data.

[0132] For example, Figure 7A FIG. 1 is an interactive sequence diagram of connecting a headphone device to two electronic devices in one embodiment. Figure 7AAs shown, the headset device may be a device that supports Bluetooth "one-to-two" pairing. The headset device enters the pairing state when it is not connected to any electronic device. Neither electronic device E nor electronic device F stores connection information corresponding to the headset device. In the pairing state, the headset device is in both inquiry scan and page scan modes. Electronic devices E and F can scan the headset device and send Bluetooth connection requests to the headset device. The headset device receives Bluetooth connection requests from electronic devices E and F within a first time period. The first headset can process the Bluetooth connection requests sent by electronic device E and establish a Bluetooth connection with electronic device E, pairing with electronic device E during the Bluetooth connection process. The second headset can process the Bluetooth connection requests sent by electronic device F and establish a Bluetooth connection with electronic device F, pairing with electronic device F during the Bluetooth connection process. After the first headset successfully establishes a Bluetooth connection with electronic device E, it can synchronize the connection information of electronic device E with the second headset. After the second headset successfully establishes a Bluetooth connection with electronic device F, it can synchronize the connection information of electronic device F with the second headset, achieving information synchronization and switching the Bluetooth connection target of electronic device F from the second headset to the first headset.

[0133] For example, Figure 7B FIG. 1 is an interactive sequence diagram of connecting a headphone device to two electronic devices in another embodiment. Figure 7B As shown, the earphone device can be a device that supports Bluetooth "one to three", and the earphone device establishes a Bluetooth connection with electronic device B. Electronic device B can send a first pairing instruction to the earphone device, and the earphone device can enter the pairing state according to the first pairing instruction. The subsequent process of establishing Bluetooth connections between the earphone device and electronic device E and electronic device F can be the same as Figure 7A The description is the same as in , and will not be repeated here.

[0134] In some embodiments, if the headphone device first receives a first connection request sent by a third electronic device, the first headphone (the first headphone can be the main headphone) can process the first connection request. In response to the first connection request, the first headphone can send a first message to the second headphone. The first message can be used to notify the second headphone that the first headphone is processing the Bluetooth connection request. After the first headphone completes the processing of the first connection request and successfully establishes a Bluetooth connection with the third electronic device, it can send a second message to the second headphone. The second message is used to notify the second headphone that the first headphone has completed the processing of the Bluetooth connection request. If the second headphone receives the first message but has not yet received the second message, it means that the first headphone is still in the process of processing the first connection request of the third electronic device. If the second connection request sent by the fourth electronic device is received during this process, the second headphone can process the second connection request sent by the fourth electronic device and establish a Bluetooth connection with the fourth electronic device. The connection speed between the headphone device and the two electronic devices can be improved.

[0135] In an embodiment of the present application, a first earphone and a second earphone of the headphone device can respectively establish Bluetooth connections with a third electronic device and a fourth electronic device. The first earphone and the second earphone perform connection operations in parallel, eliminating the need to wait for the headphone device to complete the Bluetooth connection process with one electronic device before establishing a Bluetooth connection with the other electronic device. This can increase the speed at which the headphone device establishes Bluetooth connections with the two electronic devices and improve connection efficiency. Furthermore, the first earphone and the second earphone synchronize information, switching the Bluetooth connection target of the fourth electronic device from the second earphone to the first earphone. This makes it easier to manage all established Bluetooth connections and ensures data transmission efficiency.

[0136] It should be noted that the above-mentioned third electronic device and fourth electronic device, etc., can also be electronic devices that have been paired with the first electronic device (i.e., connection information is stored therein). In the absence of conflict, they can also establish a Bluetooth connection with the first electronic device using the method of establishing a Bluetooth connection described in the above-mentioned embodiments.

[0137] Optionally, the Bluetooth connection in the embodiment of the present application may include any one of a classic Bluetooth connection and a Bluetooth Low Energy (BLE) connection. In a BLE connection scenario, a first electronic device may send a BLE broadcast, and other electronic devices may scan for the BLE broadcast and establish a BLE Bluetooth connection with the first electronic device.

[0138] like Figure 8 As shown, in one embodiment, another Bluetooth-based control method is provided, which can be applied to the second electronic device mentioned above. The method may include:

[0139] In step 810, when a Bluetooth connection is established between the second electronic device and the first electronic device, a first pairing instruction is sent to the first electronic device. The first pairing instruction is used to instruct the first electronic device to enter a pairing state so that the other electronic device can scan the first electronic device. The other electronic device includes an electronic device that does not store connection information corresponding to the first electronic device.

[0140] In one embodiment, the step of sending a first pairing instruction to the first electronic device includes:

[0141] In response to a status-enabling operation on the first electronic device, sending a first pairing instruction to the first electronic device; or,

[0142] Sending a first pairing instruction to the first electronic device according to the set time information; or,

[0143] When it is detected that the first electronic device is in the set target scene, a first pairing instruction is sent to the first electronic device.

[0144] It should be noted that the description of the Bluetooth-based control method applied to the second electronic device provided in the embodiment of the present application can refer to the relevant description of the Bluetooth-based control method applied to the first electronic device described in the above embodiments, and will not be repeated here.

[0145] In an embodiment of the present application, the first electronic device is put into a pairing state by sending a first pairing instruction to the first electronic device by a second electronic device connected to the first electronic device. This will not affect the normal Bluetooth communication between the second electronic device and the first electronic device, but can also simplify the way of putting the electronic device into the pairing state, making the way of putting the electronic device into the pairing state more diverse.

[0146] like Figure 9 As shown, in one embodiment, a Bluetooth-based control device 900 is provided, which can be applied to the first electronic device mentioned above. The Bluetooth-based control device 900 may include an instruction receiving module 910 and a pairing module 920.

[0147] The instruction receiving module 910 is configured to receive a first pairing instruction sent by a second electronic device when a Bluetooth connection is established between the first electronic device and at least one second electronic device.

[0148] The pairing module 920 is configured to enter a pairing state according to the first pairing instruction so that other electronic devices can scan the first electronic device. The other electronic devices include electronic devices that do not store connection information corresponding to the first electronic device.

[0149] In one embodiment, the Bluetooth-based control device 900 includes not only the instruction receiving module 910 and the pairing module 920 , but also a connection module.

[0150] The connection module is used to receive a scan request sent by a third electronic device when the first electronic device is in a pairing state; send a scan response to the third electronic device according to the scan request; and receive a first connection request sent by the third electronic device, and establish a Bluetooth connection with the third electronic device according to the first connection request.

[0151] In an embodiment of the present application, the first electronic device is put into a pairing state by sending a first pairing instruction to the first electronic device by a second electronic device connected to the first electronic device. This will not affect the normal Bluetooth communication between the second electronic device and the first electronic device, but can also simplify the way of putting the electronic device into the pairing state, making the way of putting the electronic device into the pairing state more diverse.

[0152] In one embodiment, the pairing module 920 is further used to receive a second pairing instruction sent by the accessory device and enter a pairing state according to the second pairing instruction when the first electronic device has not established a Bluetooth connection with any second electronic device and the first electronic device is electrically connected to the accessory device, wherein the second pairing instruction is generated by the accessory device according to a detected pairing trigger operation.

[0153] In the embodiments of the present application, a variety of different ways of allowing electronic devices to enter the pairing state can be provided, which enriches the ways of allowing electronic devices to enter the pairing state, can meet the needs of users in different situations, and improve users' product stickiness.

[0154] In one embodiment, the connection module includes a receiving unit, a disconnecting unit, and a connecting unit.

[0155] The receiving unit is configured to receive a first connection request sent by a third electronic device when the first electronic device establishes Bluetooth connections with N second electronic devices.

[0156] The disconnection unit is configured to perform a disconnection process corresponding to a target electronic device among the N second electronic devices.

[0157] The connecting unit is configured to establish a Bluetooth connection with a third electronic device according to the first connection request.

[0158] The disconnection process is used to disconnect the Bluetooth connection between the first electronic device and the target electronic device; N is the maximum number of Bluetooth connections supported by the first electronic device, and N is an integer greater than or equal to 1.

[0159] In one embodiment, the disconnection unit is further configured to determine a target electronic device among the N second electronic devices, and perform a disconnection process corresponding to the target electronic device.

[0160] In one embodiment, N is an integer greater than or equal to 2; the disconnection unit is further configured to select, according to the priorities of the respective second electronic devices, a second electronic device whose priority satisfies the priority condition from the N second electronic devices as the target electronic device.

[0161] In one embodiment, a first electronic device includes a headset device, the headset device including a first headset and a second headset. A disconnection unit is configured to disconnect a target electronic device from N second electronic devices via the first headset; and a connection unit is configured to establish a Bluetooth connection with a third electronic device via the second headset in response to the first connection request.

[0162] In one embodiment, the Bluetooth-based control device 900 further includes a synchronization module configured to synchronize connection information of the third electronic device to the first headset via the second headset after the second headset establishes a Bluetooth connection with the third electronic device according to the first connection request.

[0163] In one embodiment, the synchronization module is further used to, after the second earphone synchronizes the connection information of the third electronic device to the first earphone, switch the Bluetooth connection object of the third electronic device from the second earphone to the first earphone, and monitor the Bluetooth connection between the first earphone and the third electronic device through the second earphone; or, after the second earphone synchronizes the connection information of the third electronic device to the first earphone, switch the Bluetooth connection object of the third electronic device from the second earphone to the first earphone, and synchronize the data transmitted between the third electronic device and the first earphone to the second earphone.

[0164] In an embodiment of the present application, when a third electronic device preempts the Bluetooth connection to the headset device, the disconnection and reconnection operations are performed simultaneously on the first and second headsets, respectively. This can increase the speed at which the third electronic device reconnects to the headset device and improve the reconnection efficiency. After the disconnection and reconnection operations are completed, the first and second headsets synchronize information, switching the Bluetooth connection target of the third electronic device from the second headset to the first headset. This makes it easier to manage all established Bluetooth connections and ensures data transmission efficiency.

[0165] In one embodiment, the connection module is further used to establish a Bluetooth connection with the third electronic device according to the first connection request, and to establish a Bluetooth connection with the fourth electronic device according to the second connection request, if a first connection request sent by a third electronic device and a second connection request sent by a fourth electronic device are received within a first time period.

[0166] In one embodiment, the first electronic device includes an earphone device, which includes a first earphone and a second earphone. The connection module is further configured to process a first connection request via the first earphone and establish a Bluetooth connection with a third electronic device, and process a second connection request via the second earphone and establish a Bluetooth connection with a fourth electronic device.

[0167] In one embodiment, the synchronization module is further used to synchronize the connection information corresponding to the third electronic device to the second earphone through the first earphone after the first earphone establishes a Bluetooth connection with the third electronic device; and to synchronize the connection information corresponding to the fourth electronic device to the first earphone through the second earphone after the second earphone establishes a Bluetooth connection with the fourth electronic device.

[0168] In one embodiment, the Bluetooth connection includes any one of a classic Bluetooth connection and a Bluetooth Low Energy (BLE) connection.

[0169] In an embodiment of the present application, a first earphone and a second earphone of the headphone device can respectively establish Bluetooth connections with a third electronic device and a fourth electronic device. The first earphone and the second earphone perform connection operations in parallel, eliminating the need to wait for the headphone device to complete the Bluetooth connection process with one electronic device before establishing a Bluetooth connection with the other electronic device. This can increase the speed at which the headphone device establishes Bluetooth connections with the two electronic devices and improve connection efficiency. Furthermore, the first earphone and the second earphone synchronize information, switching the Bluetooth connection target of the fourth electronic device from the second earphone to the first earphone. This makes it easier to manage all established Bluetooth connections and ensures data transmission efficiency.

[0170] like Figure 10 As shown, in one embodiment, a Bluetooth-based control device 1000 is provided, which can be applied to the above-mentioned second electronic device. The Bluetooth-based control device 1000 includes an instruction sending module 1010.

[0171] The instruction sending module 1010 is used to send a first pairing instruction to the first electronic device when a Bluetooth connection is established between the second electronic device and the first electronic device. The first pairing instruction is used to trigger the first electronic device to enter a pairing state so that other electronic devices can scan the first electronic device; wherein the other electronic devices include electronic devices that do not store connection information corresponding to the first electronic device.

[0172] The instruction sending module 1010 is also used to send a first pairing instruction to the first electronic device in response to a status power-on operation for the first electronic device; or, send a first pairing instruction to the first electronic device according to set time information; or, when it is detected that the first electronic device is in a set target scene, send a first pairing instruction to the first electronic device.

[0173] In an embodiment of the present application, the first electronic device is put into a pairing state by sending a first pairing instruction to the first electronic device by a second electronic device connected to the first electronic device. This will not affect the normal Bluetooth communication between the second electronic device and the first electronic device, but can also simplify the way of putting the electronic device into the pairing state, making the way of putting the electronic device into the pairing state more diverse.

[0174] Figure 11 FIG. 1 is a structural block diagram of an electronic device in one embodiment. Figure 11 As shown, the electronic device 1100 may include one or more of the following components: a processor 1110, and a memory 1120 coupled to the processor 1110, wherein the memory 1120 may store one or more computer programs, and the one or more computer programs may be configured to implement the Bluetooth-based control method applied to the first electronic device as described in the above embodiments when executed by one or more processors 1110.

[0175] The processor 1110 may include one or more processing cores. The processor 1110 utilizes various interfaces and circuits to connect various components within the electronic device 1100. It executes instructions, programs, code sets, or instruction sets stored in the memory 1120, and accesses data stored in the memory 1120 to perform various functions and process data within the electronic device 1100. Optionally, the processor 1110 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 1110 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor 1110 and may be implemented separately via a communications chip.

[0176] The memory 1120 may include a random access memory (RAM) or a read-only memory (ROM). The memory 1120 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the electronic device 1100 during use.

[0177] Electronic device 1100 may also include a Bluetooth module that can be used to provide Bluetooth communication functionality, establish Bluetooth connections with other electronic devices, and perform Bluetooth data transmission. The Bluetooth module may support one or more Bluetooth protocols, such as Classic Bluetooth, Bluetooth Low Energy, etc., but is not limited thereto and may change with the development of Bluetooth protocols.

[0178] In some embodiments, the processor 1110 is used to receive a first pairing instruction sent by a second electronic device through a Bluetooth module when the electronic device 1100 establishes a Bluetooth connection with at least one second electronic device, and control the Bluetooth module to enter a pairing state according to the first pairing instruction, so that other electronic devices can scan the electronic device 1100.

[0179] It is understandable that the electronic device 1100 may include more or fewer structural elements than those in the above structural block diagram, for example, a power module, physical buttons, sensors, etc., and this is not limited here.

[0180] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the Bluetooth-based control method applied to a first electronic device as described in the above embodiments is implemented.

[0181] An embodiment of the present application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program can be executed by a processor to implement the Bluetooth-based control method applied to a first electronic device as described in the above embodiments.

[0182] In one embodiment, an electronic device is also provided, which includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor implements the Bluetooth-based control method applied to the second electronic device as described in the above embodiments.

[0183] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the Bluetooth-based control method applied to a second electronic device as described in the above embodiments is implemented.

[0184] An embodiment of the present application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program can be executed by a processor, it can implement the Bluetooth-based control method applied to a second electronic device as described in the above embodiments.

[0185] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a ROM, or the like.

[0186] As used herein, any reference to memory, storage, database, or other medium may include nonvolatile and / or volatile memory. Suitable nonvolatile memory may include ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as external cache memory. By way of illustration and not limitation, RAM may be in various forms, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus DRAM (RDRAM), and direct Rambus DRAM (DRDRAM).

[0187] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required for this application. It should be noted that "multiple" in this application includes "two or more".

[0188] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0189] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Some or all of these units may be selected based on actual needs to achieve the objectives of this embodiment.

[0190] In addition, the functional units in the embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0191] The above is a detailed introduction to a Bluetooth-based control method, device, electronic device, and storage medium disclosed in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core concept of the present application. At the same time, for those skilled in the art, based on the concept of the present application, there may be changes in the specific implementation methods and application scope. In summary, the contents of this specification should not be understood as limiting the present application.

Claims

1. A control method based on Bluetooth, characterized in that: Applied to a first electronic device, the first electronic device includes a headphone device; the method includes: When the first electronic device establishes a Bluetooth connection with at least one second electronic device, receiving a first pairing instruction sent by the second electronic device; Entering a pairing state according to the first pairing instruction, so that another electronic device can scan the first electronic device, the other electronic device including an electronic device that does not store connection information corresponding to the first electronic device; in the pairing state, the first electronic device allows being scanned and searched by the other electronic device and can receive a Bluetooth connection request sent by the other electronic device; When the first electronic device has not established a Bluetooth connection with any second electronic device, if the first electronic device is electrically connected to an accessory device, it receives a second pairing instruction sent by the accessory device and enters a pairing state according to the second pairing instruction, wherein the second pairing instruction is generated by the accessory device according to a detected pairing trigger operation, and the accessory device includes a charging box for the earphones.

2. The method according to claim 1, characterized in that The method further comprises: When the first electronic device is in the pairing state, receiving a scanning request sent by a third electronic device; sending a scan response to the third electronic device according to the scan request; A first connection request sent by the third electronic device is received, and a Bluetooth connection is established with the third electronic device according to the first connection request.

3. The method according to claim 2, characterized in that The receiving a first connection request sent by the third electronic device, and establishing a Bluetooth connection with the third electronic device according to the first connection request, includes: When the first electronic device establishes Bluetooth connections with N second electronic devices, receiving a first connection request sent by the third electronic device; performing a disconnection process corresponding to a target electronic device among the N second electronic devices, and establishing a Bluetooth connection with the third electronic device according to the first connection request; The disconnection process is used to disconnect the Bluetooth connection between the first electronic device and the target electronic device; N is the maximum number of Bluetooth connections supported by the first electronic device, and N is an integer greater than or equal to 1.

4. The method according to claim 3, characterized in that The performing a disconnection process corresponding to a target electronic device among the N second electronic devices includes: A target electronic device among the N second electronic devices is determined, and a disconnection process corresponding to the target electronic device is performed.

5. The method according to claim 4, characterized in that N is an integer greater than or equal to 2; and determining a target electronic device among the N second electronic devices includes: According to the priorities of the respective second electronic devices, a second electronic device whose priority satisfies a priority condition is selected from the N second electronic devices as a target electronic device.

6. The method according to any one of claims 3 to 5, characterized in that: The headphone device includes a first headphone and a second headphone; performing a disconnection process corresponding to a target electronic device among the N second electronic devices, and establishing a Bluetooth connection with the third electronic device according to the first connection request, includes: The first headset performs a disconnection process corresponding to a target electronic device among the N second electronic devices, and the second headset establishes a Bluetooth connection with the third electronic device according to the first connection request.

7. The method according to claim 6, characterized in that After establishing a Bluetooth connection with the third electronic device through the second headset according to the first connection request, the method further includes: The connection information of the third electronic device is synchronized to the first headset through the second headset.

8. The method according to claim 7, characterized in that After the second earphone synchronizes the connection information of the third electronic device to the first earphone, the Bluetooth connection target of the third electronic device is switched from the second earphone to the first earphone, and the second earphone monitors the Bluetooth connection between the first earphone and the third electronic device; or The Bluetooth connection object of the third electronic device is switched from the second earphone to the first earphone, and the first earphone synchronizes the data transmitted between the first earphone and the third electronic device to the second earphone.

9. The method according to claim 2, characterized in that The maximum number N of Bluetooth connections supported by the first electronic device is an integer greater than or equal to 2; and the receiving a first connection request sent by the third electronic device and establishing a Bluetooth connection with the third electronic device according to the first connection request includes: If a first connection request sent by the third electronic device and a second connection request sent by the fourth electronic device are received within the first time period, a Bluetooth connection is established with the third electronic device according to the first connection request, and a Bluetooth connection is established with the fourth electronic device according to the second connection request.

10. The method according to claim 9, characterized in that The headphone device includes a first headphone and a second headphone; establishing a Bluetooth connection with the third electronic device according to the first connection request, and establishing a Bluetooth connection with the fourth electronic device according to the second connection request, includes: The first connection request is processed by the first headset, and a Bluetooth connection is established with the third electronic device; and the second connection request is processed by the second headset, and a Bluetooth connection is established with the fourth electronic device.

11. The method according to claim 10, characterized in that After the first headset processes the first connection request and establishes a Bluetooth connection with the third electronic device, the method further includes: synchronizing connection information corresponding to the third electronic device to the second headset via the first headset; After the second headset processes the second connection request and establishes a Bluetooth connection with the fourth electronic device, the method further includes: synchronizing connection information corresponding to the fourth electronic device to the first headset via the second headset.

12. The method according to any one of claims 2 to 5, 9 to 11, characterized in that: The Bluetooth connection includes any one of a classic Bluetooth connection and a Bluetooth low energy BLE connection.

13. A control method based on Bluetooth, characterized in that: Applied to a second electronic device, the method includes: When a Bluetooth connection is established between the second electronic device and the first electronic device, sending a first pairing instruction to the first electronic device, wherein the first pairing instruction is used to instruct the first electronic device to enter a pairing state so that another electronic device can scan the first electronic device; wherein the other electronic device includes an electronic device that does not store connection information corresponding to the first electronic device; In which, the first electronic device includes a headphone device; in the pairing state, the first electronic device allows being scanned and searched by other electronic devices, and can receive Bluetooth connection requests sent by other electronic devices; when the first electronic device has not established a Bluetooth connection with any second electronic device, if the first electronic device is electrically connected to an accessory device, the first electronic device is used to enter the pairing state according to a second pairing instruction sent by the accessory device; the second pairing instruction is generated by the accessory device according to a detected pairing trigger operation, and the accessory device includes a charging box for the headphones.

14. The method according to claim 13, characterized in that The sending a first pairing instruction to the first electronic device includes: In response to a status opening operation on the first electronic device, sending a first pairing instruction to the first electronic device; or, Sending a first pairing instruction to the first electronic device according to the set time information; or, When it is detected that the first electronic device is in a set target scene, a first pairing instruction is sent to the first electronic device.

15. A Bluetooth-based control device, characterized in that: Applied to a first electronic device, the first electronic device includes a headphone device; the apparatus includes: an instruction receiving module, configured to receive a first pairing instruction sent by at least one second electronic device when the first electronic device establishes a Bluetooth connection with the second electronic device; a pairing module, configured to enter a pairing state according to the first pairing instruction, so that another electronic device can scan the first electronic device, wherein the other electronic device includes an electronic device that does not store connection information corresponding to the first electronic device; in the pairing state, the first electronic device allows being scanned and searched by the other electronic device and can receive a Bluetooth connection request sent by the other electronic device; The pairing module is further configured to receive a second pairing instruction sent by the accessory device and enter a pairing state according to the second pairing instruction if the first electronic device is electrically connected to an accessory device when the first electronic device has not established a Bluetooth connection with any second electronic device, wherein the second pairing instruction is generated by the accessory device according to a detected pairing trigger operation, and the accessory device includes a charging box for the earphones.

16. A Bluetooth-based control device, characterized in that: Applied to a second electronic device, the device includes: an instruction sending module, configured to send a first pairing instruction to the first electronic device when a Bluetooth connection is established between the second electronic device and the first electronic device, wherein the first pairing instruction is configured to trigger the first electronic device to enter a pairing state so that another electronic device can scan the first electronic device; wherein the other electronic device includes an electronic device that does not store connection information corresponding to the first electronic device; In which, the first electronic device includes a headphone device; in the pairing state, the first electronic device allows being scanned and searched by other electronic devices, and can receive Bluetooth connection requests sent by other electronic devices; when the first electronic device has not established a Bluetooth connection with any second electronic device, if the first electronic device is electrically connected to an accessory device, the first electronic device is used to enter the pairing state according to a second pairing instruction sent by the accessory device; the second pairing instruction is generated by the accessory device according to a detected pairing trigger operation, and the accessory device includes a charging box for the headphones.

17. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method according to any one of claims 1 to 12 or 13 to 14.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 12 or 13 to 14 is implemented.

Citation Information

Patent Citations

  • Bluetooth connection method, device and system

    CN110191442A

  • Bluetooth pairing method and device, electronic equipment and computer readable storage medium

    CN112654030A