Bluetooth connection method and device, equipment and storage medium

By obtaining the target identification and device token of the target external device and performing identity verification, the risk of MAC addresses being stolen in existing Bluetooth connection technology is solved, and data security is improved.

CN119815337APending Publication Date: 2025-04-11ZHUHAI MOJIE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311318043.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-11
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The existing Bluetooth connection technology has the risk of MAC addresses being stolen, resulting in low data security.

Method used

When receiving the connection request from the target external device, it obtains its target identity and device token, and performs identity verification based on the preset Bluetooth connection binding relationship, and establishes a Bluetooth connection connection.

Benefits of technology

It effectively avoids the problem of low data security in Bluetooth connection due to the stolen device information, and improves the data security of Bluetooth connection technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119815337A_ABST
    Figure CN119815337A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of wireless connection, and discloses a Bluetooth connection method and device, equipment and a storage medium, and the method comprises the steps: obtaining a target identifier and an equipment token of target external equipment; and based on the Bluetooth connection binding relationship, the target identifier and the device token, performing identity verification, and when the target external device passes the identity verification, establishing a Bluetooth connection with the target external device. Through the above mode, the target identifier and the device token are verified, and after the identity of the target external device is verified according to the preset Bluetooth connection binding relation, the target identifier and the device token, the Bluetooth connection with the target external device is established. In the whole verification process, whether the target external device is legal or not is verified, the device identifier is also verified, the problem that in the prior art, due to the fact that device information is stolen, the data security of Bluetooth connection is low is solved, and the data security of the Bluetooth connection technology is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of wireless connection technology, and in particular to a Bluetooth connection method, device, equipment and storage medium. Background Art

[0002] At present, BLE (Bluetooh Low Energy) communication, as an important part of short-range communication, has been widely used in personal computers, printers, fax machines, digital cameras, mobile phones, headphones, cars, smart homes, medical equipment, school education, factory automation control and other fields by virtue of its short distance, low cost and interoperability. More and more types of electronic products are equipped with Bluetooth devices to establish Bluetooth connections and realize rapid data transmission. When Bluetooth connection control is adopted, the Bluetooth connection between devices is usually established directly according to the MAC (Media Access Control Address) address of the device, but this method has the risk of MAC address being stolen. Therefore, for applications where data security is in a primary position, it is necessary to achieve a high level of data security. In view of the above-mentioned defects existing in the prior art, how to improve the data security of Bluetooth connection technology has become a technical problem to be solved urgently. Summary of the invention

[0003] The present application provides a Bluetooth connection method, apparatus, device and storage medium to improve the data security of Bluetooth connection technology through identity authentication.

[0004] In a first aspect, the present application provides a Bluetooth connection method, the method comprising:

[0005] Upon receiving a connection request from a target external device, obtaining a target identifier and a device token of the target external device;

[0006] Based on the preset Bluetooth connection binding relationship, the target identifier and the device token, performing identity verification on the target external device;

[0007] When the target external device passes the identity verification, a Bluetooth connection is established with the target external device.

[0008] In a second aspect, the present application further provides a Bluetooth connection device, the device comprising:

[0009] A token and identification acquisition module, used to acquire a target identification and a device token of the target external device upon receiving a connection request from the target external device;

[0010] An identity verification module, used to verify the identity of the target external device based on a preset Bluetooth connection binding relationship, the target identifier and the device token;

[0011] The Bluetooth connection module is used to establish a Bluetooth connection with the target external device when the target external device passes the identity verification.

[0012] In a third aspect, the present application also provides a computer device, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the Bluetooth connection method as described above when executing the computer program.

[0013] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the Bluetooth connection method as described above.

[0014] The present application discloses a Bluetooth connection method, apparatus, device and storage medium, wherein the Bluetooth connection method includes obtaining a target identifier and a device token of the target external device upon receiving a connection request from the target external device; performing identity verification on the target external device based on a preset Bluetooth connection binding relationship, the target identifier and the device token; and establishing a Bluetooth connection with the target external device when the target external device passes the identity verification. In the above manner, the present application verifies the target identifier and the device token, and after verifying the identity of the target external device according to the preset Bluetooth connection binding relationship, the target identifier and the device token, establishes a Bluetooth connection with the target external device. During the entire verification process, not only is the legality of the target external device verified, but the device identifier is also verified, thereby avoiding the problem of low data security of the Bluetooth connection due to the theft of device information, and improving the data security of the Bluetooth connection technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] Figure 1 is a schematic flow chart of a Bluetooth connection method provided in the first embodiment of the present application;

[0017] Figure 2 is a schematic flow chart of a Bluetooth connection method provided in the second embodiment of the present application;

[0018] Figure 3 is a schematic flow chart of a Bluetooth connection method provided in the third embodiment of the present application;

[0019] Figure 4 is a schematic flow chart of a Bluetooth connection method provided in the fourth embodiment of the present application;

[0020] Figure 5 is a schematic flow chart of a Bluetooth connection method provided in the fifth embodiment of the present application;

[0021] Figure 6 A schematic block diagram of a Bluetooth connection device provided in an embodiment of the present application;

[0022] Figure 7 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0025] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0026] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0027] The embodiments of the present application provide a Bluetooth connection method, apparatus, device and storage medium. Among them, the Bluetooth connection method can be applied to a server, by verifying the target identifier and the device token, and after verifying the identity of the target external device according to the preset Bluetooth connection binding relationship, the target identifier and the device token, a Bluetooth connection with the target external device is established. During the entire verification process, not only is the legality of the target external device verified, but the device identifier is also verified, thereby avoiding the problem of low data security of the Bluetooth connection caused by the theft of device information in the prior art, and improving the data security of the Bluetooth connection technology. Among them, the server can be an independent server or a server cluster.

[0028] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0029] See also Figure 1 , Figure 1 This is a schematic flow chart of a Bluetooth connection method provided by the first embodiment of the present application. The Bluetooth connection method can be applied to a server, and is used to establish a Bluetooth connection with a target external device after verifying the target identifier and the device token, and verifying the identity of the target external device according to a preset Bluetooth connection binding relationship, the target identifier and the device token. During the entire verification process, not only is the legality of the target external device verified, but the device identifier is also verified, thereby avoiding the problem of low data security of the Bluetooth connection caused by the theft of device information in the prior art, and improving the data security of the Bluetooth connection technology.

[0030] like Figure 1 As shown, the Bluetooth connection method specifically includes steps S10 to S30.

[0031] Step S10: upon receiving a connection request from a target external device, obtaining a target identifier and a device token of the target external device;

[0032] In one embodiment, the target identifier of the target external device may be a target device identifier or a target user identifier.

[0033] The device token is a legal device token pre-registered in the server. The target device identifier can be the serial number of the target external device or a unique parameter such as a device code. The target user identifier can be the user's facial image information, fingerprint recognition information, iris recognition information, or different forms of passwords, in order to verify the user's identity.

[0034] When sending a Bluetooth connection request, the target external device, such as a smart watch, will use the unique parameters of the smart watch, such as the serial number and device code, as the target device identifier, or the target user identifier, such as the current user's facial image information and fingerprint recognition information collected by the smart watch, and package them and send them to the server or other Bluetooth connection entities.

[0035] In one embodiment, the target external device may include smart electronic products such as smart watches, AR glasses, and VR glasses.

[0036] Among them, smart watches are watches that have information processing capabilities and meet the basic technical requirements of watches. In addition to indicating time, smart watches should also have one or more functions such as reminders, navigation, calibration, monitoring, and interaction; display methods include pointers, numbers, images, etc. AR glasses are a kind of wearable smart electronic product designed and produced based on augmented reality technology. By wearing AR glasses, users can not only see actual objects in reality, but also see virtual objects or images that appear in real scenes. VR glasses use head-mounted display devices to block people's vision and hearing to the outside world, guiding users to have a feeling of being in a virtual environment. The display principle is that the left and right eye screens display the images of the left and right eyes respectively. After the human eye obtains this different information, it produces a three-dimensional sense in the mind.

[0037] Step S20: performing identity verification on the target external device based on the preset Bluetooth connection binding relationship, the target identifier and the device token;

[0038] In one embodiment, the preset Bluetooth connection binding relationship is a Bluetooth binding connection relationship established in advance based on the target identifier and the device token.

[0039] In this embodiment, the subject of Bluetooth connection is a smart phone as an example, and the target external device is a smart glasses as an example. According to the pre-established Bluetooth connection binding relationship, a fixed connection is established between the smart phone and the smart glasses. However, since the target identifier is not limited to the target device identifier, that is, the unique parameters of the smart glasses, such as the serial number or device code, it can be understood that when an illegal user initiates a Bluetooth connection request to the smart phone through the smart glasses in a certain scenario, although the target device identifier of the smart glasses passes the identity verification of the smart phone, there is still a risk of data leakage and data theft. Therefore, the verification process of the target user identifier can be added, that is, while sending the Bluetooth connection instruction through the smart glasses, the user identifier collected by the smart glasses is verified, and the collected user identifier is compared with the user identifier in the preset Bluetooth connection binding relationship. When the target user identifier and the target device identifier are both verified, it is confirmed that the smart glasses have passed the identity verification process.

[0040] Among them, when the target identifier is the target user identifier, the user information of the current user is obtained through the smart glasses. The user information can be the face image information, fingerprint information, etc. of the current user. This type of information is used as the target identifier to verify whether the user currently using the smart glasses is a legitimate user. It can be understood that if the device token passes the verification but the user identifier does not pass the verification, the smartphone will reject the Bluetooth connection request, thereby ensuring that even if the smart glasses are stolen or the device token is stolen, the data security of the Bluetooth connection technology can still be effectively guaranteed.

[0041] Step S30: When the target external device passes the identity verification, establish a Bluetooth connection with the target external device.

[0042] In one embodiment, the target external device is a smart bracelet, and the Bluetooth connection subject is a smart phone. According to the pre-paired Bluetooth connection relationship, when the device token of the smart bracelet and the corresponding target identifier are both verified, it means that the smart bracelet has passed the verification of the smart phone, and a Bluetooth connection is established for data transmission, ensuring the data security of the Bluetooth connection technology.

[0043] The present embodiment discloses a Bluetooth connection method, apparatus, device and storage medium, wherein the Bluetooth connection method includes obtaining a target identifier and a device token of the target external device upon receiving a connection request from the target external device; performing identity verification on the target external device based on a preset Bluetooth connection binding relationship, the target identifier and the device token; and establishing a Bluetooth connection with the target external device when the target external device passes the identity verification. In the above manner, the present application verifies the target identifier and the device token, and after verifying the identity of the target external device according to the preset Bluetooth connection binding relationship, the target identifier and the device token, establishes a Bluetooth connection with the target external device. During the entire verification process, not only is a verification performed on whether the target external device is legal, but also a verification is performed on the device identifier, thereby avoiding the problem of low data security of the Bluetooth connection due to the theft of device information, and improving the data security of the Bluetooth connection technology.

[0044] See also Figure 2 , Figure 2This is a schematic flow chart of a Bluetooth connection method provided in the second embodiment of the present application. The Bluetooth connection method can be applied to a server, and is used to establish a Bluetooth connection with a target external device after verifying the target identifier and the device token, and verifying the identity of the target external device according to a preset Bluetooth connection binding relationship, the target identifier and the device token. During the entire verification process, not only is the legality of the target external device verified, but the device identifier is also verified, thereby avoiding the problem of low data security of the Bluetooth connection caused by the theft of device information in the prior art, and improving the data security of the Bluetooth connection technology.

[0045] based on Figure 1 The embodiment shown, this embodiment Figure 2 As shown, step S10 includes steps S01 to S03.

[0046] Step S01: acquiring a target media access control MAC address based on the Bluetooth broadcast information of the target external device;

[0047] In one embodiment, the Bluetooth broadcast information may be BLE (Bluetooth Low Energy) Bluetooth broadcast information. The target external device is a smart watch, and the Bluetooth connection subject is a smart phone. The smart watch performs BLE broadcasting, and the BLE Bluetooth broadcast information includes the owner of the smart watch (i.e., the target user), the product type, and the supported connection methods, such as whether CTKD (Cross Transport Key Derivation) is supported, whether Gatt over BR / EDR (Generic Attribute Profile based on Basic Rate / Enhanced Data Rate) is supported, whether MFI (Made for iPhone / iPad / iPod, Apple product exclusive certification) certification is passed, and other information.

[0048] MAC address (Media Access Control Address), also known as LAN address, is an address used to identify the location of a network device. MAC address is used to uniquely identify a network card in the network. If a device has one or more network cards, each network card needs and will have a unique MAC address. Each device in the network has a unique network identifier, which is called a MAC address or network card address. It is written inside the hardware by the network equipment manufacturer during production. The MAC address is 48 bits (6 bytes), usually expressed as 12 hexadecimal numbers, with colons separating every 2 hexadecimal numbers, such as 08:00:20:0A:8C:6D is a MAC address.

[0049] The smartwatch broadcasts BLE information, which includes its own MAC address. The smartphone obtains the MAC address of the smartwatch and verifies whether the smartwatch is a legitimate device.

[0050] Step S02: Obtain a public token based on the target MAC address;

[0051] In one embodiment, as described in the above embodiment, the smartphone obtains the MAC address of the smart watch based on the BLE information of the smart watch, uploads the MAC address to the server, and verifies the MAC address through the server. After the server verifies the MAC address, the server sends a public token to the smartphone.

[0052] Step S03: establishing the preset Bluetooth connection binding relationship with the target external device based on the public token, the target identifier and the device token.

[0053] In one embodiment, a symmetric encryption algorithm can be used to establish a preset Bluetooth connection binding relationship. The same token is used for encryption and decryption. In addition to being saved by the smartphone, the smart watch also needs to know the key to decrypt the data. However, if the key is also passed, there is a possibility of password leakage. Therefore, an asymmetric algorithm is used, and the process is as follows:

[0054] First, generate a pair of tokens, namely a public token and a device token;

[0055] Then, send the public key to the smartwatch;

[0056] The smart watch encrypts the data with the received public token and then sends it to the smartphone, thus realizing the binding relationship between the smart watch and the smartphone.

[0057] Because in the asymmetric algorithm, the data encrypted by the device token must be decrypted by the corresponding device token, and the device token is only known to the smart watch, thus ensuring the security of data transmission.

[0058] The present application discloses a Bluetooth connection method, which includes obtaining a target media access control MAC address based on the Bluetooth broadcast information of the target external device; obtaining a public token based on the target MAC address; establishing the preset Bluetooth connection binding relationship with the target external device based on the public token, the target identifier and the device token; upon receiving a connection request from the target external device, obtaining the target identifier and the device token of the target external device; performing identity verification on the target external device based on the preset Bluetooth connection binding relationship, the target identifier and the device token; and establishing a Bluetooth connection with the target external device when the target external device passes the identity verification. In the above manner, the present application first obtains the target MAC address of the target external device to obtain a public token, determines the Bluetooth binding connection relationship through the public token, the target identifier and the device token, and then compares the current target identifier and the device token, and establishes a Bluetooth connection with the target external device after the verification passes. During the entire verification process, the unique MAC address of the external device is obtained based on the Bluetooth broadcast information of the external device. After the public token is obtained based on the MAC address, the device identification is verified, which more comprehensively verifies the external device, avoids the problem of low data security of the Bluetooth connection due to the theft of device information, and improves the data security of Bluetooth connection technology.

[0059] based on Figure 2 In the embodiment shown, in this embodiment, step S02 includes:

[0060] Upload the target MAC address to the server;

[0061] When the target MAC address is verified by the server, the public token is obtained.

[0062] In one embodiment, the target external device is a smart watch, and the Bluetooth connection subject is a smartphone. The relevant App of the preset smartphone starts scanning and parsing the broadcast information in the BLE of the smart watch, and then displays the parsed BLE broadcast information on the connection interface. The parsed Mac address and target identifier are uploaded to the server, and the server returns a public token to the smartphone after identifying the Mac address.

[0063] Through an asymmetric encryption algorithm, after the smartphone obtains the public token, it sends the public token to the smart watch that applies for a Bluetooth connection. After the smart watch receives the public token, it generates an encrypted device token.

[0064] See also Figure 3 , Figure 3This is a schematic flow chart of a Bluetooth connection method provided in the third embodiment of the present application. The Bluetooth connection method can be applied to a server, and is used to establish a Bluetooth connection with the target external device after verifying the target identifier and the device token, and verifying the identity of the target external device according to the preset Bluetooth connection binding relationship, the target identifier and the device token. During the entire verification process, not only is the legality of the target external device verified, but the device identifier is also verified, and an exclusive communication channel is established for sending public tokens and device tokens, thereby avoiding the risk of data loss or theft due to device loss, and improving the data security of Bluetooth connection technology.

[0065] based on Figure 1 The embodiment shown, this embodiment Figure 2 As shown, step S021 is included before step S03.

[0066] Step S021: Based on the target communication channel, the public token and the target identifier are sent to the target external device, and the public token and the target identifier are verified by the target external device.

[0067] In one embodiment, the Bluetooth connection entity of this embodiment takes a smart phone as an example, and the target external device for applying for a Bluetooth connection instruction takes a smart watch as an example. After the smart watch performs BLE broadcast, the corresponding App of the smart phone parses the BLE broadcast information, verifies the target MAC address of the smart watch, and sends a public token to the smart phone if the target MAC address verification passes. At this time, the smart phone needs to send the public token to the smart watch, and there is a need to establish a dedicated communication channel.

[0068] Sending the public token to the smartwatch through a dedicated target communication channel can effectively prevent data theft or loss. After the smartwatch receives the public token through the target communication channel, it verifies the public token and the target identifier. If both pass the verification, a new device token is generated. This device token is equivalent to the private key in the asymmetric encryption algorithm.

[0069] The present application discloses a Bluetooth connection method, apparatus, device and storage medium, wherein the Bluetooth connection method includes obtaining a target media access control MAC address based on the Bluetooth broadcast information of the target external device; obtaining a public token based on the target MAC address; sending the public token and the target identifier to the target external device based on the target communication channel, and verifying the public token and the target identifier through the target external device; establishing the preset Bluetooth connection binding relationship with the target external device based on the public token, the target identifier and the device token; obtaining the target identifier and the device token of the target external device upon receiving a connection request from the target external device; performing identity verification on the target external device based on the preset Bluetooth connection binding relationship, the target identifier and the device token; and establishing a Bluetooth connection with the target external device when the target external device passes the identity verification. In the above manner, the present application first obtains the target MAC address of the target external device to obtain a public token, and transmits the public token, the target identifier and the device token to the target external device through the target communication channel. The Bluetooth binding connection relationship is determined through the public token, target identifier and device token, and then the current target identifier and device token are compared. After verification, a Bluetooth connection with the target external device is established. Establishing a dedicated communication channel for sending public tokens and device tokens can not only efficiently establish a Bluetooth connection relationship between devices, but also reduce the risk of data loss or theft due to device loss.

[0070] See also Figure 4 , Figure 4 This is a schematic flow chart of a Bluetooth connection method provided in the fourth embodiment of the present application. The Bluetooth connection method can be applied to a server, and is used to establish a Bluetooth connection with a target external device after verifying the target identifier and the device token, and verifying the identity of the target external device according to the preset Bluetooth connection binding relationship, the target identifier and the device token. During the entire verification process, not only is the legality of the target external device verified, but the device identifier is also verified, thereby avoiding the problem of low data security of the Bluetooth connection caused by the theft of device information in the prior art, and improving the data security of the Bluetooth connection technology.

[0071] In one embodiment, Figure 4 As shown, before step S021, steps S0211 to S0212 are included.

[0072] Step S0211, sending a serial port communication protocol SPP connection instruction to the first type of external device;

[0073] Step S0212: Based on the SPP connection instruction, establish a low energy consumption technology BLE communication channel with the first type of external device, and use the BLE communication channel as the target communication channel.

[0074] In one embodiment, the first type of external device in this embodiment can be a smart electronic device such as a smartphone, tablet, smart bracelet or smart watch with built-in Android system. Due to the different device attributes of the smart electronic device itself, the corresponding Bluetooth connection protocol is also different, which is different from the current mainstream system IOS (Apple series product operating system) system.

[0075] In one embodiment, the Bluetooth connection subject of this embodiment is an Android smartphone, and the first type of external device is an Android smart watch. SPP (Serial Port Profile) is a protocol for creating serial ports between Bluetooth devices for data transmission.

[0076] The Serial Port Communication Protocol defines the protocols and procedures that should be used by devices that use Bluetooth to emulate an RS232 (Asynchronous Transmission Standard Interface) serial cable. This protocol covers handling the use of Bluetooth applications through a virtual serial port abstraction (which itself depends on the operating system).

[0077] The SPP connection process includes the following steps:

[0078] 1. Create a virtual connection;

[0079] 2. Accept virtual serial port connection;

[0080] 3. Register the service on the local SDP (The Service Discovery protocol) data.

[0081] See also Figure 5 , Figure 5 This is a schematic flow chart of a Bluetooth connection method provided in the fifth embodiment of the present application. The Bluetooth connection method can be applied to a server, and is used to establish a Bluetooth connection with a target external device after verifying the target identifier and the device token according to the preset Bluetooth connection binding relationship, the target identifier and the device token. According to different external devices, corresponding communication channels are established for transmitting device tokens and public tokens. While improving the security of the Bluetooth connection, it can also meet the needs of external devices with different operating systems, expanding the scope of application of the Bluetooth connection method provided by the present application.

[0082] In one embodiment, Figure 5 As shown, before step S211, steps S0213 to S0215 are included.

[0083] Step S0213: receiving a classic Bluetooth connection instruction sent by the second type external device, and establishing a classic Bluetooth connection with the second type external device based on the classic Bluetooth connection instruction;

[0084] In one embodiment, the second type of external device in this embodiment can be an IOS mobile phone. It should be noted that the external device that meets the second type of external device must meet the preset conditions: the external device is MFI certified or does not support CTKD.

[0085] In one embodiment, in this embodiment, the second type of external device is an IOS mobile phone, and the second type of external device is an IOS operating system-based smart watch. The smart watch sends a classic Bluetooth connection instruction to the IOS mobile phone to request and establish a classic Bluetooth connection between the IOS mobile phone.

[0086] Among them, classic Bluetooth generally refers to Bluetooth below version 3.0, which has high power consumption, large data transmission volume, and an effective distance of about 10 meters.

[0087] Step S0214: if the second type external device does not support the cross transmission key CTKD, establish a BLE communication channel with the second type external device, and use the BLE communication channel as the target communication channel;

[0088] In one embodiment, the Bluetooth technology in contrast to classic Bluetooth generally refers to BLE Bluetooth technology, that is, the low-energy Bluetooth technology mentioned in the above embodiment. BLE Bluetooth generally refers to Bluetooth technology of version 4.0 and above, with low power consumption, small data volume, and an effective distance of 40 meters.

[0089] Since the device parameters of the IOS device have different support services, in this embodiment, the IOS mobile phone and the smart watch based on the ISO operating system do not support CTKD as an example. In the case where both do not support CTKD, a BLE communication channel between the two is selected.

[0090] For wireless communication, data is transmitted at a certain frequency. BLE uses a frequency of 2.4GHz, and the frequency band ranges from 2.4000GHz to 2.4835GHz. Within this range, there are 40 channels, of which 37, 38, and 39 are broadcast channels, and the remaining 37 channels are data channels. Before the BLE channel is connected, the IOS phone and the smart watch based on the ISO operating system can exchange data through the broadcast channel (37, 38, and 39 channels), such as sending broadcasts, scanning, and scanning responses. After the connection is established, the IOS phone and the smart watch based on the ISO operating system exchange data on the BLE communication channel.

[0091] BLE data can be summarized as data transmitted on the advertising channel and data transmitted on the data channel.

[0092] Step S0215: When the second type of external device supports the CTKD, a Gatt over BR / EDR communication channel based on a general attribute profile of basic rate / enhanced data rate is established with the second type of external device, and the Gatt over BR / EDR communication channel is used as the target communication channel.

[0093] In one embodiment, CTKD is a cross-transmission key derivation security mechanism introduced in Bluetooth version 4.2, which is mainly used on Bluetooth dual-mode devices. Whether a device supports CTKD depends on the type of operating system of the device itself and the version of the operating system. The current CTKD supports iOS 13.0 and above and Android 11 and above, that is, if the external device meets the requirements of the above operating systems, then the external device is a device that supports CTKD.

[0094] In one embodiment, the Bluetooth connection entity in this embodiment is an IOS mobile phone as an example, and the second type of external device supporting CTKD is an IOS system smart watch as an example. When the smart watch supports CTKD, a Gatt over BR / EDR communication channel is established to transmit the public token, device token, user identifier and data to be transmitted between the IOS mobile phone and the smart watch.

[0095] Gatt is a language package for building low-power Bluetooth peripherals. It has the following features:

[0096] As a peripheral, it is used to create services, receive information, and process requests;

[0097] Serves as a processing center for scanning, connecting, discovering services, and responding.

[0098] The BR / EDR (Basic Rate / Enhanced Data Rate) radio frequency operates in the 2.4 GHz ISM (Industrial Scientific Medical) frequency band.

[0099] based on Figure 1 In the embodiment, in this embodiment, before step S10, the following steps are included:

[0100] Acquire current user information, and use the user information as the target user identifier;

[0101] The current user information includes at least one of user fingerprint information, user facial recognition information, and user iris information.

[0102] In one embodiment, the target identifier may be the current user information, such as user fingerprint information, user facial recognition information, user iris information, and other information that can prove the user's identity. In today's rapidly developing world, some parameters of external devices, such as MAC addresses or serial numbers, that are used to prove the identity of the device may be misappropriated. If the device parameters are misappropriated, a connection may result in data loss or misappropriation, and other unfavorable situations. Therefore, this embodiment is used to add an identification of the user's identity after a Bluetooth connection request is issued to the target external device.

[0103] The user identity may be pre-registered in the server. When the target external device obtains the target user identity of the current user, the target user identity is verified. Only under the premise that the identity of the current user is also a safe identity, a Bluetooth connection is established with the target external device.

[0104] See also Figure 6 , Figure 6 The embodiment of the present application provides a schematic block diagram of a Bluetooth connection device, which is used to execute the aforementioned Bluetooth connection method. The Bluetooth connection device can be configured on a server.

[0105] like Figure 6 As shown, the Bluetooth connection device 400 includes:

[0106] The token and identification acquisition module 410 is used to acquire the target identification and device token of the target external device upon receiving a connection request from the target external device;

[0107] The identity verification module 420 is used to verify the identity of the target external device based on the preset Bluetooth connection binding relationship, the target identifier and the device token;

[0108] The Bluetooth connection module 430 is used to establish a Bluetooth connection with the target external device when the target external device passes the identity verification.

[0109] Furthermore, the Bluetooth connection device 400 further includes:

[0110] A target MAC address acquisition module, used to acquire a target media access control MAC address based on the Bluetooth broadcast information of the target external device;

[0111] A public token acquisition module, used to acquire a public token based on the target MAC address;

[0112] A Bluetooth connection binding relationship establishing module is used to establish the preset Bluetooth connection binding relationship with the target external device based on the public token, the target identifier and the device token.

[0113] Furthermore, the public token acquisition module includes:

[0114] A target MAC address uploading unit, used to upload the target MAC address to a server;

[0115] A public token acquisition unit is used to acquire the public token when the target MAC address is verified by the server.

[0116] Furthermore, the Bluetooth connection device 400 further includes:

[0117] The external device verification module is used to send the public token and the target identifier to the target external device based on the target communication channel, and verify the public token and the target identifier through the target external device.

[0118] Furthermore, the Bluetooth connection device 400 further includes a first communication channel establishment module, which specifically includes:

[0119] An SPP connection instruction sending unit, used for sending a serial communication protocol SPP connection instruction to the first type of external device;

[0120] The first BLE communication channel establishing unit is used to establish a low energy consumption technology BLE communication channel with the first type of external device based on the SPP connection instruction, and use the BLE communication channel as the target communication channel.

[0121] Furthermore, the Bluetooth connection device 400 further includes a second communication channel establishment module, specifically including:

[0122] a classic Bluetooth connection unit, configured to receive a classic Bluetooth connection instruction sent by the second type external device, and establish a classic Bluetooth connection with the second type external device based on the classic Bluetooth connection instruction;

[0123] A second BLE communication channel establishing unit, configured to establish a BLE communication channel with the second type of external device when the second type of external device does not support a cross transmission key CTKD, and use the BLE communication channel as the target communication channel;

[0124] A Gatt over BR / EDR communication channel establishing unit is used to establish a Gatt over BR / EDR communication channel based on a general attribute profile of basic rate / enhanced data rate with the second type of external device when the second type of external device supports the CTKD, and use the Gatt over BR / EDR communication channel as the target communication channel.

[0125] Furthermore, the Bluetooth connection device 400 further includes:

[0126] A target user identification generation module is used to obtain current user information and use the user information as the target user identification;

[0127] The current user information includes user fingerprint information, user facial recognition information, and user iris information.

[0128] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device and each module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0129] The above-mentioned device can be implemented in the form of a computer program. Figure 7 Runs on the computer device shown.

[0130] See also Figure 7 , Figure 7 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.

[0131] See also Figure 7 The computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0132] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any Bluetooth connection method.

[0133] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0134] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any Bluetooth connection method.

[0135] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

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

[0137] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0138] Upon receiving a connection request from a target external device, obtaining a target identifier and a device token of the target external device;

[0139] Based on the preset Bluetooth connection binding relationship, the target identifier and the device token, performing identity verification on the target external device;

[0140] When the target external device passes the identity verification, a Bluetooth connection is established with the target external device.

[0141] In one embodiment, based on the preset Bluetooth connection binding relationship, the target identifier and the device token, before the identity verification of the target external device is performed, it is used to implement:

[0142] Based on the Bluetooth broadcast information of the target external device, obtaining a target media access control MAC address;

[0143] Based on the target MAC address, obtaining a public token;

[0144] Based on the public token, the target identifier and the device token, the preset Bluetooth connection binding relationship with the target external device is established.

[0145] In one embodiment, based on the target MAC address, a public token is obtained to implement:

[0146] Upload the target MAC address to the server;

[0147] When the target MAC address is verified by the server, the public token is obtained.

[0148] In one embodiment, before establishing the preset Bluetooth connection binding relationship with the target external device based on the public token, the target identifier and the device token, it is used to implement:

[0149] Based on the target communication channel, the public token and the target identifier are sent to the target external device, and the public token and the target identifier are verified by the target external device.

[0150] In one embodiment, based on the target communication channel, the public token and the target identifier are sent to the target external device, and before the public token and the target identifier are verified by the target external device, it is used to implement:

[0151] Sending a serial port communication protocol SPP connection instruction to the first type of external device;

[0152] Based on the SPP connection instruction, a low energy consumption technology BLE communication channel is established with the first type of external device, and the BLE communication channel is used as the target communication channel.

[0153] In one embodiment, based on the target communication channel, the public token and the target identifier are sent to the target external device, and before the public token and the target identifier are verified by the target external device, it is used to implement:

[0154] receiving a classic Bluetooth connection instruction sent by the second type external device, and establishing a classic Bluetooth connection with the second type external device based on the classic Bluetooth connection instruction;

[0155] In a case where the second type external device does not support a cross transmission key CTKD, establishing a BLE communication channel with the second type external device, and using the BLE communication channel as the target communication channel;

[0156] In the case that the second type of external device supports the CTKD, a communication channel based on the general attribute profile Gatt over BR / EDR of basic rate / enhanced data rate is established with the second type of external device, and the Gatt over BR / EDR communication channel is used as the target communication channel.

[0157] In one embodiment, when receiving a connection request from a target external device, before obtaining a target identifier and a device token of the target external device, it is used to implement:

[0158] Acquire current user information, and use the user information as the target user identifier;

[0159] The current user information includes user fingerprint information, user facial recognition information, and user iris information.

[0160] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a computer program. The computer program includes program instructions. The processor executes the program instructions to implement any Bluetooth connection method provided in the embodiment of the present application.

[0161] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0162] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A Bluetooth connection method, characterized in that: include: Upon receiving a connection request from a target external device, obtaining a target identifier and a device token of the target external device; Based on the preset Bluetooth connection binding relationship, the target identifier and the device token, performing identity verification on the target external device; When the target external device passes the identity verification, a Bluetooth connection is established with the target external device.

2. The Bluetooth connection method according to claim 1, characterized in that: Before performing identity verification on the target external device based on the preset Bluetooth connection binding relationship, the target identifier and the device token, the method includes: Based on the Bluetooth broadcast information of the target external device, obtaining a target media access control MAC address; Based on the target MAC address, obtaining a public token; Based on the public token, the target identifier and the device token, the preset Bluetooth connection binding relationship with the target external device is established.

3. The Bluetooth connection method according to claim 2, characterized in that: The obtaining of a public token based on the target MAC address includes: Upload the target MAC address to the server; When the target MAC address is verified by the server, the public token is obtained.

4. The Bluetooth connection method according to claim 2, characterized in that: Before establishing the preset Bluetooth connection binding relationship with the target external device based on the public token, the target identifier and the device token, the method includes: Based on the target communication channel, the public token and the target identifier are sent to the target external device, and the public token and the target identifier are verified by the target external device.

5. The Bluetooth connection method according to claim 4, characterized in that: The target external device includes a first type of external device, and the public token and the target identifier are sent to the target external device based on the target communication channel. Before the public token and the target identifier are verified by the target external device, the method includes: Sending a serial port communication protocol SPP connection instruction to the first type of external device; Based on the SPP connection instruction, a low energy consumption technology BLE communication channel is established with the first type of external device, and the BLE communication channel is used as the target communication channel.

6. The Bluetooth connection method according to claim 4, characterized in that: The target external device includes a second type of external device, and the public token and the target identifier are sent to the target external device based on the target communication channel. Before the public token and the target identifier are verified by the target external device, the method includes: receiving a classic Bluetooth connection instruction sent by the second type external device, and establishing a classic Bluetooth connection with the second type external device based on the classic Bluetooth connection instruction; In a case where the second type external device does not support a cross transmission key CTKD, establishing a BLE communication channel with the second type external device, and using the BLE communication channel as the target communication channel; In the case that the second type of external device supports the CTKD, a communication channel based on the general attribute profile Gatt over BR / EDR of basic rate / enhanced data rate is established with the second type of external device, and the Gatt over BR / EDR communication channel is used as the target communication channel.

7. The Bluetooth connection method according to claim 1, characterized in that: The target identifier includes a target user identifier. When receiving a connection request from a target external device, before obtaining the target identifier and a device token of the target external device, the method includes: Acquire current user information, and use the user information as the target user identifier; The current user information includes user fingerprint information, user facial recognition information, and user iris information.

8. A Bluetooth connection device, characterized in that: include: A token and identification acquisition module, used to acquire a target identification and a device token of the target external device upon receiving a connection request from the target external device; An identity verification module, used to verify the identity of the target external device based on a preset Bluetooth connection binding relationship, the target identifier and the device token; The Bluetooth connection module is used to establish a Bluetooth connection with the target external device when the target external device passes the identity verification.

9. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and implement the Bluetooth connection method according to any one of claims 1 to 7 when executing the computer program.

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

Citation Information

Cited By

  • Bluetooth connection control method, device and system

    CN121509953A