Bluetooth connection method and device, storage medium and electronic equipment

By introducing multi -device connection status monitoring services in the Bluetooth connection, monitoring and modifying equipment status, the problem of abnormal binding Bluetooth equipment in multi -device connection scenes is solved, and the connection stability and user experience are improved.

CN119364321APending Publication Date: 2025-01-24SHENZHEN TCL DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411459844.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In multi-device connection scenarios, due to the connection order of multiple Bluetooth devices, Bluetooth device binding is prone to failure due to the problem of Bluetooth connection failure.

Method used

By introducing multi -device connection status monitoring services, monitor whether the main equipment and the first Bluetooth device establishment connection process, whether the second Bluetooth device requested the recurring connection meets the predetermined connection conditions, and modify it according to the status of the device state machine to avoid the conflict of the device connection status state. Essence

Benefits of technology

Effectively improve the Bluetooth multi -connection stability in the multi -connection scene, avoid abnormal conflicts of device connection status, and improve the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119364321A_ABST
    Figure CN119364321A_ABST
Patent Text Reader

Abstract

The invention discloses a Bluetooth connection method and device, a storage medium and electronic equipment, and relates to the technical field of the Internet of Things. Main equipment can initiate Bluetooth connection for first Bluetooth equipment; if in the process of establishing the Bluetooth connection with the first Bluetooth device, monitoring that a second Bluetooth device requesting for reconnection meets a predetermined connection condition and the first Bluetooth device is in a binding state through a multi-device connection state monitoring service, if yes, modifying the first Bluetooth device from the binding state to a connection pause state in a device state machine; and if it is monitored that the Bluetooth connection with the second Bluetooth device is completed, modifying the first Bluetooth device from the pause connection state to the binding state in the device state machine so as to continue to establish the Bluetooth connection with the first Bluetooth device. According to the method, the equipment connection state conflict abnormal condition of multi-equipment connection can be effectively avoided, the multi-equipment connection stability is improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet of Things, and in particular to a Bluetooth connection method, device, storage medium and electronic device. Background Art

[0002] With the popularization of Bluetooth technology and the rapid growth of Bluetooth devices, multi-device connection is becoming more and more frequent in actual application scenarios. Multi-device connection means that a main device (such as a TV, etc.) is connected to multiple Bluetooth devices (such as headphones, speakers, etc.). Currently, in multi-device connection scenarios, due to reasons such as the connection order of multiple Bluetooth devices, it is easy to cause Bluetooth device binding anomalies, resulting in Bluetooth connection failure. Summary of the invention

[0003] The embodiment of the present application provides a Bluetooth connection solution, which can effectively improve the stability of Bluetooth multi-connections in multi-connection scenarios and improve user experience.

[0004] The embodiments of the present application provide the following technical solutions:

[0005] According to one embodiment of the present application, a Bluetooth connection method includes: initiating a Bluetooth connection for a first Bluetooth device; if in the process of establishing a Bluetooth connection with the first Bluetooth device, it is monitored through a multi-device connection status monitoring service that a second Bluetooth device requesting a return connection meets a predetermined connection condition and the first Bluetooth device is in a binding state, then in a device state machine, the first Bluetooth device is modified from the binding state to a suspended connection state; if it is monitored that the Bluetooth connection with the second Bluetooth device is completed, then in the device state machine, the first Bluetooth device is modified from the suspended connection state to the binding state to continue to establish a Bluetooth connection with the first Bluetooth device.

[0006] In some embodiments of the present application, before initiating a Bluetooth connection for the first Bluetooth device, the method also includes: obtaining a multi-device connection status monitoring module, the multi-device connection status monitoring module including the multi-device connection status monitoring service; and installing the multi-device connection status monitoring module in a Bluetooth module.

[0007] In some embodiments of the present application, the predetermined connection condition is being in a bound state; if the second Bluetooth device requesting a backconnection is monitored through a multi-device connection status monitoring service and meets the predetermined connection condition and the first Bluetooth device is in a binding state, then the first Bluetooth device is modified from the binding state to a suspended connection state in the device state machine, including: if the second Bluetooth device requesting a backconnection is monitored through a multi-device connection status monitoring service and the first Bluetooth device is in a binding state, then the connection state of the second Bluetooth device is determined; if the connection state of the second Bluetooth device is a bound state, then the first Bluetooth device is modified from the binding state to a suspended connection state in the device state machine.

[0008] In some embodiments of the present application, the predetermined connection condition is being in a predetermined device list; if the second Bluetooth device requesting a backconnection is monitored through a multi-device connection status monitoring service to meet the predetermined connection condition and the first Bluetooth device is in a binding state, then the first Bluetooth device is modified from the binding state to a suspended connection state in the device state machine, including: if the second Bluetooth device requesting a backconnection is monitored through a multi-device connection status monitoring service to be in the predetermined device list, determining whether the first Bluetooth device is in a binding state; if so, modifying the first Bluetooth device from the binding state to a suspended connection state in the device state machine.

[0009] In some embodiments of the present application, after initiating a Bluetooth connection for the first Bluetooth device, the method further includes: selecting a connection marked device from candidate Bluetooth devices that have established a Bluetooth connection with the current device; and adding the connection marked device to the predetermined device list corresponding to the multi-device connection status monitoring service.

[0010] In some embodiments of the present application, selecting a connection marked device from candidate Bluetooth devices that have established a Bluetooth connection with the current device includes: selecting a Bluetooth device that has experienced an abnormal Bluetooth disconnection within a predetermined time range from the candidate Bluetooth devices; and determining the Bluetooth device that has experienced an abnormal Bluetooth disconnection within the predetermined time range as the connection marked device.

[0011] In some embodiments of the present application, selecting a connection marked device from candidate Bluetooth devices that have established a Bluetooth connection with the current device includes: selecting a Bluetooth device that matches the current scene from the candidate Bluetooth devices; and determining the Bluetooth device that matches the current scene as the connection marked device.

[0012] According to one embodiment of the present application, a Bluetooth connection device comprises: a connection initiating unit, configured to initiate a Bluetooth connection for a first Bluetooth device; a state modifying unit, configured to modify the first Bluetooth device from the binding state to the suspended connection state in the device state machine if, during the process of establishing a Bluetooth connection with the first Bluetooth device, it is detected through a multi-device connection state monitoring service that the second Bluetooth device requesting a backconnection meets a predetermined connection condition and the first Bluetooth device is in a binding state; and a state recovering unit, configured to modify the first Bluetooth device from the suspended connection state to the binding state in the device state machine if it is detected that the Bluetooth connection with the second Bluetooth device is completed, so as to continue to establish a Bluetooth connection with the first Bluetooth device.

[0013] In some embodiments of the present application, before initiating a Bluetooth connection for the first Bluetooth device, the apparatus further includes an installation unit for: obtaining a multi-device connection status monitoring module, wherein the multi-device connection status monitoring module includes the multi-device connection status monitoring service; and installing the multi-device connection status monitoring module in the Bluetooth module.

[0014] In some embodiments of the present application, the predetermined connection condition is being in a bound state; the state modification unit is used to: if a second Bluetooth device requesting a reconnection is detected through a multi-device connection status monitoring service and the first Bluetooth device is in a binding state, then determine the connection state of the second Bluetooth device; if the connection state of the second Bluetooth device is a bound state, then modify the first Bluetooth device from the binding state to a suspended connection state in the device state machine.

[0015] In some embodiments of the present application, the predetermined connection condition is being in a predetermined device list; the state modification unit is used to: if it is detected through a multi-device connection status monitoring service that the second Bluetooth device requesting a reconnection is in the predetermined device list, then determine whether the first Bluetooth device is in a binding state; if so, then modify the first Bluetooth device from the binding state to a suspended connection state in the device state machine.

[0016] In some embodiments of the present application, after initiating a Bluetooth connection for the first Bluetooth device, the apparatus further includes a device adding unit, which is used to: select a connection marked device from candidate Bluetooth devices that have established a Bluetooth connection with this device; and add the connection marked device to the predetermined device list corresponding to the multi-device connection status monitoring service.

[0017] In some embodiments of the present application, the device adding unit is used to: select a Bluetooth device that has an abnormal Bluetooth disconnection within a predetermined time range from the candidate Bluetooth devices; and determine the Bluetooth device that has an abnormal Bluetooth disconnection within the predetermined time range as the connection marking device.

[0018] In some embodiments of the present application, the device adding unit is used to: select a Bluetooth device that matches the current scene from the candidate Bluetooth devices; and determine the Bluetooth device that matches the current scene as the connection mark device.

[0019] According to another embodiment of the present application, a storage medium stores a computer program thereon, and when the computer program is executed by a processor of a computer, the computer executes the method described in the embodiment of the present application.

[0020] According to another embodiment of the present application, an electronic device may include: a memory storing a computer program; and a processor reading the computer program stored in the memory to execute the method described in the embodiment of the present application.

[0021] According to another embodiment of the present application, a computer program product or a computer program includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in various optional implementations described in the embodiments of the present application.

[0022] In an embodiment of the present application, the main device can: initiate a Bluetooth connection to a first Bluetooth device; if in the process of establishing a Bluetooth connection with the first Bluetooth device, it is monitored through a multi-device connection status monitoring service that the second Bluetooth device requesting a return connection meets a predetermined connection condition and the first Bluetooth device is in a binding state, then in the device state machine, the first Bluetooth device is modified from the binding state to a suspended connection state; if it is monitored that the Bluetooth connection with the second Bluetooth device is completed, then in the device state machine, the first Bluetooth device is modified from the suspended connection state to the binding state to continue to establish a Bluetooth connection with the first Bluetooth device.

[0023] In this way, by introducing a multi-device connection status monitoring service to perform multi-device connection status monitoring, during the process of establishing a Bluetooth connection between the main device and the first Bluetooth device, if the multi-device connection status monitoring service detects that the second Bluetooth device requesting to reconnect meets the predetermined connection conditions and the first Bluetooth device is in a binding state, the first Bluetooth device is modified from the binding state to the suspended connection state so that the Bluetooth connection with the first Bluetooth device is suspended, and the main device waits for the Bluetooth connection with the second Bluetooth device to be completed before modifying it back to the binding state, so that the Bluetooth connection can continue to be established with the first Bluetooth device. Overall, it can effectively avoid the abnormal situation of device connection status conflict in multi-device connections, improve the stability of multi-device connections, and enhance user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 A flowchart of a Bluetooth connection method according to an embodiment of the present application is shown.

[0026] Figure 2 A flowchart of a Bluetooth connection method in a scenario according to the present application is shown.

[0027] Figure 3 A service installation flow chart according to a scenario of the present application is shown.

[0028] Figure 4 A block diagram of a Bluetooth connection device according to an embodiment of the present application is shown.

[0029] Figure 5 A block diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0030] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are only used to explain the present disclosure and are not intended to limit the present disclosure. In addition, the embodiments provided below are partial embodiments for implementing the present disclosure, rather than providing all embodiments for implementing the present disclosure. In the absence of conflict, the technical solutions recorded in the embodiments of the present disclosure can be implemented in any combination.

[0031] It should be noted that, in the embodiments of the present disclosure, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or apparatus including a series of elements includes not only the elements explicitly recorded, but also includes other elements not explicitly listed, or also includes elements inherent to the implementation of the method or apparatus. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other related elements in the method or apparatus including the element (such as a step in the method or a unit in the apparatus, for example, a unit may be a part of a circuit, a part of a processor, a part of a program or software, etc.).

[0032] For example, the Bluetooth connection method provided in the embodiment of the present disclosure includes a series of steps, but the Bluetooth connection method provided in the embodiment of the present disclosure is not limited to the recorded steps. Similarly, the Bluetooth connection device provided in the embodiment of the present disclosure includes a series of units, but the device provided in the embodiment of the present disclosure is not limited to including the units explicitly recorded, and may also include units that need to be set to obtain relevant information or perform processing based on the information.

[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present disclosure belongs. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure.

[0034] It is understandable that in the specific implementation of this application, relevant data is involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0035] Currently, in multi-device connection scenarios, due to reasons such as the order in which multiple Bluetooth devices are connected, it is easy for Bluetooth device binding anomalies to cause Bluetooth connection failures. For example, if the main device has been connected to a Bluetooth device A, and Bluetooth device A is turned off, the main device connects to another Bluetooth device B. During the connection process, if Bluetooth device A is turned on and connected back to the main device, the device state machine in the main device may change directly from the "binding state" when connecting to Bluetooth device B to the "bound state". However, at this time, the actual state of Bluetooth device B is still in the "binding state" and the connection process has not been completed. At this time, it is easy for Bluetooth device B to bind abnormally, resulting in the main device being unable to successfully connect to Bluetooth device B.

[0036] The embodiment of the present application provides a Bluetooth connection solution to solve the above-mentioned problems currently existing. The Bluetooth connection solution of the embodiment of the present application can effectively improve the stability of Bluetooth multi-connection in multi-connection scenarios and improve user experience.

[0037] Figure 1 The flowchart of a Bluetooth connection method according to an embodiment of the present application is schematically shown. The execution subject of the Bluetooth connection method can be any host device with Bluetooth capability, such as a TV, a computer, a mobile phone, a smart watch, and a home appliance.

[0038] like Figure 1 As shown, the master device can execute Figure 1 The steps of the Bluetooth connection method shown may include steps S110 to S130.

[0039] Step S110, initiating a Bluetooth connection for a first Bluetooth device; Step S120, if in the process of establishing a Bluetooth connection with the first Bluetooth device, it is detected through the multi-device connection status monitoring service that the second Bluetooth device requesting a return connection meets the predetermined connection conditions and the first Bluetooth device is in a binding state, then in the device state machine, the first Bluetooth device is changed from the binding state to a suspended connection state; Step S130, if it is detected that the Bluetooth connection with the second Bluetooth device is completed, then in the device state machine, the first Bluetooth device is changed from the suspended connection state to the binding state to continue to establish a Bluetooth connection with the first Bluetooth device.

[0040] The master device initiates a Bluetooth connection to the first Bluetooth device. During the process of establishing the Bluetooth connection with the first Bluetooth device, the multi-device connection status monitoring service can monitor that the second Bluetooth device requests to connect back and that the second Bluetooth device requesting to connect back meets the predetermined connection conditions, and the first Bluetooth device can be monitored to be in the binding state.

[0041] In this case, changing the first Bluetooth device from the binding state to the suspended connection state in the device state machine will cause the master device to suspend establishing a Bluetooth connection with the first Bluetooth device; the master device will continue to complete the Bluetooth back-connection connection with the second Bluetooth device.

[0042] Furthermore, if it is monitored that the Bluetooth connection with the second Bluetooth device is completed, the first Bluetooth device is modified from the suspended connection state to the binding state in the device state machine, and then, the main device can continue to establish a Bluetooth connection with the first Bluetooth device to complete the binding and establish the Bluetooth connection.

[0043] In this way, by introducing a multi-device connection status monitoring service to perform multi-device connection status monitoring, during the process of establishing a Bluetooth connection between the main device and the first Bluetooth device, if the multi-device connection status monitoring service detects that the second Bluetooth device requesting to reconnect meets the predetermined connection conditions and the first Bluetooth device is in a binding state, the first Bluetooth device is modified from the binding state to the suspended connection state so that the Bluetooth connection with the first Bluetooth device is suspended, and the main device waits for the Bluetooth connection with the second Bluetooth device to be completed before modifying it back to the binding state, so that the Bluetooth connection can continue to be established with the first Bluetooth device. Overall, it can effectively avoid the abnormal situation of device connection status conflict in multi-device connections, improve the stability of multi-device connections, and enhance user experience.

[0044] Described below Figure 1 When the Bluetooth connection is performed under the embodiment, further optional specific embodiments are provided under each step performed.

[0045] In one embodiment, the predetermined connection condition is being in a bound state; if the second Bluetooth device requesting a backconnection is monitored through a multi-device connection status monitoring service and meets the predetermined connection condition and the first Bluetooth device is in a binding state, then the first Bluetooth device is modified from the binding state to a suspended connection state in the device state machine, including: if the second Bluetooth device requesting a backconnection is monitored through a multi-device connection status monitoring service and the first Bluetooth device is in a binding state, then the connection state of the second Bluetooth device is determined; if the connection state of the second Bluetooth device is a bound state, then the first Bluetooth device is modified from the binding state to a suspended connection state in the device state machine.

[0046] In this embodiment, the predetermined connection condition is being in a bound state, that is, in the process of establishing a Bluetooth connection between the main device and the first Bluetooth device, if it is detected through the multi-device connection status monitoring service that the second Bluetooth device requesting a return connection is in a bound state and the first Bluetooth device is in a binding state, then the first Bluetooth device is modified from a binding state to a suspended connection state in the device state machine; then, if it is detected that the main device and the second Bluetooth device complete the Bluetooth connection, then the first Bluetooth device is modified from a suspended connection state to a binding state in the device state machine of the main device to continue to establish a Bluetooth connection with the first Bluetooth device.

[0047] After the main device and the second Bluetooth device complete the Bluetooth pairing connection, the second Bluetooth device disconnects from the main device. For example, after the second Bluetooth device and the main device complete the Bluetooth pairing connection, the second Bluetooth device is turned off. Since the main device and the second Bluetooth device complete the Bluetooth pairing connection, even if the connection is disconnected, the main device and the second Bluetooth device are already in a bound state in the pairing record.

[0048] For example, in one scenario, see Figure 2 , the main device is a TV, the first Bluetooth device is a speaker, and the second Bluetooth device is a handle. Based on this embodiment, the Bluetooth connection step in this scenario may include steps S210 to S2100.

[0049] In step S210, the television (TV) and the handle establish a Bluetooth connection through Bluetooth pairing. During this process, the television completes the binding of the handle, and the handle is in a bound state.

[0050] Step S220: the handle is turned off and disconnected from the TV.

[0051] Step S230: The TV initiates a Bluetooth connection to the speaker.

[0052] Step S240: During the process of establishing a Bluetooth connection between the TV and the speaker, the speaker is in a binding process.

[0053] Step S250, turning on the handle.

[0054] Step S260: The handle reconnects, and the handle requests the TV to reconnect.

[0055] In step S270, during the process of establishing a Bluetooth connection between the TV and the speaker, the multi-device connection status monitoring service detects that the handle requesting a reconnection is "in a bound state (the predetermined connection condition under this embodiment)" and the speaker is in a binding state, and changes the speaker from a binding state to a suspended connection state in the device state machine.

[0056] Step S280: the handle reconnection is completed.

[0057] Step S290: The multi-device connection status monitoring service detects that the TV and the controller have completed the Bluetooth connection, and changes the speaker from the suspended connection state to the binding state in the device state machine.

[0058] Step S2100: The TV continues to establish a Bluetooth connection with the sound box until the connection is completed. Thus, the TV has established a Bluetooth connection with both the handle and the sound box.

[0059] In this scenario, it can effectively avoid abnormal device connection status conflicts when the TV connects multiple devices via Bluetooth, improve the TV's multi-device connection stability, and enhance the user experience.

[0060] Furthermore, in one embodiment, the predetermined connection condition is being in a predetermined device list; if the second Bluetooth device requesting a backconnection is monitored through a multi-device connection status monitoring service to meet the predetermined connection condition and the first Bluetooth device is in a binding state, then the first Bluetooth device is modified from the binding state to a suspended connection state in the device state machine, including: if the second Bluetooth device requesting a backconnection is monitored through a multi-device connection status monitoring service to be in the predetermined device list, then determining whether the first Bluetooth device is in a binding state; if so, then modifying the first Bluetooth device from the binding state to a suspended connection state in the device state machine.

[0061] In this embodiment, the predetermined connection condition is being in the predetermined device list, that is, in the process of establishing a Bluetooth connection between the main device and the first Bluetooth device, if it is detected through the multi-device connection status monitoring service that the second Bluetooth device requesting a return connection is "in the predetermined device list" and the first Bluetooth device is in the binding state, then the first Bluetooth device is modified from the binding state to the suspended connection state in the device state machine; then, if it is detected that the main device and the second Bluetooth device complete the Bluetooth connection, then the first Bluetooth device is modified from the suspended connection state to the binding state in the device state machine of the main device to continue to establish a Bluetooth connection with the first Bluetooth device.

[0062] By setting a preset device list, once a reconnection is initiated on the second Bluetooth device, the multi-device connection status monitoring service can directly determine through the preset device list that the state of the first Bluetooth connection device needs to be adjusted when the second Bluetooth device reconnects, without having to further detect and determine the connection status of the second Bluetooth device before determining that the state of the first Bluetooth connection device needs to be adjusted. When the second Bluetooth device initiates a reconnection, the first Bluetooth device can be changed from the binding state to the suspended connection state more quickly, thereby avoiding multi-connection state conflicts in a more timely manner.

[0063] Furthermore, in one embodiment, after initiating a Bluetooth connection for the first Bluetooth device, the method may also include: selecting a connection marked device from candidate Bluetooth devices that have established a Bluetooth connection with this device; and adding the connection marked device to the predetermined device list corresponding to the multi-device connection status monitoring service.

[0064] The master device may select one or more Bluetooth devices as connection mark devices from the candidate Bluetooth devices that have established a Bluetooth connection with the present device (i.e., the master device itself), and the Bluetooth devices among the candidate Bluetooth devices that have established a Bluetooth connection with the present device are all Bluetooth devices in a bound state, and thus, the selected connection mark devices are Bluetooth devices in a bound state and have the possibility of reconnecting.

[0065] The selected connection tagged device is added to the predetermined device list corresponding to the multi-device connection status monitoring service. Then, the multi-device connection status monitoring service can quickly resolve multi-connection status conflicts directly based on the predetermined device list when the Bluetooth device requests to reconnect.

[0066] In one embodiment, selecting a connection mark device from candidate Bluetooth devices that have established a Bluetooth connection with the current device includes: using all of the candidate Bluetooth devices that have established a Bluetooth connection with the current device as connection mark devices.

[0067] In one embodiment, selecting a connection marked device from candidate Bluetooth devices that have established a Bluetooth connection with the current device includes: selecting a Bluetooth device that has experienced an abnormal Bluetooth disconnection within a predetermined time range from the candidate Bluetooth devices; and determining the Bluetooth device that has experienced an abnormal Bluetooth disconnection within the predetermined time range as the connection marked device.

[0068] Under this embodiment, after the Bluetooth connection is initiated by the first Bluetooth device, a Bluetooth device that has experienced an abnormal Bluetooth disconnection within a predetermined time range before the moment of initiating the Bluetooth connection is selected from the candidate Bluetooth devices. The Bluetooth device that has experienced an abnormal Bluetooth disconnection is a Bluetooth device that is not disconnected by the user actively (for example, an abnormal Bluetooth disconnection occurs when the Bluetooth device is disconnected due to power failure). The Bluetooth device that has experienced an abnormal Bluetooth disconnection within the predetermined time range has a high probability of requesting to reconnect. The Bluetooth device that has experienced an abnormal Bluetooth disconnection within the predetermined time range is added to the predetermined device list as a connection marked device, and some Bluetooth devices that have a high probability of requesting to reconnect can be added to the predetermined device list.

[0069] In one embodiment, selecting a connection marked device from candidate Bluetooth devices that have established a Bluetooth connection with the current device includes: selecting a Bluetooth device that matches the current scene from the candidate Bluetooth devices; and determining the Bluetooth device that matches the current scene as the connection marked device.

[0070] The current scene is the scene that the main device is currently in, for example, a scene of watching a live program, a scene of playing games, etc. A Bluetooth device matching the current scene is selected from the candidate Bluetooth devices. The Bluetooth device matching the current scene is the Bluetooth device that the main device often uses in the current scene. The Bluetooth device matching the current scene is determined as a connection mark device and added to the list of predetermined devices. Some Bluetooth devices that are likely to request a return connection can also be added to the list of predetermined devices.

[0071] In one embodiment, selecting a connection marked device from candidate Bluetooth devices that have established a Bluetooth connection with the current device includes: selecting a Bluetooth device that matches the current scene and a Bluetooth device that has experienced an abnormal Bluetooth disconnection within a predetermined time range from the candidate Bluetooth devices; and determining the Bluetooth device that matches the current scene and the Bluetooth device that has experienced an abnormal Bluetooth disconnection within the predetermined time range as the connection marked device.

[0072] In one embodiment, see Figure 3 Before initiating a Bluetooth connection for the first Bluetooth device, the method may further include: step S310, obtaining a multi-device connection status monitoring module, wherein the multi-device connection status monitoring module includes the multi-device connection status monitoring service; step S320, installing the multi-device connection status monitoring module in the Bluetooth module.

[0073] The main device can actively obtain or passively receive the multi-device connection status monitoring module sent by the server. The multi-device connection status monitoring module includes a multi-device connection status monitoring service. The multi-device connection status monitoring module is installed in the Bluetooth module of the main device. Then, the Bluetooth module can introduce the multi-device connection status monitoring service to implement the solution of the embodiment of the present application.

[0074] Furthermore, in some embodiments, before initiating a Bluetooth connection for the first Bluetooth device, a multi-device connection status monitoring module may be manually introduced into the Bluetooth module by a user.

[0075] In order to better implement the Bluetooth connection method provided in the embodiment of the present application, the embodiment of the present application also provides a Bluetooth connection device based on the above Bluetooth connection method. The meanings of the terms are the same as those in the above Bluetooth connection method, and the specific implementation details can refer to the description in the method embodiment. Figure 4 A block diagram of a Bluetooth connection device according to an embodiment of the present application is shown.

[0076] like Figure 4 As shown, the Bluetooth connection device 400 may include: a connection initiating unit 410 that can be used to initiate a Bluetooth connection for a first Bluetooth device; a state modifying unit 420 that can be used to modify the first Bluetooth device from the binding state to the suspended connection state in the device state machine if, during the process of establishing a Bluetooth connection with the first Bluetooth device, it is monitored through a multi-device connection state monitoring service that the second Bluetooth device requesting a return connection meets a predetermined connection condition and the first Bluetooth device is in a binding state; a state recovering unit 430 that can be used to modify the first Bluetooth device from the suspended connection state to the binding state in the device state machine if it is monitored that the Bluetooth connection with the second Bluetooth device is completed, so as to continue to establish a Bluetooth connection with the first Bluetooth device.

[0077] In some embodiments of the present application, before initiating a Bluetooth connection for the first Bluetooth device, the apparatus further includes an installation unit for: obtaining a multi-device connection status monitoring module, wherein the multi-device connection status monitoring module includes the multi-device connection status monitoring service; and installing the multi-device connection status monitoring module in the Bluetooth module.

[0078] In some embodiments of the present application, the predetermined connection condition is being in a bound state; the state modification unit is used to: if a second Bluetooth device requesting a reconnection is detected through a multi-device connection status monitoring service and the first Bluetooth device is in a binding state, then determine the connection state of the second Bluetooth device; if the connection state of the second Bluetooth device is a bound state, then modify the first Bluetooth device from the binding state to a suspended connection state in the device state machine.

[0079] In some embodiments of the present application, the predetermined connection condition is being in a predetermined device list; the state modification unit is used to: if it is detected through a multi-device connection status monitoring service that the second Bluetooth device requesting a reconnection is in the predetermined device list, then determine whether the first Bluetooth device is in a binding state; if so, then modify the first Bluetooth device from the binding state to a suspended connection state in the device state machine.

[0080] In some embodiments of the present application, after initiating a Bluetooth connection for the first Bluetooth device, the apparatus further includes a device adding unit, which is used to: select a connection marked device from candidate Bluetooth devices that have established a Bluetooth connection with this device; and add the connection marked device to the predetermined device list corresponding to the multi-device connection status monitoring service.

[0081] In some embodiments of the present application, the device adding unit is used to: select a Bluetooth device that has an abnormal Bluetooth disconnection within a predetermined time range from the candidate Bluetooth devices; and determine the Bluetooth device that has an abnormal Bluetooth disconnection within the predetermined time range as the connection marking device.

[0082] In some embodiments of the present application, the device adding unit is used to: select a Bluetooth device that matches the current scene from the candidate Bluetooth devices; and determine the Bluetooth device that matches the current scene as the connection mark device.

[0083] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0084] In addition, the present application also provides an electronic device, such as Figure 5 As shown, Figure 5 A block diagram of an electronic device according to an embodiment of the present application is shown, specifically:

[0085] The electronic device may include components such as a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will appreciate that Figure 5 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0086] in:

[0087] The processor 501 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 502 and calling data stored in the memory 502, it executes various functions of the computer device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user pages and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 501.

[0088] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein 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.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 502 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, or other volatile solid-state storage devices. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.

[0089] The electronic device also includes a power supply 503 for supplying power to each component. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 503 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0090] The electronic device may further include an input unit 504, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0091] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 501 in the electronic device will load the executable files corresponding to the processes of one or more computer programs into the memory 502 according to the following instructions, and the processor 501 will run the computer program stored in the memory 502, thereby realizing various functions in the aforementioned embodiments of the present application, such as the processor 501 may perform the following steps:

[0092] A Bluetooth connection is initiated for a first Bluetooth device; if in the process of establishing a Bluetooth connection with the first Bluetooth device, it is monitored through a multi-device connection status monitoring service that the second Bluetooth device requesting a return connection meets a predetermined connection condition and the first Bluetooth device is in a binding state, then the first Bluetooth device is modified from the binding state to a suspended connection state in the device state machine; if it is monitored that the Bluetooth connection with the second Bluetooth device is completed, then the first Bluetooth device is modified from the suspended connection state to the binding state in the device state machine to continue to establish a Bluetooth connection with the first Bluetooth device.

[0093] In some embodiments of the present application, before initiating a Bluetooth connection for the first Bluetooth device, the method also includes: obtaining a multi-device connection status monitoring module, the multi-device connection status monitoring module including the multi-device connection status monitoring service; and installing the multi-device connection status monitoring module in a Bluetooth module.

[0094] In some embodiments of the present application, the predetermined connection condition is being in a bound state; if the second Bluetooth device requesting a backconnection is monitored through a multi-device connection status monitoring service and meets the predetermined connection condition and the first Bluetooth device is in a binding state, then the first Bluetooth device is modified from the binding state to a suspended connection state in the device state machine, including: if the second Bluetooth device requesting a backconnection is monitored through a multi-device connection status monitoring service and the first Bluetooth device is in a binding state, then the connection state of the second Bluetooth device is determined; if the connection state of the second Bluetooth device is a bound state, then the first Bluetooth device is modified from the binding state to a suspended connection state in the device state machine.

[0095] In some embodiments of the present application, the predetermined connection condition is being in a predetermined device list; if the second Bluetooth device requesting a backconnection is monitored through a multi-device connection status monitoring service to meet the predetermined connection condition and the first Bluetooth device is in a binding state, then the first Bluetooth device is modified from the binding state to a suspended connection state in the device state machine, including: if the second Bluetooth device requesting a backconnection is monitored through a multi-device connection status monitoring service to be in the predetermined device list, determining whether the first Bluetooth device is in a binding state; if so, modifying the first Bluetooth device from the binding state to a suspended connection state in the device state machine.

[0096] In some embodiments of the present application, after initiating a Bluetooth connection for the first Bluetooth device, the method further includes: selecting a connection marked device from candidate Bluetooth devices that have established a Bluetooth connection with the current device; and adding the connection marked device to the predetermined device list corresponding to the multi-device connection status monitoring service.

[0097] In some embodiments of the present application, selecting a connection marked device from candidate Bluetooth devices that have established a Bluetooth connection with the current device includes: selecting a Bluetooth device that has experienced an abnormal Bluetooth disconnection within a predetermined time range from the candidate Bluetooth devices; and determining the Bluetooth device that has experienced an abnormal Bluetooth disconnection within the predetermined time range as the connection marked device.

[0098] In some embodiments of the present application, selecting a connection marked device from candidate Bluetooth devices that have established a Bluetooth connection with the current device includes: selecting a Bluetooth device that matches the current scene from the candidate Bluetooth devices; and determining the Bluetooth device that matches the current scene as the connection marked device.

[0099] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0100] To this end, an embodiment of the present application further provides a storage medium, in which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any method provided in the embodiment of the present application.

[0101] The storage medium may be a computer-readable storage medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0102] Since the computer program stored in the storage medium can execute the steps in any method provided in the embodiments of the present application, the beneficial effects that can be achieved by the method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0103] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0104] It should be understood that the present application is not limited to the embodiments that have been described above and shown in the accompanying drawings, but various modifications and changes may be made without departing from the scope thereof.

Claims

1. A Bluetooth connection method, characterized in that: include: Initiate a Bluetooth connection for the first Bluetooth device; If, during the process of establishing a Bluetooth connection with the first Bluetooth device, it is detected through the multi-device connection status monitoring service that the second Bluetooth device requesting a backconnection meets a predetermined connection condition and the first Bluetooth device is in a binding state, then in the device state machine, the first Bluetooth device is changed from the binding state to a suspended connection state; If it is monitored that the Bluetooth connection with the second Bluetooth device is completed, the first Bluetooth device is modified from the suspended connection state to the binding state in the device state machine to continue to establish the Bluetooth connection with the first Bluetooth device.

2. The method according to claim 1, characterized in that Before initiating a Bluetooth connection for the first Bluetooth device, the method further includes: Acquire a multi-device connection status monitoring module, wherein the multi-device connection status monitoring module includes the multi-device connection status monitoring service; The multi-device connection status monitoring module is installed in the Bluetooth module.

3. The method according to claim 1, characterized in that The predetermined connection condition is being in a bound state; The method of monitoring, through the multi-device connection status monitoring service, that the second Bluetooth device requesting a reconnection meets a predetermined connection condition and the first Bluetooth device is in a binding state, then modifying the first Bluetooth device from the binding state to a suspended connection state in a device state machine includes: If a second Bluetooth device requesting a reconnection is detected through the multi-device connection status monitoring service and the first Bluetooth device is in a binding state, determining the connection state of the second Bluetooth device; If the connection state of the second Bluetooth device is a bound state, the first Bluetooth device is modified from the binding state to a suspended connection state in the device state machine.

4. The method according to claim 1, characterized in that: The predetermined connection condition is being in a predetermined device list; The method of monitoring, through the multi-device connection status monitoring service, that the second Bluetooth device requesting a reconnection meets a predetermined connection condition and the first Bluetooth device is in a binding state, then modifying the first Bluetooth device from the binding state to a suspended connection state in a device state machine includes: If it is detected through the multi-device connection status monitoring service that the second Bluetooth device requesting a backconnection is in the predetermined device list, determining whether the first Bluetooth device is in a binding state; If so, the first Bluetooth device is modified from the binding state to the suspended connection state in the device state machine.

5. The method according to claim 4, characterized in that After initiating a Bluetooth connection for the first Bluetooth device, the method further includes: Select a connection marked device from the candidate Bluetooth devices that have established Bluetooth connection with the device; Add the connection marked device to the predetermined device list corresponding to the multi-device connection status monitoring service.

6. The method according to claim 5, characterized in that The step of selecting a connection marked device from candidate Bluetooth devices that have established a Bluetooth connection with the current device includes: Selecting a Bluetooth device that has abnormal Bluetooth disconnection within a predetermined time range from the candidate Bluetooth devices; The Bluetooth device that has abnormal Bluetooth disconnection within the predetermined time range is determined as the connection mark device.

7. The method according to claim 5, characterized in that The step of selecting a connection marked device from candidate Bluetooth devices that have established a Bluetooth connection with the current device includes: Selecting a Bluetooth device matching the current scenario from the candidate Bluetooth devices; The Bluetooth device that matches the current scene is determined as the connection mark device.

8. A Bluetooth connection device, characterized in that: include: A connection initiating unit, configured to initiate a Bluetooth connection to a first Bluetooth device; a state modifying unit, configured to modify the first Bluetooth device from the binding state to the suspended connection state in the device state machine if, during the process of establishing the Bluetooth connection with the first Bluetooth device, it is detected through the multi-device connection state monitoring service that the second Bluetooth device requesting a backconnection meets a predetermined connection condition and the first Bluetooth device is in a binding state; The state recovery unit is used to modify the first Bluetooth device from the suspended connection state to the binding state in the device state machine if it is monitored that the Bluetooth connection with the second Bluetooth device is completed, so as to continue to establish the Bluetooth connection with the first Bluetooth device.

9. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: a memory storing a computer program; A processor reads a computer program stored in a memory to execute the method according to any one of claims 1 to 7.