CN115776662A - Bluetooth connection method, device, earphone device and computer readable storage medium - Google Patents

Bluetooth connection method, device, earphone device and computer readable storage medium Download PDF

Info

Publication number
CN115776662A
CN115776662A CN202111050877.8A CN202111050877A CN115776662A CN 115776662 A CN115776662 A CN 115776662A CN 202111050877 A CN202111050877 A CN 202111050877A CN 115776662 A CN115776662 A CN 115776662A
Authority
CN
China
Prior art keywords
earphone
terminal device
bluetooth connection
terminal
headset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111050877.8A
Other languages
Chinese (zh)
Inventor
包建全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202111050877.8A priority Critical patent/CN115776662A/en
Priority to PCT/CN2022/117541 priority patent/WO2023036178A1/en
Publication of CN115776662A publication Critical patent/CN115776662A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

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

Abstract

The embodiment of the application discloses a Bluetooth connection method, a Bluetooth connection device, earphone equipment and a computer readable storage medium. The method is applied to earphone equipment which comprises a first earphone and a second earphone, and comprises the following steps: under the condition that the earphone device and N first terminal devices respectively establish Bluetooth connection, if a Bluetooth connection request sent by a second terminal device is received, disconnection processing is carried out through the first earphone, and the Bluetooth connection request is processed through the second earphone, so that the earphone device and the second terminal device establish Bluetooth connection; the N is the maximum number of the Bluetooth connections supported to be established by the earphone equipment, and is an integer greater than or equal to 1. The Bluetooth connection method, the Bluetooth connection device, the earphone device and the computer readable storage medium can improve the speed of the second terminal device for connecting the earphone device in a robbing mode and improve the connection efficiency.

Description

Bluetooth connection method, device, earphone device and computer readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a bluetooth connection method and apparatus, an earphone device, and a computer-readable storage medium.
Background
Bluetooth is a radio technology supporting short-range communication of devices, and enables wireless information exchange between a plurality of electronic devices supporting bluetooth transmission, so that data transmission between the electronic devices is more rapid and efficient. At present, under the condition that the electronic device a has established bluetooth communication connection with the electronic device B, if another electronic device C seizes the bluetooth connection between the electronic device B and the electronic device a, the connection preemption speed is slow, and the connection preemption efficiency is affected.
Disclosure of Invention
The embodiment of the application discloses a Bluetooth connection method, a Bluetooth connection device, earphone equipment and a computer readable storage medium, which can improve the speed of the second terminal equipment in connecting the earphone equipment in a robbing mode and improve the connection efficiency in the robbing mode.
The embodiment of the application discloses a Bluetooth connection method, which is applied to earphone equipment, wherein the earphone equipment comprises a first earphone and a second earphone, and the method comprises the following steps:
under the condition that the earphone device and N first terminal devices respectively establish Bluetooth connection, if a Bluetooth connection request sent by a second terminal device is received, disconnection processing is carried out through the first earphone, and the Bluetooth connection request is processed through the second earphone, so that the earphone device and the second terminal device establish Bluetooth connection;
the disconnection processing is used for disconnecting the Bluetooth connection between the earphone equipment and target terminal equipment in the N first terminal equipment; and N is the maximum number of the Bluetooth connections which are supported and established by the earphone equipment, and is an integer which is greater than or equal to 1.
The embodiment of the application discloses bluetooth connecting device is applied to earphone equipment, earphone equipment includes first earphone and second earphone, the device includes:
the connection module is used for performing disconnection processing through the first earphone and processing the Bluetooth connection request through the second earphone so as to establish Bluetooth connection between the earphone equipment and the second terminal equipment if the connection module receives the Bluetooth connection request sent by the second terminal equipment under the condition that the earphone equipment and the N first terminal equipment respectively establish Bluetooth connection;
the disconnection processing is used for disconnecting the Bluetooth connection between the earphone equipment and target terminal equipment in the N first terminal equipment; and N is the maximum number of the Bluetooth connections which are supported and established by the earphone equipment, and is a positive integer which is greater than or equal to 1.
The embodiment of the application discloses an earphone device, which 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 is enabled to realize the method.
An embodiment of the present application discloses a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method as described above.
According to the Bluetooth connection method, the Bluetooth connection device, the earphone device and the computer readable storage medium, under the condition that the earphone device and N first terminal devices are respectively connected in a Bluetooth mode, if a Bluetooth connection request sent by a second terminal device is received, disconnection processing is conducted through the first earphone, the Bluetooth connection request is processed through the second earphone, so that the earphone device and the second terminal device are connected in the Bluetooth mode, the disconnection processing is used for disconnecting the Bluetooth connection between the earphone device and a target terminal device in the N first terminal devices, N is the maximum number of the Bluetooth connection supported and established by the earphone device, when the earphone device occupies the Bluetooth connection condition, disconnection and connection establishment are conducted through the first earphone and the second earphone in parallel respectively, the connection robbing speed of the second terminal device to the earphone device can be improved, and the connection robbing efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a diagram illustrating an exemplary embodiment of a Bluetooth connection method;
FIG. 2 is a flow diagram of a method for Bluetooth connectivity in one embodiment;
FIG. 3 is a flow chart of a Bluetooth connection method in another embodiment;
FIG. 4 is a schematic interface diagram of a first terminal device in one embodiment;
FIG. 5A is an interaction timing diagram of a Bluetooth connection method in one embodiment;
FIG. 5B is an interaction timing diagram of a Bluetooth connection method in another embodiment;
fig. 6 is a flowchart illustrating parallel establishment of bluetooth connections between a first headset and a second headset and two terminal devices, respectively, according to an embodiment;
fig. 7A is an interaction timing diagram illustrating that the earphone device is connected to two terminal devices respectively in one embodiment;
fig. 7B is an interaction timing diagram of the headset device respectively connecting to two terminal devices in another embodiment;
fig. 7C is an interaction timing diagram of the earphone device respectively connecting to two terminal devices in yet another embodiment;
FIG. 8 is a block diagram of a Bluetooth connection device in one embodiment;
fig. 9 is a block diagram of the headphone apparatus in one embodiment.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
It is to be noted that the terms "comprises" and "comprising" and any variations thereof in the examples and figures of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements should not be limited by these terms. These terms are only used to distinguish one element from another. 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 the present application. The first and second earphones are both earphones, but not the same earphone. In addition, the terms "plurality" or the like used in the embodiments of the present application mean two or more.
Fig. 1 is a diagram illustrating an application scenario of the bluetooth connection method in one embodiment. As shown in fig. 1, the headset device 10 may establish a bluetooth communication connection with one or more first terminal devices 20, the headset device 10 may include, but is not limited to, a headset, an in-ear headset, an earplug, a supra-aural headset, etc., and further, the headset device 10 may be a Wireless bluetooth headset, such as a True Wireless Stereo (TWS) bluetooth headset, etc. The first terminal device 20 may include, but is not limited to, a wearable device (e.g., a bracelet, a smart watch, smart glasses, etc.), a vehicle-mounted terminal, a mobile phone, a tablet computer, a notebook computer, etc.
When the number of the first terminal devices 20 that maintain bluetooth connection with the earphone device 10 reaches the maximum number N of the bluetooth connections that the earphone device 10 can support, if the earphone device 10 receives a bluetooth connection request sent by the second terminal device 30, the earphone device 10 is in a connection preemption scenario, and the second terminal device 30 needs to preempt a bluetooth connection between the first terminal device 20 and the earphone device 10. The second terminal device 30 may include, but is not limited to, a wearable device, a vehicle-mounted terminal, a mobile phone, a tablet computer, a notebook computer, and the like.
In the related art, when the headset device 10 is in the connection preemption scenario, the headset device 10 needs to disconnect the bluetooth connection with a first terminal device 20 first, and then can respond to the bluetooth connection request sent by the second terminal device 30, which causes the speed of the second terminal device 30 connecting the headset device 10 in a preemption manner to be slow, and affects the connection preemption efficiency.
The embodiment of the application provides a bluetooth connection method and device, an earphone device and a computer readable storage medium, which can improve the connection robbing speed of a second terminal device 30 to the earphone device 10 and improve the connection robbing efficiency.
The headset device 10 may include a first headset 110 and a second headset 120. Taking the example of the headset device 10 as a TWS headset, in some embodiments, the first headset 110 and the second headset 120 may distinguish between master and slave headsets. In the related art, taking an example that the earphone device 10 is connected to a terminal device, a master earphone of the first earphone 110 and the second earphone 120 establishes a bluetooth connection with the terminal device, a slave earphone establishes a bluetooth connection with the master earphone, and the slave earphone can acquire connection information between the master earphone and the terminal device through the bluetooth connection with the master earphone, so that communication between the master earphone and the terminal device can be monitored in a monitoring manner, and synchronization between the master earphone and the slave earphone is realized. As an implementation manner, the master earphone may also establish a bluetooth connection with the terminal device, and the master earphone establishes a bluetooth connection with the slave earphone, and the master earphone forwards the data sent by the terminal device to the slave earphone after receiving the data, and realizes synchronization of the master earphone and the slave earphone. Under the condition of no conflict, the above several bluetooth connection manners may all be applicable to the scheme of the bluetooth connection method provided in the embodiment of the present application.
In this embodiment, under the condition that the headset device 10 and the N first terminal devices 20 respectively establish bluetooth connections, if a bluetooth connection request sent by the second terminal device 30 is received, that is, the headset device 10 is in a connection robbing scenario, disconnection processing may be performed by the first headset 110, and the bluetooth connection request is processed by the second headset 120, so that the headset device 10 and the second terminal device 30 establish bluetooth connections, where the disconnection processing is used to disconnect the bluetooth connections between the headset device 10 and target terminal devices in the N first terminal devices 20. The first earphone 110 and the second earphone 120 perform disconnection and connection establishment in parallel, and the earphone device 10 does not need to respond to the connection request sent by the second terminal device 30 after completing the bluetooth disconnection with the target terminal device, so that the connection snatching speed of the second terminal device 30 for the earphone device 10 can be increased, and the connection snatching efficiency can be improved.
It should be noted that fig. 1 only shows a scenario in which the headset device 10 can support bluetooth connections with two terminal devices, that is, a scenario in which the headset device 10 supports "one-to-two", but the embodiment of the present application is also applicable to a scenario in which the headset device 10 supports "one-to-one", "one-to-three", "one-to-four" \ 8230 \8230 \ 8230, and the like, and the maximum number of bluetooth connections specifically supported by the headset device is not limited in the embodiment of the present application.
In one embodiment, as shown in fig. 2, a bluetooth connection method is provided, which can be applied to the above-mentioned headset apparatus, and the headset apparatus can include a first headset and a second headset. The method may comprise the steps of:
step 210, receiving a bluetooth connection request sent by the second terminal device, under the condition that the headset device and the N first terminal devices respectively establish bluetooth connections.
In this embodiment, N may be the maximum number of bluetooth connections that the headset device supports to establish, that is, the maximum number of terminal devices that the headset device can simultaneously maintain the bluetooth connections, and N may be an integer greater than or equal to 1, for example, N may be 1, 2, 3, 5, and the like, which is not limited herein.
It can be understood that, the establishing of the bluetooth connection between the headset device and the N first terminal devices may refer to the maintaining of the bluetooth connection between the headset device and the N first terminal devices.
It can be understood that, in the case that the headset device establishes bluetooth connections with the N first terminal devices respectively, the method may include: and respectively establishing Bluetooth connection between the earphone equipment and the N first terminal equipment, wherein the earphone equipment is in a connectable state. The earphone device being in a connectable state may refer to the earphone device being in a page scan mode, where a bluetooth connection request sent by another terminal device can be received in the page scan mode. Further, the bluetooth connection request may be a paging (page) packet, and the other terminal device may transmit the paging packet in a frequency hopping manner to page the headset device, and the headset device may scan (scan) the paging packet transmitted from the outside at regular intervals, and if the headset device scans the paging packet transmitted from the other terminal device, it may be considered that the bluetooth connection request is received. The specific process of the bluetooth connection can refer to the specification of the bluetooth standard protocol.
In some embodiments, the second terminal device may be a terminal device that is unpaired with the earphone device. When the headset device is in the pairing state, the pairing state may refer to that the headset device opens an inquiry scan mode and opens a page scan mode, the headset device is allowed to be scanned and searched by other terminal devices in the inquiry scan mode, and the headset device is allowed to be connected by other devices in the page scan mode, that is, in the pairing state, the headset device is in the discoverable state and the connectable state at the same time. The second terminal device may scan for the headset device and send a bluetooth connection request to the headset device to request a bluetooth connection with the headset device. It will be appreciated that if the second terminal device is not paired with the headset device, the pairing will take place during the establishment of the bluetooth connection.
In some embodiments, the second terminal device may also be a terminal device that has been paired with the headset device before, and the second terminal device may send a bluetooth connection request to the headset device according to the stored device information corresponding to the headset device to request to establish bluetooth connection with the headset device.
Under the condition that the earphone device and the N first terminal devices respectively establish Bluetooth connection, the Bluetooth connection which can be supported by the earphone device reaches the maximum number, if the earphone device receives a Bluetooth connection request sent by the second terminal device, the Bluetooth connection with one first terminal device needs to be disconnected, the earphone device can successfully establish the Bluetooth connection with the second terminal device, and equivalently, the second terminal device preempts the Bluetooth connection between the one first terminal device and the earphone device. That is, under the condition that the earphone device and the N first terminal devices respectively establish bluetooth connections, if the earphone device receives a bluetooth connection request sent by the second terminal device, the earphone device is in a connection robbing scene.
And step 220, performing disconnection processing through the first earphone, wherein the disconnection processing is used for disconnecting the Bluetooth connection between the earphone device and a target terminal device in the N first terminal devices.
Step 230, the bluetooth connection request is processed through the second headset, so that the headset device establishes a bluetooth connection with the second terminal device.
When the earphone device is in a connection emergency scene, the Bluetooth connection with a first terminal device needs to be disconnected, in the embodiment of the application, disconnection processing can be performed through a first earphone of the earphone device, a Bluetooth connection request can be processed through a second earphone of the earphone device, and disconnection operation and connection operation can be performed on the first earphone and the second earphone in parallel.
The first earphone can determine a target terminal device from the N first terminal devices and sends a disconnection instruction to the target terminal device, wherein the disconnection instruction is used for disconnecting the Bluetooth connection with the target terminal device.
In some embodiments, if N is 1, that is, the earphone device establishes a bluetooth connection with only one first terminal device, 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 bluetooth connections with the plurality of first terminal devices, the first headset may select one of the first terminal devices as a target terminal device from the plurality of first terminal devices.
Optionally, the target terminal device may be any one of the first terminal devices, and the first earphone 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 according to the priority of each first terminal device, or the first terminal device with the lowest activity (i.e., the least amount of data to be transmitted) may be selected as the target terminal device, but is not limited thereto.
The first earphone may obtain a device identifier of the target terminal device, where the device identifier may include, but is not limited to, a Media Access Control (MAC) address of the target terminal device, and send a disconnection instruction to the target terminal device according to the device identifier, so as to disconnect a bluetooth connection between the earphone device and the target terminal device.
Under the condition that 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 so that the earphone device and the second terminal device can establish Bluetooth connection, and therefore the time for switching devices can be reduced.
In some embodiments, the headset device may include a master headset and a slave headset, and when the headset device establishes a bluetooth connection with the N first terminal devices, the master headset establishes a bluetooth physical link with the N first terminal devices, and may directly perform data transmission with the N first terminal devices. The slave earphone can monitor the Bluetooth physical link between the master earphone and the N first terminal devices, or the master earphone synchronizes data sent by the first terminal devices to the slave earphone, and the slave earphone is not directly connected with the N first terminal devices. The bluetooth physical link may include, but is not limited to, physical links such as ACL (Asynchronous Connectionless).
Alternatively, the first earphone may be a master earphone of the earphone device, and the second earphone may be a slave earphone of the earphone device. The first earphone can be respectively connected with the N first terminal devices in a Bluetooth mode, and Bluetooth connection is established between the first earphone and the second earphone. As an implementation manner, if the first earphone receives data sent by any first terminal device, the first earphone sends the data to the second earphone through bluetooth connection with the second earphone, so as to implement master-slave synchronization. As another embodiment, the first earphone may synchronize connection information of each first terminal device with the second earphone through bluetooth connection with the second earphone, so that the second earphone monitors bluetooth connection between the first earphone and the N first terminal devices according to the connection information, thereby implementing master-slave synchronization.
When the earphone device is in a connection robbing scene, the first earphone can be directly disconnected from the Bluetooth connection with the target terminal device and sends a disconnection instruction to the target terminal device. The second earphone can establish Bluetooth connection with the second terminal equipment according to the Bluetooth connection request sent by the second terminal equipment, and after the Bluetooth connection with the second terminal equipment is successfully established, the connection information of the second terminal equipment is synchronously sent to the first earphone, so that the Bluetooth connection object of the second terminal equipment is switched to the first earphone, namely the Bluetooth connection between the second earphone and the second terminal equipment is switched to the Bluetooth connection between the first earphone and the second terminal equipment.
Alternatively, the first earphone may be a slave earphone of the earphone device, and the second earphone may be a master earphone of the earphone device. When the earphone device is in a connection robbing scene, the first earphone can monitor the Bluetooth connection between the second earphone and the target terminal device, and sends a disconnection request to the target terminal device on a transmission channel between the second earphone and the target terminal device, wherein the disconnection request can be used for triggering the Bluetooth connection between the target terminal device and the second earphone to be disconnected. The second headset may process a bluetooth request sent by the second terminal device and establish a bluetooth connection with the second terminal device.
In some embodiments, establishing a bluetooth connection as referred to above may include establishing a bluetooth physical link, such as an ACL physical link.
In the embodiment of the application, when the earphone device is in a connection grabbing scene, the first earphone and the second earphone of the earphone device can perform disconnection operation of the target disconnection terminal device and bluetooth connection operation with the second terminal device in parallel, the earphone device does not need to wait for the connection request sent by the second terminal device after disconnection processing is completed, connection grabbing speed of the second terminal device to the earphone device can be improved, and connection grabbing efficiency is improved.
In another embodiment, as shown in fig. 3, a bluetooth connection method is provided, which can be applied to the above-mentioned earphone device, and the method can include the following steps:
step 302, receiving a bluetooth connection request sent by a second terminal device, under the condition that the headset device and N first terminal devices respectively establish bluetooth connections.
The description of step 302 may refer to the related descriptions in the above embodiments, and is not repeated herein.
In some embodiments, the second terminal device may be a device that has not been paired with the headset device. Under the condition that the earphone device and the N first terminal devices are respectively connected in a Bluetooth mode, if the earphone device enters a pairing state, in the related technology, the earphone device can be directly disconnected from the Bluetooth connection between at least part of the first terminal devices, even if no second terminal device requests connection with the earphone device, the earphone device and the at least part of the first terminal devices are also in a disconnected state, and the user needs to manually restore the Bluetooth connection again.
In this embodiment of the application, under the condition that the headset device and the N first terminal devices respectively establish bluetooth connections, the headset device may enter a pairing state according to the pairing instruction and maintain the bluetooth connections with the N first terminal devices. The earphone equipment is in a pairing state, an inquiry scan mode and a page scan mode are started in the pairing state, the earphone equipment can be scanned by the second terminal equipment, and the earphone equipment can receive a Bluetooth connection request sent by the second terminal equipment. The second terminal device can start a scanning mode and scan the surrounding bluetooth devices, the second terminal device can send a scanning request (inquiry request) to the headset device, and the headset 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 response) to the second terminal device according to the scanning request.
Optionally, after the second terminal device receives the scan response, device information of the headset device, such as a device name and an MAC address of the headset device, may be acquired, and the device information may be displayed. The user of the second terminal device can perform selection operation aiming at the device information so as to trigger the second terminal device to be connected with the earphone device. After the second terminal device receives the selection operation, a bluetooth connection request can be sent to the headset device according to the device information of the headset device. After the earphone device receives the Bluetooth connection request, disconnection processing is carried out through the first earphone, and the Bluetooth connection request is processed through the second earphone. The earphone device does not need to disconnect the Bluetooth connection between the earphone device and at least part of the first terminal devices after entering the pairing state, so that the situation that the Bluetooth connection needs to be manually recovered by a user due to the fact that no second terminal device requests to establish the Bluetooth connection with the earphone device can be avoided, and the requirement of the user is met.
In some embodiments, the manner in which the headset device enters the pairing state according to the pairing instruction may include, but is not limited to, any of the following manners:
the method comprises the steps of receiving a pairing instruction sent by an earphone charging box, and entering a pairing state according to the pairing instruction. The headset device may be a wireless bluetooth headset and may be equipped with a headset charging box that mates with the headset device, which may be used to charge the headset device. When the headset equipment is required to enter a pairing state, a user can place a first headset and a second headset in the headset equipment into a headset charging box, and the headset charging box can send a pairing instruction to the first headset and/or the second headset placed into the headset charging box according to detected pairing operation.
Alternatively, a pairing button may be provided on the headphone charging box, and the pairing operation may be a pressing operation for the pairing button. The pairing operation can also be a cover opening operation of the earphone charging box and the like, when the first earphone and the second earphone are placed in the earphone charging box, if the cover 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.
And secondly, receiving a pairing instruction sent by any first terminal device, and entering a pairing state according to the pairing instruction. The user can control any first terminal equipment which is connected with the earphone equipment in a Bluetooth mode to enable the earphone equipment to enter a pairing state, the first terminal equipment can respond to starting operation of the pairing state triggered by the user, and a pairing instruction is sent to the earphone equipment through the Bluetooth connection.
As an embodiment, the above-mentioned starting operation of the pairing state may include a triggering operation for a pairing option displayed by the first terminal device. The first terminal device can display a management interface of the earphone device, the management interface can include a pairing control, and if the first terminal device detects a trigger operation for the pairing control, a pairing instruction can be sent to the earphone device through Bluetooth connection so as to control the earphone device to enter a pairing state.
Exemplarily, fig. 4 is an interface schematic diagram of a first terminal device in an embodiment. As shown in fig. 4, the first terminal device 20 may display a bluetooth headset and pairing control 202, and the user may click the pairing control 202, and the first terminal device 20 may send a pairing instruction to the headset device 10.
As another embodiment, the pairing operation may also be preset touch operation, gesture operation, voice control operation, or other interactive operations, and may be set according to actual requirements, and the specific operation mode of the pairing operation is not limited in this embodiment of the application.
In this application embodiment, utilize the first terminal equipment who establishes the bluetooth with earphone equipment, control earphone equipment and get into the state of pairing, need not to put into earphone charging box with earphone equipment, convenient and fast more, raises the efficiency.
And thirdly, responding to the detected pairing triggering operation, generating a pairing instruction, and entering a pairing state according to the pairing instruction.
In some embodiments, one or more different sensors may be provided in the headset device, such as, but not limited to, a distance sensor, a touch sensor, a pressure sensor, a temperature sensor, and the like. The pairing triggering operation mode may be preset, for example, a pressing operation, a touch operation, a distance sensing operation, and the like, the earphone device may acquire user interaction data through the sensor, for example, information such as touch duration, touch position, touch frequency, and the like may be acquired through the touch sensor, information such as pressing intensity, pressing duration, pressing frequency, and the like may be acquired through the pressure sensor, and whether the user interaction data matches with a preset pairing triggering operation mode is determined, and if the user interaction data matches with the preset pairing triggering operation mode, the detected pairing triggering operation may be determined, and a pairing instruction may be generated and a pairing state may be performed. The user directly can control the earphone equipment to get into the pairing state through interacting with the earphone equipment, need not to put into the earphone charging box with the earphone equipment, and convenient and fast more improves efficiency.
It should be noted that other ways may also be used to trigger the earphone device to enter the pairing state, which are not limited to the above-mentioned several ways, and this is not limited by the embodiment of the present application.
In other embodiments, the second terminal device may be a device that has been paired with the headset device. The earphone device can be in a connectable state (namely, a page scan mode is started), and can receive a Bluetooth connection request sent by other electronic devices to the earphone device. The second terminal device may have stored therein a connection record of the headset device, which may include, but is not limited to, some or all of the following: MAC address of the headset device, pairing information (e.g., key, pairing code, etc.), and the like. The second terminal device may send a bluetooth connection request to the headset device according to the connection record. In a specific bluetooth connection process, reference may be made to a corresponding bluetooth protocol.
In other embodiments, when said N is greater than 1, the headphone apparatus is in a connectable state. Wherein the connectable state may be that the earphone device is in a page scan mode. It can be understood that when N is greater than 1, that is, when the headset can support two or more terminal devices (i.e., one is driving more), the headset device can be controlled to be always in a connectable state in a use process (e.g., the headset device is not in a charging state), so that a bluetooth connection request of a second terminal device can be accepted, and the convenience in operation of the one-driving-more scheme is improved. It is understood that the earphone device is in a connectable state, one of the earphones may be in a connectable state, or both earphones may be in a connectable state.
And 304, performing disconnection processing corresponding to the target terminal equipment through the first earphone so as to disconnect the Bluetooth connection with the target terminal equipment.
Step 306, the bluetooth connection request is processed through the second headset, and bluetooth connection with the second terminal device is established.
Under the condition that the earphone device and the N first terminal devices respectively establish Bluetooth connection, if the earphone device receives a Bluetooth connection request sent by the second terminal device, disconnection processing aiming at a target terminal device in the N first terminal devices can be carried out through the first earphone, and disconnection operation and connection operation are carried out in parallel through the second earphone in the Bluetooth connection request.
In some embodiments, before performing disconnection processing corresponding to the target terminal device through the first headset, the method may further include: and determining the target terminal equipment in the N first terminal equipments.
For example, a target terminal device may be selected from the N first terminal devices through the first headset, and disconnection processing corresponding to the target terminal device may be performed. In some embodiments, the first terminal device with the priority meeting the priority condition may be selected from the N first terminal devices as the target terminal device through the first earphone according to the priority of each first terminal device.
The first earphone may obtain a priority corresponding to each first terminal device that establishes the bluetooth connection, and optionally, the priority of each first terminal device may be determined according to the device state parameter of each first terminal device. The device status parameters may include, but are not limited to, one or more of a traffic data output parameter, a sequence parameter for characterizing a sequence 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 may be used to represent whether the first terminal device outputs service data to the headset device through the bluetooth connection currently. The priority of the first terminal device currently outputting the service data to the earphone device may be higher than the priority of the first terminal device not currently outputting the service data to the earphone device.
The sequence parameter may be used to characterize the sequencing of establishing a bluetooth connection with the headset device. As an implementation manner, the first headset may store a connection time at which each first terminal device has recently established bluetooth connection with the headset device, and determine a connection duration of the current connection of each first terminal device according to the connection time corresponding to each first terminal device, where the connection duration is a duration from the connection time to the current time. The sequence parameter of each first terminal device can be determined according to the connection duration of each first terminal device, and the longer the connection duration is, the earlier the sequence indicated by the sequence parameter is, that is, the earlier the first terminal device establishes bluetooth connection with the headset device.
As another embodiment, the first headset may also establish a connection queue, and the device information of each first terminal device may be sequentially stored in the connection queue according to an order in which each first terminal device establishes a bluetooth connection with the headset device, and the earlier first terminal device is arranged in the connection queue, which indicates that the earlier the first terminal device establishes a bluetooth connection with the headset device. Alternatively, the priority of the first terminal device that establishes the bluetooth connection with the headphone device earlier may be lower.
The device type parameter may be used to characterize a device type of the first terminal device, and the device type may include, but is not limited to, a mobile phone, a smart watch, a bracelet, a smart home, and the like. The priority corresponding to each device type can be preset, and the first earphone can determine the device type of each first terminal device according to the device type parameter of each first terminal device and acquire the priority corresponding to the device type of the first terminal device.
The device remaining capacity parameter may be used to represent a current remaining capacity of the first terminal device, and the priority of the first terminal device with a large device remaining capacity may be higher than the priority of the first terminal device with a small device remaining capacity.
The historical connection frequency may be used to characterize the historical connection of the first terminal device to the earphone device, and may be the connection frequency over a past period of time (e.g., over the past 1 week, over the past 1 month), etc. The first headset may store connection status data of each terminal device and the headset device, where the connection status data may include device information, connection time, connection duration, and the like of each terminal device. The first earphone can count the historical connection frequency of the N first terminal devices which are currently connected with the earphone device in a past period of time according to the stored connection condition data. The priority of the first terminal device whose historical connection frequency is high may be higher than the priority of the first terminal device whose historical connection frequency is low.
The first earphone can determine the corresponding priority of each first terminal device according to one or more device state parameters of each first terminal device. If the corresponding priority of each first terminal device is determined according to the multiple device state parameters, the weight can be respectively distributed aiming at each device state parameter. Taking the device a in the first terminal device as an example, the device a may be any first terminal device, and the reference priority corresponding to each device state parameter may be determined according to each device state parameter of the device a, for example, if the service data output parameter of the device a is 1, which indicates that the current forward earphone device outputs service data, the reference priority corresponding to the service data output parameter may be 4; the device remaining capacity parameter of the device a indicates that the current remaining capacity of the device a is greater than 50%, and the reference priority corresponding to the device remaining capacity may be 2. And then according to the reference priority corresponding to each equipment state parameter of the equipment A and the distribution weight of each equipment state parameter, performing weighted sum calculation or weighted average calculation to obtain the priority corresponding to the equipment A.
It should be noted that the manner of determining the priority of each first terminal device is not limited to the above several manners, for example, the priority rule may also be directly set, where the priority of the first terminal device currently outputting the service data to the earphone device is the highest, and the priority of the first terminal device currently not outputting the service data to the earphone device is the lowest among the first terminal devices currently not outputting the service data to the earphone device, and the priority of each first terminal device may be determined based on the priority rule and the device state parameters of each first terminal device.
The first earphone selects a first terminal device with a priority meeting a priority condition from the N first terminal devices as a target terminal device, wherein the priority condition can optionally comprise any one of a priority lower than a priority threshold, a priority lowest and the like. Further, 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 the priority lower than the priority threshold, and if there are a plurality of first terminal devices with the priorities lower than the priority threshold, one of the first terminal devices 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. The target terminal equipment is determined based on the priority of each first terminal equipment, so that the target terminal equipment disconnected from the Bluetooth can better meet the requirements of users, and the adverse effect on the normal use of the users caused by the disconnection of the Bluetooth can be reduced.
It should be noted that the priority of each first terminal device may be changed according to specific situations, and is not necessarily fixed. It can be understood that, before the headset device does not receive the bluetooth connection request, if the priority of a certain first terminal device changes, the target terminal device is selected according to the latest priority of each first terminal device when the bluetooth connection request is received.
For example, when the headset device receives the bluetooth connection request, if each first terminal device does not transmit service data to the headset device, the first terminal device a connected first may be preferentially disconnected 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 and the like) to the headset device before the headset device receives the bluetooth connection request, the priority of the first terminal device a changes, at this time, if the headset device receives the bluetooth connection request, the bluetooth connection with the first terminal device a cannot be disconnected, and at this time, which first terminal device is specifically disconnected is determined according to the set priority rule. Therefore, the earphone equipment is disconnected not when entering the pairing state, but after receiving the Bluetooth connection request, the earphone equipment is disconnected to a greater extent, the earphone is ensured to be used by a user, the switching speed of the terminal equipment is further shortened by adopting the parallel processing of the first earphone and the second earphone, and the user experience is improved.
After the target terminal device is determined, the first earphone can send a disconnection instruction to the target terminal device so as to disconnect the Bluetooth connection with the target terminal device. Optionally, the second earphone may also determine the target terminal device from the N first terminal devices, send the device identifier of the target terminal device to the first earphone, and trigger the first earphone to disconnect the bluetooth connection with the target terminal device.
In the process of disconnection processing of the first earphone, the second earphone can process the Bluetooth connection request sent by the second terminal device in parallel. As an implementation manner, the second terminal device may be a terminal device that is not paired with the earphone device, the second earphone may respond to the bluetooth connection request and establish a bluetooth connection with the second terminal device, and the second earphone and the second terminal device are paired during the process of establishing the bluetooth connection, and the pairing may include processes of exchanging pairing codes and agreeing a key between the pairing codes and the second terminal device, so as to ensure the security of transmission.
As another embodiment, the second terminal device may be a terminal device already paired with the headset device, and the second headset may establish a physical link, such as an ACL link, with the second terminal device in response to a bluetooth connection request sent by the second terminal device.
And 308, synchronizing the disconnection information of the target terminal equipment to the second earphone through the first earphone.
Step 310, synchronizing the connection information of the second terminal device to the first headset through the second headset.
Alternatively, the first earphone may be a master earphone and the second earphone may be a slave earphone. After the first earphone completes disconnection processing, the first earphone can synchronously disconnect information to the second earphone, the disconnection information at least comprises equipment information of target terminal equipment disconnected with Bluetooth, and the second earphone can not monitor Bluetooth connection between the target terminal equipment and the first earphone any more.
After the second headset successfully establishes a bluetooth connection with the second terminal device, the second headset may synchronize connection information of the second terminal device, which may include, but is not limited to, frequency hopping information, channel information, clock information, etc., to the first headset.
In one embodiment, after synchronizing the connection information of the second terminal device to the first headset through the second headset, the bluetooth connection object of the second terminal device can be switched from the second headset to the first headset, and the second headset monitors the bluetooth connection between the first headset 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 may be 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.
After the connection information is acquired, the first earphone can directly perform data transmission with the second terminal device based on the connection information, the physical link transition between the second earphone and the second terminal device is switched 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 to the first earphone from the second earphone. The second earphone can monitor a physical link between the first earphone and the second terminal device, or the first earphone forwards data transmitted between the first earphone and the second terminal device to the second earphone, so that master-slave synchronization is realized. Through the information synchronization between the earphones, all terminal equipment which establishes the Bluetooth connection with the earphone equipment adopts a mode that a first earphone (namely a main earphone) is connected, and a second earphone (namely a slave earphone) monitors or receives data forwarded by the first earphone, so that the connected terminal equipment is more conveniently managed and data is transmitted.
FIG. 5A is an interaction timing diagram of a Bluetooth connection method in one embodiment. As shown in fig. 5A, the headset device may be a device supporting bluetooth "one-to-two", and the headset device may establish bluetooth connections with the terminal device a and the terminal device B, respectively. The earphone device is in a connectable state (in a page scan mode), the terminal device C may be a device paired with the earphone device, and the terminal device C may send a bluetooth connection request to the earphone device according to the previously stored information of the earphone device. After receiving the bluetooth connection request sent by the terminal device C, the first headset may perform disconnection processing corresponding to the target terminal device (e.g., the terminal device B in fig. 5A), and the second headset may process the bluetooth connection request. After the first earphone is disconnected from the Bluetooth connection with the target terminal device, the first earphone can synchronously disconnect information to the second earphone, and after the second earphone successfully establishes the Bluetooth connection with the terminal device C, the second earphone can synchronously connect information to the first earphone, so that information synchronization is realized, and a Bluetooth connection object of the terminal device C is switched to the first earphone from the second earphone.
Fig. 5B is an interaction timing diagram of the bluetooth connection method in another embodiment. As shown in fig. 5B, the headset device may be a device supporting bluetooth "one-to-two", and the headset device may establish bluetooth connections with the terminal device a and the second device B, respectively. The terminal device C may be a device which is not paired with the earphone device, and the earphone device may enter a pairing state and first keep bluetooth connection with the terminal device a and the terminal device B when entering the pairing state. The terminal device C may send a scan request to the headset device, and after receiving the scan request, the headset device may send a scan response to the terminal device C through the first headset or the second headset. The earphone device is in an inquiry scan mode and a page scan mode simultaneously in a pairing state, and when the terminal device C determines that Bluetooth connection is required to be performed with the earphone device, a Bluetooth connection request can be sent to the earphone device. After receiving the bluetooth connection request sent by the terminal device C, the headset device may perform disconnection processing corresponding to a target terminal device (for example, terminal device B in fig. 5B), and the second headset may process the bluetooth connection request, perform bluetooth connection with the terminal device C, and pair with the terminal device C in the process of performing bluetooth connection. After the first earphone is disconnected from the target terminal device, the first earphone can synchronously disconnect information to the second earphone, and after the second earphone is successfully connected with the terminal device C in a Bluetooth mode, the second earphone can synchronously connect information to the first earphone, information synchronization is achieved, and the Bluetooth connection object of the terminal device C is switched to the first earphone from the second earphone.
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, and further, the first headset may further establish service connections such as A2DP (Advanced Audio Distribution Profile, bluetooth Audio transmission model agreement) and HFP (portable-free Profile) with the second terminal device on the basis of the bluetooth physical link, so that the second terminal device may transmit service data such as Audio data and voice data to the first headset.
In the embodiment of the application, when the earphone device has the condition that the second terminal device occupies the bluetooth connection, the disconnection operation and the connection operation are performed in parallel through the first earphone and the second earphone respectively, so that the connection speed of the second terminal device to the earphone device can be increased, and the connection efficiency can be increased. And after the disconnection operation and the connection operation are completed, the first earphone and the second earphone carry out information synchronization, so that the Bluetooth connection object of the second terminal equipment is switched to the first earphone from the second earphone, all the established Bluetooth connections can be managed more conveniently, and the data transmission efficiency is ensured.
As shown in fig. 6, in some embodiments, the bluetooth connection method may further include the following steps:
step 602, in a situation that the headset device establishes bluetooth connections with the M first terminal devices, it is detected that the devices to be connected of the headset device include a third terminal device and a fourth terminal device.
In the embodiment of the present application, the maximum number N of the 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 bluetooth connection between the earphone device and the M first terminal devices may be established, where the bluetooth connection between the earphone device and any first terminal device is not established (i.e., M = 0), and the number of first terminal devices that establish bluetooth connection with the earphone device is less than or equal to N-2, for example, N is 3, and the earphone device only establishes bluetooth connection with 1 first terminal device.
Under the condition that the earphone device establishes bluetooth connection with M first terminal devices, a scenario may occur in which the earphone device needs to establish bluetooth connection with two terminal devices simultaneously or continuously, for example, two different terminal devices send a bluetooth connection request to the earphone device simultaneously, or the earphone device needs to perform backhaul connection with two different terminal devices, and the like, where the backhaul connection means that the earphone device has been paired with the terminal device before and can directly establish bluetooth connection with the terminal device without being paired with the terminal device.
And step 604, performing bluetooth connection with a third terminal device through the first earphone.
And 606, performing Bluetooth connection with a fourth terminal device through a second earphone.
In some embodiments, in a case that the M first terminal devices are connected to the headset device via bluetooth, if it is detected that the devices to be connected of the headset device include a third terminal device and a fourth terminal device, since the number of bluetooth connections that can be established by the headset device is greater than or equal to 2, the third terminal device and the fourth terminal device may be connected to each other via bluetooth. In the related art, the headset device usually establishes a bluetooth connection with one of the terminal devices (e.g., the third terminal device) first, and then establishes a bluetooth connection with the other terminal device (e.g., the fourth terminal device), which results in a long connection time and a slow speed, and affects user experience.
In the embodiment of the application, if the earphone device detects that the device to be connected includes the third terminal device and the fourth terminal device, the first earphone and the third terminal device can be connected through the bluetooth, the second earphone and the fourth terminal device can be connected in parallel, and the first earphone and the second earphone can be connected in parallel, so that the effect that the earphone device simultaneously establishes the bluetooth connection with the third terminal device and the fourth terminal device is achieved, the time of waiting for connection is reduced, and the connection efficiency is improved.
In some embodiments, in the case that the earphone device establishes bluetooth connections 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 may be processed by the first earphone and a bluetooth connection may be established with the third terminal device, and the bluetooth connection request sent by the fourth terminal device may be processed by the second earphone and a bluetooth connection may be established with the third terminal device.
The first time period may be set according to actual requirements, for example, the first time period may be 1 second, 2 seconds, and the like, and the first time period may also be set according to a speed of the headset device establishing the bluetooth connection, and the faster the speed of the headset device establishing the bluetooth connection is, the shorter the first time period may be, and the slower the speed of the headset device establishing the bluetooth connection is, the longer the first time period may be. Further, the first time period may be a time period during which the earphone device normally establishes a bluetooth connection with the other terminal device.
If the headset device receives the bluetooth connection requests sent by the third terminal device and the fourth terminal device within the first time period, a situation that the headset device receives another bluetooth connection request when not completing one bluetooth connection request may occur. Therefore, the first earphone and the second earphone can be respectively connected with the third terminal device and the fourth terminal device through Bluetooth, and the serial connection establishment process is changed into a parallel connection establishment process, so that the connection waiting time is shortened.
As an embodiment, the third terminal device and/or the fourth terminal device may be terminal devices that have not been paired with the earphone device. The earphone equipment can enter a pairing state according to the pairing instruction, and at the moment, the information of the earphone equipment can be scanned by the unpaired third terminal equipment and/or fourth terminal equipment, so that a user can select to initiate Bluetooth connection with the earphone equipment. When the earphone device is in a pairing state, if a Bluetooth connection request sent by a third terminal device and a fourth terminal device is received within a first time period, the Bluetooth connection can be established between the first earphone and the third terminal device and between the first earphone and the third terminal device, and between the second earphone and the fourth terminal device.
Optionally, a manner of entering the pairing state according to the pairing instruction by the headset device may be similar to the manner of entering the pairing state according to the pairing instruction described in the foregoing embodiment, and details are not repeated here.
When the headset device is in the pairing state, the unpaired third terminal device and/or fourth terminal device may scan the headset device and send a scan request to the headset device. If the earphone device receives scanning requests sent by the third terminal device and the fourth terminal device, a scanning response can be sent to the third terminal device through the first earphone, and a scanning response can be sent to the fourth terminal device through the second earphone; or the first earphone may directly send the scanning response to the third terminal device and the fourth terminal device, or the second earphone may send the scanning response to the third terminal device and the fourth terminal device.
And under the condition that the third terminal equipment and the fourth terminal equipment are both terminal equipment which is not matched with the earphone equipment, after receiving the scanning response, the third terminal equipment and the fourth terminal equipment can send a Bluetooth connection request to the earphone equipment when determining that the connection with the earphone equipment is required. The first earphone can establish Bluetooth connection with the third terminal device according to a Bluetooth connection request sent by the third terminal device, and the first earphone can be paired with the third terminal device in the Bluetooth connection establishment process. The second earphone can establish a bluetooth connection with the fourth terminal device according to the connection request sent by the fourth terminal device, and the second earphone can be paired with the fourth terminal device in the process of establishing the bluetooth connection.
In some embodiments, the third terminal device and the fourth terminal device may also be terminal devices connected to the earphone device. The third terminal device and the fourth terminal device may store a connection record corresponding to the earphone device, and may directly send a bluetooth connection request to the earphone device according to the connection record. The earphone device can process a Bluetooth connection request sent by the third terminal device through the first earphone and establish Bluetooth connection with the third terminal device, and the first earphone does not need to be paired with the third terminal device in the process of establishing the Bluetooth connection; and processing a Bluetooth connection request sent by the fourth terminal equipment through the second earphone, and establishing Bluetooth connection with the third terminal equipment, wherein the second earphone does not need to be paired with the fourth terminal equipment in the process of establishing the Bluetooth connection.
In some embodiments, if the headset device first receives the bluetooth connection request sent by the third terminal device, the first headset (the first headset may be a master headset) may process the bluetooth connection request. The first earphone can send first information to the second earphone when responding to the Bluetooth connection request, the first information can be used for informing the second earphone, and the first earphone is processing the Bluetooth connection request; after the first earphone completes processing the bluetooth connection request and successfully establishes bluetooth connection with the third terminal device, second information can be sent to the second earphone, the second information is used for informing the second earphone, and the first earphone completes processing the bluetooth connection request. If the second earphone receives the first information but does not receive the second information, it indicates that the first earphone is still in the process of processing the bluetooth connection request of the third terminal device, and if the bluetooth connection request sent by the fourth terminal device is received in the process, the second earphone can process the bluetooth connection request sent by the fourth terminal device and establish bluetooth connection with the fourth terminal device. The connection speed of the earphone device and the two terminal devices can be improved.
In some embodiments, the third terminal device and the fourth terminal device may be terminal devices connected to the earphone device. The earphone device can store connection records corresponding to the third terminal device and the fourth terminal device respectively, and the earphone device can actively carry out back connection with the third terminal device and the fourth terminal device according to the connection records. When the earphone device is in a connection state, a first connection request can be sent to a third terminal device to be connected back through the first earphone, and a second connection request is sent to a fourth terminal device to be connected back through the second earphone, wherein the first connection request is used for being connected back with the third terminal device, and the second connection request is used for being connected back with the fourth terminal device.
Optionally, the earphone device is placed in an earphone charging box, and when the earphone charging box detects a cover opening operation, a cover opening instruction may be sent to the earphone device to trigger the earphone device to enter a reconnection state. It should be noted that other ways may also be used to trigger the earphone device to enter the connection-back state, for example, if the earphone device is disconnected from all the terminal devices by bluetooth, the earphone device may be triggered to enter the connection-back state. The first earphone pages the third terminal equipment of the page (namely sends a Bluetooth connection request) according to the previous connection record so as to establish a first physical link with the third terminal equipment; the second earphone pages the fourth terminal device of the page (namely sends a Bluetooth connection request) according to the previous connection record so as to establish a second physical link with the fourth terminal device; because both connecting parties have pairing keys, pairing (pairing) operation is not required in the whole Bluetooth connecting process.
The earphone device may store a connection record, where the connection record may refer to a record of connection of the earphone device history with other terminal devices, and the connection record may include pairing information, device information, and the like corresponding to the other terminal devices that are paired with the earphone device.
The third terminal device and the fourth terminal device to be reconnected can be determined according to the connection record. Alternatively, the other terminal devices arranged in the top 2 may be selected as the third terminal device and the fourth terminal device in the order from near to far in connection time. The other terminal devices arranged in the top 2 may be selected as the third terminal device and the fourth terminal device in the order of the number of historical connection frequencies.
After determining the third terminal device and the fourth terminal device to be connected back, the first earphone can page the third terminal device, if the third terminal device is in the connection range of the earphone device, the page can be responded to establish a physical link, and because the third terminal device stores the pairing key of the earphone device, the third terminal device can establish Bluetooth connection with the first earphone without pairing operation. Similarly, the second earphone can page the fourth terminal device of the page, if the fourth terminal device is in the connection range of the earphone device, the page can be responded, and because the fourth terminal device stores the pairing key of the earphone device, the Bluetooth connection can be established with the second earphone without pairing operation. The first earphone and the second earphone can be connected back with different terminal devices in parallel, and the back connection efficiency can be improved.
In some embodiments, when the earphone device is in the loop connection state, the earphone device may also turn on the page scan mode, or turn on the page scan mode and the inquiry scan mode (i.e., in the pairing state). And under the condition that the terminal equipment to be connected back only comprises the third terminal equipment, a first connection request can be sent to the third terminal equipment through the first earphone so as to establish Bluetooth connection with the third terminal equipment. If the Bluetooth connection request sent by the fourth terminal equipment is received in the second time period when the first earphone sends the first connection request, the Bluetooth connection request can be processed by the second earphone, and Bluetooth connection is established with the fourth terminal equipment.
The second time period may also be set according to the speed of the headset device for performing the reconnection, and the faster the speed of the headset device for performing the reconnection is, the shorter the second time period may be, and the slower the speed of the headset device for performing the reconnection is, the longer the second time period may be. When the earphone device is connected back with the third terminal device, the Bluetooth connection request sent by the fourth terminal device can be responded, the response is not needed after the connection back is successful, the Bluetooth connection can be established with the two terminal devices more quickly, and the connection efficiency is improved.
That is, the headset device may handle in parallel a bluetooth backhaul connection initiated by the headset device with the terminal device and a bluetooth connection initiated by another terminal device with the headset device.
In some embodiments, after the first headset establishes a bluetooth connection with the third terminal device, connection information of the first terminal device may be synchronized to the second headset through the first headset. After the second earphone establishes the Bluetooth connection with the fourth terminal equipment, the connection information of the fourth terminal equipment can be synchronized to the first earphone through the second earphone.
Alternatively, the first earphone may be a master earphone and the second earphone may be a slave earphone. After the second earphone synchronizes the connection information corresponding to the fourth terminal device to the first earphone, the bluetooth connection object of the fourth 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 fourth terminal device, or the first earphone synchronizes data transmitted between the first earphone and the fourth terminal device to the second earphone, so as to realize master-slave synchronization.
After the first earphone establishes the bluetooth connection with the third terminal device, the first earphone can also synchronize the connection information corresponding to the third terminal device with the second earphone, so that the second earphone can monitor the bluetooth connection between the first earphone and the third terminal device according to the connection information. For all terminal equipment connected with the earphone equipment, data transmission management is carried out in a mode that the first earphone is connected, the second earphone monitors or receives data forwarded by the first earphone, management can be carried out more conveniently, and data transmission efficiency is improved.
Fig. 7A is an interaction timing diagram illustrating that the headset device is connected to two terminal devices respectively in one embodiment. As shown in fig. 7A, the headset device may be a bluetooth "one-drag-two" device, and both the terminal device a and the terminal device B are devices paired with the headset device. Under the condition that the earphone device is not in Bluetooth connection with other terminal devices, when the earphone device is in a page scan mode, a Bluetooth connection request sent by the terminal device A and the terminal device B is received in a first time period, the first earphone can process the Bluetooth connection request sent by the terminal device A and establish Bluetooth connection with the terminal device A, and the second earphone can process the Bluetooth connection request sent by the terminal device B and establish Bluetooth connection with the terminal device B. After the first earphone successfully establishes Bluetooth connection with the terminal device A, the connection information of the terminal device A can be synchronized with the second earphone, and after the second earphone successfully establishes Bluetooth connection with the terminal device B, the connection information of the terminal device B can be synchronized with the second earphone, so that information synchronization is realized, and a Bluetooth connection object of the terminal device B is switched to the first earphone from the second earphone.
Fig. 7B is an interaction timing diagram illustrating the connection of the earphone device to the two terminal devices respectively in another embodiment. As shown in fig. 7B, the earphone device may be a bluetooth "one-drag-two" device, and both the terminal device a and the terminal device B are devices that are not paired with the earphone device. Under the condition that the earphone device is not in Bluetooth connection with other terminal devices, when the earphone device is in a page scan mode and a page scan mode (in a pairing state), the terminal device A and the terminal device B can scan the earphone device and send Bluetooth connection requests to the earphone device. The earphone device receives the Bluetooth connection request sent by the terminal device A and the terminal device B in the first time period, and the first earphone can process the Bluetooth connection request sent by the terminal device A and is in Bluetooth connection with the terminal device A. The second earphone can process the Bluetooth connection request sent by the terminal device B and perform Bluetooth connection with the terminal device B. After the first earphone successfully establishes the Bluetooth connection with the terminal device A, the connection information of the terminal device A can be synchronized with the second earphone, and after the second earphone successfully establishes the Bluetooth connection with the terminal device B, the connection information of the terminal device B can be synchronized with the second earphone, so that the information synchronization is realized, and the Bluetooth connection object of the terminal device B is switched from the second earphone to the first earphone.
Fig. 7C is an interaction timing diagram of the earphone device connecting to two terminal devices respectively in yet another embodiment. As shown in fig. 7C, the headset device may be a bluetooth "one-drag-two" device, and both the terminal device a and the terminal device B are devices paired with the headset device. The earphone device can enter a connection state under the condition that Bluetooth connection is not established between the earphone device and other terminal devices, and if the terminal device A and the terminal device B are both in a page scan mode, the first earphone can send a first connection request to the terminal device A according to a stored connection record of the terminal device A and is connected back with the terminal device A based on the first connection request. The second headset may send a second connection request to the terminal device B according to the stored connection record of the terminal device B, and perform a loopback with the terminal device B based on the second connection request. After the first earphone successfully establishes the Bluetooth connection with the terminal device A, the connection information of the terminal device A can be synchronized with the second earphone, and after the second earphone successfully establishes the Bluetooth connection with the terminal device B, the connection information of the terminal device B can be synchronized with the second earphone, so that the information synchronization is realized, and the Bluetooth connection object of the terminal device B is switched from the second earphone to the first earphone.
It should be noted that fig. 7A to fig. 7C are only used to illustrate an implementation process of the embodiment of the present application, and are not used to limit specific earphone devices, terminal devices, and connection scenarios.
In some embodiments, in the case that the headset device establishes bluetooth connections with M first terminal devices, if the device to be connected of the headset device only includes a third terminal device (e.g., only receives a bluetooth connection request sent by the third terminal device, or only needs to perform a backhaul connection with the third terminal device, does not receive bluetooth connection requests sent by the third terminal device and the fourth terminal device within the first time period, and the like), that is, the headset device only needs to establish bluetooth connections with one other terminal device, the headset device may establish bluetooth connections with the third terminal device through the first headset or the second headset. For the first terminal device in the "bluetooth connection is established between the earphone device and the N first terminal devices" described in the foregoing embodiments, the bluetooth connection may be established in the manner described in steps 602 to 606.
When the number of the first terminal devices establishing Bluetooth connection with the earphone device reaches N-1, if the devices to be connected of the earphone device only comprise the third terminal device, the earphone device can establish Bluetooth connection with the third terminal device through the first earphone or the second earphone. If the device to be connected of the earphone device comprises the third terminal device and the fourth terminal device, if the earphone device wants to establish bluetooth connection with the third terminal device and the fourth terminal device, the bluetooth connection of the first terminal device needs to be disconnected. Therefore, the bluetooth connection can be established with the third terminal device through the first earphone or the second earphone, and then the bluetooth connection can be established with the fourth terminal device through the second earphone while the disconnection processing is performed through the first earphone. Alternatively, the target terminal device for disconnection processing by the first headset may be determined from the first terminal device, other than the third terminal device, that establishes a bluetooth connection with the headset device.
Under the condition that the earphone device and the N first terminal devices respectively establish bluetooth connection, if the device to be connected of the earphone device includes a third terminal device and a fourth terminal device, the third terminal device and the fourth terminal device may serve as the second terminal devices in the above embodiments, and the earphone device performs disconnection processing and bluetooth connection in parallel to successfully establish bluetooth connection with the third terminal device and the fourth terminal device.
Optionally, the Bluetooth connection in the embodiment of the present application may include any one of a classic Bluetooth connection and a Bluetooth Low Energy (BLE) connection. In a BLE connection scenario, the headset device may send a BLE broadcast, and other terminal devices may scan for the BLE broadcast and establish a BLE bluetooth connection with the headset device. It should be noted that the method is also applicable to other connection modes, and can be changed along with the development of the bluetooth protocol.
It should be noted that, the terminal device that is not paired with the earphone device in the embodiment of the present application refers to that connection information corresponding to the earphone device is not stored in the terminal device; the terminal device paired with the earphone device in the embodiment of the present application means that connection information corresponding to the earphone device is stored in the terminal device.
In the embodiment of the application, when the earphone device needs to establish the bluetooth connection with two other terminal devices simultaneously or continuously, the first earphone and the second earphone can respectively establish the bluetooth connection with one of the terminal devices, and the connection operation is performed in parallel, so that the connection speed can be increased, and the connection efficiency can be improved.
As shown in fig. 8, in one embodiment, a bluetooth connection apparatus 800 is provided, which can be applied to the above-mentioned headset device, and the bluetooth connection apparatus 800 can include a connection module 810.
The connection module 810 is configured to, under the condition that the headset device and the N first terminal devices respectively establish bluetooth connections, if a bluetooth connection request sent by the second terminal device is received, perform disconnection processing through the first headset, and process the bluetooth connection request through the second headset, so that the headset device and the second terminal device establish bluetooth connections.
The disconnection processing is used for disconnecting the Bluetooth connection between the earphone equipment and target terminal equipment in the N first terminal equipment; n is the maximum number of bluetooth connections that the headset device supports to establish, and N is a positive integer greater than or equal to 1.
In the embodiment of the application, when the earphone device is in a connection emergency scene, the first earphone and the second earphone of the earphone device can be connected with the target terminal device in parallel and connected with the second terminal device in a Bluetooth mode, the earphone device does not need to wait for the connection request sent by the second terminal device after the Bluetooth connection is disconnected, the connection emergency speed of the second terminal device on the earphone device can be increased, and the connection emergency efficiency is improved.
In one embodiment, the connection module 810 includes a disconnect unit.
And the disconnection unit is used for determining a target terminal device in the N first terminal devices and performing disconnection processing corresponding to the target terminal device by the first earphone.
In one embodiment, N is an integer greater than or equal to 2; the disconnection unit is also used for selecting the first terminal equipment with the priority meeting the priority condition from the N pieces of first terminal equipment as target terminal equipment through the first earphone according to the priority of each piece of first terminal equipment; wherein the priority condition comprises any one of a priority lower than a priority threshold and a lowest priority.
In one embodiment, the priority of each first terminal device is determined according to the device status parameter of each first terminal device; the equipment state parameters comprise one or more of service data output parameters, sequence parameters for representing the sequence of establishing Bluetooth connection with the earphone equipment, equipment type parameters, equipment residual electric quantity parameters and historical connection frequency;
the service data output parameter is used for representing whether the first terminal device outputs service data to the earphone device through Bluetooth connection currently.
In one embodiment, the bluetooth connection apparatus 800 includes a pairing module in addition to the connection module 810.
The pairing module is used for entering a pairing state according to the pairing instruction and keeping Bluetooth connection with the N first terminal devices; and the second earphone is used for receiving the scanning request sent by the second terminal equipment through the first earphone and/or the second earphone and sending a scanning response to the second terminal equipment according to the scanning request.
In one embodiment, the pairing module is further configured to receive a pairing instruction sent by the earphone charging box, and enter a pairing state according to the pairing instruction; or, receiving a pairing instruction sent by any first terminal equipment, and entering a pairing state according to the pairing instruction; or responding to the detected pairing triggering operation, generating a pairing instruction, and entering a pairing state according to the pairing instruction.
In one embodiment, the connection module 810, in addition to including a disconnect unit, also includes a connection unit.
And the connecting unit is used for processing the Bluetooth connection request through the second earphone and establishing Bluetooth connection with the second terminal equipment.
In one embodiment, the bluetooth connection apparatus 800 further comprises a synchronization module.
And the synchronization module is used for establishing Bluetooth connection between the second earphone and the second terminal equipment and synchronizing the connection information of the second terminal equipment to the first earphone through the second earphone.
In one embodiment, the synchronization module is configured to switch a bluetooth connection object of the second terminal device from the second headset to the first headset after the second headset synchronizes connection information of the second terminal device with the first headset, and monitor a bluetooth connection between the first headset and the second terminal device through the second headset; 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 is switched from the second earphone to the first earphone, and the data transmitted between the bluetooth connection object and the second terminal device is synchronized to the second earphone through the first earphone.
In an embodiment, the synchronization module is further configured to synchronize disconnection information of the target terminal device with the second headset through the first headset after the headset device disconnects the bluetooth connection with the target terminal device.
In one embodiment, the first earpiece is a master earpiece in the earpiece device and the second earpiece is a slave earpiece in the earpiece device; under the condition that the earphone device and N first terminal devices respectively establish Bluetooth connection, the method comprises the following steps: and respectively establishing Bluetooth connection between the first earphone and the N first terminal devices, and establishing Bluetooth connection between the first earphone and the second earphone.
In one embodiment, in a case where the headset device establishes bluetooth connections with N first terminal devices, respectively, the method includes: and respectively establishing Bluetooth connection between the earphone equipment and the N first terminal equipment, wherein the earphone equipment is in a connectable state.
In one embodiment, when N is greater than 1, the headphone apparatus is in a connectable state.
In the embodiment of the application, after the disconnection operation and the connection operation are completed, the first earphone and the second earphone perform information synchronization, so that the bluetooth connection object of the second terminal device is switched to the first earphone from the second earphone, all bluetooth connections can be managed more conveniently, and the data transmission efficiency is ensured.
In an embodiment, N is a positive integer greater than or equal to 2, the connection module 810 is further configured to, when the headset device establishes bluetooth connections with M first terminal devices, perform bluetooth connection with the third terminal device through the first headset and perform bluetooth connection with the fourth terminal device in parallel through the second headset if it is detected that the devices to be connected of the headset device include the third terminal device and the fourth terminal device; wherein M is an integer greater than or equal to 0 and less than or equal to N-2.
The synchronization module is further used for synchronizing the connection information corresponding to the third terminal device to the second earphone through the first earphone; and synchronizing the connection information corresponding to the fourth terminal equipment to the first earphone through the second earphone.
In an embodiment, the connection module 810 is further configured to, if the bluetooth connection requests sent by the third terminal device and the fourth terminal device are received within the first time period, 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, and 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.
In one embodiment, the third terminal device and/or the fourth terminal device is a terminal device that is not paired with the headset device. The pairing module is further configured to enter a pairing state according to the pairing instruction before the connection module 810 receives the bluetooth connection request sent by the third terminal device and the fourth terminal device.
In an embodiment, the connection module 810 is further configured to send, when the earphone device is in a loop connection state, a first connection request to a third terminal device to be loop connected through the first earphone, and send, through the second earphone, a second connection request to a fourth terminal device to be loop connected, where the first connection request is used for loop connection with the third terminal device, and the second connection request is used for loop connection with the fourth terminal device.
In one embodiment, the bluetooth connection comprises any one of a classic bluetooth connection and a bluetooth low energy BLE connection.
In the embodiment of the application, when the earphone device needs to establish the bluetooth connection with two other terminal devices simultaneously or continuously, the first earphone and the second earphone can respectively establish the bluetooth connection with one of the terminal devices, and the connection operation is performed in parallel, so that the connection speed can be increased, and the connection efficiency can be improved.
Fig. 9 is a block diagram of the headphone apparatus in one embodiment. As shown in fig. 9, the headset device 900 may include one or more of the following components: a processor 910, 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 embodiments as described above when executed by the one or more processors 910.
Processor 910 may include one or more processing cores. The processor 910 interfaces with various parts throughout the headset device 900 using various interfaces and lines to perform various functions of the headset device 900 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 920 and invoking data stored in the memory 920. Alternatively, the processor 910 may be implemented in hardware using at least one of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 910 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 910, but may be implemented by a communication chip.
The Memory 920 may include a Random Access Memory (RAM) or a Read-Only Memory (ROM). The memory 920 may be used to store instructions, programs, code sets, or instruction sets. The memory 920 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described method embodiments, and the like. The storage data area may also store data created by the headset device 900 in use, and the like.
The headset device 900 may further include a bluetooth module, which may be used to provide bluetooth communication functions, 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, BLE, etc.), but is not limited thereto and may vary with the development of the bluetooth protocol.
In some embodiments, the headset apparatus includes a first headset and a second headset, each of which includes at least the processor 910, the memory 920, and the bluetooth module.
The processor 910 is configured to, under the condition that the headset device 900 establishes bluetooth connections with N first terminal devices, instruct the bluetooth module of the first headset to perform disconnection processing if the bluetooth module of the first headset and/or the second headset receives a bluetooth connection request sent by the second terminal device, instruct the bluetooth module of the second headset to process the bluetooth connection request, and establish bluetooth connections with the second terminal device. The processor 910 may be a processor in the first earphone or a processor in the second earphone.
It is understood that the earphone device 900 may include more or less structural elements than those shown in the above structural block diagrams, for example, a power module, a physical button, a sensor, etc., and is not limited herein.
The embodiment of the application discloses a computer readable storage medium, which stores a computer program, wherein the computer program realizes the method described in the above embodiments when being executed by a processor.
Embodiments of the present application disclose a computer program product comprising a non-transitory computer readable storage medium storing a computer program, and the computer program, when executed by a processor, implements the method as described in the embodiments above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. The storage medium may be a magnetic disk, an optical disk, a ROM, etc.
Any reference to memory, storage, database, or other medium as used herein may include non-volatile and/or volatile memory. Suitable non-volatile memory can include ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically Erasable PROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM can take many forms, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), rambus Direct RAM (RDRAM), and Direct Rambus DRAM (DRDRAM).
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art should also appreciate that the embodiments described in this specification are all alternative embodiments and that the acts and modules involved are not necessarily required for this application.
In various embodiments of the present application, it should be understood that the size of the serial number of each process described above does not mean that the execution sequence is necessarily sequential, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing detailed description has provided a bluetooth connection method, apparatus, headset device, and computer-readable storage medium, which are disclosed in the embodiments of the present application, and the detailed embodiments are used herein to explain the principles and implementations of the present application, and the descriptions of the foregoing embodiments are only used to help understand the method and its core ideas of the present application. Meanwhile, for a person skilled in the art, according to the idea of the present application, the specific implementation manner and the application scope may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (19)

1. A Bluetooth connection method is applied to an earphone device, wherein the earphone device comprises a first earphone and a second earphone, and the method comprises the following steps:
under the condition that the earphone device and N first terminal devices respectively establish Bluetooth connection, if a Bluetooth connection request sent by a second terminal device is received, disconnection processing is carried out through the first earphone, and the Bluetooth connection request is processed through the second earphone, so that the earphone device and the second terminal device establish Bluetooth connection;
the disconnection process is used for disconnecting the Bluetooth connection between the earphone device and a target terminal device in the N first terminal devices; and N is the maximum number of the Bluetooth connections supported to be established by the earphone equipment, and is an integer greater than or equal to 1.
2. The method of claim 1, wherein the performing, by the first headset, a disconnect process comprises:
and determining a target terminal device in the N first terminal devices, and performing disconnection processing corresponding to the target terminal device by the first earphone.
3. The method of claim 2, wherein N is an integer greater than or equal to 2; the determining a target terminal device of the N first terminal devices includes:
and selecting the first terminal equipment with the priority meeting the priority condition from the N pieces of first terminal equipment as target terminal equipment according to the priority of each piece of first terminal equipment.
4. The method of claim 3, wherein 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 equipment state parameters comprise one or more of service data output parameters, sequence parameters for representing the sequence of establishing Bluetooth connection with the earphone equipment, equipment type parameters, equipment residual electric quantity parameters and historical connection frequency;
the service data output parameter is used for representing whether the first terminal device outputs service data to the earphone device through Bluetooth connection currently.
5. The method according to any one of claims 1 to 4, wherein before the disconnection processing is performed by the first headset if the bluetooth connection request sent by the second terminal device is received, the method further comprises:
entering a pairing state according to the pairing instruction, and keeping Bluetooth connection with the N first terminal devices;
and receiving a scanning request sent by second terminal equipment through the first earphone and/or the second earphone, and sending a scanning response to the second terminal equipment according to the scanning request.
6. The method of claim 5, wherein entering the pairing state according to the pairing instruction comprises:
receiving a pairing instruction sent by an earphone charging box, and entering a pairing state according to the pairing instruction; or the like, or, alternatively,
receiving a pairing instruction sent by any first terminal equipment, and entering a pairing state according to the pairing instruction; or the like, or, alternatively,
and responding to the detected pairing triggering operation, generating a pairing instruction, and entering a pairing state according to the pairing instruction.
7. The method of any of claims 1-4, wherein processing the Bluetooth connection request via the second headset comprises:
processing the Bluetooth connection request through the second earphone, and establishing Bluetooth connection with the second terminal equipment;
after the processing of the Bluetooth connection request by the second headset, the method further comprises:
and synchronizing the connection information of the second terminal equipment to the first earphone through the second earphone.
8. The method according to claim 7, wherein after the second headset synchronizes the connection information of the second terminal device to the first headset, the bluetooth connection object of the second terminal device is switched from the second headset to the first headset, and the second headset listens for the bluetooth connection between the first headset and the second terminal device; or the like, or a combination thereof,
and the Bluetooth connection object of the second terminal equipment is switched from the second earphone to the first earphone, and the first earphone synchronizes data transmitted between the first earphone and the second terminal equipment to the second earphone.
9. The method according to any one of claims 1 to 4, wherein after said disconnection process by said first earphone, said method further comprises:
and synchronizing the disconnection information of the target terminal device to the second earphone through the first earphone.
10. The method according to claim 1, wherein, in the case that the headset device establishes bluetooth connections with N first terminal devices respectively, the method comprises: and under the condition that the first earphone and the N first terminal devices are respectively connected in a Bluetooth mode and the first earphone and the second earphone are connected in a Bluetooth mode.
11. The method according to claim 1, wherein, in the case that the headset device establishes bluetooth connections with N first terminal devices respectively, the method comprises:
and respectively establishing Bluetooth connection between the earphone equipment and the N first terminal equipment, wherein the earphone equipment is in a connectable state.
12. The method of claim 11, wherein the headset device is in a connectable state when N is greater than 1.
13. The method of any one of claims 1-4 and 10-12, wherein N is a positive integer greater than or equal to 2, the method further comprising:
under the condition that the earphone device establishes Bluetooth connection with M first terminal devices, if detecting that devices to be connected of the earphone device comprise a third terminal device and a fourth terminal device, performing Bluetooth connection with the third terminal device through the first earphone and performing Bluetooth connection with the fourth terminal device through the second earphone in parallel; 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 equipment to the second earphone through the first earphone;
and synchronizing the connection information corresponding to the fourth terminal equipment to the first earphone through the second earphone.
14. The method of claim 13, wherein if it is detected that the devices to be connected of the headset device include 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 comprises:
if the Bluetooth connection requests sent by a third terminal device and a fourth terminal device are received in a first time period, the Bluetooth connection request sent by the third terminal device is processed through the first earphone and is connected with the third terminal device in a Bluetooth mode, the Bluetooth connection request sent by the fourth terminal device is processed through the second earphone and is connected with the third terminal device in a Bluetooth mode.
15. The method of claim 13, wherein if it is detected that the devices to be connected of the headset device include 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 comprises:
when the earphone device is in a reconnection 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 for being reconnected with the third terminal device, and the second connection request is used for being reconnected with the fourth terminal device.
16. The method according to any one of claims 1 to 4, 10 to 12, 14 to 15, wherein the bluetooth connection comprises any one of a classic bluetooth connection and a Bluetooth Low Energy (BLE) connection.
17. A Bluetooth connecting device is applied to earphone equipment, wherein the earphone equipment comprises a first earphone and a second earphone, and the device comprises:
the connection module is used for performing disconnection processing through the first earphone and processing the Bluetooth connection request through the second earphone so as to establish Bluetooth connection between the earphone equipment and the second terminal equipment if the connection module receives a Bluetooth connection request sent by the second terminal equipment under the condition that the earphone equipment and the N first terminal equipment respectively establish Bluetooth connection;
the disconnection process is used for disconnecting the Bluetooth connection between the earphone device and a target terminal device in the N first terminal devices; and N is the maximum number of the Bluetooth connections supported to be established by the earphone equipment, and is a positive integer greater than or equal to 1.
18. A headset device, characterized in that it comprises a memory and a processor, the memory having stored therein a computer program which, when executed by the processor, causes the processor to carry out the method according to any one of claims 1 to 16.
19. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 16.
CN202111050877.8A 2021-09-08 2021-09-08 Bluetooth connection method, device, earphone device and computer readable storage medium Pending CN115776662A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111050877.8A CN115776662A (en) 2021-09-08 2021-09-08 Bluetooth connection method, device, earphone device and computer readable storage medium
PCT/CN2022/117541 WO2023036178A1 (en) 2021-09-08 2022-09-07 Bluetooth connection method and apparatus, earphone device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111050877.8A CN115776662A (en) 2021-09-08 2021-09-08 Bluetooth connection method, device, earphone device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115776662A true CN115776662A (en) 2023-03-10

Family

ID=85388106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111050877.8A Pending CN115776662A (en) 2021-09-08 2021-09-08 Bluetooth connection method, device, earphone device and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN115776662A (en)
WO (1) WO2023036178A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116321141A (en) * 2023-05-11 2023-06-23 长江量子(武汉)科技有限公司 Method for synchronizing keys of two-ear earphone and two-ear encryption earphone
CN116761110A (en) * 2023-08-18 2023-09-15 江西斐耳科技有限公司 Multi-point bluetooth headset control method, system, storage medium and equipment

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190132895A1 (en) * 2017-11-01 2019-05-02 Htc Corporation Multi-connection device and multi-connection method
US10542574B1 (en) * 2017-11-15 2020-01-21 Amazon Technologies, Inc. Wireless device connection handover
CN108924706B (en) * 2018-06-26 2020-08-18 东莞市和乐电子有限公司 Bluetooth headset switching control method, Bluetooth headset and computer readable storage medium
CN113225693B (en) * 2019-04-18 2022-04-15 华为技术有限公司 Bluetooth connection method, equipment and system
CN113038316A (en) * 2019-12-25 2021-06-25 Oppo广东移动通信有限公司 Earphone control method and device, Bluetooth earphone and storage medium
CN111200769B (en) * 2020-01-08 2022-01-28 昆山泰芯微电子有限公司 Communication method for Bluetooth headset device and Bluetooth headset device
CN111246441B (en) * 2020-02-26 2021-08-24 深圳市岍丞技术有限公司 Method, system and storage medium for connecting Bluetooth headset and terminal
CN112004173B (en) * 2020-08-27 2023-06-27 努比亚技术有限公司 Bluetooth headset switching method, mobile terminal and computer readable storage medium
CN111934724B (en) * 2020-09-18 2021-01-22 恒玄科技(北京)有限公司 Wireless communication method for earphone and intelligent device and wireless earphone assembly

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116321141A (en) * 2023-05-11 2023-06-23 长江量子(武汉)科技有限公司 Method for synchronizing keys of two-ear earphone and two-ear encryption earphone
CN116321141B (en) * 2023-05-11 2023-08-04 长江量子(武汉)科技有限公司 Method for synchronizing keys of two-ear earphone and two-ear encryption earphone
CN116761110A (en) * 2023-08-18 2023-09-15 江西斐耳科技有限公司 Multi-point bluetooth headset control method, system, storage medium and equipment
CN116761110B (en) * 2023-08-18 2023-11-14 江西斐耳科技有限公司 Multi-point bluetooth headset control method, system, storage medium and equipment

Also Published As

Publication number Publication date
WO2023036178A1 (en) 2023-03-16

Similar Documents

Publication Publication Date Title
WO2023036178A1 (en) Bluetooth connection method and apparatus, earphone device, and computer-readable storage medium
CN111447602B (en) Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium
CN111200769A (en) Communication method for Bluetooth headset device and Bluetooth headset device
CN111654845A (en) Bluetooth multi-terminal link switching method, Bluetooth audio equipment and system
US11368777B2 (en) Method and system for upgrading program of TWS headset, and TWS headset
CN114040373A (en) Audio service processing method and device, electronic equipment and storage medium
CN115278624A (en) Information updating method and device, audio sharing method and system and electronic equipment
WO2023103732A1 (en) State control method and apparatus for earphone device, earphone device and storage medium
CN111182597B (en) Processing method and device
CN113473291A (en) Communication method, earphone cabin and WIFI earphone
CN111182518A (en) Processing method and device
CN116528202A (en) Connection control method, device, electronic equipment and storage medium
JP6549158B2 (en) Automatic call synchronization system and method
CN115776663A (en) Bluetooth connection method, device, earphone device and computer readable storage medium
CN117793836A (en) Bluetooth switching method and device, bluetooth equipment and computer readable medium
CN113810887B (en) Bluetooth protocol connection method and device, storage medium and related equipment
CN115776661A (en) Bluetooth-based control method and device, electronic equipment and storage medium
CN115967927A (en) Bluetooth connection method and device, earphone and storage medium
CN115885573A (en) Audio output apparatus wirelessly receiving data from electronic device and method of operating the same
CN115278615A (en) Method and device for controlling transmission of Bluetooth equipment and electronic equipment
CN116074986B (en) Bluetooth connection method, device and system
CN116233807A (en) Bluetooth connection method and device, and Bluetooth address configuration method and device
US20230224973A1 (en) Method and apparatus for sending data, and user equipment and storage medium
CN113472379B (en) Intercommunication method, earphone box, earphone and storage medium
CN114666741B (en) Wireless communication method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination