CN115206003A - Bluetooth-based unlocking method, terminal device, intelligent lock and storage medium - Google Patents

Bluetooth-based unlocking method, terminal device, intelligent lock and storage medium Download PDF

Info

Publication number
CN115206003A
CN115206003A CN202110314750.6A CN202110314750A CN115206003A CN 115206003 A CN115206003 A CN 115206003A CN 202110314750 A CN202110314750 A CN 202110314750A CN 115206003 A CN115206003 A CN 115206003A
Authority
CN
China
Prior art keywords
target message
intelligent lock
message
unlocking
lock
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110314750.6A
Other languages
Chinese (zh)
Inventor
王良
孙方林
林健新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110314750.6A priority Critical patent/CN115206003A/en
Priority to PCT/CN2022/082054 priority patent/WO2022199533A1/en
Publication of CN115206003A publication Critical patent/CN115206003A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/04TPC
    • H04W52/30TPC using constraints in the total amount of available transmission power
    • H04W52/32TPC of broadcast or control channels
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/04TPC
    • H04W52/30TPC using constraints in the total amount of available transmission power
    • H04W52/32TPC of broadcast or control channels
    • H04W52/322Power control of broadcast channels

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Lock And Its Accessories (AREA)

Abstract

The embodiment of the application is suitable for the technical field of communication, and provides an unlocking method based on Bluetooth, terminal equipment, an intelligent lock and a storage medium. The terminal equipment and the intelligent lock can be in Bluetooth communication. The intelligent lock sends BLE broadcast messages, the terminal equipment receives the BLE broadcast messages and identifies the intelligent lock; the method comprises the steps that terminal equipment generates a target message for indicating unlocking of an intelligent lock, and the target message is sent to the intelligent lock by adopting first transmitting power, wherein the first transmitting power is smaller than or equal to a first threshold value, and the first threshold value comprises-50 dBm; and the intelligent lock receives the target message and unlocks according to the target message. The first transmission power value is small, and the signal transmission distance is limited, usually tens of centimeters. And when the distance between the intelligent lock and the terminal equipment is within the transmission range of the first transmission power, receiving a target message sent by the terminal equipment. The target message is sent by the terminal equipment in a low power mode, so that the noninductive unlocking of the user is realized, and the unlocking feeling of the user is improved.

Description

Bluetooth-based unlocking method, terminal device, intelligent lock and storage medium
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to an unlocking method based on Bluetooth, terminal equipment, an intelligent lock and a storage medium.
Background
With the development and application of Bluetooth (BT) technology, bluetooth-based products are increasing, including smart locks that are unlocked based on bluetooth, such as smart door locks.
The process of the user opening the intelligent door lock is generally as follows: and clicking a door lock application program installed on the mobile phone by the user, and displaying an unlocking interface by the door lock application program after the mobile phone is connected with the intelligent door lock through Bluetooth. And the user clicks an unlocking key in the unlocking interface to unlock the intelligent door lock.
The process has more operation steps and lower unlocking efficiency.
Disclosure of Invention
The embodiment of the application provides an unlocking method based on Bluetooth, terminal equipment, an intelligent lock and a storage medium, which realize noninductive unlocking of a user and improve unlocking feeling of the user.
In a first aspect, an unlocking method based on bluetooth is provided, which is applied to a system composed of a terminal device and an intelligent lock, and the method includes: the intelligent lock sends BLE broadcast messages, the terminal equipment receives the BLE broadcast messages and identifies the intelligent lock; the method comprises the steps that terminal equipment generates a target message for indicating unlocking of an intelligent lock, and the target message is sent to the intelligent lock by adopting first transmitting power, wherein the first transmitting power is smaller than or equal to a first threshold value, and the first threshold value comprises-50 dBm; and the intelligent lock receives the target message and unlocks according to the target message.
In the bluetooth-based unlocking method provided by the first aspect, the value of the first transmission power (the ultra-low power in the embodiment of the present application) is small, and the signal transmission distance is limited, and is usually several tens of centimeters. The ultra small power is less than or equal to a first threshold comprising-50 dBm. For example, the first threshold may be set to-50 dBm to-60 dBm or less. The terminal equipment adopts the super-small power to send the target message to the intelligent lock, shortens the transmission distance of the terminal equipment for sending the target message, and provides support for carrying out non-inductive unlocking based on Bluetooth. Correspondingly, when the distance between the intelligent lock and the terminal equipment is within the ultra-low power transmission range, the target message sent by the terminal equipment is received for unlocking, and therefore the safety of the user in a non-inductive unlocking mode is improved. Therefore, the user does not need to perform unlocking operation in the terminal equipment interface, the noninductive unlocking of the user is realized, the unlocking efficiency is improved, and the user experience is improved.
In a possible implementation manner, before the terminal device generates the target message, the method further includes: the intelligent lock sends the encrypted information. Correspondingly, the terminal device generates a target message, which includes: and the terminal equipment generates a target message according to the encrypted information. The intelligent lock is unlocked according to the target message, and the intelligent lock unlocking method comprises the following steps: and the intelligent lock is unlocked according to the encryption information and the target message.
In this implementation, the encryption information is used to perform security verification on the target message. And at the mobile phone side, the target message is generated according to the encrypted information, so that the safety of the target message is improved. And at the door lock side, the received target message is subjected to security verification according to the encrypted information, and unlocking is performed only when the verification is passed, so that the security of door lock unlocking is improved.
In a possible implementation manner, before the terminal device sends the target message to the smart lock by using the first transmission power, the method further includes: and the terminal equipment judges whether the positions of the terminal equipment and the intelligent lock meet preset conditions or not. Correspondingly, the terminal equipment adopts the first transmission power to send the target message to the intelligent lock, and the method comprises the following steps: and if the positions of the terminal equipment and the intelligent lock meet the preset condition, the terminal equipment adopts the first transmitting power to transmit the target message to the intelligent lock.
In the implementation mode, when the positions of the terminal equipment and the intelligent lock meet the preset condition, the terminal equipment sends the target message, and the power consumption of the mobile phone is saved.
In a possible implementation manner, before the terminal device generates the target message, the method further includes: the intelligent lock sends the capability information of the intelligent lock; the capability information is used to indicate whether the smart lock supports non-inductive unlocking. Correspondingly, the terminal device generates a target message, which includes: and if the capability information of the intelligent lock indicates that the intelligent lock supports the non-inductive unlocking, the terminal equipment generates a target message.
In the implementation mode, when the capability information of the intelligent lock indicates that the intelligent lock supports non-inductive unlocking, the terminal equipment generates a target message, and the power consumption of the mobile phone is saved.
In a possible implementation, the method further includes: the intelligent lock sends a response message to the terminal equipment, and the response message is used for indicating whether the intelligent lock is successfully unlocked.
In the implementation mode, the intelligent lock sends a response message to the terminal equipment after being unlocked, and the terminal equipment is informed of unlocking, so that the unlocking flow is complete, the unlocking flow is prevented from being continuously executed, and the power consumption of the mobile phone and the door lock is saved.
In a second aspect, a bluetooth-based unlocking method is provided, which is applied to a terminal device, and includes: receiving BLE broadcast messages sent by the intelligent lock, and identifying the intelligent lock; generating a target message, wherein the target message is used for indicating the unlocking of the intelligent lock; and sending the target message to the intelligent lock by adopting a first sending power, wherein the first sending power is less than or equal to a first threshold value, and the first threshold value comprises-50 dBm.
In a possible implementation manner, before generating the target message, the method further includes: and receiving the encrypted information sent by the intelligent lock. Accordingly, generating a target message includes: and generating the target message according to the encrypted information.
In one possible implementation, the encryption information includes a random number; generating a target message according to the encryption information, comprising: encrypting the random number according to a preset encryption and decryption algorithm to generate an encrypted random number; and generating a target message, wherein the target message comprises the encrypted random number and an unlocking instruction.
In the implementation mode, the security of the target message is verified through the random number and the preset encryption and decryption algorithm, so that the security of the target message and the security of unlocking the door lock are improved.
In one possible implementation, the encryption information includes a public key in an asymmetric key pair; generating a target message according to the encryption information, comprising: encrypting the unlocking instruction by using the public key to generate an encrypted unlocking instruction; and generating a target message, wherein the target message comprises the encryption unlocking instruction.
In the implementation mode, the security verification is carried out on the target message through the asymmetric key, so that the security of the target message and the security of door lock unlocking are improved.
In one possible implementation, the encryption information is carried in a BLE broadcast message sent by the smart lock.
In the realization mode, the mobile phone sends the encrypted information by sending the BLE broadcast message, the BLE connection between the mobile phone and the door lock is not required to be established, and the message flow is saved.
In a possible implementation manner, before sending the target message to the smart lock by using the first transmission power, the method further includes: and judging whether the positions of the terminal equipment and the intelligent lock meet a preset condition or not. Correspondingly, the method for sending the target message to the intelligent lock by adopting the first transmission power comprises the following steps: and if the positions of the terminal equipment and the intelligent lock meet the preset condition, sending a target message to the intelligent lock by adopting the first sending power.
In a possible implementation manner, judging whether the positions of the terminal device and the intelligent lock meet a preset condition includes: receiving a ranging broadcast message sent by the intelligent lock; and judging whether the signal strength of the ranging broadcast message meets a preset condition or not.
In this implementation, the signal strength of the ranging broadcast message is inversely related to the distance between the handset and the door lock. The closer the distance between the mobile phone and the door lock is, the higher the signal intensity of the ranging broadcast message received by the mobile phone is. The mobile phone determines whether to send the target message according to whether the signal intensity of the ranging broadcast message meets the preset condition, so that the power consumption of the mobile phone is saved.
In a possible implementation manner, the smart lock comprises at least one antenna, and the ranging broadcast message is sent by the smart lock through any one antenna; judging whether the signal strength of the ranging broadcast message meets a preset condition or not, including: and judging whether the signal intensity of the ranging broadcast message is greater than a preset threshold value.
In the implementation mode, if the mobile phone determines that the signal intensity of the ranging broadcast message is greater than the preset threshold value, the distance between the mobile phone and the door lock is relatively short, and the mobile phone sends the target message to the door lock, so that the power consumption of the mobile phone is saved.
In a possible implementation manner, the smart lock includes a first antenna and a second antenna, when the smart lock is installed on a door, the first antenna is located at an outer side of the door, the second antenna is located at an inner side of the door, the ranging broadcast message includes a first ranging broadcast message and a second ranging broadcast message, the first ranging broadcast message is sent by the smart lock through the first antenna and includes first identification information, the first identification information is used for indicating that the first antenna is located outside the door, the second ranging broadcast message is sent by the smart lock through the second antenna and includes second identification information, and the second identification information is used for indicating that the second antenna is located inside the door; judging whether the signal strength of the ranging broadcast message meets a preset condition or not, including: it is determined whether the signal strength of the first ranging broadcast message is greater than the signal strength of the second ranging broadcast message.
In this implementation, there are antennas on both the inside and outside of the door. By comparing the signal strength of the first ranging broadcast message corresponding to the antenna on the outer side of the door with the signal strength of the second ranging broadcast message corresponding to the antenna on the inner side of the door, whether the mobile phone is located inside or outside the door can be determined. When the mobile phone is positioned outside the door, the mobile phone sends the target message to the door lock, so that the power consumption of the mobile phone is saved.
In one possible implementation manner, the sending a target message to a smart lock by using a first transmission power includes: and continuously sending the target message to the intelligent lock by adopting the first transmission power until the preset sending time length is reached or the preset sending times are reached.
In the implementation mode, the target message is continuously sent for multiple times through the mobile phone, the success rate of receiving the target message by the door lock is improved, and the door lock can be unlocked. By setting the preset sending time length or the preset sending times, the condition that the mobile phone sends the target message all the time is avoided, the energy consumption is saved, and the unlocking safety is improved.
In one possible implementation, the target message is a BLE broadcast message.
In the realization mode, the mobile phone sends the target message by sending the BLE broadcast message, the BLE connection between the mobile phone and the door lock is not required to be established, and the message flow is saved.
In a possible implementation manner, before generating the target message, the method further includes: and receiving the capability information of the intelligent lock sent by the intelligent lock. Accordingly, generating a target message includes: and if the capability information of the intelligent lock indicates that the intelligent lock supports the non-inductive unlocking, generating a target message.
In a possible implementation, the method further includes: and receiving a response message sent by the intelligent lock, wherein the response message is used for indicating whether the intelligent lock is successfully unlocked.
In a possible implementation manner, after the smart lock is identified, the method further includes: and establishing BLE connection with the intelligent lock.
In a third aspect, an unlocking method based on bluetooth is provided, which is applied to an intelligent lock, and the method includes: transmitting a BLE broadcast message; sending the encrypted information; receiving a target message sent by the terminal equipment, wherein the target message is used for indicating unlocking of the intelligent lock; and unlocking according to the encrypted information and the target message.
In one possible implementation manner, the encryption information includes a random number, the target message includes an encrypted random number and an unlocking instruction, and the encrypted random number is generated by encrypting the random number by the terminal device according to a preset encryption and decryption algorithm; unlocking according to the encrypted information and the target message, comprising: decrypting the encrypted random number according to a preset encryption and decryption algorithm to obtain a decrypted random number; and if the decryption random number is the same as the random number, unlocking according to the unlocking instruction.
In one possible implementation manner, the encrypted information includes a public key in an asymmetric key pair, the target message includes an encryption and unlocking instruction, and the encryption and unlocking instruction is generated by the terminal device encrypting the unlocking instruction according to the public key; unlocking according to the encrypted information and the target message, comprising: decrypting the encrypted unlocking instruction according to a private key in the asymmetric key pair to obtain an unlocking instruction; and unlocking according to the unlocking instruction.
In one possible implementation, the encryption information is carried in a BLE broadcast message.
In a possible implementation manner, before receiving a target message sent by a terminal device, the method further includes: and sending the ranging broadcast message.
In one possible implementation, the smart lock includes N antennas, where N is greater than or equal to 1, and sends a ranging broadcast message, including: the ranging broadcast message is transmitted through at least one antenna of the N antennas.
In one possible implementation manner, the smart lock comprises a first antenna and a second antenna, when the smart lock is installed on a door, the first antenna is located at the outer side of the door, and the second antenna is located at the inner side of the door; transmitting a ranging broadcast message, comprising: transmitting a first ranging broadcast message through a first antenna using a target power, and transmitting a second ranging broadcast message through a second antenna using the target power; the first ranging broadcast message includes first identification information indicating that the first antenna is located outside the door, and the second ranging broadcast message includes second identification information indicating that the second antenna is located inside the door.
In a possible implementation manner, the target message is a BLE broadcast message sent by the terminal device.
In a possible implementation manner, before receiving a target message sent by a terminal device, the method further includes: sending the capability information of the intelligent lock; the capability information is used to indicate whether the smart lock supports a sensorless unlocking.
In a possible implementation, the method further includes: and sending a response message to the terminal equipment, wherein the response message is used for indicating whether the intelligent lock is successfully unlocked.
In a possible implementation manner, before receiving a target message sent by a terminal device, the method further includes: a BLE connection is established with the terminal device.
In a fourth aspect, a terminal device is provided, which includes: the receiving module is used for receiving BLE broadcast messages sent by the intelligent lock and identifying the intelligent lock; the processing module is used for generating a target message, and the target message is used for indicating the unlocking of the intelligent lock; and the sending module is used for sending the target message to the intelligent lock by adopting a first sending power, wherein the first sending power is less than or equal to a first threshold value, and the first threshold value comprises-50 dBm.
In a possible implementation manner, the receiving module is further configured to receive encrypted information sent by the smart lock; the processing module is specifically configured to: and generating the target message according to the encryption information.
In one possible implementation, the encryption information includes a random number; the processing module is specifically configured to: encrypting the random number according to a preset encryption and decryption algorithm to generate an encrypted random number; generating a target message; the target message includes an encrypted random number and an unlock instruction.
In one possible implementation, the encryption information includes a public key in an asymmetric key pair; the processing module is specifically configured to: encrypting the unlocking instruction by using the public key to generate an encrypted unlocking instruction; generating a target message; the target message includes an encrypted unlock instruction.
In one possible implementation, the encryption information is carried in a BLE broadcast message sent by the smart lock.
In a possible implementation manner, the processing module is further configured to: judging whether the positions of the terminal equipment and the intelligent lock meet a preset condition or not; and if the positions of the terminal equipment and the intelligent lock meet the preset condition, controlling a sending module to send a target message to the intelligent lock by adopting first sending power.
In a possible implementation manner, the receiving module is further configured to receive a ranging broadcast message sent by the smart lock; the processing module is specifically configured to: and judging whether the signal strength of the ranging broadcast message meets a preset condition or not.
In a possible implementation manner, the smart lock comprises at least one antenna, and the ranging broadcast message is sent by the smart lock through any one antenna; the processing module is specifically configured to: and judging whether the signal intensity of the ranging broadcast message is greater than a preset threshold value.
In a possible implementation manner, the smart lock includes a first antenna and a second antenna, when the smart lock is installed on a door, the first antenna is located at an outer side of the door, the second antenna is located at an inner side of the door, the ranging broadcast message includes a first ranging broadcast message and a second ranging broadcast message, the first ranging broadcast message is sent by the smart lock through the first antenna and includes first identification information, the first identification information is used for indicating that the first antenna is located outside the door, the second ranging broadcast message is sent by the smart lock through the second antenna and includes second identification information, and the second identification information is used for indicating that the second antenna is located inside the door; the processing module is specifically configured to: it is determined whether the signal strength of the first ranging broadcast message is greater than the signal strength of the second ranging broadcast message.
In a possible implementation manner, the sending module is specifically configured to: and continuously sending the target message to the intelligent lock by adopting the first sending power until the preset sending time length is reached or the preset sending times is reached.
In one possible implementation, the target message is a BLE broadcast message.
In a possible implementation manner, the receiving module is further configured to receive capability information of the smart lock sent by the smart lock; the processing module is specifically configured to: and if the capability information of the intelligent lock indicates that the intelligent lock supports the non-inductive unlocking, generating a target message.
In a possible implementation manner, the receiving module is further configured to receive a response message sent by the smart lock, where the response message is used to indicate whether the smart lock is successfully unlocked.
In a possible implementation manner, the processing module is further configured to establish a BLE connection with the smart lock.
In a fifth aspect, a smart lock is provided, comprising: a transmitting module, configured to transmit a BLE broadcast message; the sending module is also used for sending the encrypted information; the receiving module is used for receiving a target message sent by the terminal equipment, and the target message is used for indicating the unlocking of the intelligent lock; and the processing module is used for unlocking according to the encryption information and the target message.
In one possible implementation manner, the encryption information includes a random number, the target message includes an encrypted random number and an unlocking instruction, and the encrypted random number is generated by encrypting the random number by the terminal device according to a preset encryption and decryption algorithm; the processing module is specifically configured to: decrypting the encrypted random number according to a preset encryption and decryption algorithm to obtain a decrypted random number; and if the decryption random number is the same as the random number, unlocking according to the unlocking instruction.
In one possible implementation manner, the encrypted information includes a public key in an asymmetric key pair, the target message includes an encryption and unlocking instruction, and the encryption and unlocking instruction is generated by the terminal device encrypting the unlocking instruction according to the public key; the processing module is specifically configured to: decrypting the encrypted unlocking instruction according to a private key in the asymmetric key pair to obtain an unlocking instruction; and unlocking according to the unlocking instruction.
In one possible implementation, the encryption information is carried in a BLE broadcast message.
In a possible implementation manner, the sending module is further configured to send a ranging broadcast message.
In a possible implementation manner, the smart lock includes N antennas, N is greater than or equal to 1, and the sending module is specifically configured to: the ranging broadcast message is transmitted through at least one antenna of the N antennas.
In one possible implementation manner, the smart lock comprises a first antenna and a second antenna, when the smart lock is installed on a door, the first antenna is located at the outer side of the door, and the second antenna is located at the inner side of the door; the sending module is specifically configured to: transmitting a first ranging broadcast message through a first antenna using a target power, and transmitting a second ranging broadcast message through a second antenna using the target power; the first ranging broadcast message includes first identification information indicating that the first antenna is located outside the door, and the second ranging broadcast message includes second identification information indicating that the second antenna is located inside the door.
In a possible implementation manner, the target message is a BLE broadcast message sent by the terminal device.
In a possible implementation manner, the sending module is further configured to send capability information of the smart lock; the capability information is used to indicate whether the smart lock supports non-inductive unlocking.
In a possible implementation manner, the sending module is specifically configured to: and sending a response message to the terminal equipment, wherein the response message is used for indicating whether the intelligent lock is successfully unlocked.
In a possible implementation manner, the processing module is further configured to: and establishing BLE connection with the terminal equipment.
In a sixth aspect, a terminal device is provided, where the terminal device includes a processor, and the processor is configured to couple with a memory, read instructions in the memory, and cause the terminal device to execute the method provided in the second aspect according to the instructions.
In a seventh aspect, an intelligent lock is provided, where the intelligent lock includes a processor, and the processor is configured to couple with a memory, read an instruction in the memory, and cause the intelligent lock to perform the method provided in the third aspect according to the instruction.
In an eighth aspect, a program is provided, which when executed by a processor is adapted to perform the method provided by the second or third aspect.
A ninth aspect provides a computer readable storage medium having stored therein instructions which, when run on a computer or processor, implement the method provided by the second or third aspect.
In a tenth aspect, a program product is provided, the program product comprising a computer program stored in a readable storage medium, the computer program being readable from the readable storage medium by at least one processor of a device, the at least one processor executing the computer program to cause the device to carry out the method provided by the second or third aspect.
Drawings
FIG. 1 is a diagram of a system architecture suitable for use with embodiments of the present application;
FIG. 2 is a schematic diagram of an interface change for adding a smart device to an APP;
FIG. 3 is a schematic diagram of an interface variation for adding door lock information to APP;
FIG. 4 is a schematic diagram of one implementation of Bluetooth based unlocking;
fig. 5 is a schematic diagram illustrating a bluetooth-based unlocking method according to an embodiment of the present application;
fig. 6 is an interface diagram for setting a non-inductive unlocking function of a mobile phone and a door lock according to an embodiment of the present application;
fig. 7 is a schematic view of an application scenario applicable to the embodiment of the present application;
FIG. 8 is a schematic diagram of another application scenario applicable to the embodiment of the present application;
FIG. 9 is a schematic diagram of another application scenario applicable to the embodiment of the present application;
fig. 10 is a message interaction diagram of a bluetooth-based unlocking method according to an embodiment of the present application;
fig. 11 is another message interaction diagram of the bluetooth-based unlocking method according to the embodiment of the present application;
fig. 12 is a schematic diagram of a data format for transmitting doorlock capability information by using GATT protocol according to an embodiment of the present application;
fig. 13 is a further message interaction diagram of the bluetooth-based unlocking method according to the embodiment of the present application;
fig. 14 is a message interaction diagram of a bluetooth-based unlocking method according to an embodiment of the present application;
fig. 15 is a schematic diagram of a position of a door lock antenna according to an embodiment of the present application;
fig. 16 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
fig. 17 is a schematic structural diagram of an intelligent lock according to an embodiment of the present application;
fig. 18 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the drawings.
The unlocking method based on the Bluetooth is applied to a scene of unlocking an intelligent lock based on the Bluetooth. By way of illustration, fig. 1 is a diagram of a system architecture suitable for use with embodiments of the present application. As shown in fig. 1, the system may include a terminal device 100 and a smart lock 200. The terminal device 100 and the smart lock 200 can perform bluetooth communication. The terminal device 100 is installed with an Application (APP) for managing the smart lock 200, and the name and the developer of the application are not limited in the embodiment of the present application.
The embodiment of the present application does not limit the type of the terminal device 100. For example, some examples of terminal devices are: mobile phones, tablet computers, notebook computers, palm computers, wearable devices, and the like.
The embodiment of the present application does not limit the type, shape, structure and specific components included in the smart lock 200. For example, some examples of smart locks are: intelligent door lock, intelligent vehicle lock, intelligent padlock, etc. Optionally, as shown in fig. 1, the smart lock 200 may include, but is not limited to, at least one of the following: a combination dial 201 or a fingerprint touch screen 202. Optionally, the combination disk 201 may be a physical key combination disk, or may be an electronic combination disk.
For convenience of description, in the embodiment of the present application, an example in which an intelligent lock is a door lock and a terminal device is a mobile phone is described.
Optionally, the bluetooth communication in this embodiment of the present application is Bluetooth Low Energy (BLE) communication.
First, an APP installed on a mobile phone to manage a smart lock is exemplified.
The user can add intelligent equipment to the APP. Illustratively, fig. 2 is a schematic diagram of an interface change of adding a smart device to an APP. In this example, the APP may manage multiple types of smart devices, e.g., smart locks, gateways, smart appliances, and so on. Optionally, in other examples, different smart locks correspond to different APPs, for example, smart locks of different manufacturers are matched with corresponding APPs. As shown in fig. 2 (a), a plurality of APP icons are included in the desktop 11 of the mobile phone. The user clicks on the icon 12, opening the smart life application. Accordingly, the mobile phone runs the smart life application in response to the user clicking the icon 12, and displays the main interface 13 of the smart life application, as shown in fig. 2 (b). In the main interface 13 of the smart life application, the lower menu area 14 includes: home, mall, scene and my total 4 menus. Optionally, after the mobile phone runs the smart life application, the system defaults to the currently displayed "home" interface as the main interface 13. At present, the wisdom life is used and is not added any smart machine, and the equipment quantity is 0. The user can click the control 15 in the upper right corner of the main interface 13 to add the intelligent device. Accordingly, the handset displays a window 16 in the main interface 13 in response to the user clicking the control 15, as shown in (c) of fig. 2. The window 16 includes: the number of the added devices, the created scenes, the shared devices and the connected three-party platform is 4. The user clicks the "add device" menu 17 and continues to add smart devices to the APP. Accordingly, the cellular phone displays a prompt window 18 in the main interface 13 in response to the user's operation of clicking the "add device" menu 17, as shown in fig. 2 (d). The user proceeds to the next step by viewing the prompts in prompt window 18. For example, the prompt "smart life" requires bluetooth to be turned on to discover and add bluetooth devices. Is it turned on? ". The user clicks the "open" button 19 in the prompt window 18 and continues to add the smart device to the APP. Accordingly, the cellular phone displays the main interface 20 of the add device in response to the user's operation of clicking the "on" button 19, as shown in fig. 2 (e). The main interface 20 of the adding device comprises a prompt window 21, and the user performs the next operation by looking at the prompt in the prompt window 21. For example, the prompt indicates that the "auto-scan function needs to start the mobile phone location service to be used", and the user clicks the "go start" button 22 in the prompt window 21 to start the mobile phone location service. Accordingly, the mobile phone responds to the operation that the user clicks the 'go to start' button 22, starts the mobile phone location service, and scans whether intelligent equipment exists around the mobile phone based on the Bluetooth. During the scanning process of the mobile phone, the interface change can be shown in (f) in fig. 2, and the main interface 20 of the add-on device includes a prompt message, for example, "scan in progress, please ensure that the smart device is connected to the power supply and is located near the mobile phone". Optionally, the scanning area 24 in the pattern 23 in the main interface 20 may rotate around the center of the circle, so as to present an animation effect and dynamically prompt the user that the mobile phone is currently scanning to find the smart device. Optionally, other ways of adding the smart device are provided in the main interface 20, for example, the user may click the "add manually" button 25 below to add the smart device manually; alternatively, the user may click on the "scan code add" button 26 underneath to add the smart device by scanning its identification code. After the mobile phone scanning is finished, the connectable smart device is displayed, as shown in (g) of fig. 2, the main interface 20 includes the door lock 001 found by the mobile phone scanning, and the user can click the "connect" button 27 to establish the bluetooth connection between the mobile phone and the door lock 001. Correspondingly, the mobile phone responds to the operation that the user clicks the 'connect' button 27, and Bluetooth connection is established between the door lock 001 to complete adding of the intelligent device. Thereafter, as shown in fig. 2 (h), the user may click on the return control 28 in the home interface 20 of the add-on device, displaying the home interface of the smart life application. Accordingly, the mobile phone displays the main interface 13 of the smart life application in response to the user clicking the return control 28, as shown in (i) of fig. 2. At this moment, it is 1 that the smart devices that the wisdom life was used to add have shown in main interface 13, specifically are lock 001.
Optionally, the user may configure the relevant information of the intelligent device in the APP, and the specific content of the relevant information is not limited in the embodiment of the present application. Illustratively, fig. 3 is a schematic diagram of an interface change for adding door lock information to an APP. As shown in fig. 3 (a), the mobile phone currently displays the main interface 31 of my device, and the process that the user operates in the APP to jump to display the main interface 31 is not limited in this example. Suppose that there are 3 smart devices added to APP, including door lock 001, door lock 002 and gateway 1 in the home, and these 3 devices are displayed in the main interface 31. The user can click the door lock 001 and check the related information of the door lock 001. Accordingly, the mobile phone displays the main interface 32 of the door lock 001 in response to the user's operation of clicking the door lock 001, as shown in fig. 3 (b). The main interface 32 of the door lock 001 may include prompt information, for example, "get the mobile phone close to the door lock, click the configuration button after illuminating the password panel", for configuring door lock information, for example, a name of the door lock, and opening and closing of a function related to the door lock. A fingerprint management key 33, a password management key 34, and an unlock record key 35 may also be included. The user can click different keys to perform different operations. For example, the user adds the user's fingerprint information by clicking the fingerprint management key 33, sets a password for the door lock 001 by clicking the password management key 34, or checks the history of unlocking the door lock 001 by clicking the unlocking record key 35.
It should be noted that fig. 2 and 3 are only examples and do not limit the APP and related interfaces for managing the smart lock.
When the user opens the door lock, one implementation way is that the user clicks the unlocking button in the relevant interface of the APP to unlock the door lock. For example, fig. 4 is a schematic diagram of an implementation manner of bluetooth-based unlocking. As shown in fig. 4, when the user wants to unlock the door lock 400, the user clicks the icon 42 in the desktop 41 of the mobile phone 300 to operate the door lock APP. Correspondingly, the mobile phone 300 responds to the operation of clicking the icon 42 by the user, runs the door lock APP, establishes bluetooth connection with the door lock 400, and displays the interface 43. An unlock button 44 is included in the interface 43. The embodiment of the present application does not limit the process of the user operating in the APP to jump to the display interface 43. The user clicks the unlock button 44, and accordingly, the mobile phone 300 sends an unlock instruction to the door lock 400 in response to the user clicking the unlock button 44. The door lock 400 is unlocked according to the unlocking instruction, and the user rotates the door handle to unlock.
It should be noted that, the embodiment of the present application does not limit the interface where the unlocking button is located, and the implementation manners in different APPs are different. Alternatively, in another example, as shown in fig. 3 (a), an unlocking button of each door lock is included in the main interface 31. For example, the unlocking key of the door lock 001 is the key 36, and the user can click the key 36 to unlock the door lock 001.
As can be seen, in the above implementation, unlocking requires user involvement.
The embodiment of the application provides an unlocking method based on Bluetooth, and when terminal equipment is in Bluetooth communication with a door lock, the terminal equipment has two kinds of transmitting power which can be respectively called as normal power and ultra-small power. The value of the ultra-low power is small compared to the normal power, and the signal transmission distance is limited, typically several tens of centimeters. And the terminal equipment adopts ultra-small power to send an unlocking instruction to the door lock, and adopts normal power to send other data to the door lock. For example, fig. 5 is a schematic diagram illustrating a principle of a bluetooth-based unlocking method according to an embodiment of the present application. As shown in fig. 5, the user carries the mobile phone 300 with him, the range in which the mobile phone 300 performs bluetooth communication with normal power is denoted as range 51, the range in which bluetooth communication with ultra-low power is denoted as range 52, and the range 51 is larger than the range 52. When the mobile phone 300 and the door lock 400 are within the range 51, the mobile phone 300 and the door lock 400 can transmit other data. When the distance between the mobile phone 300 and the door lock 400 is small enough to be within the range 52, the door lock 400 can receive the unlocking instruction sent by the mobile phone 300. The mobile phone shortens the transmission distance of the unlocking instruction sent by the mobile phone by setting the ultra-small power, thereby providing a support for carrying out the non-inductive unlocking based on the Bluetooth and improving the safety of the non-inductive unlocking of a user. Therefore, the user does not need to perform unlocking operation in a mobile phone interface, the mobile phone sends an unlocking instruction to the door lock by adopting ultra-low power, correspondingly, the door lock is unlocked safely according to the received unlocking instruction, the noninductive unlocking of the user is realized, the unlocking efficiency is improved, and the user experience is improved.
Next, a concept related to the embodiment of the present application will be explained.
1. Normal power and ultra-low power
The normal power refers to power used by the terminal device in the existing bluetooth communication. The ultra-low power is used for sending an unlocking command to the door lock by adopting low-numerical transmitting power in order to ensure the safety of non-inductive unlocking. The technical principle can be seen in fig. 5.
Optionally, the mobile phone may send other information related to the unlocking instruction to the door lock by using ultra-low power, so that the door lock further verifies whether the received unlocking instruction is correct and complete, and the security of the non-inductive unlocking is further improved. The embodiment of the present application does not limit specific contents of other information.
It should be noted that, in the embodiment of the present application, a value or a value range of the ultra-low power is not limited. It can be understood that the smaller the value of the ultra-low power is, the shorter the transmission distance of the signal is, and the higher the safety of the bluetooth-based non-inductive unlocking is. Optionally, the ultra-small power may be below-50 dBm to-60 dBm, so that the unlocking instruction may be received only when the door lock is within a distance of several tens of centimeters from the terminal device, for example, the distance between the door lock and the terminal device is below 30 centimeters to 50 centimeters.
It should be noted that, in the embodiments of the present application, names of the normal power and the ultra-small power are not limited. Alternatively, the ultra-low power is also referred to as a first transmission power, and the normal power is also referred to as a second transmission power.
2. Non-inductive unlocking function of terminal equipment
The non-inductive unlocking means that when a user needs to open the door lock, the user is not required to participate in unlocking operation. For the user, the unlocking of the door lock is not sensed, and the user experience can be improved. For example, in the scenario shown in fig. 4, the user needs to click the unlock button to unlock the mobile phone, which is not a sensorless unlock.
The noninductive unlocking function of the terminal equipment means that the terminal equipment can adopt ultra-small power to send an unlocking instruction to the intelligent door lock. The name of the non-inductive unlocking function is not limited in the embodiment of the application.
Optionally, in an implementation manner, the terminal device supports the non-inductive unlocking function by default.
Optionally, in another implementation manner, the non-inductive unlocking function of the terminal device may be turned on or off by the user. The setting mode of the user is not limited in the embodiment of the application. For example, the setting may be performed by voice, a preset gesture, or an operation in an associated display interface.
3. Non-inductive unlocking function of door lock
The non-sensory unlocking function of the door lock refers to a function that can be unlocked without the user participating in an unlocking operation.
Optionally, in one implementation, the door lock supports a non-sensory unlock function by default.
Optionally, in another implementation, the lock may be unlocked or closed by the user in the APP that manages the lock. The setting mode of the user is not limited in the embodiment of the application. For example, the setting may be performed by voice, a preset gesture, or an operation in an associated display interface.
Fig. 6 is an interface diagram for setting a non-inductive unlocking function of a mobile phone and a door lock according to an embodiment of the present application. Continuing to fig. 3 (b), the user clicks on control 37, displaying more information about door lock 001. Accordingly, the cellular phone displays the interface 61 in response to the user's operation of clicking the control 37, as shown in (a) of fig. 6. Further information of the door lock 001 is included in the interface 61, such as device name, warranty information, device information, and version upgrade. The interface 61 also comprises a unbinding device button 62, and a user can click the button 62 to unbind the mobile phone from the door lock 001. The interface 61 further includes a switch control 63 for a non-inductive unlocking function, which is used to set the non-inductive unlocking function of the mobile phone and the door lock 001. Alternatively, a different display modality of the switch control 63 may indicate whether the non-sensory unlock function is on or off. Currently, the non-inductive unlocking function of the mobile phone and the door lock 001 is in a closed state. The user can click the switch control 63, and accordingly, the mobile phone responds to the click operation of the user to open the non-inductive unlocking function of the mobile phone and the door lock 001, and the display form of the switch control 63 changes, as shown in fig. 6 (b).
Fig. 6 is an example, and the manner of providing the function of non-inductive unlocking of the cellular phone and the door lock is not limited. Alternatively, the functions of the mobile phone and the door lock for non-inductive unlocking can be set separately, or can be set by one key as shown in fig. 6.
In the following, an application scenario to which the embodiment of the present application is applied will be described by way of example, but the application scenario is not limited.
Optionally, in an example, fig. 7 is a schematic view of an application scenario applicable to the embodiment of the present application, and illustrates a process in which a distance between a user carrying a mobile phone and a door lock gradually decreases before the user enters a door. As shown in fig. 7 (a), when the user a carries the mobile phone a at position 0, the distance between the user a and the door lock is too far, which exceeds the bluetooth communication range of the mobile phone a under normal power, and the mobile phone a cannot perform bluetooth communication with the door lock. As shown in fig. 7 (b), as the user a moves towards the door lock, the distance between the mobile phone a and the door lock is reduced, and when the user a is at position 1, the mobile phone a can perform bluetooth communication with the door lock by using normal power, but cannot perform bluetooth communication with the door lock by using ultra-low power. Where range 52 shows the range where handset a employs ultra-low power for bluetooth communication. At this time, if the mobile phone a adopts ultra-low power to send an unlocking instruction to the door lock, the door lock cannot receive the unlocking instruction, and cannot be unlocked. As shown in fig. 7 (c), as the user a continues to move toward the door lock, the distance between the mobile phone a and the door lock continues to decrease. Fig. 7 (c) is similar to fig. 7 (b), and the mobile phone a cannot perform bluetooth communication with the door lock using ultra-low power. As shown in fig. 7 (d), as the user a continues to move towards the door lock, when the user a is at the position 3, the mobile phone a may perform bluetooth communication with the door lock by using normal power, or may perform bluetooth communication with the door lock by using ultra-low power. At the moment, the mobile phone A sends an unlocking instruction to the door lock by adopting ultra-low power, and the door lock can be unlocked after receiving the unlocking instruction.
Optionally, in another example, fig. 8 is a schematic view of another application scenario in which the embodiment of the present application is applied, and shows a scenario in which a user enters a door from the outside of the door and places a mobile phone near a door lock. Fig. 8 (a) is the same as fig. 7 (d), and the description thereof is omitted. As shown in fig. 8 (b), after the user a enters the door, the mobile phone a is placed near the door lock, the door lock is located in a range 52 where the mobile phone a performs bluetooth communication with the door lock by using ultra-low power, and the mobile phone a may perform bluetooth communication with the door lock by using normal power or ultra-low power. Optionally, as shown in fig. 8 (c), if the mobile phone a determines that the mobile phone a is currently located in the door and does not need to unlock, the ultra-low power is not used to send an unlocking instruction to the door lock, so that power consumption of the mobile phone a is saved, and safety of the non-inductive unlocking is further improved.
Optionally, in another example, fig. 9 is a schematic view of another application scenario applicable to the embodiment of the present application, which shows a scenario in which a relay attack risk exists. As shown in fig. 9, 2 attackers are included, identified as attacker 1 and attacker 2. The distance between the user A and the door lock is far, the mobile phone A can adopt normal power to carry out Bluetooth communication with the door lock, and adopts ultra-low power to carry out Bluetooth communication with the door lock. The attacker 1 carries relay equipment and is positioned near the user A, and is used for intercepting the information sent to the door lock by the mobile phone A and sending the intercepted information to the mobile phone 2 carried by the attacker 2. The attacker 2 carries the mobile phone 2 to be positioned near the door lock, and the mobile phone 2 communicates with the door lock by using the intercepted information, so that danger is caused. In the scene, because the range 52 of the mobile phone a adopting ultra-low power for bluetooth communication is small, for example, tens of centimeters, and the distance between the attacker 1 and the user a is usually not less than tens of centimeters, the relay device cannot intercept the unlocking instruction sent by the mobile phone a, the risk that the relay device intercepts the unlocking instruction is solved, the safety of the door lock is improved, and the relay attack is successfully defended.
The technical solution of the present application will be described in detail by specific examples. The following embodiments may be combined with each other and details of the same or similar concepts or processes may not be repeated in some embodiments.
The terms "first," "second," "third," "fourth," and the like in the embodiments of the present application, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Fig. 10 is a message interaction diagram of a bluetooth-based unlocking method according to an embodiment of the present application. The execution main body related to the embodiment comprises a mobile phone and a door lock. As shown in fig. 10, the bluetooth-based unlocking method provided in this embodiment may include:
and S1001, the door lock sends BLE broadcast messages.
And S1002, carrying out BLE scanning by the mobile phone.
Specifically, the bluetooth function needs to be unlocked for the mobile phone and the door lock. In this embodiment, the execution sequence of S1001 and S1002 is not limited, the door lock may send BLE broadcast messages for a long time, and the mobile phone may perform BLE background scanning for a long time. If the mobile phone receives BLE broadcast messages sent by the door lock, the BLE broadcast messages comprise the identity information of the door lock, and the door lock can be identified according to the BLE broadcast messages.
The bluetooth broadcast and scan can refer to the bluetooth standard protocol Core v5.2 Vol6 PartD 3/4/5, which is not described in detail in this embodiment.
S1003, the mobile phone generates a target message, and the target message is used for indicating the door lock to unlock.
The target message includes identity information of the mobile phone and identity information of the door lock, and the implementation manner of the identity information is not limited in this embodiment, for example, identification information or an address of the device.
Because a door lock is added before the mobile phone, for example, in the process shown in fig. 2, the mobile phone establishes bluetooth connection with the door lock and performs an initial pairing authentication process, and the mobile phone and the door lock store opposite party information. Through the identity information of the mobile phone and the identity information of the door lock, the target message indicates the door lock to unlock, and correspondingly, the door lock can determine that the target message indicates the door lock to unlock.
Optionally, the target message may include an unlocking instruction, where the unlocking instruction is used to instruct the door lock to unlock.
And S1004, the mobile phone sends the target message to the door lock by adopting ultra-low power.
For the ultra-low power, reference may be made to the above description, which is not described herein again. When the distance between the mobile phone and the door lock is long, the door lock cannot receive the target message. When the distance between the mobile phone and the door lock is short, the target message can be received.
Optionally, the mobile phone may continuously send the target message to the door lock by using the first transmission power until the preset sending duration is reached or the preset sending times is reached. The present embodiment does not limit the value of the preset sending duration or the preset sending times.
The target message is continuously sent for multiple times through the mobile phone, the success rate of receiving the target message by the door lock is improved, and the door lock can be unlocked. By setting the preset sending time length or the preset sending times, the condition that the mobile phone sends the target message all the time is avoided, the energy consumption is saved, and the unlocking safety is improved. For example, in the scenario shown in fig. 8 (a), the user is always outside the door, and the number of times that the mobile phone sends the target message is limited, so that the situation that the door lock receives the target message all the time and is unlocked all the time is avoided, and the safety of the door lock is improved.
Optionally, in an implementation, the target message may be a BLE broadcast message. That is, the cell phone may transmit a BLE broadcast message to the door lock with ultra-low power, where the BLE broadcast message is used to indicate that the door lock is unlocked. Accordingly, the door lock receives the BLE broadcast message through the BLE scanning. In the implementation mode, BLE connection does not need to be established between the mobile phone and the door lock, and message flow is saved.
Optionally, in another implementation, after the mobile phone establishes a BLE connection with the door lock, the mobile phone sends the target message through the BLE connection.
And S1005, unlocking the door lock according to the target message.
For ease of understanding, S1003 to S1005 may be referred to as an unlocking phase.
As can be seen, according to the bluetooth-based unlocking method provided by this embodiment, the mobile phone and the door lock perform BLE broadcasting and scanning according to the existing flow, and perform bluetooth communication. After the mobile phone identifies the door lock, the target message is sent by adopting ultra-low power, and the transmission distance of the target message is limited. When the distance between the mobile phone and the door lock is long, for example, in the scenes shown in (a), (b), and (c) in fig. 7 or in the scene shown in fig. 9, even if the mobile phone sends the target message, the door lock cannot be received, and the door lock cannot be unlocked. When the distance between the mobile phone and the door lock is close, for example, in a scenario shown in (d) in fig. 7 or in a scenario shown in fig. 8, the door lock may receive the target message and may be unlocked according to the target message. The transmission distance of the target message is limited by setting ultra-low power, and the safety of unlocking the door lock is ensured. The door lock executes unlocking according to whether the target message is received or not, so that the user is prevented from participating in unlocking operation, the non-inductive unlocking of the user is realized, and the user experience is improved.
Optionally, the bluetooth-based unlocking method provided in this embodiment may further include:
s1006, the door lock sends a response message to the mobile phone, wherein the response message is used for indicating whether the door lock is successfully unlocked.
Correspondingly, the mobile phone receives a response message sent by the door lock.
If the response message indicates that the door lock is successfully unlocked, the mobile phone can stop sending the target message.
If the response message indicates that the door lock is unlocked unsuccessfully, optionally, the mobile phone can retransmit the target message to the door lock by adopting ultra-low power. Optionally, the number of retransmissions may be set, where the number of retransmissions is the maximum number of times that the mobile phone continuously receives the response message indicating that the door lock is failed to be unlocked, and the number of retransmissions is not limited in this embodiment. Alternatively, the handset may refer to S1004 each time it retransmits the target message. Optionally, the mobile phone may output a prompt message for prompting the user that the door lock is unlocked unsuccessfully, so that the user triggers sending of the target message again, or the user selects another unlocking mode. For example, the manner of clicking the unlock key shown in fig. 4 is adopted. When the mobile phone outputs the prompt message, the prompt message can be output by voice or displayed in a related interface. The present embodiment does not limit the specific content of the prompt information.
Optionally, the bluetooth-based unlocking method provided in this embodiment may further include:
if the mobile phone does not receive the response message sent by the door lock, the target message can be retransmitted to the door lock by adopting ultra-low power. See the relevant description in S1006, and will not be described herein.
On the basis of the embodiment shown in fig. 10, fig. 11 is another message interaction diagram of the bluetooth-based unlocking method provided in the embodiment of the present application. The execution main body related to the embodiment comprises a mobile phone and a door lock.
As shown in fig. 11, optionally, before the mobile phone sends the target message to the door lock with ultra-low power in S1004, the method may further include:
s1007, the mobile phone judges whether the positions of the mobile phone and the door lock meet a preset condition.
If the positions of the mobile phone and the door lock meet the preset condition, S1004 is executed. The unlocking stage includes S1003, S1007, and S1004 to S1005.
Specifically, because the distance for sending the target message by the mobile phone with ultra-low power is limited, the target message is sent only when the positions of the mobile phone and the door lock meet the preset condition, and the power consumption of the mobile phone is saved. For example, in the scenario shown in (a), (b), and (c) in fig. 7 or the scenario shown in fig. 9, the mobile phone is far away from the door lock, and does not satisfy the preset condition, and the mobile phone may not send the target message. In the scenario shown in fig. 7 (d) or the scenario shown in fig. 8, the distance between the mobile phone and the door lock is close enough to send the target message. For another example, in the scenario shown in (c) of fig. 8, the user does not need to unlock the door when the user is located inside the door, and the mobile phone may not send the target message, which not only saves the power consumption of the mobile phone, but also improves the security of the door lock.
The information for determining the positions of the mobile phone and the door lock is different, and the corresponding preset conditions can be different. The information determining the position of the cell phone and the door lock may include, but is not limited to, at least one of the following: the position information of the mobile phone, the position information of the door lock, or the signal intensity of the door lock sending signal received by the mobile phone. The location information includes, but is not limited to, at least one of the following: the positioning method includes the steps of obtaining Global Positioning System (GPS) position information, beidou satellite navigation system position information, or combining information fusion positioning position information such as base station information, wiFi signal characteristics, geomagnetism and the like.
Optionally, before the mobile phone generates the target message in S1003, the method may further include:
and S1008, the door lock sends the capability information of the door lock, and the capability information is used for indicating whether the door lock supports the non-inductive unlocking.
Correspondingly, the mobile phone receives the capability information of the door lock.
And S1009, the mobile phone judges whether the door lock supports the non-inductive unlocking according to the capability information of the door lock.
And if the capability information of the door lock indicates that the door lock supports the non-inductive unlocking, S1003 is executed, and the target message is sent to the door lock by adopting ultra-low power, so that the non-inductive unlocking of the user is realized.
If the capability information of the door lock indicates that the door lock does not support the non-inductive unlocking, the step S1003 and the subsequent steps are not executed. Optionally, the mobile phone may output a prompt message for prompting that the door lock does not support the non-inductive unlocking, so that the user selects another unlocking mode. For example, the manner of clicking the unlock key shown in fig. 4 is adopted. When the mobile phone outputs the prompt message, the prompt message can be output by voice or displayed in a related interface. The present embodiment does not limit the specific content of the prompt information.
Optionally, before the step S1008 of sending the capability information of the door lock, the method may further include:
and S1010, the mobile phone sends a capability query request message to the door lock.
Correspondingly, the door lock receives the capability query request message sent by the mobile phone.
For ease of understanding, S1010, S1008 to S1009 may be referred to as a door lock capability identification phase.
Optionally, in an implementation, the capability information of the door lock may be carried in a BLE broadcast message sent by the door lock. Correspondingly, the mobile phone receives the BLE broadcast message through BLE scanning, so that the capability information of the door lock is obtained. In the implementation mode, BLE connection does not need to be established between the mobile phone and the door lock, and the message flow is saved.
Optionally, in another implementation manner, after the door lock establishes BLE connection with the mobile phone, the door lock sends the capability information of the door lock through BLE connection.
Optionally, the door lock may transmit the capability information of the door lock according to a generic attribute profile (GATT) protocol. The GATT organizes the data to be transmitted by an attribute table. Multiple attributes may be included in the GATT attribute table. An attribute contains a handle, a Universally Unique Identifier (UUID), and a value. Handles are indices of attributes in the GATT table, and the handle for each attribute is unique within a device. The UUID contains information of the data type in the attribute table, which is key information to understand the meaning of each byte of the value in the attribute table. Fig. 12 is a schematic diagram of a data format for transmitting the doorlock capability information by using the GATT protocol according to an embodiment of the present application. As shown in fig. 12, the GATT attribute table includes a device service capability attribute (UUID 1) and other service attributes (UUID 2). The device service capability attribute includes a non-inductive unlock characteristic, and a Type (Type) of the non-inductive unlock characteristic includes: sensorless unlocking, ranging broadcasts, geographic location verification, and other capability values. Each Type (Type) is identified by a different Value (Value). For example, the Value of the non-sensory unlock (Value) is tune, indicating that the door lock supports the non-sensory unlock function. Similarly, the door lock also supports a send range broadcast function and a geo-location verification function.
Optionally, after the BLE scanning is performed by the mobile phone in S1002, the unlocking method based on bluetooth provided by this embodiment may further include:
and S1011, establishing BLE connection between the mobile phone and the door lock.
The BLE connection can be referred to a Bluetooth standard protocol Core v5.2 Vol6 PartD 3/4/5, and the embodiment is not described in detail.
On the basis of the embodiment shown in fig. 10 or fig. 11, in another embodiment of the present application, implementations of S1003 and S1005 in the unlocking stage are provided. In this embodiment, before the mobile phone generates the target message in S1003, the method may further include:
the door lock sends encrypted information. Correspondingly, the mobile phone receives the encrypted information sent by the door lock.
Correspondingly, in S1003, the generating, by the mobile phone, the target message may include: and the mobile phone generates a target message according to the encrypted information.
The unlocking of the door lock according to the target message in S1005 may include: and unlocking the door lock according to the encrypted information and the target message.
The encrypted information is used for performing security verification on the target message. And at the mobile phone side, the target message is generated according to the encrypted information, so that the safety of the target message is improved. And at the door lock side, the received target message is subjected to security verification according to the encrypted information, and unlocking is performed only when the verification is passed, so that the security of door lock unlocking is improved.
Optionally, to further improve security, the door lock may update the encrypted information. Optionally, the door lock may update the encrypted information periodically, and the update period is not limited in this embodiment. Optionally, the mobile phone and the door lock may trigger the door lock to update the encryption information after BLE connection is established each time.
Optionally, in an implementation, the encrypted information is carried in a BLE broadcast message sent by the door lock. That is, the door lock sends a BLE broadcast message that includes the encryption information. Correspondingly, the mobile phone receives the BLE broadcast message through BLE scanning to obtain the encryption information. The present embodiment does not limit other contents in the BLE broadcast message. Optionally, the BLE broadcast message may further include capability information of the door lock.
In the implementation mode, BLE connection does not need to be established between the mobile phone and the door lock, and message flow is saved.
Optionally, in another implementation, after the door lock establishes the BLE connection with the mobile phone, the door lock sends the encrypted information to the mobile phone through the BLE connection.
Optionally, in an implementation manner, fig. 13 is a further message interaction diagram of the bluetooth-based unlocking method provided in the embodiment of the present application. The security of the target message is verified through the random number and a preset encryption and decryption algorithm, so that the security of the target message and the security of door lock unlocking are improved. The door lock can acquire the random number, and the embodiment does not limit the manner of acquiring the random number and the value range of the random number by the door lock. The encryption information includes a random number. As shown in fig. 13, the unlocking phase may include:
s1301, the door lock sends a random number.
Correspondingly, the mobile phone receives the random number sent by the door lock.
S1302, the mobile phone encrypts the random number according to a preset encryption and decryption algorithm to generate an encrypted random number.
S1303, the mobile phone generates a target message, wherein the target message comprises an encrypted random number and an unlocking instruction.
And S1304, the mobile phone sends the target message to the door lock by adopting ultra-low power.
If the door lock receives the target message, S1305 to S1306 are executed.
S1305, the door lock decrypts the encrypted random number according to a preset encryption and decryption algorithm to obtain a decrypted random number.
And S1306, if the decryption random number is the same as the random number, unlocking the door lock according to the unlocking instruction.
The preset encryption and decryption algorithm is not limited in this embodiment. Such as the Advanced Encryption Standard (AES) algorithm.
Optionally, in this implementation, the unlocking instruction in the target message may be encrypted by using a preset encryption/decryption algorithm.
Optionally, in another implementation manner, fig. 14 is another message interaction diagram of the bluetooth-based unlocking method provided in the embodiment of the present application. The security verification is carried out on the target message through the secret key, so that the security of the target message and the security of door lock unlocking are improved. As shown in fig. 14, the unlocking phase may include:
s1401, the door lock acquires an asymmetric key pair.
The asymmetric key pair comprises a public key and a private key, and the encrypted information comprises the public key.
The present embodiment does not limit the manner in which the door lock obtains the asymmetric key pair.
And S1402, the door lock sends the public key in the asymmetric key pair.
Correspondingly, the mobile phone receives the public key sent by the door lock.
And S1403, the mobile phone encrypts the unlocking instruction by using the public key to generate an encrypted unlocking instruction.
And S1404, generating a target message by the mobile phone, wherein the target message comprises an encryption unlocking instruction.
And S1405, the mobile phone sends the target message to the door lock by adopting ultra-low power.
If the door lock receives the target message, S1406 to S1407 are executed.
And S1406, the door lock decrypts the encrypted unlocking instruction according to the private key in the asymmetric key pair to obtain the unlocking instruction.
And S1407, unlocking the door lock according to the unlocking instruction.
On the basis of the above embodiment, in another embodiment of the present application, an implementation manner of S1007 in the unlocking stage is provided. In this embodiment, in S1007, the step of determining, by the mobile phone, whether the positions of the mobile phone and the door lock satisfy the preset condition may include:
the door lock sends a ranging broadcast message. Correspondingly, the mobile phone receives the ranging broadcast message sent by the door lock.
The mobile phone judges whether the signal intensity of the ranging broadcast message meets a preset condition.
Generally, the farther the distance between the mobile phone and the door lock is, the lower the signal strength of the ranging broadcast message received by the mobile phone is. Conversely, the closer the mobile phone is to the door lock, the greater the signal strength of the ranging broadcast message received by the mobile phone. Therefore, the signal intensity of the ranging broadcast message received by the mobile phone can reflect the distance between the mobile phone and the door lock, and the mobile phone determines whether to send the target message according to whether the signal intensity of the ranging broadcast message meets the preset condition, so that the power consumption of the mobile phone is saved.
And then, carrying out scene division according to the number of the antennas on the door lock and the positions of the antennas.
A first scenario: the door lock comprises at least one antenna, and all the antennas are arranged on the outer side of the door after the door lock is installed on the door.
A second scenario: the door lock comprises at least one antenna, and all antennas are arranged on the inner side of the door after the door lock is installed on the door.
A third scenario: the door lock comprises at least one antenna, and after the door lock is installed on the door, part of the antenna is located on the outer side of the door, and part of the antenna is located on the inner side of the door. For convenience of description, an antenna is provided inside and outside the door as an example. The antenna located outside the door is referred to as a first antenna, and the antenna located inside the door is referred to as a second antenna.
Optionally, in an implementation manner, the method is applicable to a first scene, a second scene, and a third scene.
The door lock transmits a ranging broadcast message, which may include:
the door lock transmits a ranging broadcast message through at least one of all antennas.
The mobile phone determining whether the signal strength of the ranging broadcast message satisfies a preset condition may include:
and judging whether the signal intensity of any ranging broadcast message received by the mobile phone is greater than a preset threshold value.
If the mobile phone determines that the signal strength of the ranging broadcast message is greater than the preset threshold value, which indicates that the distance between the mobile phone and the door lock is short, S1004 may be executed, and the mobile phone sends the target message to the door lock with ultra-low power. If the mobile phone determines that the signal strength of the ranging broadcast message is smaller than the preset threshold value, which indicates that the distance between the mobile phone and the door lock is relatively long, S1004 and the subsequent steps are not executed. When the signal strength of the ranging broadcast message is equal to the preset threshold, S1004 may be executed, or S1004 may not be executed.
In this embodiment, the value of the preset threshold is not limited.
Optionally, in order to improve the accuracy of the determination, if the mobile phone receives the ranging broadcast messages sent by the multiple antennas, whether to send the target message may be determined according to whether the signal strength of the multiple ranging broadcast messages is greater than a preset threshold. For example, when the number of the ranging broadcast messages with the signal strength greater than the preset threshold is greater than a certain number, the mobile phone sends the target message to the door lock by using ultra-low power. Or, as long as the ranging broadcast message with the signal strength larger than the preset threshold exists, the mobile phone sends the target message to the door lock by adopting ultra-low power.
Optionally, in another implementation, the method is applied to the third scenario.
The door lock transmits a ranging broadcast message, which may include:
the door lock transmits a first ranging broadcast message through the first antenna using the target power, and transmits a second ranging broadcast message through the second antenna using the target power. Wherein the first ranging broadcast message includes first identification information indicating that the first antenna is located outdoors. The second ranging broadcast message includes second identification information indicating that the second antenna is located inside the door.
The mobile phone determines whether the signal strength of the ranging broadcast message satisfies a preset condition, which may include:
the mobile phone judges whether the signal intensity of the first ranging broadcast message is greater than the signal intensity of the second ranging broadcast message.
The value of the target power is not limited in this embodiment.
If the signal strength of the first ranging broadcast message is greater than the signal strength of the second ranging broadcast message, indicating that the mobile phone is located outside the door, S1004 may be performed, and the mobile phone transmits the target message to the door lock with ultra-low power. If the signal strength of the first ranging broadcast message is less than the signal strength of the second ranging broadcast message, which indicates that the mobile phone is located indoors, S1004 and the subsequent steps are not executed. When the signal strength of the first ranging broadcast message is equal to the signal strength of the second ranging broadcast message, S1004 may be executed, or S1004 may not be executed.
The following description is made with reference to fig. 15. The mobile phone a is located outside the door, the signal strength of the first ranging broadcast message is marked as RSSI11, and the signal strength of the second ranging broadcast message is marked as RSSI21. The door lock transmits the ranging broadcast message through the first antenna and the second antenna with the same power, due to the blocking of the door, RSSI11> RSSI21. Similarly, handset B is located within the door, and the signal strength of the first ranging broadcast message is labeled RSSI12< the signal strength of the second ranging broadcast message is labeled RSSI22.
Optionally, for the third scenario, the above two ways may be combined. When the distance between the mobile phone and the door lock is determined to be close enough and the mobile phone is located outside the door, the mobile phone sends a target message to the door lock by adopting ultra-low power, and therefore non-inductive unlocking is achieved.
On the basis of the foregoing embodiment, in another embodiment of the present application, in the unlocking stage, before the unlocking the door lock according to the target message in S1005, the method may further include:
the door lock judges whether the positions of the mobile phone and the door lock meet preset conditions or not.
And if the door lock determines that the positions of the mobile phone and the door lock meet the preset condition, executing S1005, and unlocking according to the target message. And if the door lock determines that the positions of the mobile phone and the door lock do not meet the preset conditions, not executing the step S1005 and the subsequent steps. By further judging at the door lock side, the safety of unlocking the door lock is improved.
The information for determining the positions of the mobile phone and the door lock is different, and the corresponding preset conditions can be different. To facilitate distinction from S1007, the preset condition in S1007 may be referred to as a first preset condition, and the preset condition in this embodiment may be referred to as a second preset condition.
Optionally, in an implementation manner, the determining, by the door lock, whether the positions of the mobile phone and the door lock meet a preset condition may include:
the mobile phone obtains an asymmetric key pair. Wherein the asymmetric key pair comprises a public key and a private key.
And the mobile phone sends the public key in the asymmetric key pair to the door lock.
The mobile phone acquires the current position information, encrypts the current position information by using a private key in the asymmetric key pair, and generates encrypted position information.
And the mobile phone sends the encrypted position information to the door lock. Accordingly, the door lock receives the encrypted position information.
The door lock decrypts the encrypted position information according to the public key in the asymmetric key pair to obtain decrypted position information.
The door lock compares the decryption position information with the locally stored initial position information of the mobile phone, and determines whether the error between the decryption position information and the initial position information of the mobile phone is within a preset error range. The initial position information of the mobile phone is the position information of the mobile phone when the BLE connection is established between the mobile phone and the door lock for the first time.
Generally, when the mobile phone first configures the door lock, the geographical location of the mobile phone is written into the door lock. For example, in the process of adding the door lock 001 shown in fig. 2, after the bluetooth connection is established between the mobile phone and the door lock 001, the position information of the mobile phone is sent to the door lock, that is, the initial position information of the mobile phone. Subsequently, before the mobile phone approaches the door lock to perform the non-inductive unlocking, the door lock compares the current position of the mobile phone with the initial position of the mobile phone stored locally, and if the error is larger than a preset error range, the unlocking is refused; if the error is smaller than the preset error range, unlocking is allowed, and the safety of the door lock in noninductive unlocking is further improved.
It should be noted that, the value of the preset error range is not limited in this embodiment. For example 50 meters.
It is understood that the terminal device and the smart lock include hardware and/or software modules for performing the functions. The present application is capable of being implemented in hardware or a combination of hardware and computer software in conjunction with the exemplary algorithm steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, in conjunction with the embodiments, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the terminal device and the smart lock may be divided into function modules according to the above method example, for example, each function module may be divided corresponding to each function, or two or more functions may be integrated into one module. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and another division manner may be available in actual implementation. It should be noted that the names of the modules in the embodiments of the present application are illustrative, and the names of the modules are not limited in actual implementation.
Fig. 16 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 16, the terminal device provided in this embodiment may include:
a receiving module 1601, configured to receive a BLE broadcast message sent by an intelligent lock, and identify the intelligent lock;
a processing module 1602, configured to generate a target message, where the target message is used to instruct the smart lock to unlock;
a sending module 1603, configured to send the target message to the smart lock with a first sending power, where the first sending power is less than or equal to a first threshold, and the first threshold includes-50 dBm.
Optionally, the receiving module 1601 is further configured to receive encrypted information sent by the smart lock;
the processing module 1602 is specifically configured to: and generating the target message according to the encryption information.
Optionally, the encryption information includes a random number; the processing module 1602 is specifically configured to:
encrypting the random number according to a preset encryption and decryption algorithm to generate an encrypted random number;
generating the target message; the target message includes the encrypted random number and an unlock instruction.
Optionally, the encryption information includes a public key in an asymmetric key pair; the processing module 1602 is specifically configured to:
encrypting the unlocking instruction by using the public key to generate an encrypted unlocking instruction;
generating the target message; the target message comprises the encrypted unlocking instruction.
Optionally, the encryption information is carried in a BLE broadcast message sent by the smart lock.
Optionally, the processing module 1602 is further configured to:
judging whether the positions of the terminal equipment and the intelligent lock meet a preset condition or not; if the positions of the terminal device and the smart lock satisfy a preset condition, the control sending module 1603 sends the target message to the smart lock by using the first sending power.
Optionally, the receiving module 1601 is further configured to receive a ranging broadcast message sent by the smart lock;
the processing module 1602 is specifically configured to: and judging whether the signal intensity of the ranging broadcast message meets a preset condition or not.
Optionally, the smart lock includes at least one antenna, and the ranging broadcast message is sent by the smart lock through any one of the antennas;
the processing module 1602 is specifically configured to: and judging whether the signal intensity of the ranging broadcast message is greater than a preset threshold value.
Optionally, the smart lock includes a first antenna and a second antenna, when the smart lock is installed on a door, the first antenna is located on an outer side of the door, the second antenna is located on an inner side of the door, the ranging broadcast message includes a first ranging broadcast message and a second ranging broadcast message, the first ranging broadcast message is sent by the smart lock through the first antenna and includes first identification information, the first identification information is used to indicate that the first antenna is located outside the door, the second ranging broadcast message is sent by the smart lock through the second antenna and includes second identification information, and the second identification information is used to indicate that the second antenna is located inside the door;
the processing module 1602 is specifically configured to:
determining whether the signal strength of the first ranging broadcast message is greater than the signal strength of the second ranging broadcast message.
Optionally, the sending module 1603 is specifically configured to:
and continuously sending the target message to the intelligent lock by adopting the first sending power until a preset sending time length is reached or a preset sending frequency is reached.
Optionally, the target message is a BLE broadcast message.
Optionally, the receiving module 1601 is further configured to receive capability information of the smart lock sent by the smart lock;
the processing module 1602 is specifically configured to:
and if the capability information of the intelligent lock indicates that the intelligent lock supports non-inductive unlocking, generating the target message.
Optionally, the receiving module 1601 is further configured to receive a response message sent by the smart lock, where the response message is used to indicate whether the smart lock is successfully unlocked.
Optionally, the processing module 1602 is further configured to establish a BLE connection with the smart lock.
The terminal device provided in this embodiment is configured to execute operations executed by the mobile phone in the foregoing method embodiments, and the technical principle and the technical effect are similar, and are not described herein again.
Fig. 17 is a schematic structural diagram of an intelligent lock according to an embodiment of the present application. As shown in fig. 17, the intelligent lock provided in this embodiment may include:
a transmitting module 1701 for transmitting a BLE broadcast message;
the sending module 1701 is further configured to send encrypted information;
a receiving module 1703, configured to receive a target message sent by a terminal device, where the target message is used to instruct the smart lock to unlock;
a processing module 1702, configured to unlock according to the encryption information and the target message.
Optionally, the encrypted information includes a random number, the target message includes an encrypted random number and an unlocking instruction, and the encrypted random number is generated by encrypting the random number by the terminal device according to a preset encryption and decryption algorithm;
the processing module 1702 is specifically configured to:
decrypting the encrypted random number according to the preset encryption and decryption algorithm to obtain a decrypted random number;
and if the decryption random number is the same as the random number, unlocking according to the unlocking instruction.
Optionally, the encrypted information includes a public key in an asymmetric key pair, the target message includes an encrypted unlocking instruction, and the encrypted unlocking instruction is generated by the terminal device encrypting the unlocking instruction according to the public key;
the processing module 1702 is specifically configured to:
decrypting the encrypted unlocking instruction according to a private key in the asymmetric key pair to obtain the unlocking instruction;
and unlocking according to the unlocking instruction.
Optionally, the encryption information is carried in a BLE broadcast message.
Optionally, the sending module 1701 is further configured to send a ranging broadcast message.
Optionally, the smart lock includes N antennas, N is greater than or equal to 1, and the sending module 1701 is specifically configured to:
transmitting the ranging broadcast message through at least one antenna of the N antennas.
Optionally, the smart lock includes a first antenna and a second antenna, when the smart lock is installed on a door, the first antenna is located at an outer side of the door, and the second antenna is located at an inner side of the door; the sending module 1701 is specifically configured to:
transmitting a first ranging broadcast message through the first antenna using a target power, and transmitting a second ranging broadcast message through the second antenna using the target power; the first ranging broadcast message includes first identification information indicating that the first antenna is located outside the door, and the second ranging broadcast message includes second identification information indicating that the second antenna is located inside the door.
Optionally, the target message is a BLE broadcast message sent by the terminal device.
Optionally, the sending module 1701 is further configured to send capability information of the smart lock; the capability information is used for indicating whether the intelligent lock supports the non-inductive unlocking.
Optionally, the sending module 1701 is specifically configured to:
and sending a response message to the terminal equipment, wherein the response message is used for indicating whether the intelligent lock is successfully unlocked.
Optionally, the processing module 1702 is further configured to:
and establishing BLE connection with the terminal equipment.
The intelligent lock provided by the embodiment is used for executing the operation executed by the door lock in the above method embodiment, and the technical principle and the technical effect are similar and are not described again here.
Referring to fig. 18, a structure of an electronic device according to an embodiment of the present application is shown. The electronic device may be a terminal device or an intelligent lock in the embodiment of the present application. The electronic device includes: a processor 1801, a receiver 1802, a transmitter 1803, memory 1804, and a bus 1805. The processor 1801 includes one or more processing cores, and the processor 1801 executes applications of various functions and information processing by running software programs and modules. Receiver 1802 and transmitter 1803 may be implemented as one communication component, which may be a baseband chip. The memory 1804 is coupled to the processor 1801 by a bus 1805. The memory 1804 can be used for storing at least one program instruction, and the processor 1801 is used for executing the at least one program instruction, so as to implement the technical solutions of the above embodiments. The implementation principle and technical effect are similar to those of the related embodiments of the method, and are not described herein again.
When the electronic device is turned on, the processor can read the software program in the memory, interpret and execute the instructions of the software program, and process the data of the software program. When data needs to be sent through the antenna, the processor performs baseband processing on the data to be sent, and then outputs baseband signals to a control circuit in the control circuit, and the control circuit performs radio frequency processing on the baseband signals and then sends the radio frequency signals to the outside through the antenna in the form of electromagnetic waves. When data is sent to the electronic equipment, the control circuit receives radio-frequency signals through the antenna, converts the radio-frequency signals into baseband signals and outputs the baseband signals to the processor, and the processor converts the baseband signals into the data and processes the data.
Those skilled in the art will appreciate that fig. 18 shows only one memory and processor for ease of illustration. In a practical electronic device, there may be multiple processors and memories. The memory may also be referred to as a storage medium or a storage device, and the like, which is not limited in this application.
As an alternative implementation manner, the processor may include a baseband processor and a central processing unit, the baseband processor is mainly used for processing communication data, and the central processing unit is mainly used for executing a software program and processing data of the software program. Those skilled in the art will appreciate that the baseband processor and the central processing unit may be integrated into a single processor, or may be separate processors, interconnected via bus, etc. Those skilled in the art will appreciate that an electronic device may include multiple baseband processors to accommodate different network formats, multiple central processors to enhance its processing capabilities, and various components of the electronic device may be connected by various buses. The baseband processor may also be expressed as a baseband processing circuit or a baseband processing chip. The central processing unit may also be expressed as a central processing circuit or a central processing chip. The function of processing the communication protocol and the communication data may be built in the processor, or may be stored in the memory in the form of a software program, and the processor executes the software program to realize the baseband processing function. The memory may be integrated within the processor or may be separate from the processor. The memory includes a Cache, which may store frequently accessed data/instructions.
In the embodiments of the present application, the processor may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor.
In the embodiment of the present application, the memory may be a nonvolatile memory, such as a Hard Disk Drive (HDD) or a solid-state drive (SS), and may also be a volatile memory (volatile memory), for example, a random-access memory (RAM). The memory is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, without limitation.
The memory in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data. Embodiments of the present application provide methods in which the methods may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the application are all or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, special purpose computer, computer network, network appliance, user equipment, or other programmable device. The computer instructions may be stored in or transmitted from a computer-readable storage medium to another computer-readable storage medium, e.g., from one website, computer, server, or data center, over a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL), or wireless (e.g., infrared, wireless, microwave, etc.) network, the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more integrated servers, data centers, etc. the available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disk (DWD), or a semiconductor medium (e.g., SSD), etc.
The embodiment of the present application provides a computer program product, which, when running on a terminal, enables the terminal to execute the technical solutions in the above embodiments. The principle and technical effects are similar to those of the related embodiments, and are not described herein again.
The embodiment of the present application provides a computer-readable storage medium, on which program instructions are stored, and when the program instructions are executed by a terminal, the terminal is enabled to execute the technical solutions of the above embodiments. The principle and technical effects are similar to those of the related embodiments, and are not described herein again. In summary, the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and these modifications or substitutions do not depart from the scope of the technical solutions of the embodiments of the present application.

Claims (34)

1. An unlocking method based on Bluetooth is characterized in that the method is applied to a system consisting of a terminal device and an intelligent lock, and comprises the following steps:
the intelligent lock sends a low-power consumption Bluetooth BLE broadcast message;
the terminal equipment receives the BLE broadcast message and identifies the intelligent lock;
the terminal equipment generates a target message, and the target message is used for indicating the unlocking of the intelligent lock;
the terminal equipment sends the target message to the intelligent lock by adopting a first sending power, wherein the first sending power is smaller than or equal to a first threshold value, and the first threshold value comprises-50 dBm;
the intelligent lock receives the target message;
and the intelligent lock is unlocked according to the target message.
2. The method of claim 1, wherein before the terminal device generates the target message, the method further comprises:
the intelligent lock sends encryption information;
the terminal equipment generates a target message, and the method comprises the following steps:
the terminal equipment generates the target message according to the encryption information;
the intelligent lock is unlocked according to the target message, and the intelligent lock unlocking method comprises the following steps:
and the intelligent lock is unlocked according to the encryption information and the target message.
3. The method according to claim 1 or 2, wherein before the terminal device sends the target message to the smart lock with the first transmission power, the method further comprises:
the terminal equipment judges whether the positions of the terminal equipment and the intelligent lock meet a preset condition or not;
the terminal device sends the target message to the smart lock by adopting a first sending power, and the method comprises the following steps:
and if the positions of the terminal equipment and the intelligent lock meet a preset condition, the terminal equipment adopts the first transmitting power to transmit the target message to the intelligent lock.
4. The method according to any one of claims 1-3, wherein before the terminal device generates the target message, the method further comprises:
the intelligent lock sends the capability information of the intelligent lock; the capability information is used for indicating whether the intelligent lock supports non-inductive unlocking or not;
the terminal equipment generates a target message, and the method comprises the following steps:
and if the capability information of the intelligent lock indicates that the intelligent lock supports non-inductive unlocking, the terminal equipment generates the target message.
5. The method of any of claims 1-4, further comprising:
and the intelligent lock sends a response message to the terminal equipment, wherein the response message is used for indicating whether the intelligent lock is successfully unlocked.
6. An unlocking method based on Bluetooth is characterized in that the method is applied to a terminal device and comprises the following steps:
receiving a low-power consumption Bluetooth BLE broadcast message sent by an intelligent lock, and identifying the intelligent lock;
generating a target message, wherein the target message is used for indicating that the intelligent lock is unlocked;
and sending the target message to the intelligent lock by adopting a first transmission power, wherein the first transmission power is less than or equal to a first threshold value, and the first threshold value comprises-50 dBm.
7. The method of claim 6, wherein before generating the target message, further comprising:
receiving encryption information sent by the intelligent lock;
the generating the target message comprises:
and generating the target message according to the encryption information.
8. The method of claim 7, wherein the encryption information comprises a random number; the generating the target message according to the encryption information comprises:
encrypting the random number according to a preset encryption and decryption algorithm to generate an encrypted random number;
generating the target message; the target message includes the encrypted random number and an unlock instruction.
9. The method of claim 7, wherein the encryption information comprises a public key of an asymmetric key pair; the generating the target message according to the encryption information comprises:
encrypting the unlocking instruction by using the public key to generate an encrypted unlocking instruction;
generating the target message; the target message comprises the encrypted unlocking instruction.
10. The method according to any of claims 7-9, wherein the encryption information is carried in a BLE broadcast message sent by the smart lock.
11. The method according to any of claims 6-10, wherein prior to sending the targeted message to the smart lock using the first transmit power, further comprising:
judging whether the positions of the terminal equipment and the intelligent lock meet a preset condition or not;
the sending the target message to the smart lock by using the first transmission power includes:
and if the positions of the terminal equipment and the intelligent lock meet a preset condition, the target message is sent to the intelligent lock by adopting the first transmitting power.
12. The method according to claim 11, wherein the determining whether the positions of the terminal device and the smart lock satisfy a preset condition includes:
receiving a ranging broadcast message sent by the intelligent lock;
and judging whether the signal intensity of the ranging broadcast message meets a preset condition or not.
13. The method of claim 12, wherein the smart lock comprises at least one antenna, and wherein the ranging broadcast message is sent by the smart lock via any one of the antennas;
the determining whether the signal strength of the ranging broadcast message satisfies a preset condition includes:
and judging whether the signal intensity of the ranging broadcast message is greater than a preset threshold value.
14. The method of claim 12 or 13, wherein the smart lock comprises a first antenna and a second antenna, wherein when the smart lock is installed on a door, the first antenna is located on an outer side of the door, the second antenna is located on an inner side of the door, and the ranging broadcast message comprises a first ranging broadcast message and a second ranging broadcast message, wherein the first ranging broadcast message is transmitted by the smart lock through the first antenna and comprises first identification information indicating that the first antenna is located outside the door, and wherein the second ranging broadcast message is transmitted by the smart lock through the second antenna and comprises second identification information indicating that the second antenna is located inside the door;
the determining whether the signal strength of the ranging broadcast message satisfies a preset condition includes:
determining whether the signal strength of the first ranging broadcast message is greater than the signal strength of the second ranging broadcast message.
15. The method according to any one of claims 6-14, wherein said sending the targeted message to the smart lock with the first transmit power comprises:
and continuously sending the target message to the intelligent lock by adopting the first sending power until a preset sending time length is reached or a preset sending frequency is reached.
16. The method according to any one of claims 6-15, wherein the target message is a BLE broadcast message.
17. The method according to any of claims 6-16, wherein before generating the target message, further comprising:
receiving the capability information of the intelligent lock sent by the intelligent lock;
the generating the target message comprises:
and if the capability information of the intelligent lock indicates that the intelligent lock supports non-inductive unlocking, generating the target message.
18. The method according to any one of claims 6-17, further comprising:
and receiving a response message sent by the intelligent lock, wherein the response message is used for indicating whether the intelligent lock is successfully unlocked.
19. The method according to any one of claims 6-18, wherein after identifying the smart lock, further comprising:
and establishing BLE connection with the intelligent lock.
20. An unlocking method based on Bluetooth is characterized in that the unlocking method is applied to an intelligent lock, and the method comprises the following steps:
transmitting a Bluetooth Low Energy (BLE) broadcast message;
sending the encrypted information;
receiving a target message sent by a terminal device, wherein the target message is used for indicating the unlocking of the intelligent lock;
and unlocking according to the encryption information and the target message.
21. The method according to claim 20, wherein the encryption information comprises a random number, the target message comprises an encrypted random number and an unlocking instruction, and the encrypted random number is generated by the terminal device encrypting the random number according to a preset encryption and decryption algorithm;
the unlocking according to the encryption information and the target message comprises:
decrypting the encrypted random number according to the preset encryption and decryption algorithm to obtain a decrypted random number;
and if the decryption random number is the same as the random number, unlocking according to the unlocking instruction.
22. The method according to claim 20, wherein the encrypted information includes a public key of an asymmetric key pair, the target message includes an encrypted unlock instruction, and the encrypted unlock instruction is generated by the terminal device encrypting the unlock instruction according to the public key;
the unlocking according to the encryption information and the target message comprises the following steps:
decrypting the encrypted unlocking instruction according to a private key in the asymmetric key pair to obtain the unlocking instruction;
and unlocking according to the unlocking instruction.
23. The method according to any of claims 20-22, wherein the encryption information is carried in a BLE broadcast message.
24. The method according to any one of claims 20-23, wherein the receiving terminal device sends the target message before, further comprising:
and sending the ranging broadcast message.
25. The method of claim 24, wherein the smart lock includes N antennas, N being greater than or equal to 1, and wherein sending the ranging broadcast message comprises:
transmitting the ranging broadcast message through at least one antenna of the N antennas.
26. The method of claim 24, wherein the smart lock includes a first antenna and a second antenna, the first antenna being located on an exterior side of the door and the second antenna being located on an interior side of the door when the smart lock is installed on the door; the transmitting of the ranging broadcast message includes:
transmitting a first ranging broadcast message through the first antenna using a target power, and transmitting a second ranging broadcast message through the second antenna using the target power; the first ranging broadcast message includes first identification information indicating that the first antenna is located outside the door, and the second ranging broadcast message includes second identification information indicating that the second antenna is located inside the door.
27. The method according to any one of claims 20-26, wherein the target message is a BLE broadcast message sent by the terminal device.
28. The method according to any one of claims 20-27, wherein the receiving terminal device sends the target message before, further comprising:
sending the capability information of the intelligent lock; the capability information is used for indicating whether the intelligent lock supports the non-inductive unlocking.
29. The method of any one of claims 20-28, further comprising:
and sending a response message to the terminal equipment, wherein the response message is used for indicating whether the intelligent lock is successfully unlocked.
30. The method according to any of claims 20-29, wherein the receiving terminal device sends the target message before, further comprising:
and establishing BLE connection with the terminal equipment.
31. A terminal device, characterized in that the terminal device comprises a processor for coupling with a memory and for reading instructions in the memory and causing the terminal device to perform the method according to any of claims 6-19 according to the instructions.
32. An intelligent lock, characterized in that the intelligent lock comprises a processor, which is configured to be coupled to a memory and to read instructions in the memory and to cause the intelligent lock to perform the method according to any of the claims 20-30, according to the instructions.
33. A computer-readable storage medium having stored thereon computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any of claims 6-19 or perform the method of any of claims 20-30.
34. A computer program product comprising instructions for causing a terminal to perform the method of any one of claims 6 to 19 or to perform the method of any one of claims 20 to 30 when the computer program product is run on the terminal.
CN202110314750.6A 2021-03-24 2021-03-24 Bluetooth-based unlocking method, terminal device, intelligent lock and storage medium Pending CN115206003A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110314750.6A CN115206003A (en) 2021-03-24 2021-03-24 Bluetooth-based unlocking method, terminal device, intelligent lock and storage medium
PCT/CN2022/082054 WO2022199533A1 (en) 2021-03-24 2022-03-21 Bluetooth-based unlocking method, terminal device, smart lock and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110314750.6A CN115206003A (en) 2021-03-24 2021-03-24 Bluetooth-based unlocking method, terminal device, intelligent lock and storage medium

Publications (1)

Publication Number Publication Date
CN115206003A true CN115206003A (en) 2022-10-18

Family

ID=83395165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110314750.6A Pending CN115206003A (en) 2021-03-24 2021-03-24 Bluetooth-based unlocking method, terminal device, intelligent lock and storage medium

Country Status (2)

Country Link
CN (1) CN115206003A (en)
WO (1) WO2022199533A1 (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105406923A (en) * 2015-12-28 2016-03-16 惠州Tcl移动通信有限公司 Bluetooth interconnection method and system for mobile terminal
CN105631987A (en) * 2015-02-12 2016-06-01 北京神器科技有限公司 Bluetooth access control unlocking method, device and system
CN106127890A (en) * 2016-06-17 2016-11-16 北京千丁互联科技有限公司 Control of bluetooth access equipment, Bluetooth terminal, control of bluetooth access management system and method
CN107103673A (en) * 2017-05-24 2017-08-29 广州跨行网络科技有限公司 Automatic sensing gate control system and its implementation based on Bluetooth of mobile phone
CN107578511A (en) * 2017-09-15 2018-01-12 林海航 A kind of smart lock and its Intelligent key
CN108269334A (en) * 2018-01-10 2018-07-10 北京小米移动软件有限公司 Method for unlocking, terminal device and smart lock
CN109448172A (en) * 2018-09-28 2019-03-08 深圳市呤云科技有限公司 Intelligent unlocking method and intelligent lock
CN110139262A (en) * 2019-06-10 2019-08-16 Oppo广东移动通信有限公司 Bluetooth communication control method and Related product
CN111798691A (en) * 2020-05-29 2020-10-20 领翌技术(横琴)有限公司 Control method and system of parking place ground lock

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104103111B (en) * 2014-07-19 2016-08-17 张明 Automatically-controlled door access control system based on Bluetooth of mobile phone communication and its implementation
CN108133523B (en) * 2016-12-01 2020-08-14 阿里巴巴集团控股有限公司 Access control method and device
WO2018119623A1 (en) * 2016-12-27 2018-07-05 深圳易马达科技有限公司 Method of unlocking electronic lock device, and client and electronic lock device thereof
CN106780901A (en) * 2016-12-27 2017-05-31 李天瑜 A kind of intelligent door lock system and its application based on mobile phone MAC Address
EP3444173A1 (en) * 2017-08-17 2019-02-20 MOBIT BELGIUM, besloten vennootschap met beperkte aansprakelijkheid Public bike sharing system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631987A (en) * 2015-02-12 2016-06-01 北京神器科技有限公司 Bluetooth access control unlocking method, device and system
CN105406923A (en) * 2015-12-28 2016-03-16 惠州Tcl移动通信有限公司 Bluetooth interconnection method and system for mobile terminal
CN106127890A (en) * 2016-06-17 2016-11-16 北京千丁互联科技有限公司 Control of bluetooth access equipment, Bluetooth terminal, control of bluetooth access management system and method
CN107103673A (en) * 2017-05-24 2017-08-29 广州跨行网络科技有限公司 Automatic sensing gate control system and its implementation based on Bluetooth of mobile phone
CN107578511A (en) * 2017-09-15 2018-01-12 林海航 A kind of smart lock and its Intelligent key
CN108269334A (en) * 2018-01-10 2018-07-10 北京小米移动软件有限公司 Method for unlocking, terminal device and smart lock
CN109448172A (en) * 2018-09-28 2019-03-08 深圳市呤云科技有限公司 Intelligent unlocking method and intelligent lock
CN110139262A (en) * 2019-06-10 2019-08-16 Oppo广东移动通信有限公司 Bluetooth communication control method and Related product
CN111798691A (en) * 2020-05-29 2020-10-20 领翌技术(横琴)有限公司 Control method and system of parking place ground lock

Also Published As

Publication number Publication date
WO2022199533A1 (en) 2022-09-29

Similar Documents

Publication Publication Date Title
CN109076331B (en) Electronic device and control method of electronic device
RU2646390C1 (en) Method and device of binding device
CN111066306B (en) Method for sharing data in local area network and electronic equipment
WO2019165941A1 (en) Profile generation method, profile acquisition method, and related device and storage medium
US10038687B2 (en) Devices and control method thereof and application login system
US10015665B2 (en) Methods for provisioning universal integrated circuit cards
CN108353278B (en) Method and device for managing embedded universal integrated circuit card eUICC
US10951592B2 (en) Secure wireless communication between controllers and accessories
CN110602692B (en) Data updating method and device and electronic equipment
CN108307674A (en) A kind of method and apparatus ensureing terminal security
KR101779544B1 (en) Method, device, program and recording medium for establishing connection
WO2019206201A1 (en) Method for transmitting configuration file, related device and storage medium
BR112012031747B1 (en) APPARATUS AND METHODS FOR PROVISIONING SUBSCRIBER IDENTITY DATA ON A WIRELESS NETWORK
CN108702607B (en) Multi-device wireless connection method and device
CN105282731A (en) Method of processing provisioning profile and electronic device for supporting the same
CN104637131A (en) Authorization method and authorization device for access control system and access control system
EP3817322A1 (en) Method for upgrading service application range of electronic identity card, and terminal device
CN110169028A (en) Update method, terminal and the server of network insertion weight discriminating information
CN108476460B (en) Method for establishing hotspot connection and terminal equipment
KR20210113117A (en) Apparatus and method for selective communication service in communication system
CN105636017A (en) Data service enablement device and method
KR20150026654A (en) Method and apparatus for connecting to network in electronic device
US20240031223A1 (en) Configuring accessory network connections
CN105325021B (en) Method and apparatus for remote portable wireless device authentication
KR20080070391A (en) Method and system of remoting control for portable device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination