Bluetooth connection methods, devices, systems, electronic devices and storage media
By using shared authentication information for batch connections during Bluetooth device switching, the complexity of connecting one by one in existing technologies is solved, improving connection efficiency and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-25
- Publication Date
- 2026-03-10
AI Technical Summary
When switching master devices in Bluetooth devices, existing technologies require re-establishing connections one by one, which is complex and inefficient.
By detecting the shared authentication information of the slave devices to be connected and verifying it in a preset slave device group, batch connection of multiple slave devices can be achieved.
It improves the processing efficiency of Bluetooth connections and enhances the user experience.
Smart Images

Figure CN115396858B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a Bluetooth connection method, device, system, electronic equipment and storage medium. BACKGROUND
[0002] Bluetooth technology is mainly for various electronic devices in home or enterprise network environment, short-range radio frequency connection technology for voice and data, which can realize point-to-point connection, and also can realize one-to-many connection, that is, one master device connects multiple slave devices.
[0003] However, when multiple slave devices corresponding to one master device are switched to a new master device, the related technology needs to operate the new master device to individually connect each slave device one by one, and if the slave device has not connected the new master device before, it is necessary to re-establish Bluetooth connection one by one, which is complicated in operation and seriously affects the processing efficiency. SUMMARY
[0004] Therefore, it is necessary to provide a Bluetooth connection method, device, system, electronic equipment and storage medium to efficiently perform Bluetooth connection in view of the above defects or deficiencies.
[0005] In a first aspect, an embodiment of the present application provides a Bluetooth connection method, which is applied to a master device, and the method comprises:
[0006] detecting same shared authentication information sent by at least one to-be-connected slave device, the at least one to-be-connected slave device being located in a preset slave device group associated with the master device;
[0007] when the shared authentication information is verified successfully, the master device and the at least one to-be-connected slave device establish Bluetooth connection.
[0008] In one embodiment, the detecting same shared authentication information sent by at least one to-be-connected slave device, the at least one to-be-connected slave device being located in a preset slave device group associated with the master device comprises:
[0009] traversing the preset slave device group, wherein the preset slave device group comprises a mapping relationship of at least one slave device and historical authentication information of the at least one slave device, and the shared authentication information is compared with the historical authentication information.
[0010] In one embodiment, the preset slave device group comprises the slave device that has connected the master device previously.
[0011] In one embodiment, the mapping relationship comprises one-to-one mapping of the slave device and the historical authentication information of the slave device.
[0012] Alternatively, the mapping relationship may include a one-to-many mapping between the slave device and the historical authentication information of all the slave devices.
[0013] In one embodiment, the shared authentication information is extracted from the historical authentication information in a specified order or a random order.
[0014] In one embodiment, the method further includes:
[0015] When the shared authentication information verification fails, the master device pairs with one of the slave devices to be connected and stores the shared authentication information in the preset slave device group.
[0016] Secondly, embodiments of this application provide a Bluetooth connection device, the device being applied to a host device, the device comprising:
[0017] A detection module is configured to detect the same shared authentication information sent by at least one slave device to be connected, the at least one slave device to be connected being located in a preset slave device group associated with the master device;
[0018] A connection module is configured to establish a Bluetooth connection between the master device and the at least one slave device to be connected when the shared authentication information is successfully verified.
[0019] Thirdly, embodiments of this application provide a Bluetooth connection system, the system including at least one master device and a slave device to be connected, the master device being able to implement the steps of the Bluetooth connection method described in any one of the first aspects.
[0020] Fourthly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the Bluetooth connection method described in any one of the first aspects.
[0021] Fifthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the Bluetooth connection method described in any one of the first aspects.
[0022] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0023] The Bluetooth connection method, apparatus, system, electronic device, and storage medium provided in this application embodiment allow multiple slave devices located in a preset slave device group to use the same shared authentication information for verification during actual Bluetooth connection. This avoids the cumbersome process of individual verification. As a result, when the shared authentication information verification is successful, the master device can easily and quickly establish a connection with multiple slave devices simultaneously, which has a batch processing advantage. This significantly improves processing efficiency and enhances the user experience. Attached Figure Description
[0024] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0025] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application;
[0026] Figure 2 This is a basic flowchart illustrating a Bluetooth connection method provided in an embodiment of this application.
[0027] Figure 3 A flowchart illustrating a pre-configured slave device group is provided for an embodiment of this application.
[0028] Figure 4 A schematic diagram of a pre-configured slave device group provided in an embodiment of this application;
[0029] Figure 5 This is a schematic diagram of the structure of a Bluetooth connection device provided in an embodiment of this application;
[0030] Figure 6 This is a schematic diagram of another Bluetooth connection device provided in an embodiment of this application;
[0031] Figure 7 A structural block diagram of a Bluetooth connection system provided in an embodiment of this application;
[0032] Figure 8 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0033] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present application.
[0034] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described can be implemented in orders other than those illustrated or described herein.
[0035] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those steps or modules that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to such process, method, product, or device.
[0036] To facilitate understanding, we will now combine... Figure 1 The application scenario is illustrated below. For example, this application scenario includes, but is not limited to, two master devices and four slave devices. For instance, the master devices are M1 and M2, and the slave devices are S1, S2, S3, and S4. Slave device S1 establishes a Bluetooth connection with master device M1 using key K1; slave device S2 establishes a Bluetooth connection with master device M1 using key K2; slave device S3 establishes a Bluetooth connection with master device M1 using key K3; and slave device S4 establishes a Bluetooth connection with master device M1 using key K4. Simultaneously, slave device S1 establishes a Bluetooth connection with master device M2 using key K1'; slave device S2 establishes a Bluetooth connection with master device M2 using key K2'; slave device S3 establishes a Bluetooth connection with master device M2 using key K3'; and slave device S4 establishes a Bluetooth connection with master device M2 using key K4'. Figure 1 It can be seen that when switching from the master device M1 to M2, the relevant technology requires each slave device S1, S2, S3 and S4 to connect to the master device M2 via Bluetooth using their respective keys K1', K2', K3' and K4', which is cumbersome and time-consuming.
[0037] Therefore, embodiments of this application provide a Bluetooth connection method, apparatus, system, electronic device, and storage medium, which are described below. Figures 2 to 8 To elaborate in detail.
[0038] In one embodiment, such as Figure 2 As shown, a Bluetooth connection method is provided. This embodiment of the application uses the method applied to a master device as an example for illustration. In this embodiment, the method includes the following steps:
[0039] S101, detect the same shared authentication information sent by at least one slave device to be connected, the at least one slave device to be connected being located in a preset slave device group associated with the master device.
[0040] It should be noted that, in the embodiments of this application, the master device and slave device include, but are not limited to, electronic devices such as mobile phones, tablets, desktop computers, electronic whiteboards, wireless handheld terminals, personal digital assistants (PDAs), headphones, keyboards, mice, speakers, and wearable devices. The master device and slave device can be interchanged depending on the usage scenario; that is, the roles of the master device and slave device are not fixed. For example, a master device may act as a master device in one usage scenario and as a slave device in another.
[0041] Authentication information includes, but is not limited to, key mechanisms, such as key K1 and key K1'. Shared authentication information means that in addition to using its own key, a slave device can also use the keys corresponding to other slave devices in a preset slave device group. For example, if the preset slave device group includes slave devices S1, S2, S3 and S4, then when slave device S1 connects to master device M2, slave device S1 can use not only key K1', but also key K2', key K3' or key K4'.
[0042] The pre-configured slave device group can be arbitrarily combined according to actual needs. For example, a pre-configured slave device group can include slave devices S1, S2, and S3, or it can include slave devices S1, S2, S3, and S4. The advantage of this configuration is greater flexibility and ease of use in diverse applications. For example... Figure 3As shown, it is a flowchart of a pre-configured slave device group provided in an embodiment of this application. First, in S201, different Bluetooth slave devices pair with the same master device. For example, slave devices S1, S2, and S3 pair with master device M1, or slave devices S1, S2, S3, and S4 pair with master device M1. Second, in S202, the master device constructs slave device groups. For example, slave device group ① includes slave devices S1, S2, and S3, or slave device group ② includes slave devices S1, S2, S3, and S4. Third, in S203, the master device obtains the key mechanisms for interaction between each slave device and the master device. For example, key K1 of slave device S1, key K2 of slave device S2, and key K3 of slave device S3, or key K1 of slave device S1, key K2 of slave device S2, key K3 of slave device S3, and key K4 of slave device S4. Finally, in S204, the master device stores the connection key mechanisms of different slave devices within the slave device group. For example, it stores key K1, key K2, and key K3 in the slave device group. In S205, the master device sets any key mechanism of a slave device to serve as an authentication condition for reconnection of each slave device in the slave device group. For example, slave device S1 in slave device group ① can use key K1, or key K2 or key K3. Then, in S206, the master device stores the key mechanism in each slave device of the slave device group. For example, the master device group may pre-configure a mapping relationship between at least one slave device and at least one slave device's historical authentication information. This mapping relationship is stored in a list format and can be a one-to-one mapping between slave devices and their historical authentication information, i.e., slave device S1 corresponds to key K1 and key K1', slave device S2 corresponds to key K2 and key K2', slave device S3 corresponds to key K3 and key K3', and slave device S4 corresponds to key K4 and key K4', etc., or as... Figure 4 As shown, it can also be a one-to-many mapping of the historical authentication information of the slave device and all slave devices, that is, the slave device S1 corresponds to key K1 and key K1', key K2 and key K2', key K3 and key K3', and key K4 and key K4', etc.
[0043] Optionally, the shared authentication information in this embodiment is extracted from historical authentication information in a specified order or a random order. Taking the example that slave devices S1, S2, S3, and S4 in the preset slave device group have all previously connected to the master device M2, the specified order can be any of ascending, descending, or interpolated order. That is, ascending order is key K1', key K2', key K3', and key K4'; descending order is key K4', key K3', key K2', and key K1'; and interpolated order is key K1', key K3', key K2', and key K4'. Similarly, the random order can be randomized, that is, key K2', key K3', key K1', and key K4'. Likewise, if none of the slave devices in the preset slave device group have previously connected to the master device M2, the shared authentication information can also be obtained according to a specified order or a random order.
[0044] Optionally, in this embodiment, when detecting shared authentication information, the preset slave device group is traversed, and the shared authentication information is compared with historical authentication information. The preset slave device group may include slave devices that have previously connected to the master device. For example, this embodiment may sequentially verify all keys stored by the slave device, namely key K1', key K2', key K3', and key K4'. Alternatively, some embodiments may first search for slave devices that have previously connected to the master device, and then compare the historical authentication information of those slave devices with the shared authentication information. This approach facilitates rapid location and significantly improves processing efficiency.
[0045] S102, when the shared authentication information is successfully verified, the master device and at least one slave device to be connected establish a Bluetooth connection.
[0046] Optionally, in some embodiments of this application, if the shared authentication information verification fails, it indicates that none of the slave devices in the preset slave device group have previously connected to the master device to be switched. In this case, the master device can still pair with one of the slave devices to be connected and store the shared authentication information in the preset slave device group. The advantage of this setting is that Bluetooth connections can be established in batches with only one switch, further improving processing efficiency.
[0047] In the Bluetooth connection method described above, multiple slave devices located in the preset slave device group can use the same shared authentication information for verification, which avoids the tediousness of individual verification. Thus, when the shared authentication information is verified, the master device can easily and quickly establish Bluetooth connections with multiple slave devices at the same time, which has the advantage of batch processing. This greatly improves processing efficiency and enhances the user experience.
[0048] It should be understood that, although Figure 2The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order in which these steps are executed; they can be performed in other orders. Furthermore, Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0049] In one embodiment, such as Figure 5 As shown, a Bluetooth connection device is provided, which is applied to a host device. The device includes a detection module and a connection module. Wherein:
[0050] The detection module is configured to detect the same shared authentication information sent by at least one slave device to be connected, which is located in a preset slave device group associated with the master device;
[0051] The connectivity module is configured to establish a Bluetooth connection between the master device and at least one slave device to be connected when the shared authentication information is successfully verified.
[0052] Optionally, in some embodiments of this application, the detection module is further configured to traverse a preset slave device group, wherein the preset slave device group includes a mapping relationship between at least one slave device and the historical authentication information of at least one slave device, and compares the shared authentication information with the historical authentication information.
[0053] Optionally, in some embodiments of this application, a preset slave device group includes slave devices that have previously been connected to the master device.
[0054] Optionally, in some embodiments of this application, the mapping relationship includes a one-to-one mapping between the slave device and the slave device's historical authentication information;
[0055] Alternatively, the mapping relationship can include a one-to-many mapping between the slave device and the historical authentication information of all slave devices.
[0056] Optionally, in some embodiments of this application, the shared authentication information is extracted from historical authentication information in a specified order or a random order.
[0057] Optionally, in some embodiments of this application, such as Figure 6 As shown, the device also includes a pairing module, wherein:
[0058] The pairing module is configured to pair the master device with one of the slave devices to be connected when the shared authentication information verification fails, and to store the shared authentication information in a preset slave device group.
[0059] In the aforementioned Bluetooth connection device, the detection module is configured to detect the same shared authentication information sent by at least one slave device to be connected, the at least one slave device to be connected being located in a preset slave device group associated with the master device; the connection module is configured to establish a Bluetooth connection between the master device and at least one slave device to be connected when the shared authentication information is successfully verified. Based on this, the embodiments of this application can avoid the cumbersome process of individual connections, have batch processing advantages, thereby significantly improving processing efficiency and enhancing the user experience.
[0060] It should be noted that specific limitations regarding the Bluetooth connection device can be found in the limitations of the Bluetooth connection method described above, and will not be repeated here. The various modules in the aforementioned Bluetooth connection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the electronic device's processor, or stored in software in the electronic device's memory, so that the processor can call and execute the corresponding operations of each module.
[0061] In one embodiment, a Bluetooth connectivity system is provided, the block diagram of which can be as follows: Figure 7 As shown. The Bluetooth connection system includes at least one master device and a slave device to be connected, wherein the master device can perform the steps of the Bluetooth connection methods in the various embodiments of this application described in this specification.
[0062] In one embodiment, an electronic device is provided, the internal structure of which can be shown as follows: Figure 8 As shown. The electronic device includes a processor, memory, communication interface, display screen, and input device connected via a system bus.
[0063] The processor of this electronic device provides computing and control capabilities. The memory of this electronic device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs, while the internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The communication interface of this electronic device is used for wired or wireless communication with external terminals. Wireless communication can be achieved through Wi-Fi, carrier networks (such as 3G, 4G, or 5G), Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a Bluetooth connection method. The display screen of this electronic device can be an LCD screen or an e-ink display screen. The input device of this electronic device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad located on the casing of the electronic device, or an external keyboard, touchpad, or mouse.
[0064] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0065] In one embodiment, the Bluetooth connectivity device provided in this application can be implemented as a computer program, and the computer program can be configured as follows: Figure 8 The device operates on the electronic device shown. The electronic device's memory can store the various program modules that make up the Bluetooth connection device, for example, Figure 5 The detection module and connection module are shown. The computer program, composed of the various program modules, causes the processor to execute the steps in the Bluetooth connection methods of the various embodiments of this application described in this specification.
[0066] For example, Figure 8 The electronic device shown can be used as follows Figure 5 The detection module in the illustrated Bluetooth connection device detects the same shared authentication information sent by at least one slave device to be connected, which is located in a preset slave device group associated with the master device. The electronic device can then establish a Bluetooth connection between the master device and at least one slave device to be connected via the connection module when the shared authentication information is successfully verified.
[0067] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0068] S101, detect the same shared authentication information sent by at least one slave device to be connected, the at least one slave device to be connected being located in a preset slave device group associated with the master device.
[0069] S102, when the shared authentication information is successfully verified, the master device and at least one slave device to be connected establish a Bluetooth connection.
[0070] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: traversing a preset slave device group, wherein the preset slave device group includes a mapping relationship between at least one slave device and historical authentication information of at least one slave device, and comparing the shared authentication information with the historical authentication information.
[0071] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: pre-setting a slave device group to have slave devices that have previously been connected to the master device.
[0072] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: the mapping relationship includes a one-to-one mapping between the slave device and the slave device's historical authentication information;
[0073] Alternatively, the mapping relationship can include a one-to-many mapping between the slave device and the historical authentication information of all slave devices.
[0074] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: the shared authentication information is extracted from the historical authentication information in a specified order or a random order.
[0075] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: when the shared authentication information verification fails, the master device pairs with one of the slave devices to be connected and stores the shared authentication information in a preset slave device group.
[0076] In the aforementioned computer-readable storage medium, the computer program detects the same shared authentication information sent by at least one slave device to be connected, which is located in a preset slave device group associated with the master device, thus avoiding the cumbersome process of individual verification. Therefore, when the shared authentication information is successfully verified, a Bluetooth connection is established between the master device and at least one slave device to be connected, offering batch processing advantages, thereby significantly improving processing efficiency and enhancing the user experience.
[0077] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer 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 methods described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static random access memory (SRAM) and dynamic random access memory (DRAM), etc.
[0078] 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.
[0079] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A Bluetooth connection method, characterized by, The method is applied to a master device, and the method comprises: detecting same shared authentication information sent by at least one to-be-connected slave device, the at least one to-be-connected slave device being located in a preset slave device group associated with the master device; the shared authentication information refers to that a slave device can use a key corresponding to another slave device in the preset slave device group in addition to a key corresponding to the slave device itself; when the shared authentication information is verified successfully, establishing a Bluetooth connection between the master device and the at least one to-be-connected slave device; wherein the detecting same shared authentication information sent by at least one to-be-connected slave device, the at least one to-be-connected slave device being located in a preset slave device group associated with the master device comprises: traversing the preset slave device group, wherein the preset slave device group comprises a mapping relationship between at least one slave device and historical authentication information of the at least one slave device, and the shared authentication information is compared with the historical authentication information; the shared authentication information is extracted from the historical authentication information in a specified order or a random order.
2. The Bluetooth connection method according to claim 1, wherein, The preset slave device group comprises the slave device that has connected with the master device previously.
3. The Bluetooth connection method according to claim 1, wherein, The mapping relationship comprises one-to-one mapping between the slave device and the historical authentication information of the slave device. Alternatively, the mapping relationship comprises one-to-many mapping between the slave device and the historical authentication information of all the slave devices.
4. The Bluetooth connection method according to any one of claims 1 to 3, characterized by, The shared authentication information is extracted from the historical authentication information in a specified order or a random order.
5. The Bluetooth connection method of claim 1, wherein, The method further comprises: when the shared authentication information is verified unsuccessfully, pairing the master device with one of the to-be-connected slave devices, and storing the shared authentication information in the preset slave device group.
6. A Bluetooth connection device, characterized in that, The device is applied to a master device, and the device comprises: a detection module configured to detect same shared authentication information sent by at least one to-be-connected slave device, the at least one to-be-connected slave device being located in a preset slave device group associated with the master device; the shared authentication information refers to that a slave device can use a key corresponding to another slave device in the preset slave device group in addition to a key corresponding to the slave device itself; a connection module configured to, when the shared authentication information is verified successfully, establish a Bluetooth connection between the master device and the at least one to-be-connected slave device; wherein the detecting same shared authentication information sent by at least one to-be-connected slave device, the at least one to-be-connected slave device being located in a preset slave device group associated with the master device comprises: traversing the preset slave device group, wherein the preset slave device group comprises a mapping relationship between at least one slave device and historical authentication information of the at least one slave device, and the shared authentication information is compared with the historical authentication information; the shared authentication information is extracted from the historical authentication information in a specified order or a random order.
7. A Bluetooth connection system, characterized in that The system comprises at least one master device and a to-be-connected slave device, and the master device can implement steps of the Bluetooth connection method according to any one of claims 1 to 5. 8.An electronic device comprising a memory and a processor, the memory storing a computer program, wherein, The computer program is executed by the processor to implement the steps of the Bluetooth connection method in any one of claims 1 to 5.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the Bluetooth connection method in any one of claims 1 to 5.
Citation Information
Patent Citations
Connection method and device of Bluetooth equipment, electronic equipment and storage medium
CN113613226A