WO2021159506A1 - Method and apparatus for automatic identity recognition, and chip - Google Patents

Method and apparatus for automatic identity recognition, and chip Download PDF

Info

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
Application number
PCT/CN2020/075363
Other languages
French (fr)
Chinese (zh)
Inventor
袁明武
Original Assignee
深圳市汇顶科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市汇顶科技股份有限公司 filed Critical 深圳市汇顶科技股份有限公司
Priority to CN202080001499.1A priority Critical patent/CN111758248B/en
Priority to PCT/CN2020/075363 priority patent/WO2021159506A1/en
Publication of WO2021159506A1 publication Critical patent/WO2021159506A1/en

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C17/00Arrangements for transmitting signals characterised by the use of a wireless electrical link
    • G08C17/02Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C2201/00Transmission systems of control signals via wireless link
    • G08C2201/60Security, fault tolerance
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing 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)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

Provided are a method and apparatus for automatic identity recognition, and a chip. The method is applied to a first Bluetooth low energy (BLE) end. The first BLE end is configured as a human interface device (HID). The method comprises: obtaining, when a second BLE end is close to the first BLE end, a media access control (MAC) address of the second BLE end on the basis of a first Bluetooth connection, wherein the second BLE end is a device that has been bound to the first BLE end; determining, according to the MAC address of the second BLE end, whether the second BLE end is a trusted device; and determining, according to whether the second BLE end is a trusted device, whether the first BLE end performs a preset operation.

Description

自动识别身份的方法、装置和芯片Method, device and chip for automatically identifying identity 技术领域Technical field
本申请涉及蓝牙技术领域,并且更具体地,涉及自动识别身份的方法、装置和芯片。This application relates to the field of Bluetooth technology, and more specifically, to methods, devices, and chips for automatic identification.
背景技术Background technique
蓝牙低功耗(Bluetooh Low Energy,BLE)技术以低功耗、灵活性和便捷性在无线传输应用中发挥越来越重要的作用,广泛应用于身份识别和无线控制等应用,手机使用BLE技术进行身份识别的场景越来越多,例如,手机打开蓝牙门锁,手机打开蓝牙灯等,在这些应用中,需要通过手机上的应用(Application,App)进行连接控制,具体地,用户需要拿出手机,打开用于控制蓝牙设备的App,连接上蓝牙设备,然后再对蓝牙设备进行控制,用户体验不好,因此,如何实现更加便捷的身份识别是一项亟需解决的问题。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.
发明内容Summary of the invention
本申请提供一种自动识别身份的方法、装置和芯片,能够实现便捷的身份识别,从而能够提升用户体验。The present application provides a method, device and chip for automatic identification, which can realize convenient identification, thereby improving user experience.
第一方面,提供了一种自动识别身份的方法,应用于第一蓝牙低功耗BLE端,其中,所述第一BLE端被配置为人机交互设备HID,包括:In the first aspect, 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:
在第二BLE端靠近所述第一BLE端时,基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC地址,其中,所述第二BLE端为与所述第一BLE端绑定过的设备;When the second BLE terminal is close to the first BLE terminal, 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;
根据所述第二BLE端的MAC地址,确定所述第二BLE端是否为可信设备;Determining whether the second BLE terminal is a trusted device according to the MAC address of the second BLE terminal;
根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行预设操作。According to whether the second BLE terminal is a trusted device, it is determined whether the first BLE terminal performs a preset operation.
在一些可能的实现方式中,通过配置所述第一BLE端包括HID服务,电池服务和设备信息服务,以及所述第一BLE端所发送的广播数据包中的外观字段为HID以将所述第一BLE端配置为HID。In some possible implementations, 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.
在一些可能的实现方式中,在所述基于第一蓝牙连接获取所述第二BLE 端的MAC地址之前,所述方法还包括:In some possible implementation manners, before the acquiring the MAC address of the second BLE terminal based on the first Bluetooth connection, the method further includes:
建立所述第一BLE端和所述第二BLE端之间的链路层LL连接;Establishing a link layer LL connection between the first BLE end and the second BLE end;
建立所述第一BLE端和所述第二BLE端之间的加密链路以建立所述第一BLE端和所述第二BLE端之间的绑定关系,其中,所述加密链路使用第一密钥加密;Establish an encrypted link between the first BLE terminal and the second BLE terminal to establish a binding relationship between the first BLE terminal and the second BLE terminal, wherein the encrypted link uses First key encryption;
通过所述加密链路获取并存储所述第二BLE端的MAC地址。Obtain and store the MAC address of the second BLE end through the encrypted link.
在一些可能的实现方式中,所述基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC地址,包括:In some possible implementation manners, the acquiring the media access control MAC address of the second BLE terminal based on the first Bluetooth connection includes:
向所述第二BLE端发送地址获取请求,所述地址获取请求通过所述第一密钥加密,所述地址获取请求用于请求获取所述第二BLE端的MAC地址;Sending an address acquisition request to the second BLE end, where the address acquisition request is encrypted by the first key, and the address acquisition request is used to request to acquire the MAC address of the second BLE end;
接收所述第二BLE端发送的地址获取响应,所述地址获取响应包括通过所述第一密钥加密的所述第二BLE端的MAC地址。Receiving an address acquisition response sent by the second BLE end, where the address acquisition response includes the MAC address of the second BLE end encrypted by the first key.
在一些可能的实现方式中,所述根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行预设操作,包括:In some possible implementation manners, the determining whether the first BLE terminal performs a preset operation according to whether the second BLE terminal is a trusted device includes:
若所述第二BLE端为可信设备,确定所述第一BLE端执行所述预设操作;或者If the second BLE terminal is a trusted device, determine that the first BLE terminal performs the preset operation; or
若所述第二BLE端不为可信设备,确定所述第一BLE端不执行所述预设操作。If the second BLE terminal is not a trusted device, it is determined that the first BLE terminal does not perform the preset operation.
在一些可能的实现方式中,所述根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行预设操作,包括:In some possible implementation manners, the determining whether the first BLE terminal performs a preset operation according to whether the second BLE terminal is a trusted device includes:
根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次被确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作。According to whether the second BLE terminal is a trusted device, and the signal strength of the second BLE terminal, 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.
在一些可能的实现方式中,所述根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次被确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作,包括:In some possible implementations, according to whether the second BLE terminal is a trusted device, and the signal strength of the second BLE terminal, 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:
若确定所述第二BLE端为可信设备,并且所述第二BLE端的信号强度大于或等于预设值,确定所述第一BLE端执行所述预设操作;或者If it is determined that 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
若确定所述第二BLE端为可信设备,并且所述第二BLE端的信号强度 小于所述预设值,确定所述第一BLE端不执行所述预设操作。If it is determined that 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.
在一些可能的实现方式中,所述根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作,包括:In some possible implementations, according to whether 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:
若所述第二BLE端连续两次被确定为可信设备的时间间隔在所述预设时长内,确定所述第一BLE端不执行所述预设操作;或者If 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; or
若所述第二BLE端连续两次被确定为可信设备的时间间隔大于所述预设时长,确定所述第一BLE端执行所述预设操作。If 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.
在一些可能的实现方式中,所述根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作,包括:若所述第二BLE端为可信设备,并且在所述第二BLE端的时间权限范围内,确定所述第一BLE端执行所述预设操作;或者In some possible implementations, according to whether 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, 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
若所述第二BLE端为可信设备,但不在所述第二BLE端的时间权限范围内,确定所述第一BLE端不执行所述预设操作。If 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.
在一些可能的实现方式中,所述根据所述第二BLE端的MAC地址,确定所述第二BLE端是否为可信设备,包括:In some possible implementation manners, the determining whether the second BLE terminal is a trusted device according to the MAC address of the second BLE terminal includes:
若所述第二BLE端的MAC地址在预存的MAC地址列表中,确定所述第二BLE端为可信设备;或者If the MAC address of the second BLE end is in the pre-stored MAC address list, it is determined that the second BLE end is a trusted device; or
若所述第二BLE端的MAC地址不在预存的MAC地址列表中,确定所述第二BLE端为不可信设备。If the MAC address of the second BLE end is not in the pre-stored MAC address list, it is determined that the second BLE end is an untrusted device.
在一些可能的实现方式中,所述第一BLE端为蓝牙门锁,所述预设操作为开启所述蓝牙门锁;或者所述第一BLE端为蓝牙灯,所述预设操作为开启所述蓝牙灯。In some possible implementations, 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.
第二方面,提供了一种自动识别身份的装置,所述装置被配置为人机交互设备HID,包括:In a second aspect, an apparatus for automatically identifying an identity is provided. The apparatus is configured as a human-computer interaction device HID and includes:
存储模块,用于存储与所述装置绑定成功的设备的MAC地址列表;The storage module is used to store the MAC address list of the equipment successfully bound with the device;
蓝牙低功耗BLE模块,用于在第二BLE端靠近所述装置时,基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC地址,其中,所述第二 BLE端为与所述装置绑定过的设备;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 equipment bound to the device;
处理模块,用于根据所述第二BLE端的MAC地址,确定所述第二BLE端是否为可信设备,根据所述第二BLE端是否为可信设备,确定所述装置是否执行预设操作。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 .
在一些可能的实现方式中,通过配置所述装置包括HID服务,电池服务和设备信息服务,以及所述第一BLE端所发送的广播数据包中的外观字段为HID以将所述装置配置为HID。In some possible implementations, 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.
在一些可能的实现方式中,在所述基于第一蓝牙连接获取所述第二BLE端的MAC地址之前,所述BLE模块还用于:In some possible implementation manners, before the acquiring the MAC address of the second BLE terminal based on the first Bluetooth connection, the BLE module is further configured to:
建立所述装置和所述第二BLE端之间的链路层LL连接;Establishing a link layer LL connection between the device and the second BLE terminal;
建立所述装置和所述第二BLE端之间的加密链路以建立所述装置和所述第二BLE端之间的绑定关系,其中,所述加密链路使用第一密钥加密;Establishing an encrypted link between the device and the second BLE terminal to establish a binding relationship between the device and the second BLE terminal, wherein the encrypted link is encrypted using a first key;
通过所述加密链路获取并存储所述第二BLE端的MAC地址。Obtain and store the MAC address of the second BLE end through the encrypted link.
在一些可能的实现方式中,所述BLE模块还用于:In some possible implementations, the BLE module is also used to:
向所述第二BLE端发送地址获取请求,所述地址获取请求通过所述第一密钥加密,所述地址获取请求用于请求获取所述第二BLE端的MAC地址;Sending an address acquisition request to the second BLE end, where the address acquisition request is encrypted by the first key, and the address acquisition request is used to request to acquire the MAC address of the second BLE end;
接收所述第二BLE端发送的地址获取响应,所述地址获取响应包括通过所述第一密钥加密的所述第二BLE端的MAC地址。Receiving an address acquisition response sent by the second BLE end, where the address acquisition response includes the MAC address of the second BLE end encrypted by the first key.
在一些可能的实现方式中,所述处理模块还用于:In some possible implementation manners, the processing module is also used to:
若所述第二BLE端为可信设备,确定所述装置执行所述预设操作;或者If the second BLE end is a trusted device, determine that the device performs the preset operation; or
若所述第二BLE端不为可信设备,确定所述装置不执行所述预设操作。If the second BLE terminal is not a trusted device, it is determined that the device does not perform the preset operation.
在一些可能的实现方式中,所述处理模块还用于:In some possible implementation manners, the processing module is also used to:
根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述装置是否执行预设操作。According to whether the second BLE terminal is a trusted device, the signal strength of the second BLE terminal, the time interval between the second BLE terminal being determined to be a trusted device for two consecutive times, and the time of the second BLE terminal At least one of the permissions determines whether the device performs a preset operation.
在一些可能的实现方式中,所述处理模块还用于:In some possible implementation manners, the processing module is also used to:
若确定所述第二BLE端为可信设备,并且所述第二BLE端的信号强度大于或等于预设值,确定所述装置执行所述预设操作;或者If it is determined that 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
若确定所述第二BLE端为可选设备,并且所述第二BLE端的信号强度小于所述预设值,确定所述装置不执行所述预设操作。If it is determined that 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.
在一些可能的实现方式中,所述处理模块还用于:In some possible implementation manners, the processing module is also used to:
若所述第二BLE端连续两次被确定为可信设备的时间间隔在所述预设时长内,确定所述装置不执行所述预设操作;或者If 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; or
若所述第二BLE端连续两次被确定为可信设备的时间间隔大于所述预设时长,确定所述装置执行所述预设操作。If 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.
在一些可能的实现方式中,所述处理模块还用于:In some possible implementation manners, the processing module is also used to:
若所述第二BLE端为可信设备,并且在所述第二BLE端的时间权限范围内,确定所述装置执行所述预设操作;或者If 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; or
若所述第二BLE端为可信设备,但不在所述第二BLE端的时间权限范围内,确定所述装置不执行所述预设操作。If 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.
在一些可能的实现方式中,所述处理模块还用于:In some possible implementation manners, the processing module is also used to:
若所述第二BLE端的MAC地址在预存的MAC地址列表中,确定所述第二BLE端为可信设备;或者If the MAC address of the second BLE end is in the pre-stored MAC address list, it is determined that the second BLE end is a trusted device; or
若所述第二BLE端的MAC地址不在预存的MAC地址列表中,确定所述第二BLE端为不可信设备。If the MAC address of the second BLE end is not in the pre-stored MAC address list, it is determined that the second BLE end is an untrusted device.
在一些可能的实现方式中,所述装置为蓝牙门锁,所述预设操作为开启所述蓝牙门锁;或所述装置为蓝牙灯,所述预设操作为开启所述蓝牙灯。In some possible implementations, 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.
第三方面,提供了一种芯片,用于实现上述第一方面或其各实现方式中的方法。具体地,该芯片包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片的设备执行如上述第一方面或其各实现方式中的方法。In a third aspect, a chip is provided, which is used to implement the method in the above-mentioned first aspect or each of its implementation manners. Specifically, 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.
第四方面,提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的指令。In a fourth aspect, a computer-readable medium is provided for storing a computer program, and the computer program includes instructions for executing the first aspect or any possible implementation of the first aspect.
第五方面,提供了一种包括指令的计算机程序产品,当计算机运行所述计算机程序产品的所述指时,所述计算机执行上述第一方面或第一方面的任意可能的实现方式中的方法。具体地,该计算机程序产品可以运行于上述第三方面的第一BLE端上。In a fifth aspect, a computer program product including instructions is provided. When 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. . Specifically, the computer program product may run on the first BLE end of the third aspect.
基于上述技术方案,通过将第一BLE端配置为HID,在绑定过的设备靠近所述第一BLE端时,可以自动建立与所述第一BLE端的蓝牙连接,进一步可以根据该设备的MAC地址确定是否为可信设备,在该设备为可信设 备的情况下即可实现对所述第一BLE端的操作,这样,对于绑定过的设备,由于第一BLE端上存储有该设备的MAC地址,因此不需用户操作该设备即可实现对第一BLE端的控制,能够提升用户体验。Based on the above technical solution, by configuring the first BLE end as HID, when the bound device is close to the first BLE end, 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. In this way, for the bound device, 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.
附图说明Description of the drawings
图1是根据本申请实施例的自动识别身份的方法的示意性流程图。Fig. 1 is a schematic flowchart of a method for automatically identifying an identity according to an embodiment of the present application.
图2是本申请实施例的自动识别的方法的整体流程图。Fig. 2 is an overall flowchart of an automatic identification method according to an embodiment of the present application.
图3是本申请实施例的自动识别身份的装置的示意性结构图。Fig. 3 is a schematic structural diagram of an automatic identification device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本发明实施例中的技术方案进行描述。The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings.
在基于BLE技术的无线数据传输中,存在两种角色:从(slave)设备和主(master)设备,其中,slave设备例如可以为蓝牙门锁和蓝牙灯等BLE设备,主设备例如可以为手机,平板电脑等移动电子设备。In wireless data transmission based on BLE technology, there are two roles: a slave device and a master device. The slave device can be, for example, a BLE device such as a Bluetooth door lock and a Bluetooth light, and the master device can be a mobile phone, for example. , Tablet computers and other mobile electronic devices.
以下,对BLE设备之间的配对过程进行描述。The following describes the pairing process between BLE devices.
首先,建立BLE设备之间的链路层(Link Layer,LL)连接;First, establish a link layer (Link Layer, LL) connection between BLE devices;
具体地,从设备发送广播数据包(advertising packets);Specifically, sending broadcast packets (advertising packets) from the device;
在想要与该从设备建立蓝牙连接的情况下,主设备打开蓝牙模块,扫描该广播数据包,进一步地,主设备向从设备发送连接请求;In the case of wanting to establish a Bluetooth connection with the slave device, 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;
若从设备接收到主设备的连接请求,可以确定主设备想要与从设备建立蓝牙连接,从设备向主设备回复连接响应。If 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.
至此,从设备和主设备之间建立LL连接,期间二者进行信息交互使用的是明文数据,即非加密数据。其中,链路层位于BLE协议栈的控制器(Controller)部分,具体实现可以参考相关技术,这里不作赘述。At this point, the LL connection is established between the slave device and the master device, during which they use plaintext data for information exchange, that is, non-encrypted data. Among them, 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.
进一步地,基于该LL连接,建立所述BLE设备之间的加密链路,即进行配对过程。主要分为三个阶段:Further, based on the LL connection, an encrypted link between the BLE devices is established, that is, a pairing process is performed. Mainly divided into three stages:
第一阶段,用于交换配对特征以得到临时密钥TK,具体地,交换双方有关鉴权的需求(authentication requirements),以及双方具有的人机交互能力(IO capabilities);In 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;
第二阶段,根据第一阶段的TK值作为第二阶段的秘钥,以计算身份确认信息以及生成短期密钥STK,其中,该身份确认值为了保证和自身通信的 设备是自身需要连接的设备,必须确定对方的身份,主设备和从设备都需要计算身份确认值,从而确定对方是否为所需要连接的设备,STK的作用是配对绑定过程的第三阶段不再使用明文进行数据传输。In the second stage, 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.
第三阶段是设备绑定的过程,这期间会计算加密链路中使用到的长期密钥,例如LTK、IRK以及CSRK等,该第三阶段传输的数据是通过第一阶段、第二阶段的短期密钥进行加密传输的,因此,第三阶段传输的数据包为加密的密文,主设备和从设备会将长期秘钥进行保存,这样两个设备就绑定成功了,或者说配对成功了,之后二者可以通过该长期密钥进行数据交互。The third stage is the process of device binding. During this period, 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.
具体地,当有明文数据包需要发送的时候,需要对该明文数据进行加密。加密的过程,是以明文数据包作为输入,以长期秘钥加密生成密文数据包;Specifically, when there is a plaintext data packet to be sent, 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;
对端当收到密文数据包时,需要对密文数据包进行解密。解密的过程,是以密文数据包为输入,以长期秘钥作为解密秘钥,生成明文数据包。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.
应理解,以上仅示例了一种BLE设备之间的配对过程,本申请实施例的BLE设备也可以采用其他配对过程进行配对,本申请并不限于此。It should be understood that the foregoing only exemplifies a pairing process between BLE devices, and the BLE device in the embodiment of the present application may also use other pairing processes for pairing, and the present application is not limited to this.
由此可见,主设备和从设备之间进行正常的数据通信之前,需要经过复杂的配对验证过程,例如,若手机向控制蓝牙门锁开启,则需要用户打开手机的蓝牙模块,打开控制蓝牙门锁的开启的App,进一步与蓝牙门锁建立连接,验证通过,才能控制蓝牙门锁开启,对于用户来讲,操作不便捷,使用体验不好。It can be seen that before the normal data communication between the master device and the slave device, it needs to go through a complicated pairing verification process. For example, if the mobile phone is turned on to control the Bluetooth door lock, the user needs to open the mobile phone’s Bluetooth module and open the control Bluetooth door. The unlocking App of the lock further establishes a connection with the Bluetooth door lock, and the verification is passed to control the opening of the Bluetooth door lock. For the user, the operation is not convenient and the user experience is not good.
有鉴于此,本申请实施例提供了一种自动识别身份的方法,能够将蓝牙门锁等BLE端配置为人机交互设备(Human Interface Device,HID),这样在手机等BLE设备靠近第一BLE端时,只要该手机的蓝牙模块处于打开状态,手机能够自动与蓝牙门锁建立连接,进一步可以控制蓝牙门锁的开启,不需要用户操作App,有利于提升用户体验。In view of this, 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. At this time, as long as the Bluetooth module of the mobile phone is in the open state, 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.
以下,结合图1,说明根据本申请实施例的自动识别身份的方法200。该方法200可以由第一BLE端执行,该第一BLE端被配置为HID,该方法200可以包括如下内容:Hereinafter, with reference to FIG. 1, a method 200 for automatically identifying an identity according to an embodiment of the present application will be described. 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:
S201,在第二BLE端靠近所述第一BLE端时,基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC(Media Access Control)地址,其中,所述第二BLE端为与所述第一BLE端绑定过的设备;S201. When the second BLE terminal is close to the first BLE terminal, acquire the Media Access Control MAC (Media Access Control) address of the second BLE terminal based on the first Bluetooth connection, where the second BLE terminal is The device bound to the first BLE end;
S202,根据所述第二BLE端的MAC地址,确定所述第二BLE端是否 为可信设备;S202: Determine whether the second BLE end is a trusted device according to the MAC address of the second BLE end;
S203,根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行预设操作。S203: Determine whether the first BLE terminal performs a preset operation according to whether the second BLE terminal is a trusted device.
应理解,本申请实施例的方法200可以应用于各种BLE设备,例如,BLE芯片,或者包括BLE芯片的设备,例如蓝牙门锁,蓝牙灯等。所述第二BLE端例如可以为手机,平板等移动电子设备,本申请实施例对此不作限定。It should be understood that 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.
在本申请实施例中,以所述第一BLE端为从设备,所述第二BLE端为主设备为例进行说明,第一BLE端和第二BLE端也可以是BLE芯片。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.
在本申请实施例中,所述第一BLE端可以被配置为HID,对于主设备而言,当接收到HID发送的广播数据包时,主动与所述HID建立连接,即不需要用户打开控制该HID的App,只需保持该主设备的蓝牙模块打开即可。In the embodiment of the present application, the first BLE end can be configured as 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.
具体地,可以配置该第一BLE端包括HID服务,电池(battery)服务和设备信息(Device Information)服务,以及可以配置所述第一BLE端发送的广播数据包中的外观(Appearance)字段可以设置为HID。Specifically, 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. Set to 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端进行配对时所确定的长期密钥。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. Further, 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. In some embodiments, 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. In other words, 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 . It should be understood that 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.
在另一些实施例中,当未与所述第一BLE端建立绑定关系的第三BLE 端靠近所述第一BLE端时,所述第三BLE端可以采用前述实施例中的配对过程建立所述第三BLE端和所述第一BLE端的绑定关系,进一步地,所述第一BLE端可以获取所述第三BLE端的MAC地址,以便于在所述第三BLE端下次靠近所述第一BLE端时,所述第三BLE端能够主动建立与所述第一BLE端之间的蓝牙连接,从而所述第一BLE端可以基于该蓝牙连接获取所述第三BLE端的MAC地址以进行所述三BLE端的身份验证。In other embodiments, when a third BLE end that has not established a binding relationship with the first BLE end is close to the first BLE end, 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. In the case of the first BLE terminal, 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.
在其他实施例中,第一BLE端需要进行密码验证才能配对,与所述第一BLE端配对的第三BLE端密码验证失败,或者与所述第一BLE端连接失败,或者与所述第一BLE端配对失败,这些都可以导致所述第一BLE端和所述第三BLE端绑定失败,也就不能获取所述第三BLE端的MAC地址。以第一BLE端为蓝牙门锁和第三BLE端为手机为例,配对失败的手机不能自动与蓝牙门锁建立连接,则蓝牙门锁也就不能基于自动建立的连接获取该手机的MAC地址。In other embodiments, 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. Taking the first BLE end as a Bluetooth door lock and the third BLE end as a mobile phone as an example, 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. .
进一步地,所述第一BLE端可以基于建立的所述第一蓝牙连接获取所述第二BLE端的MAC地址,例如,所述第一BLE端可以通过系统的应用程序接口(Application Interface,API)获取所述第二BLE端的MAC地址。Further, the first BLE terminal may obtain the MAC address of the second BLE terminal based on the established first Bluetooth connection. For example, the first BLE terminal may use the application program interface (API) of the system. Acquire the MAC address of the second BLE end.
也就是说,与所述第一BLE端绑定过的第二BLE端靠近所述第一BLE端时,所述第二BLE端可以自动与所述第一BLE端建立连接,从而所述第一BLE端可以通过所述连接获取所述第二BLE端的MAC地址,以确定所述第二BLE端是否为可信设备。That is to say, when the second BLE end bound to the first BLE end approaches the first BLE end, 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.
应理解,在本申请实施例中,所述第一BLE端可以根据所述第二BLE端的的MAC地址进行身份验证,或者也可以为其他能够标识设备的身份信息进行身份验证,本申请并不限于此。It should be understood that in this embodiment of the application, 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.
在本申请实施例中,所述第一BLE端中存储有绑定过的设备的MAC地址列表。所述第二BLE端为与所述第一BLE端绑定过的设备,则所述第一BLE端保存有所述第二BLE端的MAC地址。In the embodiment of the present application, 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.
应理解,本申请实施例并不具体限定所述第二BLE端和所述第一BLE端建立绑定关系的方式,例如,可以是采用前述实施例中的配对过程建立绑定关系的,或者通过其他方式建立绑定关系的,本申请实施例并不限于此。It should be understood that 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. For example, 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.
所述第二BLE端的MAC地址可以是在与所述第二BLE端建立绑定关系时存储的,也就是说,所述第一BLE端在建立与所述第二BLE端的绑定 关系时可以获取并存储所述第二BLE端的MAC地址,例如,通过系统的API获取所述第二BLE端的MAC地址,这样,在下次连接时,通过该第二BLE端的MAC地址即可验证该第二BLE端是否可信。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.
在一些实施例中,所述第一BLE端可以根据所述第二BLE端的MAC地址是否在存储的MAC地址列表中,确定所述第一BLE端是否为可信设备。In some embodiments, 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.
作为一个示例,若所述第二BLE端的MAC地址在所述MAC地址列表中,则可以确定所述第二BLE端为可信设备。As an example, if the MAC address of the second BLE end is in the MAC address list, it may be determined that the second BLE end is a trusted device.
作为另一示例,若所述第二BLE端的MAC地址不在所述MAC地址列表中,则可以确定该第二BLE端为不可信设备。As another example, if the MAC address of the second BLE end is not in the MAC address list, it may be determined that the second BLE end is an untrusted device.
作为再一示例,若所述第二BLE端的MAC地址不在所述MAC地址列表中,也可以将所述第二BLE端的MAC地址保存至所述MAC地址列表,以便于下次连接时,所述第二BLE端可以控制所述第一BLE端。As another example, if the MAC address of the second BLE end is not in the MAC address list, 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.
因此,在本申请实施例中,通过将第一BLE端配置为HID,在绑定过的设备靠近所述第一BLE端时,可以自动建立与所述第一BLE端的蓝牙连接,进一步可以根据该设备的MAC地址确定该设备是否为可信设备,在该设备为可信设备的情况下即可实现对所述第一BLE端的控制。对于绑定过的设备,由于第一BLE端上存储有该设备的MAC地址,因此不需用户操作该设备即可实现对第一BLE端的控制,能够提升用户体验。Therefore, in the embodiment of the present application, by configuring the first BLE end as HID, when the bound device is close to the first BLE end, 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. For 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.
可选地,在本申请另一些实施例中,所述根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行所述预设操作,包括:Optionally, in some other embodiments of the present application, the determining whether the first BLE terminal performs the preset operation according to whether the second BLE terminal is a trusted device includes:
根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作。According to whether the second BLE terminal is a trusted device, the signal strength of the second BLE terminal, the time interval between the second BLE terminal being determined to be a trusted device for two consecutive times, and the time of the second BLE terminal At least one of the permissions determines whether the first BLE terminal performs the preset operation.
在一些实施例中,所述第一BLE端为蓝牙门锁,所述预设操作可以为开启所述蓝牙门锁,或者所述第一BLE端为蓝牙灯,所述预设操作可以为开启蓝牙灯,当预设操作为开启蓝牙灯时,当未与第一BLE端绑定过的设备接近蓝牙灯时,蓝牙灯也不会开启。In some embodiments, the first BLE terminal is a Bluetooth door lock, and the preset operation may be to turn on the Bluetooth door lock, or the first BLE terminal is a Bluetooth light, and 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.
在一些实施例中,当第二BLE端与所述第一BLE端建立所述第一蓝牙连接后,所述第一BLE端可以检查其连接所述第二BLE端的信号强度,例如,接收信号强度(Received Signal Strength Indicator,RSSI),若该RSSI 信号强度小于预设值,则所述第一BLE端不执行预设操作,例如,若所述第一BLE端为蓝牙门锁,则不开启所述蓝牙门锁,或者若该RSSI信号强度大于或等于预设值,则所述第一BLE端执行预设操作,例如若所述第一BLE端为蓝牙门锁,则开启蓝牙门锁。根据连接的设备的信号强度确定是否操作该第一BLE端,有利于避免在该设备距离该第一BLE端较远时开启该第一BLE端出现安全问题,特别是在蓝牙门锁的应用中,若距离较远的时候,用户的手机与蓝牙门锁建立连接,并且用户的手机是与蓝牙门锁绑定过的设备,则蓝牙门锁会在用户距离较远的时候打开,会带来安全问题,本实施例中,所述预设值可以为手机与门锁距离1m的时候的RSSI值,也可以是手机与门锁距离0.5m的RSSI值,用户可以根据需求调整该预设值,本实施例对此不做限定。In some embodiments, after the second BLE terminal establishes the first Bluetooth connection with the first BLE terminal, 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. Determine whether to operate the first BLE terminal according to the signal strength of the connected device, which helps to avoid security problems when the first BLE terminal is turned on when the device is far away from the first BLE terminal, especially in the application of Bluetooth door locks , If the user’s mobile phone is connected to the Bluetooth door lock when the distance is far, and the user’s mobile phone is a device bound to the Bluetooth door lock, the Bluetooth door lock will open when the user is far away, which will bring For security issues, in this embodiment, 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.
在另一些实施例中,若所述第二BLE端连续两次被确定为可信设备的时间间隔在所述预设时长内,确定不操作述第一BLE端;或者In other embodiments, if 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; or
若所述第二BLE端连续两次被确定为可信设备的时间间隔大于所述预设时长,确定所述第一BLE端执行所述预设操作。If 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.
具体地,设置第一数组和第二数组,第一数组用于存储已经匹配成功的设备的信息,即设备的MAC地址在MAC地址列表中的设备的信息,或者说,确定为可信设备的设备信息,第二数组用于存储从第一数组中的设备匹配成功后的时间计数值。Specifically, 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.
举例说明,若设备A靠近第一BLE端,第一BLE端确定设备A的MAC地址在MAC地址列表中,即设备A匹配成功,则在第一数组中进行查找,确定之前是否已经匹配过该设备A,如果在该第一数组中查找到该设备A,则在该第二数组中获取该设备A对应的时间计数值,即从上一次匹配成功到本次匹配成功之间的时间间隔,如果该时间计数值小于或等于预设时长,例如5分钟,则该第一BLE端不执行预设操作,或者若时间计数值大于该预设时长,则该第一BLE端执行预设操作,进一步地,还可以清零该第二数组中该设备A对应的时间计数值。For example, if the device A is close to the first BLE end, 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. Device A, if the device A is found in the first array, 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.
因此,根据一个设备连续被匹配成功的时间间隔确定所述第一BLE端是否执行预设操作,有利于避免该设备连续出现在该第一BLE端附近时导致的误操作。例如,在蓝牙门锁的应用场景中,若用户持手机在蓝牙门锁附近徘徊,该用户的手机是与蓝牙门锁绑定过的设备,则蓝牙门锁会频繁执行 开启操作,但用户的真实意愿并不是要开启蓝牙门锁,在本实施例中,通过配置一定时间内连续的匹配成功不触发开锁操作,有利于避免上述问题。可选地,在一些实施例中,所述时间间隔可以为10分钟,或者半小时,用户也可以根据需求调整该时间间隔,本实施例对此不做限定。Therefore, 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. For example, in the application scenario of a Bluetooth door lock, if a user is holding a mobile phone and hovering near the Bluetooth door lock, and the user’s mobile phone is a device bound to the Bluetooth door lock, the Bluetooth door lock will frequently perform opening operations, but the user’s The real intention is not to open the Bluetooth door lock. In this embodiment, it is helpful to avoid the above-mentioned problem by configuring that the consecutive successful matching within a certain period of time does not trigger the unlocking operation. Optionally, in some embodiments, 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.
在一些实施例中,每个绑定的设备可以对应相应的时间权限,例如,MAC地址列表中包括5个设备的MAC地址,该5个设备可以分别对应相应的时间权限,例如,设备A对应的时间权限为永久,设备B对应的时间权限为10天,设备C对应的时间权限为1天等。In some embodiments, each bound device may correspond to a corresponding time authority. For example, the MAC address list includes the MAC addresses of five devices, and the five devices may correspond to corresponding time authority. For example, 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.
这样,在确定所述第一BLE端连接的设备的MAC地址在MAC地址列表中后,还可以进一步结合该设备的时间权限,确定该第一BLE端是否执行预设操作,例如,若在该设备的时间权限内,可以确定该第一BLE端执行所述预设操作,例如打开蓝牙门锁,否则该第一BLE端不执行所述预设操作,例如,不打开蓝牙门锁,从而能够实现不同设备对于第一BLE端的精细化控制。In this way, after it is determined that 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.
在另一些实施例中,该第一BLE端也可以结合设备的时间权限,更新MAC地址列表,在超过某个设备的时间权限时,将该设备的MAC地址从该MAC地址列表中清除,这样,该更新后的MAC地址列表中的设备均为在时间权限内的设备,该第一BLE端可以直接根据该MAC地址列表确定是否操作该第一BLE端。例如,所述第一BLE端为蓝牙门锁,有5个手机和蓝牙门锁进行了绑定,但5个手机中只有一个手机A具有长期开锁的时间权限,其他设备只有3天的时间权限。当手机和蓝牙门锁自动连接获取该手机的MAC地址后,该蓝牙门锁能够获知该手机的时间权限,如果时间权限已过期,可以将该手机对应MAC地址从MAC地址列表中删除,同时与该蓝牙门锁配对成功的手机也可以具有密钥列表,在该手机的时间权限过期后,该蓝牙门锁也可以将与该手机配对的密钥从密钥列表中删除。In other embodiments, 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. For example, 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 . When the mobile phone and the Bluetooth door lock are automatically connected to obtain the MAC address of the mobile phone, 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.
以下,结合图2,从主设备和从设备的角度,说明本申请实施例的自动识别身份的方法的整体流程,但本申请实施例并不限于此。In the following, with reference to FIG. 2, from the perspective of the master device and the slave device, the overall flow of the method for automatic identification of the embodiment of the present application is described, but the embodiment of the present application is not limited to this.
S301,从设备发送广播数据包,所述广播数据包中的Appearance字段为HID。S301. The slave device sends a broadcast data packet, where the Appearance field in the broadcast data packet is HID.
对应地,主设备在靠近所述从设备时,可以扫描该广播数据包,根据该广播数据包中的Appearance字段为HID可以确定该从设备为HID,则可以 建立与所述从设备的蓝牙连接。Correspondingly, 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,从设备确定是否与主设备建立连接。S302: The slave device determines whether to establish a connection with the master device.
情况1,所述主设备为绑定过的设备,在所述主设备靠近所述从设备时,则所述主设备可以主动建立与所述从设备之间的蓝牙连接。In case 1, 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.
情况2:所述主设备为未绑定过的设备,用户也可以手动操作该主设备与从设备建立蓝牙连接。Case 2: 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.
情况3,若没有主设备靠近所述从设备,则没有主设备与所述从设备建立连接。Case 3: If no master device is close to the slave device, then no master device establishes a connection with the slave device.
若从设备和主设备之间建立连接,则执行S303,否则返回S301。If a connection is established between the slave device and the master device, execute S303, otherwise return to S301.
进一步地,在S303中,从设备确定所述主设备和所述从设备是否绑定。Further, in S303, the slave device determines whether the master device and the slave device are bound.
若是,则执行S305,否则执行S304。If yes, go to S305, otherwise go to S304.
作为一个示例,所述主设备和从设备可以通过交互密钥信息确定二者是否绑定,例如,所述主设备可以向所述从设备发送之前建立绑定关系时所保存的密钥信息,从设备可以验证该密钥信息确定该主设备和从设备是否绑定。As an example, the master device and the slave device may determine whether they are bound by exchanging key information. For example, 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.
在S304中,所述从设备断开与所述主设备之间的连接。In S304, the slave device disconnects from the master device.
即对于未建立绑定关系的主设备,可以确定其必然为不可信设备,则从设备可以断开与其的蓝牙连接。That is, for 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.
或者,在其他实施例中,所述从设备也可以通过前文所描述的配对过程建立所述从设备和所述主设备之间的绑定关系,以便执行后续的流程。Or, in other embodiments, 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.
在S305中,所述从设备获取所述主设备的MAC地址。In S305, the slave device obtains the MAC address of the master device.
例如,所述从设备可以通过系统的API获取所述主设备的MAC地址。For example, the slave device may obtain the MAC address of the master device through the API of the system.
进一步地,在S306中,确定所述主设备的MAC地址是否在存储的MAC地址列表中。Further, in S306, it is determined whether the MAC address of the master device is in the stored MAC address list.
若是,则执行S308,否则,执行S307。If yes, execute S308, otherwise, execute S307.
S307,将该MAC地址存储在所述MAC地址列表中,进一步执行S308。S307: Store the MAC address in the MAC address list, and further execute S308.
S308中,确定所述主设备为可信设备。In S308, it is determined that the main device is a trusted device.
进一步地,可以所述从设备执行预设操作,例如打开蓝牙门锁或蓝牙等。Further, the slave device may perform a preset operation, such as opening a Bluetooth door lock or Bluetooth.
或者,在其他实施例中,若所述MAC地址不在存储的地址列表中,所述从设备也可以确定所述主设备为不可信设备。Or, in other embodiments, if the MAC address is not in the stored address list, the slave device may also determine that the master device is an untrusted device.
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that in the various embodiments of the present application, 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.
并且,在不冲突的前提下,本申请描述的各个实施例和/或各个实施例中的技术特征可以任意的相互组合,组合之后得到的技术方案也应落入本申请的保护范围。Moreover, under the premise of no conflict, the various embodiments described in this application and/or the technical features in each embodiment can be combined with each other arbitrarily, and the technical solutions obtained after the combination should also fall within the protection scope of this application.
上文结合图1至图2,详细描述了本申请的方法实施例,下文结合图3,描述根据本申请实施例的装置,方法实施例所描述的技术特征适用于以下装置实施例,为了简洁,这里不再赘述。The method embodiments of the present application are described in detail above with reference to FIGS. 1 to 2, and the device according to the embodiments of the present application is described below in conjunction with FIG. 3. The technical features described in the method embodiments are applicable to the following device embodiments, for the sake of brevity , I won’t repeat it here.
图3是根据本申请实施例的自动识别身份的装置400的示意性结构图,所述装置被配置为人机交互设备HID,包括: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:
存储模块410,用于存储与所述装置绑定成功的设备的MAC地址列表;The storage module 410 is configured to store a list of MAC addresses of devices that are successfully bound with the device;
蓝牙低功耗BLE模块420,用于在第二BLE端靠近所述装置时,基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC地址,其中,所述第二BLE端为与所述装置绑定过的设备;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;
处理模块430,用于根据所述第二BLE端的MAC地址,确定所述第二BLE端是否为可信设备,根据所述第二BLE端是否为可信设备,确定所述装置是否执行预设操作。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.
在一些实施例中,所述存储模块410可以为存储器,可以用于存储计算机程序,所述处理模块430可以为处理器,用于从所述存储器中调用并执行所述计算机程序,用于执行图1至图2所示实施例中的方法步骤。In some embodiments, the storage module 410 may be a memory, which may be used to store a computer program, and 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.
可选地,在一些实施例中,通过配置所述装置包括HID服务,电池服务和设备信息服务,以及所述第一BLE端所发送的广播数据包中的外观字段为HID以将所述装置配置为HID。Optionally, in some embodiments, 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.
可选地,在一些实施例中,在所述基于第一蓝牙连接获取所述第二BLE端的MAC地址之前,所述BLE模块还用于:Optionally, in some embodiments, before the acquiring the MAC address of the second BLE terminal based on the first Bluetooth connection, the BLE module is further configured to:
建立所述装置和所述第二BLE端之间的链路层LL连接;Establishing a link layer LL connection between the device and the second BLE terminal;
建立所述装置和所述第二BLE端之间的加密链路以建立所述装置和所述第二BLE端之间的绑定关系,其中,所述加密链路使用第一密钥加密;Establishing an encrypted link between the device and the second BLE terminal to establish a binding relationship between the device and the second BLE terminal, wherein the encrypted link is encrypted using a first key;
通过所述加密链路获取并存储所述第二BLE端的MAC地址。Obtain and store the MAC address of the second BLE end through the encrypted link.
可选地,在一些实施例中,所述BLE模块还用于:Optionally, in some embodiments, the BLE module is also used to:
向所述第二BLE端发送地址获取请求,所述地址获取请求通过所述第一密钥加密,所述地址获取请求用于请求获取所述第二BLE端的MAC地址;Sending an address acquisition request to the second BLE end, where the address acquisition request is encrypted by the first key, and the address acquisition request is used to request to acquire the MAC address of the second BLE end;
接收所述第二BLE端发送的地址获取响应,所述地址获取响应包括通过所述第一密钥加密的所述第二BLE端的MAC地址。Receiving an address acquisition response sent by the second BLE end, where the address acquisition response includes the MAC address of the second BLE end encrypted by the first key.
可选地,在一些实施例中,所述处理模块还用于:Optionally, in some embodiments, the processing module is further configured to:
若所述第二BLE端为可信设备,确定所述装置执行所述预设操作;或者If the second BLE end is a trusted device, determine that the device performs the preset operation; or
若所述第二BLE端不为可信设备,确定所述装置不执行所述预设操作。If the second BLE terminal is not a trusted device, it is determined that the device does not perform the preset operation.
可选地,在一些实施例中,所述处理模块还用于:Optionally, in some embodiments, the processing module is further configured to:
根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述装置是否执行预设操作。According to whether the second BLE terminal is a trusted device, the signal strength of the second BLE terminal, the time interval between the second BLE terminal being determined to be a trusted device for two consecutive times, and the time of the second BLE terminal At least one of the permissions determines whether the device performs a preset operation.
可选地,在一些实施例中,所述处理模块还用于:Optionally, in some embodiments, the processing module is further configured to:
若确定所述第二BLE端为可信设备,并且所述第二BLE端的信号强度大于或等于预设值,确定所述装置执行所述预设操作;或者If it is determined that 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
若确定所述第二BLE端为可选设备,并且所述第二BLE端的信号强度小于所述预设值,确定所述装置不执行所述预设操作。If it is determined that 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.
可选地,在一些实施例中,所述处理模块还用于:Optionally, in some embodiments, the processing module is further configured to:
若所述第二BLE端连续两次被确定为可信设备的时间间隔在所述预设时长内,确定所述装置不执行所述预设操作;或者If 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; or
若所述第二BLE端连续两次被确定为可信设备的时间间隔大于所述预设时长,确定所述装置执行所述预设操作。If 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.
可选地,在一些实施例中,所述处理模块还用于:Optionally, in some embodiments, the processing module is further configured to:
若所述第二BLE端为可信设备,并且在所述第二BLE端的时间权限范围内,确定所述装置执行所述预设操作;或者If 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; or
若所述第二BLE端为可信设备,但不在所述第二BLE端的时间权限范围内,确定所述装置不执行所述预设操作。If 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.
可选地,在一些实施例中,所述处理模块还用于:Optionally, in some embodiments, the processing module is further configured to:
若所述第二BLE端的MAC地址在预存的MAC地址列表中,确定所述第二BLE端为可信设备;或者If the MAC address of the second BLE end is in the pre-stored MAC address list, it is determined that the second BLE end is a trusted device; or
若所述第二BLE端的MAC地址不在预存的MAC地址列表中,确定所 述第二BLE端为不可信设备。If the MAC address of the second BLE end is not in the pre-stored MAC address list, it is determined that the second BLE end is an untrusted device.
可选地,在一些实施例中,所述装置为蓝牙门锁,所述预设操作为开启所述蓝牙门锁;或所述装置为蓝牙灯,所述预设操作为开启所述蓝牙灯。Optionally, in some embodiments, 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 .
因此,在本申请实施例中,通过将装置配置为HID,在绑定过的设备靠近所述装置时,可以自动建立与所述装置的蓝牙连接,进一步可以根据该设备的MAC地址确定是否为可信设备,在该设备为可信设备的情况下即可实现对所述装置的控制,对于绑定过的设备,由于装置上存储有该设备的MAC地址,因此不需用户操作该设备即可实现对装置的控制,能够提升用户体验。Therefore, in the embodiment of the present application, by configuring the device as HID, when the bound device is close to the device, 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.
上述的处理模块可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。The above-mentioned processing module may be an integrated circuit chip with signal processing capability. In the implementation process, 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. 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.
上述的存储模块可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(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)。The above-mentioned storage module may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, 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. By way of exemplary but not restrictive description, many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, DDR SDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), Synchronous Link Dynamic Random Access Memory (Synchlink DRAM, SLDRAM) ) And Direct Rambus RAM (DR RAM).
本申请实施例还提供了一种芯片,用于实现上述图1和图2所示实施例中的方法。具体地,该芯片包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片的设备执行如上述实施例中的方法。The embodiment of the present application also provides a chip for implementing the method in the embodiment shown in FIG. 1 and FIG. 2. Specifically, 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.
本申请实施例还提供了一种计算机可读存储介质,用于存储计算机程序。该计算机可读存储介质可应用于本申请实施例中的装置,并且该计算机程序使得计算机执行本申请实施例的各个方法中由第一BLE端或者第二BLE端实现的相应流程,为了简洁,不再赘述。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.
本申请实施例还提供了一种计算机程序产品,包括计算机程序指令。该计算机程序产品可应用于本申请实施例中的装置,并且该计算机程序指令使得计算机执行本申请实施例的各个方法中由第一BLE端或者第二BLE端实现的相应流程,为了简洁,在此不再赘述。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.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
本申请实施例中的具体的例子只是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围,本领域技术人员可以在上述实施例的基础上进行各种改进和变形,而这些改进或者变形均落在本申请的保护范围内。The specific examples in the embodiments of the present application are only to help those skilled in the art to better understand the embodiments of the present application, rather than limiting the scope of the embodiments of the present application. Improvements and deformations, and these improvements or deformations fall within the scope of protection of this application.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (23)

  1. 一种自动识别身份的方法,其特征在于,应用于第一蓝牙低功耗BLE端,其中,所述第一BLE端被配置为人机交互设备HID,包括:A method for automatic identification, which is characterized by being applied to a first Bluetooth low energy BLE end, wherein the first BLE end is configured as a human-computer interaction device HID and includes:
    在第二BLE端靠近所述第一BLE端时,基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC地址,其中,所述第二BLE端为与所述第一BLE端绑定过的设备;When the second BLE terminal is close to the first BLE terminal, 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;
    根据所述第二BLE端的MAC地址,确定所述第二BLE端是否为可信设备;Determining whether the second BLE terminal is a trusted device according to the MAC address of the second BLE terminal;
    根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行预设操作。According to whether the second BLE terminal is a trusted device, it is determined whether the first BLE terminal performs a preset operation.
  2. 根据权利要求1所述的方法,其特征在于,通过配置所述第一BLE端包括HID服务,电池服务和设备信息服务,以及所述第一BLE端所发送的广播数据包中的外观字段为HID以将所述第一BLE端配置为HID。The method according to claim 1, wherein 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 configure the first BLE end as HID.
  3. 根据权利要求1或2所述的方法,其特征在于,在所述基于第一蓝牙连接获取所述第二BLE端的MAC地址之前,所述方法还包括:The method according to claim 1 or 2, characterized in that, before the obtaining the MAC address of the second BLE terminal based on the first Bluetooth connection, the method further comprises:
    建立所述第一BLE端和所述第二BLE端之间的链路层LL连接;Establishing a link layer LL connection between the first BLE end and the second BLE end;
    建立所述第一BLE端和所述第二BLE端之间的加密链路以建立所述第一BLE端和所述第二BLE端之间的绑定关系,其中,所述加密链路使用第一密钥加密;Establish an encrypted link between the first BLE terminal and the second BLE terminal to establish a binding relationship between the first BLE terminal and the second BLE terminal, wherein the encrypted link uses First key encryption;
    通过所述加密链路获取并存储所述第二BLE端的MAC地址。Obtain and store the MAC address of the second BLE end through the encrypted link.
  4. 根据权利要求3所述的方法,其特征在于,所述基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC地址,包括:The method according to claim 3, wherein the acquiring the media access control MAC address of the second BLE terminal based on the first Bluetooth connection comprises:
    向所述第二BLE端发送地址获取请求,所述地址获取请求通过所述第一密钥加密,所述地址获取请求用于请求获取所述第二BLE端的MAC地址;Sending an address acquisition request to the second BLE end, where the address acquisition request is encrypted by the first key, and the address acquisition request is used to request to acquire the MAC address of the second BLE end;
    接收所述第二BLE端发送的地址获取响应,所述地址获取响应包括通过所述第一密钥加密的所述第二BLE端的MAC地址。Receiving an address acquisition response sent by the second BLE end, where the address acquisition response includes the MAC address of the second BLE end encrypted by the first key.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行预设操作,包括:The method according to any one of claims 1 to 4, wherein the determining whether the first BLE terminal performs a preset operation according to whether the second BLE terminal is a trusted device comprises:
    若所述第二BLE端为可信设备,确定所述第一BLE端执行所述预设操作;或者If the second BLE terminal is a trusted device, determine that the first BLE terminal performs the preset operation; or
    若所述第二BLE端不为可信设备,确定所述第一BLE端不执行所述预设操作。If the second BLE terminal is not a trusted device, it is determined that the first BLE terminal does not perform the preset operation.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述根据所述第二BLE端是否为可信设备,确定所述第一BLE端是否执行预设操作,包括:The method according to any one of claims 1 to 5, wherein the determining whether the first BLE terminal performs a preset operation according to whether the second BLE terminal is a trusted device comprises:
    根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次被确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作。According to whether the second BLE terminal is a trusted device, and the signal strength of the second BLE terminal, 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.
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次被确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作,包括:The method according to claim 6, wherein the second BLE end is determined to be the second BLE end twice in a row according to whether the second BLE end is a trusted device and the signal strength of the second BLE end At least one of the time interval between trusted devices and the time authority of the second BLE terminal to determine whether the first BLE terminal performs the preset operation includes:
    若确定所述第二BLE端为可信设备,并且所述第二BLE端的信号强度大于或等于预设值,确定所述第一BLE端执行所述预设操作;或者If it is determined that 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
    若确定所述第二BLE端为可信设备,并且所述第二BLE端的信号强度小于所述预设值,确定所述第一BLE端不执行所述预设操作。If it is determined that 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.
  8. 根据权利要求6或7所述的方法,其特征在于,所述根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作,包括:The method according to claim 6 or 7, wherein the second BLE end is determined twice in succession according to whether the second BLE end is a trusted device, and the signal strength of the second BLE end For at least one of the time interval between trusted devices and the time authority of the second BLE terminal, determining whether the first BLE terminal performs the preset operation includes:
    若所述第二BLE端连续两次被确定为可信设备的时间间隔在所述预设时长内,确定所述第一BLE端不执行所述预设操作;或者If 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; or
    若所述第二BLE端连续两次被确定为可信设备的时间间隔大于所述预设时长,确定所述第一BLE端执行所述预设操作。If 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.
  9. 根据权利要求6至8中任一项所述的方法,其特征在于,所述根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述第一BLE端是否执行所述预设操作,包括:若所述第二BLE端为可信设备,并且在所述第二BLE端的时间权限范围内,确定所述第一BLE端执行所述预设操作;或者The method according to any one of claims 6 to 8, characterized in that, according to whether the second BLE end is a trusted device, and the signal strength of the second BLE end, the second BLE end It is determined twice in a row as at least one of the time interval between trusted devices and the time authority of the second BLE terminal, and determining whether the first BLE terminal performs the preset operation includes: if the second BLE terminal performs the preset operation The BLE end is a trusted device, and within the time authority of the second BLE end, it is determined that the first BLE end performs the preset operation; or
    若所述第二BLE端为可信设备,但不在所述第二BLE端的时间权限范围内,确定所述第一BLE端不执行所述预设操作。If 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.
  10. 根据权利要求1至9中任一项所述的方法,其特征在于,所述根据所述第二BLE端的MAC地址,确定所述第二BLE端是否为可信设备,包括:The method according to any one of claims 1 to 9, wherein the determining whether the second BLE terminal is a trusted device according to the MAC address of the second BLE terminal comprises:
    若所述第二BLE端的MAC地址在预存的MAC地址列表中,确定所述第二BLE端为可信设备;或者If the MAC address of the second BLE end is in the pre-stored MAC address list, it is determined that the second BLE end is a trusted device; or
    若所述第二BLE端的MAC地址不在预存的MAC地址列表中,确定所述第二BLE端为不可信设备。If the MAC address of the second BLE end is not in the pre-stored MAC address list, it is determined that the second BLE end is an untrusted device.
  11. 根据权利要求1至10中任一项所述的方法,其特征在于,所述第一BLE端为蓝牙门锁,所述预设操作为开启所述蓝牙门锁;或者所述第一BLE端为蓝牙灯,所述预设操作为开启所述蓝牙灯。The method according to any one of claims 1 to 10, wherein the first BLE terminal is a Bluetooth door lock, and the preset operation is to open the Bluetooth door lock; or the first BLE terminal It is a Bluetooth light, and the preset operation is to turn on the Bluetooth light.
  12. 一种自动识别身份的装置,其特征在于,所述装置被配置为人机交互设备HID,包括:An automatic identification device, characterized in that the device is configured as a human-computer interaction device HID, and includes:
    存储模块,用于存储与所述装置绑定成功的设备的MAC地址列表;The storage module is used to store the MAC address list of the equipment successfully bound with the device;
    蓝牙低功耗BLE模块,用于在第二BLE端靠近所述装置时,基于第一蓝牙连接获取所述第二BLE端的媒体接入控制MAC地址,其中,所述第二BLE端为与所述装置绑定过的设备;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, wherein the second BLE terminal is connected to the device The equipment bound to the device;
    处理模块,用于根据所述第二BLE端的MAC地址,确定所述第二BLE端是否为可信设备,根据所述第二BLE端是否为可信设备,确定所述装置是否执行预设操作。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 .
  13. 根据权利要求12所述的装置,其特征在于,通过配置所述装置包括HID服务,电池服务和设备信息服务,以及所述第一BLE端所发送的广播数据包中的外观字段为HID以将所述装置配置为HID。The device according to claim 12, wherein 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 change The device is configured as HID.
  14. 根据权利要求12所述的装置,其特征在于,在所述基于第一蓝牙连接获取所述第二BLE端的MAC地址之前,所述BLE模块还用于:The apparatus according to claim 12, wherein before the acquiring the MAC address of the second BLE terminal based on the first Bluetooth connection, the BLE module is further configured to:
    建立所述装置和所述第二BLE端之间的链路层LL连接;Establishing a link layer LL connection between the device and the second BLE terminal;
    建立所述装置和所述第二BLE端之间的加密链路以建立所述装置和所述第二BLE端之间的绑定关系,其中,所述加密链路使用第一密钥加密;Establishing an encrypted link between the device and the second BLE terminal to establish a binding relationship between the device and the second BLE terminal, wherein the encrypted link is encrypted using a first key;
    通过所述加密链路获取并存储所述第二BLE端的MAC地址。Obtain and store the MAC address of the second BLE end through the encrypted link.
  15. 根据权利要求14所述的装置,其特征在于,所述BLE模块还用于:The device according to claim 14, wherein the BLE module is further used for:
    向所述第二BLE端发送地址获取请求,所述地址获取请求通过所述第一密钥加密,所述地址获取请求用于请求获取所述第二BLE端的MAC地址;Sending an address acquisition request to the second BLE end, where the address acquisition request is encrypted by the first key, and the address acquisition request is used to request to acquire the MAC address of the second BLE end;
    接收所述第二BLE端发送的地址获取响应,所述地址获取响应包括通过所述第一密钥加密的所述第二BLE端的MAC地址。Receiving an address acquisition response sent by the second BLE end, where the address acquisition response includes the MAC address of the second BLE end encrypted by the first key.
  16. 根据权利要求12至15中任一项所述的装置,其特征在于,所述处理模块还用于:The device according to any one of claims 12 to 15, wherein the processing module is further configured to:
    若所述第二BLE端为可信设备,确定所述装置执行所述预设操作;或者If the second BLE end is a trusted device, determine that the device performs the preset operation; or
    若所述第二BLE端不为可信设备,确定所述装置不执行所述预设操作。If the second BLE terminal is not a trusted device, it is determined that the device does not perform the preset operation.
  17. 根据权利要求12至16中任一项所述的装置,其特征在于,所述处理模块还用于:The device according to any one of claims 12 to 16, wherein the processing module is further configured to:
    根据所述第二BLE端是否为可信设备,以及所述第二BLE端的信号强度、所述第二BLE端连续两次确定为可信设备之间的时间间隔和所述第二BLE端的时间权限中的至少一项,确定所述装置是否执行预设操作。According to whether the second BLE terminal is a trusted device, the signal strength of the second BLE terminal, the time interval between the second BLE terminal being determined to be a trusted device for two consecutive times, and the time of the second BLE terminal At least one of the permissions determines whether the device performs a preset operation.
  18. 根据权利要求17所述的装置,其特征在于,所述处理模块还用于:The device according to claim 17, wherein the processing module is further configured to:
    若确定所述第二BLE端为可信设备,并且所述第二BLE端的信号强度大于或等于预设值,确定所述装置执行所述预设操作;或者If it is determined that 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
    若确定所述第二BLE端为可选设备,并且所述第二BLE端的信号强度小于所述预设值,确定所述装置不执行所述预设操作。If it is determined that 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.
  19. 根据权利要求17或18所述的装置,其特征在于,所述处理模块还用于:The device according to claim 17 or 18, wherein the processing module is further configured to:
    若所述第二BLE端连续两次被确定为可信设备的时间间隔在所述预设时长内,确定所述装置不执行所述预设操作;或者If 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; or
    若所述第二BLE端连续两次被确定为可信设备的时间间隔大于所述预设时长,确定所述装置执行所述预设操作。If 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.
  20. 根据权利要求17至19中任一项所述的装置,其特征在于,所述处理模块还用于:The device according to any one of claims 17 to 19, wherein the processing module is further configured to:
    若所述第二BLE端为可信设备,并且在所述第二BLE端的时间权限范围内,确定所述装置执行所述预设操作;或者If 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; or
    若所述第二BLE端为可信设备,但不在所述第二BLE端的时间权限范围内,确定所述装置不执行所述预设操作。If 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.
  21. 根据权利要求12至20中任一项所述的装置,其特征在于,所述处理模块还用于:The device according to any one of claims 12 to 20, wherein the processing module is further configured to:
    若所述第二BLE端的MAC地址在预存的MAC地址列表中,确定所述第二BLE端为可信设备;或者If the MAC address of the second BLE end is in the pre-stored MAC address list, it is determined that the second BLE end is a trusted device; or
    若所述第二BLE端的MAC地址不在预存的MAC地址列表中,确定所述第二BLE端为不可信设备。If the MAC address of the second BLE end is not in the pre-stored MAC address list, it is determined that the second BLE end is an untrusted device.
  22. 根据权利要求12至21中任一项所述的装置,其特征在于,所述装置为蓝牙门锁,所述预设操作为开启所述蓝牙门锁;或所述装置为蓝牙灯,所述预设操作为开启所述蓝牙灯。The device according to any one of claims 12 to 21, wherein the device is a Bluetooth door lock, and the preset operation is to open the Bluetooth door lock; or the device is a Bluetooth lamp, the The preset operation is to turn on the Bluetooth light.
  23. 一种芯片,其特征在于,包括:A chip, characterized in that it comprises:
    存储器,用于存储计算机程序;Memory, used to store computer programs;
    处理器,用于从所述存储器中调用并运行所述计算机程序,使得安装有所述芯片的设备执行如权利要求1至11中任一项所述的方法。The processor is configured to call and run the computer program from the memory, so that the device installed with the chip executes the method according to any one of claims 1 to 11.
PCT/CN2020/075363 2020-02-14 2020-02-14 Method and apparatus for automatic identity recognition, and chip WO2021159506A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080001499.1A CN111758248B (en) 2020-02-14 2020-02-14 Method, device and chip for automatically identifying identity
PCT/CN2020/075363 WO2021159506A1 (en) 2020-02-14 2020-02-14 Method and apparatus for automatic identity recognition, and chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/075363 WO2021159506A1 (en) 2020-02-14 2020-02-14 Method and apparatus for automatic identity recognition, and chip

Publications (1)

Publication Number Publication Date
WO2021159506A1 true WO2021159506A1 (en) 2021-08-19

Family

ID=72713474

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/075363 WO2021159506A1 (en) 2020-02-14 2020-02-14 Method and apparatus for automatic identity recognition, and chip

Country Status (2)

Country Link
CN (1) CN111758248B (en)
WO (1) WO2021159506A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112466015A (en) * 2020-12-21 2021-03-09 上海哈敦智能科技有限公司 BLE bluetooth keyless induction system
CN115273278A (en) * 2022-03-16 2022-11-01 浙江利尔达物联网技术有限公司 Approaching automatic unlocking method based on BLE HID PROFILE

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104394531A (en) * 2014-10-08 2015-03-04 无锡指网生物识别科技有限公司 Wireless network connecting method of a terminal device
CN105430603A (en) * 2015-12-03 2016-03-23 北京握奇智能科技有限公司 Secure connection method and system for Bluetooth equipment
CN106550314A (en) * 2015-09-19 2017-03-29 深圳市潮流网络技术有限公司 A kind of call transferring method based on bluetooth location technology
CN107396283A (en) * 2017-06-30 2017-11-24 上海斐讯数据通信技术有限公司 A kind of router wireless connection authentication method and system
CN108537934A (en) * 2018-06-12 2018-09-14 上海酷信息科技有限公司 Bluetooth incudes key
CN108542055A (en) * 2018-06-12 2018-09-18 上海酷信息科技有限公司 It rides bracelet

Family Cites Families (12)

* Cited by examiner, † Cited by third party
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 (en) * 2016-04-19 2019-03-05 北京奇虎科技有限公司 Intelligent unlocking method and smart lock
CN106127892A (en) * 2016-06-17 2016-11-16 广东工业大学 A kind of Household gate control method based on Bluetooth communication
CN106780901A (en) * 2016-12-27 2017-05-31 李天瑜 A kind of intelligent door lock system and its application based on mobile phone MAC Address
CN107274531A (en) * 2017-07-07 2017-10-20 成都东软学院 Access control method and gate control system
CN107545636A (en) * 2017-09-04 2018-01-05 杭州干城科技有限公司 Optical cross box smart lock control method, apparatus and its system based on Bluetooth communication
KR102422330B1 (en) * 2017-09-13 2022-07-19 현대자동차주식회사 Vehicle, Terminal Device, and method for controlling the vehicle
CN107833317A (en) * 2017-10-20 2018-03-23 珠海华发新科技投资控股有限公司 Control of bluetooth access control system and method
CN109905869A (en) * 2019-04-04 2019-06-18 苏州足加新能源科技有限公司 Data transmission method between a kind of charging equipment and smart machine
CN110572804B (en) * 2019-08-27 2022-04-22 暨南大学 Bluetooth communication authentication request, receiving and communication method, mobile terminal and equipment terminal
KR102086722B1 (en) * 2019-08-28 2020-03-09 주식회사 블루앤 Door remote opening system using indoor and outdoor access distinction based on direction finding

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104394531A (en) * 2014-10-08 2015-03-04 无锡指网生物识别科技有限公司 Wireless network connecting method of a terminal device
CN106550314A (en) * 2015-09-19 2017-03-29 深圳市潮流网络技术有限公司 A kind of call transferring method based on bluetooth location technology
CN105430603A (en) * 2015-12-03 2016-03-23 北京握奇智能科技有限公司 Secure connection method and system for Bluetooth equipment
CN107396283A (en) * 2017-06-30 2017-11-24 上海斐讯数据通信技术有限公司 A kind of router wireless connection authentication method and system
CN108537934A (en) * 2018-06-12 2018-09-14 上海酷信息科技有限公司 Bluetooth incudes key
CN108542055A (en) * 2018-06-12 2018-09-18 上海酷信息科技有限公司 It rides bracelet

Also Published As

Publication number Publication date
CN111758248B (en) 2021-10-22
CN111758248A (en) 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 (en) Authentication method by updated key
CN106559213B (en) Equipment management method, equipment and system
WO2021159506A1 (en) Method and apparatus for automatic identity recognition, and chip
KR20160143333A (en) Method for Double Certification by using Double Channel
CN112512048B (en) Mobile network access system, method, storage medium and electronic device
WO2023142773A1 (en) Device control method, device, and distributed digital key system
CN111182483A (en) Terminal and method and system for resetting password of call restriction supplementary service thereof
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 (en) System and method for access authentication for wireless network
KR20190047557A (en) Earphone Device for Providing OTP by using Asynchronous Local Area Radio Communication
US20240056306A1 (en) Intelligent arrangement of unlock notifications
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 (en) Method for paired connection of access devices, and access devices
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