Bluetooth connection method, device, headphone device and computer-readable storage medium

The Bluetooth connection request is processed in parallel by the first and second headphones of the headphone device, which solves the problem of slow connection speed in the prior art and achieves more efficient connection efficiency.

CN115776662BActive Publication Date: 2025-08-15GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When the electronic device has established a Bluetooth connection with another device, if a connection preemption request occurs, the speed of connection is slow in the prior art, which affects the efficiency of connection.

Method used

The headphone device disconnects the Bluetooth connection from the target terminal device through the first headphone, and processes the connection request through the second headphone to realize parallel disconnection and establishment of the connection.

Benefits of technology

The speed of connecting the second terminal device and the headphone device has been improved, and the efficiency of connecting the connection has been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115776662B_ABST
    Figure CN115776662B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a Bluetooth connection method, apparatus, headphone device and computer-readable storage medium. The method is applied to a headphone device, the headphone device includes a first headphone and a second headphone, and the method includes: when the headphone device establishes Bluetooth connections with N first terminal devices respectively, if a Bluetooth connection request sent by the second terminal device is received, the first headphone is disconnected, and the second headphone is used to process the Bluetooth connection request, so that the headphone device establishes a Bluetooth connection with the second terminal device; wherein N is the maximum number of Bluetooth connections supported by the headphone device, and N is an integer greater than or equal to 1. The above-mentioned Bluetooth connection method, apparatus, headphone device and computer-readable storage medium can increase the speed of the second terminal device in rushing to connect to the headphone device and improve the efficiency of rushing to connect.
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 connection method, device, headphone device, and computer-readable 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. Currently, if electronic device A has already established a Bluetooth communication connection with electronic device B, and another electronic device C preempts the Bluetooth connection between electronic device B and electronic device A, the preemption speed will be slow, affecting the preemption efficiency. Summary of the Invention

[0003] The embodiments of the present application disclose a Bluetooth connection method, apparatus, headphone device, and computer-readable storage medium, which can increase the speed at which a second terminal device connects to a headphone device and improve the connection efficiency.

[0004] The present application discloses a Bluetooth connection method, which is applied to a headphone device, wherein the headphone device includes a first headphone and a second headphone. The method includes:

[0005] When the headset device establishes Bluetooth connections with N first terminal devices respectively, if a Bluetooth connection request sent by a second terminal device is received, disconnection processing is performed by the first headset, and the Bluetooth connection request is processed by the second headset, so that the headset device establishes a Bluetooth connection with the second terminal device;

[0006] Among them, the disconnection processing is used to disconnect the Bluetooth connection between the headphone device and the target terminal device among the N first terminal devices; N is the maximum number of Bluetooth connections supported by the headphone device, and N is an integer greater than or equal to 1.

[0007] The present application discloses a Bluetooth connection device, which is applied to a headphone device. The headphone device includes a first headphone and a second headphone. The device includes:

[0008] a connection module, configured to, when the headset device establishes Bluetooth connections with each of the N first terminal devices, disconnect the headset device via the first headset upon receiving a Bluetooth connection request from a second terminal device, and process the Bluetooth connection request via the second headset, so that the headset device establishes a Bluetooth connection with the second terminal device;

[0009] Among them, the disconnection processing is used to disconnect the Bluetooth connection between the headphone device and the target terminal device among the N first terminal devices; N is the maximum number of Bluetooth connections supported by the headphone device, and N is a positive integer greater than or equal to 1.

[0010] An embodiment of the present application discloses a headphone device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor implements the method described above.

[0011] 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 described above is implemented.

[0012] The Bluetooth connection method, device, headphone device and computer-readable storage medium disclosed in the embodiments of the present application, when the headphone device establishes Bluetooth connections with N first terminal devices respectively, if a Bluetooth connection request sent by the second terminal device is received, the first headphone is used to perform a disconnection process, and the second headphone is used to process the Bluetooth connection request, so that the headphone device and the second terminal device establish a Bluetooth connection. The disconnection process is used to disconnect the Bluetooth connection between the headphone device and the target terminal device among the N first terminal devices, where N is the maximum number of Bluetooth connections supported by the headphone device. When the second terminal device preempts the Bluetooth connection of the headphone device, the first headphone and the second headphone are used to perform a disconnection and a connection in parallel, respectively, which can increase the speed at which the second terminal device preempts the connection to the headphone device and improve the preemption efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] 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.

[0014] Figure 1 This is an application scenario diagram of a Bluetooth connection method in one embodiment;

[0015] Figure 2 is a flowchart of a Bluetooth connection method in one embodiment;

[0016] Figure 3 is a flowchart of a Bluetooth connection method in another embodiment;

[0017] Figure 4 This is a schematic diagram of an interface of a first terminal device in an embodiment;

[0018] Figure 5Ais an interaction sequence diagram of a Bluetooth connection method in one embodiment;

[0019] Figure 5B is an interaction sequence diagram of a Bluetooth connection method in another embodiment;

[0020] Figure 6 This is a flowchart of an embodiment in which a first headset and a second headset establish Bluetooth connections with two terminal devices in parallel;

[0021] Figure 7A This is an interaction sequence diagram of a headset device connected to two terminal devices in one embodiment;

[0022] Figure 7B This is an interaction sequence diagram of another embodiment in which a headphone device is connected to two terminal devices respectively;

[0023] Figure 7C This is an interaction sequence diagram of a headset device connected to two terminal devices respectively in another embodiment;

[0024] Figure 8 is a block diagram of a Bluetooth connection device in one embodiment;

[0025] Figure 9 FIG. 4 is a structural block diagram of an earphone device in one embodiment. DETAILED DESCRIPTION

[0026] 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.

[0027] 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.

[0028] 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.

[0029] Figure 1 FIG. 1 is an application scenario diagram of a Bluetooth connection method in an embodiment. Figure 1 As shown, the headphone device 10 can establish a Bluetooth communication connection with one or more first terminal devices 20. The headphone device 10 may include but is not limited to headphones, in-ear headphones, earbud headphones, and earphones. Furthermore, the headphone device 10 may be a wireless Bluetooth headset, such as a True Wireless Stereo (TWS) Bluetooth headset. The first terminal device 20 may include but is not limited to wearable devices (such as bracelets, smart watches, smart glasses, etc.), car terminals, mobile phones, tablet computers, laptops, etc.

[0030] When the number of first terminal devices 20 maintaining Bluetooth connections with the headphone device 10 reaches the maximum number N of Bluetooth connections that the headphone device 10 can support, if the headphone device 10 receives a Bluetooth connection request sent by a second terminal device 30, the headphone device 10 is in a connection grabbing scenario, and the second terminal device 30 needs to grab a Bluetooth connection between the first terminal device 20 and the headphone device 10. The second terminal device 30 may include but is not limited to a wearable device, an in-vehicle terminal, a mobile phone, a tablet computer, a laptop computer, etc.

[0031] In related technologies, when the headphone device 10 is in a connection-grabbing scenario, the headphone device 10 needs to first disconnect the Bluetooth connection with a first terminal device 20 before it can respond to the Bluetooth connection request sent by the second terminal device 30, resulting in a slow speed for the second terminal device 30 to grab the connection with the headphone device 10, affecting the connection-grabbing efficiency.

[0032] The embodiments of the present application provide a Bluetooth connection method, apparatus, headphone device, and computer-readable storage medium, which can increase the connection speed of the second terminal device 30 to the headphone device 10 and improve the connection efficiency.

[0033] The earphone device 10 may include a first earphone 110 and a second earphone 120. Taking the earphone device 10 as a TWS earphone as an example, in some embodiments, the first earphone 110 and the second earphone 120 can distinguish between master and slave earphones. In the related art, taking the earphone device 10 being connected to a terminal device as an example, the master earphone of the first earphone 110 and the second earphone 120 establishes a Bluetooth connection with the terminal device, and the slave earphone establishes a Bluetooth connection with the master earphone. The slave earphone can obtain the connection information between the master earphone and the terminal device through the Bluetooth connection with the master earphone, so that the communication between the master earphone and the terminal device can be monitored in a monitoring manner, and the synchronization of the master and slave earphones can be achieved. As an implementation method, the master earphone can also establish a Bluetooth connection with the terminal device, and the master earphone can establish a Bluetooth connection with the slave earphone. After receiving the data sent by the terminal device, the master earphone forwards it to the slave earphone, and the synchronization of the master and slave earphones can be achieved. In the absence of conflict, the above-mentioned several Bluetooth connection methods can all be applied to the scheme of the Bluetooth connection method provided in the embodiment of the present application.

[0034] In an embodiment of the present application, when the headphone device 10 establishes Bluetooth connections with N first terminal devices 20 respectively, if a Bluetooth connection request sent by the second terminal device 30 is received, that is, the headphone device 10 is in a connection-grabbing scenario, a disconnection process can be performed through the first headphone 110, and the Bluetooth connection request can be processed by the second headphone 120 to establish a Bluetooth connection with the second terminal device 30. The disconnection process is used to disconnect the Bluetooth connection between the headphone device 10 and the target terminal device among the N first terminal devices 20. The first headphone 110 and the second headphone 120 perform the disconnection and connection establishment in parallel. The headphone device 10 does not need to wait for the Bluetooth connection with the target terminal device to be disconnected before responding to the connection request sent by the second terminal device 30. This can increase the speed of the second terminal device 30 in grabbing the connection with the headphone device 10 and improve the connection-grabbing efficiency.

[0035] It should be noted that Figure 1 Only the scenario in which the headphone device 10 can support establishing Bluetooth connections with two terminal devices is shown, that is, the headphone device 10 supports the "one-to-two" scenario, and the embodiment of the present application can also be applied to different scenarios in which the headphone device 10 supports "one-to-one", "one-to-three", "one-to-four"... etc. The maximum number of Bluetooth connections specifically supported by the headphone device is not limited in the embodiment of the present application.

[0036] like Figure 2 As shown, in one embodiment, a Bluetooth connection method is provided, which can be applied to the above-mentioned headphone device, and the headphone device can include a first headphone and a second headphone. The method can include the following steps:

[0037] Step 210: When the headset device establishes Bluetooth connections with N first terminal devices respectively, a Bluetooth connection request sent by the second terminal device is received.

[0038] In an embodiment of the present application, N can be the maximum number of Bluetooth connections supported by the headphone device, that is, the maximum number of terminal devices to which the headphone device can maintain Bluetooth connections at the same time. N can be an integer greater than or equal to 1, for example, N can be 1, 2, 3, 5, etc., which is not limited here.

[0039] It can be understood that the headset device establishes Bluetooth connections with the N first terminal devices respectively, which may mean that the headset device maintains Bluetooth connections with the N first terminal devices.

[0040] It can be understood that when the headphone device establishes Bluetooth connections with N first terminal devices respectively, it may include: when the headphone device establishes Bluetooth connections with N first terminal devices respectively, and the headphone device is in a connectable state. Among them, the headphone device being in a connectable state may refer to the headphone device being in page scan mode, and in page scan mode, it can receive Bluetooth connection requests sent by other terminal devices. Furthermore, the Bluetooth connection request may be a paging (page) data packet, and other terminal devices may use frequency hopping to send paging data packets to page the headphone device. The headphone device may scan (scan) the paging data packets sent externally at fixed intervals. If the headphone device scans the paging data packets sent by other terminal devices, it can be considered that the Bluetooth connection request has been received. For the specific process of Bluetooth connection, please refer to the provisions of the Bluetooth standard protocol.

[0041] In some embodiments, the second terminal device may be a terminal device that has not been paired with the headphone device. When the headphone device is in a pairing state, the pairing state may refer to the headphone device turning on the inquiry scan mode and the page scan mode. In the inquiry scan mode, the headphone device allows being scanned and searched by other terminal devices, and in the page scan mode, the headphone device allows being connected by other devices. That is, in the pairing state, the headphone device is in a discoverable state and a connectable state at the same time. The second terminal device can scan the headphone device and send a Bluetooth connection request to the headphone device to request a Bluetooth connection with the headphone device. It is understandable that if the second terminal device has not been paired with the headphone device, then a pairing operation will be performed during the process of establishing a Bluetooth connection.

[0042] In some embodiments, the second terminal device may also be a terminal device that has been previously paired with the headphone device. The second terminal device may send a Bluetooth connection request to the headphone device based on the stored device information corresponding to the headphone device to request to establish a Bluetooth connection with the headphone device. Since the pairing information such as the pairing key has been stored in the previous pairing, there is no need to pair again.

[0043] When the headset device establishes Bluetooth connections with N first terminal devices, the maximum number of Bluetooth connections that the headset device can support has been reached. If the headset device receives a Bluetooth connection request from a second terminal device, it needs to disconnect the Bluetooth connection with one of the first terminal devices before it can successfully establish a Bluetooth connection with the second terminal device. This is equivalent to the second terminal device preempting the Bluetooth connection between the first terminal device and the headset device. That is, when the headset device establishes Bluetooth connections with N first terminal devices, if the headset device receives a Bluetooth connection request from a second terminal device, the headset device is in a connection preemption scenario.

[0044] Step 220: Perform a disconnection process through the first headset, where the disconnection process is used to disconnect the Bluetooth connection between the headset device and a target terminal device among the N first terminal devices.

[0045] Step 230: Process the Bluetooth connection request through the second headset, so that the headset device establishes a Bluetooth connection with the second terminal device.

[0046] When the headphone device is in a connection-grabbing scenario, it is necessary to disconnect the Bluetooth connection with a first terminal device. In an embodiment of the present application, the disconnection process can be performed through the first headphone of the headphone device, and the Bluetooth connection request can be processed through the second headphone of the headphone device. The first headphone and the second headphone can perform disconnection and connection operations in parallel.

[0047] The first headset may determine a target terminal device from the N first terminal devices, and send a disconnection instruction to the target terminal device, where the disconnection instruction is used to disconnect the Bluetooth connection with the target terminal device.

[0048] In some embodiments, if N is 1, that is, the headset device establishes a Bluetooth connection with only one first terminal device, then the first terminal device is the target terminal device. If N is an integer greater than or equal to 2, that is, the headset device establishes a Bluetooth connection with multiple first terminal devices, then the first headset can select one of the multiple first terminal devices as the target terminal device.

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

[0050] The first headset can obtain the device identification of the target terminal device, which may include but is not limited to the MAC (Media Access Control) address of the target terminal device, and send a disconnect instruction to the target terminal device according to the device identification to disconnect the Bluetooth connection between the headset device and the target terminal device.

[0051] When the first earphone is disconnected, the second earphone can process the Bluetooth connection request sent by the second terminal device in parallel, and can respond to the Bluetooth connection request to establish a Bluetooth connection between the earphone device and the second terminal device, thereby reducing the time of switching devices.

[0052] In some embodiments, the headphone device may include a master headphone and a slave headphone. When the headphone device establishes a Bluetooth connection with N first terminal devices, the master headphone establishes a Bluetooth physical link with the N first terminal devices and can directly transmit data with the N first terminal devices. The slave headphone can monitor the Bluetooth physical link between the master headphone and the N first terminal devices, or the master headphone can synchronize data sent by the first terminal device to the slave headphone. The slave headphone does not directly connect to the N first terminal devices. The Bluetooth physical link may include, but is not limited to, physical links such as ACL (Asynchronous Connectionless).

[0053] Optionally, the above-mentioned first earphone can be 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 first terminal 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 first terminal device, the first earphone sends the data to the second earphone through the Bluetooth connection with the second earphone, thereby realizing master-slave synchronization. As another embodiment, the first earphone can synchronize the connection information of each first terminal 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 first terminal devices according to the connection information, thereby realizing master-slave synchronization.

[0054] When the earphone device is in a connection-grabbing scenario, the first earphone can directly disconnect the Bluetooth connection with the target terminal device and send a disconnection instruction to the target terminal device. The second earphone can establish a Bluetooth connection with the second terminal device based on the Bluetooth connection request sent by the second terminal device, and after successfully establishing the Bluetooth connection with the second terminal device, synchronize the connection information of the second terminal device to the first earphone, thereby switching the Bluetooth connection object of the second terminal device to the first earphone, that is, switching the Bluetooth connection between the second earphone and the second terminal device to the Bluetooth connection between the first earphone and the second terminal device.

[0055] Optionally, the first earphone can 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 terminal device and send a disconnect request to the target terminal device over the transmission channel between the second earphone and the target terminal device. The disconnect request can be used to trigger the disconnection of the Bluetooth connection between the target terminal device and the second earphone. The second earphone can process the Bluetooth request sent by the second terminal device and establish a Bluetooth connection with the second terminal device.

[0056] In some embodiments, establishing the Bluetooth connection mentioned above may include establishing a Bluetooth physical link, such as an ACL physical link.

[0057] In an embodiment of the present application, when the headphone device is in a connection grabbing scenario, the first headphone and the second headphone of the headphone device can perform the disconnection operation of the target terminal device and the Bluetooth connection operation with the second terminal device in parallel. The headphone device does not need to wait for the disconnection process to be completed before responding to the connection request sent by the second terminal device, which can increase the connection grabbing speed of the second terminal device to the headphone device and improve the connection grabbing efficiency.

[0058] like Figure 3 As shown, in another embodiment, a Bluetooth connection method is provided, which can be applied to the above-mentioned headphone device. The method may include the following steps:

[0059] Step 302: When the headset device establishes Bluetooth connections with N first terminal devices respectively, a Bluetooth connection request sent by a second terminal device is received.

[0060] The description of step 302 can refer to the relevant descriptions in the above embodiments, and will not be repeated here.

[0061] In some embodiments, the second terminal device may be a device that has not been paired with the headset device. When the headset device establishes Bluetooth connections with N first terminal devices, if the headset device enters the pairing state, in related technologies, the headset device will directly disconnect from at least some of the first terminal devices. Even if no second terminal device requests to connect to the headset device, the headset device and at least some of the first terminal devices remain disconnected, requiring the user to manually restore the Bluetooth connection.

[0062] In an embodiment of the present application, when the headphone device establishes Bluetooth connections with N first terminal devices respectively, the headphone device can enter the pairing state according to the pairing instruction and maintain the Bluetooth connection with the N first terminal devices. The headphone device is in the pairing state, and the inquiry scan mode and the page scan mode are turned on in the pairing state. The headphone device can be scanned by the second terminal device and the headphone device can receive the Bluetooth connection request sent by the second terminal device. The second terminal device can turn on the scanning mode and scan the surrounding Bluetooth devices. The second terminal device can send a scanning request (inquiry request) to the headphone device. The headphone device can receive the scanning request sent by the second terminal device through the first headset and / or the second headset, and send a scanning response (inquiry respond) to the second terminal device according to the scanning request.

[0063] Optionally, after the second terminal device receives the scan response, it can obtain the device information of the headphone device, such as the device name, MAC address, etc. of the headphone device, and display the device information. The user of the second terminal device can perform a selection operation on the device information to trigger the second terminal device to connect to the headphone device. After the second terminal device receives the selection operation, it can send a Bluetooth connection request to the headphone device based on the device information of the headphone device. After the headphone device receives the Bluetooth connection request, it disconnects the headphone through the first headphone and processes the Bluetooth connection request through the second headphone. The headphone device does not need to disconnect the Bluetooth connection between the headphone device and at least part of the first terminal device after entering the pairing state. This can avoid the situation where there is no second terminal device requesting to establish a Bluetooth connection with the headphone device, resulting in the user having to manually restore the Bluetooth connection, which is more in line with user needs.

[0064] In some embodiments, the headphone device enters the pairing state according to the pairing instruction, including but not limited to any of the following methods:

[0065] Method 1: Receive a pairing command from the headphone charging box and enter the pairing state according to the pairing command. The headphone device can be a wireless Bluetooth headphone and can be equipped with a headphone charging box that matches the headphone device and can be used to charge the headphone device. When the headphone device needs to enter the pairing state, the user can place the first and second headphones in the headphone device into the headphone charging box. The headphone charging box can send a pairing command to the first and / or second headphones placed in the headphone charging box based on the detected pairing operation.

[0066] Optionally, the earphone charging box may be provided with a pairing button, and the pairing operation may be a pressing operation on the pairing button. The pairing operation may also be an opening operation of the earphone charging box. When the first earphone and the second earphone are placed in the earphone charging box, if the opening operation is detected, the earphone charging box sends a pairing instruction to the first earphone and / or the second earphone placed in the earphone charging box.

[0067] Method 2: Receive a pairing instruction from any first terminal device and enter the pairing state according to the pairing instruction. The user can control any first terminal device that has established a Bluetooth connection with the headset device to put the headset device into the pairing state. The first terminal device can respond to the user-triggered operation to start the pairing state and send a pairing instruction to the headset device via the Bluetooth connection.

[0068] In one embodiment, the operation of activating the pairing state may include triggering a pairing option displayed on the first terminal device. The first terminal device may display a management interface for the headphone device, which may include a pairing control. If the first terminal device detects a triggering operation for the pairing control, it may send a pairing instruction to the headphone device via a Bluetooth connection to control the headphone device to enter the pairing state.

[0069] For example, Figure 4 FIG. 1 is a schematic diagram of an interface of a first terminal device in an embodiment. Figure 4 As shown, the first terminal device 20 can display a Bluetooth headset and a pairing control 202 , and the user can click the pairing control 202 , and the first terminal device 20 can send a pairing instruction to the headset device 10 .

[0070] As another implementation, the pairing operation may also be a preset touch operation, gesture operation, voice control operation or other interactive operations, which may be set according to actual needs. The embodiment of the present application does not limit the specific operation method of the pairing operation.

[0071] In an embodiment of the present application, a first terminal device that establishes a Bluetooth connection with the headphone device is used to control the headphone device to enter a pairing state. There is no need to place the headphone device in a headphone charging box, which is more convenient and efficient.

[0072] Method 3: Respond to the detected pairing trigger operation, generate a pairing instruction, and enter the pairing state according to the pairing instruction.

[0073] In some embodiments, the headphone 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., but not limited thereto. The operation mode of the pairing trigger operation may be pre-set, such as a press operation, a touch operation, a distance sensing operation, etc. The headphone device may collect user interaction data through the sensor, such as the touch duration, touch position, touch frequency and other information through the touch sensor, and the pressing force, pressing duration, pressing frequency and other information through the pressure sensor, and determine whether the user interaction data matches the preset pairing trigger operation mode. If it matches, the detected pairing trigger operation may be determined, a pairing instruction may be generated and the pairing state may be performed. The user can control the headphone device to enter the pairing state by directly interacting with the headphone device, without having to put the headphone device into the headphone charging box, which is more convenient and faster and improves efficiency.

[0074] It should be noted that other methods may also be used to trigger the headphone device to enter the pairing state, and are not limited to the above methods. The embodiments of the present application do not limit this.

[0075] In other embodiments, the second terminal device may be a device that has been paired with the headphone device. The headphone device may be in a connectable state (i.e., page scan mode is turned on), and can receive Bluetooth connection requests sent by other electronic devices to the headphone device. The second terminal device may store a connection record of the headphone device, and the connection record may include but is not limited to some or all of the following information: the MAC address of the headphone device, pairing information (such as a key, pairing code, etc.), etc. The second terminal device may send a Bluetooth connection request to the headphone device based on the connection record. For the specific Bluetooth connection process, please refer to the corresponding Bluetooth protocol.

[0076] In other embodiments, when N is greater than 1, the headphone device is in a connectable state. The connectable state may be that the headphone device is in page scan mode. It is understandable that when N is greater than 1, that is, when the headphone can support simultaneous connection to two or more terminal devices (i.e., one-to-many), the headphone device can be controlled to be in a connectable state during use (such as when the headphone device is not in a charging state), so that the Bluetooth connection request of the second terminal device can be accepted, thereby improving the operational convenience of the one-to-many solution. It is understandable that the headphone device is in a connectable state, which may be that one of the headphones is in a connectable state, or both headphones are in a connectable state.

[0077] Step 304: Perform a disconnection process corresponding to the target terminal device through the first headset to disconnect the Bluetooth connection with the target terminal device.

[0078] Step 306: Process the Bluetooth connection request through the second headset and establish a Bluetooth connection with the second terminal device.

[0079] When the headphone device establishes Bluetooth connections with N first terminal devices respectively, if the headphone device receives a Bluetooth connection request sent by the second terminal device, the first headphone can be used to disconnect the target terminal device among the N first terminal devices, and the second headphone can be used to perform the disconnection and connection operations in parallel in the Bluetooth connection request.

[0080] In some embodiments, before performing the disconnection processing corresponding to the target terminal device through the first headset, it may also include: determining the target terminal device among the N first terminal devices.

[0081] For example, the first headset may select a target terminal device from N first terminal devices and perform a disconnection process corresponding to the target terminal device. In some embodiments, the first headset may select a first terminal device whose priority meets a priority condition from the N first terminal devices as the target terminal device based on the priority of each first terminal device.

[0082] The first headset may obtain the priority corresponding to each first terminal device with which a Bluetooth connection is established. Optionally, the priority of each first terminal device may be determined based on a device status parameter of each first terminal 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 headset device, a device type parameter, a device remaining battery parameter, and a historical connection frequency.

[0083] The service data output parameter may be used to indicate whether the first terminal device is currently outputting service data to the headset device via a Bluetooth connection. The priority of the first terminal device currently outputting service data to the headset device may be higher than the priority of the first terminal device currently not outputting service data to the headset device.

[0084] The sequence parameter can be used to characterize the order of establishing Bluetooth connections with the headphone device. As an embodiment, the first earphone can store the connection time when each first terminal device most recently established a Bluetooth connection with the headphone device, and determine the connection duration of each first terminal device based on the connection time corresponding to each first terminal device. The connection duration is the time from the connection moment to the current moment. The sequence parameter of each first terminal device can be determined based on the connection duration of each first terminal device. The longer the connection duration, the higher the order indicated by the sequence parameter, which means that the first terminal device establishes a Bluetooth connection with the headphone device sooner.

[0085] As another embodiment, the first headset may also establish a connection queue, and the device information of each first terminal device may be stored in the connection queue in the order in which the first terminal device establishes a Bluetooth connection with the headset device. The first terminal device that is ranked earlier in the connection queue indicates that the first terminal device established a Bluetooth connection with the headset device earlier. Optionally, the first terminal device that establishes a Bluetooth connection with the headset device earlier may have a lower priority.

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

[0087] The device remaining power parameter can be used to characterize the current remaining power of the first terminal device. The priority of the first terminal device with a large device remaining power can be higher than the priority of the first terminal device with a small device remaining power.

[0088] The historical connection frequency can be used to characterize the historical connection status of the first terminal device and the headphone 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 headset can store the connection status data of each terminal device and the headphone device. The connection status data may include the device information, connection time, connection duration, etc. of each terminal device. The first headset can count the historical connection frequencies of the N first terminal devices currently connected to the headphone device in the past period of time based on the stored connection status data. The priority of the first terminal device with a high historical connection frequency may be higher than the priority of the first terminal device with a low historical connection frequency.

[0089] The first headset can determine the priority corresponding to each first terminal device based on one or more device status parameters of each first terminal device. If the priority corresponding to each first terminal device is determined based on multiple device status parameters, a weight can be assigned to each device status parameter. Taking device A in the first terminal device as an example, device A can be any first terminal device. The benchmark priority corresponding to each device status parameter can be determined based on each device status parameter of device A. For example, the service data output parameter of device A is 1, indicating that service data is currently being output to the headset device, then the benchmark priority corresponding to the service data output parameter can be 4; the device remaining power parameter of device A indicates that the current remaining power of device A is greater than 50%, then the benchmark priority corresponding to the device remaining power can be 2, etc. Then, based on the benchmark 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.

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

[0091] The first earphone selects the first terminal device whose priority meets the priority condition from N first terminal devices as the target terminal device. Optionally, the priority condition may include any one of the priority lower than the priority threshold, the lowest priority, etc. Furthermore, the first earphone may directly select the first terminal device with the lowest priority as the target terminal device, or may first select the first terminal device with a priority lower than the priority threshold. If there are multiple first terminal devices with priorities lower than the priority threshold, one of them may be randomly selected as the target terminal device, or the first terminal device with the lowest priority may be selected as the target terminal device. Determining the target terminal device based on the priority of each first terminal device can make the target terminal 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.

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

[0093] For example, when the headset device receives a Bluetooth connection request, if none of the first terminal devices transmits service data to the headset device, the first terminal device A that is connected first can be disconnected first according to the Bluetooth connection order of each first terminal device. If the headset device enters the pairing state, if the first terminal device A transmits service data (such as voice data, audio data, etc.) to the headset device before the headset device receives the Bluetooth connection request, then the priority of the first terminal device A changes. At this time, if the headset device receives a Bluetooth connection request, it will not disconnect the Bluetooth connection with the first terminal device A. At this time, which first terminal device is disconnected is determined according to the set priority rules. It can be seen that the headset device no longer disconnects when entering the pairing state, but disconnects after receiving the Bluetooth connection request, which largely guarantees the user's use of the headset. The use of the first headset and the second headset for parallel processing further shortens the speed of terminal device switching and improves the user experience.

[0094] After determining the target terminal device, the first headset may send a disconnect instruction to the target terminal device to terminate the Bluetooth connection with the target terminal device. Alternatively, the second headset may determine the target terminal device from N first terminal devices, and then send the device identifier of the target terminal device to the first headset, which then triggers the first headset to terminate the Bluetooth connection with the target terminal device.

[0095] While the first headset is disconnecting, the second headset can concurrently process a Bluetooth connection request from the second terminal device. In one embodiment, the second terminal device may not have been paired with the headset. The second headset can respond to the Bluetooth connection request and establish a Bluetooth connection with the second terminal device. During the Bluetooth connection establishment process, the second headset and the second terminal device are paired. This pairing process may include exchanging pairing codes and agreeing on a key between the two parties to ensure transmission security.

[0096] As another implementation, the second terminal device may be a terminal device that has been paired with the headphone device. The second headphone may respond to the Bluetooth connection request sent by the second terminal device and establish a physical link such as an ACL link with the second terminal device. In this case, since the second terminal device already has the pairing information of the headphone device, no further pairing is required.

[0097] Step 308: Synchronize the disconnection information of the target terminal device to the second headset through the first headset.

[0098] Step 310: Synchronize the connection information of the second terminal device to the first headset via the second headset.

[0099] Optionally, the first headset may be the master headset and the second headset may be the slave headset. After the first headset completes the disconnection process, the first headset may synchronize disconnection information to the second headset, where the disconnection information may include at least device information of the target terminal device that disconnected the Bluetooth connection. The second headset may no longer monitor the Bluetooth connection between the target terminal device and the first headset.

[0100] After the second earphone successfully establishes a Bluetooth connection with the second terminal device, the second earphone can synchronize the connection information of the second terminal device to the first earphone. The connection information may include but is not limited to frequency hopping information, channel information, clock information, etc.

[0101] In one embodiment, after the connection information of the second terminal device is synchronized to the first earphone through the second earphone, the Bluetooth connection object of the second terminal device can be switched from the second earphone to the first earphone, and the second earphone monitors the Bluetooth connection between the first earphone and the second terminal device; or, after the second earphone synchronizes the connection information of the second terminal device to the first earphone, the Bluetooth connection object of the second terminal device can be switched from the second earphone to the first earphone, and the first earphone synchronizes the data transmitted between the second terminal device and the second earphone.

[0102] After obtaining the connection information, the first earphone can directly transmit data with the second terminal device based on the connection information. The physical link between the second earphone and the second terminal device is transitioned to the physical link between the first earphone and the second terminal device, and the Bluetooth connection object of the second terminal 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 second terminal device, or the first earphone can forward the data transmitted between the first earphone and the second terminal device to the second earphone to achieve master-slave synchronization. Through the synchronization of information between earphones, all terminal 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 connected terminal devices and data transmission.

[0103] Figure 5A FIG. 1 is an interactive sequence diagram of a Bluetooth connection method in one embodiment. Figure 5A As shown, the headset device can be a device that supports Bluetooth "one to two", and the headset device can establish Bluetooth connections with terminal device A and terminal device B respectively. The headset device is in a connectable state (in page scan mode), and terminal device C can be a device that has been paired with the headset device. Then, terminal device C can send a Bluetooth connection request to the headset device based on the previously stored information of the headset device. After the headset device receives the Bluetooth connection request sent by terminal device C, the first headset can connect to the target terminal device (for example, Figure 5AThe second headset can process the Bluetooth connection request. After the first headset disconnects from the target terminal device, the first headset can synchronize the disconnection information to the second headset. After the second headset successfully establishes a Bluetooth connection with terminal device C, the second headset can synchronize the connection information to the first headset, achieving information synchronization and switching the Bluetooth connection target of terminal device C from the second headset to the first headset.

[0104] Figure 5B FIG. 1 is an interactive sequence diagram of a Bluetooth connection method in another embodiment. Figure 5B As shown, the earphone device may be a device that supports Bluetooth "one to two", and the earphone device may establish Bluetooth connections with the terminal device A and the second device B respectively. Terminal device C may be a device that has not been paired with the earphone device, and the earphone device may enter the pairing state, and maintain Bluetooth connections with terminal device A and terminal device B before entering the pairing state. Terminal device C may send a scan request to the earphone device, and after receiving the scan request, the earphone device may send a scan response to terminal device C through the first earphone or the second earphone. In the pairing state, the earphone device is in inquiry scan and page scan modes at the same time. When terminal device C determines that it needs to establish a Bluetooth connection with the earphone device, it may send a Bluetooth connection request to the earphone device. After the earphone device receives the Bluetooth connection request sent by terminal device C, the first earphone may establish a connection with the target terminal device (for example, Figure 5B The second headset may process the Bluetooth connection request, establish a Bluetooth connection with the target terminal device, and pair with the terminal device C during the Bluetooth connection process. After the first headset disconnects the Bluetooth connection with the target terminal device, the first headset may synchronize the disconnection information to the second headset. After the second headset successfully establishes a Bluetooth connection with the terminal device C, the second headset may synchronize the connection information to the first headset, thereby achieving information synchronization and switching the Bluetooth connection target of the terminal device C from the second headset to the first headset.

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

[0106] In an embodiment of the present application, when a second terminal 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 second terminal 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 second terminal device from the second headset to the first headset. This makes it easier to manage all established Bluetooth connections and ensures data transmission efficiency.

[0107] like Figure 6 As shown, in some embodiments, the above-mentioned Bluetooth connection method may further include the following steps:

[0108] Step 602: When the headset device establishes a Bluetooth connection with M first terminal devices, it is detected that the devices to be connected to the headset device include a third terminal device and a fourth terminal device.

[0109] In an embodiment of the present application, the maximum number N of Bluetooth connections supported by the headset device may be an integer greater than or equal to 2, and M may be an integer greater than or equal to 0 and less than or equal to N-2. The headset device establishing Bluetooth connections with M first terminal devices may include a case where the headset device does not establish a Bluetooth connection with any first terminal device (i.e., M=0), and may also include a case where the number of first terminal devices establishing Bluetooth connections with the headset device is less than or equal to N-2, for example, N is 3, and the headset device only establishes a Bluetooth connection with one first terminal device.

[0110] When the headphone device establishes a Bluetooth connection with M first terminal devices, a scenario may arise where the headphone device needs to establish a Bluetooth connection with two terminal devices simultaneously or continuously. For example, two different terminal devices send Bluetooth connection requests to the headphone device at the same time, or the headphone device needs to reconnect with two different terminal devices. Reconnection means that the headphone device has been paired with the terminal device before and does not need to be paired with the terminal device again but can directly establish a Bluetooth connection with the terminal device.

[0111] Step 604: Establish a Bluetooth connection with the third terminal device through the first headset.

[0112] Step 606: Establish a Bluetooth connection with the fourth terminal device through the second headset.

[0113] In some embodiments, when the headset device establishes Bluetooth connections with M first terminal devices, if it is detected that the devices to be connected to the headset device include a third terminal device and a fourth terminal device, since the number of Bluetooth connections that the headset device can still establish is greater than or equal to 2, Bluetooth connections can be established with the third terminal device and the fourth terminal device respectively. In related technologies, the headset device typically first establishes a Bluetooth connection with one of the terminal devices (such as the third terminal device) and then establishes a Bluetooth connection with another terminal device (such as the fourth terminal device), resulting in a longer connection time and slower speed, which affects the user experience.

[0114] In an embodiment of the present application, if the headphone device detects that the devices to be connected include a third terminal device and a fourth terminal device, a Bluetooth connection can be established with the third terminal device through the first headphone, and a Bluetooth connection can be established with the fourth terminal device through the second headphone in parallel. The first headphone and the second headphone can perform connection operations in parallel, thereby achieving the effect of the headphone device establishing Bluetooth connections with the third terminal device and the fourth terminal device at the same time, reducing the waiting time for connection and improving connection efficiency.

[0115] In some embodiments, when the headphone device establishes a Bluetooth connection with M first terminal devices, if Bluetooth connection requests sent by a third terminal device and a fourth terminal device are received within a first time period, the Bluetooth connection request sent by the third terminal device can be processed by the first headphone, and a Bluetooth connection can be established with the third terminal device, and the Bluetooth connection request sent by the fourth terminal device can be processed by the second headphone, and a Bluetooth connection can be established with the third terminal device.

[0116] 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 length of time it takes for the headset device to normally establish a Bluetooth connection with another terminal device.

[0117] If the headset receives Bluetooth connection requests from the third and fourth devices within the first time period, it is very likely that the headset will receive another Bluetooth connection request before completing one Bluetooth connection request. Therefore, the first headset and the second headset can establish Bluetooth connections with the third and fourth devices respectively, changing the serial connection establishment process to a parallel connection establishment process, thereby reducing the connection waiting time.

[0118] As an embodiment, the third terminal device and / or the fourth terminal device may be a terminal device that has not been paired with the headphone device. The headphone device may enter a pairing state according to a pairing instruction. At this time, the unpaired third terminal device and / or the fourth terminal device may scan the headphone device information, thereby allowing the user to choose to initiate a Bluetooth connection with the headphone device. When the headphone device is in the pairing state, if a Bluetooth connection request is received from the third terminal device and the fourth terminal device within a first time period, a Bluetooth connection may be established between the first headphone and the third terminal device, and a Bluetooth connection may be established between the second headphone and the fourth terminal device.

[0119] Optionally, the manner in which the headphone device enters the pairing state according to the pairing instruction may be similar to the manner in which the headphone device enters the pairing state according to the pairing instruction described in the above embodiment, and details thereof will not be repeated here.

[0120] When the headset device is in the pairing state, an unpaired third terminal device and / or fourth terminal device can scan the headset device and send a scan request to the headset device. If the headset device receives the scan request sent by the third terminal device and the fourth terminal device, it can send a scan response to the third terminal device through the first headset and send a scan response to the fourth terminal device through the second headset. Alternatively, the first headset can directly send a scan response to the third terminal device and the fourth terminal device, or the second headset can send a scan response to the third terminal device and the fourth terminal device.

[0121] If the third and fourth terminal devices are both terminal devices that have not been paired with the headset device, after receiving the scan response, the third and fourth terminal devices may send a Bluetooth connection request to the headset device when determining that a connection with the headset device is required. The first headset may establish a Bluetooth connection with the third terminal device based on the Bluetooth connection request sent by the third terminal device, and the first headset may be paired with the third terminal device during the Bluetooth connection establishment process. The second headset may establish a Bluetooth connection with the fourth terminal device based on the connection request sent by the fourth terminal device, and the second headset may be paired with the fourth terminal device during the Bluetooth connection establishment process.

[0122] In some embodiments, the third terminal device and the fourth terminal device may also be terminal devices that have been connected to the headphone device. The third terminal device and the fourth terminal device may store connection records corresponding to the headphone device, and may directly send a Bluetooth connection request to the headphone device based on the connection records. The headphone device may process the Bluetooth connection request sent by the third terminal device through the first headphone and establish a Bluetooth connection with the third terminal device. During the process of establishing the Bluetooth connection, the first headphone does not need to be paired with the third terminal device; and process the Bluetooth connection request sent by the fourth terminal device through the second headphone and establish a Bluetooth connection with the third terminal device. During the process of establishing the Bluetooth connection, the second headphone does not need to be paired with the fourth terminal device.

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

[0124] In some embodiments, the third terminal device and the fourth terminal device may be terminal devices that have been connected to the headphone device. The headphone device may store connection records corresponding to the third terminal device and the fourth terminal device, respectively, and the headphone device may actively reconnect to the third terminal device and the fourth terminal device based on the connection records. When the headphone device is in the reconnection state, a first connection request may be sent to the third terminal device to be reconnected via the first headphone, and a second connection request may be sent to the fourth terminal device to be reconnected via the second headphone. The first connection request is used to reconnect to the third terminal device, and the second connection request is used to reconnect to the fourth terminal device.

[0125] Optionally, the earphone device is placed in the earphone charging box. When the earphone charging box detects the lid opening operation, it can send a lid opening instruction to the earphone device, triggering the earphone device to enter the reconnection state. It should be noted that other methods can also be used to trigger the earphone device to enter the reconnection state. For example, if the earphone device disconnects the Bluetooth connection from all terminal devices, it can trigger the earphone device to enter the reconnection state. The first earphone pages the third terminal device (i.e., sends a Bluetooth connection request) based on previous connection records to establish a first physical link with the third terminal device; the second earphone pages the fourth terminal device (i.e., sends a Bluetooth connection request) based on previous connection records to establish a second physical link with the fourth terminal device; since both parties to the connection have pairing keys, no pairing operation is required during the entire Bluetooth connection process.

[0126] The headset device may store a connection record, which may refer to a record of the headset device's historical connections with other terminal devices. The connection record may include pairing information, device information, etc. corresponding to other terminal devices paired with the headset device.

[0127] The third and fourth terminal devices to be reconnected can be determined based on the connection record. Alternatively, the first two terminal devices ranked in descending order of connection time can be selected as the third and fourth terminal devices. Alternatively, the first two terminal devices ranked in descending order of historical connection frequency can be selected as the third and fourth terminal devices.

[0128] After determining the third terminal device and the fourth terminal device to be reconnected, the first earphone can page the third terminal device. If the third terminal device is within the connection range of the earphone device, it can respond to the page to establish a physical link. Since the third terminal device stores the pairing key of the earphone device, there is no need to perform pairing operations, and a Bluetooth connection can be established with the first earphone. Similarly, the second earphone can page the fourth terminal device. If the fourth terminal device is within the connection range of the earphone device, it can respond to the page. Since the fourth terminal device stores the pairing key of the earphone device, there is no need to perform pairing operations, and a Bluetooth connection can be established with the second earphone. The first earphone and the second earphone can reconnect with different terminal devices in parallel, which can improve the reconnection efficiency.

[0129] In some embodiments, when the headset device is in the reconnecting state, the headset device may also enable page scan mode, or enable page scan mode and inquiry scan mode (i.e., it is in pairing state). In the case where the terminal device to be reconnected only includes a third terminal device, a first connection request may be sent to the third terminal device via the first headset to establish a Bluetooth connection with the third terminal device. If a Bluetooth connection request is received from a fourth terminal device within the second time period after the first headset sends the first connection request, the Bluetooth connection request may be processed by the second headset, and a Bluetooth connection may be established with the fourth terminal device.

[0130] The second time period can be set based on actual needs, such as 1 second, 2 seconds, etc. The second time period can also be set based on the speed at which the headset device reconnects. The faster the headset device reconnects, the shorter the second time period can be, and the slower the headset device reconnects, the longer the second time period can be. While the headset device is reconnecting to the third terminal device, it can also respond to the Bluetooth connection request sent by the fourth terminal device, without having to wait for the reconnection to succeed before responding. This allows the Bluetooth connection to be established with the two terminal devices more quickly, improving connection efficiency.

[0131] That is, the headset device can process in parallel a Bluetooth backconnection initiated by the headset device with the terminal device and a Bluetooth connection initiated by another terminal device with the headset device.

[0132] In some embodiments, after the first headset establishes a Bluetooth connection with the third terminal device, the connection information of the first terminal device can be synchronized to the second headset via the first headset. After the second headset establishes a Bluetooth connection with the fourth terminal device, the connection information of the fourth terminal device can be synchronized to the first headset via the second headset.

[0133] Optionally, the first headset can be the master headset and the second headset can be the slave headset. After the second headset synchronizes the connection information corresponding to the fourth terminal device to the first headset, the Bluetooth connection object of the fourth terminal 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 fourth terminal device. Alternatively, the first headset can synchronize data transmitted between the first headset and the fourth terminal device to the second headset, thereby achieving master-slave synchronization.

[0134] After the first headset establishes a Bluetooth connection with a third terminal device, the first headset can also synchronize the connection information corresponding to the third terminal device with the second headset, so that the second headset can monitor the Bluetooth connection between the first headset and the third terminal device based on the connection information. For all terminal devices connected to the headset, data transmission is managed in a manner that the first headset connects and the second headset monitors or receives data forwarded by the first headset, which makes management more convenient and improves data transmission efficiency.

[0135] Figure 7A FIG. 1 is an interactive sequence diagram of connecting a headset device to two terminal devices in one embodiment. Figure 7A As shown, the earphone device can be a device that supports Bluetooth "one-to-two", and terminal device A and terminal device B are both devices that have been paired with the earphone device. When the earphone device has not established a Bluetooth connection with other terminal devices, when the earphone device is in pagescan mode, it receives Bluetooth connection requests sent by terminal device A and terminal device B within a first time period. The first earphone can process the Bluetooth connection request sent by terminal device A and establish a Bluetooth connection with terminal device A, and the second earphone can process the Bluetooth connection request sent by terminal device B and establish a Bluetooth connection with terminal device B. After the first earphone successfully establishes a Bluetooth connection with terminal device A, the connection information of terminal device A can be synchronized with the second earphone. After the second earphone successfully establishes a Bluetooth connection with terminal device B, the connection information of terminal device B can be synchronized with the second earphone, realizing information synchronization and switching the Bluetooth connection object of terminal device B from the second earphone to the first earphone.

[0136] Figure 7B This is an interactive sequence diagram of another embodiment in which a headset device is connected to two terminal devices. Figure 7B As shown, the headphone device can be a device that supports Bluetooth "one to two", and both terminal device A and terminal device B are devices that have not been paired with the headphone device. When the headphone device has not established a Bluetooth connection with other terminal devices, when the headphone device is in pagescan mode and page scan mode (pairing state), terminal device A and terminal device B can scan the headphone device and send a Bluetooth connection request to the headphone device. The headphone device receives the Bluetooth connection request sent by terminal device A and terminal device B within a first time period. The first headphone can process the Bluetooth connection request sent by terminal device A and establish a Bluetooth connection with terminal device A. The second headphone can process the Bluetooth connection request sent by terminal device B and establish a Bluetooth connection with terminal device B. After the first headphone successfully establishes a Bluetooth connection with terminal device A, the connection information of terminal device A can be synchronized with the second headphone. After the second headphone successfully establishes a Bluetooth connection with terminal device B, the connection information of terminal device B can be synchronized with the second headphone to achieve information synchronization, so that the Bluetooth connection object of terminal device B is switched from the second headphone to the first headphone.

[0137] Figure 7C FIG. 1 is an interactive sequence diagram of connecting a headset device to two terminal devices in another embodiment. Figure 7CAs shown, the earphone device can be a device that supports Bluetooth "one to two", and both terminal device A and terminal device B are devices that have been paired with the earphone device. The earphone device can enter the reconnection state without establishing a Bluetooth connection with other terminal devices. If terminal device A and terminal device B are both in page scan mode, the first earphone can send a first connection request to terminal device A according to the stored connection record of terminal device A, and reconnect with terminal device A based on the first connection request. The second earphone can send a second connection request to terminal device B according to the stored connection record of terminal device B, and reconnect with terminal device B based on the second connection request. After the first earphone successfully establishes a Bluetooth connection with terminal device A, the connection information of terminal device A can be synchronized with the second earphone. After the second earphone successfully establishes a Bluetooth connection with terminal device B, the connection information of terminal device B can be synchronized with the second earphone to achieve information synchronization, so that the Bluetooth connection object of terminal device B is switched from the second earphone to the first earphone.

[0138] It should be noted that Figures 7A to 7C It is only used to illustrate the implementation process of the embodiment of the present application and is not used to limit the specific headphone device, terminal device and connection scenario.

[0139] In some embodiments, when the headset device establishes a Bluetooth connection with M first terminal devices, if the device to be connected to the headset device only includes a third terminal device (for example, the headset device only receives a Bluetooth connection request sent by the third terminal device, or only needs to connect back to the third terminal device, and does not receive Bluetooth connection requests sent by the third terminal device and the fourth terminal device within the first time period, etc.), that is, the headset device only needs to establish a Bluetooth connection with one other terminal device, then the headset device can establish a Bluetooth connection with the third terminal device through the first headset or the second headset. For the first terminal device in the "headphone device establishes Bluetooth connections with N first terminal devices respectively" described in each of the above embodiments, the Bluetooth connection can be established using the method described in steps 602 to 606.

[0140] When the number of first terminal devices that have established a Bluetooth connection with the headphone device reaches N-1, if the devices to be connected to the headphone device only include the third terminal device, the headphone device can establish a Bluetooth connection with the third terminal device through the first headphone or the second headphone. If the devices to be connected to the headphone device include the third terminal device and the fourth terminal device, if the headphone device wants to establish a Bluetooth connection with the third terminal device and the fourth terminal device, it is also necessary to disconnect the Bluetooth connection of one of the first terminal devices. Therefore, a Bluetooth connection can be established with the third terminal device through the first headphone or the second headphone first, and then a Bluetooth connection can be established with the fourth terminal device through the second headphone while the first headphone performs the disconnection process. Optionally, the target terminal device for the first headphone to perform the disconnection process can be determined from the first terminal device other than the third terminal device that has established a Bluetooth connection with the headphone device.

[0141] When the headphone device establishes Bluetooth connections with N first terminal devices respectively, if the devices to be connected to the headphone device include a third terminal device and a fourth terminal device, the third terminal device and the fourth terminal device can serve as the second terminal devices in the above embodiments, and the headphone device performs disconnection processing and Bluetooth connection in parallel to successfully establish Bluetooth connections with the third terminal device and the fourth terminal device.

[0142] Optionally, the Bluetooth connection in the embodiments 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, the headset device may send a BLE broadcast, and other terminal devices may scan and obtain the BLE broadcast and establish a BLE Bluetooth connection with the headset device. It should be noted that other connection methods may also be applicable and may change with the development of the Bluetooth protocol.

[0143] It should be noted that the terminal device that has not been paired with the headphone device involved in the embodiments of the present application refers to the terminal device in which no connection information corresponding to the headphone device is stored; the terminal device that has been paired with the headphone device involved in the embodiments of the present application refers to the terminal device in which the connection information corresponding to the headphone device is stored.

[0144] In an embodiment of the present application, when the headphone device needs to establish a Bluetooth connection with two other terminal devices simultaneously or continuously, the first headphone and the second headphone can respectively establish a Bluetooth connection with one of the terminal devices, and perform the connection operation in parallel, which can speed up the connection speed and improve the connection efficiency.

[0145] like Figure 8 As shown, in one embodiment, a Bluetooth connection device 800 is provided, which can be applied to the above-mentioned headphone device. The Bluetooth connection device 800 can include a connection module 810.

[0146] The connection module 810 is used to disconnect the headset device through the first headset if a Bluetooth connection request sent by the second terminal device is received when the headset device establishes Bluetooth connections with N first terminal devices respectively, and process the Bluetooth connection request through the second headset to establish a Bluetooth connection between the headset device and the second terminal device.

[0147] Among them, the disconnection processing is used to disconnect the Bluetooth connection between the headset device and the target terminal device among the N first terminal devices; N is the maximum number of Bluetooth connections supported by the headset device, and N is a positive integer greater than or equal to 1.

[0148] In an embodiment of the present application, when the headphone device is in a connection grabbing scenario, the first headphone and the second headphone of the headphone device can perform the disconnection processing with the target terminal device and the Bluetooth connection with the second terminal device in parallel. The headphone device does not need to wait for the Bluetooth connection to be disconnected before responding to the connection request sent by the second terminal device, which can increase the connection grabbing speed of the second terminal device to the headphone device and improve the connection grabbing efficiency.

[0149] In one embodiment, the connection module 810 includes a disconnection unit.

[0150] The disconnection unit is used to determine a target terminal device among the N first terminal devices, and the first headset performs a disconnection process corresponding to the target terminal device.

[0151] In one embodiment, N is an integer greater than or equal to 2; the disconnection unit is further used to select a first terminal device whose priority meets the priority condition from N first terminal devices as the target terminal device through the first earphone according to the priority of each first terminal device; wherein the priority condition includes any one of the priority being lower than the priority threshold and the lowest priority.

[0152] In one embodiment, the priority of each first terminal device is determined based on a device status parameter of each first terminal device; the device status parameter includes one or more of a service data output parameter, a sequence parameter for characterizing the order of establishing a Bluetooth connection with the headset device, a device type parameter, a device remaining power parameter, and a historical connection frequency;

[0153] The service data output parameter is used to indicate whether the first terminal device currently outputs service data to the headset device via a Bluetooth connection.

[0154] In one embodiment, the Bluetooth connection device 800 includes not only the connection module 810 but also a pairing module.

[0155] A pairing module is used to enter the pairing state according to the pairing instruction and maintain the Bluetooth connection with N first terminal devices; and is used to receive a scan request sent by the second terminal device through the first earphone and / or the second earphone, and send a scan response to the second terminal device according to the scan request.

[0156] In one embodiment, the pairing module is further used to receive a pairing instruction sent by the earphone charging box and enter the pairing state according to the pairing instruction; or, receive a pairing instruction sent by any first terminal device and enter the pairing state according to the pairing instruction; or, respond to a detected pairing trigger operation, generate a pairing instruction, and enter the pairing state according to the pairing instruction.

[0157] In one embodiment, the connection module 810 includes not only a disconnection unit but also a connection unit.

[0158] The connecting unit is configured to process the Bluetooth connection request through the second headset and establish a Bluetooth connection with the second terminal device.

[0159] In one embodiment, the Bluetooth connection device 800 further includes a synchronization module.

[0160] The synchronization module is used to establish a Bluetooth connection between the second earphone and the second terminal device, and synchronize the connection information of the second terminal device to the first earphone through the second earphone.

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

[0162] In one embodiment, the synchronization module is further configured to synchronize disconnection information of the target terminal device to the second earphone via the first earphone after the earphone device disconnects the Bluetooth connection with the target terminal device.

[0163] In one embodiment, the first earphone is the master earphone in the earphone device, and the second earphone is the slave earphone in the earphone device; when the earphone device establishes Bluetooth connections with N first terminal devices respectively, it includes: when the first earphone establishes Bluetooth connections with N first terminal devices respectively, and when the first earphone establishes a Bluetooth connection with the second earphone.

[0164] In one embodiment, when the headset device establishes Bluetooth connections with N first terminal devices respectively, it includes: when the headset device establishes Bluetooth connections with N first terminal devices respectively, and the headset device is in a connectable state.

[0165] In one embodiment, when N is greater than 1, the headphone device is in a connectable state.

[0166] In an embodiment of the present application, after the disconnection operation and the connection operation are completed, the first earphone and the second earphone synchronize information, so that the Bluetooth connection object of the second terminal device is switched from the second earphone to the first earphone, which can more conveniently manage all established Bluetooth connections and ensure data transmission efficiency.

[0167] In one embodiment, N is a positive integer greater than or equal to 2, and the connection module 810 is further used to, when the earphone device establishes a Bluetooth connection with M first terminal devices, if it is detected that the device to be connected of the earphone device includes a third terminal device and a fourth terminal device, then establish a Bluetooth connection with the third terminal device through the first earphone, and establish a Bluetooth connection with the fourth terminal device in parallel through the second earphone; wherein M is an integer greater than or equal to 0 and less than or equal to N-2.

[0168] The synchronization module is further used to synchronize the connection information corresponding to the third terminal device to the second earphone through the first earphone; and to synchronize the connection information corresponding to the fourth terminal device to the first earphone through the second earphone.

[0169] In one embodiment, the connection module 810 is also used to process the Bluetooth connection request sent by the third terminal device through the first earphone and establish a Bluetooth connection with the third terminal device if a Bluetooth connection request sent by the third terminal device and the fourth terminal device is received within the first time period, and to process the Bluetooth connection request sent by the fourth terminal device through the second earphone and establish a Bluetooth connection with the third terminal device.

[0170] In one embodiment, the third terminal device and / or the fourth terminal device are terminal devices that have not been paired with the headset device. The pairing module is further configured to enter a pairing state according to a pairing instruction before the connection module 810 receives a Bluetooth connection request sent by the third terminal device and the fourth terminal device.

[0171] In one embodiment, the connection module 810 is further used to send a first connection request to a third terminal device to be reconnected through a first earphone when the earphone device is in a reconnecting state, and to send a second connection request to a fourth terminal device to be reconnected through a second earphone, wherein the first connection request is used to reconnect with the third terminal device, and the second connection request is used to reconnect with the fourth terminal device.

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

[0173] In an embodiment of the present application, when the headphone device needs to establish a Bluetooth connection with two other terminal devices simultaneously or continuously, the first headphone and the second headphone can respectively establish a Bluetooth connection with one of the terminal devices, and perform the connection operation in parallel, which can speed up the connection speed and improve the connection efficiency.

[0174] Figure 9 FIG. 1 is a structural block diagram of a headphone device in one embodiment. Figure 9 As shown, the earphone device 900 may include one or more of the following components: a processor 910, and a memory 920 coupled to the processor 910, wherein the memory 920 may store one or more computer programs, and the one or more computer programs may be configured to implement the methods described in the above embodiments when executed by one or more processors 910.

[0175] The processor 910 may include one or more processing cores. The processor 910 utilizes various interfaces and circuits to connect various components within the headphone device 900. It executes instructions, programs, code sets, or instruction sets stored in the memory 920, as well as accesses data stored in the memory 920, to perform various functions of the headphone device 900 and process data. Optionally, the processor 910 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 910 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 also be implemented independently of the processor 910 via a separate communications chip.

[0176] The memory 920 may include random access memory (RAM) or read-only memory (ROM). The memory 920 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 920 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as 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 headphone device 900 during use.

[0177] The headset device 900 may further 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 earphone device includes a first earphone and a second earphone, and both the first earphone and the second earphone may include at least the aforementioned processor 910, memory 920, and Bluetooth module.

[0179] Processor 910 is configured to, when the headset device 900 establishes Bluetooth connections with N first terminal devices, instruct the Bluetooth module of the first headset and / or the second headset to disconnect the device if a Bluetooth connection request from the second terminal device is received through the Bluetooth module of the first headset and / or the second headset, and instruct the Bluetooth module of the second headset to process the Bluetooth connection request and establish a Bluetooth connection with the second terminal device. Processor 910 can be the processor in the first headset or the processor in the second headset.

[0180] It is understandable that the earphone device 900 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.

[0181] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the methods described in the above embodiments.

[0182] 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 methods described in the above embodiments.

[0183] 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.

[0184] 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).

[0185] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. 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 the present application.

[0186] 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.

[0187] 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.

[0188] 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.

[0189] The above is a detailed introduction to a Bluetooth connection method, device, headphone device, and computer-readable 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 ideas of the present application. At the same time, for those skilled in the art, based on the ideas of the present application, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present application.

Claims

1. A Bluetooth connection method, characterized in that: Applied to an earphone device, the earphone device includes a first earphone and a second earphone, and the method includes: When the headset device establishes Bluetooth connections with N first terminal devices respectively, if a Bluetooth connection request sent by a second terminal device is received, disconnection processing is performed by the first headset, and the Bluetooth connection request is processed in parallel by the second headset, so that the headset device establishes a Bluetooth connection with the second terminal device; The disconnection process is used to disconnect the Bluetooth connection between the headset device and the target terminal device among the N first terminal devices; N is the maximum number of Bluetooth connections supported by the headset device, and N is an integer greater than or equal to 1; Before disconnecting the first headset if a Bluetooth connection request sent by the second terminal device is received, the method further includes: Enter the pairing state according to the pairing instruction and maintain the Bluetooth connection with the N first terminal devices.

2. The method according to claim 1, characterized in that The performing disconnection processing by the first headset includes: A target terminal device among the N first terminal devices is determined, and the first headset performs a disconnection process corresponding to the target terminal device.

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

4. The method according to claim 3, characterized in that The priority of each of the first terminal devices is determined according to a device status parameter of each of the first terminal devices; The device status parameters include one or more of a service data output parameter, a sequence parameter for characterizing the order of establishing Bluetooth connections with the headset device, a device type parameter, a device remaining power parameter, and a historical connection frequency; The service data output parameter is used to indicate whether the first terminal device currently outputs service data to the headset device via a Bluetooth connection.

5. The method according to any one of claims 1 to 4, characterized in that: After entering the pairing state according to the pairing instruction and maintaining the Bluetooth connection with the N first terminal devices, the method further includes: A scan request sent by a second terminal device is received through the first earphone and / or the second earphone, and a scan response is sent to the second terminal device according to the scan request.

6. The method according to claim 5, characterized in that Entering the pairing state according to the pairing instruction includes: Receive a pairing instruction sent by the earphone charging box and enter the pairing state according to the pairing instruction; or, receiving a pairing instruction sent by any first terminal device and entering a pairing state according to the pairing instruction; or, In response to the detected pairing trigger operation, a pairing instruction is generated, and a pairing state is entered according to the pairing instruction.

7. The method according to any one of claims 1 to 4, characterized in that: The processing of the Bluetooth connection request by the second headset includes: Processing the Bluetooth connection request through the second headset and establishing a Bluetooth connection with the second terminal device; After processing the Bluetooth connection request by the second headset, the method further includes: The connection information of the second terminal 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 second terminal device to the first earphone, the Bluetooth connection object of the second terminal 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 second terminal device; or The Bluetooth connection object of the second terminal 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 second terminal device to the second earphone.

9. The method according to any one of claims 1 to 4, characterized in that: After performing the disconnection process through the first headset, the method further includes: The disconnection information of the target terminal device is synchronized to the second headset through the first headset.

10. The method according to claim 1, characterized in that The case where the headset device establishes Bluetooth connections with N first terminal devices respectively includes: the first headset establishes Bluetooth connections with the N first terminal devices respectively, and the first headset establishes a Bluetooth connection with the second headset.

11. The method according to claim 1, wherein When the headset device establishes Bluetooth connections with N first terminal devices respectively, the method includes: The headset device establishes Bluetooth connections with N first terminal devices respectively, and the headset device is in a connectable state.

12. The method according to claim 11, characterized in that When N is greater than 1, the headphone device is in a connectable state.

13. The method according to any one of claims 1 to 4 and 10 to 12, characterized in that: N is a positive integer greater than or equal to 2, and the method further includes: When the headset device establishes a Bluetooth connection with M first terminal devices, if it is detected that the device to be connected to the headset device includes a third terminal device and a fourth terminal device, a Bluetooth connection is established with the third terminal device through the first headset, and a Bluetooth connection is established with the fourth terminal device in parallel through the second headset; wherein M is an integer greater than or equal to 0 and less than or equal to N-2; Synchronizing connection information corresponding to the third terminal device to the second headset through the first headset; The connection information corresponding to the fourth terminal device is synchronized to the first headset through the second headset.

14. The method according to claim 13, characterized in that If it is detected that the device to be connected to the headset device includes a third terminal device and a fourth terminal device, establishing a Bluetooth connection with the third terminal device through the first headset, and establishing a Bluetooth connection with the fourth terminal device through the second headset, including: If Bluetooth connection requests sent by a third terminal device and a fourth terminal device are received within a first time period, the Bluetooth connection request sent by the third terminal device is processed by the first earphone, and a Bluetooth connection is established with the third terminal device, and the Bluetooth connection request sent by the fourth terminal device is processed by the second earphone, and a Bluetooth connection is established with the third terminal device.

15. The method according to claim 13, characterized in that If it is detected that the device to be connected to the headset device includes a third terminal device and a fourth terminal device, establishing a Bluetooth connection with the third terminal device through the first headset, and establishing a Bluetooth connection with the fourth terminal device through the second headset, including: When the earphone device is in a reconnecting state, a first connection request is sent to a third terminal device to be reconnected through the first earphone, and a second connection request is sent to a fourth terminal device to be reconnected through the second earphone, wherein the first connection request is used to reconnect with the third terminal device, and the second connection request is used to reconnect with the fourth terminal device.

16. The method according to any one of claims 1 to 4, 10 to 12, and 14 to 15, characterized in that: The Bluetooth connection includes any one of a classic Bluetooth connection and a Bluetooth low energy BLE connection.

17. A Bluetooth connection device, characterized in that: Applied to a headphone device, the headphone device includes a first headphone and a second headphone, and the device includes: a connection module, configured to, when the headset device establishes Bluetooth connections with N first terminal devices respectively, disconnect the headset device via the first headset upon receiving a Bluetooth connection request sent by a second terminal device, and process the Bluetooth connection request in parallel via the second headset, so that the headset device establishes a Bluetooth connection with the second terminal device; The disconnection process is used to disconnect the Bluetooth connection between the headset device and the target terminal device among the N first terminal devices; N is the maximum number of Bluetooth connections supported by the headset device, and N is a positive integer greater than or equal to 1; The Bluetooth connection device further includes a pairing module; The pairing module is used to enter the pairing state according to the pairing instruction and maintain the Bluetooth connection with the N first terminal devices.

18. An earphone 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 16.

19. 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 16 is implemented.

Citation Information

Patent Citations

  • Communication connection building method and relevant equipment

    CN108901080A

  • Bluetooth earphone and terminal connection method and system and storage medium

    CN111246441A

  • Wireless communication method for ear-to-ear earphone and intelligent device and wireless earphone assembly

    CN111934724A

  • Master-slave earphone switching method and device, earphone and readable storage medium

    CN113365257A

  • Device switching method and related device

    WO2021129529A1