CN115776663A - 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
CN115776663A
CN115776663A CN202111050879.7A CN202111050879A CN115776663A CN 115776663 A CN115776663 A CN 115776663A CN 202111050879 A CN202111050879 A CN 202111050879A CN 115776663 A CN115776663 A CN 115776663A
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
CN202111050879.7A
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 CN202111050879.7A priority Critical patent/CN115776663A/en
Priority to PCT/CN2022/106796 priority patent/WO2023035782A1/en
Publication of CN115776663A publication Critical patent/CN115776663A/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
    • H04W48/00Access restriction; Network selection; Access point selection
    • 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

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: determining that the terminal equipment to be connected with the earphone equipment at least comprises first terminal equipment and second terminal equipment; and performing Bluetooth connection with the first terminal equipment through the first earphone, and performing Bluetooth connection with the second terminal equipment in parallel through the second earphone. The Bluetooth connection method, the Bluetooth connection device, the earphone equipment and the computer readable storage medium can improve the speed of establishing Bluetooth connection between the earphone equipment and two terminal devices 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. In order to meet the requirement of a user for simultaneously carrying out bluetooth connection between one electronic device and a plurality of other electronic devices, some electronic devices in the market support a bluetooth connection function of "one drags more", that is, support to simultaneously establish bluetooth connection with a plurality of electronic devices.
Currently, there is still an optimization need in connection speed for electronic devices that support "one drags many".
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 establishing Bluetooth connection between the earphone equipment and two terminal devices and improve the connection efficiency.
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:
determining that the terminal equipment to be connected with the earphone equipment at least comprises first terminal equipment and second terminal equipment;
and performing Bluetooth connection with the first terminal equipment through the first earphone, and performing Bluetooth connection with the second terminal equipment through the second earphone in parallel.
The embodiment of the application discloses bluetooth connecting device includes:
the device determining module is used for determining that the terminal devices to be connected with the earphone device at least comprise a first terminal device and a second terminal device;
and the connecting module is used for performing Bluetooth connection with the first terminal equipment through the first earphone and performing Bluetooth connection with the second terminal equipment through the second earphone in parallel.
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 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.
The method, the device, the earphone device and the computer readable storage medium for Bluetooth connection disclosed by the embodiment of the application determine that the terminal devices to be connected of the earphone device at least comprise a first terminal device and a second terminal device, which indicates that the earphone device needs to establish Bluetooth connection with the first terminal device and the second terminal device simultaneously or continuously, and the earphone device performs Bluetooth connection with the first terminal device through a first earphone and performs Bluetooth connection with the second terminal device through a second earphone in parallel. The earphone device can establish Bluetooth connection with the first terminal device and the second terminal device through the first earphone and the second earphone in parallel, the Bluetooth connection with the other terminal device can be established without waiting for the Bluetooth connection with one terminal device, the speed of establishing the Bluetooth connection between the earphone device and the two terminal devices can be increased, and the connection 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 of an exemplary embodiment of a Bluetooth connection;
FIG. 2 is a flow diagram of a method for Bluetooth connectivity in one embodiment;
fig. 3 is a flowchart of determining a terminal device to be connected and performing a connection operation through a first headset and a second headset in parallel according to an embodiment;
FIG. 4 is a diagram illustrating an interface of a terminal device for establishing a Bluetooth connection with a headset device according to an 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 of determining a terminal device to be connected and performing a connection operation through a first headset and a second headset in parallel in another embodiment;
FIG. 7 is an interaction timing diagram of a Bluetooth connection method in yet another embodiment;
fig. 8 is a flowchart of a third terminal device preemptively connecting an earphone device in an embodiment;
fig. 9A is an interaction timing diagram of the earphone device in a connection robbing scenario in one embodiment;
fig. 9B is an interaction timing diagram of the earphone device in a connection snatching scenario in another embodiment;
FIG. 10 is a block diagram of a Bluetooth connection device in one embodiment;
fig. 11 is a block diagram showing the configuration 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, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within 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 are not 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 headsets belong to both headsets, but are not the same headset. 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 be a device that supports simultaneous bluetooth connectivity with at least two terminal devices, i.e., the headset device 10 may support the "one-drag-many" functionality of bluetooth. The headset device 10 may include, but is not limited to, a headphone, an in-ear headphone, an ear bud headphone, a supra-aural headphone, and the like, and further, the headset device 10 may be a Wireless bluetooth headset, such as a True Wireless Stereo (TWS) bluetooth headset, and the like.
The headset device 10 may determine that the terminal devices to be connected include at least the first terminal device 20 and the second terminal device 30, indicating that the headset device 10 needs to establish a bluetooth connection with the first terminal device 20 and the second terminal device 30 simultaneously or consecutively. The first terminal device 20 and the second terminal device 30 may include, but are not limited to, wearable devices (such as a bracelet, a smart watch, smart glasses, and the like), 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 needs to establish the bluetooth connection with the first terminal device 20 and the second terminal device 30 simultaneously or continuously, the headset device 10 will establish the bluetooth connection with one of the terminal devices (e.g., the first terminal device 20) first, and after the headset device 10 completes the bluetooth connection process with the terminal device, establish the bluetooth connection with the other terminal device (e.g., the second terminal device 30). The second terminal device 30 needs to wait for the earphone device 10 to establish the bluetooth connection with the first terminal device 20, which results in a long time consumption to successfully establish the bluetooth connection with two other terminal devices, and the connection speed is slow, which affects the connection efficiency.
The embodiment of the application provides a bluetooth connection method, a bluetooth connection device, an earphone device and a computer readable storage medium, which can improve the speed of establishing bluetooth connection between the earphone device 10 and two terminal devices and improve the connection efficiency.
The earphone device 10 may include a first earphone 110 and a second earphone 120, for example, the earphone device 10 is a TWS earphone, and in some embodiments, the first earphone 110 and the second earphone 120 may distinguish between master and slave earphones. 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. In the embodiment of the present application, when the headset device 10 needs to establish bluetooth connection with the first terminal device 20 and the second terminal device 30 simultaneously or continuously, the first headset 110 may perform bluetooth connection with the first terminal device 20, and the second headset 120 may perform bluetooth connection with the second terminal device 30 in parallel. The first earphone 110 and the second earphone 120 are connected in parallel, the serial connection mode is changed into the parallel connection mode, the earphone device 10 does not need to wait for the Bluetooth connection process with one terminal device to be connected with the other terminal device in a Bluetooth mode, the speed of establishing the Bluetooth connection between the earphone device 10 and the two terminal devices is increased, and the connection efficiency is 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-three", "one-to-four" \ 8230 \ 8230, etc., 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, it is determined that the terminal devices to be connected to the headset device at least include a first terminal device and a second terminal device.
The maximum number N of bluetooth connections supported by the headset device may be an integer greater than or equal to 2, that is, the maximum number N of terminal devices that the headset device can simultaneously maintain the bluetooth connections may be greater than or equal to 2, and the headset device supports the "one drags many" function of bluetooth.
The terminal device to be connected refers to a terminal device for which the earphone device needs to establish bluetooth connection, and if it is determined that the terminal device to be connected includes the first terminal device and the second terminal device, it can be said that the earphone device is in a scene where bluetooth connection needs to be established with the first terminal device and the second terminal device simultaneously or continuously.
Optionally, the scenario that the headset device needs to establish the bluetooth connection with the first terminal device and the second terminal device simultaneously or continuously may include, but is not limited to, a scenario that the headset device receives a bluetooth connection request sent by the first terminal device and the second terminal device simultaneously, or a scenario that the headset device needs to perform a loopback with the first terminal device and the second terminal device, where the loopback refers to a scenario that the headset device has been paired with the terminal device before and does not need to be paired with the terminal device and can directly establish the bluetooth connection with the terminal device.
Step 220, performing bluetooth connection with the first terminal device through the first headset.
And step 230, performing bluetooth connection with the second terminal device through the second headset.
When the earphone device is in a scene that the Bluetooth connection with the first terminal device and the second terminal device needs to be established simultaneously or continuously, the Bluetooth connection with the first terminal device can be carried out through the first earphone, the Bluetooth connection with the second terminal device can be carried out in parallel through the second earphone, and the first earphone and the second earphone can be connected in parallel to establish the Bluetooth connection with the first terminal device and the second terminal device respectively. Optionally, the first headset and the second headset are connected in parallel, and the second headset and the second terminal device may perform bluetooth connection in a process of performing bluetooth connection between the first headset and the first terminal device.
In some embodiments, under the condition that the M terminal devices are respectively connected to the headset device via bluetooth, if it is detected that the terminal devices to be connected to the headset device at least include the first terminal device and the second terminal device, the headset device may perform bluetooth connection with the first terminal device via the first headset, and perform bluetooth connection with the second terminal device via the second headset in parallel.
Where M may be an integer greater than or equal to 0 and less than or equal to N-2, the headset device establishes bluetooth connections with M terminal devices, which may include a case where the headset device does not establish bluetooth connections with any terminal device (i.e., M = 0), and may also include a case where the number of terminal devices that establish bluetooth connections with the headset device is less than or equal to N-2, for example, N is 3, and the headset device establishes bluetooth connections with only 1 terminal device.
In the case that the headset device establishes bluetooth connections with M terminal devices, the headset device may also establish bluetooth connections with N-M terminal devices, where N-M is greater than or equal to 2, and therefore, a scenario may occur in which the headset device needs to establish bluetooth connections with two terminal devices simultaneously or continuously. Based on the above, under the condition that the earphone device and the M terminal devices respectively establish bluetooth connections, the earphone device can determine whether the earphone device includes at least two terminal devices to be connected, and if the terminal devices to be connected include at least a first terminal device and a second terminal device, the earphone device can perform bluetooth connection with the first terminal device through the first earphone, and perform bluetooth connection with the second terminal device through the second earphone in parallel. If the number of the terminal devices to be connected is only one, the Bluetooth connection can be directly carried out with the terminal devices to be connected through the first earphone and/or the second earphone.
In some embodiments, when the number of terminal devices establishing bluetooth connection with the headset device reaches N-1, if there is only one terminal device to be connected, the bluetooth connection may be directly performed with the terminal device to be connected through the first headset and/or the second headset. If the terminal equipment to be connected comprises the first terminal equipment and the second terminal equipment, the earphone equipment can be disconnected through the first earphone or the second earphone, the Bluetooth connection with the target terminal equipment is disconnected, and then the Bluetooth connection is established between the first earphone and the second earphone and the first terminal equipment and the second terminal equipment respectively.
The target terminal device may be any one of N-1 terminal devices establishing a bluetooth connection with the earphone device, or a terminal device selected from the N-1 terminal devices according to a preset selection rule. For example, the terminal device with the lowest priority may be selected as the target terminal device according to the priority of each connected terminal device, or the terminal device with the lowest activity (i.e., the least amount of data to be transmitted) may be selected as the target terminal device.
In this embodiment of the application, the headset device can perform bluetooth connection with the first terminal device and the second terminal device through the first headset and the second headset in parallel, and the headset device does not need to wait for the headset device to establish bluetooth connection with one terminal device after completing the bluetooth connection process with the other terminal device, so that the speed of establishing bluetooth connection between the headset device and the two terminal devices can be increased, and the connection efficiency is improved.
As shown in FIG. 3, in one embodiment, step 210 may include step 302, step 220 may include step 304, and step 230 may include step 306:
step 302, in a situation that the headset device is in a connectable state, if a bluetooth connection request sent by the first terminal device and the second terminal device is received within a first time period, it is determined that the terminal devices to be connected to the headset device at least include the first terminal device and the second terminal device.
The earphone device may be in a connectable state, and the earphone device being in the 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. 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 headset device is a bluetooth device supporting "one drags more", and the headset device can be always in a connectable state by default during the use process of the headset device (for example, the headset device is not in a charging state), so as to facilitate other terminal devices to connect the headset device at any time or to rob the headset device for connection. In other embodiments, the headset device may also be triggered to enter the connectable state under certain conditions, for example, when the number of terminal devices connected by the headset device does not reach N, the headset device is in the connectable state; or the user triggers the earphone device to enter the connectable state according to actual requirements.
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.
Under the condition that the headset device is in a connectable state, if the headset device receives bluetooth connection requests sent by the first terminal device and the second terminal device within a first time period, a situation that the headset device receives another bluetooth connection request when one bluetooth connection request is not processed may occur greatly. Therefore, the first earphone and the second earphone can be respectively connected with the first terminal device and the second terminal device in a Bluetooth mode, the serial connection establishment process is changed into a parallel connection establishment process, and the connection waiting time is shortened.
Step 304, processing the bluetooth connection request sent by the first terminal device through the first earphone, and establishing bluetooth connection with the first terminal device.
Step 306, the bluetooth connection request sent by the second terminal device is processed through the second headset, and bluetooth connection is established with the second terminal device.
In some embodiments, the first terminal device and the second terminal device may be terminal devices that have been paired with the earphone device before, and connection information corresponding to the earphone device may be stored in both the first terminal device and the second terminal device. Optionally, the connection information may include device information, pairing information, and the like, the device information may include, but is not limited to, a Media Access Control (MAC) address of the headset device, a name of the headset device, and the like, and the pairing information may include, but is not limited to, pairing code, pairing key, and the like.
The headset device may be in a page scan mode allowing other terminal devices to send bluetooth connection requests to the headset device. The first terminal device and the second terminal device can send a Bluetooth connection request to the earphone device according to the stored connection information corresponding to the earphone device so as to request to establish Bluetooth connection with the earphone device.
Since the first terminal device and the second terminal device are terminal devices paired with the earphone device, connection information of the first terminal device and the second terminal device can be stored in the earphone device. The first earphone in the earphone device can process the Bluetooth connection request sent by the first terminal device, respond to the Bluetooth connection request and establish Bluetooth connection with the first terminal device. The second earphone can process the Bluetooth connection request sent by the second terminal device, respond to the Bluetooth connection request and establish Bluetooth connection with the first terminal device. Because the earphone device stores the pairing information of the first terminal device and the second terminal device, the first earphone and the first terminal device do not need to be paired (pairing) in the Bluetooth connection process, and the second earphone and the second terminal device do not need to be paired in the Bluetooth connection process.
In some embodiments, establishing a bluetooth connection as referred to above may include establishing a bluetooth physical link, such as a physical link such as an ACL (Asynchronous Connectionless). It can be understood that after the bluetooth connection is established, data transmission such as audio can be performed based on the bluetooth connection, and a specific bluetooth connection process may refer to relevant specifications of a relevant bluetooth protocol.
In further embodiments, the first terminal device and/or the second terminal device may also be terminal devices that have not been paired with the headset device. The method includes that when the earphone device can be in a pairing state, the pairing state can mean that the earphone device opens an inquiry scan mode and opens a page scan mode, the earphone device is allowed to be scanned and searched by other terminal devices in the inquiry scan mode, and the earphone device is allowed to be connected by other devices in the page scan mode, that is, in the pairing state, the earphone device is in a discoverable state and a connectable state at the same time. The unpaired terminal device may scan for an earphone device and send a bluetooth connection request to the earphone device to request a bluetooth connection with the earphone device.
When the earphone equipment is in a pairing state, if a Bluetooth connection request sent by the first terminal equipment and the second terminal equipment is received in a first time period, the first terminal equipment and the second terminal equipment can be connected in a Bluetooth mode through the first earphone, and the second terminal equipment and the second earphone can be connected in a Bluetooth mode. It can be understood that if the first terminal device and/or the second terminal device is not paired with the headset device, the pairing may be performed during the process of establishing the bluetooth connection, and the pairing may include processes of exchanging pairing codes with each other, and agreeing a key between the two, so as to ensure the security of transmission. For example, if the first terminal device is not paired with the headset device, the first headset may perform pairing operation in the process of performing bluetooth connection with the first terminal device; if the second terminal device is not paired with the earphone device, the second earphone will be paired in the process of bluetooth connection with the second terminal device.
In some embodiments, the headset device may enter the pairing state according to a pairing instruction, which may optionally include any one of the following:
(1) And the pairing instruction is sent by the earphone charging box. The earphone equipment can receive a pairing instruction sent by the earphone charging box and enter 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 earphone equipment is required to enter a pairing state, a user can put a first earphone and a second earphone in the earphone equipment into an earphone charging box, and the earphone charging box can send a pairing instruction to the first earphone and/or the second earphone put into the earphone 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.
(2) Pairing instructions generated in response to the detected pairing trigger operation. The headset device can respond to the detected pairing triggering operation, generate a pairing instruction and enter 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 method includes the steps that an operation mode of pairing triggering operation can be preset, for example, pressing operation, touch operation, distance sensing operation and the like can be performed, the earphone device can acquire user interaction data through a sensor, for example, information such as touch duration, touch position and touch frequency can be acquired through the touch sensor, information such as pressure degree, press duration and press frequency can be acquired through a pressure sensor, whether the user interaction data are matched with a preset operation mode of pairing triggering operation or not is judged, and if the user interaction data are matched with the preset operation mode of pairing triggering operation, it can be determined that the pairing triggering operation is detected, a pairing instruction is generated, and a pairing state is 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.
(3) And the pairing instruction is sent by any terminal equipment which establishes Bluetooth connection with the earphone equipment. Under the condition that the earphone device is connected with one or more terminal devices in a Bluetooth mode, a pairing instruction sent by any connected terminal device can be received, and the terminal device enters a pairing state according to the pairing instruction. The user can control any terminal equipment which establishes Bluetooth connection with the earphone equipment to enable the earphone equipment to enter a pairing state, and the terminal equipment can respond to pairing operation triggered by the user and send a pairing instruction to the earphone equipment through Bluetooth connection.
As an embodiment, the pairing operation may include a trigger operation for a pairing option displayed for the connected terminal device. The connected terminal equipment can display a management interface of the earphone equipment, the management interface can comprise a pairing control, and if the connected terminal equipment detects a trigger operation aiming at the pairing control, a pairing instruction can be sent to the earphone equipment through Bluetooth connection so as to control the earphone equipment to enter a pairing state.
Illustratively, fig. 4 is an interface diagram of a terminal device that establishes a bluetooth connection with an earphone device in one embodiment. As shown in fig. 4, the terminal device 400 that establishes a bluetooth connection with the headset device may display a bluetooth headset and pairing control 402, and the user may click the pairing control 402, and the terminal device 400 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 the embodiment of the present application.
In this application embodiment, utilize the terminal equipment who establishes the bluetooth with earphone equipment to be connected, 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.
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.
When the earphone device is in a pairing state, the inquiry scan mode and the page scan mode are started, and the earphone device can be scanned by other terminal devices. Under the condition that the first terminal device and the second terminal device are not matched with the earphone device, the first terminal device and the second terminal device can send scanning requests to the earphone device, and the earphone device can respectively send scanning responses to the first terminal device and the second terminal device according to the scanning requests. Optionally, the first earphone may send the scan response to the first terminal device and the second terminal device, or the second earphone may send the scan response to the first terminal device and the second terminal device, or the first earphone may send the scan response to the first terminal device, and the second earphone may send the scan response to the second terminal device.
Optionally, after receiving the scan response sent by the headset device, the first terminal device may acquire device information of the headset device, such as a device name and an MAC address of the headset device, and display the device information. The user of the first terminal device can perform selection operation aiming at the device information so as to trigger the first terminal device to perform Bluetooth connection with the earphone device. After the first terminal device receives the selection operation, a bluetooth connection request may be sent to the headset device according to the device information of the headset device. Similarly, the second terminal device may also send a bluetooth connection request to the headset device after receiving the scan response sent by the headset device.
In some embodiments, a bluetooth connection may be established between the first headset and the second headset, and after the bluetooth connection is established between the first headset and the first 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 second terminal equipment, the connection information of the second terminal equipment can be synchronized to the first earphone through the second earphone. The connection information may include, but is not limited to, frequency hopping information, channel information, clock information, and the like. And information synchronization between the first earphone and the second earphone is realized.
In some embodiments, the first earphone may be a master earphone in the earphone device, the second earphone may be a slave earphone in the earphone device, the master earphone may refer to an earphone that establishes a bluetooth physical link with the terminal device and can directly perform data transmission with the terminal device, the slave earphone may refer to an earphone that does not directly establish a bluetooth physical link with the terminal device, the slave earphone may listen to the bluetooth physical link between the master earphone and the terminal device, or the master earphone synchronizes data sent by the first terminal device to the slave earphone. After the second earphone synchronizes the connection information of the second terminal equipment to the first earphone, the Bluetooth connection object of the second terminal equipment can be switched from the second earphone to the first earphone, and the second earphone monitors the Bluetooth connection between the first earphone and the second terminal equipment; 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 first earphone acquires the synchronous connection information of the second earphone, data transmission can be directly carried out between the first earphone and 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 the Bluetooth physical link between the first earphone and the second terminal equipment, or the first earphone forwards data transmitted between the first earphone and the second terminal equipment to the second earphone, so that master-slave synchronization is realized.
After the first earphone establishes the bluetooth connection with the first terminal device, the first earphone can also synchronize the connection information of the first terminal device to the second earphone, and the second earphone can monitor the established bluetooth connection between the first earphone and the first terminal device based on the connection information. 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 earphone device may be a bluetooth "one-to-two" device, and both the terminal device a and the terminal device B are devices paired with the earphone device. The method comprises the steps that under the condition that the earphone device is not in Bluetooth connection with other terminal devices, the earphone device is in a connectable state (namely 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 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. 5B is an interaction timing diagram of the bluetooth connection method in another embodiment. As shown in fig. 5B, the earphone device may be a bluetooth "one-to-two" device, and both the terminal device a and the terminal device B are devices that are not paired with the earphone device. The method comprises the steps that under the condition that the earphone device is not in Bluetooth connection with other terminal devices, the earphone device can enter a pairing state, the earphone device is in an inquiry scan mode and a page scan mode simultaneously in the pairing state, the terminal device A and the terminal device B can scan the earphone device, and a Bluetooth connection request is sent 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, the first earphone can process the Bluetooth connection request sent by the terminal device A, performs Bluetooth connection with the terminal device A, and is paired with the terminal device A in the process of performing Bluetooth connection. The second earphone can process the Bluetooth connection request sent by the terminal device B, performs Bluetooth connection with the terminal device B, and performs pairing with the terminal device B in the process of performing Bluetooth connection. 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.
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, that is, the bluetooth physical link is established between the first headset and each of the first terminal device and the second terminal device. Further, the first headset may further establish service connection with the first terminal device and/or the second terminal device, such as A2DP (Advanced Audio Distribution Profile, bluetooth Audio transmission model agreement), HFP (handles-free Profile), and the like, on the basis of a bluetooth physical link between the first headset and the first terminal device and/or a bluetooth physical link between the first headset and the second terminal device, so that the first terminal device and/or the second terminal device may transmit service data, such as Audio data, voice data, and the like, to the first headset.
In this embodiment of the application, if the headset device receives the bluetooth connection request sent by the first terminal device and the second terminal device within the first time period, the bluetooth connection can be respectively established with the first terminal device and the second terminal device through the first headset and the second headset, and the first headset and the second headset perform the connection operation in parallel, so that the connection efficiency is improved. And the first earphone and the second earphone carry out information synchronization, so that the Bluetooth connection object of the second terminal equipment is switched from the second earphone to the first earphone, all the established Bluetooth connections can be managed more conveniently, and the data transmission efficiency is ensured.
In some embodiments, in a scenario where the headset device needs to establish a bluetooth connection with the first terminal device and the second terminal device simultaneously or continuously, the method may further include: and receiving a scene of a Bluetooth connection request sent by a second terminal device in the process of carrying out Bluetooth connection between the earphone device and a first terminal device. If the headset device first receives the bluetooth connection request sent by the first 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 first 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, the first earphone is still in the process of processing the bluetooth connection request of the first terminal device, and if the bluetooth connection request sent by the second terminal device is received in the process, the second earphone can process the bluetooth connection request sent by the second terminal device and establish bluetooth connection with the second terminal device. The connection speed of the earphone device and the two terminal devices can be improved.
As shown in fig. 6, in one embodiment, step 210 may include step 602, step 220 may include step 604, and step 230 may include step 606:
step 602, when the earphone device is in a reconnection state, determining a first terminal device and a second terminal device to be reconnected.
In some embodiments, the first terminal device and the second terminal device may be terminal devices paired with the headset device. The earphone device can store connection information corresponding to the first terminal device and the second terminal device respectively, and the earphone device can actively carry out back connection with the first terminal device and the second terminal device according to the connection information.
Optionally, the earphone device is placed in the 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 connection-back state. It should be noted that other methods 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 terminal devices by bluetooth, the earphone device may be triggered to enter the connection back state; or the earphone device does not establish Bluetooth connection with any terminal device currently, and then the earphone device can enter a loop connection state.
Alternatively, the connection information may include a connection record, where the connection record may refer to a record of connection history of the earphone device with other terminal devices, and the connection record may include pairing information and device information corresponding to each other terminal device that is paired with the earphone device, and a connection time at which each other terminal device is connected with the earphone device via bluetooth, a historical connection frequency of each other terminal device, and the like.
The historical connection frequency can be used for representing the historical connection condition of the terminal device and the earphone device, and the historical connection frequency can be the connection frequency with the earphone device in the past period of time (such as in the past 1 week and the past 1 month) and the like.
The first terminal device and the second 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 first terminal device and the second 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 first terminal device and the second terminal device in the order of the number of the historical connection frequencies.
Step 604, a first connection request is sent to the first terminal device through the first headset, where the first connection request is used for performing a backhaul connection with the first terminal device.
Step 606, sending a second connection request to the second terminal device through the second headset, where the second connection request is used to perform a backhaul connection with the second terminal device.
When the earphone equipment is in a loop connection state, a first connection request can be sent to first terminal equipment to be looped back through the first earphone, and a second connection request can be sent to second terminal equipment to be looped back through the second earphone.
In some embodiments, after determining the first terminal device and the second terminal device to be connected back, the first headset may page the page first terminal device, and if the first terminal device is located within the connection range of the headset device, the page may be responded to establish the physical link. Similarly, the second earphone can page the second terminal device of the page, if the second terminal device is in the connection range of the earphone device, the page can be responded, and because the second terminal device stores the pairing key of the earphone device, the Bluetooth connection can be established with the second earphone without the 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.
After the first earphone and the first terminal equipment are successfully connected back, the first earphone can synchronize the connection information of the first terminal equipment with the second earphone, and after the second earphone and the second terminal equipment are successfully connected back, the second earphone can also synchronize the connection information of the second terminal equipment with the first earphone. Optionally, after the second headset synchronizes connection information of the second terminal device with 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 may monitor bluetooth connections between the first headset and the first terminal device and between the first headset and the second terminal device, or the first headset synchronizes data transmitted between the first headset and the first terminal device and between the first headset and the second terminal device with the second headset, thereby implementing master-slave synchronization. For all terminal equipment connected with the earphone equipment, the data transmission management is carried out in a mode that the first earphone is connected and the second earphone monitors or receives data forwarded by the first earphone, so that the management can be more convenient, and the data transmission efficiency is improved.
Fig. 7 is an interaction sequence diagram of a bluetooth connection method in yet another embodiment. As shown in fig. 7, the earphone device may be a bluetooth "one-to-two" device, and both the terminal device a and the terminal device B are devices paired with the earphone device. 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 the stored connection record of the terminal device A and carry out reconnection 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. 5A, fig. 5B, and fig. 7 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, when the headset device is in a reconnection state, determining a first terminal device to be reconnected, and sending a first connection request to the first terminal device through a first headset, where the first connection request is used for performing reconnection with the first terminal device; and if the Bluetooth connection request sent by the second terminal equipment is received in a second time period in which the first earphone sends the first connection request to the first terminal equipment, the Bluetooth connection request is processed through the second earphone, and Bluetooth connection is carried out between the second earphone and the second terminal equipment.
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 first terminal equipment, a first connection request can be sent to the first terminal equipment through the first earphone so as to establish Bluetooth connection with the first terminal equipment. And if the Bluetooth connection request sent by the second terminal equipment is received in the second time period in which the first earphone sends the first connection request, the second terminal equipment can be in the Bluetooth connection request through the second earphone, and Bluetooth connection is established with the second 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 with the first terminal device in a back mode, the Bluetooth connection request sent by the second terminal device can be responded, the response is not needed after the connection in the back mode 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 connection initiated by the headset device with the terminal device and a bluetooth connection initiated by another terminal device with the headset device.
In this embodiment of the application, when the headset device handles the loopback state, the first headset and the second headset can be respectively and reciprocally connected with the first terminal device and the second terminal device, so that the speed of the headset device and the two terminal devices for being reciprocally connected can be increased, and the loopback efficiency can be increased.
In some embodiments, the step of determining that the terminal devices to which the earphone device is to be connected at least include a first terminal device and a second terminal device may include: and if the number of the terminal devices to be connected is greater than 2, determining the first terminal device and the second terminal device according to the priority of each terminal device to be connected.
If the number of the terminal devices to be connected is greater than 2, for example, a bluetooth connection request sent by 3 terminal devices is received in a first time period, or a bluetooth connection request sent by another terminal device is received in a process that the earphone device is in loop connection with the first terminal device and the second terminal device, and the like, the earphone device may determine the first terminal device and the second terminal device according to the priority of each terminal device to be connected. Specifically, the terminal devices to be connected with the priority ranking in the top 2 may be determined as the first terminal device and the second terminal device in the descending order of priority.
As an implementation manner, the priority of each to-be-connected terminal device may be determined according to the order in which the earphone device receives the bluetooth connection request sent by each to-be-connected terminal device, and the earlier the bluetooth connection request received by the earphone device is, the higher the priority of the corresponding to-be-connected terminal device may be.
As another embodiment, the priority of each terminal device to be connected may also be determined according to the device type, the historical connection frequency, and the like of each terminal device to be connected. The device type may include, but is not limited to, a mobile phone, a smart watch, a bracelet, a smart home, and the like, and the priority corresponding to each device type may be preset. The priority of the terminal device to be connected whose historical connection frequency is high may be higher than the priority of the terminal device to be connected whose historical connection frequency is low.
In some embodiments, after the headset device establishes bluetooth connections with the first terminal device and the second terminal device, respectively, if the number of terminal devices that establish bluetooth connections with the headset device has not reached the maximum number N, the headset device may continue to perform bluetooth connections with other terminal devices to be connected. For example, the terminal devices to be connected include a terminal device a, a terminal device B, and a terminal device C, the headset device may establish bluetooth connections with the terminal device a and the terminal device B through the first headset and the second headset, respectively, and if the number of the terminal devices establishing the bluetooth connections with the headset device has not reached the maximum number N, the bluetooth connections may continue to be established with the terminal device C through the first headset or the second headset.
After the headset device establishes bluetooth connections with the first terminal device and the second terminal device, respectively, if the number of the terminal devices establishing the bluetooth connections with the headset device has reached the maximum number N, as an implementation manner, the headset device may reject the bluetooth connection request of other terminal devices to be connected. As another implementation, the target terminal device in the connected terminal devices may also be selected to disconnect the bluetooth connection, and then perform the bluetooth connection with other terminal devices to be connected. The target terminal device may be any terminal device except the first terminal device and the second terminal device in the terminal device that establishes the bluetooth connection with the earphone device.
In the embodiment of the application, under the condition that the number of the terminal devices to be connected is greater than 2, the first terminal device and the second terminal device can be determined according to the priority of each terminal device to be connected, and then the first earphone and the second earphone are connected with the first terminal device and the second terminal device in a Bluetooth mode in parallel, so that the connection efficiency is improved, and the connected terminal devices are more suitable for user requirements.
As shown in fig. 8, in an embodiment, the bluetooth connection method further includes the following steps:
step 802, receiving a bluetooth connection request sent by a third terminal device under the condition that the headset device and the N terminal devices respectively establish bluetooth connection.
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, where N may be an integer greater than or equal to 2, for example, N may be 2, 3, 5, and the like, and is not limited herein.
It can be understood that, the earphone device and the N terminal devices respectively establish bluetooth connections, which may mean that the earphone device and the N terminal devices maintain bluetooth connections.
Under the condition that the earphone device and the N 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 a third terminal device, the Bluetooth connection with one connected terminal device needs to be disconnected, the earphone device can successfully establish the Bluetooth connection with the third terminal device, and equivalently, the third terminal device preempts the Bluetooth connection between the one connected terminal device and the earphone device. That is, under the condition that the headset device and the N terminal devices respectively establish bluetooth connections, if the headset device receives a bluetooth connection request sent by a third terminal device, the headset device is in a connection robbing scene.
In some embodiments, the third 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 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 connected terminal devices, even if no third terminal device requests to establish the Bluetooth connection with the earphone device, the earphone device and the at least part of connected terminal devices are also in a disconnection state, and a 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 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 terminal devices. The earphone equipment is in a pairing state, the inquiry scan mode and the page scan mode are started in the pairing state, the earphone equipment can be scanned by the third terminal equipment, and the earphone equipment can receive a Bluetooth connection request sent by the third terminal equipment. The third terminal device can start a scanning mode and scan the surrounding Bluetooth devices, the third terminal device can send a scanning request to the earphone device, and the earphone device can receive the scanning request sent by the third terminal device through the first earphone and/or the second earphone and send a scanning response to the third terminal device according to the scanning request. After the third terminal device receives the scanning response, if the third terminal device determines that bluetooth connection with the headset device is required, a bluetooth connection request may be sent to the headset device.
It should be noted that, reference may be made to the relevant description in the foregoing embodiments for a manner of performing a pairing state by the headset device according to the pairing instruction, and details are not repeated here.
In further embodiments, the third terminal device may be a device that has been paired with the earphone device. The earphone device may be in a connectable state (i.e., in a page scan mode) and may be capable of receiving a bluetooth connection request transmitted by another terminal device. The third terminal device may store connection information of the earphone device, and may send a bluetooth connection request to the earphone device according to the connection information.
And step 804, performing disconnection processing through the first earphone, wherein the disconnection processing is used for disconnecting the Bluetooth connection between the earphone device and the target terminal device in the N terminal devices.
Step 806, the bluetooth connection request is processed through the second headset, so that the headset device establishes bluetooth connection with the third terminal device.
When the earphone device is in a connection grabbing scene, the Bluetooth connection with one connected terminal device needs to be disconnected.
In some embodiments, the disconnection process by the first headset may include: and determining a target terminal device in the N terminal devices, and executing disconnection processing corresponding to the target terminal device by the first earphone.
For example, a target terminal device may be determined from the N connected terminal devices through the first headset, and disconnection processing corresponding to the target terminal device may be performed. As an implementation, the target terminal device may be any one of N terminal devices, and the first earphone may randomly select the target terminal device from the N terminal devices.
As another embodiment, the first earphone may select, as the target terminal device, a terminal device whose priority satisfies the priority condition from the N terminal devices according to the priorities corresponding to the N terminal devices, respectively.
The first headset may obtain a priority corresponding to each terminal device (i.e., each connected terminal device) that establishes the bluetooth connection, and optionally, the priority of each connected terminal device may be determined according to the device status parameter of each connected 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 can be used to represent whether the connected terminal device outputs service data to the earphone device via the bluetooth connection currently. The priority of the terminal device currently outputting the service data to the earphone device may be higher than the priority of the 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, a connection time at which each connected terminal device recently establishes a bluetooth connection with an earphone device may be stored in the first earphone, and a connection duration of the current connection of each connected terminal device is determined according to the connection time corresponding to each connected terminal device, where the connection duration is a duration from the connection time to the current time. The sequence parameter of each connected terminal device can be determined according to the connection duration of each connected terminal device, and the longer the connection duration is, the earlier the sequence indicated by the sequence parameter is, namely the earlier the terminal device establishes the bluetooth connection with the earphone device.
As another embodiment, the first headset may also establish a connection queue, and the device information of each connected terminal device may be sequentially stored in the connection queue according to an order in which the bluetooth connection between each connected terminal device and the headset device is established, and a terminal device that is further ahead is arranged in the connection queue, which indicates that the bluetooth connection between the terminal device and the headset device is established earlier. Alternatively, the priority of the terminal device that establishes the bluetooth connection with the headphone device earlier may be lower.
The device type parameter may be used to characterize the device type of the connected terminal device, which may include, but is not limited to, a cell 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 connected terminal device according to the device type parameters of each connected terminal device and acquire the priority corresponding to the device type.
The device remaining capacity parameter may be used to characterize a current remaining capacity of the connected terminal device, and a priority of the terminal device with a large device remaining capacity may be higher than a priority of the terminal device with a small device remaining capacity.
The historical connection frequency may be used to characterize the historical connection of the connected terminal device to the headset device, and may be the connection frequency over the 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 terminal devices currently connected with the earphone device in a past period of time according to the stored connection condition data. The priority of the terminal device whose historical connection frequency is high may be higher than the priority of the terminal device whose historical connection frequency is low.
The first headset may determine a priority corresponding to each connected terminal device according to one or more device status parameters of each connected terminal device. If the priority corresponding to each connected terminal device is determined according to the various device state parameters, the weight can be respectively distributed aiming at each device state parameter. Taking a device a in a connected terminal device as an example, the device a may be a connected terminal device, and a reference priority corresponding to each device state parameter may be determined according to the device state parameter of each device a, for example, if a 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%, then the reference priority corresponding to the device remaining capacity may be 2, and so on. 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 or weighted average calculation to obtain the priority corresponding to the equipment A.
It should be noted that the manner of determining the priorities corresponding to the N terminal devices is not limited to the above several manners, for example, a priority rule may also be directly set, where the priority of the terminal device currently outputting service data to the earphone device is the highest, and the priority of the terminal device currently not outputting service data to the earphone device is the lowest among the terminal devices currently not outputting service data to the earphone device, and the like, and the priority of each connected terminal device may be determined based on the priority rule and the device state parameter of each connected terminal device.
The first earphone selects a terminal device with a priority meeting a priority condition from the N 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 a connected terminal device with the lowest priority as the target terminal device, or may first select a connected terminal device with a priority lower than the priority threshold, and if there are multiple connected terminal devices with priorities lower than the priority threshold, one of the terminal devices may be randomly selected as the target terminal device, or the 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 connected 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 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 connected terminal device changes, the target terminal device is selected according to the latest priority of each connected terminal device when the bluetooth connection request is received.
For example, when the headset device receives the bluetooth connection request, if each connected terminal device does not transmit service data to the headset device, the terminal device a connected first may be preferentially disconnected according to the bluetooth connection order of each connected terminal device. If the earphone device enters the pairing state, if the terminal device a transmits service data (such as voice data, audio data and the like) to the earphone device before the earphone device receives the bluetooth connection request, the priority of the terminal device a changes, at this time, if the earphone device receives the bluetooth connection request, the bluetooth connection with the terminal device a is not disconnected, and at this time, which connected terminal device is specifically disconnected is determined according to the set priority rule. Therefore, the earphone device is disconnected not when entering the pairing state, but after receiving the Bluetooth connection request, the earphone device is disconnected to a greater extent, the earphone is guaranteed to be used by the user, the switching speed of the terminal device 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 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.
And in the process of disconnection processing of the first earphone, the second earphone can process the Bluetooth connection request sent by the third terminal equipment in parallel. As an implementation manner, the third terminal device may be a terminal device that is not paired with the earphone device, the second earphone may respond to a bluetooth connection request sent by the third terminal device and establish a bluetooth connection with the third terminal device, and the second earphone and the third terminal device are paired in the process of establishing the bluetooth connection, where the pairing may include processes of exchanging pairing codes and agreeing a secret key between the pairing codes and the third terminal device, so as to ensure the security of transmission.
As another embodiment, the third terminal device may be a terminal device already paired with the earphone device, and the second earphone may respond to the bluetooth connection request sent by the third terminal device to establish a physical link, such as an ACL link, with the third terminal device.
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 used for performing disconnection processing corresponding to the target terminal device and Bluetooth connection with the third terminal device in parallel, the earphone device does not need to wait for connection request sent by the third terminal device after Bluetooth connection between the disconnection processing and the target terminal device is disconnected, connection emergency speed of the third terminal device to the earphone device can be improved, and connection emergency efficiency is improved.
In one embodiment, after the bluetooth connection request sent by the third terminal device is processed through the second headset and the bluetooth connection with the third terminal device is established, the connection information of the third terminal device can be synchronized to the first headset through the second headset.
Optionally, after the second headset synchronizes connection information of the third terminal device to the first headset, a bluetooth connection object of the third terminal device is switched from the second headset to the first headset, and the second headset monitors bluetooth connection between the first headset and the third terminal device; or after the second earphone synchronizes the connection information of the third terminal device to the first earphone, the bluetooth connection object of the third 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 first earphone acquires the synchronous connection information of the second earphone, data transmission can be directly carried out with the third terminal equipment based on the connection information, the physical link transition between the second earphone and the third terminal equipment is switched to the physical link between the first earphone and the third terminal equipment, and the Bluetooth connection object of the third terminal equipment is switched to the first earphone from the second earphone. The second earphone can monitor a Bluetooth physical link between the first earphone and the third terminal equipment, or the first earphone forwards data transmitted between the first earphone and the third terminal equipment to the second earphone, so that master-slave synchronization is realized. Through the information synchronization between the earphones, all terminal equipment which establishes 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.
In some embodiments, after the first headset completes the disconnection process, the first headset may also synchronize disconnection information to the second headset, where the disconnection information may include at least device information of the target terminal device that disconnected the bluetooth connection. And under the condition that the first earphone is a master earphone and the second earphone is a slave earphone, the second earphone can no longer monitor the Bluetooth connection between the target terminal equipment and the first earphone.
Fig. 9A is a sequence diagram of interactions when the headset device is in a contention scenario, in an embodiment. As shown in fig. 9A, 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 earphone device is in a connectable state (i.e., 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 information about 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. 9A), and the second headset may process the bluetooth connection request. 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.
Fig. 9B is an interaction timing diagram of the earphone device in the connection robbing scenario in another embodiment. As shown in fig. 9B, the earphone device may be a device supporting bluetooth "one-to-two", and the earphone 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 the pairing state and first keep the bluetooth connection with the terminal device a and the second device B when entering the pairing state. The terminal device C may send a scan request to the headphone device, and after receiving the scan request, the headphone device may send a scan response to the terminal device C through the first headphone or the second headphone. When the terminal device C determines that bluetooth connection with the headset device is required, a bluetooth connection request may be sent to the headset device. After receiving the bluetooth connection request sent by the terminal device C, the first headset may perform disconnection processing corresponding to a target terminal device (e.g., the terminal device B in fig. 9B), 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 Bluetooth connection with the target terminal device, the first earphone can synchronously disconnect information to the second earphone, and after the second earphone is successfully paired with the terminal device C and Bluetooth connection is established, 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.
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 and acquire 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, in the embodiment of the present application, a terminal device that is not paired with an earphone device means 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 third terminal device seizes 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 third 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 a Bluetooth connection object of the third 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. 10, in one embodiment, a bluetooth connection apparatus 1000 is provided, which can be applied to the above-mentioned headset device, and the bluetooth connection apparatus 1000 may include a device determination module 1010 and a connection module 1020.
The device determining module 1010 is configured to determine that the terminal devices to be connected to the headset device at least include a first terminal device and a second terminal device.
A connection module 1020, configured to perform bluetooth connection with a first terminal device through a first headset, and perform bluetooth connection with a second terminal device through a second headset in parallel.
In this embodiment of the application, the headset device can establish the bluetooth connection with the first terminal device and the second terminal device through the first headset and the second headset in parallel, and the headset device does not need to wait for the headset device to establish the bluetooth connection with one of the terminal devices after completing the bluetooth connection process with the other terminal device, so that the speed of establishing the bluetooth connection between the headset device and the two terminal devices can be increased, and the connection efficiency is improved.
In an embodiment, the device determining module 1010 is further configured to determine, when the headset device is in a connectable state, that the terminal devices to be connected to the headset device at least include the first terminal device and the second terminal device if bluetooth connection requests sent by the first terminal device and the second terminal device are received within the first time period.
The connection module 1020 is further configured to process, through the first headset, the bluetooth connection request sent by the first terminal device, and establish a bluetooth connection with the first terminal device; and the Bluetooth connection module is used for processing a Bluetooth connection request sent by the second terminal equipment through the second earphone and establishing Bluetooth connection with the second terminal equipment.
In one embodiment, the first terminal device and/or the second terminal device is a terminal device that is not paired with the earphone device; the bluetooth connection apparatus 1000 includes a pairing module in addition to the device determination module 1010 and the connection module 1020.
And the pairing module is used for entering a pairing state according to the pairing instruction.
The pairing instruction includes any one of:
a pairing instruction is sent by the earphone charging box;
pairing instructions generated in response to the detected pairing triggering operation;
and the pairing instruction is sent by any terminal equipment which establishes Bluetooth connection with the earphone equipment.
In one embodiment, the device determining module 1010 is further configured to determine, when the headset device is in a loop connection state, a first terminal device and a second terminal device to be looped back.
The connection module 1020 is further configured to send a first connection request to the first terminal device through the first headset, where the first connection request is used for performing a loopback with the first terminal device; and the second earphone is used for sending a second connection request to the second terminal equipment, and the second connection request is used for carrying out loop connection with the second terminal equipment.
In one embodiment, the device determining module 1010 is further configured to determine a first terminal device to be connected back when the earphone device is in a connection back state.
The connection module 1020 is further configured to send a first connection request to the first terminal device through the first headset, where the first connection request is used for performing a loopback with the first terminal device.
The connection module 1020 is further configured to, if the bluetooth connection request sent by the second terminal device is received within a second time period in which the first headset sends the first connection request to the first terminal device, process the bluetooth connection request through the second headset, and perform bluetooth connection with the second terminal device.
In one embodiment, the bluetooth connection apparatus 1000 further comprises a synchronization module.
The synchronization module is further used for synchronizing the connection information of the first terminal device to the second earphone through the first earphone after the first earphone establishes the Bluetooth connection with the first terminal device; and after the second earphone establishes the Bluetooth connection with the second terminal equipment, synchronizing the connection information of the second terminal equipment to the first earphone through the second earphone.
In some embodiments, the synchronization module is further configured to, after the second headset synchronizes the connection information of the second terminal device with the first headset, switch a bluetooth connection object of the second terminal device from the second headset to 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 first earphone synchronizes the data transmitted between the first earphone and the second terminal device to the second earphone.
In the embodiment of the application, the earphone device can establish bluetooth connection with the first terminal device and the second terminal device through the first earphone and the second earphone, and the first earphone and the second earphone perform connection operation in parallel, so that the connection efficiency is improved. And the first earphone and the second earphone carry out information synchronization, so that the Bluetooth connection object of the second terminal equipment is switched from the second earphone to the first earphone, all the established Bluetooth connections can be managed more conveniently, and the data transmission efficiency is ensured.
In an embodiment, the device determining module 1010 is further configured to determine, if the number of the terminal devices to be connected is greater than 2, the first terminal device and the second terminal device according to the priority of each terminal device to be connected.
In the embodiment of the application, under the condition that the number of the terminal devices to be connected is greater than 2, the first terminal device and the second terminal device can be determined according to the priority of each terminal device to be connected, and then the first earphone and the second earphone are connected with the first terminal device and the second terminal device in a Bluetooth mode in parallel, so that the connection efficiency is improved, and the connected terminal devices are more suitable for user requirements.
In an embodiment, the connection module 1020 is further configured to, when the headset device and the N terminal devices respectively establish bluetooth connections, if a bluetooth connection request sent by a third 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 third terminal device establish bluetooth connections; the disconnection process is used for disconnecting the Bluetooth connection between the earphone device and a target terminal device in the N terminal devices; n is the maximum number of bluetooth connections that the headset device supports to establish, N being a positive integer greater than or equal to 2.
In one embodiment, the connection module 1020 includes a disconnection unit and a connection unit.
And the disconnection unit is used for determining a target terminal device in the N terminal devices and performing disconnection processing corresponding to the target terminal device by the first earphone.
In one embodiment, the disconnection unit is further configured to select, as the target terminal device, a terminal device whose priority satisfies the priority condition from the N terminal devices according to priorities corresponding to the N terminal devices, respectively; wherein the priority condition comprises any one of a priority lower than a priority threshold and a lowest priority.
And the connecting unit is used for processing the Bluetooth connection request through the second earphone and establishing Bluetooth connection with the third terminal equipment.
And the synchronization module is also used for synchronizing the connection information of the third terminal equipment to the first earphone through the second earphone after the second earphone establishes the Bluetooth connection with the third terminal equipment.
In an embodiment, the synchronization module is further configured to, after the second headset synchronizes connection information of the third terminal device with the first headset, switch a bluetooth connection object of the third terminal device from the second headset to the first headset, and monitor a bluetooth connection between the first headset and the third terminal device through the second headset; or, the third terminal device is further configured to switch the bluetooth connection object of the third terminal device from the second headset to the first headset after the second headset synchronizes the connection information of the third terminal device with the first headset, and the first headset synchronizes data transmitted between the first headset and the third terminal device with the second headset.
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 third terminal device seizes 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 third 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 a Bluetooth connection object of the third terminal equipment is switched from the second earphone to the first earphone, all the established Bluetooth connections can be managed more conveniently, and the data transmission efficiency is ensured.
Fig. 11 is a block diagram of the configuration of the headphone apparatus in one embodiment. As shown in fig. 11, the headset device 1100 may include one or more of the following components: a processor 1110, a memory 1120 coupled to the processor 1110, wherein the memory 1120 may store one or more computer programs that may be configured to implement the methods described in the embodiments above when executed by the one or more processors 1110.
Processor 1110 may include one or more processing cores. The processor 1110 interfaces with various parts throughout the headset device 1100 using various interfaces and lines to perform various functions of the headset device 1100 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1120 and invoking data stored in the memory 1120. Alternatively, the processor 1110 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 1110 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. 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 to be appreciated that the modem can be implemented by a single communication chip without being integrated into the processor 1110.
The Memory 1120 may include a Random Access Memory (RAM) or a Read-Only Memory (ROM). The memory 1120 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 1120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like. The storage data area may also store data created by the headset device 1100 in use, and the like.
The headset device 1100 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 determine that the terminal device to be connected to the headset device at least includes a first terminal device and a second terminal device, and may instruct the bluetooth module of the first headset to perform bluetooth connection with the first terminal device and instruct the bluetooth module of the second headset to perform bluetooth connection with the second terminal device in parallel. The processor 910 may be a processor in the first earphone or a processor in the second earphone.
It is understood that the headset device 1100 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 thereto.
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 may 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 exemplary embodiments in nature, and that acts and modules are not necessarily required to practice the invention.
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 multiple 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, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (17)

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:
determining that the terminal equipment to be connected with the earphone equipment at least comprises first terminal equipment and second terminal equipment;
and performing Bluetooth connection with the first terminal equipment through the first earphone, and performing Bluetooth connection with the second terminal equipment in parallel through the second earphone.
2. The method according to claim 1, wherein the determining that the terminal devices to which the headset device is to be connected at least include a first terminal device and a second terminal device comprises:
under the condition that the earphone equipment is in a connectable state, if a Bluetooth connection request sent by first terminal equipment and second terminal equipment is received within a first time period, determining that the terminal equipment to be connected with the earphone equipment at least comprises the first terminal equipment and the second terminal equipment;
the bluetooth connection with the first terminal device through the first earphone and the bluetooth connection with the second terminal device through the second earphone in parallel includes:
processing a Bluetooth connection request sent by the first terminal equipment through the first earphone, and establishing Bluetooth connection with the first terminal equipment;
and processing the Bluetooth connection request sent by the second terminal equipment through the second earphone, and establishing Bluetooth connection with the second terminal equipment.
3. The method according to claim 2, characterized in that the first terminal device and/or the second terminal device is a terminal device which has not been paired with the earphone device; before the receiving the bluetooth connection request sent by the first terminal device and the second terminal device within the first time period, the method further includes:
and entering a pairing state according to the pairing instruction.
4. The method of claim 3, wherein the pairing instructions comprise any one of:
a pairing instruction is sent by the earphone charging box;
pairing instructions generated in response to the detected pairing triggering operation;
and the pairing instruction is sent by any terminal equipment which establishes Bluetooth connection with the earphone equipment.
5. The method according to claim 1, wherein the determining that the terminal devices to which the headset device is to be connected at least include a first terminal device and a second terminal device comprises:
when the earphone equipment is in a reconnection state, determining first terminal equipment and second terminal equipment to be reconnected;
the establishing of the bluetooth connection with the first terminal device through the first earphone and the bluetooth connection with the second terminal device through the second earphone comprises:
sending a first connection request to the first terminal equipment through the first earphone, wherein the first connection request is used for carrying out loop connection with the first terminal equipment;
and sending a second connection request to the second terminal equipment through the second earphone, wherein the second connection request is used for carrying out reconnection with the second terminal equipment.
6. The method of claim 1, further comprising:
when the earphone equipment is in a reconnection state, determining first terminal equipment to be reconnected, and sending a first connection request to the first terminal equipment through the first earphone, wherein the first connection request is used for performing reconnection with the first terminal equipment;
and if a Bluetooth connection request sent by a second terminal device is received in a second time period in which the first earphone sends the first connection request to the first terminal device, processing the Bluetooth connection request through the second earphone, and carrying out Bluetooth connection with the second terminal device.
7. The method of any of claims 1-6, wherein the first headset and the second headset have a Bluetooth connection therebetween;
after the bluetooth connection with the first terminal device through the first headset, the method further includes: synchronizing connection information of the first terminal device to the second headset through the first headset;
after the performing of the bluetooth connection with the second terminal device in parallel through the second headset, the method includes: 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, characterized in that 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 claim 1, wherein the determining that the terminal devices to which the headset device is to be connected at least include a first terminal device and a second terminal device comprises:
and if the number of the terminal devices to be connected is greater than 2, determining the first terminal device and the second terminal device according to the priority of each terminal device to be connected.
10. The method of claim 1, further comprising:
under the condition that the earphone device and N terminal devices respectively establish Bluetooth connection, if a Bluetooth connection request sent by a third 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 third terminal device establish Bluetooth connection;
wherein the disconnection process is used to disconnect the bluetooth connection between the earphone device and a target terminal device of the N terminal devices; 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 2.
11. The method of claim 10, wherein the performing, by the first headset, a disconnect process comprises:
and determining a target terminal device in the N terminal devices, and performing disconnection processing corresponding to the target terminal device by the first earphone.
12. The method of claim 11, wherein the determining a target terminal device of the N terminal devices comprises:
and selecting the terminal equipment with the priority meeting the priority condition from the N terminal equipment as target terminal equipment according to the priorities corresponding to the N terminal equipment respectively.
13. The method of any of claims 10-12, 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 third 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 third terminal equipment to the first earphone through the second earphone.
14. The method according to any one of claims 1 to 6 and 8 to 12, wherein the bluetooth connection comprises any one of a classic bluetooth connection and a Bluetooth Low Energy (BLE) connection.
15. A bluetooth connection device, comprising:
the device determining module is used for determining that the terminal devices to be connected with the earphone device at least comprise a first terminal device and a second terminal device;
and the connecting module is used for performing Bluetooth connection with the first terminal equipment through the first earphone and performing Bluetooth connection with the second terminal equipment through the second earphone in parallel.
16. 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 14.
17. 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 14.
CN202111050879.7A 2021-09-08 2021-09-08 Bluetooth connection method, device, earphone device and computer readable storage medium Pending CN115776663A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111050879.7A CN115776663A (en) 2021-09-08 2021-09-08 Bluetooth connection method, device, earphone device and computer readable storage medium
PCT/CN2022/106796 WO2023035782A1 (en) 2021-09-08 2022-07-20 Bluetooth connection method and apparatus, earphone device and computer-readable storage medium

Applications Claiming Priority (1)

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

Publications (1)

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

Family

ID=85388108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111050879.7A Pending CN115776663A (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) CN115776663A (en)
WO (1) WO2023035782A1 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7137635B2 (en) * 2018-04-28 2022-09-14 万魔声学科技有限公司 Headphone wireless communication method, main headphone, slave headphone and headphone system
CN109788387A (en) * 2019-01-28 2019-05-21 深圳市傲基电子商务股份有限公司 Control method, bluetooth headset and the computer readable storage medium of bluetooth headset
CN111436044B (en) * 2019-11-06 2023-06-23 珠海市杰理科技股份有限公司 Method, device and system for processing packet loss data of dual-wireless Bluetooth communication network
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
CN112055280B (en) * 2020-09-18 2022-11-15 恒玄科技(上海)股份有限公司 Wireless communication method for earphone and intelligent devices and wireless earphone assembly

Also Published As

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

Similar Documents

Publication Publication Date Title
JP6888113B2 (en) Communication methods and terminals for implementing dual SIM dual active
CN111654845B (en) Bluetooth multi-terminal link switching method, bluetooth audio equipment and system
WO2023036178A1 (en) Bluetooth connection method and apparatus, earphone device, and computer-readable storage medium
CN109743783B (en) Data transmission control method and related product
CN111447602B (en) Bluetooth device, Bluetooth preemption method and device thereof, and computer-readable storage medium
CN109151212B (en) Equipment control method and device and electronic equipment
US20210235183A1 (en) Method and system for upgrading program of tws headset, and tws headset
CN109379773B (en) Switching method, first output device and second output device
WO2023061127A1 (en) Communication method and apparatus, earphone set, and computer readable medium
CN114040373A (en) Audio service processing method and device, electronic equipment and storage medium
WO2023103732A1 (en) State control method and apparatus for earphone device, earphone device and storage medium
CN110337825A (en) Business switch method and device
CN111758297B (en) Channel detection method and device, communication equipment and storage medium
CN111182597B (en) Processing method and device
CN111182518A (en) Processing method and device
CN116528202A (en) Connection control method, device, electronic equipment and storage medium
CN115776663A (en) Bluetooth connection method, device, earphone device and computer readable storage medium
CN114466099B (en) Control method and device of Bluetooth equipment and storage medium
CN115776661A (en) Bluetooth-based control method and device, electronic equipment and storage medium
CN115885573A (en) Audio output apparatus wirelessly receiving data from electronic device and method of operating the same
CN113810887A (en) Bluetooth protocol connection method, device, storage medium and related equipment
CN116074986B (en) Bluetooth connection method, device and system
CN116233807A (en) Bluetooth connection method and device, and Bluetooth address configuration method and device
CN113472379B (en) Intercommunication method, earphone box, earphone and storage medium
WO2024060777A1 (en) Bluetooth switching method and apparatus, and bluetooth device and computer-readable medium

Legal Events

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