WO2021159506A1 - 自动识别身份的方法、装置和芯片 - Google Patents
自动识别身份的方法、装置和芯片 Download PDFInfo
- Publication number
- WO2021159506A1 WO2021159506A1 PCT/CN2020/075363 CN2020075363W WO2021159506A1 WO 2021159506 A1 WO2021159506 A1 WO 2021159506A1 CN 2020075363 W CN2020075363 W CN 2020075363W WO 2021159506 A1 WO2021159506 A1 WO 2021159506A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- ble
- ble terminal
- terminal
- mac address
- determined
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G08—SIGNALLING
- G08C—TRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
- G08C17/00—Arrangements for transmitting signals characterised by the use of a wireless electrical link
- G08C17/02—Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0876—Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
-
- G—PHYSICS
- G08—SIGNALLING
- G08C—TRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
- G08C2201/00—Transmission systems of control signals via wireless link
- G08C2201/60—Security, fault tolerance
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Definitions
- This application relates to the field of Bluetooth technology, and more specifically, to methods, devices, and chips for automatic identification.
- Bluetooth low energy (Bluetooh Low Energy, BLE) technology plays an increasingly important role in wireless transmission applications with low power consumption, flexibility and convenience. It is widely used in applications such as identification and wireless control. Mobile phones use BLE technology. There are more and more scenarios for identification. For example, the mobile phone turns on the Bluetooth door lock, the mobile phone turns on the Bluetooth light, etc. In these applications, the connection control needs to be performed through the application (App) on the mobile phone. Specifically, the user needs to take Out of the mobile phone, open the App used to control the Bluetooth device, connect to the Bluetooth device, and then control the Bluetooth device, the user experience is not good, therefore, how to achieve more convenient identification is an urgent problem to be solved.
- App application
- the present application provides a method, device and chip for automatic identification, which can realize convenient identification, thereby improving user experience.
- an automatic identification method is provided, which is applied to a first Bluetooth low energy BLE end, where the first BLE end is configured as a human-computer interaction device HID, and includes:
- the media access control MAC address of the second BLE terminal is acquired based on the first Bluetooth connection, where the second BLE terminal is bound to the first BLE terminal Ordered equipment;
- the second BLE terminal is a trusted device, it is determined whether the first BLE terminal performs a preset operation.
- the first BLE end is configured to include HID service, battery service, and device information service, and the appearance field in the broadcast data packet sent by the first BLE end is HID to change the The first BLE end is configured as HID.
- the method before the acquiring the MAC address of the second BLE terminal based on the first Bluetooth connection, the method further includes:
- the acquiring the media access control MAC address of the second BLE terminal based on the first Bluetooth connection includes:
- the determining whether the first BLE terminal performs a preset operation according to whether the second BLE terminal is a trusted device includes:
- the second BLE terminal is a trusted device, determine that the first BLE terminal performs the preset operation.
- the second BLE terminal is not a trusted device, it is determined that the first BLE terminal does not perform the preset operation.
- the determining whether the first BLE terminal performs a preset operation according to whether the second BLE terminal is a trusted device includes:
- the time interval between the second BLE terminal being determined to be a trusted device for two consecutive times, and the time interval of the second BLE terminal At least one of the time permissions determines whether the first BLE terminal performs the preset operation.
- the second BLE terminal is determined to be a trusted device twice in a row. At least one of the time interval of and the time authority of the second BLE terminal to determine whether the first BLE terminal performs the preset operation includes:
- the second BLE terminal is a trusted device, and the signal strength of the second BLE terminal is greater than or equal to a preset value, determine that the first BLE terminal performs the preset operation; or
- the second BLE terminal is a trusted device, and the signal strength of the second BLE terminal is less than the preset value, it is determined that the first BLE terminal does not perform the preset operation.
- the second BLE end is a trusted device, and the signal strength of the second BLE end, the second BLE end is determined to be a trusted device between two consecutive times. At least one of the time interval and the time authority of the second BLE terminal to determine whether the first BLE terminal performs the preset operation includes:
- the time interval during which the second BLE end is determined to be a trusted device twice in a row is within the preset time period, determine that the first BLE end does not perform the preset operation;
- the time interval during which the second BLE end is determined to be a trusted device twice in a row is greater than the preset duration, it is determined that the first BLE end performs the preset operation.
- the second BLE end is determined to be a trusted device between two consecutive times. At least one of the time interval and the time authority of the second BLE terminal, determining whether the first BLE terminal performs the preset operation, including: if the second BLE terminal is a trusted device, and the Within the time authority of the second BLE terminal, it is determined that the first BLE terminal performs the preset operation; or
- the second BLE terminal is a trusted device but is not within the time authority range of the second BLE terminal, it is determined that the first BLE terminal does not perform the preset operation.
- the determining whether the second BLE terminal is a trusted device according to the MAC address of the second BLE terminal includes:
- the second BLE end is a trusted device
- the second BLE end is an untrusted device.
- the first BLE terminal is a Bluetooth door lock, and the preset operation is to turn on the Bluetooth door lock; or the first BLE terminal is a Bluetooth light, and the preset operation is to turn on The Bluetooth light.
- an apparatus for automatically identifying an identity is provided.
- the apparatus is configured as a human-computer interaction device HID and includes:
- the storage module is used to store the MAC address list of the equipment successfully bound with the device
- the Bluetooth low energy BLE module is used to obtain the media access control MAC address of the second BLE terminal based on the first Bluetooth connection when the second BLE terminal is close to the device.
- the processing module is configured to determine whether the second BLE terminal is a trusted device according to the MAC address of the second BLE terminal, and determine whether the device performs a preset operation according to whether the second BLE terminal is a trusted device .
- the device is configured to include HID service, battery service, and device information service, and the appearance field in the broadcast data packet sent by the first BLE end is HID. HID.
- the BLE module before the acquiring the MAC address of the second BLE terminal based on the first Bluetooth connection, the BLE module is further configured to:
- the BLE module is also used to:
- the processing module is also used to:
- the second BLE end is a trusted device, determine that the device performs the preset operation
- the second BLE terminal is not a trusted device, it is determined that the device does not perform the preset operation.
- the processing module is also used to:
- the signal strength of the second BLE terminal determines whether the device performs a preset operation.
- the processing module is also used to:
- the second BLE terminal is a trusted device, and the signal strength of the second BLE terminal is greater than or equal to a preset value, determine that the device performs the preset operation; or
- the second BLE terminal is an optional device, and the signal strength of the second BLE terminal is less than the preset value, it is determined that the device does not perform the preset operation.
- the processing module is also used to:
- the time interval during which the second BLE terminal is determined to be a trusted device twice in a row is within the preset time period, determine that the device does not perform the preset operation;
- the time interval during which the second BLE end is determined to be a trusted device twice in a row is greater than the preset duration, it is determined that the device performs the preset operation.
- the processing module is also used to:
- the second BLE terminal is a trusted device and is within the time authority of the second BLE terminal, determine that the device performs the preset operation;
- the second BLE terminal is a trusted device but is not within the time authority range of the second BLE terminal, it is determined that the device does not perform the preset operation.
- the processing module is also used to:
- the second BLE end is a trusted device
- the second BLE end is an untrusted device.
- the device is a Bluetooth door lock, and the preset operation is to turn on the Bluetooth door lock; or the device is a Bluetooth light, and the preset operation is to turn on the Bluetooth light.
- a chip which is used to implement the method in the above-mentioned first aspect or each of its implementation manners.
- the chip includes: a processor, configured to call and run a computer program from the memory, so that the device installed with the chip executes the method in the first aspect or its implementation manners.
- a computer-readable medium for storing a computer program, and the computer program includes instructions for executing the first aspect or any possible implementation of the first aspect.
- a computer program product including instructions is provided.
- the computer runs the instructions of the computer program product
- the computer executes the method in the first aspect or any possible implementation of the first aspect.
- the computer program product may run on the first BLE end of the third aspect.
- the Bluetooth connection with the first BLE end can be automatically established, and further can be based on the MAC of the device
- the address determines whether it is a trusted device, and the operation on the first BLE end can be realized when the device is a trusted device.
- the first BLE end since the first BLE end stores the device’s MAC address, so the user does not need to operate the device to control the first BLE end, which can improve user experience.
- Fig. 1 is a schematic flowchart of a method for automatically identifying an identity according to an embodiment of the present application.
- Fig. 2 is an overall flowchart of an automatic identification method according to an embodiment of the present application.
- Fig. 3 is a schematic structural diagram of an automatic identification device according to an embodiment of the present application.
- the slave device can be, for example, a BLE device such as a Bluetooth door lock and a Bluetooth light
- the master device can be a mobile phone, for example. , Tablet computers and other mobile electronic devices.
- Link Layer Link Layer
- the master device turns on the Bluetooth module, scans the broadcast data packet, and further, the master device sends a connection request to the slave device;
- the slave device receives the connection request from the master device, it can be determined that the master device wants to establish a Bluetooth connection with the slave device, and the slave device returns a connection response to the master device.
- the link layer is located in the controller (Controller) part of the BLE protocol stack, and the specific implementation can refer to related technologies, which will not be repeated here.
- an encrypted link between the BLE devices is established, that is, a pairing process is performed. Mainly divided into three stages:
- the first stage it is used to exchange pairing features to obtain the temporary key TK, specifically, to exchange authentication requirements (authentication requirements) of the two parties and the human-computer interaction capabilities (IO capabilities) of the two parties;
- the TK value of the first stage is used as the secret key of the second stage to calculate the identity confirmation information and generate the short-term key STK, where the identity confirmation value guarantees that the device communicating with itself is the device that needs to be connected to itself , The identity of the other party must be determined. Both the master device and the slave device need to calculate the identity confirmation value to determine whether the other party is the device that needs to be connected.
- the function of STK is that the third stage of the pairing and binding process no longer uses plaintext for data transmission.
- the third stage is the process of device binding.
- the long-term keys used in the encrypted link are calculated, such as LTK, IRK, and CSRK.
- the data transmitted in the third stage passes through the first and second stages.
- the short-term key is encrypted for transmission. Therefore, the data packet transmitted in the third stage is encrypted ciphertext.
- the master device and the slave device will save the long-term key, so that the two devices are successfully bound, or paired successfully. After that, the two can exchange data through the long-term key.
- the plaintext data needs to be encrypted.
- the encryption process takes plaintext data packets as input, and uses long-term secret key encryption to generate ciphertext data packets;
- the opposite end When the opposite end receives the ciphertext data packet, it needs to decrypt the ciphertext data packet.
- the decryption process takes the ciphertext data packet as input and the long-term secret key as the decryption key to generate the plaintext data packet.
- the embodiments of the present application provide a method for automatic identification, which can configure BLE terminals such as Bluetooth door locks as Human Interface Device (HID), so that BLE devices such as mobile phones are close to the first BLE terminal.
- BLE terminals such as Bluetooth door locks as Human Interface Device (HID)
- HID Human Interface Device
- the mobile phone can automatically establish a connection with the Bluetooth door lock, which can further control the opening of the Bluetooth door lock without requiring the user to operate the App, which is conducive to improving the user experience.
- the method 200 may be executed by a first BLE terminal, and the first BLE terminal is configured as an HID.
- the method 200 may include the following contents:
- S202 Determine whether the second BLE end is a trusted device according to the MAC address of the second BLE end;
- S203 Determine whether the first BLE terminal performs a preset operation according to whether the second BLE terminal is a trusted device.
- the method 200 of the embodiment of the present application can be applied to various BLE devices, such as a BLE chip, or a device including a BLE chip, such as a Bluetooth door lock, a Bluetooth lamp, and the like.
- the second BLE end may be, for example, a mobile electronic device such as a mobile phone or a tablet, which is not limited in the embodiment of the present application.
- the first BLE terminal is taken as a slave device, and the second BLE terminal is a master device as an example for description.
- the first BLE terminal and the second BLE terminal may also be BLE chips.
- the first BLE end can be configured as HID.
- HID For the master device, when receiving a broadcast data packet sent by HID, it actively establishes a connection with the HID, that is, the user does not need to open the control
- the HID App only needs to keep the Bluetooth module of the main device turned on.
- the first BLE end can be configured to include HID services, battery (battery) services, and device information (Device Information) services, and the appearance (Appearance) field in the broadcast data packet sent by the first BLE end can be configured.
- HID battery (battery) services
- Device Information Device Information
- the second BLE terminal When the second BLE terminal is close to the first BLE terminal, the second BLE terminal can receive the broadcast data packet sent by the first BLE terminal, and determine that the Appearance field in the broadcast data packet is HID, and the first BLE terminal can be determined
- the BLE end is HID.
- the second BLE end may actively establish a first Bluetooth connection with the first BLE end. Specifically, the second BLE end may send a connection request to the first BLE end, The connection response returned by the first BLE terminal is further received to establish the first Bluetooth connection. After that, the second BLE terminal and the first BLE terminal can exchange data through the first Bluetooth connection, for example, obtain all data.
- the MAC address of the second BLE end The MAC address of the second BLE end.
- the connection request may also include key information that is exchanged when the second BLE end and the first BLE end establish a binding relationship, so that the first BLE end can determine the first BLE end
- the second BLE end is a bound device.
- the first BLE end may also determine whether the second BLE end is a trusted device through the MAC address of the second BLE end, or the MAC address of the second BLE segment and the key information .
- the first Bluetooth connection is an encrypted link, and the data transmitted on the encrypted link may be the long-term key determined when the second BLE end and the first BLE end are paired.
- the third BLE end may use the pairing process in the foregoing embodiment to establish The binding relationship between the third BLE end and the first BLE end, further, the first BLE end may obtain the MAC address of the third BLE end, so that the third BLE end can approach the third BLE end next time.
- the third BLE terminal can actively establish a Bluetooth connection with the first BLE terminal, so that the first BLE terminal can obtain the MAC address of the third BLE terminal based on the Bluetooth connection In order to perform the identity verification of the three BLE ends.
- the first BLE terminal needs to perform password verification to be paired, and the third BLE terminal paired with the first BLE terminal fails the password verification, or fails to connect with the first BLE terminal, or fails to connect with the first BLE terminal. If the pairing of the BLE end fails, all of these may cause the binding of the first BLE end and the third BLE end to fail, and thus the MAC address of the third BLE end cannot be obtained.
- the first BLE end as a Bluetooth door lock and the third BLE end as a mobile phone
- a mobile phone that fails to pair cannot automatically establish a connection with the Bluetooth door lock, and the Bluetooth door lock cannot obtain the MAC address of the mobile phone based on the automatically established connection. .
- the first BLE terminal may obtain the MAC address of the second BLE terminal based on the established first Bluetooth connection.
- the first BLE terminal may use the application program interface (API) of the system. Acquire the MAC address of the second BLE end.
- API application program interface
- the second BLE end can automatically establish a connection with the first BLE end, so that the first BLE end A BLE terminal may obtain the MAC address of the second BLE terminal through the connection to determine whether the second BLE terminal is a trusted device.
- the first BLE end may perform identity verification according to the MAC address of the second BLE end, or may also perform identity verification for other identity information that can identify the device. This application does not Limited to this.
- the MAC address list of the bound device is stored in the first BLE terminal. If the second BLE terminal is a device that has been bound to the first BLE terminal, the first BLE terminal stores the MAC address of the second BLE terminal.
- the embodiment of the present application does not specifically limit the manner in which the second BLE end and the first BLE end establish a binding relationship.
- the pairing process in the foregoing embodiment may be used to establish the binding relationship, or If the binding relationship is established in other ways, the embodiment of the present application is not limited to this.
- the MAC address of the second BLE terminal may be stored when establishing a binding relationship with the second BLE terminal, that is, the first BLE terminal may be stored when establishing a binding relationship with the second BLE terminal Acquire and store the MAC address of the second BLE end, for example, obtain the MAC address of the second BLE end through the API of the system, so that when the next connection is made, the second BLE can be verified by the MAC address of the second BLE end Whether the end is credible.
- the first BLE end may determine whether the first BLE end is a trusted device according to whether the MAC address of the second BLE end is in the stored MAC address list.
- the second BLE end may be determined that the second BLE end is a trusted device.
- the second BLE end is an untrusted device.
- the MAC address of the second BLE end may also be saved to the MAC address list, so that the next time the connection is made, the The second BLE terminal can control the first BLE terminal.
- the Bluetooth connection with the first BLE end can be automatically established.
- the MAC address of the device determines whether the device is a trusted device, and when the device is a trusted device, the control of the first BLE end can be achieved.
- the bound device since the MAC address of the device is stored on the first BLE end, the user does not need to operate the device to control the first BLE end, which can improve the user experience.
- the determining whether the first BLE terminal performs the preset operation according to whether the second BLE terminal is a trusted device includes:
- the signal strength of the second BLE terminal determines whether the first BLE terminal performs the preset operation.
- the first BLE terminal is a Bluetooth door lock
- the preset operation may be to turn on the Bluetooth door lock
- the first BLE terminal is a Bluetooth light
- the preset operation may be to turn on Bluetooth light, when the preset operation is to turn on the Bluetooth light, when a device that has not been bound to the first BLE terminal approaches the Bluetooth light, the Bluetooth light will not turn on.
- the first BLE terminal may check the signal strength of the connection to the second BLE terminal, for example, receive a signal Strength (Received Signal Strength Indicator, RSSI), if the RSSI signal strength is less than a preset value, the first BLE end does not perform the preset operation, for example, if the first BLE end is a Bluetooth door lock, it does not open For the Bluetooth door lock, or if the RSSI signal strength is greater than or equal to a preset value, the first BLE end performs a preset operation, for example, if the first BLE end is a Bluetooth door lock, the Bluetooth door lock is turned on.
- RSSI Received Signal Strength Indicator
- the preset value can be the RSSI value when the distance between the mobile phone and the door lock is 1m, or the RSSI value when the distance between the mobile phone and the door lock is 0.5m, and the user can adjust the preset value according to needs. This embodiment does not limit this.
- the time interval during which the second BLE terminal is determined to be a trusted device twice in a row is within the preset time period, it is determined not to operate the first BLE terminal;
- the time interval during which the second BLE end is determined to be a trusted device twice in a row is greater than the preset duration, it is determined that the first BLE end performs the preset operation.
- the first array and the second array are set.
- the first array is used to store the information of the devices that have been successfully matched, that is, the information of the devices whose MAC addresses are in the MAC address list, or that are determined to be trusted devices.
- Device information the second array is used to store the time count value after the device in the first array is successfully matched.
- the first BLE end determines that the MAC address of the device A is in the MAC address list, that is, the device A is successfully matched, then it searches in the first array to determine whether it has been matched before.
- the time count value corresponding to the device A is obtained in the second array, that is, the time interval from the last successful match to the current successful match, If the time count value is less than or equal to the preset duration, for example, 5 minutes, the first BLE terminal does not perform the preset operation, or if the time count value is greater than the preset duration, the first BLE terminal performs the preset operation, Further, the time count value corresponding to the device A in the second array can also be cleared.
- determining whether the first BLE terminal performs a preset operation according to the time interval during which a device is continuously matched is beneficial to avoid misoperation caused when the device continuously appears near the first BLE terminal.
- the Bluetooth door lock will frequently perform opening operations, but the user’s The real intention is not to open the Bluetooth door lock.
- the time interval may be 10 minutes or half an hour, and the user may also adjust the time interval according to requirements, which is not limited in this embodiment.
- each bound device may correspond to a corresponding time authority.
- the MAC address list includes the MAC addresses of five devices, and the five devices may correspond to corresponding time authority.
- device A corresponds to The time permission of is permanent, the time permission corresponding to device B is 10 days, the time permission corresponding to device C is 1 day, etc.
- the MAC address of the device connected to the first BLE end is in the MAC address list, it can be further combined with the time authority of the device to determine whether the first BLE end performs a preset operation, for example, if the Within the time authority of the device, it can be determined that the first BLE terminal performs the preset operation, such as opening the Bluetooth door lock, otherwise the first BLE terminal does not perform the preset operation, for example, does not open the Bluetooth door lock, so that it can Realize the fine control of different devices on the first BLE end.
- a preset operation for example, if the Within the time authority of the device, it can be determined that the first BLE terminal performs the preset operation, such as opening the Bluetooth door lock, otherwise the first BLE terminal does not perform the preset operation, for example, does not open the Bluetooth door lock, so that it can Realize the fine control of different devices on the first BLE end.
- the first BLE end may also update the MAC address list in combination with the time authority of the device, and when the time authority of a certain device is exceeded, the MAC address of the device is cleared from the MAC address list.
- the devices in the updated MAC address list are all devices within the time authority, and the first BLE terminal can directly determine whether to operate the first BLE terminal according to the MAC address list.
- the first BLE terminal is a Bluetooth door lock, and 5 mobile phones are bound to the Bluetooth door lock, but only one of the 5 mobile phones has the long-term unlock time permission, and the other devices have only 3 days time permission .
- the Bluetooth door lock can learn the time authority of the mobile phone. If the time authority has expired, the corresponding MAC address of the mobile phone can be deleted from the MAC address list, and at the same time
- the mobile phone that is successfully paired with the Bluetooth door lock may also have a key list. After the time authority of the mobile phone expires, the Bluetooth door lock may also delete the key paired with the mobile phone from the key list.
- the slave device sends a broadcast data packet, where the Appearance field in the broadcast data packet is HID.
- the master device when the master device approaches the slave device, it can scan the broadcast data packet. According to the Appearance field in the broadcast data packet as HID, it can be determined that the slave device is HID, and the Bluetooth connection with the slave device can be established. .
- S302 The slave device determines whether to establish a connection with the master device.
- the master device is a bound device, and when the master device is close to the slave device, the master device can actively establish a Bluetooth connection with the slave device.
- the master device is an unbound device, and the user can also manually operate the master device to establish a Bluetooth connection with the slave device.
- the slave device determines whether the master device and the slave device are bound.
- the master device and the slave device may determine whether they are bound by exchanging key information.
- the master device may send to the slave device the key information saved when the binding relationship was established.
- the slave device can verify the key information to determine whether the master device and the slave device are bound.
- the slave device disconnects from the master device.
- the master device that has not established a binding relationship, it can be determined that it must be an untrusted device, and the slave device can disconnect its Bluetooth connection.
- the slave device may also establish the binding relationship between the slave device and the master device through the pairing process described above, so as to execute the subsequent process.
- the slave device obtains the MAC address of the master device.
- the slave device may obtain the MAC address of the master device through the API of the system.
- S307 Store the MAC address in the MAC address list, and further execute S308.
- the slave device may perform a preset operation, such as opening a Bluetooth door lock or Bluetooth.
- the slave device may also determine that the master device is an untrusted device.
- the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application.
- the implementation process constitutes any limitation.
- FIG. 3 is a schematic structural diagram of an apparatus 400 for automatically identifying an identity according to an embodiment of the present application.
- the apparatus is configured as a human-computer interaction device HID, and includes:
- the storage module 410 is configured to store a list of MAC addresses of devices that are successfully bound with the device;
- the Bluetooth low energy BLE module 420 is configured to obtain the media access control MAC address of the second BLE terminal based on the first Bluetooth connection when the second BLE terminal is close to the device, where the second BLE terminal is The equipment bound to the device;
- the processing module 430 is configured to determine whether the second BLE terminal is a trusted device according to the MAC address of the second BLE terminal, and determine whether the apparatus performs preset according to whether the second BLE terminal is a trusted device operate.
- the storage module 410 may be a memory, which may be used to store a computer program
- the processing module 430 may be a processor, which may be used to call and execute the computer program from the memory for executing Figures 1 to 2 show the method steps in the embodiment.
- the device is configured to include HID service, battery service, and device information service, and the appearance field in the broadcast data packet sent by the first BLE end is HID to set the device Configure as HID.
- the BLE module before the acquiring the MAC address of the second BLE terminal based on the first Bluetooth connection, the BLE module is further configured to:
- the BLE module is also used to:
- the processing module is further configured to:
- the second BLE end is a trusted device, determine that the device performs the preset operation
- the second BLE terminal is not a trusted device, it is determined that the device does not perform the preset operation.
- the processing module is further configured to:
- the signal strength of the second BLE terminal determines whether the device performs a preset operation.
- the processing module is further configured to:
- the second BLE terminal is a trusted device, and the signal strength of the second BLE terminal is greater than or equal to a preset value, determine that the device performs the preset operation; or
- the second BLE terminal is an optional device, and the signal strength of the second BLE terminal is less than the preset value, it is determined that the device does not perform the preset operation.
- the processing module is further configured to:
- the time interval during which the second BLE terminal is determined to be a trusted device twice in a row is within the preset time period, determine that the device does not perform the preset operation;
- the time interval during which the second BLE end is determined to be a trusted device twice in a row is greater than the preset duration, it is determined that the device performs the preset operation.
- the processing module is further configured to:
- the second BLE terminal is a trusted device and is within the time authority of the second BLE terminal, determine that the device performs the preset operation;
- the second BLE terminal is a trusted device but is not within the time authority range of the second BLE terminal, it is determined that the device does not perform the preset operation.
- the processing module is further configured to:
- the second BLE end is a trusted device
- the second BLE end is an untrusted device.
- the device is a Bluetooth door lock, and the preset operation is to turn on the Bluetooth door lock; or the device is a Bluetooth light, and the preset operation is to turn on the Bluetooth light .
- the Bluetooth connection with the device can be automatically established, and it can be further determined whether it is based on the MAC address of the device.
- a trusted device when the device is a trusted device, the device can be controlled. For a bound device, since the device's MAC address is stored on the device, the user does not need to operate the device. The device can be controlled and the user experience can be improved.
- the above-mentioned processing module may be an integrated circuit chip with signal processing capability.
- the steps of the foregoing method embodiments may be completed by hardware integrated logic circuits in the processor or instructions in the form of software.
- the above-mentioned processor can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
- DSP Digital Signal Processor
- ASIC application specific integrated circuit
- FPGA ready-made programmable gate array
- the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
- the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
- the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
- the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
- the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
- the above-mentioned storage module may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
- the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), and electrically available Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
- the volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache.
- RAM static random access memory
- DRAM dynamic random access memory
- DRAM synchronous dynamic random access memory
- DDR SDRAM Double Data Rate Synchronous Dynamic Random Access Memory
- Enhanced SDRAM, ESDRAM Enhanced Synchronous Dynamic Random Access Memory
- Synchronous Link Dynamic Random Access Memory Synchronous Link Dynamic Random Access Memory
- DR RAM Direct Rambus RAM
- the embodiment of the present application also provides a chip for implementing the method in the embodiment shown in FIG. 1 and FIG. 2.
- the chip includes: a processor, configured to call and run a computer program from the memory, so that the device installed with the chip executes the method in the foregoing embodiment.
- the embodiments of the present application also provide a computer-readable storage medium for storing computer programs.
- the computer-readable storage medium can be applied to the device in the embodiment of the present application, and the computer program causes the computer to execute the corresponding process implemented by the first BLE end or the second BLE end in each method of the embodiment of the present application. For the sake of brevity, No longer.
- the embodiments of the present application also provide a computer program product, including computer program instructions.
- the computer program product can be applied to the device in the embodiment of the present application, and the computer program instruction causes the computer to execute the corresponding process implemented by the first BLE end or the second BLE end in each method of the embodiment of the present application. For the sake of brevity, This will not be repeated here.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Power Engineering (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
Abstract
提供了一种自动识别身份的方法、装置和芯片,该方法应用于第一蓝牙低功耗BLE端,其中,所述第一BLE端被配置为人机交互设备HID,包括:在第二BLE端靠近所述第一BLE端时,基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC地址,其中,所述第二BLE端为与所述第一BLE端绑定过的设备;根据所述第二BLE端的MAC地址,确定所述第二BLE端是否为可信设备;根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行预设操作。
Description
本申请涉及蓝牙技术领域,并且更具体地,涉及自动识别身份的方法、装置和芯片。
蓝牙低功耗(Bluetooh Low Energy,BLE)技术以低功耗、灵活性和便捷性在无线传输应用中发挥越来越重要的作用,广泛应用于身份识别和无线控制等应用,手机使用BLE技术进行身份识别的场景越来越多,例如,手机打开蓝牙门锁,手机打开蓝牙灯等,在这些应用中,需要通过手机上的应用(Application,App)进行连接控制,具体地,用户需要拿出手机,打开用于控制蓝牙设备的App,连接上蓝牙设备,然后再对蓝牙设备进行控制,用户体验不好,因此,如何实现更加便捷的身份识别是一项亟需解决的问题。
发明内容
本申请提供一种自动识别身份的方法、装置和芯片,能够实现便捷的身份识别,从而能够提升用户体验。
第一方面,提供了一种自动识别身份的方法,应用于第一蓝牙低功耗BLE端,其中,所述第一BLE端被配置为人机交互设备HID,包括:
在第二BLE端靠近所述第一BLE端时,基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC地址,其中,所述第二BLE端为与所述第一BLE端绑定过的设备;
根据所述第二BLE端的MAC地址,确定所述第二BLE端是否为可信设备;
根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行预设操作。
在一些可能的实现方式中,通过配置所述第一BLE端包括HID服务,电池服务和设备信息服务,以及所述第一BLE端所发送的广播数据包中的外观字段为HID以将所述第一BLE端配置为HID。
在一些可能的实现方式中,在所述基于第一蓝牙连接获取所述第二BLE 端的MAC地址之前,所述方法还包括:
建立所述第一BLE端和所述第二BLE端之间的链路层LL连接;
建立所述第一BLE端和所述第二BLE端之间的加密链路以建立所述第一BLE端和所述第二BLE端之间的绑定关系,其中,所述加密链路使用第一密钥加密;
通过所述加密链路获取并存储所述第二BLE端的MAC地址。
在一些可能的实现方式中,所述基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC地址,包括:
向所述第二BLE端发送地址获取请求,所述地址获取请求通过所述第一密钥加密,所述地址获取请求用于请求获取所述第二BLE端的MAC地址;
接收所述第二BLE端发送的地址获取响应,所述地址获取响应包括通过所述第一密钥加密的所述第二BLE端的MAC地址。
在一些可能的实现方式中,所述根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行预设操作,包括:
若所述第二BLE端为可信设备,确定所述第一BLE端执行所述预设操作;或者
若所述第二BLE端不为可信设备,确定所述第一BLE端不执行所述预设操作。
在一些可能的实现方式中,所述根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行预设操作,包括:
根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次被确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作。
在一些可能的实现方式中,所述根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次被确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作,包括:
若确定所述第二BLE端为可信设备,并且所述第二BLE端的信号强度大于或等于预设值,确定所述第一BLE端执行所述预设操作;或者
若确定所述第二BLE端为可信设备,并且所述第二BLE端的信号强度 小于所述预设值,确定所述第一BLE端不执行所述预设操作。
在一些可能的实现方式中,所述根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作,包括:
若所述第二BLE端连续两次被确定为可信设备的时间间隔在所述预设时长内,确定所述第一BLE端不执行所述预设操作;或者
若所述第二BLE端连续两次被确定为可信设备的时间间隔大于所述预设时长,确定所述第一BLE端执行所述预设操作。
在一些可能的实现方式中,所述根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作,包括:若所述第二BLE端为可信设备,并且在所述第二BLE端的时间权限范围内,确定所述第一BLE端执行所述预设操作;或者
若所述第二BLE端为可信设备,但不在所述第二BLE端的时间权限范围内,确定所述第一BLE端不执行所述预设操作。
在一些可能的实现方式中,所述根据所述第二BLE端的MAC地址,确定所述第二BLE端是否为可信设备,包括:
若所述第二BLE端的MAC地址在预存的MAC地址列表中,确定所述第二BLE端为可信设备;或者
若所述第二BLE端的MAC地址不在预存的MAC地址列表中,确定所述第二BLE端为不可信设备。
在一些可能的实现方式中,所述第一BLE端为蓝牙门锁,所述预设操作为开启所述蓝牙门锁;或者所述第一BLE端为蓝牙灯,所述预设操作为开启所述蓝牙灯。
第二方面,提供了一种自动识别身份的装置,所述装置被配置为人机交互设备HID,包括:
存储模块,用于存储与所述装置绑定成功的设备的MAC地址列表;
蓝牙低功耗BLE模块,用于在第二BLE端靠近所述装置时,基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC地址,其中,所述第二 BLE端为与所述装置绑定过的设备;
处理模块,用于根据所述第二BLE端的MAC地址,确定所述第二BLE端是否为可信设备,根据所述第二BLE端是否为可信设备,确定所述装置是否执行预设操作。
在一些可能的实现方式中,通过配置所述装置包括HID服务,电池服务和设备信息服务,以及所述第一BLE端所发送的广播数据包中的外观字段为HID以将所述装置配置为HID。
在一些可能的实现方式中,在所述基于第一蓝牙连接获取所述第二BLE端的MAC地址之前,所述BLE模块还用于:
建立所述装置和所述第二BLE端之间的链路层LL连接;
建立所述装置和所述第二BLE端之间的加密链路以建立所述装置和所述第二BLE端之间的绑定关系,其中,所述加密链路使用第一密钥加密;
通过所述加密链路获取并存储所述第二BLE端的MAC地址。
在一些可能的实现方式中,所述BLE模块还用于:
向所述第二BLE端发送地址获取请求,所述地址获取请求通过所述第一密钥加密,所述地址获取请求用于请求获取所述第二BLE端的MAC地址;
接收所述第二BLE端发送的地址获取响应,所述地址获取响应包括通过所述第一密钥加密的所述第二BLE端的MAC地址。
在一些可能的实现方式中,所述处理模块还用于:
若所述第二BLE端为可信设备,确定所述装置执行所述预设操作;或者
若所述第二BLE端不为可信设备,确定所述装置不执行所述预设操作。
在一些可能的实现方式中,所述处理模块还用于:
根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述装置是否执行预设操作。
在一些可能的实现方式中,所述处理模块还用于:
若确定所述第二BLE端为可信设备,并且所述第二BLE端的信号强度大于或等于预设值,确定所述装置执行所述预设操作;或者
若确定所述第二BLE端为可选设备,并且所述第二BLE端的信号强度小于所述预设值,确定所述装置不执行所述预设操作。
在一些可能的实现方式中,所述处理模块还用于:
若所述第二BLE端连续两次被确定为可信设备的时间间隔在所述预设时长内,确定所述装置不执行所述预设操作;或者
若所述第二BLE端连续两次被确定为可信设备的时间间隔大于所述预设时长,确定所述装置执行所述预设操作。
在一些可能的实现方式中,所述处理模块还用于:
若所述第二BLE端为可信设备,并且在所述第二BLE端的时间权限范围内,确定所述装置执行所述预设操作;或者
若所述第二BLE端为可信设备,但不在所述第二BLE端的时间权限范围内,确定所述装置不执行所述预设操作。
在一些可能的实现方式中,所述处理模块还用于:
若所述第二BLE端的MAC地址在预存的MAC地址列表中,确定所述第二BLE端为可信设备;或者
若所述第二BLE端的MAC地址不在预存的MAC地址列表中,确定所述第二BLE端为不可信设备。
在一些可能的实现方式中,所述装置为蓝牙门锁,所述预设操作为开启所述蓝牙门锁;或所述装置为蓝牙灯,所述预设操作为开启所述蓝牙灯。
第三方面,提供了一种芯片,用于实现上述第一方面或其各实现方式中的方法。具体地,该芯片包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片的设备执行如上述第一方面或其各实现方式中的方法。
第四方面,提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的指令。
第五方面,提供了一种包括指令的计算机程序产品,当计算机运行所述计算机程序产品的所述指时,所述计算机执行上述第一方面或第一方面的任意可能的实现方式中的方法。具体地,该计算机程序产品可以运行于上述第三方面的第一BLE端上。
基于上述技术方案,通过将第一BLE端配置为HID,在绑定过的设备靠近所述第一BLE端时,可以自动建立与所述第一BLE端的蓝牙连接,进一步可以根据该设备的MAC地址确定是否为可信设备,在该设备为可信设 备的情况下即可实现对所述第一BLE端的操作,这样,对于绑定过的设备,由于第一BLE端上存储有该设备的MAC地址,因此不需用户操作该设备即可实现对第一BLE端的控制,能够提升用户体验。
图1是根据本申请实施例的自动识别身份的方法的示意性流程图。
图2是本申请实施例的自动识别的方法的整体流程图。
图3是本申请实施例的自动识别身份的装置的示意性结构图。
下面将结合附图,对本发明实施例中的技术方案进行描述。
在基于BLE技术的无线数据传输中,存在两种角色:从(slave)设备和主(master)设备,其中,slave设备例如可以为蓝牙门锁和蓝牙灯等BLE设备,主设备例如可以为手机,平板电脑等移动电子设备。
以下,对BLE设备之间的配对过程进行描述。
首先,建立BLE设备之间的链路层(Link Layer,LL)连接;
具体地,从设备发送广播数据包(advertising packets);
在想要与该从设备建立蓝牙连接的情况下,主设备打开蓝牙模块,扫描该广播数据包,进一步地,主设备向从设备发送连接请求;
若从设备接收到主设备的连接请求,可以确定主设备想要与从设备建立蓝牙连接,从设备向主设备回复连接响应。
至此,从设备和主设备之间建立LL连接,期间二者进行信息交互使用的是明文数据,即非加密数据。其中,链路层位于BLE协议栈的控制器(Controller)部分,具体实现可以参考相关技术,这里不作赘述。
进一步地,基于该LL连接,建立所述BLE设备之间的加密链路,即进行配对过程。主要分为三个阶段:
第一阶段,用于交换配对特征以得到临时密钥TK,具体地,交换双方有关鉴权的需求(authentication requirements),以及双方具有的人机交互能力(IO capabilities);
第二阶段,根据第一阶段的TK值作为第二阶段的秘钥,以计算身份确认信息以及生成短期密钥STK,其中,该身份确认值为了保证和自身通信的 设备是自身需要连接的设备,必须确定对方的身份,主设备和从设备都需要计算身份确认值,从而确定对方是否为所需要连接的设备,STK的作用是配对绑定过程的第三阶段不再使用明文进行数据传输。
第三阶段是设备绑定的过程,这期间会计算加密链路中使用到的长期密钥,例如LTK、IRK以及CSRK等,该第三阶段传输的数据是通过第一阶段、第二阶段的短期密钥进行加密传输的,因此,第三阶段传输的数据包为加密的密文,主设备和从设备会将长期秘钥进行保存,这样两个设备就绑定成功了,或者说配对成功了,之后二者可以通过该长期密钥进行数据交互。
具体地,当有明文数据包需要发送的时候,需要对该明文数据进行加密。加密的过程,是以明文数据包作为输入,以长期秘钥加密生成密文数据包;
对端当收到密文数据包时,需要对密文数据包进行解密。解密的过程,是以密文数据包为输入,以长期秘钥作为解密秘钥,生成明文数据包。
应理解,以上仅示例了一种BLE设备之间的配对过程,本申请实施例的BLE设备也可以采用其他配对过程进行配对,本申请并不限于此。
由此可见,主设备和从设备之间进行正常的数据通信之前,需要经过复杂的配对验证过程,例如,若手机向控制蓝牙门锁开启,则需要用户打开手机的蓝牙模块,打开控制蓝牙门锁的开启的App,进一步与蓝牙门锁建立连接,验证通过,才能控制蓝牙门锁开启,对于用户来讲,操作不便捷,使用体验不好。
有鉴于此,本申请实施例提供了一种自动识别身份的方法,能够将蓝牙门锁等BLE端配置为人机交互设备(Human Interface Device,HID),这样在手机等BLE设备靠近第一BLE端时,只要该手机的蓝牙模块处于打开状态,手机能够自动与蓝牙门锁建立连接,进一步可以控制蓝牙门锁的开启,不需要用户操作App,有利于提升用户体验。
以下,结合图1,说明根据本申请实施例的自动识别身份的方法200。该方法200可以由第一BLE端执行,该第一BLE端被配置为HID,该方法200可以包括如下内容:
S201,在第二BLE端靠近所述第一BLE端时,基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC(Media Access Control)地址,其中,所述第二BLE端为与所述第一BLE端绑定过的设备;
S202,根据所述第二BLE端的MAC地址,确定所述第二BLE端是否 为可信设备;
S203,根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行预设操作。
应理解,本申请实施例的方法200可以应用于各种BLE设备,例如,BLE芯片,或者包括BLE芯片的设备,例如蓝牙门锁,蓝牙灯等。所述第二BLE端例如可以为手机,平板等移动电子设备,本申请实施例对此不作限定。
在本申请实施例中,以所述第一BLE端为从设备,所述第二BLE端为主设备为例进行说明,第一BLE端和第二BLE端也可以是BLE芯片。
在本申请实施例中,所述第一BLE端可以被配置为HID,对于主设备而言,当接收到HID发送的广播数据包时,主动与所述HID建立连接,即不需要用户打开控制该HID的App,只需保持该主设备的蓝牙模块打开即可。
具体地,可以配置该第一BLE端包括HID服务,电池(battery)服务和设备信息(Device Information)服务,以及可以配置所述第一BLE端发送的广播数据包中的外观(Appearance)字段可以设置为HID。
当第二BLE端靠近该第一BLE端时,该第二BLE端可以接收所述第一BLE端发送的广播数据包,确定所述广播数据包中的Appearance字段为HID,可以确定该第一BLE端为HID,进一步地,所述第二BLE端可以主动建立与所述第一BLE端的第一蓝牙连接,具体地,所述第二BLE端可以向所述第一BLE端发送连接请求,进一步接收所述第一BLE端回复的连接响应以建立所述第一蓝牙连接,之后所述第二BLE端和所述第一BLE端可以通过所述第一蓝牙连接进行数据交互,例如获取所述第二BLE端的MAC地址。在一些实施例中,所述连接请求还可以包括所述第二BLE端和所述第一BLE端建立绑定关系时所交互的密钥信息,以便于所述第一BLE端确定所述第二BLE端为绑定过的设备。也就是说,所述第一BLE端也可以通过所述第二BLE端的MAC地址,或者所述第二BLE段的MAC地址以及所述密钥信息确定所述第二BLE端是否为可信设备。应理解,所述第一蓝牙连接是一条加密链路,该加密链路上传输的数据可以是第二BLE端和第一BLE端进行配对时所确定的长期密钥。
在另一些实施例中,当未与所述第一BLE端建立绑定关系的第三BLE 端靠近所述第一BLE端时,所述第三BLE端可以采用前述实施例中的配对过程建立所述第三BLE端和所述第一BLE端的绑定关系,进一步地,所述第一BLE端可以获取所述第三BLE端的MAC地址,以便于在所述第三BLE端下次靠近所述第一BLE端时,所述第三BLE端能够主动建立与所述第一BLE端之间的蓝牙连接,从而所述第一BLE端可以基于该蓝牙连接获取所述第三BLE端的MAC地址以进行所述三BLE端的身份验证。
在其他实施例中,第一BLE端需要进行密码验证才能配对,与所述第一BLE端配对的第三BLE端密码验证失败,或者与所述第一BLE端连接失败,或者与所述第一BLE端配对失败,这些都可以导致所述第一BLE端和所述第三BLE端绑定失败,也就不能获取所述第三BLE端的MAC地址。以第一BLE端为蓝牙门锁和第三BLE端为手机为例,配对失败的手机不能自动与蓝牙门锁建立连接,则蓝牙门锁也就不能基于自动建立的连接获取该手机的MAC地址。
进一步地,所述第一BLE端可以基于建立的所述第一蓝牙连接获取所述第二BLE端的MAC地址,例如,所述第一BLE端可以通过***的应用程序接口(Application Interface,API)获取所述第二BLE端的MAC地址。
也就是说,与所述第一BLE端绑定过的第二BLE端靠近所述第一BLE端时,所述第二BLE端可以自动与所述第一BLE端建立连接,从而所述第一BLE端可以通过所述连接获取所述第二BLE端的MAC地址,以确定所述第二BLE端是否为可信设备。
应理解,在本申请实施例中,所述第一BLE端可以根据所述第二BLE端的的MAC地址进行身份验证,或者也可以为其他能够标识设备的身份信息进行身份验证,本申请并不限于此。
在本申请实施例中,所述第一BLE端中存储有绑定过的设备的MAC地址列表。所述第二BLE端为与所述第一BLE端绑定过的设备,则所述第一BLE端保存有所述第二BLE端的MAC地址。
应理解,本申请实施例并不具体限定所述第二BLE端和所述第一BLE端建立绑定关系的方式,例如,可以是采用前述实施例中的配对过程建立绑定关系的,或者通过其他方式建立绑定关系的,本申请实施例并不限于此。
所述第二BLE端的MAC地址可以是在与所述第二BLE端建立绑定关系时存储的,也就是说,所述第一BLE端在建立与所述第二BLE端的绑定 关系时可以获取并存储所述第二BLE端的MAC地址,例如,通过***的API获取所述第二BLE端的MAC地址,这样,在下次连接时,通过该第二BLE端的MAC地址即可验证该第二BLE端是否可信。
在一些实施例中,所述第一BLE端可以根据所述第二BLE端的MAC地址是否在存储的MAC地址列表中,确定所述第一BLE端是否为可信设备。
作为一个示例,若所述第二BLE端的MAC地址在所述MAC地址列表中,则可以确定所述第二BLE端为可信设备。
作为另一示例,若所述第二BLE端的MAC地址不在所述MAC地址列表中,则可以确定该第二BLE端为不可信设备。
作为再一示例,若所述第二BLE端的MAC地址不在所述MAC地址列表中,也可以将所述第二BLE端的MAC地址保存至所述MAC地址列表,以便于下次连接时,所述第二BLE端可以控制所述第一BLE端。
因此,在本申请实施例中,通过将第一BLE端配置为HID,在绑定过的设备靠近所述第一BLE端时,可以自动建立与所述第一BLE端的蓝牙连接,进一步可以根据该设备的MAC地址确定该设备是否为可信设备,在该设备为可信设备的情况下即可实现对所述第一BLE端的控制。对于绑定过的设备,由于第一BLE端上存储有该设备的MAC地址,因此不需用户操作该设备即可实现对第一BLE端的控制,能够提升用户体验。
可选地,在本申请另一些实施例中,所述根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行所述预设操作,包括:
根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作。
在一些实施例中,所述第一BLE端为蓝牙门锁,所述预设操作可以为开启所述蓝牙门锁,或者所述第一BLE端为蓝牙灯,所述预设操作可以为开启蓝牙灯,当预设操作为开启蓝牙灯时,当未与第一BLE端绑定过的设备接近蓝牙灯时,蓝牙灯也不会开启。
在一些实施例中,当第二BLE端与所述第一BLE端建立所述第一蓝牙连接后,所述第一BLE端可以检查其连接所述第二BLE端的信号强度,例如,接收信号强度(Received Signal Strength Indicator,RSSI),若该RSSI 信号强度小于预设值,则所述第一BLE端不执行预设操作,例如,若所述第一BLE端为蓝牙门锁,则不开启所述蓝牙门锁,或者若该RSSI信号强度大于或等于预设值,则所述第一BLE端执行预设操作,例如若所述第一BLE端为蓝牙门锁,则开启蓝牙门锁。根据连接的设备的信号强度确定是否操作该第一BLE端,有利于避免在该设备距离该第一BLE端较远时开启该第一BLE端出现安全问题,特别是在蓝牙门锁的应用中,若距离较远的时候,用户的手机与蓝牙门锁建立连接,并且用户的手机是与蓝牙门锁绑定过的设备,则蓝牙门锁会在用户距离较远的时候打开,会带来安全问题,本实施例中,所述预设值可以为手机与门锁距离1m的时候的RSSI值,也可以是手机与门锁距离0.5m的RSSI值,用户可以根据需求调整该预设值,本实施例对此不做限定。
在另一些实施例中,若所述第二BLE端连续两次被确定为可信设备的时间间隔在所述预设时长内,确定不操作述第一BLE端;或者
若所述第二BLE端连续两次被确定为可信设备的时间间隔大于所述预设时长,确定所述第一BLE端执行所述预设操作。
具体地,设置第一数组和第二数组,第一数组用于存储已经匹配成功的设备的信息,即设备的MAC地址在MAC地址列表中的设备的信息,或者说,确定为可信设备的设备信息,第二数组用于存储从第一数组中的设备匹配成功后的时间计数值。
举例说明,若设备A靠近第一BLE端,第一BLE端确定设备A的MAC地址在MAC地址列表中,即设备A匹配成功,则在第一数组中进行查找,确定之前是否已经匹配过该设备A,如果在该第一数组中查找到该设备A,则在该第二数组中获取该设备A对应的时间计数值,即从上一次匹配成功到本次匹配成功之间的时间间隔,如果该时间计数值小于或等于预设时长,例如5分钟,则该第一BLE端不执行预设操作,或者若时间计数值大于该预设时长,则该第一BLE端执行预设操作,进一步地,还可以清零该第二数组中该设备A对应的时间计数值。
因此,根据一个设备连续被匹配成功的时间间隔确定所述第一BLE端是否执行预设操作,有利于避免该设备连续出现在该第一BLE端附近时导致的误操作。例如,在蓝牙门锁的应用场景中,若用户持手机在蓝牙门锁附近徘徊,该用户的手机是与蓝牙门锁绑定过的设备,则蓝牙门锁会频繁执行 开启操作,但用户的真实意愿并不是要开启蓝牙门锁,在本实施例中,通过配置一定时间内连续的匹配成功不触发开锁操作,有利于避免上述问题。可选地,在一些实施例中,所述时间间隔可以为10分钟,或者半小时,用户也可以根据需求调整该时间间隔,本实施例对此不做限定。
在一些实施例中,每个绑定的设备可以对应相应的时间权限,例如,MAC地址列表中包括5个设备的MAC地址,该5个设备可以分别对应相应的时间权限,例如,设备A对应的时间权限为永久,设备B对应的时间权限为10天,设备C对应的时间权限为1天等。
这样,在确定所述第一BLE端连接的设备的MAC地址在MAC地址列表中后,还可以进一步结合该设备的时间权限,确定该第一BLE端是否执行预设操作,例如,若在该设备的时间权限内,可以确定该第一BLE端执行所述预设操作,例如打开蓝牙门锁,否则该第一BLE端不执行所述预设操作,例如,不打开蓝牙门锁,从而能够实现不同设备对于第一BLE端的精细化控制。
在另一些实施例中,该第一BLE端也可以结合设备的时间权限,更新MAC地址列表,在超过某个设备的时间权限时,将该设备的MAC地址从该MAC地址列表中清除,这样,该更新后的MAC地址列表中的设备均为在时间权限内的设备,该第一BLE端可以直接根据该MAC地址列表确定是否操作该第一BLE端。例如,所述第一BLE端为蓝牙门锁,有5个手机和蓝牙门锁进行了绑定,但5个手机中只有一个手机A具有长期开锁的时间权限,其他设备只有3天的时间权限。当手机和蓝牙门锁自动连接获取该手机的MAC地址后,该蓝牙门锁能够获知该手机的时间权限,如果时间权限已过期,可以将该手机对应MAC地址从MAC地址列表中删除,同时与该蓝牙门锁配对成功的手机也可以具有密钥列表,在该手机的时间权限过期后,该蓝牙门锁也可以将与该手机配对的密钥从密钥列表中删除。
以下,结合图2,从主设备和从设备的角度,说明本申请实施例的自动识别身份的方法的整体流程,但本申请实施例并不限于此。
S301,从设备发送广播数据包,所述广播数据包中的Appearance字段为HID。
对应地,主设备在靠近所述从设备时,可以扫描该广播数据包,根据该广播数据包中的Appearance字段为HID可以确定该从设备为HID,则可以 建立与所述从设备的蓝牙连接。
S302,从设备确定是否与主设备建立连接。
情况1,所述主设备为绑定过的设备,在所述主设备靠近所述从设备时,则所述主设备可以主动建立与所述从设备之间的蓝牙连接。
情况2:所述主设备为未绑定过的设备,用户也可以手动操作该主设备与从设备建立蓝牙连接。
情况3,若没有主设备靠近所述从设备,则没有主设备与所述从设备建立连接。
若从设备和主设备之间建立连接,则执行S303,否则返回S301。
进一步地,在S303中,从设备确定所述主设备和所述从设备是否绑定。
若是,则执行S305,否则执行S304。
作为一个示例,所述主设备和从设备可以通过交互密钥信息确定二者是否绑定,例如,所述主设备可以向所述从设备发送之前建立绑定关系时所保存的密钥信息,从设备可以验证该密钥信息确定该主设备和从设备是否绑定。
在S304中,所述从设备断开与所述主设备之间的连接。
即对于未建立绑定关系的主设备,可以确定其必然为不可信设备,则从设备可以断开与其的蓝牙连接。
或者,在其他实施例中,所述从设备也可以通过前文所描述的配对过程建立所述从设备和所述主设备之间的绑定关系,以便执行后续的流程。
在S305中,所述从设备获取所述主设备的MAC地址。
例如,所述从设备可以通过***的API获取所述主设备的MAC地址。
进一步地,在S306中,确定所述主设备的MAC地址是否在存储的MAC地址列表中。
若是,则执行S308,否则,执行S307。
S307,将该MAC地址存储在所述MAC地址列表中,进一步执行S308。
S308中,确定所述主设备为可信设备。
进一步地,可以所述从设备执行预设操作,例如打开蓝牙门锁或蓝牙等。
或者,在其他实施例中,若所述MAC地址不在存储的地址列表中,所述从设备也可以确定所述主设备为不可信设备。
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
并且,在不冲突的前提下,本申请描述的各个实施例和/或各个实施例中的技术特征可以任意的相互组合,组合之后得到的技术方案也应落入本申请的保护范围。
上文结合图1至图2,详细描述了本申请的方法实施例,下文结合图3,描述根据本申请实施例的装置,方法实施例所描述的技术特征适用于以下装置实施例,为了简洁,这里不再赘述。
图3是根据本申请实施例的自动识别身份的装置400的示意性结构图,所述装置被配置为人机交互设备HID,包括:
存储模块410,用于存储与所述装置绑定成功的设备的MAC地址列表;
蓝牙低功耗BLE模块420,用于在第二BLE端靠近所述装置时,基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC地址,其中,所述第二BLE端为与所述装置绑定过的设备;
处理模块430,用于根据所述第二BLE端的MAC地址,确定所述第二BLE端是否为可信设备,根据所述第二BLE端是否为可信设备,确定所述装置是否执行预设操作。
在一些实施例中,所述存储模块410可以为存储器,可以用于存储计算机程序,所述处理模块430可以为处理器,用于从所述存储器中调用并执行所述计算机程序,用于执行图1至图2所示实施例中的方法步骤。
可选地,在一些实施例中,通过配置所述装置包括HID服务,电池服务和设备信息服务,以及所述第一BLE端所发送的广播数据包中的外观字段为HID以将所述装置配置为HID。
可选地,在一些实施例中,在所述基于第一蓝牙连接获取所述第二BLE端的MAC地址之前,所述BLE模块还用于:
建立所述装置和所述第二BLE端之间的链路层LL连接;
建立所述装置和所述第二BLE端之间的加密链路以建立所述装置和所述第二BLE端之间的绑定关系,其中,所述加密链路使用第一密钥加密;
通过所述加密链路获取并存储所述第二BLE端的MAC地址。
可选地,在一些实施例中,所述BLE模块还用于:
向所述第二BLE端发送地址获取请求,所述地址获取请求通过所述第一密钥加密,所述地址获取请求用于请求获取所述第二BLE端的MAC地址;
接收所述第二BLE端发送的地址获取响应,所述地址获取响应包括通过所述第一密钥加密的所述第二BLE端的MAC地址。
可选地,在一些实施例中,所述处理模块还用于:
若所述第二BLE端为可信设备,确定所述装置执行所述预设操作;或者
若所述第二BLE端不为可信设备,确定所述装置不执行所述预设操作。
可选地,在一些实施例中,所述处理模块还用于:
根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述装置是否执行预设操作。
可选地,在一些实施例中,所述处理模块还用于:
若确定所述第二BLE端为可信设备,并且所述第二BLE端的信号强度大于或等于预设值,确定所述装置执行所述预设操作;或者
若确定所述第二BLE端为可选设备,并且所述第二BLE端的信号强度小于所述预设值,确定所述装置不执行所述预设操作。
可选地,在一些实施例中,所述处理模块还用于:
若所述第二BLE端连续两次被确定为可信设备的时间间隔在所述预设时长内,确定所述装置不执行所述预设操作;或者
若所述第二BLE端连续两次被确定为可信设备的时间间隔大于所述预设时长,确定所述装置执行所述预设操作。
可选地,在一些实施例中,所述处理模块还用于:
若所述第二BLE端为可信设备,并且在所述第二BLE端的时间权限范围内,确定所述装置执行所述预设操作;或者
若所述第二BLE端为可信设备,但不在所述第二BLE端的时间权限范围内,确定所述装置不执行所述预设操作。
可选地,在一些实施例中,所述处理模块还用于:
若所述第二BLE端的MAC地址在预存的MAC地址列表中,确定所述第二BLE端为可信设备;或者
若所述第二BLE端的MAC地址不在预存的MAC地址列表中,确定所 述第二BLE端为不可信设备。
可选地,在一些实施例中,所述装置为蓝牙门锁,所述预设操作为开启所述蓝牙门锁;或所述装置为蓝牙灯,所述预设操作为开启所述蓝牙灯。
因此,在本申请实施例中,通过将装置配置为HID,在绑定过的设备靠近所述装置时,可以自动建立与所述装置的蓝牙连接,进一步可以根据该设备的MAC地址确定是否为可信设备,在该设备为可信设备的情况下即可实现对所述装置的控制,对于绑定过的设备,由于装置上存储有该设备的MAC地址,因此不需用户操作该设备即可实现对装置的控制,能够提升用户体验。
上述的处理模块可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
上述的存储模块可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。
本申请实施例还提供了一种芯片,用于实现上述图1和图2所示实施例中的方法。具体地,该芯片包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片的设备执行如上述实施例中的方法。
本申请实施例还提供了一种计算机可读存储介质,用于存储计算机程序。该计算机可读存储介质可应用于本申请实施例中的装置,并且该计算机程序使得计算机执行本申请实施例的各个方法中由第一BLE端或者第二BLE端实现的相应流程,为了简洁,不再赘述。
本申请实施例还提供了一种计算机程序产品,包括计算机程序指令。该计算机程序产品可应用于本申请实施例中的装置,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由第一BLE端或者第二BLE端实现的相应流程,为了简洁,在此不再赘述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例中的具体的例子只是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围,本领域技术人员可以在上述实施例的基础上进行各种改进和变形,而这些改进或者变形均落在本申请的保护范围内。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
Claims (23)
- 一种自动识别身份的方法,其特征在于,应用于第一蓝牙低功耗BLE端,其中,所述第一BLE端被配置为人机交互设备HID,包括:在第二BLE端靠近所述第一BLE端时,基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC地址,其中,所述第二BLE端为与所述第一BLE端绑定过的设备;根据所述第二BLE端的MAC地址,确定所述第二BLE端是否为可信设备;根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行预设操作。
- 根据权利要求1所述的方法,其特征在于,通过配置所述第一BLE端包括HID服务,电池服务和设备信息服务,以及所述第一BLE端所发送的广播数据包中的外观字段为HID以将所述第一BLE端配置为HID。
- 根据权利要求1或2所述的方法,其特征在于,在所述基于第一蓝牙连接获取所述第二BLE端的MAC地址之前,所述方法还包括:建立所述第一BLE端和所述第二BLE端之间的链路层LL连接;建立所述第一BLE端和所述第二BLE端之间的加密链路以建立所述第一BLE端和所述第二BLE端之间的绑定关系,其中,所述加密链路使用第一密钥加密;通过所述加密链路获取并存储所述第二BLE端的MAC地址。
- 根据权利要求3所述的方法,其特征在于,所述基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC地址,包括:向所述第二BLE端发送地址获取请求,所述地址获取请求通过所述第一密钥加密,所述地址获取请求用于请求获取所述第二BLE端的MAC地址;接收所述第二BLE端发送的地址获取响应,所述地址获取响应包括通过所述第一密钥加密的所述第二BLE端的MAC地址。
- 根据权利要求1至4中任一项所述的方法,其特征在于,所述根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行预设操作,包括:若所述第二BLE端为可信设备,确定所述第一BLE端执行所述预设操作;或者若所述第二BLE端不为可信设备,确定所述第一BLE端不执行所述预设操作。
- 根据权利要求1至5中任一项所述的方法,其特征在于,所述根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行预设操作,包括:根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次被确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作。
- 根据权利要求6所述的方法,其特征在于,所述根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次被确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作,包括:若确定所述第二BLE端为可信设备,并且所述第二BLE端的信号强度大于或等于预设值,确定所述第一BLE端执行所述预设操作;或者若确定所述第二BLE端为可信设备,并且所述第二BLE端的信号强度小于所述预设值,确定所述第一BLE端不执行所述预设操作。
- 根据权利要求6或7所述的方法,其特征在于,所述根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作,包括:若所述第二BLE端连续两次被确定为可信设备的时间间隔在所述预设时长内,确定所述第一BLE端不执行所述预设操作;或者若所述第二BLE端连续两次被确定为可信设备的时间间隔大于所述预设时长,确定所述第一BLE端执行所述预设操作。
- 根据权利要求6至8中任一项所述的方法,其特征在于,所述根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作,包括:若所述第二BLE端为可信设备,并且在所述第二BLE端的时间权限范围内,确定所述第一BLE端执行所述预设操作;或者若所述第二BLE端为可信设备,但不在所述第二BLE端的时间权限范围内,确定所述第一BLE端不执行所述预设操作。
- 根据权利要求1至9中任一项所述的方法,其特征在于,所述根据所述第二BLE端的MAC地址,确定所述第二BLE端是否为可信设备,包括:若所述第二BLE端的MAC地址在预存的MAC地址列表中,确定所述第二BLE端为可信设备;或者若所述第二BLE端的MAC地址不在预存的MAC地址列表中,确定所述第二BLE端为不可信设备。
- 根据权利要求1至10中任一项所述的方法,其特征在于,所述第一BLE端为蓝牙门锁,所述预设操作为开启所述蓝牙门锁;或者所述第一BLE端为蓝牙灯,所述预设操作为开启所述蓝牙灯。
- 一种自动识别身份的装置,其特征在于,所述装置被配置为人机交互设备HID,包括:存储模块,用于存储与所述装置绑定成功的设备的MAC地址列表;蓝牙低功耗BLE模块,用于在第二BLE端靠近所述装置时,基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC地址,其中,所述第二BLE端为与所述装置绑定过的设备;处理模块,用于根据所述第二BLE端的MAC地址,确定所述第二BLE端是否为可信设备,根据所述第二BLE端是否为可信设备,确定所述装置是否执行预设操作。
- 根据权利要求12所述的装置,其特征在于,通过配置所述装置包括HID服务,电池服务和设备信息服务,以及所述第一BLE端所发送的广播数据包中的外观字段为HID以将所述装置配置为HID。
- 根据权利要求12所述的装置,其特征在于,在所述基于第一蓝牙连接获取所述第二BLE端的MAC地址之前,所述BLE模块还用于:建立所述装置和所述第二BLE端之间的链路层LL连接;建立所述装置和所述第二BLE端之间的加密链路以建立所述装置和所述第二BLE端之间的绑定关系,其中,所述加密链路使用第一密钥加密;通过所述加密链路获取并存储所述第二BLE端的MAC地址。
- 根据权利要求14所述的装置,其特征在于,所述BLE模块还用于:向所述第二BLE端发送地址获取请求,所述地址获取请求通过所述第一密钥加密,所述地址获取请求用于请求获取所述第二BLE端的MAC地址;接收所述第二BLE端发送的地址获取响应,所述地址获取响应包括通过所述第一密钥加密的所述第二BLE端的MAC地址。
- 根据权利要求12至15中任一项所述的装置,其特征在于,所述处理模块还用于:若所述第二BLE端为可信设备,确定所述装置执行所述预设操作;或者若所述第二BLE端不为可信设备,确定所述装置不执行所述预设操作。
- 根据权利要求12至16中任一项所述的装置,其特征在于,所述处理模块还用于:根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述装置是否执行预设操作。
- 根据权利要求17所述的装置,其特征在于,所述处理模块还用于:若确定所述第二BLE端为可信设备,并且所述第二BLE端的信号强度大于或等于预设值,确定所述装置执行所述预设操作;或者若确定所述第二BLE端为可选设备,并且所述第二BLE端的信号强度小于所述预设值,确定所述装置不执行所述预设操作。
- 根据权利要求17或18所述的装置,其特征在于,所述处理模块还用于:若所述第二BLE端连续两次被确定为可信设备的时间间隔在所述预设时长内,确定所述装置不执行所述预设操作;或者若所述第二BLE端连续两次被确定为可信设备的时间间隔大于所述预设时长,确定所述装置执行所述预设操作。
- 根据权利要求17至19中任一项所述的装置,其特征在于,所述处理模块还用于:若所述第二BLE端为可信设备,并且在所述第二BLE端的时间权限范围内,确定所述装置执行所述预设操作;或者若所述第二BLE端为可信设备,但不在所述第二BLE端的时间权限范围内,确定所述装置不执行所述预设操作。
- 根据权利要求12至20中任一项所述的装置,其特征在于,所述处理模块还用于:若所述第二BLE端的MAC地址在预存的MAC地址列表中,确定所述第二BLE端为可信设备;或者若所述第二BLE端的MAC地址不在预存的MAC地址列表中,确定所述第二BLE端为不可信设备。
- 根据权利要求12至21中任一项所述的装置,其特征在于,所述装置为蓝牙门锁,所述预设操作为开启所述蓝牙门锁;或所述装置为蓝牙灯,所述预设操作为开启所述蓝牙灯。
- 一种芯片,其特征在于,包括:存储器,用于存储计算机程序;处理器,用于从所述存储器中调用并运行所述计算机程序,使得安装有所述芯片的设备执行如权利要求1至11中任一项所述的方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202080001499.1A CN111758248B (zh) | 2020-02-14 | 2020-02-14 | 自动识别身份的方法、装置和芯片 |
PCT/CN2020/075363 WO2021159506A1 (zh) | 2020-02-14 | 2020-02-14 | 自动识别身份的方法、装置和芯片 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/075363 WO2021159506A1 (zh) | 2020-02-14 | 2020-02-14 | 自动识别身份的方法、装置和芯片 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021159506A1 true WO2021159506A1 (zh) | 2021-08-19 |
Family
ID=72713474
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/075363 WO2021159506A1 (zh) | 2020-02-14 | 2020-02-14 | 自动识别身份的方法、装置和芯片 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111758248B (zh) |
WO (1) | WO2021159506A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112466015A (zh) * | 2020-12-21 | 2021-03-09 | 上海哈敦智能科技有限公司 | Ble蓝牙无钥匙感应*** |
CN115273278A (zh) * | 2022-03-16 | 2022-11-01 | 浙江利尔达物联网技术有限公司 | 一种基于ble hid profile的靠近自动解锁的方法 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104394531A (zh) * | 2014-10-08 | 2015-03-04 | 无锡指网生物识别科技有限公司 | 终端设备的无线网络连接方法 |
CN105430603A (zh) * | 2015-12-03 | 2016-03-23 | 北京握奇智能科技有限公司 | 一种蓝牙设备的安全连接方法及*** |
CN106550314A (zh) * | 2015-09-19 | 2017-03-29 | 深圳市潮流网络技术有限公司 | 一种基于蓝牙定位技术的呼叫转移方法 |
CN107396283A (zh) * | 2017-06-30 | 2017-11-24 | 上海斐讯数据通信技术有限公司 | 一种路由器无线连接认证方法与*** |
CN108537934A (zh) * | 2018-06-12 | 2018-09-14 | 上海酷信息科技有限公司 | 蓝牙感应钥匙 |
CN108542055A (zh) * | 2018-06-12 | 2018-09-18 | 上海酷信息科技有限公司 | 骑行手环 |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9992615B2 (en) * | 2016-01-14 | 2018-06-05 | Lg Electronics Inc. | Method and apparatus for controlling a device using Bluetooth technology |
US9961484B2 (en) * | 2016-01-22 | 2018-05-01 | Lg Electronics Inc. | Method and apparatus for controlling a device using bluetooth technology |
CN105931330B (zh) * | 2016-04-19 | 2019-03-05 | 北京奇虎科技有限公司 | 智能开锁方法和智能锁 |
CN106127892A (zh) * | 2016-06-17 | 2016-11-16 | 广东工业大学 | 一种基于蓝牙通信的家居门控方法 |
CN106780901A (zh) * | 2016-12-27 | 2017-05-31 | 李天瑜 | 一种基于手机mac地址的智能门锁***及其应用 |
CN107274531A (zh) * | 2017-07-07 | 2017-10-20 | 成都东软学院 | 门禁控制方法及门禁*** |
CN107545636A (zh) * | 2017-09-04 | 2018-01-05 | 杭州干城科技有限公司 | 基于蓝牙通信的光交箱智能锁控制方法、装置及其*** |
KR102422330B1 (ko) * | 2017-09-13 | 2022-07-19 | 현대자동차주식회사 | 차량, 차량과 통신하는 단말기, 및 차량의 제어 방법 |
CN107833317A (zh) * | 2017-10-20 | 2018-03-23 | 珠海华发新科技投资控股有限公司 | 蓝牙门禁控制***和方法 |
CN109905869A (zh) * | 2019-04-04 | 2019-06-18 | 苏州足加新能源科技有限公司 | 一种充电设备与智能设备间数据传输方法 |
CN110572804B (zh) * | 2019-08-27 | 2022-04-22 | 暨南大学 | 蓝牙通信认证请求、接收及通信方法、移动端、设备端 |
KR102086722B1 (ko) * | 2019-08-28 | 2020-03-09 | 주식회사 블루앤 | 방향 탐지 기반의 실내외 접근 식별을 통한 출입문 원격 개방 시스템 |
-
2020
- 2020-02-14 WO PCT/CN2020/075363 patent/WO2021159506A1/zh active Application Filing
- 2020-02-14 CN CN202080001499.1A patent/CN111758248B/zh active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104394531A (zh) * | 2014-10-08 | 2015-03-04 | 无锡指网生物识别科技有限公司 | 终端设备的无线网络连接方法 |
CN106550314A (zh) * | 2015-09-19 | 2017-03-29 | 深圳市潮流网络技术有限公司 | 一种基于蓝牙定位技术的呼叫转移方法 |
CN105430603A (zh) * | 2015-12-03 | 2016-03-23 | 北京握奇智能科技有限公司 | 一种蓝牙设备的安全连接方法及*** |
CN107396283A (zh) * | 2017-06-30 | 2017-11-24 | 上海斐讯数据通信技术有限公司 | 一种路由器无线连接认证方法与*** |
CN108537934A (zh) * | 2018-06-12 | 2018-09-14 | 上海酷信息科技有限公司 | 蓝牙感应钥匙 |
CN108542055A (zh) * | 2018-06-12 | 2018-09-18 | 上海酷信息科技有限公司 | 骑行手环 |
Also Published As
Publication number | Publication date |
---|---|
CN111758248B (zh) | 2021-10-22 |
CN111758248A (zh) | 2020-10-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10812969B2 (en) | System and method for configuring a wireless device for wireless network access | |
AU2006211768B2 (en) | Wireless network system and communication method for external device to temporarily access wireless network | |
EP2630816B1 (en) | Authentication of access terminal identities in roaming networks | |
US20050086465A1 (en) | System and method for protecting network management frames | |
EP3032845B1 (en) | Hearing device configured to authenticate a mode request and related method | |
US20030236980A1 (en) | Authentication in a communication system | |
US11546699B2 (en) | Hearing device with service mode and related method | |
JP2000269959A (ja) | キー更新による認証方法 | |
CN106559213B (zh) | 设备管理方法、设备及*** | |
CN106961334A (zh) | 控制器和附件之间的安全无线通信 | |
WO2021159506A1 (zh) | 自动识别身份的方法、装置和芯片 | |
KR20160143333A (ko) | 이중 채널을 이용한 이중 인증 방법 | |
CN112512048B (zh) | 移动网络接入***、方法、存储介质及电子设备 | |
WO2023142773A1 (zh) | 一种设备控制方法、设备和分布式数字钥匙*** | |
CN111182483A (zh) | 终端及其呼叫限制补充业务重置密码的方法和*** | |
US20240054836A1 (en) | Physical access control system with secure relay | |
EP3942770B1 (en) | Chained trusted platform modules (tpms) as a secure bus for pre-placement of device capabilities | |
KR101451163B1 (ko) | 무선 네트워크 접속 인증 방법 및 그 시스템 | |
KR20190047557A (ko) | 비동기식 근거리 무선 통신을 통해 오티피를 제공하는 이어폰 장치 | |
WO2022248258A1 (en) | Replay attack protection | |
Wognsen et al. | A secure relay protocol for door access control | |
WO2021043396A1 (en) | Device and method of operating a device | |
WO2019076041A1 (zh) | 接入设备配对连接方法及接入设备 | |
DK201470778A1 (en) | Hearing device with service mode and related method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20918458 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20918458 Country of ref document: EP Kind code of ref document: A1 |