Bluetooth reconnection method and device, Bluetooth equipment, readable storage medium and chip

By sending detection signals and receiving reply signals in Bluetooth devices, accurate electronic device reconnection is achieved, solving the problem of inefficient return connection efficiency in the prior art and improving user experience.

CN119603798APending Publication Date: 2025-03-11HUAWEI TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202311168930.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-11
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

Bluetooth devices are inefficient when connecting back, resulting in invalid connection, wasting power consumption and reducing user experience.

Method used

By sending a detection signal and receiving a reply signal, the Bluetooth device can accurately identify and return to the surrounding electronic devices, avoiding invalid return.

Benefits of technology

It improves the efficiency and accuracy of Bluetooth back connection, reduces power consumption, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603798A_ABST
    Figure CN119603798A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of short-distance wireless communication, provides a Bluetooth reconnection method and device, Bluetooth equipment, a readable storage medium and a chip, and can solve the problem that the use experience of a user is affected due to low reconnection efficiency during reconnection of the Bluetooth equipment. The method is applied to a Bluetooth device, the Bluetooth device is paired with N electronic devices, N is greater than or equal to 1, and the method comprises the following steps: sending a detection signal which is used for indicating the electronic devices to send a reply signal; receiving at least one reply signal; and reconnecting the first device according to the at least one reply signal, wherein the first device is the electronic device which sends the reply signal in the N electronic devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of short-range wireless communication, and in particular to a Bluetooth backconnection method, apparatus, Bluetooth device, readable storage medium and chip. Background Art

[0002] At present, when a Bluetooth device reconnects to a paired electronic device, it usually continuously pages the target device until the paging is successful and then a Bluetooth connection is established with the target device, or the paging times out and the reconnection to the target device is terminated. It is understandable that when there is an electronic device in the target device that is not within the Bluetooth communication range of the Bluetooth device, the Bluetooth device will generate an invalid reconnection, and only when the reconnection to the target device fails or times out, will the reconnection be terminated or reconnected to other electronic devices. In this way, not only is the device power consumption wasted and the reconnection efficiency reduced, but the user experience is also affected. Summary of the invention

[0003] The present application provides a Bluetooth backconnection method, apparatus, Bluetooth device, readable storage medium and chip, which solve the problem in the prior art that the Bluetooth device has low backconnection efficiency during backconnection, affecting the user experience.

[0004] In order to achieve the above objectives, this application adopts the following technical solutions:

[0005] In a first aspect, a Bluetooth reconnection method is provided, which is applied to a Bluetooth device, wherein the Bluetooth device is paired with N electronic devices, wherein N≥1, and the method comprises: sending a detection signal, wherein the detection signal is used to instruct the electronic device to send a reply signal; receiving at least one reply signal; and reconnecting to a first device according to the at least one reply signal, wherein the first device is the electronic device that sends the reply signal among the N electronic devices.

[0006] Through the Bluetooth reconnection method provided in the embodiment of the present application, the Bluetooth device can establish a Bluetooth communication connection with the electronic device that sends the reply signal among the N electronic devices by sending a detection signal and according to at least one reply signal received. This method can avoid the process of invalid reconnection due to the Bluetooth device not being able to sense whether the electronic device is around it, thereby achieving accurate reconnection, improving reconnection efficiency, and enhancing user experience.

[0007] The Bluetooth backconnection method provided in this embodiment can be applicable to a process in which a Bluetooth backconnection is implemented through a Bluetooth module when a Bluetooth device includes one Bluetooth module, and can also be applicable to a process in which a Bluetooth backconnection is implemented through one of the two Bluetooth modules when a Bluetooth device includes two Bluetooth modules.

[0008] In some embodiments, when the Bluetooth device includes a first Bluetooth module and a second Bluetooth module; wherein, sending a detection signal, and receiving at least one reply signal, includes: the first Bluetooth module sends a detection signal, and the detection signal is used to instruct the electronic device to send a reply signal; the first Bluetooth module receives at least one reply signal.

[0009] The first Bluetooth module may send the detection signal periodically, or may send the detection signal in response to a control operation. For example, the first Bluetooth module sends the detection signal immediately after starting to run.

[0010] In some embodiments, when the Bluetooth device includes a first Bluetooth module and a second Bluetooth module, before the first Bluetooth module sends a detection signal, the method also includes: the first Bluetooth module establishes a Bluetooth connection with the second Bluetooth module; the second Bluetooth module sends an indication message to the first Bluetooth module, and the indication message is used to instruct the first Bluetooth module to send a detection signal.

[0011] In an embodiment of the present application, the interaction between the second Bluetooth module and the first Bluetooth module can be that the first Bluetooth module and the second Bluetooth module interact through a Bluetooth link after establishing a Bluetooth connection; it can also be that the first Bluetooth module and the second Bluetooth module interact through broadcasting; it can also be that the first Bluetooth module and the second Bluetooth module interact through a wired connection after establishing a wired connection.

[0012] In some embodiments, reconnecting to the first device according to at least one reply signal includes: the first Bluetooth module instructing the second Bluetooth module to reconnect to the first device according to the at least one reply signal.

[0013] In some embodiments, the first Bluetooth module instructs the second Bluetooth module to reconnect to the first device based on at least one reply signal, including: the first Bluetooth module determines the electronic device corresponding to the reply signal as a candidate device based on at least one reply signal; the first Bluetooth module sends the device identification of the candidate device to the second Bluetooth module; the second Bluetooth module determines at least one target device from the candidate devices based on the Bluetooth connection information of the Bluetooth device and the device identification, and the at least one target device includes the first device; the second Bluetooth module reconnects to the first device.

[0014] In this embodiment, after determining the candidate device, the first Bluetooth module sends the device identification of the candidate device to the second Bluetooth module, and then the second Bluetooth module determines the target device. In this process, the candidate device is determined by the first Bluetooth module, and the target device is determined by the second Bluetooth module.

[0015] In some embodiments, the first Bluetooth module instructs the second Bluetooth module to reconnect to the first device based on at least one reply signal, and also includes: the first Bluetooth module sends at least one reply signal to the second Bluetooth module, and the reply signal carries the device identification of the electronic device corresponding to the reply signal; the second Bluetooth module determines the electronic device corresponding to the reply signal as a candidate device based on the at least one reply signal; the second Bluetooth module determines at least one target device from the candidate devices based on the Bluetooth connection information of the Bluetooth device and the device identification, and the at least one target device includes the first device, and the second Bluetooth module reconnects to the first device.

[0016] In this embodiment, after receiving the reply signal, the first Bluetooth module sends the reply signal to the second Bluetooth module, and the second Bluetooth module determines the candidate device and the target device according to the device identifier in the reply signal. In this process, the candidate device and the target device are both determined by the second Bluetooth module.

[0017] In some embodiments, the Bluetooth connection information includes the number P of connectable devices, the number Q of connected devices, and historical connection information of the Bluetooth device, where P≥1 and Q≥0.

[0018] In this embodiment, the number of connectable devices P refers to the maximum number of electronic devices that the Bluetooth device can establish Bluetooth connections with at one time; the number of connected devices Q refers to the number of electronic devices with which the Bluetooth device establishes Bluetooth connections before determining the target device; the historical connection information includes a historical connection list of electronic devices with which the Bluetooth device has successfully established Bluetooth connections.

[0019] In some embodiments, the second Bluetooth module determines at least one target device from candidate devices based on the Bluetooth connection information of the Bluetooth device and the device identification, including: the second Bluetooth module determines the number H of target devices, where the number H of target devices is the difference between the number P of connectable devices and the number Q of connected devices, where P≥H≥0; when the candidate devices include the second device, the second Bluetooth module continues to connect back to the second device, and determines H-1 target devices from other candidate devices based on the historical connection information and the device identification, where the second device is the electronic device to which the Bluetooth device is currently connecting back; when the candidate devices do not include the second device, the second Bluetooth module terminates connecting back to the second device, and determines H target devices from at least one candidate device based on the historical connection information and the device identification.

[0020] In some embodiments, during the process of sending the detection signal and receiving at least one reply signal, the method further includes: the second Bluetooth module sending a reconnection request, where the reconnection request is used to request a reconnection to one of the N electronic devices.

[0021] When the second Bluetooth module is in the process of reconnecting to the electronic device, the first Bluetooth module sends a detection signal. The first Bluetooth module and the second Bluetooth module cooperate with each other and do not conflict with each other, thereby avoiding interference in the process of the second Bluetooth module sending the reconnection request because both the detection signal and the reconnection request are sent by the second Bluetooth module.

[0022] Through the method provided in this embodiment, when the Bluetooth device includes two Bluetooth modules, in the process of the second Bluetooth module back-connecting to the electronic device, a new route is added for the first Bluetooth module to send a detection signal, and the first Bluetooth module assists in determining the electronic devices around the Bluetooth device. The first Bluetooth module sends the device identification of the candidate device to the second Bluetooth module based on the detection result, and the second Bluetooth module determines the target device that it can connect to based on the device identification of the candidate device, thereby achieving accurate back-connection.

[0023] In some embodiments, the first Bluetooth module is a low-power Bluetooth module, and the second Bluetooth module is a classic Bluetooth module.

[0024] In some embodiments, the Bluetooth device is a Bluetooth headset, which includes a first headset, a second headset and an earphone box, the earphone box is used to store the first headset and the second headset, the first Bluetooth module is built into the first headset, and the second Bluetooth module is built into the second headset.

[0025] In some other embodiments, the Bluetooth device is a split Bluetooth speaker, which includes a first speaker and a second speaker, wherein the first Bluetooth module is built into the first speaker, and the second Bluetooth module is built into the second speaker.

[0026] In some embodiments, the detection signal carries M device identifiers corresponding to M electronic devices among N electronic devices, and the detection signal is used to instruct the M electronic devices to send reply signals, where 1≤M≤N.

[0027] Through the method provided in this embodiment, the Bluetooth device can determine whether the electronic device it expects to connect to is around it by sending a detection signal carrying M device identifiers corresponding to M electronic devices among N electronic devices.

[0028] In some embodiments, the detection signal and the reply signal include any one of an ultrasonic signal, an ultra-wideband pulse signal, a low-power Bluetooth broadcast signal, a wireless fidelity signal, and a basic rate / enhanced rate signal.

[0029] In a second aspect, a Bluetooth backconnection device is provided, which is applied to a Bluetooth device, which is paired with N electronic devices, wherein N≥1, and the device includes: a sending module, which is used to send a detection signal, and the detection signal is used to instruct the electronic device to send a reply signal; a receiving module, which is used to receive at least one reply signal; and a backconnection module, which is used to backconnect to a first device according to at least one reply signal, and the first device is an electronic device that sends a reply signal among the N electronic devices.

[0030] In a third aspect, a Bluetooth device is provided, which is paired with N electronic devices. The Bluetooth device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the Bluetooth reconnection method shown in the first aspect is implemented.

[0031] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the Bluetooth backconnection method as shown in the first aspect is implemented.

[0032] In a fifth aspect, a chip is provided, comprising a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the Bluetooth backconnection method as shown in the first aspect is implemented.

[0033] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A diagram of a Bluetooth communication system architecture applicable to a Bluetooth back-connection method provided in an embodiment of the present application;

[0035] Figure 2 A schematic diagram of the structure of a Bluetooth device provided in an embodiment of the present application;

[0036] Figure 3 A schematic diagram of the structure of a TWS headset provided in an embodiment of the present application;

[0037] Figure 4 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application;

[0038] Figure 5 A schematic flowchart of a Bluetooth back-connection method provided in an embodiment of the present application;

[0039] Figure 6 An interactive flow chart of a Bluetooth back-connection method provided in an embodiment of the present application;

[0040] Fig. 7A A schematic diagram of a Bluetooth back-connection scenario provided in an embodiment of the present application;

[0041] Figure 7B A schematic diagram of a Bluetooth back-connection scenario provided in another embodiment of the present application;

[0042] Figure 8 An interactive flow chart of a Bluetooth backconnection method for a TWS headset provided in an embodiment of the present application;

[0043] Fig. 9A A schematic diagram of a Bluetooth back-connection scenario provided in an embodiment of the present application;

[0044] Fig. 9B A schematic diagram of a Bluetooth back-connection scenario provided in another embodiment of the present application;

[0045] Fig.10 A schematic structural diagram of a Bluetooth back-connection device provided in one embodiment of the present application;

[0046] Fig.11 A schematic structural diagram of a chip provided in accordance with an embodiment of the present application. DETAILED DESCRIPTION

[0047] The technical solution provided in the embodiments of the present application is described below with reference to the accompanying drawings.

[0048] It should be understood that in the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is merely a way to describe the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0049] In this embodiment, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0050] With the development of communication technology, electronic devices can establish connections through short-range wireless communication technology, for example, a smartphone can be connected to a Bluetooth device such as a Bluetooth headset or a Bluetooth speaker through Bluetooth. At present, a Bluetooth device can maintain a Bluetooth connection with one electronic device, or it can maintain a Bluetooth connection with two or more electronic devices at the same time. For a paired Bluetooth device and an electronic device, when the distance between the Bluetooth device and the electronic device is not within the communication range of Bluetooth low energy (BLE) or classic Bluetooth, or the Bluetooth device stops running, the Bluetooth connection between the Bluetooth device and the electronic device will be disconnected. When the Bluetooth device and the electronic device are within the connectable distance again, or after the Bluetooth device is turned on, since each other's Bluetooth information has been saved during the last pairing connection process, the two can use the saved Bluetooth information to connect back.

[0051] When a Bluetooth device reconnects to a paired electronic device, it usually reconnects to the paired electronic devices in sequence in a serial reconnection manner. After the Bluetooth device determines at least one target device that needs to be reconnected based on the historical connection list and the number of electronic devices that the Bluetooth device supports connecting, it usually continuously pages the target device until the paging is successful and then establishes a Bluetooth connection with the target device, or the paging times out and terminates the reconnection to the target device. It can be understood that when there is an electronic device in the target device that is not within the Bluetooth communication range of the Bluetooth device, the Bluetooth device will generate an invalid reconnection, and only when the reconnection to the target device fails or times out, will it terminate the reconnection or reconnect to other electronic devices.

[0052] Exemplarily, in an application scenario where a Bluetooth device is only connected to an electronic device, when the Bluetooth device reconnects, it will usually determine the last connected electronic device as the target device according to the historical connection list, and then send a paging request to the target device. If the Bluetooth device fails to reconnect to the target device, it will reconnect to the electronic device that was connected to the penultimate time according to the historical connection list, and so on, until the Bluetooth device establishes a connection with an electronic device or the connection times out. For example, the Bluetooth device is paired with both a mobile phone and a tablet computer. In the first application scenario, the Bluetooth device establishes a Bluetooth connection with the mobile phone; when the application scenario is converted to the second application scenario, the Bluetooth device will prioritize reconnecting to the mobile phone. If the mobile phone is not in the second application scenario, and the tablet computer is in the second application scenario, at this time, the Bluetooth device will continuously and invalidly reconnect to the mobile phone, and will only reconnect to the tablet computer when the mobile phone fails to reconnect or times out.

[0053] Exemplarily, in an application scenario where a Bluetooth device is dual-connected to an electronic device, when the Bluetooth device reconnects, it will identify the last two connected electronic devices as target devices, and then send a paging request to the target device. If the Bluetooth device fails to reconnect to one or two target devices, it will reconnect to the electronic device that was last connected according to the historical connection list, and so on, until the Bluetooth device establishes a connection with the two electronic devices or the connection times out. For example, the Bluetooth device is paired with a mobile phone, a laptop, and a tablet computer. In a first application scenario (such as an office), the Bluetooth device is connected to the mobile phone and the laptop computer; when the application scenario is converted to a second application scenario (such as home), the Bluetooth device will give priority to reconnecting to the mobile phone and the laptop computer. If the laptop computer is not in the second application scenario, and the tablet computer is in the second application scenario, at this time, the Bluetooth device will continuously and invalidly reconnect to the laptop computer, and will only reconnect to the tablet computer when the laptop computer fails to reconnect or times out.

[0054] From the above, it can be seen that no matter in the application scenario of the Bluetooth device being connected to a single electronic device or a dual electronic device, or a Bluetooth device being connected to multiple electronic devices, when the Bluetooth device is connecting back to the electronic device, it is impossible to sense whether there is an electronic device within the Bluetooth communication range and the type of electronic device that exists. Therefore, the Bluetooth device needs to take a long time to connect back to the target device, resulting in a slow connection speed of the Bluetooth device, reducing the connection efficiency between the Bluetooth device and the target device, and affecting the user experience.

[0055] Based on this, an embodiment of the present application provides a Bluetooth reconnection method, through which a Bluetooth device can sense the target device in the surrounding area and reconnect to it, thereby improving the reconnection speed and reconnection efficiency of the Bluetooth device and improving the user experience.

[0056] Figure 1 A schematic diagram of a Bluetooth communication system architecture applicable to the Bluetooth back-connection method provided in the embodiment of the present application is shown in FIG. Figure 1 As shown, the system includes at least one electronic device 100 and a Bluetooth device 200, wherein the Bluetooth device 200 has been paired with each electronic device 100.

[0057] Among them, the Bluetooth device 200 and the electronic device 100 can communicate through Bluetooth technology (including basic rate (BR) / enhanced data rate (EDR) Bluetooth and low-power Bluetooth (bluetooth lowenergy, BLE)). The electronic device 100 can be a smart phone, a media player (such as MP3, MP4, etc.), a tablet computer, a personal digital assistant (personal digital assistant, PDA), a television or a smart watch. The embodiments of the present application do not limit the specific type of electronic device. The Bluetooth device 200 can be a smart phone, a Bluetooth headset, a smart watch, a smart bracelet, a smart speaker, a sales terminal (Point of Sales, POS) or a car computer and other devices with Bluetooth function, and the embodiments of the present application do not make specific limitations on this.

[0058] Figure 2 The structural diagram of the Bluetooth device 200 provided in the embodiment of the present application is exemplarily shown.

[0059] The following is a detailed description of the embodiment using the Bluetooth device 200 as an example. It should be understood that: Figure 2 The Bluetooth device 200 shown is only an example, and the Bluetooth device 200 may have more Figure 2 More or fewer components may be shown, two or more components may be combined, or a different configuration of components may be provided. Figure 2 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0060] like Figure 2 As shown, the Bluetooth device 200 may include: a processor 201, a memory 202, a Bluetooth communication module 203, an antenna 204, a power switch 205, a USB communication processing module 206, and an audio module 207. Among them: the processor 201 can be used to read and execute computer-readable instructions. In a specific implementation, the processor 201 may mainly include a controller, an arithmetic unit and a register. Among them, the controller is mainly responsible for decoding instructions and sending control signals for operations corresponding to the instructions. The arithmetic unit is mainly responsible for saving register operands and intermediate operation results temporarily stored during the execution of instructions. In a specific implementation, the hardware architecture of the processor 201 may be an application-specific integrated circuit (ASIC) architecture, a MIPS architecture, an ARM architecture or an NP architecture, etc.

[0061] In some embodiments, the processor 201 may be used to parse signals received by the Bluetooth communication module 203, such as a pairing mode modification request sent by the electronic device 100, etc. The processor 201 may be used to perform corresponding processing operations according to the parsing results, such as generating a pairing mode modification response, etc.

[0062] The memory 202 is coupled to the processor 201 and is used to store various software programs and / or multiple sets of instructions. In a specific implementation, the memory 202 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 202 may store an operating system, such as uCOS, VxWorks, RTLinux, and other embedded operating systems. The memory 202 may also store a communication program, which may be used to communicate with the electronic device 100, one or more servers, or other devices.

[0063] The Bluetooth communication module 203 may include a classic Bluetooth (BT) module and a Bluetooth low energy (BLE) module.

[0064] In some embodiments, the Bluetooth communication module 203 can monitor signals sent by other devices (such as the electronic device 100), such as detection requests, scanning signals, etc., and can send response signals, scanning responses, etc., so that other devices (such as the electronic device 100) can discover the Bluetooth device 200, and establish wireless communication connections with other devices (such as the electronic device 100), and communicate with other devices (such as the electronic device 100) via Bluetooth.

[0065] In other embodiments, the Bluetooth communication module 203 can also send signals, such as broadcasting BLE signals, so that other devices (such as electronic device 100) can discover the Bluetooth device 200, establish wireless communication connections with other devices (such as electronic device 100), and communicate with other devices (such as electronic device 100) via Bluetooth.

[0066] The wireless communication function of the Bluetooth device 200 can be implemented by the antenna 204, the Bluetooth communication module 203, the modem processor, etc. The antenna 204 can be used to transmit and receive electromagnetic wave signals. Each antenna in the Bluetooth device 200 can be used to cover a single or multiple communication frequency bands.

[0067] In some embodiments, the Bluetooth communication module 203 may have one or more antennas.

[0068] The power switch 205 may be used to control the supply of power to the Bluetooth device 200 .

[0069] The USB communication processing module 206 may be used to communicate with other devices via a USB interface (not shown).

[0070] The audio module 207 can be used to output audio signals through the audio output interface, so that the Bluetooth device 200 can support audio playback. The audio module can also be used to receive audio data through the audio input interface. The Bluetooth device 200 can be a media playback device such as a Bluetooth headset.

[0071] In some embodiments, the Bluetooth device 200 may further include a display screen (not shown), wherein the display screen may be used to display images, prompt information, etc. The display screen may be an LCD display screen, an OLED display screen, an AMOLED display screen, a FLED display screen, a QLED display screen, and the like.

[0072] In some embodiments, the Bluetooth device 200 may also include a serial interface such as an RS-232 interface. The serial interface may be connected to other devices, such as an audio external player such as a speaker, so that the Bluetooth device 200 and the audio external player cooperate to play audio and video.

[0073] It is understandable that Figure 2 The illustrated structure does not constitute a specific limitation on the Bluetooth device 200. In other embodiments of the present application, the Bluetooth device 200 may include more or fewer components than those shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0074] The following takes the Bluetooth device 200 being a TWS headset as an example to exemplarily illustrate the structure of the Bluetooth device 200 provided in the embodiment of the present application.

[0075] Figure 3 This is a schematic diagram of the structure of a TWS headset provided in an embodiment of the present application, see Figure 3 As shown, the TWS headset includes a first headset for wearing on the left ear (also called the left earplug) and a second headset for wearing on the right ear (also called the right earplug), wherein the left and right earphones of the TWS headset are independent of each other and do not need to be connected by a cable, so as to achieve wireless separation of the left and right channels. The TWS headset may include a housing and internal components. The internal components are arranged in a cavity formed by the housing, and the internal components may include devices in modules such as an audio module, a power module, and a Bluetooth communication module.

[0076] For TWS earphones, users can use them in binaural mode or monaural mode. In monaural mode, users can wear only the left earbud or only the right earbud to listen to music or make / call audio services. In binaural mode, users can wear both earbuds to enjoy music or perform other audio services. In binaural mode, the two earbuds are divided into main earbuds and auxiliary earbuds. In addition, during the use of TWS earphones, the main / auxiliary roles of the two earbuds can be switched.

[0077] In some embodiments, the TWS headset can exchange control information with the electronic device 100 through the main earplug, such as connection control information, service control information, etc. Thus, the Bluetooth connection with the electronic device 100 can be established or disconnected according to the connection control information; and service action control (such as pause, play, previous song, etc.) can be performed according to the service control information.

[0078] In one case, a Bluetooth connection is established between the main earplug and the electronic device 100, and the main earplug and the electronic device 100 can communicate via Bluetooth to exchange control information and audio data. A Bluetooth connection is also established between the main earplug and the auxiliary earplug, and the main earplug can notify the auxiliary earplug to synchronize the status, such as establishing / disconnecting the physical connection or virtual connection with the electronic device 100. The auxiliary earplug can receive the audio data sent by the electronic device 100 by forwarding, listening, and dual sending of the main earplug.

[0079] Among them, in the listening scheme, a Bluetooth connection is established between the electronic device 100 and the main earplug, the audio data is sent to the main earplug, and the service actions triggered by the electronic device 100 and the TWS headset are completed (for example, play, pause, switch to the previous song, increase the volume, etc.). A Bluetooth connection is established between the two earplugs to complete the information synchronization between the two earplugs. The auxiliary earplug obtains audio data by listening to the Bluetooth link between the main earplug and the electronic device 100.

[0080] In the forwarding solution, a Bluetooth connection is established between the electronic device 100 and the main earplug to complete the transmission of audio data to the main earplug, and the service action triggered by the electronic device 100 and the TWS headset is completed. A Bluetooth connection is established between the two earplugs to complete the information synchronization between the two earplugs, and the main earplug forwards audio data to the auxiliary earplug through the Bluetooth link between the main earplug and the auxiliary earplug.

[0081] In the dual-transmission solution, a Bluetooth connection is established between the electronic device 100 and both the main earplug and the auxiliary earplug, and a Bluetooth connection is also established between the main earplug and the auxiliary earplug. After the electronic device 100 completes the service action triggered by the TWS headset, it sends audio data to the main earplug and the auxiliary earplug synchronously through the established Bluetooth link.

[0082] In the embodiment of the present application, when the TWS headset is no longer in use, the TWS headset can be placed in the headset box for charging. The headset box can communicate with the TWS headset to implement operations such as forced pairing, power on and off of the TWS headset. The charging interface and communication interface between the TWS headset and the headset box can exist independently or together.

[0083] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application. It should be understood that Figure 4 The electronic device 100 shown is only an example, and the electronic device 100 may have more Figure 4 More or fewer components may be shown, two or more components may be combined, or there may be a different configuration of components. Figure 4 The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits. Figure 4 As shown, the electronic device 100 may include a processor 410, an external memory interface 420, an internal memory 421, a universal serial bus (USB) interface 430, a charging management module 440, a power management module 441, a battery 442, an antenna 1, an antenna 2, a mobile communication module 450, a wireless communication module 460, an audio module 470, a speaker 470A, a receiver 470B, a microphone 470C, an earphone interface 470D, a sensor module 480, a button 490, a motor 491, an indicator 492, a camera 493, a display screen 494, and a subscriber identification module (SIM) card interface 495, etc.

[0084] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0085] For example, when the electronic device is a mobile phone or a tablet computer, it may include all the components shown in the figure, or may include only some of the components shown in the figure.

[0086] The processor 410 may include one or more processing units. Different processing units may be independent devices or integrated into one or more processors. A memory may also be provided in the processor 410 for storing instructions and data. In some embodiments, the memory in the processor 410 is a cache memory. The memory may store instructions or data that the processor 410 has just used or circulated. If the processor 410 needs to use the instruction or data again, it may be directly called from the memory. Repeated access is avoided, the waiting time of the processor 410 is reduced, and the efficiency of the system is improved.

[0087] The external memory interface 420 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 410 through the external memory interface 420 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0088] The internal memory 421 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 410 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 421. The internal memory 421 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area may store data created during the use of the electronic device (such as audio data, a phone book, etc.).

[0089] In addition, the internal memory 421 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0090] The USB interface 430 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 430 can be used to connect a charger to charge an electronic device, and can also be used to transfer data between an electronic device and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0091] The charging management module 440 is used to receive charging input from the charger. The power management module 441 is used to connect the battery 442, the charging management module 440 and the processor 410. The power management module 441 receives input from the battery 442 and / or the charging management module 440 to power the processor 410, the internal memory 421, the external memory, the camera 493, the display screen 494, and the wireless communication module 460.

[0092] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 450, wireless communication module 460, modem processor and baseband processor.

[0093] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0094] The mobile communication module 450 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to electronic devices. The mobile communication module 450 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 450 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 450 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.

[0095] In some embodiments, at least some functional modules of the mobile communication module 450 may be disposed in the processor 410. In some embodiments, at least some functional modules of the mobile communication module 450 and at least some functional modules of the processor 410 may be disposed in the same device.

[0096] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 470A, a receiver 470B, etc.), or displays an image or video through a display screen 494. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 410 and be set in the same device as the mobile communication module 450 or other functional modules.

[0097] The wireless communication module 460 can provide wireless communication solutions for electronic devices including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), ultra-wideband (UWB) and other wireless communication technologies. The wireless communication module 460 can be one or more devices integrating at least one communication processing module. The wireless communication module 460 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signal and filters it, and sends the processed signal to the processor 410. The wireless communication module 460 can also receive the signal to be sent from the processor 410, modulate its frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0098] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 450, and antenna 2 is coupled to wireless communication module 460, so that the electronic device can communicate with the network and other devices through wireless communication technology.

[0099] The electronic device can implement audio functions through the audio module 470, the speaker 470A, the receiver 470B, the microphone 470C, the headphone jack 470D, and the application processor.

[0100] The audio module 470 is used to convert digital audio signals into analog audio signals for output, and is also used to convert analog audio inputs into digital audio signals. The audio module 470 can also be used to encode and decode audio signals. In some embodiments, the audio module 470 can be arranged in the processor 410, or some functional modules of the audio module 470 are arranged in the processor 410.

[0101] Speaker 470A, also called "speaker", is used to convert audio electrical signals into sound signals. The electronic device can listen to music or listen to hands-free calls through speaker 470A. In addition, speaker 470A can also transmit a preset frequency (such as f 1 ) ultrasonic signal.

[0102] The receiver 470B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device receives a call or voice message, the voice can be heard by placing the receiver 470B close to the human ear. In addition, the receiver 470B can also transmit a preset frequency (such as f 2 ) ultrasonic signal.

[0103] Microphone 470C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 470C with his mouth to input the sound signal into the microphone 470C. An electronic device may be provided with at least one microphone 470C. In some embodiments, the microphone 470C may also receive ultrasonic signals, for example, ultrasonic signals of different frequencies emitted by speakers and receivers of other electronic devices.

[0104] The earphone interface 470D is used to connect a wired earphone and can be a USB interface 430 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0105] The key 490 includes a power key, a volume key, etc. The key 490 may be a mechanical key or a touch key. The electronic device may receive key input and generate key signal input related to user settings and function control of the electronic device.

[0106] Motor 491 can generate vibration prompts. Motor 491 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 494, motor 491 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0107] Indicator 492 may be an indicator light that may be used to indicate charging status, power changes, messages, missed calls, notifications, and the like.

[0108] The electronic device implements the display function through a GPU, a display screen 494, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 494 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 410 may include one or more GPUs that execute program instructions to generate or change display information.

[0109] The display screen 494 is used to display images, videos, etc. The display screen 494 includes a display panel. In some embodiments, the electronic device may include 1 or N display screens 494, where N is a positive integer greater than 1.

[0110] The SIM card interface 495 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device by inserting into or removing from the SIM card interface 495. The electronic device can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.

[0111] The following combination Figure 1 The Bluetooth communication system shown and Figures 2 to 4 The structural schematic diagram of the Bluetooth device and the electronic device shown in the figure exemplifies the Bluetooth backconnection method provided in the embodiment of the present application.

[0112] Figure 5 This is a schematic flow chart of a Bluetooth back-connection method provided in an embodiment of the present application. The method is applied to a Bluetooth device that has been paired with N electronic devices, where N≥1. Figure 5 Said method comprises steps S501 to S503.

[0113] S501, a Bluetooth device sends a detection signal, where the detection signal is used to instruct an electronic device to send a reply signal.

[0114] The detection signal may be an ultrasonic signal, a UWB pulse signal, a BLE broadcast signal, a Wi-Fi signal, or a basic rate / enhanced data rate (BR / EDR) signal, etc. In this embodiment, the type of the detection signal is not limited, and may be selected according to actual needs.

[0115] S502: The Bluetooth device receives at least one reply signal.

[0116] In this embodiment, the at least one reply signal may be a first reply signal returned by the first device that receives the detection signal, or may be a reply signal returned by the first device and other electronic devices among the N electronic devices.

[0117] S503: The Bluetooth device connects back to the first device according to the at least one reply signal, where the first device is the electronic device that sends the reply signal among the N electronic devices.

[0118] In some embodiments, when the Bluetooth device receives at least one reply signal including a first reply signal returned by a first device, it indicates that the first device corresponding to the first reply signal is around the Bluetooth device. At this time, the Bluetooth device directly sends a reconnection request to the first device, and the reconnection request is used to request a reconnection to the first device, and establish a Bluetooth connection with the first device through classic Bluetooth or low-power Bluetooth technology.

[0119] In this embodiment, when the Bluetooth device receives the first reply signal sent by the first device, it can also receive other reply signals sent by other electronic devices among the N electronic devices. When the Bluetooth device has dual connection or multi-connection functions, it can also connect back to other electronic devices based on the other reply signals.

[0120] It should be understood that, generally, a Bluetooth device may include one Bluetooth module, such as a Bluetooth speaker, a neck-hanging Bluetooth headset, and a head-mounted Bluetooth headset, etc., or it may include two Bluetooth modules, such as a TWS headset, a split Bluetooth speaker, etc.

[0121] In this embodiment, when the Bluetooth device includes one Bluetooth module, the Bluetooth device can perform the process of steps S501 to S503 through one Bluetooth module. When the Bluetooth device includes two Bluetooth modules, the Bluetooth device can perform the process of steps S501 to S503 by running one of the two Bluetooth modules; or it can perform the process of steps S501 to S503 by running two Bluetooth modules. The specific execution process will be specifically described in the following example, and will not be described in detail in this embodiment.

[0122] Normally, before a Bluetooth device reconnects to an electronic device, it cannot sense whether there are any electronic devices within the Bluetooth communication range around it and which electronic devices are there. Therefore, during the reconnection process, it serially reconnects to the electronic devices that have been paired with it before according to the historical connection information, and only tries to reconnect to other electronic devices when the electronic device that is preferentially reconnected fails to reconnect successfully. Through the Bluetooth reconnection method provided in this embodiment, the Bluetooth device first determines the electronic devices around it from N electronic devices by sending a detection signal and receiving a reply signal, and then establishes a Bluetooth communication connection with the electronic device in a targeted manner, avoiding the process of invalid reconnection due to the inability to sense whether the electronic device is around, and can achieve accurate reconnection, improve reconnection efficiency, and enhance user experience.

[0123] The following describes respectively a schematic flow of executing the Bluetooth reconnection method provided in this embodiment by using one Bluetooth module when the Bluetooth device includes one Bluetooth module, or by using one of the two Bluetooth modules when the Bluetooth device includes two Bluetooth modules; and a schematic flow of executing the Bluetooth reconnection method provided in this embodiment by using the two Bluetooth modules in parallel when the Bluetooth device includes two Bluetooth modules.

[0124] Example 1: A Bluetooth device uses a Bluetooth module to perform a Bluetooth backlink.

[0125] Figure 6 This is an interactive flow chart of a Bluetooth back-connection method provided in an embodiment of the present application. The method is applied to a Bluetooth device. The Bluetooth device is paired with N electronic devices. Figure 6 As shown, the method includes the following steps S601 to S606.

[0126] S601, the Bluetooth device sends a detection signal, where the detection signal is used to instruct the electronic device to send a reply signal.

[0127] In this embodiment, the Bluetooth device may send the detection signal immediately after the Bluetooth device is turned on, or the Bluetooth device may start when the user starts the Bluetooth connection mode. When the Bluetooth device is a TWS headset, it may start the process of sending the detection signal immediately when the headset box is in the unboxing state.

[0128] Exemplarily, when a Bluetooth device enters a Bluetooth connection mode, it sends a BLE broadcast signal through a Bluetooth module, or sends a UWB pulse signal through other modules, such as a UWB wireless communication module.

[0129] In some embodiments, the Bluetooth device sends a detection signal, and the detection signal does not carry the device identifications of the N electronic devices, that is, the electronic devices among the N electronic devices that receive the detection signal can send a reply signal to the Bluetooth device. In this embodiment, the Bluetooth device sends the detection signal without knowing which electronic devices are within its Bluetooth communication range, and then determines the candidate device based on the received reply signal.

[0130] In other embodiments, the Bluetooth device sends a detection signal carrying M device identifications of M electronic devices out of N electronic devices, wherein the detection signal carrying the M device identifications is used to instruct the M electronic devices corresponding to the M device identifications to send a reply signal, 1≤M≤N. After receiving the detection signal, the M electronic devices corresponding to the M device identifications can determine that they are candidate devices that the Bluetooth device expects to connect to. Optionally, other electronic devices can also determine that they are not candidate devices that the Bluetooth device expects to connect to based on the broadcast message. In this embodiment, the Bluetooth device determines whether there are candidate devices that it expects to connect to around it by actively searching. That is, the Bluetooth device determines whether the candidate devices that it expects to connect to are around it by sending a detection signal carrying M device identifications.

[0131] In this embodiment, the device identifier is used to uniquely identify the corresponding device. Optionally, the device identifier may be a medium access control (MAC) address and / or a device name of the electronic device.

[0132] S602: After receiving the detection signal, the electronic device sends a reply signal, where the reply signal carries a device identification of the electronic device.

[0133] In some embodiments, when the detection signal sent by the Bluetooth device is an ultrasonic signal or a UWB pulse signal, the electronic device that receives the detection signal first determines the distance between itself and the Bluetooth device based on the detection signal, and when the distance is within the Bluetooth communication range, sends a reply signal to the Bluetooth device.

[0134] In other embodiments, when the detection signal sent by the Bluetooth device is a BLE broadcast signal, since the detection signal is a Bluetooth signal, the electronic device receiving the detection signal must be within the Bluetooth communication range. Therefore, the electronic device can send a reply signal to the Bluetooth device after receiving the detection signal.

[0135] In addition, in some embodiments, if the detection signal sent by the Bluetooth device is a detection signal that does not carry a device identification, all electronic devices that receive the detection signal return a reply signal to the Bluetooth device. Figure 1As shown in , after the Bluetooth headset sends a detection signal, the mobile phone, laptop computer and tablet computer located around it all receive the detection signal. Then the mobile phone returns a reply signal to the Bluetooth headset, and the reply signal carries the device identification of the mobile phone; the laptop computer returns a reply signal to the Bluetooth headset, and the reply signal carries the device identification of the laptop computer; the tablet computer returns a reply signal to the Bluetooth headset, and the reply signal carries the device identification of the tablet computer.

[0136] In other embodiments, if the detection signal sent by the Bluetooth device is a detection signal carrying the device identifications of the candidate device 1 and the candidate device 2, the candidate device 1 and the candidate device 2 receiving the detection signal return a reply signal to the Bluetooth device. Figure 1 As shown, after the Bluetooth headset sends a detection signal carrying the device identification of the mobile phone and the laptop, the mobile phone and the laptop know that they are the candidate devices that the Bluetooth headset expects to connect to after receiving the detection signal. At this time, the mobile phone and the laptop return a reply signal to the Bluetooth headset. Optionally, after receiving the detection signal, other electronic devices (such as a tablet computer) know that they are not the candidate devices that the Bluetooth headset expects to connect to. At this time, no reply signal is returned to the Bluetooth headset.

[0137] S603: The Bluetooth device receives at least one reply signal, where the at least one reply signal is sent by an electronic device among the N electronic devices that receives the detection signal.

[0138] In some embodiments, the Bluetooth device receives a reply signal sent by at least one electronic device within a preset time. The preset time can be determined based on the reconnection efficiency during the Bluetooth reconnection process. If the Bluetooth device does not receive a reply signal within the preset time, a paging scan is performed directly to execute a reconnection operation. In this way, the problem of low reconnection efficiency caused by the Bluetooth device not receiving a reply signal for a long time and not starting the reconnection procedure can be avoided.

[0139] S604: The Bluetooth device determines at least one candidate device located around the Bluetooth device according to the device identification of the at least one received reply signal.

[0140] In this embodiment, the electronic device that sends the reply signal to the Bluetooth device may be one or more. After receiving the reply signal, the Bluetooth device determines the electronic devices corresponding to the identification information as candidate devices according to the identification information in the reply signal.

[0141] Exemplarily, when electronic devices 1, 2 and 3 are present around a Bluetooth device, the Bluetooth device sends a detection signal, electronic devices 1 and 2 receive the detection signal, and then respectively send reply signals 1 and 2 to the Bluetooth device, wherein reply signal 1 includes a device identification of electronic device 1, and reply signal 2 includes a device identification of electronic device 2, so that after receiving reply signal 1 and reply signal 2, the Bluetooth device can know that electronic devices 1 and 2 are located around the Bluetooth device, and then determine electronic devices 1 and 2 as candidate devices.

[0142] In some embodiments, if the Bluetooth device sends a detection signal carrying M device identifiers corresponding to M electronic devices among N electronic devices, and the M electronic devices are around the Bluetooth device and receive the detection signal, then the M electronic devices will all send a reply signal to the Bluetooth device. If K electronic devices among the M electronic devices are around the Bluetooth device and receive the detection signal, then the K electronic devices will send K reply signals to the Bluetooth device, where 0≤K≤M. At this time, the Bluetooth device determines the K electronic devices corresponding to the K device identifiers in the K reply signals as candidate devices.

[0143] S605: The Bluetooth device determines at least one target device from at least one candidate device according to the Bluetooth connection information and the device identification.

[0144] In this embodiment, the Bluetooth connection information includes the number of connectable devices P (P≥1), the number of connected devices Q (Q≥0) and historical connection information of the Bluetooth device.

[0145] The number of connectable devices P refers to the maximum number of electronic devices that a Bluetooth device can establish Bluetooth connections with at one time. For example, when P=1, it indicates that the Bluetooth device can only maintain Bluetooth connection with one electronic device at a time; when P=2, it indicates that the Bluetooth device can maintain Bluetooth connection with two electronic devices at the same time, and so on.

[0146] The number of connected devices Q refers to the number of electronic devices with which the Bluetooth device has established Bluetooth connections before determining the target device. When Q = 0, it indicates that the Bluetooth device has not currently established a Bluetooth connection with any electronic device, or the Bluetooth device is in the process of connecting back to an electronic device but has not yet successfully connected. When Q = 1, it indicates that the Bluetooth device has currently established a Bluetooth connection with an electronic device, or after establishing a Bluetooth connection with an electronic device, the Bluetooth device is in the process of connecting back to a second electronic device but has not yet successfully connected.

[0147] Normally, a Bluetooth device will prioritize reconnecting to the electronic device with which the Bluetooth connection was last established based on historical connection information and the number of connectable devices P. Exemplarily, when the number of connectable devices of a Bluetooth device is 1, the Bluetooth device prioritizes reconnecting to the electronic device with which the Bluetooth connection was last established. If the electronic device fails to reconnect successfully, the device will reconnect to the second-to-last electronic device with which the Bluetooth connection was established in the historical connection order, and so on. When the number of connectable devices of a Bluetooth device is 2, the Bluetooth device prioritizes reconnecting to the two electronic devices with which the Bluetooth connection was last established. If the two electronic devices fail to reconnect successfully, the device will sequentially connect to the third-to-last and fourth-to-last electronic devices with which the Bluetooth connection was established in the historical connection order; if one of the two electronic devices fails to reconnect successfully, the device will connect to the third-to-last electronic device with which the Bluetooth connection was established in the historical connection order, and so on.

[0148] In this embodiment, when the Bluetooth device determines the target device from at least one candidate device based on the Bluetooth connection information, it first determines the number of target devices H, where the number of target devices H is the difference between the number of connectable devices P and the number of connected devices Q of the Bluetooth device, and P≥H≥0. Then, when at least one candidate device includes the second device, it continues to connect back to the second device, and determines H-1 target devices from other candidate devices based on the historical connection information and the device identifier, where the second device is the electronic device that the Bluetooth device is currently connecting back to. When at least one candidate device does not include the second device, it terminates the connection back to the second device, and determines H target devices from at least one candidate device based on the historical connection information and the device identifier.

[0149] In some embodiments, if the number of connectable devices of a Bluetooth device is 1, and the Bluetooth device does not perform a reconnection operation after startup, therefore, the number of connected devices of the Bluetooth device is 0, the Bluetooth device needs to determine 1 target device from at least one candidate device based on the received reply signal, the device identification, and the historical connection information.

[0150] In other embodiments, if the number of connectable devices of the Bluetooth device is 2, and the Bluetooth device does not perform a reconnection operation after startup, and therefore the number of connected devices of the Bluetooth device is 0, the Bluetooth device needs to determine 2 target devices from at least one candidate device based on the received reply signal, the device identification, and the historical connection information.

[0151] S606: The Bluetooth device connects back to at least one target device.

[0152] In this embodiment, the Bluetooth device sends a reconnection request to at least one target device through a built-in Bluetooth module, where the reconnection request is used to request to reconnect to at least one target device and establish a Bluetooth connection with at least one target device through classic Bluetooth or low-power Bluetooth technology.

[0153] The method provided in this embodiment can be used when the Bluetooth device includes one Bluetooth module, and then initiates a back-connection process to the target device after determining the target device through the one Bluetooth module; it can also be used when the Bluetooth device includes two Bluetooth modules, and then initiates a back-connection process to the target device after determining the target device through one of the two Bluetooth modules. In this way, when the Bluetooth device is back-connecting to the electronic device, see Fig. 7A As shown, if the order of the Bluetooth device to connect back is to connect back to electronic device 1 first, then connect back to electronic device 2. When the number of connectable devices of the Bluetooth device is 1, the Bluetooth device determines through the detection signal that electronic device 1 is not in its Bluetooth communication range, and electronic device 2 is in its Bluetooth communication range, then it directly connects back to electronic device 2 without trying to connect back to electronic device 1, see Figure 7B shown.

[0154] Through the Bluetooth reconnection method provided in this embodiment, the Bluetooth device can send a detection signal through a built-in Bluetooth module before reconnecting to instruct the surrounding electronic devices to send a reply signal. The reply signal indicates to the Bluetooth device whether there are electronic devices around, and on the other hand, it indicates to the Bluetooth device what type of electronic devices are around. After receiving the reply signal, the Bluetooth device determines at least one target device from N electronic devices based on the device identifier in the reply signal, and establishes a Bluetooth communication connection with it, avoiding the process of invalid reconnection due to the inability to perceive whether the electronic device is around, and can achieve accurate reconnection, improve reconnection efficiency, and enhance user experience.

[0155] Example 2: The Bluetooth device uses two Bluetooth modules to perform Bluetooth backconnection.

[0156] The following example 2 is explained by taking the Bluetooth device as a TWS headset, which includes a first headset, a second headset and an earphone box, wherein the first headset has a built-in first Bluetooth module and the second headset has a built-in second Bluetooth module.

[0157] Figure 8 This is an interactive flow chart of a Bluetooth back-connection method for a TWS headset provided in an embodiment of the present application, wherein the TWS headset has been paired with N electronic devices. Figure 8 As shown, the method includes the following steps S801 to S810.

[0158] S801: When the earphone box is in an unpacking state, the second earphone establishes a Bluetooth connection with the first earphone.

[0159] In this embodiment, when the earphone box is in the open state, it sends an opening signal to the first earphone and the second earphone, wherein the opening signal may be a wireless signal of a specified waveform generated when the cover is opened. After receiving the opening signal, the first earphone and the second earphone start the power-on process and establish a Bluetooth connection. The second earphone is the main earphone, the first earphone is the auxiliary earphone, the first Bluetooth module is built into the auxiliary earphone, and the second Bluetooth module is built into the main earphone.

[0160] S802: The second earphone sends an indication message to the first earphone.

[0161] The instruction message is used to instruct the first headset to send a detection signal.

[0162] S803: The second headset determines an electronic device to be reconnected and sends a reconnection request to the electronic device.

[0163] In this embodiment, the second headset determines the electronic device that needs to be reconnected from N electronic devices based on the number of connectable devices of the TWS headset and historical connection information, and generates a reconnection order; then sends a reconnection request to the electronic device one by one according to the reconnection order. Exemplarily, the reconnection order determined by the Bluetooth device based on the number of connectable devices and historical connection information is: first reconnect to electronic device 1, and then reconnect to electronic device 2. At this time, the second headset preferentially sends a reconnection request to electronic device 1. If electronic device 1 is currently in the Bluetooth communication range of the TWS headset, the second headset establishes a Bluetooth connection with electronic device 1 through the reconnection request. If electronic device 1 is not currently in the Bluetooth communication range of the TWS headset, the second headset sends a reconnection request to electronic device 2 when the reconnection to electronic device 1 times out.

[0164] In some embodiments, the second headset sends the reconnection request, including the second headset periodically sending a paging request (page packet) to the electronic device that needs to be reconnected, so as to request to establish a Bluetooth communication link with the electronic device that needs to be reconnected.

[0165] S804: After receiving the instruction message, the first headset sends a detection signal, where the detection signal is used to instruct the electronic device to send a reply signal.

[0166] In this embodiment, based on the fact that the first earphone is a slave earphone and the second earphone is a master earphone, usually, the slave earphone needs to perform a corresponding operation according to the instruction message of the master earphone. Therefore, when the first earphone receives the instruction message sent by the second earphone to instruct to send a detection signal, the first earphone sends a detection signal.

[0167] Exemplarily, the first earphone may send a BLE broadcast signal via a built-in first Bluetooth module.

[0168] S805, after receiving the detection signal, the electronic device sends a reply signal, and the reply signal carries the device identification of the electronic device.

[0169] S806: The first earphone receives at least one reply signal, where the at least one reply signal is sent by an electronic device among the N electronic devices that receives the detection signal.

[0170] S807: The first headset determines at least one candidate device located around the Bluetooth device according to the device identifier of the at least one reply signal.

[0171] The at least one candidate device is the electronic device corresponding to the identification information in the reply signal.

[0172] It should be noted that when the first earphone receives the reply signal, it may receive it at different times, for example, it receives the reply signal 1 sent by the electronic device 1 at the first moment, and receives the reply signal 2 sent by the electronic device 2 at the second moment. Therefore, when the first earphone determines at least one candidate device, it may determine it according to the order of the received reply signals, or it may determine it according to the reply signals received within a preset time period, wherein the preset time period may be the reception period of all reply signals of the first earphone.

[0173] S808: The first headset sends a device identification of at least one candidate device to the second headset.

[0174] In some embodiments, the first headset sends the device identifications of the candidate devices to the second headset in sequence according to the determination order of the candidate devices. Exemplarily, when the first headset receives a reply signal 1 sent by electronic device 1, electronic device 1 is determined as a candidate device, and the device identification of electronic device 1 is sent to the second headset; when the first headset receives a reply signal 2 sent by electronic device 2, electronic device 2 is determined as a candidate device, and the device identification of electronic device 2 is sent to the second headset.

[0175] In other embodiments, the first headset packages the device identifications of the candidate devices determined within a preset time period and sends them to the second headset. Exemplarily, when the first headset receives a reply signal 1 sent by electronic device 1 and a reply signal 2 sent by electronic device 2 within a first time period, the electronic device 1 and the electronic device 2 are determined as candidate devices, and the device identifications of the electronic device 1 and the electronic device 2 are packaged and sent to the second headset.

[0176] In this embodiment, since the first earphone and the second earphone are independent of each other, steps S804 to S808 and step S803 can be performed simultaneously.

[0177] Exemplarily, after the second earphone determines the electronic device that needs to be reconnected based on the number of connectable devices of the TWS earphone and the historical connection information, it sends a reconnection request to the electronic device through the second Bluetooth module, such as direct paging to establish a Bluetooth connection. At the same time, the first earphone sends a BLE broadcast signal through the first Bluetooth module, and when receiving a reply signal sent by at least one electronic device, it determines at least one candidate device located around the Bluetooth device based on the device identification of the received reply signal. In this way, when the second earphone is in the process of reconnecting to the electronic device to which it needs to reconnect, the first earphone sends a detection signal and determines the candidate device. The first earphone and the second earphone cooperate with each other and do not conflict with each other, thereby avoiding interference in the process of the second earphone sending the reconnection request because both the detection signal and the reconnection signal are sent by the second earphone.

[0178] Optionally, in some other implementations, after receiving a reply signal sent by at least one electronic device, the first earphone may also send the reply signal to the second earphone, and the second earphone determines at least one candidate device located around the Bluetooth device based on the device identifier of the received reply signal.

[0179] S809: The second headset determines at least one target device from at least one candidate device according to the Bluetooth connection information of the TWS headset and the device identification.

[0180] In this embodiment, when the second headset receives the device identifier of the candidate device sent by the first headset, it first determines the number of target devices that need to be reconnected H. For example, if the number of connectable devices of the TWS headset is 2, the number of connected devices is 1, and the Bluetooth device receives reply signals sent by 2 electronic devices, then the Bluetooth device determines that the number of target devices that need to be reconnected is 1.

[0181] It should be understood that the reconnection request sent by the second earphone includes multiple consecutive page packets, and the multiple page packets sent continuously correspond to a period, which is recorded as the first period. The first earphone sends a BLE broadcast signal and confirms the candidate device based on the reply signal, and the second earphone confirms the target device based on the device identification of the candidate device, which is recorded as the second period. Combined with step S803, when the second earphone is in the process of reconnecting to the electronic device, if the electronic device connected back by the second earphone is around the TWS earphone, the first period may be less than the second period. If the electronic device connected back by the second earphone is not around the TWS earphone, the first period may be greater than the second period. Therefore, when the second earphone determines the target device, the second earphone may be in the process of reconnecting to the electronic device that needs to be reconnected first, or it may be in the process of the electronic device that needs to be reconnected first has been successfully reconnected, and then reconnecting to other electronic devices according to the reconnection order.

[0182] If the device identification of the candidate device received by the second headset includes the device identification of the electronic device currently being reconnected, that is, the second device, the second headset continues to reconnect to the second device, and determines H-1 target devices that need to be reconnected from other candidate devices based on the historical connection information of the TWS headset and the received other device identifications. If the device identification of the candidate device does not include the device identification of the second device, the second headset terminates the reconnection to the second device, and determines H target devices from at least one candidate device based on the historical connection information of the TWS headset and the received device identification.

[0183] S810: The second headset connects back to at least one target device.

[0184] The second headset sends a reconnection request to the target device through the second Bluetooth module, where the reconnection request is used to request to reconnect to the target device, and establish a Bluetooth connection with the target device through classic Bluetooth or low-power Bluetooth technology.

[0185] It should be understood that the Bluetooth reconnection method provided in the embodiment of the present application can be applicable to the process in which the first earphone and the second earphone receive audio data sent by the electronic device through various methods such as forwarding, listening or double sending.

[0186] Exemplarily, when the first earphone and the second earphone receive audio data sent by the electronic device by forwarding, after the second earphone establishes a Bluetooth connection with the target device, the second earphone forwards the audio data to the first earphone through the Bluetooth link between the second earphone and the first earphone.

[0187] When the first earphone and the second earphone receive audio data sent by the electronic device by monitoring, after the second earphone establishes a Bluetooth connection with the target device, the first earphone obtains the audio data by monitoring the Bluetooth link between the second earphone and the target device.

[0188] When the first earphone and the second earphone receive audio data sent by the electronic device in a dual-transmission manner, after the second earphone establishes a Bluetooth connection with the target device, the first earphone also establishes a Bluetooth connection with the target device, and the second earphone obtains the audio data through the Bluetooth link established with the target device, and the first earphone obtains the audio data through the Bluetooth link established with the target device.

[0189] Through the method provided in this embodiment, after the TWS headset is unpacked, a new route is added for the first headset to send a detection signal during the process of the second headset connecting back to the electronic device. The first headset sends the device identifier of the candidate device to the second headset based on the detection result, and the second headset determines the target device it can connect to based on the device identifier of the candidate device, thereby achieving accurate backconnection.

[0190] The method provided in this embodiment can be used when the Bluetooth device includes two Bluetooth modules. The two Bluetooth modules are independent of each other and can perform different operations respectively, so as to realize the process of determining the target device existing around by the first Bluetooth module and connecting the electronic device with the second Bluetooth module. The first Bluetooth module and the second Bluetooth module can cooperate with each other without causing any conflict. In this way, when the Bluetooth device connects back to the electronic device, Fig. 9A As shown, if the order of the Bluetooth device to connect back is to connect back to electronic device 1 first, then connect back to electronic device 2, and then connect back to electronic device 3, then when the number of connectable devices of the Bluetooth device is 2, it determines through the detection signal that electronic device 2 is not in its Bluetooth communication range, and when electronic device 1 and electronic device 3 are in its Bluetooth communication range, it directly connects back to electronic device 1 and electronic device 3 without trying to connect back to electronic device 2, see Fig. 9B shown.

[0191] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0192] Fig.10 Schematic diagram of a Bluetooth back-connection device provided by an embodiment of the present application. The device is applied to a Bluetooth device, and the Bluetooth device is paired with N electronic devices. Fig.10 As shown, the device includes a sending module 1001, a receiving module 1002 and a backconnection module 1003.

[0193] The sending module 1001 is used for detecting a signal, and the detection signal is used for instructing the electronic device to send a reply signal.

[0194] The receiving module 1002 is configured to receive at least one reply signal.

[0195] The reconnection module 1003 is configured to reconnect to a first device according to at least one reply signal, where the first device is an electronic device that sends a reply signal among the N electronic devices.

[0196] An embodiment of the present application also provides a Bluetooth device, which is paired with N electronic devices. The Bluetooth device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the Bluetooth reconnection method shown in the above embodiments is implemented.

[0197] The present application also provides a chip, see Fig.11 As shown, the chip includes a processor and a memory, in which a computer program is stored. When the computer program is executed by the processor, the Bluetooth back-connection method in the above-mentioned embodiments is implemented.

[0198] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the Bluetooth backconnection method provided in the above embodiments is implemented.

[0199] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by an electronic device, the electronic device implements the Bluetooth backconnection method provided in the above embodiments.

[0200] It should be understood that the processor mentioned in the embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0201] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0202] In the embodiments provided in the present application, the division of each framework or module is only a logical function division. There may be other division methods in actual implementation. For example, multiple frameworks or modules can be combined or integrated into another system, or some features can be ignored or not executed.

[0203] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0204] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0205] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0206] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A Bluetooth back-connection method, characterized in that: Applied to a Bluetooth device, the Bluetooth device has been paired with N electronic devices, where N≥1, and the method includes: Sending a detection signal, wherein the detection signal is used to instruct the electronic device to send a reply signal; receiving at least one reply signal; The first device is connected back to the at least one reply signal according to the at least one reply signal, where the first device is the electronic device that sends the reply signal among the N electronic devices.

2. The method according to claim 1, characterized in that The Bluetooth device comprises a first Bluetooth module and a second Bluetooth module; the sending of the detection signal and the receiving of at least one reply signal comprise: The first Bluetooth module sends the detection signal, and the detection signal is used to instruct the electronic device to send a reply signal; The first Bluetooth module receives the at least one reply signal.

3. The method according to claim 2, characterized in that Before the first Bluetooth module sends the detection signal, the method further includes: The first Bluetooth module establishes a Bluetooth connection with the second Bluetooth module; The second Bluetooth module sends an instruction message to the first Bluetooth module, where the instruction message is used to instruct the first Bluetooth module to send the detection signal.

4. The method according to claim 2 or 3, characterized in that: The step of connecting back to the first device according to the at least one reply signal comprises: The first Bluetooth module instructs the second Bluetooth module to connect back to the first device according to the at least one reply signal.

5. The method according to claim 4, characterized in that The first Bluetooth module instructs the second Bluetooth module to connect back to the first device according to the at least one reply signal, including: The first Bluetooth module determines, according to the at least one reply signal, the electronic device corresponding to the reply signal as a candidate device; The first Bluetooth module sends the device identification of the candidate device to the second Bluetooth module; The second Bluetooth module determines the at least one target device from the candidate devices according to the Bluetooth connection information of the Bluetooth device and the device identifier, and the at least one target device includes the first device; The second Bluetooth module is connected back to the first device.

6. The method according to claim 4, characterized in that The first Bluetooth module instructs the second Bluetooth module to connect back to the first device according to the at least one reply signal, further comprising: The first Bluetooth module sends the at least one reply signal to the second Bluetooth module, where the reply signal carries a device identifier of the electronic device corresponding to the reply signal; The second Bluetooth module determines, according to the at least one reply signal, the electronic device corresponding to the reply signal as a candidate device; The second Bluetooth module determines at least one target device from the candidate devices according to the Bluetooth connection information of the Bluetooth device and the device identifier, and the at least one target device includes the first device; The second Bluetooth module is connected back to the first device.

7. The method according to claim 5 or 6, characterized in that: The Bluetooth connection information includes the number P of connectable devices, the number Q of connected devices, and historical connection information of the Bluetooth device, where P≥1 and Q≥0.

8. The method according to claim 7, characterized in that The second Bluetooth module determines at least one target device from the candidate devices according to the Bluetooth connection information of the Bluetooth device and the device identifier, including: The second Bluetooth module determines the number H of the target devices, where the number H of the target devices is the difference between the number P of connectable devices and the number Q of connected devices, where P≥H≥0; When the candidate devices include a second device, the second Bluetooth module continues to connect back to the second device, and determines H-1 target devices from other candidate devices according to the historical connection information and the device identifier, wherein the second device is the electronic device to which the Bluetooth device is currently connecting back; When the candidate devices do not include the second device, the second Bluetooth module terminates the connection back to the second device, and determines H target devices from the at least one candidate device according to the historical connection information and the device identifier.

9. The method according to any one of claims 2 to 8, characterized in that: In the process of sending the detection signal and receiving at least one reply signal, the method further includes: The second Bluetooth module sends a reconnection request, where the reconnection request is used to request a reconnection to one of the N electronic devices.

10. The method according to any one of claims 2 to 9, characterized in that: The first Bluetooth module is a low-power Bluetooth module, and the second Bluetooth module is a classic Bluetooth module.

11. The method according to any one of claims 2 to 10, characterized in that: The Bluetooth device is a Bluetooth headset, which includes a first headset, a second headset and an earphone box, the earphone box is used to store the first headset and the second headset, the first Bluetooth module is built in the first headset, and the second Bluetooth module is built in the second headset.

12. The method according to any one of claims 1 to 11, characterized in that: The detection signal carries M device identifiers corresponding to M electronic devices among the N electronic devices, and the detection signal is used to instruct the M electronic devices to send a reply signal, wherein 1≤M≤N.

13. The method according to any one of claims 1 to 12, characterized in that: The detection signal and the reply signal include any one of an ultrasonic signal, an ultra-wideband pulse signal, a low-power Bluetooth broadcast signal, a wireless fidelity signal, and a basic rate / enhanced rate signal.

14. A Bluetooth back-connection device, characterized in that: Applied to a Bluetooth device, the Bluetooth device is paired with N electronic devices, wherein N≥1, and the apparatus comprises: A sending module, used for sending a detection signal, wherein the detection signal is used for instructing the electronic device to send a reply signal; A receiving module, used for receiving at least one reply signal; The back-connection module is used to connect back to a first device according to the at least one reply signal, where the first device is an electronic device among the N electronic devices that sends the reply signal.

15. A Bluetooth device, characterized in that: The Bluetooth device has been paired with the N electronic devices. The Bluetooth device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the Bluetooth reconnection method according to any one of claims 1 to 13 is implemented.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the Bluetooth backconnection method according to any one of claims 1 to 13 is implemented.

17. A chip, characterized in that: The chip includes a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the Bluetooth backconnection method according to any one of claims 1 to 13 is implemented.

Citation Information

Patent Citations

  • System and method for establishing Bluetooth connection and Bluetooth device

    CN110267358A

  • Charging box, TWS earphone, TWS earphone system, reconnection device and method

    CN110740400A

  • Bluetooth connection switching method and equipment, and storage medium

    CN113965895A

  • Signal reconnection method and system, Bluetooth earphone and storage medium

    CN114222278A

  • Equipment connection method and device, equipment and storage medium

    CN114390500A