Connection control method and apparatus, electronic device, and storage medium
By sending broadcasts carrying indication information and pausing broadcasts when the Bluetooth device is in target status, the problem of automatic connection errors by Bluetooth devices is solved, improving connection accuracy and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2023-05-16
- Publication Date
- 2026-07-31
AI Technical Summary
Bluetooth devices may automatically connect to devices that are not actually intended for connection by the user under certain conditions, leading to connection errors.
When in target state, a Bluetooth device sends a broadcast carrying specific information to instruct the receiving device not to automatically initiate a connection request, and to pause sending broadcast information when appropriate to avoid automatic connection.
It reduces Bluetooth device connection errors, improving connection accuracy and user experience.
Smart Images

Figure CN116528202B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, specifically to a connection control method, device, electronic device, and storage medium. Background Technology
[0002] With the rapid development of communication technology, Bluetooth, as a short-range, efficient transmission method, has gained increasing popularity among products, and most electronic products on the market now possess Bluetooth communication capabilities. To meet users' needs for Bluetooth communication in different situations, its related functions are becoming increasingly rich. In related technologies, to provide a more convenient and efficient Bluetooth connection experience, when other electronic devices are present in the vicinity of the Bluetooth device, the electronic devices will actively initiate a Bluetooth connection. However, in some situations, the electronic device that actively initiates the Bluetooth connection may not be the device the user actually wants to connect to, leading to connection errors. Summary of the Invention
[0003] This application discloses a connection control method, apparatus, electronic device, and storage medium, which can reduce the occurrence of incorrect Bluetooth device connections and improve the accuracy of establishing Bluetooth connections.
[0004] This application discloses a connection control method applied to a Bluetooth device, the method comprising:
[0005] When the Bluetooth device is in the target state, a first broadcast message is sent, the first broadcast message carrying first information; the target state refers to the state in which the Bluetooth device is preparing or establishing a Bluetooth connection with the first electronic device; the first information is used to instruct the second electronic device that receives the first broadcast message not to automatically send a Bluetooth connection request to the Bluetooth device.
[0006] This application discloses a connection control method applied to a Bluetooth device, the method comprising:
[0007] When the Bluetooth device is in target state, the transmission of the second broadcast message is paused;
[0008] The target state refers to the state in which the Bluetooth device is preparing or establishing a Bluetooth connection with the first electronic device; the second broadcast information is used to trigger the second electronic device that receives the second broadcast information to automatically send a Bluetooth connection request to the Bluetooth device when the target conditions are met.
[0009] This application discloses a connection control device applied to a Bluetooth device, the device comprising:
[0010] The sending module is configured to send a first broadcast message when the Bluetooth device is in a target state, the first broadcast message carrying first information; the target state refers to the state in which the Bluetooth device is preparing or establishing a Bluetooth connection with a first electronic device; the first information is used to instruct a second electronic device that receives the first broadcast message not to automatically send a Bluetooth connection request to the Bluetooth device.
[0011] This application discloses a connection control device applied to a Bluetooth device, the device comprising:
[0012] The transmitting module is configured to pause transmitting the second broadcast information when the Bluetooth device is in the target state;
[0013] The target state refers to the state in which the Bluetooth device is preparing or establishing a Bluetooth connection with the first electronic device; the second broadcast information is used to trigger the second electronic device that receives the second broadcast information to automatically send a Bluetooth connection request to the Bluetooth device when the target conditions are met.
[0014] This application discloses an electronic device, including a memory, a processor, and a communication module. The memory stores a computer program, and when the computer program is executed by the processor, the electronic device performs the method described in any of the above embodiments.
[0015] This application discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor in an electronic device, causes the electronic device to perform the method described in any of the above embodiments.
[0016] The connection control method, apparatus, electronic device, and storage medium disclosed in this application transmit a first broadcast message when the Bluetooth device is in a target state. The target state refers to the state in which the Bluetooth device is preparing or establishing a Bluetooth connection with the first electronic device. The first broadcast message carries first information, which can be used to instruct the second electronic device that receives the first broadcast message not to automatically send a Bluetooth connection request to the Bluetooth device. This can avoid the situation where the Bluetooth device is preparing or establishing a Bluetooth connection with the first electronic device but incorrectly establishes a Bluetooth connection with the second electronic device, thereby reducing the occurrence of incorrect Bluetooth device connections and improving the accuracy of establishing Bluetooth connections. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1A This is a schematic diagram of a scenario for a connection control method in one embodiment;
[0019] Figure 1B This is a schematic diagram of a scenario for a connection control method in another embodiment;
[0020] Figure 2 Here is a flowchart of a connection control method in one embodiment;
[0021] Figure 3A This is an interactive schematic diagram of the connection control method in one embodiment;
[0022] Figure 3B This is an interactive schematic diagram of the connection control method in another embodiment;
[0023] Figure 4 This is an interactive schematic diagram of the connection control method in another embodiment;
[0024] Figure 5 Here is a flowchart of the connection control method in another embodiment;
[0025] Figure 6A This is an interactive schematic diagram of the connection control method in another embodiment;
[0026] Figure 6B This is an interactive schematic diagram of the connection control method in another embodiment;
[0027] Figure 7 Here is a flowchart of the connection control method in another embodiment;
[0028] Figure 8 Here is a flowchart of the connection control method in another embodiment;
[0029] Figure 9 This is a block diagram of the connection control device in one embodiment;
[0030] Figure 10 This is a block diagram of the connection control device in another embodiment;
[0031] Figure 11 This is a block diagram of the connection control device in another embodiment;
[0032] Figure 12 This is a structural block diagram of an electronic device in one embodiment. Detailed Implementation
[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0034] It should be noted that the terms "comprising" and "having," and any variations thereof, in the embodiments and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0035] It is understood that the terms "first," "second," etc., used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of this application, a second broadcast message may be referred to as a first broadcast message, and similarly, a first broadcast message may be referred to as a second broadcast message. Both the second broadcast message and the first broadcast message are broadcast messages, but they are not the same broadcast message. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the schemes, or any combination of multiple schemes.
[0036] In related technologies, when electronic devices with the same account exist on the Bluetooth device, the electronic device automatically sends a Bluetooth connection request to the Bluetooth device. Upon receiving the Bluetooth connection request, the Bluetooth device establishes a Bluetooth connection with the electronic device, thus enabling automatic connection between the electronic device and the Bluetooth device. However, in some scenarios, the electronic device that automatically initiates the Bluetooth connection may not be the device the user actually wants to connect to. Connecting the Bluetooth device to this automatically initiated electronic device can cause inconvenience for the user.
[0037] For example, in scenarios where a Bluetooth device is in a reconnection state, the Bluetooth device wants to reconnect to device X. However, if another device Y with the same account is nearby, device Y will automatically send a Bluetooth connection request to the Bluetooth device. The Bluetooth device will then establish a Bluetooth connection with device Y, and device Y will automatically occupy the Bluetooth device's Bluetooth connection, causing the Bluetooth device to fail to reconnect to device X, resulting in a connection error.
[0038] In this application embodiment, a connection control method, apparatus, electronic device, and storage medium are provided, which can reduce the occurrence of incorrect Bluetooth device connections and improve the accuracy of establishing Bluetooth connections.
[0039] Figure 1A This is a schematic diagram illustrating a scenario of a connection control method in one embodiment. For example... Figure 1A As shown, when Bluetooth device 110 is in the target state, which refers to the state in which Bluetooth device 110 is preparing or establishing a Bluetooth connection with the first electronic device 120, the second electronic device 130 around Bluetooth device 110 does not automatically send a Bluetooth connection request to Bluetooth device 110.
[0040] In some embodiments, the Bluetooth device 110 may include, but is not limited to, electronic devices that support Bluetooth communication functions, such as in-vehicle terminals, wearable devices, speaker devices, Bluetooth headsets, and smart home devices. Further, the Bluetooth device 110 may be TWS (True Wireless Stereo) earphones, etc.
[0041] In some embodiments, the first electronic device 120 and the second electronic device 130 may include, but are not limited to, mobile phones, wearable devices, vehicle terminals, tablet computers, PCs (Personal Computers), PDAs (Personal Digital Assistants), and other devices.
[0042] In related technologies, Bluetooth devices send BLE (Bluetooth Low Energy) broadcast messages. These broadcast messages carry Bluetooth-related information, including but not limited to the Bluetooth device's account information, whether the Bluetooth device supports multi-connection functionality, the type of service the Bluetooth device is currently handling, and the priority information of devices establishing Bluetooth connections with the Bluetooth device. When electronic devices logged into the same account near the Bluetooth device receive this BLE broadcast message, if they detect that their own service priority is higher than the priority information carried in the BLE broadcast message, they will automatically send a Bluetooth connection request to the Bluetooth device, thus achieving automatic connection. However, in some connection scenarios, the electronic device automatically sending the Bluetooth connection request may not be the device the Bluetooth device actually wants to connect to, thus easily leading to connection errors.
[0043] In this embodiment, when the Bluetooth device 110 is in a target state, the Bluetooth device 110 can send a first broadcast message. This first broadcast message may carry first information, which can be used to instruct the second electronic device 130, upon receiving the first broadcast message, not to automatically send a Bluetooth connection request to the Bluetooth device 110. After receiving the first broadcast message from the Bluetooth device 110, the second electronic device 130 can determine, based on the first information carried in the first broadcast message, that the target condition for automatically initiating a Bluetooth connection is not met, and therefore will not automatically send a Bluetooth connection request to the Bluetooth device 110.
[0044] In some embodiments, when Bluetooth device 110 is in a target state, Bluetooth device 110 may pause sending the second broadcast message. This second broadcast message is used to trigger the second electronic device 130, which receives the second broadcast message, to automatically send a Bluetooth connection request to Bluetooth device 130 when the target conditions are met. That is, when Bluetooth device 110 is in a target state, the second electronic device 130 will not receive the second broadcast message sent by Bluetooth device 110, and therefore will not automatically send a Bluetooth connection request to Bluetooth device 110. Optionally, pausing the sending of the second broadcast message by Bluetooth device 110 may include pausing the sending of the second broadcast message without sending the first broadcast message; or it may include pausing the sending of the second broadcast message but sending the first broadcast message.
[0045] Since the second electronic device 130 does not automatically send a Bluetooth connection request to the Bluetooth device 110, it will not mistakenly establish a Bluetooth connection with the second electronic device 130 when the Bluetooth device 110 is in the target state.
[0046] In some embodiments, Bluetooth device 110 may be a Bluetooth device that supports the "one-to-many" function of Bluetooth, that is, Bluetooth device 110 can establish and maintain Bluetooth connections with multiple electronic devices at the same time. For example, if Bluetooth device 110 supports "one-to-two", then Bluetooth device 110 can establish and maintain Bluetooth connections with two electronic devices at the same time; if Bluetooth device supports "one-to-three", then Bluetooth device 110 can establish and maintain Bluetooth connections with three electronic devices at the same time, etc., but not limited to these.
[0047] In related technologies, after a Bluetooth device supporting the "one-to-many" function establishes a Bluetooth connection with electronic device A, the BLE broadcast message sent will carry the account information bound to electronic device A. When other electronic devices around the Bluetooth device that are logged into the same account receive this BLE broadcast message, if they detect that their own service priority is higher than the priority information carried in the BLE broadcast message, they will automatically send a Bluetooth connection request to the Bluetooth device, thereby enabling automatic switching between multiple electronic devices under the same account. However, when a Bluetooth device supporting the "one-to-many" function establishes a Bluetooth connection with one electronic device, in order to provide a faster switching experience, any remaining unused connections will be considered as being connected to an idle device with a lower priority, such as an idle device with its screen off (when in fact it is not connected). BLE broadcast messages carry information such as the service type being idle and the priority being low. When other electronic devices logged into the same account around the Bluetooth device receive this BLE broadcast message and detect that their own priority is higher (e.g., they are in an idle state and have their screens on), they will automatically send a Bluetooth connection request to the Bluetooth device and automatically occupy the Bluetooth device's idle connection. This way, the Bluetooth device can be used quickly when the other electronic device has a service available.
[0048] In certain scenarios, such as when a Bluetooth device supporting "one-to-two" connectivity is in reconnection mode, the Bluetooth device will attempt to reconnect to two electronic devices (let's say device A and device B). After successfully establishing a Bluetooth connection with device A, during the reconnection process to device B (which may take longer due to environmental interference), the Bluetooth device may consider the connection link attempting to reconnect to device B to be idle and have a low service priority. Therefore, the BLE broadcast information will be updated accordingly. When device C, which is logged into the same account information nearby, receives this BLE broadcast information, device C's service priority may be the same as device A's (higher than the priority information carried in the BLE broadcast information). In this case, device C will automatically initiate a connection to the Bluetooth device, potentially causing device A or device B to be interrupted, as device C occupies the Bluetooth connection between the Bluetooth device and either device A or device B. For example, when device C sends a Bluetooth connection request to attempt to connect to a Bluetooth device, and the Bluetooth device has already successfully reconnected with device B, since a Bluetooth device can only maintain a Bluetooth connection with two devices simultaneously, when the Bluetooth device receives the Bluetooth connection request from device C, because device A connected before device B, and both devices A and B are idle and their screens are off, it will consider device A to have lower priority. Therefore, it will disconnect its Bluetooth connection with device A and connect to device C, resulting in device C causing device A to be interrupted. However, in this reconnection scenario, the user actually wants the Bluetooth device to connect to both devices A and B, which will cause inconvenience for the user.
[0049] Figure 1B This is a schematic diagram illustrating a scenario of the connection control method in another embodiment. For example... Figure 1B As shown, when Bluetooth device 110 is in the target state, Bluetooth device 110 is preparing or in the process of establishing a Bluetooth connection with one or more electronic devices. For example, Bluetooth device 110 is preparing or in the process of establishing a Bluetooth connection with first electronic device 120 and third electronic device 140, or Bluetooth device 110 has established and maintained a Bluetooth connection with third electronic device 140, and is preparing or in the process of establishing a Bluetooth connection with first electronic device 120, etc. In this target state, Bluetooth device 110 may send a first broadcast message. Second electronic device 130, upon receiving the first broadcast message, will not automatically send a Bluetooth connection request to Bluetooth device 110, or Bluetooth device 110 will not send a broadcast message, thus preventing second electronic device 130 from automatically sending a Bluetooth connection request to Bluetooth device 110. This avoids the situation where second electronic device 130 interrupts the connection between first electronic device 120 or third electronic device 140 and Bluetooth device 110.
[0050] It should be noted that the Bluetooth connection involved in the embodiments of this application may include, but is not limited to, classic Bluetooth connection, BLE (Bluetooth Low Energy) connection, BLE Audio (Bluetooth Low Power Audio) connection, etc., but may vary with the development of the Bluetooth protocol.
[0051] like Figure 2 As shown, in one embodiment, a connection control method is provided, which can be applied to the Bluetooth device described above. The method may include the following steps:
[0052] Step 210: When the Bluetooth device is in the target state, send a first broadcast message. The first broadcast message carries first information, which is used to instruct the second electronic device that receives the first broadcast message not to automatically send a Bluetooth connection request to the Bluetooth device.
[0053] The target state refers to the state in which the Bluetooth device is preparing to establish a Bluetooth connection with the first electronic device. Specifically, "preparing to establish a Bluetooth connection" can include the process of the Bluetooth device searching for Bluetooth connection requests sent by the first electronic device, or the process of the Bluetooth device obtaining device information (such as device identifier, Bluetooth address, device name, etc.) of the first electronic device but not yet sending a Bluetooth connection request to the first electronic device. "Establishing a Bluetooth connection" can include the Bluetooth device sending a Bluetooth connection request to the first electronic device, or the Bluetooth device receiving a Bluetooth connection request from the first electronic device but not yet completing the establishment of a Bluetooth connection with the first electronic device.
[0054] In some embodiments, the establishment of a Bluetooth connection between the Bluetooth device and the first electronic device can refer to the establishment of a communication link between the Bluetooth device and the first electronic device, such as an ACL (Asynchronous Connectionless) link or an SCO (Synchronous Connection Oriented) link. Optionally, the establishment of a Bluetooth connection between the Bluetooth device and the first electronic device can also refer to the establishment of a Bluetooth transmission channel between the Bluetooth device and the first electronic device. The Bluetooth transmission channel can be used for data transmission, such as an audio transmission channel established based on the A2DP (Advanced Audio Distribution Profile) protocol, an audio transmission channel established based on the HFP (Hands-free Profile) protocol, or a CSI (Connected Isochronous Streams) transmission channel.
[0055] When a Bluetooth device is in target state, if a second electronic device automatically initiates a connection to the Bluetooth device, connection errors may occur, or it may mistakenly preempt the Bluetooth connection of other electronic devices. In some embodiments, target state may include reconnection state or pairing state.
[0056] Reconnection mode refers to the state where a Bluetooth device automatically reconnects to an electronic device with which it previously established a Bluetooth connection. The first electronic device can be the one waiting to reconnect. In reconnection mode, the electronic device that the user wants the Bluetooth device to connect to is usually the one waiting to reconnect. If other electronic devices (such as a second electronic device) preempt the Bluetooth connection of the device waiting to reconnect, a connection error will occur.
[0057] In one specific implementation, the Bluetooth device can store device information of each electronic device establishing a Bluetooth connection, such as device identifier, Bluetooth address, and device name. When the Bluetooth device triggers the reconnection state, it can obtain the device information of the electronic device to be reconnected to and send a Bluetooth reconnection request to the electronic device to be reconnected to based on this device information. After receiving the Bluetooth reconnection request, the electronic device to be reconnected to can send a response message back to the Bluetooth device. Upon receiving the response message, the Bluetooth device has successfully established a Bluetooth connection with the electronic device to be reconnected to. Optionally, the Bluetooth device can determine the electronic device to be reconnected to based on the number of idle connections when triggering the reconnection state. The number of idle connections refers to the number of connections that the Bluetooth device can still establish. For example, if the maximum number of Bluetooth connections that the Bluetooth device supports is 2, and there are no connected electronic devices when triggering the reconnection state, then the number of idle connections can be 2; if one electronic device is already connected when triggering the reconnection state, then the number of idle connections can be 1, and so on.
[0058] Optionally, the electronic device to be reconnected can be the electronic device that was closest to the time when it disconnected from the Bluetooth device, the electronic device that was closest to the time when it established a Bluetooth connection with the Bluetooth device, or the electronic device with the highest priority, etc., and the electronic device to be reconnected is not currently connected to the Bluetooth device. This application embodiment does not limit this.
[0059] In some embodiments, the Bluetooth device may respond to a first trigger operation to trigger entry into a reconnection state. This first trigger operation can be configured according to actual needs. For example, the Bluetooth device may include Bluetooth wireless headphones, and the first trigger operation may include opening the headphone case, removing the Bluetooth wireless headphones from the headphone case, etc.; or, for example, the Bluetooth device may include a smartwatch, and the first trigger operation may include powering on the smartwatch, etc., without limitation.
[0060] When a Bluetooth device is in pairing mode, it means that the device is simultaneously in both inquiry scan and page scan modes. In inquiry scan mode, the device is allowed to be discovered by other devices. In other words, when in pairing mode, the Bluetooth device is simultaneously discoverable and connectable. The first electronic device is the one the user wants to pair with. In pairing mode, the device the user wants to connect to is usually a new electronic device (one that hasn't been paired with the first device before). If another electronic device (such as a second device) preempts the Bluetooth connection of the device the user wants to pair with, a connection error will occur.
[0061] In one specific implementation, when a Bluetooth device is in inquiry scan mode, it can periodically listen for query commands sent by other devices. A first electronic device can enable inquiry mode, in which it can periodically send inquiry commands to query for nearby Bluetooth devices. In inquiry scan mode, the Bluetooth device can scan for the query commands sent by the first electronic device and return a query response. The first electronic device can determine the Bluetooth device's device information based on the query response and, according to that information, send a Bluetooth connection request to establish a Bluetooth connection. For details, please refer to the relevant provisions of the Bluetooth protocol.
[0062] In some embodiments, the Bluetooth device may be a device that supports Bluetooth "one-to-many" functionality, meaning that the Bluetooth device can maintain multiple Bluetooth connections simultaneously. When the Bluetooth device is in pairing mode, it establishes multiple Bluetooth connections and disconnects any one of the multiple Bluetooth connections. Specifically, for a Bluetooth device that supports Bluetooth "one-to-many" functionality, the target state may include the Bluetooth device being in pairing mode, and the number of Bluetooth connections established by the Bluetooth device being N-1, where N is the maximum number of Bluetooth connections that the Bluetooth device can maintain simultaneously, and N is an integer greater than 1.
[0063] When a Bluetooth device establishes multiple Bluetooth connections, and then enters pairing mode and disconnects any of the multiple Bluetooth connections, it indicates that the user most likely wants the Bluetooth device to establish a Bluetooth connection with a new electronic device (referring to an electronic device that has not been paired before, such as the first electronic device mentioned above). If another electronic device (such as the second electronic device) preempts the Bluetooth connection of this new electronic device, a connection error will occur. Optionally, if the Bluetooth device supports Bluetooth "one-to-many" functionality, and the number of idle connections is greater than or equal to 2 when the Bluetooth device enters pairing mode, connection errors are highly unlikely to occur. Therefore, it can be determined that the target state has not been entered. By further refining the classification of when a Bluetooth device enters pairing mode, the Bluetooth device can send broadcast information more accurately, further improving connection accuracy.
[0064] When the Bluetooth device is in target mode, it can send a first broadcast message, which may carry first information. Upon receiving the first broadcast message from the Bluetooth device, the second electronic device can determine, based on this first information, that the target conditions are not met and will not automatically send a Bluetooth connection request to the Bluetooth device. Here, the target conditions may refer to the conditions under which the second electronic device automatically initiates a Bluetooth connection.
[0065] The second electronic device automatically sending a Bluetooth connection request to the Bluetooth device refers to the second electronic device actively initiating a Bluetooth connection, which is not triggered by user operations (such as the user triggering the connection button on the second electronic device). If the user triggers the second electronic device to send a Bluetooth connection request, it does not constitute the second electronic device actively initiating a Bluetooth connection.
[0066] In some embodiments, when the Bluetooth device is in a target state, the Bluetooth device may pause sending the second broadcast message. This second broadcast message can be used to trigger a second electronic device that receives the second broadcast message to automatically send a Bluetooth connection request to the Bluetooth device if the target conditions are met. After receiving the second broadcast message, the second electronic device can determine whether the target conditions are met based on the second broadcast message. If the target conditions are met, it will automatically send a Bluetooth connection request to the Bluetooth device.
[0067] Optionally, the Bluetooth device may pause sending the second broadcast message. This may include the Bluetooth device not sending the second broadcast message or the first broadcast message. That is, when the Bluetooth device is in the target state, it does not send broadcast messages. If the second electronic device does not receive the broadcast message sent by the Bluetooth device that could trigger an automatic connection, it will not automatically send a Bluetooth connection request to the Bluetooth device, thereby reducing the possibility of incorrect connections.
[0068] Optionally, the Bluetooth device may pause sending the second broadcast message. This may include: the Bluetooth device modifying or configuring the information carried in the broadcast message to obtain the first broadcast message, and then sending the first broadcast message. Upon receiving the first broadcast message, the second electronic device determines, based on the first information carried in the first broadcast message, that the target conditions are not met, and therefore will not automatically send a Bluetooth connection request to the Bluetooth device. By modifying or configuring the information carried in the broadcast message to output a first broadcast message that will not trigger automatic connection initiation, the possibility of erroneous connections can be reduced while retaining the original broadcast logic of the Bluetooth device. This method is simple and quick to implement.
[0069] For example, Figure 3A This is an interactive schematic diagram of a connection control method in one embodiment. For example... Figure 3A As shown, when a Bluetooth device triggers the reconnection state, it sends a first broadcast message. The Bluetooth device sends a reconnection request to a first electronic device, which can respond to the request and establish a Bluetooth connection. Upon receiving the first broadcast message, a second electronic device determines, based on the first information carried in the broadcast message, that the target conditions are not met and does not automatically send a Bluetooth connection request to the Bluetooth device. This avoids the possibility of incorrectly establishing a Bluetooth connection with the second electronic device during the reconnection process of the Bluetooth device to the first electronic device.
[0070] For example, Figure 3B This is an interactive schematic diagram of the connection control method in another embodiment. For example... Figure 3B As shown, when a Bluetooth device triggers pairing mode and disconnects from the third electronic device, the Bluetooth device can send a first broadcast message. The first electronic device can scan for and find Bluetooth devices, obtain their device information, and display it. The user can perform a connection operation based on this device information (e.g., clicking the connect button). In response to this connection operation, the first electronic device can send a Bluetooth connection request to the Bluetooth device to establish a Bluetooth connection, and pairing occurs during the connection establishment process. The second and third electronic devices, upon receiving the first broadcast message, determine that the target conditions are not met based on the first information carried in the first broadcast message and will not automatically send a Bluetooth connection request to the Bluetooth device. This avoids incorrectly establishing Bluetooth connections with the second or third electronic device while the Bluetooth device is connecting to the first electronic device that has not been paired before.
[0071] It should be noted that both the first and second broadcast messages mentioned above can be BLE broadcast messages.
[0072] In this embodiment, it is possible to avoid the situation where a Bluetooth device is preparing or establishing a Bluetooth connection with a first electronic device but fails to establish a Bluetooth connection with a second electronic device, thereby reducing the occurrence of incorrect Bluetooth device connections and improving the accuracy of establishing Bluetooth connections.
[0073] In some embodiments, the broadcast information sent by the Bluetooth device may carry information such as status identifier, service priority, and account information, but is not limited thereto. The status identifier can be used to indicate whether the Bluetooth device supports the multi-connection function, the service priority can be used to indicate the service priority currently being processed by the Bluetooth device or the service priority of the electronic device currently connected to the Bluetooth device, and the account information can be used to indicate the account information bound to the Bluetooth device or the account information bound to the electronic device currently connected to the Bluetooth device.
[0074] In some embodiments, the target condition may include one or more of the following:
[0075] Condition 1: The second electronic device is determined to be a Bluetooth device that supports multi-connection functionality; where multi-connection functionality refers to the Bluetooth device's ability to establish multiple Bluetooth connections, i.e., the Bluetooth device supports "one-to-many" functionality.
[0076] Condition 2: The service priority of the second electronic device itself is higher than the service priority carried in the received broadcast information;
[0077] Condition 3: The account information of the second electronic device is the same as the account information carried in the broadcast information.
[0078] When the Bluetooth device is in target state, it can send a first broadcast message, which can carry first information, indicating that the second electronic device receiving the first broadcast message determines that the target conditions are not met.
[0079] As one implementation, the target condition may include the aforementioned condition one, and the first information may include a first status identifier, which indicates that the Bluetooth device does not support the multi-connection function. In related technologies, when the Bluetooth device supports Bluetooth "one-to-many" functionality, the sent BLE broadcast information will carry a second status identifier indicating that the Bluetooth device supports the multi-connection function. In this embodiment, the status identifier carried in the broadcast information can be configured as the first status identifier to obtain and send the first broadcast information. After receiving the first broadcast information, the second electronic device can determine that the Bluetooth device does not support the multi-connection function based on the first status identifier carried in the first broadcast information, i.e., the target condition is not met, and will not automatically send a Bluetooth connection request to the Bluetooth device.
[0080] As another implementation, the target condition may include condition two mentioned above, where the first information includes a first service priority, which is greater than or equal to the service priority corresponding to the second electronic device. Optionally, the first service priority may be a preset value, such as the highest service priority. In related technologies, the service priority carried in the BLE broadcast information sent by the Bluetooth device is usually the lowest service priority among all connections of the Bluetooth device. In this embodiment, the service priority carried in the broadcast information can be configured as the first service priority to obtain the first broadcast information and send it. After receiving the first broadcast information, the second electronic device can determine, based on the first service priority carried in the first broadcast information, that the service priority corresponding to the second electronic device is not higher than the first service priority, i.e., the target condition is not met, and it will not automatically send a Bluetooth connection request to the Bluetooth device.
[0081] For example, Figure 4 This is an interactive schematic diagram of the connection control method in another embodiment. For example... Figure 4 As shown, the Bluetooth device can be a Bluetooth headset. The Bluetooth headset supports Bluetooth "one-to-two" functionality, and the target state can be reconnected. When the Bluetooth device is in reconnected state, it reconnects to both device A and device B. The Bluetooth headset's charging case detects an opening operation, triggering the Bluetooth headset to enter reconnected state. The Bluetooth headset disables the multi-connection status bit in its broadcast, updates the BLE broadcast content (i.e., configures the status identifier carried in the BLE broadcast as the first status identifier), and sends a BLE broadcast. Electronic devices receiving this BLE broadcast (such as device B and device C) determine whether they belong to the same account as the Bluetooth headset, whether the Bluetooth headset supports multi-connection functionality, and whether their own service priority is higher than the service priority carried in the BLE broadcast. Because the multi-connection status bit in the BLE broadcast is disabled, electronic devices receiving this BLE broadcast determine that the Bluetooth headset does not support multi-connection functionality and do not automatically send a Bluetooth connection request to the Bluetooth headset.
[0082] When a Bluetooth headset reconnects to device A, it sends a reconnection request. Device A accepts the reconnection and can send a response message to the Bluetooth headset. The Bluetooth headset then successfully reconnects to device A and establishes a Bluetooth connection. The Bluetooth headset can update BLE broadcast content; for example, it can update the account information carried in the BLE broadcast to the account information of device A and then send the BLE broadcast again. Electronic devices receiving this BLE broadcast (such as devices B and C) determine whether they belong to the same account as the Bluetooth headset, whether the Bluetooth headset supports multi-connection functionality, and whether their own service priority is higher than the service priority carried in the BLE broadcast. Because the multi-connection status bit in the BLE broadcast is turned off, electronic devices receiving this BLE broadcast determine that the Bluetooth headset does not support multi-connection functionality and do not automatically send a Bluetooth connection request to the Bluetooth headset. When the Bluetooth headset reconnects to device B, it sends a reconnection request. Device B accepts the reconnection and can send a response message to the Bluetooth headset. The Bluetooth headset then successfully reconnects to device B and establishes a Bluetooth connection. During the process of the Bluetooth headset reconnecting to device A and device B, device C will not interrupt device A or device B, and the Bluetooth headset will not connect to device C incorrectly. Especially when device A, device B and device C have the same service priority (such as all being in a state of being on and idle), device C will not preempt the Bluetooth connection between device A or device B and the Bluetooth headset.
[0083] In this embodiment, the content carried in the broadcast information sent by the Bluetooth device can be configured so that the electronic device receiving the first broadcast information does not automatically send a Bluetooth connection request to the Bluetooth device. This reduces the chance of the Bluetooth device erroneously establishing a Bluetooth connection, improves the accuracy of establishing a Bluetooth connection, and enhances the user experience.
[0084] like Figure 5 As shown, in another embodiment, a connection control method is provided, which can be applied to the Bluetooth device described above. This method may include the following steps:
[0085] Step 510: When the Bluetooth device is in the target state, send a first broadcast message. The first broadcast message carries first information, which is used to instruct the second electronic device that receives the first broadcast message not to automatically send a Bluetooth connection request to the Bluetooth device.
[0086] Step 520: When the Bluetooth device exits the target state, a second broadcast message is sent. The second broadcast message is used to trigger the second electronic device that receives the second broadcast message to automatically send a Bluetooth connection request to the Bluetooth device when the target conditions are met.
[0087] The Bluetooth device exits the target state for one of the following reasons: the Bluetooth device successfully establishes a Bluetooth connection with the first electronic device; the Bluetooth device remains in the target state for a preset duration; or the Bluetooth device responds to a second trigger operation and exits the target state. During the preset duration of the target state, the Bluetooth device may or may not successfully establish a Bluetooth connection with the first electronic device. The second trigger operation can be configured according to actual needs. For example, the Bluetooth device may include Bluetooth wireless headphones, and the second trigger operation may include closing the headphone case, clicking a button on the headphone case, etc., but is not limited to these.
[0088] If the Bluetooth device exits the target state, the transmission of the first broadcast message can be paused, and the second broadcast message can be transmitted.
[0089] In some embodiments, the target condition may include condition one in the above embodiments. The second broadcast information may carry a second status identifier, which is used to characterize that the Bluetooth device supports multi-connection functionality. When the Bluetooth device supports Bluetooth "one-to-many" functionality, the status identifier carried in the broadcast information can be configured as the second status identifier to obtain the second broadcast information. Further, when the Bluetooth device exits the target state, the status identifier carried in the first broadcast information can be modified from the first status identifier to the second status identifier to obtain the second broadcast information, and then the second broadcast information is sent. After receiving the second broadcast information, the second electronic device can determine that the Bluetooth device supports multi-connection functionality based on the second status identifier carried in the second broadcast information.
[0090] In some embodiments, the target condition may include condition two in the above embodiments, and the second broadcast information may carry a second service priority. The second service priority can be used to reflect the priority of the devices actually connected to the Bluetooth device.
[0091] Optionally, if the number of devices currently establishing Bluetooth connections with the Bluetooth device reaches the maximum number of Bluetooth connections supported by the Bluetooth device, the second service priority can be the lowest service priority among the various electronic devices currently establishing Bluetooth connections with the Bluetooth device. For example, if the maximum number of Bluetooth connections supported by the Bluetooth device is 2, and the Bluetooth device is currently connecting to device A and device B, if the service priority of device A is higher than that of device B, then the second service priority can be the service priority of device B; if the service priority of device B is higher than that of device A, then the second service priority can be the service priority of device A.
[0092] Optionally, if the number of devices currently establishing Bluetooth connections with the Bluetooth device does not reach the maximum number of Bluetooth connections supported by the Bluetooth device, the second service priority is a preset priority, which is lower than the lowest service priority of each electronic device currently establishing Bluetooth connections with the Bluetooth device. For example, if the maximum number of Bluetooth connections supported by the Bluetooth device is 2, and the Bluetooth device is currently only establishing a Bluetooth connection with device A, then the second service priority can be a preset priority, such as a lower priority corresponding to the device being in a screen-off and idle state, and the preset priority can be lower than the service priority of device A.
[0093] In some embodiments, when the Bluetooth device exits the target state, the service priority carried in the broadcast information can be configured to a second service priority to obtain the second broadcast information. Further, when the Bluetooth device exits the target state, the service priority carried in the first broadcast information can be modified from the first service priority to the second service priority to obtain the second broadcast information and send the second broadcast information.
[0094] After receiving the second broadcast information, the second electronic device can compare the second service priority carried in the second broadcast information with its own service priority. If the second electronic device's own service priority is greater than the second service priority, it can send a Bluetooth connection request to the Bluetooth device. Furthermore, if it is determined that the Bluetooth device supports multi-connection functionality and the electronic device's own service priority is greater than the second service priority, it can send a Bluetooth connection request to the Bluetooth device.
[0095] In some embodiments, the target condition may include condition three in the above embodiments, and the second broadcast information may carry target account information. Optionally, if there is currently an electronic device that has established a Bluetooth connection with the Bluetooth device, the target account information may be the account information bound to the electronic device that has established the Bluetooth connection. For example, if the Bluetooth device is currently establishing a Bluetooth connection with a third electronic device, the target account information may be the account information bound to the third electronic device. Further, multiple electronic devices that have established a Bluetooth connection with the Bluetooth device may correspond to the same account information. When the Bluetooth device successfully establishes a Bluetooth connection with the first electronic device without establishing a Bluetooth connection with any other electronic device, the first electronic device may send the bound account information to the Bluetooth device. The Bluetooth device may store the account information and use it as the target account information to update the configuration of the sent second broadcast information.
[0096] Optionally, if the Bluetooth device is not currently connected to any electronic device via Bluetooth, the target account information can be empty, or the target account information can be the account information configured to be bound to the Bluetooth device, or the target account information can be the account information bound to the electronic device to which the Bluetooth device last established a Bluetooth connection.
[0097] After receiving the second broadcast information, the second electronic device can compare its own account information with the target account information to determine whether they match, thereby deciding whether to automatically send a Bluetooth connection request to the Bluetooth device. Furthermore, if the account information of the second electronic device is the same as the target account information, and it is determined that the Bluetooth device supports multi-connection functionality, and the electronic device's own service priority is higher than the second service priority, then it can send a Bluetooth connection request to the Bluetooth device.
[0098] Furthermore, Bluetooth devices can send a second broadcast message even when not in a target state. This second broadcast message enables rapid switching between electronic devices on the same account, meeting user needs and improving the flexibility of Bluetooth connections.
[0099] For example, Figure 6A This is an interactive schematic diagram of the connection control method in another embodiment. For example... Figure 6A As shown, the Bluetooth headset supports the Bluetooth "one-to-two" function. After the Bluetooth headset sends a reconnection request to device B, it can determine whether the reconnection is successful or the reconnection timed out. If the reconnection to device B is successful or the reconnection timed out, the multi-connection status bit in the broadcast can be enabled, and the BLE broadcast content can be updated (that is, the status identifier carried in the BLE broadcast can be configured as the second status identifier). Furthermore, the service priority carried in the BLE broadcast can be configured as the second service priority (such as the second service priority being a priority that can be used to indicate that the device is in a screen-on and idle state), and the BLE broadcast can be sent.
[0100] For example, Figure 6B This is an interactive schematic diagram of the connection control method in another embodiment. For example... Figure 6BAs shown, after the Bluetooth headset successfully reconnects to both Device A and Device B, it activates the multi-connection status bit in the broadcast, updates the BLE broadcast content, and sends it. Electronic devices receiving this BLE broadcast (such as Device C) determine whether they belong to the same account as the Bluetooth headset, whether the Bluetooth headset supports multi-connection functionality, and whether their own service priority is higher than the service priority carried in the BLE broadcast. Because the Bluetooth headset activates the multi-connection status bit in the broadcast, Device C can determine that the Bluetooth headset supports multi-connection functionality. If Device C's account information is the same as the target account information carried in the BLE broadcast (which could be the account information bound to Device A and Device B), and Device C's service priority is higher than the second service priority, it can automatically send a Bluetooth connection request to the Bluetooth headset. Since Device A and Device B have the same service priority and are both in a lit and idle state, but the Bluetooth headset establishes a Bluetooth connection with Device A first, after receiving the Bluetooth connection request sent by Device C, the Bluetooth headset can disconnect from Device A and establish a Bluetooth connection with Device C. This enables seamless switching between multiple electronic devices under the same account, meeting users' Bluetooth usage needs across different electronic devices.
[0101] In this embodiment, sending a first broadcast message when the Bluetooth device is in the target state can prevent the Bluetooth device from mistakenly establishing a Bluetooth connection with a second electronic device while it is preparing or establishing a Bluetooth connection with the first electronic device. This reduces the chance of incorrect Bluetooth connections and improves the accuracy of establishing Bluetooth connections. Sending a second broadcast message when the Bluetooth device exits the target state enables quick switching between electronic devices under the same account, meeting user needs and improving the flexibility of Bluetooth connections.
[0102] like Figure 7 As shown, in one embodiment, another connection control method is provided, which can be applied to the Bluetooth device described above. This method may include the following steps:
[0103] Step 710: When the Bluetooth device is in the target state, pause sending the second broadcast message. The second broadcast message is used to trigger the second electronic device that receives the second broadcast message to automatically send a Bluetooth connection request to the Bluetooth device if the target conditions are met. Here, the target state refers to the state in which the Bluetooth device is preparing or is establishing a Bluetooth connection with the first electronic device.
[0104] In one embodiment, the method further includes: when the Bluetooth device is in a target state, sending a first broadcast message, the first broadcast message carrying first information; the first information is used to instruct a second electronic device that receives the first broadcast message not to automatically send a Bluetooth connection request to the Bluetooth device.
[0105] In one embodiment, the first information includes a first status identifier, which indicates that the Bluetooth device does not support multi-connection functionality, where multi-connection functionality refers to the Bluetooth device's ability to establish multiple Bluetooth connections; and / or,
[0106] The first information includes a first service priority, which is greater than or equal to the service priority corresponding to the second electronic device.
[0107] In one embodiment, before sending the first broadcast information, the method further includes: configuring the status identifier carried in the broadcast information as a first status identifier, and / or configuring the service priority carried in the broadcast information as a first service priority, so as to obtain the first broadcast information.
[0108] In one embodiment, the method further includes sending a second broadcast message when the Bluetooth device exits the target state.
[0109] In one embodiment, before sending the second broadcast message, the method further includes pausing the transmission of the first broadcast message if the Bluetooth device exits the target state.
[0110] In one embodiment, the second broadcast carries a second status identifier, which indicates that the Bluetooth device supports multiple connectivity functionality. The target conditions include: the second electronic device determining that the Bluetooth device supports multiple connectivity functionality; and / or...
[0111] The second broadcast carries a second service priority, with the target conditions including: the service priority of the second electronic device is greater than the second service priority; and / or,
[0112] The second broadcast carries the target account information, and the target conditions include: the account information of the second electronic device is the same as the target account information.
[0113] In one embodiment, the target state includes a reconnection state or a pairing state.
[0114] In one embodiment, the target state includes the Bluetooth device being in a paired state, and the number of Bluetooth connections established by the Bluetooth device being N-1, where N is the maximum number of Bluetooth connections that the Bluetooth device can maintain simultaneously, and N is an integer greater than 1.
[0115] It should be noted that the description of another connection control method for Bluetooth devices provided in the embodiments of this application can be found in the relevant descriptions in the above embodiments, and will not be repeated here.
[0116] In this embodiment, pausing the transmission of the second broadcast information when the Bluetooth device is in the target state can prevent the Bluetooth device from mistakenly establishing a Bluetooth connection with the second electronic device while it is preparing or establishing a Bluetooth connection with the first electronic device. This reduces the occurrence of incorrect Bluetooth connections and improves the accuracy of establishing Bluetooth connections.
[0117] like Figure 8 As shown, in one embodiment, another connection control method is provided, which can be applied to the second electronic device described above. This method may include the following steps:
[0118] Step 810: Receive first broadcast information sent by the Bluetooth device. The first broadcast information is sent by the Bluetooth device when it is in the target state, and carries first information. The target state refers to the state in which the Bluetooth device is preparing to or establishing a Bluetooth connection with the first electronic device.
[0119] Step 820: Based on the first information, if the target conditions are not met, do not automatically send a Bluetooth connection request to the Bluetooth device.
[0120] In one embodiment, the first information includes a first status identifier, which indicates that the Bluetooth device does not support the multi-connection function. The target condition includes: the second electronic device determining that the Bluetooth device supports the multi-connection function. The step of determining that the target condition is not met based on the first information includes: determining that the Bluetooth device does not support the multi-connection function based on the first status identifier.
[0121] In one embodiment, the first information includes a first service priority, and the target condition includes: the service priority corresponding to the second electronic device is higher than the service priority carried in the broadcast information. The step of determining that the target condition is not met based on the first information includes: determining that the service priority corresponding to the second electronic device is not higher than the first service priority.
[0122] In one embodiment, the method further includes: receiving second broadcast information sent by a Bluetooth device; and if it is determined from the second broadcast information that the target conditions are met, automatically sending a Bluetooth connection request to the Bluetooth device.
[0123] In one embodiment, the second broadcast carries a second status identifier, which indicates that the Bluetooth device supports multiple connectivity functionality. The target conditions include: the second electronic device determining that the Bluetooth device supports multiple connectivity functionality; and / or...
[0124] The second broadcast carries a second service priority, with the target conditions including: the service priority of the second electronic device is greater than the second service priority; and / or,
[0125] The second broadcast carries the target account information, and the target conditions include: the account information of the second electronic device is the same as the target account information.
[0126] It should be noted that the description of the connection control method for the second electronic device provided in the embodiments of this application can be referred to the relevant description of the connection control method for the Bluetooth device provided in the above embodiments, and will not be repeated here.
[0127] In this embodiment, when the Bluetooth device is in the target state, the second electronic device does not automatically send a Bluetooth connection request to the Bluetooth device. This avoids the situation where the Bluetooth device is preparing or establishing a Bluetooth connection with the first electronic device, and can reduce the occurrence of incorrect Bluetooth device connections, thereby improving the accuracy of establishing Bluetooth connections.
[0128] like Figure 9 As shown, in one embodiment, a connection control device 900 is provided, which can be applied to the Bluetooth device described above. The connection control device 900 may include a transmitting module 910.
[0129] The sending module 910 is used to send a first broadcast message when the Bluetooth device is in the target state. The first broadcast message carries first information. The target state refers to the state in which the Bluetooth device is preparing or establishing a Bluetooth connection with the first electronic device. The first information is used to instruct the second electronic device that receives the first broadcast message not to automatically send a Bluetooth connection request to the Bluetooth device.
[0130] In one embodiment, the target state includes a reconnection state or a pairing state.
[0131] In one embodiment, the target state includes the Bluetooth device being in a paired state, and the number of Bluetooth connections established by the Bluetooth device being N-1, where N is the maximum number of Bluetooth connections that the Bluetooth device can maintain simultaneously, and N is an integer greater than 1.
[0132] In one embodiment, the first information includes a first status identifier, which is used to indicate that the Bluetooth device does not support the multi-connection function, which refers to the Bluetooth device's ability to establish multiple Bluetooth connections.
[0133] In one embodiment, the connection control device 900 further includes a configuration module.
[0134] The configuration module is used to configure the status identifier carried in the broadcast information as the first status identifier in order to obtain the first broadcast information.
[0135] In one embodiment, the first information includes a first service priority, which is greater than or equal to the service priority corresponding to the second electronic device.
[0136] In one embodiment, the configuration module is further configured to configure the service priority carried in the broadcast information as a first service priority in order to obtain the first broadcast information.
[0137] In one embodiment, the sending module 910 is further configured to send a second broadcast message when the Bluetooth device exits the target state. The second broadcast message is used to trigger the second electronic device that receives the second broadcast message to automatically send a Bluetooth connection request to the Bluetooth device when the target conditions are met.
[0138] In one embodiment, the sending module 910 is further configured to pause sending the first broadcast information when the Bluetooth device exits the target state.
[0139] In one embodiment, the second broadcast information carries a second status identifier, which is used to characterize that the Bluetooth device supports multiple connectivity functionality. The target conditions include: the second electronic device determining that the Bluetooth device supports multiple connectivity functionality; and / or...
[0140] The second broadcast carries a second service priority, with the target conditions including: the service priority of the second electronic device is greater than the second service priority; and / or,
[0141] The second broadcast carries the target account information, and the target conditions include: the account information of the second electronic device is the same as the target account information.
[0142] In one embodiment, when the number of devices currently establishing Bluetooth connections with the Bluetooth device reaches the maximum number of Bluetooth connections supported by the Bluetooth device, the second service priority is the lowest service priority among the various electronic devices currently establishing Bluetooth connections with the Bluetooth device; when the number of devices currently establishing Bluetooth connections with the Bluetooth device does not reach the maximum number of Bluetooth connections supported by the Bluetooth device, the second service priority is a preset priority, which is lower than the lowest service priority among the various electronic devices currently establishing Bluetooth connections with the Bluetooth device.
[0143] In one embodiment, the sending module 910 is further configured to pause the transmission of broadcast information when the Bluetooth device is in a target state.
[0144] In this embodiment, sending a first broadcast message when the Bluetooth device is in the target state can prevent the Bluetooth device from mistakenly establishing a Bluetooth connection with a second electronic device while it is preparing or establishing a Bluetooth connection with the first electronic device. This reduces the chance of incorrect Bluetooth connections and improves the accuracy of establishing Bluetooth connections. Sending a second broadcast message when the Bluetooth device exits the target state enables quick switching between electronic devices under the same account, meeting user needs and improving the flexibility of Bluetooth connections.
[0145] like Figure 10 As shown, in one embodiment, another connection control device 1000 is provided, which can be applied to the Bluetooth device described above. The connection control device 1000 may include a transmitting module 1010.
[0146] The sending module 1010 is used to pause sending the second broadcast information when the Bluetooth device is in the target state; wherein, the target state refers to the state in which the Bluetooth device is preparing or is establishing a Bluetooth connection with the first electronic device; the second broadcast information is used to trigger the second electronic device that receives the second broadcast information to automatically send a Bluetooth connection request to the Bluetooth device when the target conditions are met.
[0147] In one embodiment, the sending module 1010 is further configured to send a first broadcast message when the Bluetooth device is in a target state, the first broadcast message carrying first information; the first information is used to instruct the second electronic device that receives the first broadcast message not to automatically send a Bluetooth connection request to the Bluetooth device.
[0148] In one embodiment, the first information includes a first status identifier, which indicates that the Bluetooth device does not support multi-connection functionality, where multi-connection functionality refers to the Bluetooth device's ability to establish multiple Bluetooth connections; and / or,
[0149] The first information includes a first service priority, which is greater than or equal to the service priority corresponding to the second electronic device.
[0150] In one embodiment, the connection control device 1000 further includes a configuration module.
[0151] The configuration module is used to configure the status identifier carried in the broadcast information as the first status identifier, and / or configure the service priority carried in the broadcast information as the first service priority, so as to obtain the first broadcast information.
[0152] In one embodiment, the sending module 1010 is further configured to send a second broadcast message when the Bluetooth device exits the target state.
[0153] In one embodiment, the sending module 1010 is further configured to pause sending the first broadcast information when the Bluetooth device exits the target state.
[0154] In one embodiment, the second broadcast carries a second status identifier, which indicates that the Bluetooth device supports multiple connectivity functionality. The target conditions include: the second electronic device determining that the Bluetooth device supports multiple connectivity functionality; and / or...
[0155] The second broadcast carries a second service priority, with the target conditions including: the service priority of the second electronic device is greater than the second service priority; and / or,
[0156] The second broadcast carries the target account information, and the target conditions include: the account information of the second electronic device is the same as the target account information.
[0157] In one embodiment, the target state includes a reconnection state or a pairing state.
[0158] In one embodiment, the target state includes the Bluetooth device being in a paired state, and the number of Bluetooth connections established by the Bluetooth device being N-1, where N is the maximum number of Bluetooth connections that the Bluetooth device can maintain simultaneously, and N is an integer greater than 1.
[0159] In this embodiment, pausing the transmission of the second broadcast information when the Bluetooth device is in the target state can prevent the Bluetooth device from mistakenly establishing a Bluetooth connection with the second electronic device while it is preparing or establishing a Bluetooth connection with the first electronic device. This reduces the occurrence of incorrect Bluetooth connections and improves the accuracy of establishing Bluetooth connections.
[0160] like Figure 11 As shown, in one embodiment, a connection control device 1100 is provided, which can be applied to the second electronic device described above. The connection control device 1100 may include a receiving module 1110 and a connection module 1120.
[0161] The receiving module 1110 is used to receive first broadcast information sent by the Bluetooth device. The first broadcast information is sent by the Bluetooth device when it is in the target state, and the first broadcast information carries first information. The target state refers to the state in which the Bluetooth device is preparing or is establishing a Bluetooth connection with the first electronic device.
[0162] The connection module 1120 is used to determine, based on the first information, that the target conditions are not met and therefore does not automatically send a Bluetooth connection request to the Bluetooth device.
[0163] In one embodiment, the first information includes a first status identifier, which indicates that the Bluetooth device does not support the multi-connection function. The target condition includes: the second electronic device determining that the Bluetooth device supports the multi-connection function. The connection module 1120 is further configured to determine, based on the first status identifier, that the Bluetooth device does not support the multi-connection function, and not automatically send a Bluetooth connection request to the Bluetooth device.
[0164] In one embodiment, the first information includes a first service priority, and the target condition includes: the service priority corresponding to the second electronic device is higher than the service priority carried in the broadcast information. The connection module 1120 is further configured to determine that the service priority corresponding to the second electronic device is not higher than the first service priority, and therefore not automatically send a Bluetooth connection request to the Bluetooth device.
[0165] In one embodiment, the receiving module 1110 is further configured to receive second broadcast information sent by a Bluetooth device.
[0166] The connection module is also used to automatically send a Bluetooth connection request to the Bluetooth device if the target conditions are determined to be met based on the second broadcast information.
[0167] In one embodiment, the second broadcast carries a second status identifier, which indicates that the Bluetooth device supports multiple connectivity functionality. The target conditions include: the second electronic device determining that the Bluetooth device supports multiple connectivity functionality; and / or...
[0168] The second broadcast carries a second service priority, with the target conditions including: the service priority of the second electronic device is greater than the second service priority; and / or,
[0169] The second broadcast carries the target account information, and the target conditions include: the account information of the second electronic device is the same as the target account information.
[0170] In this embodiment, when the Bluetooth device is in the target state, the second electronic device does not automatically send a Bluetooth connection request to the Bluetooth device. This avoids the situation where the Bluetooth device is preparing or establishing a Bluetooth connection with the first electronic device, and can reduce the occurrence of incorrect Bluetooth device connections, thereby improving the accuracy of establishing Bluetooth connections.
[0171] Figure 12 This is a structural block diagram of an electronic device in one embodiment. For example... Figure 12 As shown, the electronic device 1200 may include one or more of the following components: a processor 1210 and a memory 1220 coupled to the processor 1210, wherein the memory 1220 may store one or more computer programs, and the one or more computer programs may be configured to, when executed by one or more processors 1210, cause the electronic device 1200 to implement the connection control method for Bluetooth devices as described in the above embodiments.
[0172] Processor 1210 may include one or more processing cores. Processor 1210 connects to various parts within the electronic device 1200 using various interfaces and lines, and performs various functions and processes data of the electronic device 1200 by running or executing instructions, programs, code sets, or instruction sets stored in memory 1220, and by calling data stored in memory 1220. Optionally, processor 1210 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 1210 may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 1210 and may be implemented separately using a communication chip.
[0173] The memory 1220 may include random access memory (RAM) or read-only memory (ROM). The memory 1220 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1220 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described above. The data storage area may also store data created by the electronic device 1200 during use.
[0174] Electronic device 1200 may also include a Bluetooth module, which can be used to provide Bluetooth communication functionality and perform Bluetooth data transmission. The Bluetooth module may support one or more Bluetooth protocols (such as Classic Bluetooth, BLE, BLE Audio, etc.), but is not limited to these, and may change as Bluetooth protocols evolve.
[0175] In one embodiment, this application provides an electronic device including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the electronic device implements the connection control method for a second electronic device as described in the above embodiments.
[0176] This application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor in an electronic device, the electronic device implements the connection control method for Bluetooth devices as described in the above embodiments.
[0177] This application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor in an electronic device, the electronic device implements the connection control method for a second electronic device as described in the above embodiments.
[0178] This application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor in an electronic device, it enables the electronic device to implement the connection control method for Bluetooth devices as described in the above embodiments.
[0179] This application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor in an electronic device, it enables the electronic device to implement the connection control method for a second electronic device as described in the above embodiments.
[0180] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, ROM, etc.
[0181] Any references to memory, storage, databases, or other media used herein may include non-volatile and / or volatile memory. Suitable non-volatile memory may include ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache. By way of illustration and not limitation, RAM may take many forms, such as Static RAM (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), Rambus DRAM (RDRAM), and Direct Rambus DRAM (DRDRAM).
[0182] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Those skilled in the art should also recognize that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application. It should be noted that "multiple" in this application includes "two or more".
[0183] In the various embodiments of this application, it should be understood that the sequence number of each process does not necessarily imply 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 this application.
[0184] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they can be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0185] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0186] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0187] The foregoing has provided a detailed description of a connection control method, apparatus, electronic device, and storage medium disclosed in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A connection control method, characterized in that, Applied to Bluetooth devices capable of simultaneously establishing and maintaining Bluetooth connections with multiple electronic devices, the method includes: When the Bluetooth device is in the target state, a first broadcast message is sent, which carries first information. The target state refers to the state in which the Bluetooth device is preparing or establishing a Bluetooth connection with the first electronic device. The first information is used to instruct the second electronic device that receives the first broadcast message not to automatically send a Bluetooth connection request to the Bluetooth device. The second electronic device automatically sending a Bluetooth connection request to the Bluetooth device refers to the second electronic device actively initiating a Bluetooth connection, which is not triggered by user operations. The first information includes a first status identifier, which indicates that the Bluetooth device does not support the multi-connection function, whereby the multi-connection function refers to the Bluetooth device's ability to establish multiple Bluetooth connections.
2. The method according to claim 1, characterized in that, The target state includes either a reconnection state or a pairing state.
3. The method according to claim 2, characterized in that, The target state includes the Bluetooth device being in the pairing state, and the number of Bluetooth connections established by the Bluetooth device being N-1, where N is the maximum number of Bluetooth connections that the Bluetooth device can maintain simultaneously, and N is an integer greater than 1.
4. The method according to claim 1, characterized in that, Before sending the first broadcast information, the method further includes: Configure the status identifier carried in the broadcast information as the first status identifier to obtain the first broadcast information.
5. The method according to any one of claims 1 to 3, characterized in that, The first information includes a first service priority, which is greater than or equal to the service priority corresponding to the second electronic device.
6. The method according to claim 5, characterized in that, Before sending the first broadcast information, the method further includes: Configure the service priority carried in the broadcast information to the first service priority to obtain the first broadcast information.
7. The method according to any one of claims 1 to 4, characterized in that, The method further includes: When the Bluetooth device exits the target state, a second broadcast message is sent. The second broadcast message is used to trigger a second electronic device that receives the second broadcast message to automatically send a Bluetooth connection request to the Bluetooth device if the target conditions are met.
8. The method according to claim 7, characterized in that, Before sending the second broadcast information, the method further includes: If the Bluetooth device exits the target state, the transmission of the first broadcast information is paused.
9. The method according to claim 7, characterized in that, The second broadcast message carries a second status identifier, which indicates that the Bluetooth device supports multiple connection functionality. The target condition includes: the second electronic device determining that the Bluetooth device supports multiple connection functionality; and / or, The second broadcast carries a second service priority, the target condition including: the service priority of the second electronic device is greater than the second service priority; and / or, The second broadcast carries target account information, and the target condition includes: the account information of the second electronic device is the same as the target account information.
10. The method according to claim 9, characterized in that, When the number of devices currently establishing Bluetooth connections with the Bluetooth device reaches the maximum number of Bluetooth connections that the Bluetooth device can support, the second service priority is the lowest service priority among the various electronic devices currently establishing Bluetooth connections with the Bluetooth device. If the number of devices currently establishing Bluetooth connections with the Bluetooth device does not reach the maximum number of Bluetooth connections that the Bluetooth device can support, the second service priority is a preset priority, which is lower than the lowest service priority of each electronic device currently establishing Bluetooth connections with the Bluetooth device.
11. The method according to any one of claims 1 to 3, characterized in that, The method further includes: When the Bluetooth device is in target state, broadcasting information is paused.
12. A connection control method, characterized in that, Applied to Bluetooth devices capable of simultaneously establishing and maintaining Bluetooth connections with multiple electronic devices, the method includes: When the Bluetooth device is in target state, the transmission of the second broadcast message is paused; The target state refers to the state in which the Bluetooth device is preparing or establishing a Bluetooth connection with the first electronic device; the second broadcast information is used to trigger the second electronic device that receives the second broadcast information to automatically send a Bluetooth connection request to the Bluetooth device when the target conditions are met; the second electronic device automatically sending a Bluetooth connection request to the Bluetooth device means that the second electronic device actively initiates the Bluetooth connection, not triggered by user operations; The second broadcast carries a second status identifier, which is used to indicate that the Bluetooth device supports the multi-connection function. The multi-connection function refers to the Bluetooth device's ability to establish multiple Bluetooth connections. The target condition includes: the second electronic device determines that the Bluetooth device supports the multi-connection function.
13. The method according to claim 12, characterized in that, The method further includes: When the Bluetooth device is in the target state, a first broadcast message is sent, the first broadcast message carrying first information; the first information is used to instruct the second electronic device that receives the first broadcast message not to automatically send a Bluetooth connection request to the Bluetooth device.
14. The method according to claim 13, characterized in that, The first information includes a first status identifier, which indicates that the Bluetooth device does not support multi-connection functionality, where multi-connection functionality refers to the Bluetooth device's ability to establish multiple Bluetooth connections; and / or, The first information includes a first service priority, which is greater than or equal to the service priority corresponding to the second electronic device.
15. The method according to claim 14, characterized in that, Before sending the first broadcast information, the method further includes: Configure the status identifier carried in the broadcast information as the first status identifier, and / or configure the service priority carried in the broadcast information as the first service priority, to obtain the first broadcast information.
16. The method according to claim 12, characterized in that, The method further includes: If the Bluetooth device exits the target state, the second broadcast message is sent.
17. The method according to claim 13, characterized in that, Before sending the second broadcast information, the method further includes: If the Bluetooth device exits the target state, the transmission of the first broadcast message is paused.
18. The method according to any one of claims 12 to 17, characterized in that, The second broadcast carries a second service priority, the target condition including: the service priority of the second electronic device is greater than the second service priority; and / or, The second broadcast carries target account information, and the target condition includes: the account information of the second electronic device is the same as the target account information.
19. The method according to any one of claims 12 to 17, characterized in that, The target state includes a reconnection state or a pairing state; or... The target state includes the Bluetooth device being in the pairing state, and the number of Bluetooth connections established by the Bluetooth device being N-1, where N is the maximum number of Bluetooth connections that the Bluetooth device can maintain simultaneously, and N is an integer greater than 1.
20. A connection control device, characterized in that, Applied to Bluetooth devices, which are capable of simultaneously establishing and maintaining Bluetooth connections with multiple electronic devices, the device includes: The sending module is configured to send a first broadcast message when the Bluetooth device is in a target state, the first broadcast message carrying first information; the target state refers to the state in which the Bluetooth device is preparing or establishing a Bluetooth connection with the first electronic device; the first information is used to instruct the second electronic device that receiving the first broadcast message not to automatically send a Bluetooth connection request to the Bluetooth device; the second electronic device automatically sending a Bluetooth connection request to the Bluetooth device refers to the second electronic device actively initiating a Bluetooth connection, not triggered by user operations. The first information includes a first status identifier, which indicates that the Bluetooth device does not support the multi-connection function, whereby the multi-connection function refers to the Bluetooth device's ability to establish multiple Bluetooth connections.
21. A connection control device, characterized in that, Applied to Bluetooth devices, which are capable of simultaneously establishing and maintaining Bluetooth connections with multiple electronic devices, the device includes: The transmitting module is configured to pause transmitting the second broadcast information when the Bluetooth device is in the target state; The target state refers to the state in which the Bluetooth device is preparing or establishing a Bluetooth connection with the first electronic device; the second broadcast information is used to trigger the second electronic device that receives the second broadcast information to automatically send a Bluetooth connection request to the Bluetooth device when the target conditions are met; the second electronic device automatically sending a Bluetooth connection request to the Bluetooth device means that the second electronic device actively initiates the Bluetooth connection, not triggered by user operations; The second broadcast carries a second status identifier, which is used to indicate that the Bluetooth device supports the multi-connection function. The multi-connection function refers to the Bluetooth device's ability to establish multiple Bluetooth connections. The target condition includes: the second electronic device determines that the Bluetooth device supports the multi-connection function.
22. An electronic device, characterized in that, The device includes a memory and a processor, and a communication module. The memory stores a computer program, and when the computer program is executed by the processor, the electronic device causes the electronic device to perform the method as described in any one of claims 1 to 11 or 12 to 19.
23. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor in an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1 to 11 or 12 to 19.