WO2022199533A1 - Bluetooth-based unlocking method, terminal device, smart lock and storage medium - Google Patents

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

Info

Publication number
WO2022199533A1
WO2022199533A1 PCT/CN2022/082054 CN2022082054W WO2022199533A1 WO 2022199533 A1 WO2022199533 A1 WO 2022199533A1 CN 2022082054 W CN2022082054 W CN 2022082054W WO 2022199533 A1 WO2022199533 A1 WO 2022199533A1
Authority
WO
WIPO (PCT)
Prior art keywords
smart lock
target message
terminal device
message
unlocking
Prior art date
Application number
PCT/CN2022/082054
Other languages
French (fr)
Chinese (zh)
Inventor
王良
孙方林
林健新
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022199533A1 publication Critical patent/WO2022199533A1/en

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

Definitions

  • the embodiments of the present application relate to the field of communication technologies, and in particular, to a Bluetooth-based unlocking method, a terminal device, a smart lock, and a storage medium.
  • Bluetooth blue, BT
  • smart locks unlocked based on Bluetooth such as smart door locks.
  • the process for the user to open the smart door lock is usually as follows: the user clicks to run the door lock application installed on the mobile phone, and after the mobile phone and the smart door lock establish a Bluetooth connection, the door lock application displays the unlock interface. The user clicks the unlock button in the unlock interface to unlock the smart door lock.
  • the above process has many operation steps, and the unlocking efficiency is low.
  • the embodiments of the present application provide a Bluetooth-based unlocking method, a terminal device, a smart lock, and a storage medium, which realizes the user's senseless unlocking and improves the user's unlocking experience.
  • a Bluetooth-based unlocking method is provided, which is applied to a system composed of a terminal device and a smart lock.
  • the method includes: the smart lock sends a BLE broadcast message, the terminal device receives the BLE broadcast message, and identifies the smart lock; For the target message indicating that the smart lock is unlocked, the target message is sent to the smart lock using the first transmit power, the first transmit power is less than or equal to the first threshold, and the first threshold includes -50dBm; the smart lock receives the target message and unlocks according to the target message.
  • the value of the first transmit power is very small, and the signal transmission distance is limited, usually tens of centimeters.
  • the ultra-low power is less than or equal to the first threshold, and the first threshold includes -50dBm.
  • the first threshold may be below -50dBm to -60dBm.
  • the terminal device uses ultra-low power to send the target message to the smart lock, which shortens the transmission distance for the terminal device to send the target message, and provides support for sensorless unlocking based on Bluetooth.
  • the target message sent by the terminal device is received and unlocked, which improves the security of the user's senseless unlocking.
  • the user does not need to perform an unlocking operation on the interface of the terminal device, which realizes the user's senseless unlocking, improves the unlocking efficiency, and improves the user experience.
  • the terminal device before the terminal device generates the target message, it further includes: the smart lock sends encrypted information.
  • generating the target message by the terminal device includes: generating the target message according to the encrypted information by the terminal device.
  • the smart lock is unlocked according to the target message, including: the smart lock is unlocked according to the encrypted information and the target message.
  • the encrypted information is used for security verification of the target message.
  • the target message is generated according to the encrypted information, which improves the security of the target message.
  • the security verification is performed on the received target message according to the encrypted information, and the unlocking is performed only when the verification is passed, which improves the security of the door lock unlocking.
  • the method further includes: the terminal device determines whether the positions of the terminal device and the smart lock satisfy a preset condition.
  • the terminal device uses the first transmission power to send the target message to the smart lock, including: if the positions of the terminal device and the smart lock meet the preset conditions, the terminal device uses the first transmission power to send the target message to the smart lock.
  • the terminal device sends the target message, which saves the power consumption of the mobile phone.
  • the terminal device before the terminal device generates the target message, it further includes: the smart lock sends capability information of the smart lock; the capability information is used to indicate whether the smart lock supports sensorless unlocking.
  • the terminal device generates the target message, including: if the capability information of the smart lock indicates that the smart lock supports sensorless unlocking, the terminal device generates the target message.
  • the terminal device when the capability information of the smart lock indicates that the smart lock supports sensorless unlocking, the terminal device generates the target message, which saves the power consumption of the mobile phone.
  • the method further includes: the smart lock sends a response message to the terminal device, where the response message is used to indicate whether the smart lock is successfully unlocked.
  • a Bluetooth-based unlocking method is provided, which is applied to a terminal device.
  • the method includes: receiving a BLE broadcast message sent by a smart lock to identify the smart lock; generating a target message, where the target message is used to instruct the smart lock to unlock; A transmit power sends a target message to the smart lock, the first transmit power is less than or equal to a first threshold, and the first threshold includes -50dBm.
  • the method before generating the target message, further includes: receiving encrypted information sent by the smart lock.
  • generating the target message includes: generating the target message according to the encrypted information.
  • the encrypted information includes a random number; generating the target message according to the encrypted information includes: encrypting the random number according to a preset encryption and decryption algorithm to generate an encrypted random number; generating a target message, where the target message includes the encrypted random number and the encrypted random number. Unlock command.
  • the security of the target message is verified through random numbers and a preset encryption and decryption algorithm, thereby improving the security of the target message and the security of unlocking the door lock.
  • the encrypted information includes the public key in the asymmetric key pair; generating the target message according to the encrypted information includes: using the public key to encrypt the unlocking instruction, and generating the encrypted unlocking instruction; generating the target message, and the target message includes the encrypted unlocking instruction.
  • Unlock command includes: using the public key to encrypt the unlocking instruction, and generating the encrypted unlocking instruction; generating the target message, and the target message includes the encrypted unlocking instruction.
  • the security of the target message is verified by the asymmetric key, which improves the security of the target message and the security of unlocking the door lock.
  • the encrypted information is carried in the BLE broadcast message sent by the smart lock.
  • the mobile phone sends encrypted information by sending a BLE broadcast message, and there is no need to establish a BLE connection between the mobile phone and the door lock, which saves the message flow.
  • the method before using the first transmission power to send the target message to the smart lock, the method further includes: judging whether the positions of the terminal device and the smart lock satisfy a preset condition.
  • using the first transmission power to send the target message to the smart lock includes: if the positions of the terminal device and the smart lock meet the preset conditions, then using the first transmission power to send the target message to the smart lock.
  • judging whether the location of the terminal device and the smart lock satisfies a preset condition includes: receiving a ranging broadcast message sent by the smart lock; and judging whether the signal strength of the ranging broadcast message satisfies the preset condition.
  • the signal strength of the ranging broadcast message is inversely proportional to the distance between the mobile phone and the door lock. The closer the distance between the mobile phone and the door lock, the stronger the signal strength of the ranging broadcast message received by the mobile phone.
  • the mobile phone determines whether to send the target message according to whether the signal strength of the ranging broadcast message satisfies the preset condition, which saves the power consumption of the mobile phone.
  • the smart lock includes at least one antenna, and the ranging broadcast message is sent by the smart lock through any antenna; judging whether the signal strength of the ranging broadcast message satisfies a preset condition includes: judging the ranging broadcast message. Whether the signal strength is greater than the preset threshold.
  • the mobile phone determines that the signal strength of the ranging broadcast message is greater than the preset threshold, it means that 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, saving power consumption of the mobile phone.
  • the smart lock includes a first antenna and a second antenna.
  • the first antenna is located outside the door
  • the second antenna is located inside the door
  • the ranging broadcast message includes the first antenna.
  • the ranging broadcast message and the 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, and the second
  • the 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 in the door; judging whether the signal strength of the ranging broadcast message satisfies the preset conditions, including: Determine whether the signal strength of the first ranging broadcast message is greater than the signal strength of the second ranging broadcast message.
  • the mobile phone sends the target message to the door lock, which saves the power consumption of the mobile phone.
  • using the first transmission power to send the target message to the smart lock includes: using the first transmission power to continuously send the target message to the smart lock until the preset sending time or the preset number of times of sending is reached.
  • the target message is continuously sent multiple times through the mobile phone, which improves the success rate of the door lock receiving the target message, and ensures that the door lock can be unlocked.
  • the mobile phone is prevented from sending the target message all the time, energy consumption is saved, and unlocking security is improved.
  • the target message is a BLE broadcast message.
  • the mobile phone sends the target message by sending a BLE broadcast message, and there is no need to establish a BLE connection between the mobile phone and the door lock, which saves the message flow.
  • the method before generating the target message, further includes: receiving capability information of the smart lock sent by the smart lock.
  • generating the target message includes: if the capability information of the smart lock indicates that the smart lock supports sensorless unlocking, generating the target message.
  • the method further includes: receiving a response message sent by the smart lock, where the response message is used to indicate whether the smart lock is successfully unlocked.
  • the method further includes: establishing a BLE connection with the smart lock.
  • a Bluetooth-based unlocking method is provided, which is applied to a smart lock.
  • the method includes: sending a BLE broadcast message; sending encrypted information; receiving a target message sent by a terminal device, where the target message is used to instruct the smart lock to unlock; Information and target messages unlocked.
  • the encrypted information includes a random number
  • the target message includes an encrypted random number and an unlock instruction
  • the encrypted random number is generated by the terminal device encrypting the random number according to a preset encryption and decryption algorithm
  • unlocking is performed according to the encrypted information and the target message. , including: decrypting the encrypted random number according to a preset encryption and decryption algorithm to obtain a decrypted random number; if the decrypted random number is the same as the random number, unlocking according to the unlocking instruction.
  • the encrypted information includes the public key in the asymmetric key pair
  • the target message includes an encrypted unlock instruction
  • the encrypted unlock instruction is generated by the terminal device by encrypting the unlock instruction according to the public key
  • Unlocking includes: decrypting the encrypted unlocking instruction according to the private key in the asymmetric key pair to obtain the unlocking instruction; and unlocking according to the unlocking instruction.
  • the encrypted information is carried in the BLE broadcast message.
  • the method before receiving the target message sent by the terminal device, the method further includes: sending a ranging broadcast message.
  • the smart lock includes N antennas, where N is greater than or equal to 1, and sending the ranging broadcast message includes: sending the ranging broadcast message through at least one of the N antennas.
  • the smart lock includes a first antenna and a second antenna.
  • the first antenna is located on the outside of the door, and the second antenna is located on the inside of the door;
  • the ranging broadcast message is sent, including: : using the target power to send the first ranging broadcast message through the first antenna, and using the target power to send the second ranging broadcast message through the second antenna;
  • the first ranging broadcast message includes a first ranging broadcast message indicating that the first antenna is located outside the door identification information
  • the second ranging broadcast message includes second identification information indicating that the second antenna is located in the door.
  • the target message is a BLE broadcast message sent by the terminal device.
  • the method before receiving the target message sent by the terminal device, the method further includes: sending capability information of the smart lock; the capability information is used to indicate whether the smart lock supports sensorless unlocking.
  • the method further includes: sending a response message to the terminal device, where the response message is used to indicate whether the smart lock is successfully unlocked.
  • the method before receiving the target message sent by the terminal device, the method further includes: establishing a BLE connection with the terminal device.
  • a terminal device comprising: a receiving module for receiving a BLE broadcast message sent by a smart lock to identify the smart lock; a processing module for generating a target message, the target message being used to instruct the smart lock to unlock; sending The module is configured to send the target message to the smart lock by using a first transmit power, where the first transmit power is less than or equal to a first threshold, and the first threshold includes -50dBm.
  • the receiving module is further configured to receive encrypted information sent by the smart lock; the processing module is specifically configured to: generate a target message according to the encrypted information.
  • the encrypted information includes a random number; the processing module is specifically configured to: encrypt the random number according to a preset encryption and decryption algorithm to generate an encrypted random number; generate a target message; the target message includes an encrypted random number and an unlock instruction.
  • the encrypted information includes the public key in the asymmetric key pair; the processing module is specifically configured to: encrypt the unlocking instruction using the public key to generate the encrypted unlocking instruction; generate a target message; the target message includes the encrypted unlocking instruction.
  • the encrypted information is carried in the BLE broadcast message sent by the smart lock.
  • the processing module is further used for: judging whether the position of the terminal device and the smart lock satisfies the preset condition; if the position of the terminal device and the smart lock satisfies the preset condition, then controlling the sending module to use the first transmit power. Send a targeted message to the smart lock.
  • the receiving module is further configured to receive a ranging broadcast message sent by the smart lock; the processing module is specifically configured to: determine whether the signal strength of the ranging broadcast message satisfies a preset condition.
  • the smart lock includes at least one antenna, and the ranging broadcast message is sent by the smart lock through any antenna; the processing module is specifically configured to: determine whether the signal strength of the ranging broadcast message is greater than a preset threshold.
  • the smart lock includes a first antenna and a second antenna.
  • the first antenna is located outside the door
  • the second antenna is located inside the door
  • the ranging broadcast message includes the first antenna.
  • the ranging broadcast message and the 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, and the second
  • the ranging broadcast message is sent by the smart lock through the second antenna and includes second identification information, which is used to indicate that the second antenna is located in the door; the processing module is specifically used to: determine the signal strength of the first ranging broadcast message Whether it is greater than the signal strength of the second ranging broadcast message.
  • the sending module is specifically configured to: use the first transmit power to continuously send the target message to the smart lock until the preset sending duration or the preset number of times of sending is reached.
  • the target message is a BLE broadcast message.
  • 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: generate a target message if the capability information of the smart lock indicates that the smart lock supports sensorless unlocking.
  • 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.
  • the processing module is also used to establish a BLE connection with the smart lock.
  • a smart lock comprising: a sending module for sending a BLE broadcast message; the sending module is also used for sending encrypted information; a receiving module for receiving a target message sent by a terminal device, and the target message is used to indicate Smart lock unlocking; processing module for unlocking according to encrypted information and target message.
  • the encrypted information includes a random number
  • the target message includes an encrypted random number and an unlock instruction
  • the encrypted random number is generated by the terminal device encrypting the random number according to a preset encryption and decryption algorithm
  • the processing module is specifically used for: according to the preset encryption and decryption algorithm.
  • the preset encryption and decryption algorithm decrypts the encrypted random number to obtain the decrypted random number; if the decrypted random number is the same as the random number, it is unlocked according to the unlocking instruction.
  • the encrypted information includes the public key in the asymmetric key pair
  • the target message includes an encrypted unlocking instruction
  • the encrypted unlocking instruction is generated by the terminal device by encrypting the unlocking instruction according to the public key
  • the processing module is specifically used for: Decrypt the encrypted unlock instruction according to the private key in the asymmetric key pair to obtain the unlock instruction; unlock according to the unlock instruction.
  • the encrypted information is carried in the BLE broadcast message.
  • the sending module is further configured to send a ranging broadcast message.
  • the smart lock includes N antennas, where N is greater than or equal to 1, and the sending module is specifically configured to: send a ranging broadcast message through at least one of the N antennas.
  • the smart lock includes a first antenna and a second antenna.
  • the sending module is specifically used for: using The target power sends the first ranging broadcast message through the first antenna, and uses the target power to send the second ranging broadcast message through the second antenna;
  • the first ranging broadcast message includes first identification information indicating that the first antenna is located outside the door
  • the second ranging broadcast message includes second identification information indicating that the second antenna is located in the door.
  • the target message is a BLE broadcast message sent by the terminal device.
  • 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 sensorless unlocking.
  • the sending module is specifically configured to: send a response message to the terminal device, where the response message is used to indicate whether the smart lock is unlocked successfully.
  • the processing module is further configured to: establish a BLE connection with the terminal device.
  • a terminal device in a sixth aspect, includes a processor, and the processor is configured to be coupled with a memory, and read instructions in the memory and cause the terminal device to execute the method provided in the second aspect according to the instructions.
  • a smart lock includes a processor, and the processor is coupled to the memory, reads instructions in the memory, and causes the smart lock to execute the method provided in the third aspect according to the instructions.
  • a program is provided, which when executed by a processor is used to execute the method provided by the second aspect or the third aspect.
  • a computer-readable storage medium where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer or a processor, the methods provided in the second or third aspects are implemented.
  • a program product in a tenth aspect, includes a computer program, the computer program is stored in a readable storage medium, and at least one processor of a device can read the computer program from the readable storage medium , the at least one processor executes the computer program so that the device implements the method provided in the second aspect or the third aspect.
  • FIG. 1 is a system architecture diagram to which an embodiment of the application is applicable
  • Fig. 2 is a kind of interface change schematic diagram of adding smart device in APP
  • Fig. 3 is a kind of interface change schematic diagram of adding door lock information in APP
  • FIG. 4 is a schematic diagram of an implementation method based on Bluetooth unlocking
  • FIG. 5 is a schematic diagram of the principle of a Bluetooth-based unlocking method provided by an embodiment of the present application.
  • FIG. 6 is an interface diagram for setting the non-sensing unlocking function of a mobile phone and a door lock provided by an embodiment of the present application
  • FIG. 7 is a schematic diagram of an application scenario to which an embodiment of the present application is applicable.
  • 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 to which the embodiment of the present application is applicable.
  • FIG. 10 is a message interaction diagram of a Bluetooth-based unlocking method provided by an embodiment of the present application.
  • FIG. 11 is another message interaction diagram of the Bluetooth-based unlocking method provided by the embodiment of the application.
  • FIG. 12 is a schematic diagram of a data format for transmitting door lock capability information using the GATT protocol provided by an embodiment of the present application
  • 13 is another message interaction diagram of the Bluetooth-based unlocking method provided by the embodiment of the application.
  • FIG. 15 is a schematic position diagram of a door lock antenna provided by an embodiment of the application.
  • FIG. 16 is a schematic structural diagram of a terminal device provided by an embodiment of the application.
  • 17 is a schematic structural diagram of a smart lock provided by an embodiment of the application.
  • FIG. 18 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 1 is a system architecture diagram to which this embodiment of the present application is applicable.
  • 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.
  • An application (application, APP) for managing the smart lock 200 is installed on the terminal device 100, and the name and developer of the application are not limited in this embodiment of the present application.
  • This embodiment of the present application does not limit the type of the terminal device 100 .
  • examples of some terminal devices are: mobile phones, tablet computers, notebook computers, handheld 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 .
  • some examples of smart locks are: smart door locks, smart car locks, smart padlocks, and the like.
  • the smart lock 200 may include, but is not limited to, at least one of the following: a password pad 201 or a fingerprint touch screen 202 .
  • the password pad 201 may be a physical key password pad, or an electronic password pad.
  • the embodiments of the present application are described by taking the smart lock as the door lock and the terminal device as the mobile phone as an example.
  • the Bluetooth communication in this embodiment of the present application is Bluetooth low energy (bluetooth low energy, BLE) communication.
  • BLE Bluetooth low energy
  • FIG. 2 is a schematic diagram of an interface change of adding a smart device to an APP.
  • the APP can manage multiple types of smart devices, such as smart locks, gateways, and smart home appliances.
  • different smart locks correspond to different APPs, for example, smart locks of different manufacturers are matched with corresponding APPs.
  • the desktop 11 of the mobile phone includes a plurality of APP icons. The user clicks the icon 12 to open the smart life application.
  • the mobile phone responds to the user's operation of clicking the icon 12, runs the smart life application, and displays the main interface 13 of the smart life application, as shown in (b) of FIG.
  • the lower menu area 14 includes a total of four menus: Home, Mall, Scene and My.
  • the system defaults the currently displayed “home” interface as the main interface 13 .
  • the smart life application has not added any smart devices, and the number of devices is 0.
  • the user can click the control 15 in the upper right corner of the main interface 13 to add a smart device.
  • the mobile phone displays the window 16 in the main interface 13 in response to the user's operation of clicking the control 15, as shown in (c) of FIG. 2 .
  • the window 16 includes: adding a device, creating a scene, sharing a device, and connecting a three-party platform, a total of 4 menus.
  • the mobile 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 (d) of FIG. 2 .
  • the user proceeds to the next step by viewing the prompts in the prompt window 18 .
  • the prompt is ""Smart Life” needs to turn on Bluetooth to discover and add Bluetooth devices. Is it turned on?".
  • the mobile phone displays the main interface 20 for adding a device in response to the user's operation of clicking the "ON" button 19, as shown in (e) of FIG. 2 .
  • the main interface 20 of adding a device includes a prompt window 21 , and the user performs the next operation by viewing the prompt in the prompt window 21 .
  • the prompt is "the automatic scanning function can be used only after the mobile phone location service is enabled”
  • the mobile phone responds to the user's operation of clicking the "deactivate” button 22, starts the mobile phone location service, and scans whether there are smart devices around the mobile phone based on Bluetooth.
  • the interface changes can be seen in (f) of Figure 2.
  • the main interface 20 of adding a device includes prompt information, for example, "Scanning, please ensure that the smart device is connected to the power supply and is located near the mobile phone" .
  • the scanning area 24 in the pattern 23 in the main interface 20 can be rotated around the center of the circle to present an animation effect, dynamically prompting the user that the mobile phone is currently scanning to find a smart device.
  • other ways of adding smart devices are also provided in the main interface 20. For example, the user can click the “manually add” button 25 below to manually add the smart device; or, the user can click the “scan code to add” button below. Press button 26 to add a smart device by scanning the identification code of the smart device. When the mobile phone scan is completed, the connectable smart devices will be displayed.
  • the main interface 20 includes the door lock 001 found by the mobile phone scan.
  • the user can click the "connect" button 27 to establish Bluetooth connection between mobile phone and door lock 001.
  • the mobile phone in response to the user's operation of clicking the "connect” button 27, the mobile phone establishes a Bluetooth connection with the door lock 001 to complete the addition of the smart device.
  • the user can click the return control 28 in the main interface 20 of adding a device to display the main interface of the smart life application.
  • the mobile phone displays the main interface 13 of the smart life application in response to the user's operation of clicking the return control 28 , as shown in (i) in FIG. 2 .
  • the main interface 13 displays that the number of smart devices added by the smart life application is one, specifically the door lock 001 .
  • FIG. 3 is a schematic diagram of an interface change for adding door lock information in an APP.
  • the mobile phone currently displays the main interface 31 of my device. This example does not limit the process of the user operating in the APP to jump to display the main interface 31 .
  • there are 3 smart devices added in the APP including door lock 001, door lock 002 and gateway 1 at home, and these 3 devices are displayed in the main interface 31.
  • the user can click the door lock 001 to view the relevant information of the door lock 001.
  • the mobile phone displays the main interface 32 of the door lock 001, as shown in (b) of FIG. 3 .
  • the main interface 32 of the door lock 001 may include prompt information, for example, "bring the mobile phone close to the door lock, light up the password panel and click the configuration button", which is used to configure the door lock information, such as the door lock name, door lock related functions Open and close, etc. It may also include a fingerprint management button 33 , a password management button 34 and an unlock record button 35 . Users can click different buttons to perform different operations. For example, the user adds the user's fingerprint information by clicking the fingerprint management button 33, sets a password for the door lock 001 by clicking the password management button 34, or checks the historical unlocking record of the door lock 001 by clicking the unlocking record button 35.
  • FIG. 2 and FIG. 3 are only examples, and do not limit the APP and related interfaces for managing smart locks.
  • FIG. 4 is a schematic schematic diagram of an implementation manner of unlocking based on Bluetooth.
  • the mobile phone 300 responds to the user's operation of clicking the icon 42 , runs the door lock APP, establishes a Bluetooth connection with the door lock 400 , and displays the interface 43 .
  • the interface 43 includes an unlock button 44 .
  • 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 operation of the user clicking the unlock button 44 .
  • the door lock 400 is unlocked according to the unlocking instruction, and the user turns the door handle to unlock.
  • the embodiment of the present application does not limit the interface where the unlock button is located, and the implementation manners in different APPs are different.
  • the main interface 31 includes an unlock button for each door lock.
  • the unlock button of the door lock 001 is the button 36 , and the user can click the button 36 to unlock the door lock 001 .
  • the unlocking requires the user to participate in the operation.
  • An embodiment of the present application provides a Bluetooth-based unlocking method.
  • a terminal device communicates with a door lock via Bluetooth
  • transmit power there are two types of transmit power, which can be called normal power and ultra-low power, respectively.
  • the value of ultra-low power is very small, and the signal transmission distance is limited, usually tens of centimeters.
  • the terminal device uses ultra-low power to send unlock commands to the door lock, and uses normal power to send other data to the door lock.
  • FIG. 5 is a schematic schematic diagram of the principle of a Bluetooth-based unlocking method provided by an embodiment of the present application. As shown in FIG.
  • the user carries a mobile phone 300
  • the range of the mobile phone 300 for Bluetooth communication using normal power is marked as range 51
  • the range for Bluetooth communication using ultra-low power is marked as range 52
  • range 51 is greater than range 52 .
  • the mobile phone 300 and the door lock 400 can transmit other data.
  • the door lock 400 can receive the unlocking instruction sent by the mobile phone 300 .
  • the mobile phone By setting the ultra-low power, the mobile phone shortens the transmission distance of the unlock command sent by the mobile phone, thus providing support for the non-inductive unlocking based on Bluetooth, and improving the security of the user's non-inductive unlocking.
  • the user does not need to perform the unlocking operation in the mobile phone interface, and the mobile phone uses ultra-low power to send the unlocking command to the door lock.
  • the door lock is safely unlocked according to the received unlocking command, which realizes the user's non-sensing unlocking and improves the unlocking efficiency. Improved user experience.
  • the normal power refers to the power used by the terminal device in the existing Bluetooth communication.
  • Ultra-low power refers to the use of fractional transmit power to send unlock commands to the door lock in order to ensure the safety of non-inductive unlocking.
  • the technical principle can be seen in Figure 5.
  • the mobile phone can use ultra-low power to send other information related to the unlocking instruction to the door lock, which is used for the door lock to further verify whether the received unlocking instruction is correct and complete, which further improves the security of non-sensing unlocking.
  • the specific content of other information is not limited in the embodiments of the present application.
  • the embodiment of the present application does not limit the value or the value range of the ultra-low power. It can be understood that the smaller the value of the ultra-low power, the shorter the signal transmission distance, and the higher the security of the Bluetooth-based sensorless unlocking.
  • the ultra-low power can be below -50dBm to -60dBm, so that the unlocking command can be received only within a range of several tens of centimeters between the door lock and the terminal device. For example, the distance between the door lock and the terminal device is less than 30cm to 50cm.
  • the embodiments of the present application do not limit the names of normal power and ultra-low power.
  • the ultra-low power is also referred to as the first transmission power
  • the normal power is also referred to as the second transmission power.
  • Sensorless unlocking means that when the user needs to unlock the door, the user does not need to participate in the unlocking operation.
  • the unlocking of the door lock is imperceptible, which can improve the user's experience.
  • the user needs to click the unlock button to unlock, which is not a senseless unlock.
  • the sensorless unlocking function of the terminal device means that the terminal device can use ultra-low power to send unlocking instructions to the smart door lock. This embodiment of the present application does not limit the name of the sensorless unlocking function.
  • the terminal device supports the sensorless unlocking function by default.
  • the user can turn on or turn off the sensorless unlocking function of the terminal device.
  • This embodiment of the present application does not limit the setting manner of the user. For example, it can be set by voice, preset gestures or operations in the relevant display interface.
  • the non-sensing unlocking function of the door lock refers to the function that can be unlocked without the user's participation in the unlocking operation.
  • the door lock supports the sensorless unlocking function by default.
  • the user can enable or disable the sensorless unlocking function of the door lock in the APP that manages the door lock.
  • This embodiment of the present application does not limit the setting manner of the user. For example, it can be set by voice, preset gestures or operations in the relevant display interface.
  • FIG. 6 is an interface diagram for setting the sensorless unlocking function of a mobile phone and a door lock according to an embodiment of the present application.
  • the user clicks on the control 37 to display more information of the door lock 001 .
  • the mobile phone displays an interface 61 in response to the user's operation of clicking on the control 37, as shown in (a) of FIG. 6 .
  • the interface 61 includes more information of the door lock 001, such as device name, warranty information, device information and version upgrade.
  • the interface 61 also includes an unbind device button 62 , and the user can click the button 62 to unbind the mobile phone from the door lock 001 .
  • the interface 61 also includes a switch control 63 for the sensorless unlocking function, which is used to set the sensorless unlocking function of the mobile phone and the door lock 001 .
  • different display forms of the switch control 63 may indicate whether the sensorless unlocking function is on or off.
  • the sensorless unlocking function of the mobile phone and door lock 001 is disabled.
  • the user can click the switch control 63.
  • the mobile phone enables the sensorless unlocking function of the mobile phone and the door lock 001, and the display form of the switch control 63 changes, as shown in (b) of FIG. 6 .
  • FIG. 6 is only an example, and does not limit the manner of setting the sensorless unlocking function of the mobile phone and the door lock.
  • the sensorless unlocking functions of the mobile phone and the door lock can be set separately, or can be set with one key as shown in FIG. 6 .
  • FIG. 7 is a schematic diagram of an application scenario to which the embodiment of the present application is applied, and shows a process in which the distance between the mobile phone carried by the user and the door lock is gradually reduced before entering the door.
  • user A carries mobile phone A at position 0, and the distance between user A and the door lock is too far, which exceeds the Bluetooth communication range under normal power of mobile phone A, and mobile phone A cannot communicate with the door.
  • the lock communicates via Bluetooth.
  • (b) in Figure 7 as user A moves towards the door lock, the distance between mobile phone A and the door lock decreases. When user A is in position 1, mobile phone A can use normal power to communicate with the door lock via Bluetooth.
  • the range 52 shows the range in which the mobile phone A uses ultra-low power for Bluetooth communication.
  • the door lock will not receive the unlock command and cannot be unlocked.
  • (c) in FIG. 7 is similar to (b) in FIG. 7 , the mobile phone A cannot perform Bluetooth communication with the door lock using ultra-low power.
  • mobile phone A can use normal power to communicate with the door lock via Bluetooth, or use ultra-low power to communicate with the door lock. for Bluetooth communication. At this time, mobile phone A sends an unlocking command to the door lock using ultra-low power, and the door lock can unlock after receiving the unlocking command.
  • FIG. 8 is a schematic diagram of another application scenario applicable to the embodiment of the present application, which shows a scenario in which the user enters the door from outside the door and places the mobile phone near the door lock.
  • (a) in FIG. 8 is the same as (d) in FIG. 7 and will not be repeated here.
  • (b) in Figure 8 after user A enters the door, user A places mobile phone A near the door lock, and the door lock is located within the range 52 where mobile phone A uses ultra-low power for Bluetooth communication.
  • Mobile phone A can use normal power to communicate with the door lock.
  • ultra-low power can also be used for Bluetooth communication with the door lock.
  • FIG. 8 shows a schematic diagram of another application scenario applicable to the embodiment of the present application, which shows a scenario in which the user enters the door from outside the door and places the mobile phone near the door lock.
  • the ultra-low power will not be used to send the unlocking command to the door lock, which saves the power consumption of the mobile phone A. It also further improves the security of non-sensing unlocking.
  • FIG. 9 is a schematic diagram of yet another application scenario to which the embodiment of the present application is applied, and illustrates a scenario in which there is a risk of a relay attack.
  • the distance between user A and the door lock is relatively far.
  • Mobile phone A can use normal power to communicate with the door lock via Bluetooth, but cannot communicate with the door lock using ultra-low power.
  • Attacker 1 carries a relay device located near user A, which is used to intercept the information sent by mobile phone A to the door lock, and send the intercepted information to mobile phone 2 carried by attacker 2.
  • the attacker 2 carries the mobile phone 2 and is located near the door lock.
  • the mobile phone 2 uses the intercepted information to communicate with the door lock, causing danger.
  • the range 52 of mobile phone A using ultra-low power for Bluetooth communication is small, such as tens of centimeters, and the distance between attacker 1 and user A is usually not less than tens of centimeters, the relay device cannot intercept it.
  • the unlock command sent by mobile phone A solves the risk of the relay device intercepting the unlock command, improves the security of the door lock, and successfully defends against relay attacks.
  • FIG. 10 is a message interaction diagram of a Bluetooth-based unlocking method provided by an embodiment of the present application.
  • the executive body involved in this embodiment includes a mobile phone and a door lock.
  • the Bluetooth-based unlocking method provided in this embodiment may include:
  • the door lock sends a BLE broadcast message.
  • the mobile phone performs BLE scanning.
  • the mobile phone and the door lock need to have the Bluetooth function turned on.
  • This embodiment does not limit the execution order of S1001 and S1002.
  • the door lock can send BLE broadcast messages for a long time, and the mobile phone can perform BLE background scanning for a long time. If the mobile phone receives the BLE broadcast message sent by the door lock, the BLE broadcast message includes the identity information of the door lock, and the door lock can be identified according to the BLE broadcast message.
  • the Bluetooth broadcast and scanning can refer to the Bluetooth standard protocol Core v5.2 Vol6 PartD 3/4/5, which is not described in detail in this embodiment.
  • the mobile phone generates a target message, and the target message is used to instruct the door lock to unlock.
  • the target message includes the identity information of the mobile phone and the identity information of the door lock. This embodiment does not limit the implementation of the identity information, for example, the identification information or address of the device.
  • the mobile phone and the door lock Since the door lock is added before the mobile phone, such as the process shown in Figure 2, the mobile phone and the door lock establish a Bluetooth connection and perform the initial pairing authentication process, and the mobile phone and the door lock save each other's information.
  • the target message instructs the door lock to unlock, and accordingly, the door lock can determine the target message to instruct itself to unlock.
  • the target message may include an unlocking instruction, where the unlocking instruction is used to instruct the door lock to be unlocked.
  • the mobile phone uses ultra-low power to send the target message to the door lock.
  • the ultra-low power can be referred to the above description, and details are not repeated here.
  • the door lock cannot receive the target message.
  • the target message can be received.
  • the mobile phone can use the first transmission power to continuously send the target message to the door lock until the preset sending time or the preset number of sending times is reached.
  • This embodiment does not limit the value of the preset sending duration or the preset sending times.
  • the target message is continuously sent multiple times through the mobile phone, which improves the success rate of the door lock receiving the target message and ensures that the door lock can be unlocked.
  • the mobile phone is prevented from sending the target message all the time, energy consumption is saved, and unlocking security is improved.
  • the user is always outside the door. Since the number of times the mobile phone sends the target message is limited, the door lock is prevented from receiving the target message and unlocking all the time, which improves the security of the door lock.
  • the target message may be a BLE broadcast message. That is, the mobile phone can use ultra-low power to send a BLE broadcast message to the door lock, where the BLE broadcast message is used to instruct the door lock to unlock.
  • the door lock receives the BLE broadcast message through BLE scanning. In this implementation, there is no need to establish a BLE connection between the mobile phone and the door lock, which saves the message flow.
  • the mobile phone after establishing a BLE connection with the door lock, the mobile phone sends the target message through the BLE connection.
  • S1003 to S1005 may be referred to as unlocking stages.
  • the mobile phone and the door lock perform BLE broadcast and scanning according to the existing process, and perform Bluetooth communication. After the mobile phone recognizes the door lock, it uses ultra-low power to send the target message, and the transmission distance of the target message is limited.
  • the distance between the mobile phone and the door lock is very far, for example, the scene shown in (a), (b), (c) in Figure 7 or the scene shown in Figure 9, even if the mobile phone sends the target message, the door lock If not received, the door lock will not be unlocked.
  • the door lock can receive the target message and can be unlocked according to the target message.
  • the transmission distance of the target message is limited, which ensures the safety of the door lock unlocking.
  • the door lock performs unlocking according to whether the target message is received, which avoids the user's participation in the unlocking operation, realizes the user's senseless unlocking, and improves the user's experience.
  • the Bluetooth-based unlocking method provided in this embodiment may further include:
  • the door lock sends a response message to the mobile phone, and the response message is used to indicate whether the door lock is unlocked successfully.
  • the mobile phone receives the response message sent by the door lock.
  • the phone can stop sending the targeted message.
  • the mobile phone can retransmit the target message to the door lock using ultra-low power.
  • the number of retransmissions may be set, and the number of retransmissions is the maximum number of times that the mobile phone continuously receives a response message indicating that the door lock fails to unlock.
  • the value of the number of retransmissions is not limited in this embodiment.
  • S1004 may be referred to each time the mobile phone resends the target message.
  • the mobile phone can output prompt information to prompt the user that the door lock fails to unlock, so that the user can re-trigger the sending of the target message, or the user can choose another way to unlock. For example, the method of clicking the unlock button as shown in FIG. 4 is adopted.
  • the mobile phone When the mobile phone outputs the prompt information, it can be output by voice or displayed on the relevant interface. This embodiment does not limit the specific content of the prompt information.
  • the Bluetooth-based unlocking method provided in this embodiment may further include:
  • the mobile phone If the mobile phone does not receive the response message sent by the door lock, it can re-send the target message to the door lock with ultra-low power. Reference may be made to the relevant description in S1006, which will not be repeated here.
  • FIG. 11 is another message interaction diagram of the Bluetooth-based unlocking method provided by the embodiment of the present application.
  • the executive body involved in this embodiment includes a mobile phone and a door lock.
  • the mobile phone determines whether the positions of the mobile phone and the door lock satisfy a preset condition.
  • the unlocking stage includes S1003, S1007, and S1004 to S1005.
  • the target message is sent only when the positions of the mobile phone and the door lock meet the preset conditions, which saves the power consumption of the mobile phone.
  • the mobile phone is far away from the door lock, and the preset conditions are not met, and the mobile phone may not send the target message.
  • the distance between the mobile phone and the door lock is close enough to send the target message.
  • the user does not need to unlock the door when he is in 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 may be different.
  • the information for determining the location of the mobile phone and the door lock may include, but is not limited to, at least one of the following: location information of the mobile phone, location information of the door lock, or signal strength of the signal sent by the door lock received by the mobile phone.
  • the location information includes, but is not limited to, at least one of the following: global positioning system (GPS) location information, Beidou satellite navigation system location information, or a location that combines base station information, WiFi signal characteristics, geomagnetism and other information for fusion positioning information.
  • GPS global positioning system
  • the mobile phone may further include:
  • the door lock sends capability information of the door lock, and the capability information is used to indicate whether the door lock supports sensorless unlocking.
  • the mobile phone receives the capability information of the door lock.
  • the mobile phone determines whether the door lock supports non-sensing unlocking according to the capability information of the door lock.
  • S1003 is executed, and a target message is sent to the door lock by using ultra-low power, so as to realize the non-inductive unlocking of the user.
  • the mobile phone can output prompt information for prompting that the door lock does not support sensorless unlocking, so that the user can choose another way to unlock.
  • the method of clicking the unlock button as shown in FIG. 4 is adopted.
  • the mobile phone outputs the prompt information, it can be output by voice or displayed on the relevant interface. This embodiment does not limit the specific content of the prompt information.
  • the door lock before the door lock sends the door lock capability information in S1008, it may further include:
  • the mobile phone sends a capability query request message to the door lock.
  • the door lock receives the capability query request message sent by the mobile phone.
  • S1010, S1008-S1009 may be referred to as a door lock capability identification stage.
  • the capability information of the door lock may be carried in a BLE broadcast message sent by the door lock.
  • the mobile phone scans and receives BLE broadcast messages through BLE to obtain the capability information of the door lock.
  • the door lock after the door lock establishes a BLE connection with the mobile phone, the door lock sends the capability information of the door lock through the BLE connection.
  • the door lock may transmit the capability information of the door lock according to a generic attribute profile (GATT) protocol.
  • GATT organizes the data to be sent through attribute tables. Multiple attributes can be included in the GATT attribute table. Properties contain a handle, a universally unique identifier (UUID), and a value. The handle is the index of the attribute in the GATT table, and the handle of each attribute is unique in a device. UUID contains the information of the data type in the attribute table, it is the 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 door lock capability information using the GATT protocol according to an embodiment of the present application. As shown in FIG.
  • the GATT attribute table includes a device service capability attribute (UUID1) and other service attributes (UUID2).
  • the device service capability attribute includes the sensorless unlocking feature
  • the type (Type) in the sensorless unlocking feature includes: sensorless unlocking, ranging broadcast, geographic location verification, and other capability values.
  • Each type (Type) is identified by a different value (Value). For example, the value of non-sensing unlocking (Value) is Ture, indicating that the door lock supports the non-sensing unlocking function. Similarly, the door lock also supports the function of sending ranging broadcast and geographic location verification.
  • the mobile phone after the mobile phone performs BLE scanning in S1002, it may further include:
  • an implementation manner of S1003 and S1005 in the unlocking phase is provided.
  • the mobile phone before the mobile phone generates the target message in S1003, it may further include:
  • the door lock sends encrypted messages.
  • the mobile phone receives the encrypted information sent by the door lock.
  • the generation of the target message by the mobile phone in S1003 may include: the mobile phone generates the target message according to the encrypted information.
  • the unlocking of the door lock according to the target message in S1005 may include: unlocking the door lock according to the encrypted information and the target message.
  • the encrypted information is used for security verification of the target message.
  • the target message is generated according to the encrypted information, which improves the security of the target message.
  • the security verification is performed on the received target message according to the encrypted information, and the unlocking is performed only when the verification is passed, which improves the security of the door lock unlocking.
  • the door lock can update encrypted information.
  • the door lock may periodically update the encrypted information, and the update period is not limited in this embodiment.
  • the door lock can be triggered to update the encrypted information.
  • the encrypted information is carried in the BLE broadcast message sent by the door lock. That is, the door lock sends a BLE broadcast message, and the BLE broadcast message includes encrypted information.
  • the mobile phone scans the BLE to receive the BLE broadcast message to obtain encrypted information.
  • the BLE broadcast message may further include capability information of the door lock.
  • the door lock after the door lock establishes a BLE connection with the mobile phone, the door lock sends encrypted information to the mobile phone through the BLE connection.
  • FIG. 13 is another message interaction diagram of the Bluetooth-based unlocking method provided by the embodiment of the present application.
  • the security of the target message is verified through random numbers and a preset encryption and decryption algorithm, which improves the security of the target message and the security of door lock unlocking.
  • the door lock can acquire a random number, and the method for acquiring the random number by the door lock and the value range of the random number are not limited in this embodiment.
  • Encrypted information includes random numbers.
  • the unlocking phase may include:
  • the door lock sends a random number.
  • the mobile phone receives the random number sent by the door lock.
  • the mobile phone encrypts the random number according to a preset encryption and decryption algorithm, and generates an encrypted random number.
  • the mobile phone generates a target message, where the target message includes an encrypted random number and an unlocking instruction.
  • the mobile phone uses ultra-low power to send the target message to the door lock.
  • the door lock decrypts the encrypted random number according to a preset encryption and decryption algorithm to obtain a decrypted random number.
  • the preset encryption and decryption algorithms are not limited in this embodiment.
  • the Advanced Encryption Standard (AES) algorithm is not limited in this embodiment.
  • AES Advanced Encryption Standard
  • the unlocking instruction in the target message may be encrypted by a preset encryption and decryption algorithm.
  • FIG. 14 is another message interaction diagram of the Bluetooth-based unlocking method provided by the embodiment of the present application.
  • the security of the target message is verified by the key, which improves the security of the target message and the security of unlocking the door lock.
  • the unlocking phase can include:
  • the door lock obtains an asymmetric key pair.
  • the asymmetric key pair includes a public key and a private key, and the encrypted information includes a public key.
  • This embodiment does not limit the manner in which the door lock obtains the asymmetric key pair.
  • the door lock sends the public key in the asymmetric key pair.
  • the mobile phone receives the public key sent by the door lock.
  • the mobile phone uses the public key to encrypt the unlocking instruction to generate the encrypted unlocking instruction.
  • the mobile phone generates a target message, where the target message includes an encrypted unlocking instruction.
  • the mobile phone uses ultra-low power to send the target message to the door lock.
  • the door lock decrypts the encrypted unlocking instruction according to the private key in the asymmetric key pair, and obtains the unlocking instruction.
  • the mobile phone determines whether the positions of the mobile phone and the door lock meet the preset conditions, which may include:
  • the door lock sends a ranging broadcast message.
  • the mobile phone receives the ranging broadcast message sent by the door lock.
  • the mobile phone determines whether the signal strength of the ranging broadcast message satisfies the preset condition.
  • the farther the mobile phone is from the door lock the weaker the signal strength of the ranging broadcast message received by the mobile phone.
  • the closer the distance between the mobile phone and the door lock the stronger the signal strength of the ranging broadcast message received by the mobile phone. Therefore, the signal strength of the ranging broadcast message received by the mobile phone can reflect the distance between the mobile phone and the door lock.
  • the scene is divided according to the number of antennas on the door lock and the positions of the antennas.
  • the door lock includes at least one antenna. After the door lock is installed on the door, all antennas are on the outside of the door.
  • the door lock includes at least one antenna. After the door lock is installed on the door, all antennas are on the inner side of the door.
  • the door lock includes at least one antenna. After the door lock is installed on the door, some antennas are located on the outside of the door, and some antennas are located on the inside of the door. For the convenience of explanation, there is an antenna inside and outside the door as an example. The antenna located outside the door is called the first antenna, and the antenna located inside the door is called the second antenna.
  • the door lock sends a ranging broadcast message, which can include:
  • the door lock transmits a ranging broadcast message through at least one of all antennas.
  • the mobile phone determines whether the signal strength of the ranging broadcast message meets the preset conditions, which may include:
  • ranging broadcast message For any ranging broadcast message received by the mobile phone, determine whether the signal strength of the ranging broadcast message is greater than a preset threshold.
  • the mobile phone determines that the signal strength of the ranging broadcast message is greater than the preset threshold, it means that the distance between the mobile phone and the door lock is relatively short, and S1004 can be executed, and the mobile phone uses ultra-low power to send the target message to the door lock. If the mobile phone determines that the signal strength of the ranging broadcast message is less than the preset threshold, it means that the distance between the mobile phone and the door lock is relatively far, and S1004 and subsequent steps are not performed. Wherein, when the signal strength of the ranging broadcast message is equal to the preset threshold, S1004 may be performed, or S1004 may not be performed.
  • the value of the preset threshold is not limited in this embodiment.
  • the mobile phone may determine whether to send the target message according to whether the signal strengths of the multiple ranging broadcast messages are greater than a preset threshold. For example, when the number of ranging broadcast messages whose signal strength is greater than a preset threshold is greater than a certain number, the mobile phone uses ultra-low power to send the target message to the door lock. Alternatively, as long as there is a ranging broadcast message with a signal strength greater than a preset threshold, the mobile phone uses ultra-low power to send the target message to the door lock.
  • the third scenario is applicable.
  • the door lock sends a ranging broadcast message, which can include:
  • the door lock uses the target power to send the first ranging broadcast message through the first antenna, and uses the target power to send the second ranging broadcast message through the second antenna.
  • the first ranging broadcast message includes first identification information, and the first identification information is used to indicate that the first antenna is located outside the door.
  • the second ranging broadcast message includes second identification information, where the second identification information is used to indicate that the second antenna is located in the door.
  • the mobile phone determines whether the signal strength of the ranging broadcast message meets the preset conditions, which may include:
  • the mobile phone determines whether the signal strength of the first ranging broadcast message is greater than the signal strength of the second ranging broadcast message.
  • This embodiment does not limit the value of the target power.
  • the signal strength of the first ranging broadcast message is greater than the signal strength of the second ranging broadcast message, it means that the mobile phone is located outside the door, and S1004 can be executed, and the mobile phone uses ultra-low power to send the target message to the door lock. If the signal strength of the first ranging broadcast message is lower than the signal strength of the second ranging broadcast message, it means that the mobile phone is located in the door, and S1004 and subsequent steps are not performed. Wherein, when the signal strength of the first ranging broadcast message is equal to the signal strength of the second ranging broadcast message, S1004 may or may not be performed.
  • 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 uses the same power to send the ranging broadcast message through the first antenna and the second antenna. Due to the barrier of the door, RSSI11>RSSI21.
  • the mobile phone B is located in the door, and the signal strength of the first ranging broadcast message is marked as RSSI12 ⁇ the signal strength of the second ranging broadcast message is marked as RSSI22.
  • the above two manners may be combined.
  • the mobile phone uses ultra-low power to send the target message to the door lock to achieve non-sensing unlocking.
  • the unlocking stage before the door lock is unlocked according to the target message in S1005, it may further include:
  • the door lock determines whether the positions of the mobile phone and the door lock meet the preset conditions.
  • S1005 is executed to unlock according to the target message. If the door lock determines that the positions of the mobile phone and the door lock do not meet the preset conditions, S1005 and subsequent steps are not performed. By further judging on 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 may be different.
  • the preset condition in S1007 may be referred to as the first preset condition, and the preset condition in this embodiment may be referred to as the second preset condition.
  • the door lock determines whether the positions of the mobile phone and the door lock satisfy a preset condition, which may include:
  • the phone obtains an asymmetric key pair.
  • the asymmetric key pair includes a public key and a private key.
  • the phone sends the public key from the asymmetric key pair to the door lock.
  • the mobile phone obtains the current location information, and encrypts the current location information with the private key in the asymmetric key pair to generate encrypted location information.
  • the phone sends encrypted location information to the door lock. Accordingly, the door lock receives encrypted location information.
  • the door lock decrypts the encrypted location information according to the public key in the asymmetric key pair to obtain the decrypted location information.
  • the door lock compares the decrypted position information with the initial position information of the mobile phone stored locally, and determines whether the error between the decrypted position information and the initial position information of the mobile phone is within a preset error range.
  • the initial location information of the mobile phone is the location information of the mobile phone when the mobile phone establishes a BLE connection with the door lock for the first time.
  • the geographical location of the mobile phone is written into the door lock.
  • the location information of the mobile phone is sent to the door lock, that is, the initial location information of the mobile phone.
  • the door lock compares the current position of the mobile phone with the initial position of the mobile phone stored locally. If the error is greater than the preset error range, it will refuse to unlock; if the error is less than the preset error range, Unlocking is allowed, which further improves the security of the door lock's senseless unlocking.
  • this embodiment does not limit the value of the preset error range. For example, 50 meters.
  • the terminal device and the smart lock include corresponding hardware and/or software modules for executing each function.
  • the present application can be implemented in hardware or in the form of a combination of hardware and computer software in conjunction with the algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
  • the terminal device and the smart lock can be divided into functional modules according to the above method examples.
  • each functional module can be divided according to each function, or two or more functions can be integrated into one module.
  • the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • the names of the modules in the embodiments of the present application are schematic, and the names of the modules are not limited in actual implementation.
  • FIG. 16 is a schematic structural diagram of a terminal device provided by an embodiment of the present application. As shown in FIG. 16 , the terminal device provided in this embodiment may include:
  • the receiving module 1601 is used to receive the BLE broadcast message sent by the smart lock, and identify the smart lock;
  • a processing module 1602 configured to generate a target message, the target message being used to instruct the smart lock to be unlocked;
  • a sending module 1603, configured to send the target message to the smart lock using a first transmit power, where the first transmit power is less than or equal to a first threshold, where the first threshold includes -50dBm.
  • the receiving module 1601 is further configured to receive encrypted information sent by the smart lock
  • the processing module 1602 is specifically configured to: generate the target message according to the encrypted information.
  • the encrypted information includes random numbers; the processing module 1602 is specifically configured to:
  • the target message is generated; the target message includes the encrypted random number and an unlock instruction.
  • the encrypted information includes a public key in an asymmetric key pair; the processing module 1602 is specifically configured to:
  • the target message is generated; the target message includes the encrypted unlock instruction.
  • the encrypted information is carried in the BLE broadcast message sent by the smart lock.
  • processing module 1602 is further configured to:
  • 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: determine whether the signal strength of the ranging broadcast message satisfies a preset condition.
  • 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: determine whether the signal strength of the ranging broadcast message is greater than a preset threshold.
  • the smart lock includes a first antenna and a second antenna.
  • the first antenna is located outside the door
  • the second antenna is located inside 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
  • the second The identification information is used to indicate that the second antenna is located in the door;
  • the processing module 1602 is specifically used for:
  • the sending module 1603 is specifically used for:
  • the target message is continuously sent to the smart lock by using the first transmit power until a preset sending time or a preset number of sending times is reached.
  • the target message is a BLE broadcast message.
  • 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 used for:
  • the target message is generated.
  • 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.
  • 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 perform the operations performed by the mobile phone in the foregoing method embodiments, and the technical principles and technical effects are similar, and details are not described herein again.
  • FIG. 17 is a schematic structural diagram of a smart lock provided by an embodiment of the present application. As shown in Figure 17, the smart lock provided by this embodiment may include:
  • a sending module 1701 configured to send 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 be unlocked;
  • the processing module 1702 is configured to unlock according to the encrypted information and the target message.
  • the encrypted information includes a random number
  • the target message includes an encrypted random number and an unlock instruction
  • the encrypted random number is generated by the terminal device encrypting the random number according to a preset encryption and decryption algorithm
  • the processing module 1702 is specifically used for:
  • the encrypted information includes a public key in an asymmetric key pair
  • the target message includes an encrypted unlocking instruction
  • 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 used for:
  • the encryption information is carried in a BLE broadcast message.
  • the sending module 1701 is further configured to send a ranging broadcast message.
  • the smart lock includes N antennas, where N is greater than or equal to 1, and the sending module 1701 is specifically used for:
  • the ranging broadcast message is transmitted through at least one of the N antennas.
  • the smart lock includes a first antenna and a second antenna.
  • the first antenna is located outside the door, and the second antenna is located inside the door.
  • the sending module 1701 is specifically used for:
  • a first ranging broadcast message is sent through the first antenna using a target power, and a second ranging broadcast message is sent through the second antenna using the target power; the first ranging broadcast message includes an indication of the first ranging broadcast message.
  • the first identification information indicating that the antenna is located outside the door
  • the second ranging broadcast message includes second identification information indicating that the second antenna is located inside the door.
  • the target message is a BLE broadcast message sent by the terminal device.
  • the sending module 1701 is further configured to send capability information of the smart lock; the capability information is used to indicate whether the smart lock supports sensorless unlocking.
  • the sending module 1701 is specifically used for:
  • processing module 1702 is further configured to:
  • a BLE connection is established with the terminal device.
  • the smart lock provided in this embodiment is used to perform the operations performed by the door lock in the foregoing method embodiments, and the technical principles and technical effects are similar, and details are not repeated here.
  • FIG. 18 shows a structure of an electronic device provided by an embodiment of the present application.
  • the electronic device may be a terminal device or a smart lock in this embodiment of the application.
  • the electronic device includes: a processor 1801 , a receiver 1802 , a transmitter 1803 , a memory 1804 and a bus 1805 .
  • the processor 1801 includes one or more processing cores, and the processor 1801 executes various functional applications and information processing by running software programs and modules.
  • the receiver 1802 and the transmitter 1803 may be implemented as a communication component, which may be a baseband chip.
  • the memory 1804 is connected to the processor 1801 through a bus 1805.
  • the memory 1804 may be configured to store at least one program instruction, and the processor 1801 may be configured to execute the at least one program instruction, so as to implement the technical solutions of the foregoing embodiments.
  • the implementation principle and technical effect thereof are similar to the related embodiments of the above method, and are not repeated here.
  • 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.
  • the processor performs baseband processing on the data to be sent, and outputs the baseband signal to the control circuit in the control circuit.
  • the control circuit performs radio frequency processing on the baseband signal and sends the radio frequency signal through the antenna in the form of electromagnetic waves. send.
  • the control circuit receives the radio frequency signal through the antenna, converts the radio frequency signal into a baseband signal, and outputs the baseband signal to the processor, which converts the baseband signal into data and processes the data.
  • FIG. 18 only shows one memory and a processor. In an actual electronic device, there may be multiple processors and memories.
  • the memory may also be referred to as a storage medium or a storage device, etc., which is not limited in this embodiment of the present application.
  • the processor may include a baseband processor and a central processing unit.
  • the baseband processor is mainly used to process communication data
  • the central processing unit is mainly used to execute software programs and process data of the software programs.
  • the baseband processor and the central processing unit may be integrated into one processor, or may be independent processors, which are interconnected through technologies such as a bus.
  • an electronic device may include multiple baseband processors to adapt to different network standards, an electronic device may include multiple central processors to enhance its processing capability, and various components of the electronic device may be connected through various buses.
  • the baseband processor can also be expressed as a baseband processing circuit or a baseband processing chip.
  • the central processing unit can also be expressed as a central processing circuit or a central processing chip.
  • the function of processing the communication protocol and 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 can be integrated in the processor or independent of the processor.
  • the memory includes a cache, which can store frequently accessed data/instructions.
  • 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, which can implement or
  • a general purpose processor may be a microprocessor or any conventional processor or the like.
  • the steps of the methods disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
  • the memory may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SS), etc., or may also be a volatile memory (volatile memory), for example Random-access memory (RAM).
  • Memory is, without limitation, 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.
  • the memory in this embodiment of the present application may also be a circuit or any other device capable of implementing a storage function, for storing program instructions and/or data.
  • the methods provided by the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • When implemented in software it can 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. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, network equipment, user equipment, or other programmable apparatus.
  • the computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL), or wireless (eg, infrared, wireless, microwave, etc.)
  • a readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media.
  • the available media can be magnetic media (eg, floppy disks, hard disks, magnetic tapes) ), optical media (eg, digital video disc (DWD), or semiconductor media (eg, SSD), etc.).
  • the embodiments of the present application provide a computer program product, which enables the terminal to execute the technical solutions in the foregoing embodiments when the computer program product runs on a terminal.
  • the implementation principle and technical effect thereof are similar to those of the above-mentioned related embodiments, which will not be repeated here.
  • the embodiments of the present application provide a computer-readable storage medium, on which program instructions are stored, and when the program instructions are executed by a terminal, the terminal executes the technical solutions of the foregoing embodiments.
  • the implementation principle and technical effect thereof are similar to those of the above-mentioned related embodiments, which will not be repeated here.

Landscapes

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

Abstract

The embodiments of the present application are applicable to the technical field of communications. Provided are a Bluetooth-based unlocking method, a terminal device, a smart lock and a storage medium. The terminal device and the smart lock can perform Bluetooth communication. The method comprises: a smart lock sending a BLE broadcast message, and a terminal device receiving the BLE broadcast message, so as to recognize the smart lock; the terminal device generating a target message that is used for instructing the smart lock to unlock, and sending the target message to the smart lock by using a first transmission power, wherein the first transmission power is less than or equal to a first threshold value, the first threshold value comprising -50 dBm; and the smart lock receiving the target message and unlocking according to the target message. The numerical value of the first transmission power is very small, and the signal transmission distance is limited and is usually dozens of centimeters. When the distance between the smart lock and the terminal device is within the transmission range of the first transmission power, the smart lock receives the target message sent by the terminal device. The target message is sent by the terminal device at a low power, such that imperceptible unlocking by a user is realized, and the user experience of unlocking is improved.

Description

基于蓝牙的解锁方法、终端设备、智能锁及存储介质Bluetooth-based unlocking method, terminal device, smart lock and storage medium
本申请要求于2021年03月24日提交国家知识产权局、申请号为202110314750.6、申请名称为“基于蓝牙的解锁方法、终端设备、智能锁及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office on March 24, 2021, the application number is 202110314750.6, and the application name is "Bluetooth-based unlocking method, terminal device, smart lock and storage medium", all of which are The contents are incorporated herein by reference.
技术领域technical field
本申请实施例涉及通信技术领域,尤其涉及一种基于蓝牙的解锁方法、终端设备、智能锁及存储介质。The embodiments of the present application relate to the field of communication technologies, and in particular, to a Bluetooth-based unlocking method, a terminal device, a smart lock, and a storage medium.
背景技术Background technique
随着蓝牙(bluetooth,BT)技术的发展和应用,基于蓝牙的产品越来越多,其中包括基于蓝牙解锁的智能锁,例如智能门锁。With the development and application of Bluetooth (bluetooth, BT) technology, there are more and more products based on Bluetooth, including smart locks unlocked based on Bluetooth, such as smart door locks.
用户打开智能门锁的过程通常为:用户点击运行手机上安装的门锁应用程序,在手机与智能门锁建立蓝牙连接后,门锁应用程序显示解锁界面。用户点击解锁界面中的解锁按键进行智能门锁的解锁。The process for the user to open the smart door lock is usually as follows: the user clicks to run the door lock application installed on the mobile phone, and after the mobile phone and the smart door lock establish a Bluetooth connection, the door lock application displays the unlock interface. The user clicks the unlock button in the unlock interface to unlock the smart door lock.
上述过程操作步骤较多,解锁效率较低。The above process has many operation steps, and the unlocking efficiency is low.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种基于蓝牙的解锁方法、终端设备、智能锁及存储介质,实现了用户无感解锁,提高了用户开锁感受。The embodiments of the present application provide a Bluetooth-based unlocking method, a terminal device, a smart lock, and a storage medium, which realizes the user's senseless unlocking and improves the user's unlocking experience.
第一方面,提供了一种基于蓝牙的解锁方法,应用于终端设备和智能锁组成的系统,方法包括:智能锁发送BLE广播消息,终端设备接收BLE广播消息,识别智能锁;终端设备生成用于指示智能锁解锁的目标消息,采用第一发射功率向智能锁发送目标消息,第一发射功率小于或等于第一阈值,第一阈值包括-50dBm;智能锁接收目标消息,根据目标消息解锁。In a first aspect, a Bluetooth-based unlocking method is provided, which is applied to a system composed of a terminal device and a smart lock. The method includes: the smart lock sends a BLE broadcast message, the terminal device receives the BLE broadcast message, and identifies the smart lock; For the target message indicating that the smart lock is unlocked, the target message is sent to the smart lock using the first transmit power, the first transmit power is less than or equal to the first threshold, and the first threshold includes -50dBm; the smart lock receives the target message and unlocks according to the target message.
第一方面提供的基于蓝牙的解锁方法,第一发射功率(本申请实施例中的超小功率)的数值很小,信号传输距离有限,通常为几十厘米。超小功率小于或等于第一阈值,第一阈值包括-50dBm。例如,第一阈值可以在-50dBm~-60dBm以下。终端设备采用超小功率向智能锁发送目标消息,缩短了终端设备发送目标消息的传输距离,为基于蓝牙进行无感解锁提供了支撑。相应的,当智能锁与终端设备的距离在超小功率的传输范围内时,才接收到终端设备发送的目标消息,进行解锁,提高了用户无感解锁的安全性。这样,用户无需在终端设备界面中进行解锁操作,实现了用户无感解锁,提高了解锁效率,提升了用户体验。In the Bluetooth-based unlocking method provided by the first aspect, the value of the first transmit power (ultra-low power in this embodiment of the present application) is very small, and the signal transmission distance is limited, usually tens of centimeters. The ultra-low power is less than or equal to the first threshold, and the first threshold includes -50dBm. For example, the first threshold may be below -50dBm to -60dBm. The terminal device uses ultra-low power to send the target message to the smart lock, which shortens the transmission distance for the terminal device to send the target message, and provides support for sensorless unlocking based on Bluetooth. Correspondingly, when the distance between the smart lock and the terminal device is within the transmission range of ultra-low power, the target message sent by the terminal device is received and unlocked, which improves the security of the user's senseless unlocking. In this way, the user does not need to perform an unlocking operation on the interface of the terminal device, which realizes the user's senseless unlocking, improves the unlocking efficiency, and improves the user experience.
一种可能的实现方式中,终端设备生成目标消息之前,还包括:智能锁发送加密信息。相应的,终端设备生成目标消息,包括:终端设备根据加密信息生成目标消息。智能锁根据目标消息解锁,包括:智能锁根据加密信息和目标消息解锁。In a possible implementation manner, before the terminal device generates the target message, it further includes: the smart lock sends encrypted information. Correspondingly, generating the target message by the terminal device includes: generating the target message according to the encrypted information by the terminal device. The smart lock is unlocked according to the target message, including: the smart lock is unlocked according to the encrypted information and the target message.
在该实现方式中,加密信息用于对目标消息进行安全性验证。在手机侧,根据加密信息生成目标消息,提升了目标消息的安全性。在门锁侧,根据加密信息对接收到的目标消息进行安全性验证,验证通过时才执行解锁,提高了门锁解锁的安全性。In this implementation, the encrypted information is used for security verification of the target message. On the mobile phone side, the target message is generated according to the encrypted information, which improves the security of the target message. On the door lock side, the security verification is performed on the received target message according to the encrypted information, and the unlocking is performed only when the verification is passed, which improves the security of the door lock unlocking.
一种可能的实现方式中,终端设备采用第一发射功率向智能锁发送目标消息之前,还包括:终端设备判断终端设备与智能锁的位置是否满足预设条件。相应的,终端设备采用第一发射功率向智能锁发送目标消息,包括:若终端设备与智能锁的位置满足预设条件,则终端设备采用第一发射功率向智能锁发送目标消息。In a possible implementation manner, before the terminal device uses the first transmit power to send the target message to the smart lock, the method further includes: the terminal device determines whether the positions of the terminal device and the smart lock satisfy a preset condition. Correspondingly, the terminal device uses the first transmission power to send the target message to the smart lock, including: if the positions of the terminal device and the smart lock meet the preset conditions, the terminal device uses the first transmission power to send the target message to the smart lock.
在该实现方式中,当终端设备与智能锁的位置满足预设条件时,终端设备发送目标消息,节省了手机功耗。In this implementation manner, when the positions of the terminal device and the smart lock meet the preset conditions, the terminal device sends the target message, which saves the power consumption of the mobile phone.
一种可能的实现方式中,终端设备生成目标消息之前,还包括:智能锁发送智能锁的能力信息;能力信息用于指示智能锁是否支持无感解锁。相应的,终端设备生成目标消息,包括:若智能锁的能力信息指示智能锁支持无感解锁,则终端设备生成目标消息。In a possible implementation manner, before the terminal device generates the target message, it further includes: the smart lock sends capability information of the smart lock; the capability information is used to indicate whether the smart lock supports sensorless unlocking. Correspondingly, the terminal device generates the target message, including: if the capability information of the smart lock indicates that the smart lock supports sensorless unlocking, the terminal device generates the target message.
在该实现方式中,当智能锁的能力信息指示智能锁支持无感解锁时,终端设备生成目标消息,节省了手机功耗。In this implementation manner, when the capability information of the smart lock indicates that the smart lock supports sensorless unlocking, the terminal device generates the target message, which saves the power consumption of the mobile phone.
一种可能的实现方式中,方法还包括:智能锁向终端设备发送响应消息,响应消息用于指示智能锁是否解锁成功。In a possible implementation manner, the method further includes: the smart lock sends a response message to the terminal device, where the response message is used to indicate whether the smart lock is successfully unlocked.
在该实现方式中,智能锁解锁后向终端设备发送响应消息,通知终端设备已解锁,使得解锁流程完整,避免继续执行解锁流程,节省了手机和门锁的功耗。In this implementation manner, after the smart lock is unlocked, a response message is sent to the terminal device to notify the terminal device that it has been unlocked, so that the unlocking process is complete, the continuous unlocking process is avoided, and the power consumption of the mobile phone and the door lock is saved.
第二方面,提供了一种基于蓝牙的解锁方法,应用于终端设备,方法包括:接收智能锁发送的BLE广播消息,识别智能锁;生成目标消息,目标消息用于指示智能锁解锁;采用第一发射功率向智能锁发送目标消息,第一发射功率小于或等于第一阈值,第一阈值包括-50dBm。In a second aspect, a Bluetooth-based unlocking method is provided, which is applied to a terminal device. The method includes: receiving a BLE broadcast message sent by a smart lock to identify the smart lock; generating a target message, where the target message is used to instruct the smart lock to unlock; A transmit power sends a target message to the smart lock, the first transmit power is less than or equal to a first threshold, and the first threshold includes -50dBm.
一种可能的实现方式中,生成目标消息之前,还包括:接收智能锁发送的加密信息。相应的,生成目标消息,包括:根据加密信息生成目标消息。In a possible implementation manner, before generating the target message, the method further includes: receiving encrypted information sent by the smart lock. Correspondingly, generating the target message includes: generating the target message according to the encrypted information.
一种可能的实现方式中,加密信息包括随机数;根据加密信息生成目标消息,包括:根据预设加解密算法对随机数加密,生成加密随机数;生成目标消息,目标消息包括加密随机数和解锁指令。In a possible implementation manner, the encrypted information includes a random number; generating the target message according to the encrypted information includes: encrypting the random number according to a preset encryption and decryption algorithm to generate an encrypted random number; generating a target message, where the target message includes the encrypted random number and the encrypted random number. Unlock command.
在该实现方式中,通过随机数和预设的加解密算法对目标消息进行安全性验证,提高了目标消息的安全性和门锁解锁的安全性。In this implementation, the security of the target message is verified through random numbers and a preset encryption and decryption algorithm, thereby improving the security of the target message and the security of unlocking the door lock.
一种可能的实现方式中,加密信息包括非对称密钥对中的公钥;根据加密信息生成目标消息,包括:使用公钥加密解锁指令,生成加密解锁指令;生成目标消息,目标消息包括加密解锁指令。In a possible implementation manner, the encrypted information includes the public key in the asymmetric key pair; generating the target message according to the encrypted information includes: using the public key to encrypt the unlocking instruction, and generating the encrypted unlocking instruction; generating the target message, and the target message includes the encrypted unlocking instruction. Unlock command.
在该实现方式中,通过非对称密钥对目标消息进行安全性验证,提高了目标消息的安全性和门锁解锁的安全性。In this implementation manner, the security of the target message is verified by the asymmetric key, which improves the security of the target message and the security of unlocking the door lock.
一种可能的实现方式中,加密信息携带在智能锁发送的BLE广播消息中。In a possible implementation manner, the encrypted information is carried in the BLE broadcast message sent by the smart lock.
在该实现方式中,手机采用发送BLE广播消息的方式发送加密信息,手机与门锁之间可以不用建立BLE连接,节省了消息流程。In this implementation, the mobile phone sends encrypted information by sending a BLE broadcast message, and there is no need to establish a BLE connection between the mobile phone and the door lock, which saves the message flow.
一种可能的实现方式中,采用第一发射功率向智能锁发送目标消息之前,还包括:判断终端设备与智能锁的位置是否满足预设条件。相应的,采用第一发射功率向智能锁发送 目标消息,包括:若终端设备与智能锁的位置满足预设条件,则采用第一发射功率向智能锁发送目标消息。In a possible implementation manner, before using the first transmission power to send the target message to the smart lock, the method further includes: judging whether the positions of the terminal device and the smart lock satisfy a preset condition. Correspondingly, using the first transmission power to send the target message to the smart lock includes: if the positions of the terminal device and the smart lock meet the preset conditions, then using the first transmission power to send the target message to the smart lock.
一种可能的实现方式中,判断终端设备与智能锁的位置是否满足预设条件,包括:接收智能锁发送的测距广播消息;判断测距广播消息的信号强度是否满足预设条件。In a possible implementation manner, judging whether the location of the terminal device and the smart lock satisfies a preset condition includes: receiving a ranging broadcast message sent by the smart lock; and judging whether the signal strength of the ranging broadcast message satisfies the preset condition.
在该实现方式中,测距广播消息的信号强度与手机和门锁之间的距离成反比关系。手机与门锁的距离越近,手机接收到的测距广播消息的信号强度越大。手机根据测距广播消息的信号强度是否满足预设条件确定是否发送目标消息,节约了手机功耗。In this implementation, the signal strength of the ranging broadcast message is inversely proportional to the distance between the mobile phone and the door lock. The closer the distance between the mobile phone and the door lock, the stronger the signal strength of the ranging broadcast message received by the mobile phone. The mobile phone determines whether to send the target message according to whether the signal strength of the ranging broadcast message satisfies the preset condition, which saves the power consumption of the mobile phone.
一种可能的实现方式中,智能锁包括至少一个天线,测距广播消息为智能锁通过任意一个天线发送的;判断测距广播消息的信号强度是否满足预设条件,包括:判断测距广播消息的信号强度是否大于预设阈值。In a possible implementation manner, the smart lock includes at least one antenna, and the ranging broadcast message is sent by the smart lock through any antenna; judging whether the signal strength of the ranging broadcast message satisfies a preset condition includes: judging the ranging broadcast message. Whether the signal strength is greater than the preset threshold.
在该实现方式中,如果手机确定测距广播消息的信号强度大于预设阈值,说明手机与门锁之间的距离较近,手机向门锁发送目标消息,节约了手机功耗。In this implementation, if the mobile phone determines that the signal strength of the ranging broadcast message is greater than the preset threshold, it means that 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, saving power consumption of the mobile phone.
一种可能的实现方式中,智能锁包括第一天线和第二天线,智能锁安装在门上时,第一天线位于门的外侧,第二天线位于门的内侧,测距广播消息包括第一测距广播消息和第二测距广播消息,第一测距广播消息为智能锁通过第一天线发送的且包括第一标识信息,第一标识信息用于指示第一天线位于门外,第二测距广播消息为智能锁通过第二天线发送的且包括第二标识信息,第二标识信息用于指示第二天线位于门内;判断测距广播消息的信号强度是否满足预设条件,包括:判断第一测距广播消息的信号强度是否大于第二测距广播消息的信号强度。In a possible implementation, the smart lock includes a first antenna and a second antenna. When the smart lock is installed on the door, the first antenna is located outside the door, the second antenna is located inside the door, and the ranging broadcast message includes the first antenna. The ranging broadcast message and the 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, and the second The 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 in the door; judging whether the signal strength of the ranging broadcast message satisfies the preset conditions, including: Determine 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 outside the door and the signal strength of the second ranging broadcast message corresponding to the antenna inside the door, it can be determined whether the mobile phone is inside or outside the door. When the mobile phone is outside the door, the mobile phone sends the target message to the door lock, which saves the power consumption of the mobile phone.
一种可能的实现方式中,采用第一发射功率向智能锁发送目标消息,包括:采用第一发射功率持续向智能锁发送目标消息,直至达到预设发送时长或达到预设发送次数。In a possible implementation manner, using the first transmission power to send the target message to the smart lock includes: using the first transmission power to continuously send the target message to the smart lock until the preset sending time or the preset number of times of sending is reached.
在该实现方式中,通过手机持续多次发送目标消息,提升了门锁接收到目标消息的成功率,确保了门锁可以解锁。通过设置预设发送时长或预设发送次数,避免了手机一直发送目标消息,节约了能耗,提高了解锁安全性。In this implementation manner, the target message is continuously sent multiple times through the mobile phone, which improves the success rate of the door lock receiving the target message, and ensures that the door lock can be unlocked. By setting the preset sending duration or the preset sending times, the mobile phone is prevented from sending the target message all the time, energy consumption is saved, and unlocking security is improved.
一种可能的实现方式中,目标消息为BLE广播消息。In a possible implementation manner, the target message is a BLE broadcast message.
在该实现方式中,手机采用发送BLE广播消息的方式发送目标消息,手机与门锁之间可以不用建立BLE连接,节省了消息流程。In this implementation, the mobile phone sends the target message by sending a BLE broadcast message, and there is no need to establish a BLE connection between the mobile phone and the door lock, which saves the message flow.
一种可能的实现方式中,生成目标消息之前,还包括:接收智能锁发送的智能锁的能力信息。相应的,生成目标消息,包括:若智能锁的能力信息指示智能锁支持无感解锁,则生成目标消息。In a possible implementation manner, before generating the target message, the method further includes: receiving capability information of the smart lock sent by the smart lock. Correspondingly, generating the target message includes: if the capability information of the smart lock indicates that the smart lock supports sensorless unlocking, generating the target message.
一种可能的实现方式中,方法还包括:接收智能锁发送的响应消息,响应消息用于指示智能锁是否解锁成功。In a possible implementation manner, the method further includes: receiving a response message sent by the smart lock, where the response message is used to indicate whether the smart lock is successfully unlocked.
一种可能的实现方式中,识别智能锁之后,方法还包括:与智能锁建立BLE连接。In a possible implementation manner, after identifying the smart lock, the method further includes: establishing a BLE connection with the smart lock.
第三方面,提供了一种基于蓝牙的解锁方法,应用于智能锁,方法包括:发送BLE广播消息;发送加密信息;接收终端设备发送的目标消息,目标消息用于指示智能锁解锁;根据加密信息和目标消息解锁。In a third aspect, a Bluetooth-based unlocking method is provided, which is applied to a smart lock. The method includes: sending a BLE broadcast message; sending encrypted information; receiving a target message sent by a terminal device, where the target message is used to instruct the smart lock to unlock; Information and target messages unlocked.
一种可能的实现方式中,加密信息包括随机数,目标消息包括加密随机数和解锁指令,加密随机数是终端设备根据预设加解密算法对随机数加密生成的;根据加密信息和目标消息解锁,包括:根据预设加解密算法对加密随机数解密,得到解密随机数;若解密随机数与随机数相同,则根据解锁指令解锁。In a possible implementation manner, the encrypted information includes a random number, the target message includes an encrypted random number and an unlock instruction, and the encrypted random number is generated by the terminal device encrypting the random number according to a preset encryption and decryption algorithm; unlocking is performed according to the encrypted information and the target message. , including: decrypting the encrypted random number according to a preset encryption and decryption algorithm to obtain a decrypted random number; if the decrypted random number is the same as the random number, unlocking according to the unlocking instruction.
一种可能的实现方式中,加密信息包括非对称密钥对中的公钥,目标消息包括加密解锁指令,加密解锁指令是终端设备根据公钥对解锁指令加密生成的;根据加密信息和目标消息解锁,包括:根据非对称密钥对中的私钥对加密解锁指令解密,获得解锁指令;根据解锁指令解锁。In a possible implementation manner, the encrypted information includes the public key in the asymmetric key pair, the target message includes an encrypted unlock instruction, and the encrypted unlock instruction is generated by the terminal device by encrypting the unlock instruction according to the public key; Unlocking includes: decrypting the encrypted unlocking instruction according to the private key in the asymmetric key pair to obtain the unlocking instruction; and unlocking according to the unlocking instruction.
一种可能的实现方式中,加密信息携带在BLE广播消息中。In a possible implementation manner, the encrypted information is carried in the BLE broadcast message.
一种可能的实现方式中,接收终端设备发送的目标消息之前,还包括:发送测距广播消息。In a possible implementation manner, before receiving the target message sent by the terminal device, the method further includes: sending a ranging broadcast message.
一种可能的实现方式中,智能锁包括N个天线,N大于或等于1,发送测距广播消息,包括:通过N个天线中的至少一个天线发送测距广播消息。In a possible implementation manner, the smart lock includes N antennas, where N is greater than or equal to 1, and sending the ranging broadcast message includes: sending the ranging broadcast message through at least one of the N antennas.
一种可能的实现方式中,智能锁包括第一天线和第二天线,智能锁安装在门上时,第一天线位于门的外侧,第二天线位于门的内侧;发送测距广播消息,包括:采用目标功率通过第一天线发送第一测距广播消息,以及,采用目标功率通过第二天线发送第二测距广播消息;第一测距广播消息包括指示第一天线位于门外的第一标识信息,第二测距广播消息包括指示第二天线位于门内的第二标识信息。In a possible implementation, the smart lock includes a first antenna and a second antenna. When the smart lock is installed on the door, the first antenna is located on the outside of the door, and the second antenna is located on the inside of the door; the ranging broadcast message is sent, including: : using the target power to send the first ranging broadcast message through the first antenna, and using the target power to send the second ranging broadcast message through the second antenna; the first ranging broadcast message includes a first ranging broadcast message indicating that the first antenna is located outside the door identification information, the second ranging broadcast message includes second identification information indicating that the second antenna is located in the door.
一种可能的实现方式中,目标消息为终端设备发送的BLE广播消息。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 the target message sent by the terminal device, the method further includes: sending capability information of the smart lock; the capability information is used to indicate whether the smart lock supports sensorless unlocking.
一种可能的实现方式中,方法还包括:向终端设备发送响应消息,响应消息用于指示智能锁是否解锁成功。In a possible implementation manner, the method further includes: sending a response message to the terminal device, where the response message is used to indicate whether the smart lock is successfully unlocked.
一种可能的实现方式中,接收终端设备发送的目标消息之前,还包括:与终端设备建立BLE连接。In a possible implementation manner, before receiving the target message sent by the terminal device, the method further includes: establishing a BLE connection with the terminal device.
第四方面,提供了一种终端设备,包括:接收模块,用于接收智能锁发送的BLE广播消息,识别智能锁;处理模块,用于生成目标消息,目标消息用于指示智能锁解锁;发送模块,用于采用第一发射功率向智能锁发送目标消息,第一发射功率小于或等于第一阈值,第一阈值包括-50dBm。In a fourth aspect, a terminal device is provided, comprising: a receiving module for receiving a BLE broadcast message sent by a smart lock to identify the smart lock; a processing module for generating a target message, the target message being used to instruct the smart lock to unlock; sending The module is configured to send the target message to the smart lock by using a first transmit power, where the first transmit power is less than or equal to a first threshold, and the first threshold includes -50dBm.
一种可能的实现方式中,接收模块还用于接收智能锁发送的加密信息;处理模块具体用于:根据加密信息生成目标消息。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: generate a target message according to the encrypted information.
一种可能的实现方式中,加密信息包括随机数;处理模块具体用于:根据预设加解密算法对随机数加密,生成加密随机数;生成目标消息;目标消息包括加密随机数和解锁指令。In a possible implementation, the encrypted information includes a random number; the processing module is specifically configured to: encrypt the random number according to a preset encryption and decryption algorithm to generate an encrypted random number; generate a target message; the target message includes an encrypted random number and an unlock instruction.
一种可能的实现方式中,加密信息包括非对称密钥对中的公钥;处理模块具体用于:使用公钥加密解锁指令,生成加密解锁指令;生成目标消息;目标消息包括加密解锁指令。In a possible implementation manner, the encrypted information includes the public key in the asymmetric key pair; the processing module is specifically configured to: encrypt the unlocking instruction using the public key to generate the encrypted unlocking instruction; generate a target message; the target message includes the encrypted unlocking instruction.
一种可能的实现方式中,加密信息携带在智能锁发送的BLE广播消息中。In a possible implementation manner, the encrypted information is carried in the BLE broadcast message sent by the smart lock.
一种可能的实现方式中,处理模块还用于:判断终端设备与智能锁的位置是否满足预设条件;若终端设备与智能锁的位置满足预设条件,则控制发送模块采用第一发射功率向 智能锁发送目标消息。In a possible implementation manner, the processing module is further used for: judging whether the position of the terminal device and the smart lock satisfies the preset condition; if the position of the terminal device and the smart lock satisfies the preset condition, then controlling the sending module to use the first transmit power. Send a targeted message to the smart lock.
一种可能的实现方式中,接收模块,还用于接收智能锁发送的测距广播消息;处理模块具体用于:判断测距广播消息的信号强度是否满足预设条件。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: determine whether the signal strength of the ranging broadcast message satisfies a preset condition.
一种可能的实现方式中,智能锁包括至少一个天线,测距广播消息为智能锁通过任意一个天线发送的;处理模块具体用于:判断测距广播消息的信号强度是否大于预设阈值。In a possible implementation, the smart lock includes at least one antenna, and the ranging broadcast message is sent by the smart lock through any antenna; the processing module is specifically configured to: determine whether the signal strength of the ranging broadcast message is greater than a preset threshold.
一种可能的实现方式中,智能锁包括第一天线和第二天线,智能锁安装在门上时,第一天线位于门的外侧,第二天线位于门的内侧,测距广播消息包括第一测距广播消息和第二测距广播消息,第一测距广播消息为智能锁通过第一天线发送的且包括第一标识信息,第一标识信息用于指示第一天线位于门外,第二测距广播消息为智能锁通过第二天线发送的且包括第二标识信息,第二标识信息用于指示第二天线位于门内;处理模块具体用于:判断第一测距广播消息的信号强度是否大于第二测距广播消息的信号强度。In a possible implementation, the smart lock includes a first antenna and a second antenna. When the smart lock is installed on the door, the first antenna is located outside the door, the second antenna is located inside the door, and the ranging broadcast message includes the first antenna. The ranging broadcast message and the 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, and the second The ranging broadcast message is sent by the smart lock through the second antenna and includes second identification information, which is used to indicate that the second antenna is located in the door; the processing module is specifically used to: determine the signal strength of the first ranging broadcast message Whether it is greater than the signal strength of the second ranging broadcast message.
一种可能的实现方式中,发送模块具体用于:采用第一发射功率持续向智能锁发送目标消息,直至达到预设发送时长或达到预设发送次数。In a possible implementation manner, the sending module is specifically configured to: use the first transmit power to continuously send the target message to the smart lock until the preset sending duration or the preset number of times of sending is reached.
一种可能的实现方式中,目标消息为BLE广播消息。In a possible implementation manner, 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: generate a target message if the capability information of the smart lock indicates that the smart lock supports sensorless unlocking.
一种可能的实现方式中,接收模块还用于接收智能锁发送的响应消息,响应消息用于指示智能锁是否解锁成功。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.
一种可能的实现方式中,处理模块还用于与智能锁建立BLE连接。In a possible implementation, the processing module is also used to establish a BLE connection with the smart lock.
第五方面,提供了一种智能锁,包括:发送模块,用于发送BLE广播消息;发送模块还用于发送加密信息;接收模块,用于接收终端设备发送的目标消息,目标消息用于指示智能锁解锁;处理模块,用于根据加密信息和目标消息解锁。In a fifth aspect, a smart lock is provided, comprising: a sending module for sending a BLE broadcast message; the sending module is also used for sending encrypted information; a receiving module for receiving a target message sent by a terminal device, and the target message is used to indicate Smart lock unlocking; processing module for unlocking according to encrypted information and target message.
一种可能的实现方式中,加密信息包括随机数,目标消息包括加密随机数和解锁指令,加密随机数是终端设备根据预设加解密算法对随机数加密生成的;处理模块具体用于:根据预设加解密算法对加密随机数解密,得到解密随机数;若解密随机数与随机数相同,则根据解锁指令解锁。In a possible implementation manner, the encrypted information includes a random number, the target message includes an encrypted random number and an unlock 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 processing module is specifically used for: according to the preset encryption and decryption algorithm. The preset encryption and decryption algorithm decrypts the encrypted random number to obtain the decrypted random number; if the decrypted random number is the same as the random number, it is unlocked according to the unlocking instruction.
一种可能的实现方式中,加密信息包括非对称密钥对中的公钥,目标消息包括加密解锁指令,加密解锁指令是终端设备根据公钥对解锁指令加密生成的;处理模块具体用于:根据非对称密钥对中的私钥对加密解锁指令解密,获得解锁指令;根据解锁指令解锁。In a possible implementation, the encrypted information includes the public key in the asymmetric key pair, the target message includes an encrypted unlocking instruction, and the encrypted unlocking instruction is generated by the terminal device by encrypting the unlocking instruction according to the public key; the processing module is specifically used for: Decrypt the encrypted unlock instruction according to the private key in the asymmetric key pair to obtain the unlock instruction; unlock according to the unlock instruction.
一种可能的实现方式中,加密信息携带在BLE广播消息中。In a possible implementation manner, the encrypted information is carried in the BLE broadcast message.
一种可能的实现方式中,发送模块还用于发送测距广播消息。In a possible implementation manner, the sending module is further configured to send a ranging broadcast message.
一种可能的实现方式中,智能锁包括N个天线,N大于或等于1,发送模块具体用于:通过N个天线中的至少一个天线发送测距广播消息。In a possible implementation manner, the smart lock includes N antennas, where N is greater than or equal to 1, and the sending module is specifically configured to: send a ranging broadcast message through at least one of the N antennas.
一种可能的实现方式中,智能锁包括第一天线和第二天线,智能锁安装在门上时,第一天线位于门的外侧,第二天线位于门的内侧;发送模块具体用于:采用目标功率通过第一天线发送第一测距广播消息,以及,采用目标功率通过第二天线发送第二测距广播消息;第一测距广播消息包括指示第一天线位于门外的第一标识信息,第二测距广播消息包括指示第二天线位于门内的第二标识信息。In a possible implementation, the smart lock includes a first antenna and a second antenna. When the smart lock is installed on the door, the first antenna is located on the outside of the door, and the second antenna is located on the inside of the door; the sending module is specifically used for: using The target power sends the first ranging broadcast message through the first antenna, and uses the target power to send the second ranging broadcast message through the second antenna; the first ranging broadcast message includes first identification information indicating that the first antenna is located outside the door , the second ranging broadcast message includes second identification information indicating that the second antenna is located in the door.
一种可能的实现方式中,目标消息为终端设备发送的BLE广播消息。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 sensorless unlocking.
一种可能的实现方式中,发送模块具体用于:向终端设备发送响应消息,响应消息用于指示智能锁是否解锁成功。In a possible implementation manner, the sending module is specifically configured to: send a response message to the terminal device, where the response message is used to indicate whether the smart lock is unlocked successfully.
一种可能的实现方式中,处理模块还用于:与终端设备建立BLE连接。In a possible implementation manner, the processing module is further configured to: establish a BLE connection with the terminal device.
第六方面,提供一种终端设备,终端设备包括处理器,处理器用于与存储器耦合,并读取存储器中的指令并根据指令使得终端设备执行第二方面提供的方法。In a sixth aspect, a terminal device is provided, the terminal device includes a processor, and the processor is configured to be coupled with a memory, and read instructions in the memory and cause the terminal device to execute the method provided in the second aspect according to the instructions.
第七方面,提供一种智能锁,智能锁包括处理器,处理器用于与存储器耦合,并读取存储器中的指令并根据指令使得智能锁执行第三方面提供的方法。According to a seventh aspect, a smart lock is provided. The smart lock includes a processor, and the processor is coupled to the memory, reads instructions in the memory, and causes the smart lock to execute the method provided in the third aspect according to the instructions.
第八方面,提供一种程序,该程序在被处理器执行时用于执行第二方面或第三方面提供的方法。In an eighth aspect, a program is provided, which when executed by a processor is used to execute the method provided by the second aspect or the third aspect.
第九方面,提供一种计算机可读存储介质,计算机可读存储介质中存储有指令,当指令在计算机或处理器上运行时,实现第二方面或第三方面提供的方法。In a ninth aspect, a computer-readable storage medium is provided, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer or a processor, the methods provided in the second or third aspects are implemented.
第十方面,提供一种程序产品,所述程序产品包括计算机程序,所述计算机程序存储在可读存储介质中,设备的至少一个处理器可以从所述可读存储介质读取所述计算机程序,所述至少一个处理器执行所述计算机程序使得该设备实施第二方面或第三方面提供的方法。In a tenth aspect, a program product is provided, the program product includes a computer program, the computer program is stored in a readable storage medium, and at least one processor of a device can read the computer program from the readable storage medium , the at least one processor executes the computer program so that the device implements the method provided in the second aspect or the third aspect.
附图说明Description of drawings
图1为本申请实施例适用的系统架构图;FIG. 1 is a system architecture diagram to which an embodiment of the application is applicable;
图2为在APP中添加智能设备的一种界面变化示意图;Fig. 2 is a kind of interface change schematic diagram of adding smart device in APP;
图3为在APP中添加门锁信息的一种界面变化示意图;Fig. 3 is a kind of interface change schematic diagram of adding door lock information in APP;
图4为基于蓝牙解锁的一种实现方式的原理示意图;FIG. 4 is a schematic diagram of an implementation method based on Bluetooth unlocking;
图5为本申请实施例提供的基于蓝牙的解锁方法的原理示意图;FIG. 5 is a schematic diagram of the principle of a Bluetooth-based unlocking method provided by an embodiment of the present application;
图6为本申请实施例提供的设置手机和门锁的无感解锁功能的一种界面图;FIG. 6 is an interface diagram for setting the non-sensing unlocking function of a mobile phone and a door lock provided by an embodiment of the present application;
图7为本申请实施例适用的一种应用场景示意图;FIG. 7 is a schematic diagram of an application scenario to which an embodiment of the present application is applicable;
图8为本申请实施例适用的另一种应用场景示意图;FIG. 8 is a schematic diagram of another application scenario applicable to the embodiment of the present application;
图9为本申请实施例适用的又一种应用场景示意图;FIG. 9 is a schematic diagram of another application scenario to which the embodiment of the present application is applicable;
图10为本申请实施例提供的基于蓝牙的解锁方法的一种消息交互图;10 is a message interaction diagram of a Bluetooth-based unlocking method provided by an embodiment of the present application;
图11为本申请实施例提供的基于蓝牙的解锁方法的另一种消息交互图;FIG. 11 is another message interaction diagram of the Bluetooth-based unlocking method provided by the embodiment of the application;
图12为本申请实施例提供的采用GATT协议传输门锁能力信息的一种数据格式示意图;12 is a schematic diagram of a data format for transmitting door lock capability information using the GATT protocol provided by an embodiment of the present application;
图13为本申请实施例提供的基于蓝牙的解锁方法的又一种消息交互图;13 is another message interaction diagram of the Bluetooth-based unlocking method provided by the embodiment of the application;
图14为本申请实施例提供的基于蓝牙的解锁方法的又一种消息交互图;14 is another message interaction diagram of the Bluetooth-based unlocking method provided by the embodiment of the application;
图15为本申请实施例提供的门锁天线的一种位置示意图;FIG. 15 is a schematic position diagram of a door lock antenna provided by an embodiment of the application;
图16为本申请实施例提供的终端设备的一种结构示意图;FIG. 16 is a schematic structural diagram of a terminal device provided by an embodiment of the application;
图17为本申请实施例提供的智能锁的一种结构示意图;17 is a schematic structural diagram of a smart lock provided by an embodiment of the application;
图18为本申请实施例提供的电子设备的一种结构示意图。FIG. 18 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图描述本申请实施例。The embodiments of the present application are described below with reference to the accompanying drawings.
本申请实施例提供的基于蓝牙的解锁方法,应用于基于蓝牙对智能锁进行解锁的场景。示例性的,图1为本申请实施例适用的系统架构图。如图1所示,系统可以包括终端设备100和智能锁200。终端设备100与智能锁200可以进行蓝牙通信。终端设备100上安装有用于管理智能锁200的应用程序(application,APP),本申请实施例对应用程序的名称和开发方不做限定。The Bluetooth-based unlocking method provided by the embodiments of the present application is applied to a scenario of unlocking a smart lock based on Bluetooth. Exemplarily, FIG. 1 is a system architecture diagram to which this embodiment of the present application is applicable. 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. An application (application, APP) for managing the smart lock 200 is installed on the terminal device 100, and the name and developer of the application are not limited in this embodiment of the present application.
本申请实施例对终端设备100的类型不做限定。例如,一些终端设备的举例为:手机、平板电脑、笔记本电脑、掌上电脑、可穿戴设备等。This embodiment of the present application does not limit the type of the terminal device 100 . For example, examples of some terminal devices are: mobile phones, tablet computers, notebook computers, handheld computers, wearable devices, and the like.
本申请实施例对智能锁200的类型、形状、结构和包括的具体部件不做限定。例如,一些智能锁的举例为:智能门锁、智能车锁、智能挂锁等。可选的,如图1所示,智能锁200可以包括但不限于下列中的至少一项:密码盘201或指纹触摸屏202。可选的,密码盘201可以为物理按键密码盘,也可以为电子密码盘。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: smart door locks, smart car locks, smart padlocks, and the like. Optionally, as shown in FIG. 1 , the smart lock 200 may include, but is not limited to, at least one of the following: a password pad 201 or a fingerprint touch screen 202 . Optionally, the password pad 201 may be a physical key password pad, or an electronic password pad.
为了方便说明,本申请实施例以智能锁为门锁、终端设备为手机为示例进行说明。For the convenience of description, the embodiments of the present application are described by taking the smart lock as the door lock and the terminal device as the mobile phone as an example.
可选的,本申请实施例中的蓝牙通信为低功耗蓝牙(bluetooth low energy,BLE)通信。Optionally, the Bluetooth communication in this embodiment of the present application is Bluetooth low energy (bluetooth low energy, BLE) communication.
首先,对手机上安装的管理智能锁的APP进行示例性说明。First, the APP for managing smart locks installed on the mobile phone is exemplarily explained.
用户可以在APP中增加智能设备。示例性的,图2为在APP中添加智能设备的一种界面变化示意图。在本示例中,APP可以管理多类智能设备,例如,智能锁、网关、智能家电等。可选的,在其他示例中,不同的智能锁对应不同的APP,例如,不同厂家的智能锁配套有相应的APP。如图2中的(a)所示,手机的桌面11中包括多个APP图标。用户点击图标12,打开智慧生活应用。相应的,手机响应用户点击图标12的操作,运行智慧生活应用,显示智慧生活应用的主界面13,如图2中的(b)所示。在智慧生活应用的主界面13中,下方的菜单区域14包括:家居、商城、场景和我的共计4种菜单。可选的,手机运行智慧生活应用后,系统默认当前显示的“家居”界面为主界面13。当前,智慧生活应用未添加任何智能设备,设备数量为0。用户可以点击主界面13中右上角的控件15,添加智能设备。相应的,手机响应用户点击控件15的操作,在主界面13中显示窗口16,如图2中的(c)所示。窗口16中包括:添加设备、创建场景、共享设备和连接三方平台共计4种菜单。用户点击“添加设备”菜单17,继续在APP中添加智能设备。相应的,手机响应用户点击“添加设备”菜单17的操作,在主界面13中显示提示窗口18,如图2中的(d)所示。用户通过查看提示窗口18中的提示进行下一步的操作。例如,提示为““智慧生活”需要开启蓝牙,以发现和添加蓝牙设备。是否开启?”。用户点击提示窗口18中的“开启”按键19,继续在APP中添加智能设备。相应的,手机响应用户点击“开启”按键19的操作,显示添加设备的主界面20,如图2中的(e)所示。添加设备的主界面20中包括提示窗口21,用户通过查看提示窗口21中的提示进行下一步的操作。例如,提示为“自动扫描功能需要开启手机定位服务才可以使用”,用户点击提示窗口21中的“去开启”按键22,开启手机定位服务。相应的,手机响应用户点击“去开启”按键22的操作,开启手机定位服务,并基于蓝牙扫描手机周围是否存在智能设备。在手机扫描过程中,界面变化可以参见图2中的(f)所示,添加设备的主界面20中包括提示信息,例如,“正在 扫描,请确保智能设备已连接电源,且位于手机附近”。可选的,主界面20中图案23中的扫描区域24可以绕圆心转动,呈现动画效果,动态的提示用户手机当前在扫描发现智能设备。可选的,主界面20中还提供了其他添加智能设备的方式,例如,用户可以点击下方的“手动添加”按键25,实现手动添加智能设备;或者,用户可以点击下方的“扫码添加”按键26,通过扫描智能设备的标识码添加智能设备。当手机扫描结束后,会将可连接的智能设备显示出来,如图2中的(g)所示,主界面20中包括手机扫描发现的门锁001,用户可以点击“连接”按键27,建立手机与门锁001之间的蓝牙连接。相应的,手机响应用户点击“连接”按键27的操作,与门锁001之间建立蓝牙连接,完成添加智能设备。之后,如图2中的(h)所示,用户可以点击添加设备的主界面20中的返回控件28,显示智慧生活应用的主界面。相应的,手机响应用户点击返回控件28的操作,显示智慧生活应用的主界面13,如图2中的(i)所示。此时,主界面13中显示了智慧生活应用添加的智能设备为1个,具体为门锁001。Users can add smart devices to the APP. Exemplarily, FIG. 2 is a schematic diagram of an interface change of adding a smart device to an APP. In this example, the APP can manage multiple types of smart devices, such as smart locks, gateways, and smart home appliances. 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 (a) of FIG. 2 , the desktop 11 of the mobile phone includes a plurality of APP icons. The user clicks the icon 12 to open the smart life application. Correspondingly, the mobile phone responds to the user's operation of clicking the icon 12, runs the smart life application, and displays the main interface 13 of the smart life application, as shown in (b) of FIG. 2 . In the main interface 13 of the smart life application, the lower menu area 14 includes a total of four menus: Home, Mall, Scene and My. Optionally, after the mobile phone runs the smart life application, the system defaults the currently displayed “home” interface as the main interface 13 . Currently, the smart life application has not added any smart devices, and the number of devices is 0. The user can click the control 15 in the upper right corner of the main interface 13 to add a smart device. Correspondingly, the mobile phone displays the window 16 in the main interface 13 in response to the user's operation of clicking the control 15, as shown in (c) of FIG. 2 . The window 16 includes: adding a device, creating a scene, sharing a device, and connecting a three-party platform, a total of 4 menus. The user clicks the "Add Device" menu 17 to continue adding smart devices to the APP. Correspondingly, the mobile 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 (d) of FIG. 2 . The user proceeds to the next step by viewing the prompts in the prompt window 18 . For example, the prompt is ""Smart Life" needs to turn on Bluetooth to discover and add Bluetooth devices. Is it turned on?". The user clicks the "Enable" button 19 in the prompt window 18 to continue adding the smart device to the APP. Correspondingly, the mobile phone displays the main interface 20 for adding a device in response to the user's operation of clicking the "ON" button 19, as shown in (e) of FIG. 2 . The main interface 20 of adding a device includes a prompt window 21 , and the user performs the next operation by viewing the prompt in the prompt window 21 . For example, if the prompt is "the automatic scanning function can be used only after the mobile phone location service is enabled", the user clicks the "deactivate" button 22 in the prompt window 21 to enable the mobile phone location service. Correspondingly, the mobile phone responds to the user's operation of clicking the "deactivate" button 22, starts the mobile phone location service, and scans whether there are smart devices around the mobile phone based on Bluetooth. During the scanning process of the mobile phone, the interface changes can be seen in (f) of Figure 2. The main interface 20 of adding a device includes prompt information, for example, "Scanning, 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 can be rotated around the center of the circle to present an animation effect, dynamically prompting the user that the mobile phone is currently scanning to find a smart device. Optionally, other ways of adding smart devices are also provided in the main interface 20. For example, the user can click the “manually add” button 25 below to manually add the smart device; or, the user can click the “scan code to add” button below. Press button 26 to add a smart device by scanning the identification code of the smart device. When the mobile phone scan is completed, the connectable smart devices will be displayed. As shown in (g) in Figure 2, the main interface 20 includes the door lock 001 found by the mobile phone scan. The user can click the "connect" button 27 to establish Bluetooth connection between mobile phone and door lock 001. Correspondingly, in response to the user's operation of clicking the "connect" button 27, the mobile phone establishes a Bluetooth connection with the door lock 001 to complete the addition of the smart device. Afterwards, as shown in (h) of FIG. 2 , the user can click the return control 28 in the main interface 20 of adding a device to display the main interface of the smart life application. Correspondingly, the mobile phone displays the main interface 13 of the smart life application in response to the user's operation of clicking the return control 28 , as shown in (i) in FIG. 2 . At this time, the main interface 13 displays that the number of smart devices added by the smart life application is one, specifically the door lock 001 .
可选的,用户可以在APP中配置智能设备的相关信息,本申请实施例对相关信息的具体内容不做限定。示例性的,图3为在APP中添加门锁信息的一种界面变化示意图。如图3中的(a)所示,手机当前显示我的设备的主界面31,本示例对用户在APP中操作从而跳转显示主界面31的过程不做限定。假设,APP中添加的智能设备有3个,包括门锁001、门锁002和家里的网关1,主界面31中显示这3个设备。用户可以点击门锁001,查看门锁001的相关信息。相应的,手机响应用户点击门锁001的操作,显示门锁001的主界面32,如图3中的(b)所示。门锁001的主界面32中可以包括提示信息,例如,“将手机靠近门锁,点亮密码面板后点击配置按钮”,用于配置门锁信息,例如,门锁名称、门锁相关功能的打开与关闭等。还可以包括指纹管理按键33、密码管理按键34和开锁记录按键35。用户可以点击不同的按键进行不同的操作。例如,用户通过点击指纹管理按键33添加用户的指纹信息、通过点击密码管理按键34为门锁001设置密码,或者,通过点击开锁记录按键35查看门锁001的历史开锁记录。Optionally, the user may configure the relevant information of the smart device in the APP, and the specific content of the relevant information is not limited in this embodiment of the present application. Exemplarily, FIG. 3 is a schematic diagram of an interface change for adding door lock information in an APP. As shown in (a) of FIG. 3 , the mobile phone currently displays the main interface 31 of my device. This example does not limit the process of the user operating in the APP to jump to display the main interface 31 . Suppose, there are 3 smart devices added in the APP, including door lock 001, door lock 002 and gateway 1 at home, and these 3 devices are displayed in the main interface 31. The user can click the door lock 001 to view the relevant information of the door lock 001. Correspondingly, in response to the user's operation of clicking the door lock 001, the mobile phone displays the main interface 32 of the door lock 001, as shown in (b) of FIG. 3 . The main interface 32 of the door lock 001 may include prompt information, for example, "bring the mobile phone close to the door lock, light up the password panel and click the configuration button", which is used to configure the door lock information, such as the door lock name, door lock related functions Open and close, etc. It may also include a fingerprint management button 33 , a password management button 34 and an unlock record button 35 . Users can click different buttons to perform different operations. For example, the user adds the user's fingerprint information by clicking the fingerprint management button 33, sets a password for the door lock 001 by clicking the password management button 34, or checks the historical unlocking record of the door lock 001 by clicking the unlocking record button 35.
需要说明,图2和图3仅是示例,并不对管理智能锁的APP及相关界面形成限定。It should be noted that FIG. 2 and FIG. 3 are only examples, and do not limit the APP and related interfaces for managing smart locks.
用户打开门锁时,一种实现方式为,用户在APP的相关界面中点击解锁按键进行开锁。示例性的,图4为基于蓝牙解锁的一种实现方式的原理示意图。如图4所示,当用户要打开门锁400时,用户点击手机300的桌面41中的图标42,运行门锁APP。相应的,手机300响应用户点击图标42的操作,运行门锁APP,与门锁400建立蓝牙连接,并显示界面43。界面43中包括解锁按键44。其中,本申请实施例对用户在APP中操作从而跳转显示界面43的过程不做限定。用户点击解锁按键44,相应的,手机300响应用户点击解锁按键44的操作,向门锁400发送解锁指令。门锁400根据解锁指令开锁,用户旋转门把手开锁。When the user unlocks the door, an implementation method is that the user clicks the unlock button on the relevant interface of the APP to unlock the door. Exemplarily, FIG. 4 is a schematic schematic diagram of an implementation manner of unlocking based on Bluetooth. As shown in FIG. 4 , when the user wants to open the door lock 400 , the user clicks the icon 42 on the desktop 41 of the mobile phone 300 to run the door lock APP. Correspondingly, the mobile phone 300 responds to the user's operation of clicking the icon 42 , runs the door lock APP, establishes a Bluetooth connection with the door lock 400 , and displays the interface 43 . The interface 43 includes an unlock button 44 . Wherein, 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 operation of the user clicking the unlock button 44 . The door lock 400 is unlocked according to the unlocking instruction, and the user turns the door handle to unlock.
需要说明,本申请实施例对解锁按键所在的界面不做限定,不同APP中的实现方式不同。可选的,在另一个示例中,如图3中的(a)所示,主界面31中包括每个门锁的解锁按键。例如,门锁001的解锁按键为按键36,用户可以点击按键36对门锁001解锁。It should be noted that the embodiment of the present application does not limit the interface where the unlock button is located, and the implementation manners in different APPs are different. Optionally, in another example, as shown in (a) of FIG. 3 , the main interface 31 includes an unlock button for each door lock. For example, the unlock button of the door lock 001 is the button 36 , and the user can click the button 36 to unlock the door lock 001 .
可见,在上述实现方式中,解锁需要用户参与操作。It can be seen that, in the above implementation manner, the unlocking requires the user to participate in the operation.
本申请实施例提供一种基于蓝牙的解锁方法,终端设备与门锁进行蓝牙通信时,具有 两种发射功率,可以分别称为正常功率和超小功率。相比于正常功率,超小功率的数值很小,信号传输距离有限,通常为几十厘米。终端设备采用超小功率向门锁发送解锁指令,采用正常功率向门锁发送其他数据。示例性的,图5为本申请实施例提供的基于蓝牙的解锁方法的原理示意图。如图5所示,用户随身携带手机300,手机300采用正常功率进行蓝牙通信的范围标记为范围51,采用超小功率进行蓝牙通信的范围标记为范围52,范围51大于范围52。当手机300与门锁400位于范围51内时,手机300与门锁400可以传输其他数据。当手机300与门锁400之间的距离足够小,在范围52内时,门锁400才可以接收到手机300发送的解锁指令。手机通过设置超小功率,缩短了手机发送解锁指令的传输距离,从而为基于蓝牙进行无感解锁提供了支撑,提高了用户无感解锁的安全性。这样,用户无需在手机界面中进行解锁操作,手机采用超小功率向门锁发送解锁指令,相应的,门锁根据接收到的解锁指令安全解锁,实现了用户无感解锁,提高了解锁效率,提升了用户体验。An embodiment of the present application provides a Bluetooth-based unlocking method. When a terminal device communicates with a door lock via Bluetooth, there are two types of transmit power, which can be called normal power and ultra-low power, respectively. Compared with normal power, the value of ultra-low power is very small, and the signal transmission distance is limited, usually tens of centimeters. The terminal device uses ultra-low power to send unlock commands to the door lock, and uses normal power to send other data to the door lock. Exemplarily, FIG. 5 is a schematic schematic diagram of the principle of a Bluetooth-based unlocking method provided by an embodiment of the present application. As shown in FIG. 5 , the user carries a mobile phone 300 , the range of the mobile phone 300 for Bluetooth communication using normal power is marked as range 51 , and the range for Bluetooth communication using ultra-low power is marked as range 52 , and range 51 is greater than range 52 . When the mobile phone 300 and the door lock 400 are located 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 and within the range 52 , the door lock 400 can receive the unlocking instruction sent by the mobile phone 300 . By setting the ultra-low power, the mobile phone shortens the transmission distance of the unlock command sent by the mobile phone, thus providing support for the non-inductive unlocking based on Bluetooth, and improving the security of the user's non-inductive unlocking. In this way, the user does not need to perform the unlocking operation in the mobile phone interface, and the mobile phone uses ultra-low power to send the unlocking command to the door lock. Correspondingly, the door lock is safely unlocked according to the received unlocking command, which realizes the user's non-sensing unlocking and improves the unlocking efficiency. Improved user experience.
下面,对本申请实施例涉及的概念进行说明。Next, the concepts involved in the embodiments of the present application will be described.
1、正常功率和超小功率1. Normal power and ultra-low power
正常功率是指终端设备在现有蓝牙通信中使用的功率。超小功率是指为了确保无感解锁的安全性而采用小数值发射功率向门锁发送解锁指令。技术原理可以参见图5。The normal power refers to the power used by the terminal device in the existing Bluetooth communication. Ultra-low power refers to the use of fractional transmit power to send unlock commands to the door lock in order to ensure the safety of non-inductive unlocking. The technical principle can be seen in Figure 5.
可选的,手机可以采用超小功率向门锁发送与解锁指令相关的其他信息,用于门锁进一步验证接收到的解锁指令是否正确、完整,进一步提高了无感解锁的安全性。其中,本申请实施例对其他信息的具体内容不做限定。Optionally, the mobile phone can use ultra-low power to send other information related to the unlocking instruction to the door lock, which is used for the door lock to further verify whether the received unlocking instruction is correct and complete, which further improves the security of non-sensing unlocking. The specific content of other information is not limited in the embodiments of the present application.
需要说明,本申请实施例对超小功率的取值或取值范围不做限定。可以理解,超小功率的取值越小,信号的传输距离越短,基于蓝牙的无感解锁的安全性越高。可选的,超小功率可以在-50dBm~-60dBm以下,使得门锁与终端设备距离几十厘米范围内才可以接收到解锁指令,例如,门锁与终端设备距离30厘米~50厘米以下。It should be noted that the embodiment of the present application does not limit the value or the value range of the ultra-low power. It can be understood that the smaller the value of the ultra-low power, the shorter the signal transmission distance, and the higher the security of the Bluetooth-based sensorless unlocking. Optionally, the ultra-low power can be below -50dBm to -60dBm, so that the unlocking command can be received only within a range of several tens of centimeters between the door lock and the terminal device. For example, the distance between the door lock and the terminal device is less than 30cm to 50cm.
需要说明,本申请实施例对正常功率和超小功率的名称不做限定。可选的,超小功率也称为第一发射功率,正常功率也称为第二发射功率。It should be noted that the embodiments of the present application do not limit the names of normal power and ultra-low power. Optionally, the ultra-low power is also referred to as the first transmission power, and the normal power is also referred to as the second transmission power.
2、终端设备的无感解锁功能2. Non-sensing unlocking function of terminal equipment
无感解锁是指当用户需要打开门锁时,不需要用户参与解锁操作。对于用户而言,门锁的解锁是无感知的,可以提升用户感受。比如,在图4所示场景中,用户需要点击解锁按键解锁,就不是无感解锁。Sensorless unlocking means that when the user needs to unlock the door, the user does not need to participate in the unlocking operation. For the user, the unlocking of the door lock is imperceptible, which can improve the user's experience. For example, in the scenario shown in Figure 4, the user needs to click the unlock button to unlock, which is not a senseless unlock.
终端设备的无感解锁功能是指终端设备可以采用超小功率向智能门锁发送解锁指令。本申请实施例对无感解锁功能的名称不做限定。The sensorless unlocking function of the terminal device means that the terminal device can use ultra-low power to send unlocking instructions to the smart door lock. This embodiment of the present application does not limit the name of the sensorless unlocking function.
可选的,在一种实现方式中,终端设备默认支持无感解锁功能。Optionally, in an implementation manner, the terminal device supports the sensorless unlocking function by default.
可选的,在另一种实现方式中,可以由用户打开或关闭终端设备的无感解锁功能。本申请实施例对用户的设置方式不做限定。例如,可以通过语音、预设手势或在相关显示界面中的操作进行设置。Optionally, in another implementation manner, the user can turn on or turn off the sensorless unlocking function of the terminal device. This embodiment of the present application does not limit the setting manner of the user. For example, it can be set by voice, preset gestures or operations in the relevant display interface.
3、门锁的无感解锁功能3. The non-sensing unlocking function of the door lock
门锁的无感解锁功能是指不需要用户参与解锁操作的情况下可以解锁的功能。The non-sensing unlocking function of the door lock refers to the function that can be unlocked without the user's participation in the unlocking operation.
可选的,在一种实现方式中,门锁默认支持无感解锁功能。Optionally, in an implementation manner, the door lock supports the sensorless unlocking function by default.
可选的,在另一种实现方式中,可以由用户在管理门锁的APP中打开或关闭门锁的无感解锁功能。本申请实施例对用户的设置方式不做限定。例如,可以通过语音、预设手势或在相关显示界面中的操作进行设置。Optionally, in another implementation manner, the user can enable or disable the sensorless unlocking function of the door lock in the APP that manages the door lock. This embodiment of the present application does not limit the setting manner of the user. For example, it can be set by voice, preset gestures or operations in the relevant display interface.
示例性的,图6为本申请实施例提供的设置手机和门锁的无感解锁功能的一种界面图。接续图3中的(b),用户点击控件37,显示门锁001的更多信息。相应的,手机响应用户点击控件37的操作,显示界面61,如图6中的(a)所示。界面61中包括门锁001的更多信息,例如,设备名称、质保信息、设备信息和版本升级。界面61中还包括解绑设备按键62,用户可以点击按键62,将手机与门锁001解绑。界面61中还包括无感解锁功能的开关控件63,用于设置手机和门锁001的无感解锁功能。可选的,开关控件63的不同显示形态可以指示无感解锁功能是打开还是关闭。当前,手机和门锁001的无感解锁功能为关闭状态。用户可以点击开关控件63,相应的,手机响应于用户的点击操作,打开手机和门锁001的无感解锁功能,开关控件63的显示形态发生变化,如图6中的(b)所示。Exemplarily, FIG. 6 is an interface diagram for setting the sensorless unlocking function of a mobile phone and a door lock according to an embodiment of the present application. Continuing with (b) in FIG. 3 , the user clicks on the control 37 to display more information of the door lock 001 . Correspondingly, the mobile phone displays an interface 61 in response to the user's operation of clicking on the control 37, as shown in (a) of FIG. 6 . The interface 61 includes more information of the door lock 001, such as device name, warranty information, device information and version upgrade. The interface 61 also includes an unbind device button 62 , and the user can click the button 62 to unbind the mobile phone from the door lock 001 . The interface 61 also includes a switch control 63 for the sensorless unlocking function, which is used to set the sensorless unlocking function of the mobile phone and the door lock 001 . Optionally, different display forms of the switch control 63 may indicate whether the sensorless unlocking function is on or off. Currently, the sensorless unlocking function of the mobile phone and door lock 001 is disabled. The user can click the switch control 63. Correspondingly, in response to the user's click operation, the mobile phone enables the sensorless unlocking function of the mobile phone and the door lock 001, and the display form of the switch control 63 changes, as shown in (b) of FIG. 6 .
需要说明,图6仅是示例,并不对设置手机和门锁的无感解锁功能的方式形成限定。可选的,手机和门锁的无感解锁功能可以分别设置,也可以如图6中所示的一键设置。It should be noted that FIG. 6 is only an example, and does not limit the manner of setting the sensorless unlocking function of the mobile phone and the door lock. Optionally, the sensorless unlocking functions of the mobile phone and the door lock can be set separately, or can be set with one key as shown in FIG. 6 .
下面,对本申请实施例适用的应用场景进行举例说明,但并不对应用场景形成限定。In the following, the application scenarios to which the embodiments of the present application are applicable are illustrated by examples, but the application scenarios are not limited.
可选的,在一个示例中,图7为本申请实施例适用的一种应用场景示意图,示出了用户进门前携带手机与门锁之间的距离逐渐缩小的过程。如图7中的(a)所示,用户A携带手机A在位置0处,用户A与门锁之间的距离太远,超出了手机A正常功率下的蓝牙通信范围,手机A无法与门锁进行蓝牙通信。如图7中的(b)所示,随着用户A向门锁移动,手机A与门锁之间的距离缩小,用户A在位置1时,手机A可以采用正常功率与门锁进行蓝牙通信,但是手机A采用超小功率无法与门锁进行蓝牙通信。其中,范围52示出了手机A采用超小功率进行蓝牙通信的范围。此时,若手机A采用超小功率向门锁发送解锁指令,门锁不会接收到该解锁指令,无法解锁。如图7中的(c)所示,随着用户A继续向门锁移动,手机A与门锁之间的距离继续缩小。图7中的(c)与图7中的(b)相似,手机A采用超小功率无法与门锁进行蓝牙通信。如图7中的(d)所示,随着用户A继续向门锁移动,用户A在位置3时,手机A可以采用正常功率与门锁进行蓝牙通信,也可以采用超小功率与门锁进行蓝牙通信。此时,手机A采用超小功率向门锁发送解锁指令,门锁接收到该解锁指令,可以解锁。Optionally, in an example, FIG. 7 is a schematic diagram of an application scenario to which the embodiment of the present application is applied, and shows a process in which the distance between the mobile phone carried by the user and the door lock is gradually reduced before entering the door. As shown in (a) of Figure 7, user A carries mobile phone A at position 0, and the distance between user A and the door lock is too far, which exceeds the Bluetooth communication range under normal power of mobile phone A, and mobile phone A cannot communicate with the door. The lock communicates via Bluetooth. As shown in (b) in Figure 7, as user A moves towards the door lock, the distance between mobile phone A and the door lock decreases. When user A is in position 1, mobile phone A can use normal power to communicate with the door lock via Bluetooth. , but mobile phone A cannot communicate with the door lock via Bluetooth using ultra-low power. The range 52 shows the range in which the mobile phone A uses ultra-low power for Bluetooth communication. At this time, if mobile phone A uses ultra-low power to send an unlock command to the door lock, the door lock will not receive the unlock command and cannot be unlocked. As shown in (c) of FIG. 7 , 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. (c) in FIG. 7 is similar to (b) in FIG. 7 , the mobile phone A cannot perform Bluetooth communication with the door lock using ultra-low power. As shown in (d) in Figure 7, as user A continues to move toward the door lock, when user A is at position 3, mobile phone A can use normal power to communicate with the door lock via Bluetooth, or use ultra-low power to communicate with the door lock. for Bluetooth communication. At this time, mobile phone A sends an unlocking command to the door lock using ultra-low power, and the door lock can unlock after receiving the unlocking command.
可选的,在另一个示例中,图8为本申请实施例适用的另一种应用场景示意图,示出了用户从门外进入门内,将手机放置在门锁附近的场景。图8中的(a)与图7中的(d)相同,此处不再赘述。如图8中的(b)所示,用户A进门后将手机A放置在门锁附近,门锁位于手机A采用超小功率进行蓝牙通信的范围52内,手机A可以采用正常功率与门锁进行蓝牙通信,也可以采用超小功率与门锁进行蓝牙通信。可选的,如图8中的(c)所示,如果手机A确定当前位于门内,不需要开锁,则不会采用超小功率向门锁发送解锁指令,节约了手机A的功耗,也进一步提升了无感解锁的安全性。Optionally, in another example, FIG. 8 is a schematic diagram of another application scenario applicable to the embodiment of the present application, which shows a scenario in which the user enters the door from outside the door and places the mobile phone near the door lock. (a) in FIG. 8 is the same as (d) in FIG. 7 and will not be repeated here. As shown in (b) in Figure 8, after user A enters the door, user A places mobile phone A near the door lock, and the door lock is located within the range 52 where mobile phone A uses ultra-low power for Bluetooth communication. Mobile phone A can use normal power to communicate with the door lock. For Bluetooth communication, ultra-low power can also be used for Bluetooth communication with the door lock. Optionally, as shown in (c) in FIG. 8 , if the mobile phone A is determined to be currently in the door and does not need to be unlocked, the ultra-low power will not be used to send the unlocking command to the door lock, which saves the power consumption of the mobile phone A. It also further improves the security of non-sensing unlocking.
可选的,在又一个示例中,图9为本申请实施例适用的又一种应用场景示意图,示出了存在中继攻击风险的场景。如图9所示,包括2个攻击者,标识为攻击者1和攻击者2。用户A与门锁之间的距离较远,手机A可以采用正常功率与门锁进行蓝牙通信,采用超小 功率无法与门锁进行蓝牙通信。攻击者1携带中继设备位于用户A附近,用于截获手机A向门锁发送的信息,并将截获的信息发送给攻击者2携带的手机2。攻击者2携带手机2位于门锁附近,手机2利用截获到的信息与门锁通信,造成危险。在该场景中,由于手机A采用超小功率进行蓝牙通信的范围52较小,例如几十厘米,而攻击者1与用户A的距离通常不会小于几十厘米,因此中继设备截获不到手机A发送的解锁指令,解决了中继设备截获解锁指令的风险,提高了门锁的安全性,成功防御了中继攻击。Optionally, in yet another example, FIG. 9 is a schematic diagram of yet another application scenario to which the embodiment of the present application is applied, and illustrates a scenario in which there is a risk of a relay attack. As shown in Figure 9, there are 2 attackers, identified as attacker 1 and attacker 2. The distance between user A and the door lock is relatively far. Mobile phone A can use normal power to communicate with the door lock via Bluetooth, but cannot communicate with the door lock using ultra-low power. Attacker 1 carries a relay device located near user A, which is used to intercept the information sent by mobile phone A to the door lock, and send the intercepted information to mobile phone 2 carried by attacker 2. The attacker 2 carries the mobile phone 2 and is located near the door lock. The mobile phone 2 uses the intercepted information to communicate with the door lock, causing danger. In this scenario, since the range 52 of mobile phone A using ultra-low power for Bluetooth communication is small, such as tens of centimeters, and the distance between attacker 1 and user A is usually not less than tens of centimeters, the relay device cannot intercept it. The unlock command sent by mobile phone A solves the risk of the relay device intercepting the unlock command, improves the security of the door lock, and successfully defends against relay attacks.
下面通过具体的实施例对本申请的技术方案进行详细说明。下面的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。The technical solutions of the present application will be described in detail below through specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
本申请实施例中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。The terms "first", "second", "third", "fourth", etc. (if any) in the embodiments of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. .
图10为本申请实施例提供的基于蓝牙的解锁方法的一种消息交互图。本实施例涉及的执行主体包括手机和门锁。如图10所示,本实施例提供的基于蓝牙的解锁方法,可以包括:FIG. 10 is a message interaction diagram of a Bluetooth-based unlocking method provided by an embodiment of the present application. The executive body involved in this embodiment includes a mobile phone and a door lock. As shown in FIG. 10 , the Bluetooth-based unlocking method provided in this embodiment may include:
S1001、门锁发送BLE广播消息。S1001, the door lock sends a BLE broadcast message.
S1002、手机进行BLE扫描。S1002, the mobile phone performs BLE scanning.
具体的,手机和门锁需要开启蓝牙功能。本实施例对S1001和S1002的执行顺序不做限定,门锁可以长时间发送BLE广播消息,手机可以长时间进行BLE后台扫描。如果手机接收到门锁发送的BLE广播消息,BLE广播消息中包括门锁的身份信息,可以根据BLE广播消息识别出门锁。Specifically, the mobile phone and the door lock need to have the Bluetooth function turned on. This embodiment does not limit the execution order of S1001 and S1002. The door lock can send BLE broadcast messages for a long time, and the mobile phone can perform BLE background scanning for a long time. If the mobile phone receives the BLE broadcast message sent by the door lock, the BLE broadcast message includes the identity information of the door lock, and the door lock can be identified according to the BLE broadcast message.
其中,蓝牙广播和扫描可以参见蓝牙标准协议Core v5.2 Vol6 PartD 3/4/5,本实施例不做详细说明。Among them, the Bluetooth broadcast and scanning 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、手机生成目标消息,目标消息用于指示门锁进行解锁。S1003, the mobile phone generates a target message, and the target message is used to instruct the door lock to unlock.
其中,目标消息包括手机的身份信息和门锁的身份信息,本实施例对身份信息的实现方式不做限定,例如,设备的标识信息或者地址。The target message includes the identity information of the mobile phone and the identity information of the door lock. This embodiment does not limit the implementation of the identity information, for example, the identification information or address of the device.
由于手机之前添加门锁,例如图2所示的过程,手机与门锁建立蓝牙连接且进行了初次配对认证流程,手机和门锁相互之间保存有对方信息。通过手机的身份信息和门锁的身份信息,目标消息指示门锁进行解锁,相应的,门锁可以确定目标消息指示自己解锁。Since the door lock is added before the mobile phone, such as the process shown in Figure 2, the mobile phone and the door lock establish a Bluetooth connection and perform the initial pairing authentication process, and the mobile phone and the door lock save each other's information. Through the identity information of the mobile phone and the identity information of the door lock, the target message instructs the door lock to unlock, and accordingly, the door lock can determine the target message to instruct itself to unlock.
可选的,目标消息可以包括解锁指令,解锁指令用于指示门锁进行解锁。Optionally, the target message may include an unlocking instruction, where the unlocking instruction is used to instruct the door lock to be unlocked.
S1004、手机采用超小功率向门锁发送目标消息。S1004, the mobile phone uses ultra-low power to send the target message to the door lock.
其中,超小功率可以参见上面描述,此处不再赘述。手机与门锁之间的距离较远时,门锁接收不到目标消息。手机与门锁之间的距离较近时,则可以接收到目标消息。The ultra-low power can be referred to the above description, and details are not repeated here. When the distance between the phone and the door lock is long, the door lock cannot receive the target message. When the distance between the phone and the door lock is close, the target message can be received.
可选的,手机可以采用第一发射功率持续向门锁发送目标消息,直至达到预设发送时长或达到预设发送次数。本实施例对预设发送时长或预设发送次数的取值不做限定。Optionally, the mobile phone can use the first transmission power to continuously send the target message to the door lock until the preset sending time or the preset number of sending times is reached. This embodiment does not limit the value of the preset sending duration or the preset sending times.
通过手机持续多次发送目标消息,提升了门锁接收到目标消息的成功率,确保了门锁可以解锁。通过设置预设发送时长或预设发送次数,避免了手机一直发送目标消息,节约了能耗,提高了解锁安全性。例如,在图8中的(a)所示场景中,用户一直在门外,由于手机发送目标消息的次数有限,避免了门锁一直接收目标消息一直解锁,提高了门锁的安全性。The target message is continuously sent multiple times through the mobile phone, which improves the success rate of the door lock receiving the target message and ensures that the door lock can be unlocked. By setting the preset sending duration or the preset sending times, the mobile phone is prevented from sending the target message all the time, energy consumption is saved, and unlocking security is improved. For example, in the scenario shown in (a) of Figure 8, the user is always outside the door. Since the number of times the mobile phone sends the target message is limited, the door lock is prevented from receiving the target message and unlocking all the time, which improves the security of the door lock.
可选的,在一种实现方式中,目标消息可以为BLE广播消息。即,手机可以采用超小功率向门锁发送BLE广播消息,该BLE广播消息用于指示门锁解锁。相应的,门锁通过BLE扫描接收该BLE广播消息。在该实现方式中,手机与门锁之间可以不用建立BLE连接,节省了消息流程。Optionally, in an implementation manner, the target message may be a BLE broadcast message. That is, the mobile phone can use ultra-low power to send a BLE broadcast message to the door lock, where the BLE broadcast message is used to instruct the door lock to unlock. Correspondingly, the door lock receives the BLE broadcast message through BLE scanning. In this implementation, there is no need to establish a BLE connection between the mobile phone and the door lock, which saves the message flow.
可选的,在另一种实现方式中,手机在与门锁建立BLE连接后,通过BLE连接发送目标消息。Optionally, in another implementation manner, after establishing a BLE connection with the door lock, the mobile phone sends the target message through the BLE connection.
S1005、门锁根据目标消息解锁。S1005, the door lock is unlocked according to the target message.
为了便于理解,S1003~S1005可以称为解锁阶段。For ease of understanding, S1003 to S1005 may be referred to as unlocking stages.
可见,本实施例提供的基于蓝牙的解锁方法,手机和门锁按照现有流程进行BLE广播和扫描,进行蓝牙通信。手机识别到门锁后,采用超小功率发送目标消息,目标消息的传输距离有限。当手机与门锁之间的距离很远时,例如,图7中的(a)、(b)、(c)所示场景或图9所示场景,即使手机发送了目标消息,门锁也接收不到,门锁不会解锁。当手机与门锁之间的距离很近时,例如,图7中的(d)所示场景或图8所示场景,门锁可以接收到目标消息,可以根据目标消息解锁。通过设置超小功率限制了目标消息的传输距离,确保了门锁解锁的安全性。门锁根据是否接收到目标消息执行解锁,避免了用户参与解锁的操作,实现了用户的无感解锁,提升了用户感受。It can be seen that, in the Bluetooth-based unlocking method provided in this embodiment, the mobile phone and the door lock perform BLE broadcast and scanning according to the existing process, and perform Bluetooth communication. After the mobile phone recognizes the door lock, it uses ultra-low power to send the target message, and the transmission distance of the target message is limited. When the distance between the mobile phone and the door lock is very far, for example, the scene shown in (a), (b), (c) in Figure 7 or the scene shown in Figure 9, even if the mobile phone sends the target message, the door lock If not received, the door lock will not be unlocked. When the distance between the mobile phone and the door lock is very close, for example, the scene shown in (d) in Figure 7 or the scene shown in Figure 8, the door lock can receive the target message and can be unlocked according to the target message. By setting the ultra-low power, the transmission distance of the target message is limited, which ensures the safety of the door lock unlocking. The door lock performs unlocking according to whether the target message is received, which avoids the user's participation in the unlocking operation, realizes the user's senseless unlocking, and improves the user's experience.
可选的,本实施例提供的基于蓝牙的解锁方法,还可以包括:Optionally, the Bluetooth-based unlocking method provided in this embodiment may further include:
S1006、门锁向手机发送响应消息,响应消息用于指示门锁是否解锁成功。S1006, the door lock sends a response message to the mobile phone, and the response message is used to indicate whether the door lock is unlocked successfully.
相应的,手机接收门锁发送的响应消息。Correspondingly, the mobile phone receives the response message sent by the door lock.
如果响应消息指示门锁解锁成功,手机可以停止发送目标消息。If the response message indicates that the door lock was successfully unlocked, the phone can stop sending the targeted message.
如果响应消息指示门锁解锁失败,可选的,手机可以采用超小功率向门锁重发目标消息。可选的,可以设置重发次数,重发次数为手机连续接收到指示门锁解锁失败的响应消息的最大次数,本实施例对重发次数的数值不做限定。可选的,手机每次重发目标消息时可以参照S1004。可选的,手机可以输出提示信息,用于提示用户门锁解锁失败,以使用户重新触发发送目标消息,或者,使用户选择其他方式解锁。例如,采用图4所示的点击解锁按键的方式。手机输出提示信息时,可以语音输出或在相关就界面中显示。本实施例对提示信息的具体内容不做限定。If the response message indicates that the door lock fails to be unlocked, optionally, the mobile phone can retransmit the target message to the door lock using ultra-low power. Optionally, the number of retransmissions may be set, and the number of retransmissions is the maximum number of times that the mobile phone continuously receives a response message indicating that the door lock fails to unlock. The value of the number of retransmissions is not limited in this embodiment. Optionally, S1004 may be referred to each time the mobile phone resends the target message. Optionally, the mobile phone can output prompt information to prompt the user that the door lock fails to unlock, so that the user can re-trigger the sending of the target message, or the user can choose another way to unlock. For example, the method of clicking the unlock button as shown in FIG. 4 is adopted. When the mobile phone outputs the prompt information, it can be output by voice or displayed on the relevant interface. This embodiment does not limit the specific content of the prompt information.
可选的,本实施例提供的基于蓝牙的解锁方法,还可以包括:Optionally, the Bluetooth-based unlocking method provided in this embodiment may further include:
若手机没有接收到门锁发送的响应消息,则可以采用超小功率向门锁重发目标消息。可以参见S1006中的相关说明,此处不再赘述。If the mobile phone does not receive the response message sent by the door lock, it can re-send the target message to the door lock with ultra-low power. Reference may be made to the relevant description in S1006, which will not be repeated here.
在图10所示实施例的基础上,图11为本申请实施例提供的基于蓝牙的解锁方法的另一种消息交互图。本实施例涉及的执行主体包括手机和门锁。On the basis of the embodiment shown in FIG. 10 , FIG. 11 is another message interaction diagram of the Bluetooth-based unlocking method provided by the embodiment of the present application. The executive body involved in this embodiment includes a mobile phone and a door lock.
如图11所示,可选的,S1004中手机采用超小功率向门锁发送目标消息之前,还可以包括:As shown in Figure 11, optionally, in S1004, before the mobile phone uses ultra-low power to send the target message to the door lock, it can also include:
S1007、手机判断手机与门锁的位置是否满足预设条件。S1007, the mobile phone determines whether the positions of the mobile phone and the door lock satisfy a preset condition.
若判断手机与门锁的位置满足预设条件,则执行S1004。解锁阶段包括S1003、S1007、S1004~S1005。If it is determined that the positions of the mobile phone and the door lock satisfy the preset condition, S1004 is executed. The unlocking stage includes S1003, S1007, and S1004 to S1005.
具体的,由于手机采用超小功率发送目标消息的距离有限,当手机与门锁的位置满足 预设条件时才发送目标消息,节省了手机功耗。例如,在图7中的(a)、(b)、(c)所示场景或图9所示场景中,手机与门锁很远,不满足预设条件,手机可以不发送目标消息。在图7中的(d)所示场景或图8所示场景,手机与门锁之间的距离足够近,发送目标消息。又例如,在图8中的(c)所示场景,用户位于门内时不需要开锁,手机可以不发送目标消息,不仅节省了手机功耗,还提高了门锁的安全性。Specifically, because the distance of the mobile phone using ultra-low power to send the target message is limited, the target message is sent only when the positions of the mobile phone and the door lock meet the preset conditions, which saves the power consumption of the mobile phone. For example, in the scenarios shown in (a), (b), and (c) in FIG. 7 or in the scenario shown in FIG. 9 , the mobile phone is far away from the door lock, and the preset conditions are not met, and the mobile phone may not send the target message. In the scenario shown in (d) of FIG. 7 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 he is in 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.
其中,确定手机与门锁的位置的信息不同,对应的预设条件可以不同。确定手机与门锁的位置的信息可以包括但不限于下列中的至少一项:手机的位置信息、门锁的位置信息,或,手机接收到的门锁发送信号的信号强度。位置信息包括但不限于下列中的至少一项:全球定位系统(global positioning system,GPS)位置信息、北斗卫星导航系统位置信息,或者,结合基站信息、WiFi信号特征、地磁等信息融合定位的位置信息。Wherein, the information for determining the positions of the mobile phone and the door lock is different, and the corresponding preset conditions may be different. The information for determining the location of the mobile phone and the door lock may include, but is not limited to, at least one of the following: location information of the mobile phone, location information of the door lock, or signal strength of the signal sent by the door lock received by the mobile phone. The location information includes, but is not limited to, at least one of the following: global positioning system (GPS) location information, Beidou satellite navigation system location information, or a location that combines base station information, WiFi signal characteristics, geomagnetism and other information for fusion positioning information.
可选的,S1003中手机生成目标消息之前,还可以包括:Optionally, before the mobile phone generates the target message in S1003, it may further include:
S1008、门锁发送门锁的能力信息,能力信息用于指示门锁是否支持无感解锁。S1008 , the door lock sends capability information of the door lock, and the capability information is used to indicate whether the door lock supports sensorless unlocking.
相应的,手机接收门锁的能力信息。Correspondingly, the mobile phone receives the capability information of the door lock.
S1009、手机根据门锁的能力信息判断门锁是否支持无感解锁。S1009, the mobile phone determines whether the door lock supports non-sensing unlocking according to the capability information of the door lock.
若门锁的能力信息指示门锁支持无感解锁,则执行S1003,采用超小功率向门锁发送目标消息,实现用户的无感解锁。If the capability information of the door lock indicates that the door lock supports non-inductive unlocking, S1003 is executed, and a target message is sent to the door lock by using ultra-low power, so as to realize the non-inductive unlocking of the user.
若门锁的能力信息指示门锁不支持无感解锁,则不执行S1003及后续步骤。可选的,手机可以输出提示信息,用于提示门锁不支持无感解锁,以使用户选择其他方式解锁。例如,采用图4所示的点击解锁按键的方式。手机输出提示信息时,可以语音输出或在相关就界面中显示。本实施例对提示信息的具体内容不做限定。If the capability information of the door lock indicates that the door lock does not support sensorless unlocking, S1003 and subsequent steps are not performed. Optionally, the mobile phone can output prompt information for prompting that the door lock does not support sensorless unlocking, so that the user can choose another way to unlock. For example, the method of clicking the unlock button as shown in FIG. 4 is adopted. When the mobile phone outputs the prompt information, it can be output by voice or displayed on the relevant interface. This embodiment does not limit the specific content of the prompt information.
可选的,S1008中门锁发送门锁的能力信息之前,还可以包括:Optionally, before the door lock sends the door lock capability information in S1008, it may further include:
S1010、手机向门锁发送能力查询请求消息。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.
为了便于理解,S1010、S1008~S1009可以称为门锁能力识别阶段。For ease of understanding, S1010, S1008-S1009 may be referred to as a door lock capability identification stage.
可选的,在一种实现方式中,门锁的能力信息可以携带在门锁发送的BLE广播消息中。相应的,手机通过BLE扫描接收BLE广播消息,从而得到门锁的能力信息。在该实现方式中,手机与门锁之间可以不用建立BLE连接,节省了消息流程。Optionally, in an implementation manner, the capability information of the door lock may be carried in a BLE broadcast message sent by the door lock. Correspondingly, the mobile phone scans and receives BLE broadcast messages through BLE to obtain the capability information of the door lock. In this implementation, there is no need to establish a BLE connection between the mobile phone and the door lock, which saves the message flow.
可选的,在另一种实现方式中,门锁在与手机建立BLE连接后,门锁通过BLE连接发送门锁的能力信息。Optionally, in another implementation manner, after the door lock establishes a BLE connection with the mobile phone, the door lock sends the capability information of the door lock through the BLE connection.
可选的,门锁可以根据通用属性配置文件(generic attribute profile,GATT)协议传输门锁的能力信息。GATT通过属性表组织要发送的数据。GATT属性表中可以包括多个属性。属性包含句柄、通用唯一标识符(universally unique identifier,UUID)和值。句柄是属性在GATT表中的索引,在一个设备中每一个属性的句柄都是唯一的。UUID包含属性表中数据类型的信息,它是理解属性表中的值的每一个字节意义的关键信息。示例性的,图12为本申请实施例提供的采用GATT协议传输门锁能力信息的一种数据格式示意图。如图12所示,GATT属性表包括设备服务能力属性(UUID1)和其他服务属性(UUID2)。设备服务能力属性包括无感解锁特性,无感解锁特性中的类型(Type)包括:无感解锁、测距广播、地理位置校验和其他能力值。每个类型(Type)通过不同的值(Value)进行标识。例如,无感解锁的值(Value)为Ture,表示门锁支持无感解锁功能。相似的,门锁也 支持发送测距广播功能和地理位置校验功能。Optionally, the door lock may transmit the capability information of the door lock according to a generic attribute profile (GATT) protocol. GATT organizes the data to be sent through attribute tables. Multiple attributes can be included in the GATT attribute table. Properties contain a handle, a universally unique identifier (UUID), and a value. The handle is the index of the attribute in the GATT table, and the handle of each attribute is unique in a device. UUID contains the information of the data type in the attribute table, it is the key information to understand the meaning of each byte of the value in the attribute table. Exemplarily, FIG. 12 is a schematic diagram of a data format for transmitting door lock capability information 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 (UUID1) and other service attributes (UUID2). The device service capability attribute includes the sensorless unlocking feature, and the type (Type) in the sensorless unlocking feature includes: sensorless unlocking, ranging broadcast, geographic location verification, and other capability values. Each type (Type) is identified by a different value (Value). For example, the value of non-sensing unlocking (Value) is Ture, indicating that the door lock supports the non-sensing unlocking function. Similarly, the door lock also supports the function of sending ranging broadcast and geographic location verification.
可选的,本实施例提供的基于蓝牙的解锁方法,S1002中手机进行BLE扫描之后,还可以包括:Optionally, in the Bluetooth-based unlocking method provided in this embodiment, after the mobile phone performs BLE scanning in S1002, it may further include:
S1011、手机与门锁之间建立BLE连接。S1011. Establish a BLE connection between the mobile phone and the door lock.
BLE连接可以参见蓝牙标准协议Core v5.2 Vol6 PartD 3/4/5,本实施例不做详细说明。For the BLE connection, please refer to the Bluetooth standard protocol Core v5.2 Vol6 PartD 3/4/5, which is not described in detail in this embodiment.
在图10或图11所示实施例的基础上,在本申请的另一实施例中,提供了解锁阶段中S1003和S1005的实现方式。在本实施例中,S1003中手机生成目标消息之前,还可以包括:Based on the embodiment shown in FIG. 10 or FIG. 11 , in another embodiment of the present application, an implementation manner of S1003 and S1005 in the unlocking phase is provided. In this embodiment, before the mobile phone generates the target message in S1003, it may further include:
门锁发送加密信息。相应的,手机接收门锁发送的加密信息。The door lock sends encrypted messages. Correspondingly, the mobile phone receives the encrypted information sent by the door lock.
相应的,S1003中手机生成目标消息,可以包括:手机根据加密信息生成目标消息。Correspondingly, the generation of the target message by the mobile phone in S1003 may include: the mobile phone generates the target message according to the encrypted information.
S1005中门锁根据目标消息解锁,可以包括:门锁根据加密信息和目标消息解锁。The unlocking of the door lock according to the target message in S1005 may include: unlocking the door lock according to the encrypted information and the target message.
其中,加密信息用于对目标消息进行安全性验证。在手机侧,根据加密信息生成目标消息,提升了目标消息的安全性。在门锁侧,根据加密信息对接收到的目标消息进行安全性验证,验证通过时才执行解锁,提高了门锁解锁的安全性。The encrypted information is used for security verification of the target message. On the mobile phone side, the target message is generated according to the encrypted information, which improves the security of the target message. On the door lock side, the security verification is performed on the received target message according to the encrypted information, and the unlocking is performed only when the verification is passed, which improves the security of the door lock unlocking.
可选的,为了进一步提升安全性,门锁可以更新加密信息。可选的,门锁可以定期更新加密信息,本实施例对更新周期不做限定。可选的,手机与门锁每次建立BLE连接后可以触发门锁更新加密信息。Optionally, in order to further improve security, the door lock can update encrypted information. Optionally, the door lock may periodically update the encrypted information, and the update period is not limited in this embodiment. Optionally, every time the mobile phone and the door lock establish a BLE connection, the door lock can be triggered to update the encrypted information.
可选的,在一种实现方式中,加密信息携带在门锁发送的BLE广播消息中。即,门锁发送BLE广播消息,该BLE广播消息中包括加密信息。相应的,手机通过BLE扫描接收该BLE广播消息,得到加密信息。本实施例对该BLE广播消息中的其他内容不做限定。可选的,该BLE广播消息还可以包括门锁的能力信息。Optionally, in an implementation manner, the encrypted information is carried in the BLE broadcast message sent by the door lock. That is, the door lock sends a BLE broadcast message, and the BLE broadcast message includes encrypted information. Correspondingly, the mobile phone scans the BLE to receive the BLE broadcast message to obtain encrypted information. This 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.
在该实现方式中,手机与门锁之间可以不用建立BLE连接,节省了消息流程。In this implementation, there is no need to establish a BLE connection between the mobile phone and the door lock, which saves the message flow.
可选的,在另一种实现方式中,可以在门锁与手机建立BLE连接之后,门锁通过BLE连接向手机发送加密信息。Optionally, in another implementation manner, after the door lock establishes a BLE connection with the mobile phone, the door lock sends encrypted information to the mobile phone through the BLE connection.
可选的,在一种实现方式中,图13为本申请实施例提供的基于蓝牙的解锁方法的又一种消息交互图。通过随机数和预设的加解密算法对目标消息进行安全性验证,提高了目标消息的安全性和门锁解锁的安全性。门锁可以获取随机数,本实施例对门锁获取随机数的方式和随机数的取值范围不做限定。加密信息包括随机数。如图13所示,解锁阶段可以包括:Optionally, in an implementation manner, FIG. 13 is another message interaction diagram of the Bluetooth-based unlocking method provided by the embodiment of the present application. The security of the target message is verified through random numbers and a preset encryption and decryption algorithm, which improves the security of the target message and the security of door lock unlocking. The door lock can acquire a random number, and the method for acquiring the random number by the door lock and the value range of the random number are not limited in this embodiment. Encrypted information includes random numbers. As shown in Figure 13, the unlocking phase may include:
S1301、门锁发送随机数。S1301, the door lock sends a random number.
相应的,手机接收门锁发送的随机数。Correspondingly, the mobile phone receives the random number sent by the door lock.
S1302、手机根据预设加解密算法对随机数加密,生成加密随机数。S1302, the mobile phone encrypts the random number according to a preset encryption and decryption algorithm, and generates an encrypted random number.
S1303、手机生成目标消息,目标消息包括加密随机数和解锁指令。S1303. The mobile phone generates a target message, where the target message includes an encrypted random number and an unlocking instruction.
S1304、手机采用超小功率向门锁发送目标消息。S1304, the mobile phone uses ultra-low power to send the target message to the door lock.
若门锁接收到目标消息,则执行S1305~S1306。If the door lock receives the target message, S1305-S1306 are executed.
S1305、门锁根据预设加解密算法对加密随机数解密,得到解密随机数。S1305, the door lock decrypts the encrypted random number according to a preset encryption and decryption algorithm to obtain a decrypted random number.
S1306、若解密随机数与随机数相同,则门锁根据解锁指令解锁。S1306: If the decrypted random number is the same as the random number, the door lock is unlocked according to the unlocking instruction.
其中,本实施例对预设加解密算法不做限定。例如,高级加密标准(advanced encryption  standard,AES)算法。The preset encryption and decryption algorithms are not limited in this embodiment. For example, the Advanced Encryption Standard (AES) algorithm.
可选的,在该实现方式中,目标消息中的解锁指令可以通过预设加解密算法进行加密。Optionally, in this implementation manner, the unlocking instruction in the target message may be encrypted by a preset encryption and decryption algorithm.
可选的,在另一种实现方式中,图14为本申请实施例提供的基于蓝牙的解锁方法的又一种消息交互图。通过密钥对目标消息进行安全性验证,提高了目标消息的安全性和门锁解锁的安全性。如图14所示,解锁阶段可以包括:Optionally, in another implementation manner, FIG. 14 is another message interaction diagram of the Bluetooth-based unlocking method provided by the embodiment of the present application. The security of the target message is verified by the key, which improves the security of the target message and the security of unlocking the door lock. As shown in Figure 14, the unlocking phase can include:
S1401、门锁获取非对称密钥对。S1401, the door lock obtains an asymmetric key pair.
其中,非对称密钥对包括公钥和私钥,加密信息包括公钥。The asymmetric key pair includes a public key and a private key, and the encrypted information includes a public key.
本实施例对门锁获取非对称密钥对的方式不做限定。This embodiment does not limit the manner in which the door lock obtains the asymmetric key pair.
S1402、门锁发送非对称密钥对中的公钥。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.
S1403、手机使用公钥加密解锁指令,生成加密解锁指令。S1403, the mobile phone uses the public key to encrypt the unlocking instruction to generate the encrypted unlocking instruction.
S1404、手机生成目标消息,目标消息包括加密解锁指令。S1404. The mobile phone generates a target message, where the target message includes an encrypted unlocking instruction.
S1405、手机采用超小功率向门锁发送目标消息。S1405, the mobile phone uses ultra-low power to send the target message to the door lock.
若门锁接收到目标消息,则执行S1406~S1407。If the door lock receives the target message, S1406 to S1407 are executed.
S1406、门锁根据非对称密钥对中的私钥对加密解锁指令解密,获得解锁指令。S1406, the door lock decrypts the encrypted unlocking instruction according to the private key in the asymmetric key pair, and obtains the unlocking instruction.
S1407、门锁根据解锁指令解锁。S1407, the door lock is unlocked according to the unlocking instruction.
在上述实施例的基础上,在本申请的又一实施例中,提供了解锁阶段中S1007的实现方式。在本实施例中,S1007中,手机判断手机与门锁的位置是否满足预设条件,可以包括:On the basis of the above-mentioned 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 mobile phone determines whether the positions of the mobile phone and the door lock meet the preset conditions, which 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 determines whether the signal strength of the ranging broadcast message satisfies the preset condition.
通常,手机与门锁的距离越远,手机接收到的测距广播消息的信号强度越小。相反的,手机与门锁的距离越近,手机接收到的测距广播消息的信号强度越大。因此,手机接收到的测距广播消息的信号强度可以反映手机与门锁的距离,手机根据测距广播消息的信号强度是否满足预设条件确定是否发送目标消息,节约了手机功耗。Generally, the farther the mobile phone is from the door lock, the weaker the signal strength of the ranging broadcast message received by the mobile phone. On the contrary, the closer the distance between the mobile phone and the door lock, the stronger the signal strength of the ranging broadcast message received by the mobile phone. Therefore, the signal strength of the ranging broadcast message received by the mobile phone can reflect the distance between the mobile phone and the door lock.
下面,根据门锁上天线的数量以及天线的位置进行场景划分。Next, the scene is divided according to the number of antennas on the door lock and the positions of the antennas.
第一场景:门锁包括至少一个天线,门锁安装在门上后,所有天线均在门的外侧。Scenario 1: The door lock includes at least one antenna. After the door lock is installed on the door, all antennas are on the outside of the door.
第二场景:门锁包括至少一个天线,门锁安装在门上后,所有天线均在门的内侧。Scenario 2: The door lock includes at least one antenna. After the door lock is installed on the door, all antennas are on the inner side of the door.
第三场景:门锁包括至少一个天线,门锁安装在门上后,部分天线位于门的外侧,部分天线位于门的内侧。为了方便说明,以门内和门外分别有一个天线作为示例。位于门外的天线称为第一天线,位于门内的天线称为第二天线。The third scenario: the door lock includes at least one antenna. After the door lock is installed on the door, some antennas are located on the outside of the door, and some antennas are located on the inside of the door. For the convenience of explanation, there is an antenna inside and outside the door as an example. The antenna located outside the door is called the first antenna, and the antenna located inside the door is called the second antenna.
可选的,在一种实现方式中,适用于第一场景、第二场景和第三场景。Optionally, in an implementation manner, it is applicable to the first scenario, the second scenario and the third scenario.
门锁发送测距广播消息,可以包括:The door lock sends a ranging broadcast message, which can include:
门锁通过所有天线中的至少一个天线发送测距广播消息。The door lock transmits a ranging broadcast message through at least one of all antennas.
手机判断测距广播消息的信号强度是否满足预设条件,可以包括:The mobile phone determines whether the signal strength of the ranging broadcast message meets the preset conditions, which may include:
对于手机接收到的任意一个测距广播消息,判断测距广播消息的信号强度是否大于预设阈值。For any ranging broadcast message received by the mobile phone, determine whether the signal strength of the ranging broadcast message is greater than a preset threshold.
如果手机确定测距广播消息的信号强度大于预设阈值,说明手机与门锁之间的距离较 近,可以执行S1004,手机采用超小功率向门锁发送目标消息。如果手机确定测距广播消息的信号强度小于预设阈值,说明手机与门锁之间的距离较远,则不执行S1004及后续步骤。其中,测距广播消息的信号强度等于预设阈值时,可以执行S1004,也可以不执行S1004。If the mobile phone determines that the signal strength of the ranging broadcast message is greater than the preset threshold, it means that the distance between the mobile phone and the door lock is relatively short, and S1004 can be executed, and the mobile phone uses ultra-low power to send the target message to the door lock. If the mobile phone determines that the signal strength of the ranging broadcast message is less than the preset threshold, it means that the distance between the mobile phone and the door lock is relatively far, and S1004 and subsequent steps are not performed. Wherein, when the signal strength of the ranging broadcast message is equal to the preset threshold, S1004 may be performed, or S1004 may not be performed.
其中,本实施例对预设阈值的取值不做限定。The value of the preset threshold is not limited in this embodiment.
可选的,为了提高判断的准确性,若手机接收到多个天线发送的测距广播消息,可以根据多个测距广播消息的信号强度是否大于预设阈值确定是否发送目标消息。例如,当信号强度大于预设阈值的测距广播消息的个数大于一定个数时,手机采用超小功率向门锁发送目标消息。或者,只要存在信号强度大于预设阈值的测距广播消息,手机采用超小功率向门锁发送目标消息。Optionally, in order to improve the accuracy of judgment, if the mobile phone receives ranging broadcast messages sent by multiple antennas, it may determine whether to send the target message according to whether the signal strengths of the multiple ranging broadcast messages are greater than a preset threshold. For example, when the number of ranging broadcast messages whose signal strength is greater than a preset threshold is greater than a certain number, the mobile phone uses ultra-low power to send the target message to the door lock. Alternatively, as long as there is a ranging broadcast message with a signal strength greater than a preset threshold, the mobile phone uses ultra-low power to send the target message to the door lock.
可选的,在另一种实现方式中,适用于第三场景。Optionally, in another implementation manner, the third scenario is applicable.
门锁发送测距广播消息,可以包括:The door lock sends a ranging broadcast message, which can include:
门锁采用目标功率通过第一天线发送第一测距广播消息,以及,采用目标功率通过第二天线发送第二测距广播消息。其中,第一测距广播消息包括第一标识信息,第一标识信息用于指示第一天线位于门外。第二测距广播消息包括第二标识信息,第二标识信息用于指示第二天线位于门内。The door lock uses the target power to send the first ranging broadcast message through the first antenna, and uses the target power to send the second ranging broadcast message through the second antenna. The first ranging broadcast message includes first identification information, and the first identification information is used to indicate that the first antenna is located outside the door. The second ranging broadcast message includes second identification information, where the second identification information is used to indicate that the second antenna is located in the door.
手机判断测距广播消息的信号强度是否满足预设条件,可以包括:The mobile phone determines whether the signal strength of the ranging broadcast message meets the preset conditions, which may include:
手机判断第一测距广播消息的信号强度是否大于第二测距广播消息的信号强度。The mobile phone determines whether the signal strength of the first ranging broadcast message is greater than the signal strength of the second ranging broadcast message.
本实施例对目标功率的取值不做限定。This embodiment does not limit the value of the target power.
如果第一测距广播消息的信号强度大于第二测距广播消息的信号强度,说明手机位于门外,可以执行S1004,手机采用超小功率向门锁发送目标消息。如果第一测距广播消息的信号强度小于第二测距广播消息的信号强度,说明手机位于门内,则不执行S1004及后续步骤。其中,第一测距广播消息的信号强度与第二测距广播消息的信号强度相等时,可以执行S1004,也可以不执行S1004。If the signal strength of the first ranging broadcast message is greater than the signal strength of the second ranging broadcast message, it means that the mobile phone is located outside the door, and S1004 can be executed, and the mobile phone uses ultra-low power to send the target message to the door lock. If the signal strength of the first ranging broadcast message is lower than the signal strength of the second ranging broadcast message, it means that the mobile phone is located in the door, and S1004 and subsequent steps are not performed. Wherein, when the signal strength of the first ranging broadcast message is equal to the signal strength of the second ranging broadcast message, S1004 may or may not be performed.
下面结合图15进行说明。手机A位于门外,第一测距广播消息的信号强度标记为RSSI11,第二测距广播消息的信号强度标记为RSSI21。门锁采用相同功率通过第一天线和第二天线发送测距广播消息,由于门的阻隔,RSSI11>RSSI21。相似的,手机B位于门内,第一测距广播消息的信号强度标记为RSSI12<第二测距广播消息的信号强度标记为RSSI22。The following description will be 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 uses the same power to send the ranging broadcast message through the first antenna and the second antenna. Due to the barrier of the door, RSSI11>RSSI21. Similarly, the mobile phone B is located in the door, and the signal strength of the first ranging broadcast message is marked as RSSI12<the signal strength of the second ranging broadcast message is marked as RSSI22.
可选的,对于第三场景,上述两种方式可以结合。在确定手机与门锁之间的距离足够近并且手机位于门外时,手机采用超小功率向门锁发送目标消息,实现无感解锁。Optionally, for the third scenario, the above two manners may be combined. When it is determined that the distance between the mobile phone and the door lock is close enough and the mobile phone is located outside the door, the mobile phone uses ultra-low power to send the target message to the door lock to achieve non-sensing unlocking.
在上述实施例的基础上,在本申请的又一实施例中,在解锁阶段中,S1005中门锁根据目标消息解锁之前,还可以包括:On the basis of the above embodiment, in another embodiment of the present application, in the unlocking stage, before the door lock is unlocked according to the target message in S1005, it may further include:
门锁判断手机与门锁的位置是否满足预设条件。The door lock determines whether the positions of the mobile phone and the door lock meet the preset conditions.
如果门锁确定手机与门锁的位置满足预设条件,则执行S1005,根据目标消息解锁。如果门锁确定手机与门锁的位置不满足预设条件,则不执行S1005及后续步骤。通过在门锁侧进一步判断,提高了门锁解锁的安全性。If the door lock determines that the positions of the mobile phone and the door lock meet the preset conditions, S1005 is executed to unlock according to the target message. If the door lock determines that the positions of the mobile phone and the door lock do not meet the preset conditions, S1005 and subsequent steps are not performed. By further judging on the door lock side, the safety of unlocking the door lock is improved.
其中,确定手机与门锁的位置的信息不同,对应的预设条件可以不同。为了便于与S1007区分,S1007中的预设条件可以称为第一预设条件,本实施例中的预设条件可以称 为第二预设条件。Wherein, the information for determining the positions of the mobile phone and the door lock is different, and the corresponding preset conditions may be different. In order to be easily distinguished from S1007, the preset condition in S1007 may be referred to as the first preset condition, and the preset condition in this embodiment may be referred to as the second preset condition.
可选的,在一种实现方式中,门锁判断手机与门锁的位置是否满足预设条件,可以包括:Optionally, in an implementation manner, the door lock determines whether the positions of the mobile phone and the door lock satisfy a preset condition, which may include:
手机获取非对称密钥对。其中,非对称密钥对包括公钥和私钥。The phone obtains an asymmetric key pair. The asymmetric key pair includes a public key and a private key.
手机向门锁发送非对称密钥对中的公钥。The phone sends the public key from the asymmetric key pair to the door lock.
手机获取当前的位置信息,并用非对称密钥对中的私钥加密当前的位置信息,生成加密位置信息。The mobile phone obtains the current location information, and encrypts the current location information with the private key in the asymmetric key pair to generate encrypted location information.
手机向门锁发送加密位置信息。相应的,门锁接收加密位置信息。The phone sends encrypted location information to the door lock. Accordingly, the door lock receives encrypted location information.
门锁根据非对称密钥对中的公钥对加密位置信息解密,获得解密位置信息。The door lock decrypts the encrypted location information according to the public key in the asymmetric key pair to obtain the decrypted location information.
门锁将解密位置信息与本地存储的手机初始位置信息进行比对,确定解密位置信息与手机初始位置信息之间的误差是否在预设误差范围内。其中,手机初始位置信息为手机初次与门锁建立BLE连接时的手机的位置信息。The door lock compares the decrypted position information with the initial position information of the mobile phone stored locally, and determines whether the error between the decrypted position information and the initial position information of the mobile phone is within a preset error range. The initial location information of the mobile phone is the location information of the mobile phone when the mobile phone establishes a BLE connection with the door lock for the first time.
通常,手机初次配置门锁时,会将手机的地理位置写入门锁。例如,在图2所示的添加门锁001的过程中,手机与门锁001建立蓝牙连接后,会将手机的位置信息发送给门锁,即,手机初始位置信息。后续,手机靠近门锁执行无感解锁前,门锁通过将手机的当前位置与本地存储的手机初始位置进行比较,如果误差大于预设误差范围,则拒绝解锁;如果误差小于预设误差范围,则允许解锁,进一步提升了门锁无感解锁的安全性。Usually, when the mobile phone is configured with the door lock for the first time, 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 mobile phone establishes a Bluetooth connection with the door lock 001, the location information of the mobile phone is sent to the door lock, that is, the initial location information of the mobile phone. Subsequently, before the mobile phone is close to the door lock to perform non-sensing unlocking, the door lock compares the current position of the mobile phone with the initial position of the mobile phone stored locally. If the error is greater than the preset error range, it will refuse to unlock; if the error is less than the preset error range, Unlocking is allowed, which further improves the security of the door lock's senseless unlocking.
需要说明,本实施例对预设误差范围的取值不做限定。例如,50米。It should be noted that this embodiment does not limit the value of the preset error range. For example, 50 meters.
可以理解的是,终端设备和智能锁为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It can be understood that, in order to realize the above-mentioned functions, the terminal device and the smart lock include corresponding hardware and/or software modules for executing each function. The present application can be implemented in hardware or in the form of a combination of hardware and computer software in conjunction with the algorithm steps of each example described in conjunction with the embodiments disclosed herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functionality for each particular application in conjunction with the embodiments, but such implementations should not be considered beyond the scope of this application.
本申请实施例可以根据上述方法示例对终端设备和智能锁进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个模块中。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。需要说明的是,本申请实施例中模块的名称是示意性的,实际实现时对模块的名称不做限定。In this embodiment of the present application, the terminal device and the smart lock can be divided into functional modules according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one module. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation. It should be noted that the names of the modules in the embodiments of the present application are schematic, and the names of the modules are not limited in actual implementation.
图16为本申请实施例提供的终端设备的一种结构示意图。如图16所示,本实施例提供的终端设备,可以包括:FIG. 16 is a schematic structural diagram of a terminal device provided by an embodiment of the present application. As shown in FIG. 16 , the terminal device provided in this embodiment may include:
接收模块1601,用于接收智能锁发送的BLE广播消息,识别所述智能锁;The receiving module 1601 is used to receive the BLE broadcast message sent by the smart lock, and identify the smart lock;
处理模块1602,用于生成目标消息,所述目标消息用于指示所述智能锁解锁;a processing module 1602, configured to generate a target message, the target message being used to instruct the smart lock to be unlocked;
发送模块1603,用于采用第一发射功率向所述智能锁发送所述目标消息,所述第一发射功率小于或等于第一阈值,所述第一阈值包括-50dBm。A sending module 1603, configured to send the target message to the smart lock using a first transmit power, where the first transmit power is less than or equal to a first threshold, where the first threshold includes -50dBm.
可选的,所述接收模块1601,还用于接收所述智能锁发送的加密信息;Optionally, the receiving module 1601 is further configured to receive encrypted information sent by the smart lock;
所述处理模块1602具体用于:根据所述加密信息生成所述目标消息。The processing module 1602 is specifically configured to: generate the target message according to the encrypted information.
可选的,所述加密信息包括随机数;所述处理模块1602具体用于:Optionally, the encrypted information includes random numbers; the processing module 1602 is specifically configured to:
根据预设加解密算法对所述随机数加密,生成加密随机数;Encrypt the random number according to a preset encryption and decryption algorithm to generate an encrypted random number;
生成所述目标消息;所述目标消息包括所述加密随机数和解锁指令。The target message is generated; the target message includes the encrypted random number and an unlock instruction.
可选的,所述加密信息包括非对称密钥对中的公钥;所述处理模块1602具体用于:Optionally, the encrypted information includes a public key in an asymmetric key pair; the processing module 1602 is specifically configured to:
使用所述公钥加密解锁指令,生成加密解锁指令;using the public key to encrypt and unlock the instruction to generate an encrypted unlocking instruction;
生成所述目标消息;所述目标消息包括所述加密解锁指令。The target message is generated; the target message includes the encrypted unlock instruction.
可选的,所述加密信息携带在所述智能锁发送的BLE广播消息中。Optionally, the encrypted information is carried in the BLE broadcast message sent by the smart lock.
可选的,所述处理模块1602还用于:Optionally, the processing module 1602 is further configured to:
判断所述终端设备与所述智能锁的位置是否满足预设条件;若所述终端设备与所述智能锁的位置满足预设条件,则控制发送模块1603采用所述第一发射功率向所述智能锁发送所述目标消息。Determine whether the position of the terminal device and the smart lock meets the preset condition; if the position of the terminal device and the smart lock meets the preset condition, control the sending module 1603 to use the first transmission power to send the The smart lock sends the target message.
可选的,所述接收模块1601,还用于接收所述智能锁发送的测距广播消息;Optionally, the receiving module 1601 is further configured to receive a ranging broadcast message sent by the smart lock;
所述处理模块1602具体用于:判断所述测距广播消息的信号强度是否满足预设条件。The processing module 1602 is specifically configured to: determine whether the signal strength of the ranging broadcast message satisfies a preset condition.
可选的,所述智能锁包括至少一个天线,所述测距广播消息为所述智能锁通过任意一个所述天线发送的;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;
所述处理模块1602具体用于:判断所述测距广播消息的信号强度是否大于预设阈值。The processing module 1602 is specifically configured to: determine whether the signal strength of the ranging broadcast message is greater than a preset threshold.
可选的,所述智能锁包括第一天线和第二天线,所述智能锁安装在门上时,所述第一天线位于所述门的外侧,所述第二天线位于所述门的内侧,所述测距广播消息包括第一测距广播消息和第二测距广播消息,所述第一测距广播消息为所述智能锁通过所述第一天线发送的且包括第一标识信息,所述第一标识信息用于指示所述第一天线位于门外,所述第二测距广播消息为所述智能锁通过所述第二天线发送的且包括第二标识信息,所述第二标识信息用于指示所述第二天线位于门内;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 outside the door, and the second antenna is located inside 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, the second The identification information is used to indicate that the second antenna is located in the door;
所述处理模块1602具体用于:The processing module 1602 is specifically used for:
判断所述第一测距广播消息的信号强度是否大于所述第二测距广播消息的信号强度。Determine whether the signal strength of the first ranging broadcast message is greater than the signal strength of the second ranging broadcast message.
可选的,所述发送模块1603具体用于:Optionally, the sending module 1603 is specifically used for:
采用所述第一发射功率持续向所述智能锁发送所述目标消息,直至达到预设发送时长或达到预设发送次数。The target message is continuously sent to the smart lock by using the first transmit power until a preset sending time or a preset number of sending times is reached.
可选的,所述目标消息为BLE广播消息。Optionally, the target message is a BLE broadcast message.
可选的,所述接收模块1601,还用于接收所述智能锁发送的所述智能锁的能力信息;Optionally, the receiving module 1601 is further configured to receive capability information of the smart lock sent by the smart lock;
所述处理模块1602具体用于:The processing module 1602 is specifically used for:
若所述智能锁的能力信息指示所述智能锁支持无感解锁,则生成所述目标消息。If the capability information of the smart lock indicates that the smart lock supports sensorless unlocking, the target message is generated.
可选的,所述接收模块1601,还用于接收所述智能锁发送的响应消息,所述响应消息用于指示所述智能锁是否解锁成功。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.
可选的,所述处理模块1602还用于,与所述智能锁建立BLE连接。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 perform the operations performed by the mobile phone in the foregoing method embodiments, and the technical principles and technical effects are similar, and details are not described herein again.
图17为本申请实施例提供的智能锁的一种结构示意图。如图17所示,本实施例提供的智能锁,可以包括:FIG. 17 is a schematic structural diagram of a smart lock provided by an embodiment of the present application. As shown in Figure 17, the smart lock provided by this embodiment may include:
发送模块1701,用于发送BLE广播消息;A sending module 1701, configured to send a BLE broadcast message;
所述发送模块1701,还用于发送加密信息;The sending module 1701 is further configured to send encrypted information;
接收模块1703,用于接收终端设备发送的目标消息,所述目标消息用于指示所述智能锁解锁;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 be unlocked;
处理模块1702,用于根据所述加密信息和所述目标消息解锁。The processing module 1702 is configured to unlock according to the encrypted information and the target message.
可选的,所述加密信息包括随机数,所述目标消息包括加密随机数和解锁指令,所述加密随机数是所述终端设备根据预设加解密算法对所述随机数加密生成的;Optionally, the encrypted information includes a random number, the target message includes an encrypted random number and an unlock instruction, and the encrypted random number is generated by the terminal device encrypting the random number according to a preset encryption and decryption algorithm;
所述处理模块1702具体用于:The processing module 1702 is specifically used for:
根据所述预设加解密算法对所述加密随机数解密,得到解密随机数;Decrypt the encrypted random number according to the preset encryption and decryption algorithm to obtain a decrypted random number;
若所述解密随机数与所述随机数相同,则根据所述解锁指令解锁。If the decryption random number is the same as the random number, unlock according to the unlocking instruction.
可选的,所述加密信息包括非对称密钥对中的公钥,所述目标消息包括加密解锁指令,所述加密解锁指令是所述终端设备根据所述公钥对所述解锁指令加密生成的;Optionally, the encrypted information includes a public key in an asymmetric key pair, and 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. of;
所述处理模块1702具体用于:The processing module 1702 is specifically used for:
根据所述非对称密钥对中的私钥对所述加密解锁指令解密,获得所述解锁指令;Decrypt the encrypted unlock instruction according to the private key in the asymmetric key pair to obtain the unlock instruction;
根据所述解锁指令解锁。Unlock according to the unlocking instruction.
可选的,所述加密信息携带在BLE广播消息中。Optionally, the encryption information is carried in a BLE broadcast message.
可选的,所述发送模块1701,还用于发送测距广播消息。Optionally, the sending module 1701 is further configured to send a ranging broadcast message.
可选的,所述智能锁包括N个天线,N大于或等于1,所述发送模块1701具体用于:Optionally, the smart lock includes N antennas, where N is greater than or equal to 1, and the sending module 1701 is specifically used for:
通过所述N个天线中的至少一个天线发送所述测距广播消息。The ranging broadcast message is transmitted through at least one of the N antennas.
可选的,所述智能锁包括第一天线和第二天线,所述智能锁安装在门上时,所述第一天线位于所述门的外侧,所述第二天线位于所述门的内侧;所述发送模块1701具体用于: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 outside the door, and the second antenna is located inside the door. ; The sending module 1701 is specifically used for:
采用目标功率通过所述第一天线发送第一测距广播消息,以及,采用所述目标功率通过所述第二天线发送第二测距广播消息;所述第一测距广播消息包括指示第一天线位于门外的第一标识信息,第二测距广播消息包括指示第二天线位于门内的第二标识信息。A first ranging broadcast message is sent through the first antenna using a target power, and a second ranging broadcast message is sent through the second antenna using the target power; the first ranging broadcast message includes an indication of the first ranging broadcast message. The first identification information indicating that the 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.
可选的,所述目标消息为所述终端设备发送的BLE广播消息。Optionally, the target message is a BLE broadcast message sent by the terminal device.
可选的,所述发送模块1701,还用于发送所述智能锁的能力信息;所述能力信息用于指示所述智能锁是否支持无感解锁。Optionally, the sending module 1701 is further configured to send capability information of the smart lock; the capability information is used to indicate whether the smart lock supports sensorless unlocking.
可选的,所述发送模块1701具体用于:Optionally, the sending module 1701 is specifically used for:
向所述终端设备发送响应消息,所述响应消息用于指示所述智能锁是否解锁成功。Send a response message to the terminal device, where the response message is used to indicate whether the smart lock is unlocked successfully.
可选的,所述处理模块1702还用于:Optionally, the processing module 1702 is further configured to:
与所述终端设备建立BLE连接。A BLE connection is established with the terminal device.
本实施例提供的智能锁,用于执行上述方法实施例中门锁执行的操作,技术原理和技术效果相似,此处不再赘述。The smart lock provided in this embodiment is used to perform the operations performed by the door lock in the foregoing method embodiments, and the technical principles and technical effects are similar, and details are not repeated here.
请参考图18,其示出了本申请实施例提供的电子设备的一种结构。电子设备可以为本申请实施例中的终端设备或智能锁。该电子设备包括:处理器1801、接收器1802、发射器1803、存储器1804和总线1805。处理器1801包括一个或者多个处理核心,处理器1801通过运行软件程序以及模块,从而执行各种功能的应用以及信息处理。接收器1802和发射器1803可以实现为一个通信组件,该通信组件可以是一块基带芯片。存储器1804通过总线1805和处理器1801相连。存储器1804可用于存储至少一个程序指令,处理器1801 用于执行至少一个程序指令,以实现上述实施例的技术方案。其实现原理和技术效果与上述方法相关实施例类似,此处不再赘述。Please refer to FIG. 18 , which shows a structure of an electronic device provided by an embodiment of the present application. The electronic device may be a terminal device or a smart lock in this embodiment of the application. The electronic device includes: a processor 1801 , a receiver 1802 , a transmitter 1803 , a memory 1804 and a bus 1805 . The processor 1801 includes one or more processing cores, and the processor 1801 executes various functional applications and information processing by running software programs and modules. The receiver 1802 and the transmitter 1803 may be implemented as a communication component, which may be a baseband chip. The memory 1804 is connected to the processor 1801 through a bus 1805. The memory 1804 may be configured to store at least one program instruction, and the processor 1801 may be configured to execute the at least one program instruction, so as to implement the technical solutions of the foregoing embodiments. The implementation principle and technical effect thereof are similar to the related embodiments of the above method, and are not repeated here.
当电子设备开机后,处理器可以读取存储器中的软件程序,解释并执行软件程序的指令,处理软件程序的数据。当需要通过天线发送数据时,处理器对待发送的数据进行基带处理后,输出基带信号至控制电路中的控制电路,控制电路将基带信号进行射频处理后将射频信号通过天线以电磁波的形式向外发送。当有数据发送到电子设备时,控制电路通过天线接收到射频信号,将射频信号转换为基带信号,并将基带信号输出至处理器,处理器将基带信号转换为数据并对该数据进行处理。When the electronic device is powered 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 it is necessary to send data through the antenna, the processor performs baseband processing on the data to be sent, and outputs the baseband signal to the control circuit in the control circuit. The control circuit performs radio frequency processing on the baseband signal and sends the radio frequency signal through the antenna in the form of electromagnetic waves. send. When data is sent to the electronic device, the control circuit receives the radio frequency signal through the antenna, converts the radio frequency signal into a baseband signal, and outputs the baseband signal to the processor, which converts the baseband signal into data and processes the data.
本领域技术人员可以理解,为了便于说明,图18仅示出了一个存储器和处理器。在实际的电子设备中,可以存在多个处理器和存储器。存储器也可以称为存储介质或者存储设备等,本申请实施例对此不做限制。Those skilled in the art can understand that, for the convenience of description, FIG. 18 only shows one memory and a processor. In an actual electronic device, there may be multiple processors and memories. The memory may also be referred to as a storage medium or a storage device, etc., which is not limited in this embodiment of the present application.
作为一种可选的实现方式,处理器可以包括基带处理器和中央处理器,基带处理器主要用于对通信数据进行处理,中央处理器主要用于执行软件程序,处理软件程序的数据。本领域技术人员可以理解,基带处理器和中央处理器可以集成在一个处理器中,也可以是各自独立的处理器,通过总线等技术互联。本领域技术人员可以理解,电子设备可以包括多个基带处理器以适应不同的网络制式,电子设备可以包括多个中央处理器以增强其处理能力,电子设备的各个部件可以通过各种总线连接。该基带处理器也可以表述为基带处理电路或者基带处理芯片。该中央处理器也可以表述为中央处理电路或者中央处理芯片。对通信协议以及通信数据进行处理的功能可以内置在处理器中,也可以以软件程序的形式存储在存储器中,由处理器执行软件程序以实现基带处理功能。该存储器可以集成在处理器中,也可以独立在处理器之外。该存储器包括高速缓存Cache,可以存放频繁访问的数据/指令。As an optional implementation manner, the processor may include a baseband processor and a central processing unit. The baseband processor is mainly used to process communication data, and the central processing unit is mainly used to execute software programs and process data of the software programs. Those skilled in the art can understand that the baseband processor and the central processing unit may be integrated into one processor, or may be independent processors, which are interconnected through technologies such as a bus. Those skilled in the art can understand that an electronic device may include multiple baseband processors to adapt to different network standards, an electronic device may include multiple central processors to enhance its processing capability, and various components of the electronic device may be connected through various buses. The baseband processor can also be expressed as a baseband processing circuit or a baseband processing chip. The central processing unit can also be expressed as a central processing circuit or a central processing chip. The function of processing the communication protocol and 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 can be integrated in the processor or independent of the processor. The memory includes a cache, which can store frequently accessed data/instructions.
在本申请实施例中,处理器可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。In this embodiment 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, which can implement or The methods, steps and logic block diagrams disclosed in the embodiments of this application are executed. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the methods disclosed in conjunction with the embodiments of the present application may be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
在本申请实施例中,存储器可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SS)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,不限于此。In this embodiment of the present application, the memory may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SS), etc., or may also be a volatile memory (volatile memory), for example Random-access memory (RAM). Memory is, without limitation, 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.
本申请实施例中的存储器还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。本申请各实施例提供的方法中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、网络设备、用户设备或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算 机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机可以存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DWD)、或者半导体介质(例如,SSD)等。The memory in this embodiment of the present application may also be a circuit or any other device capable of implementing a storage function, for storing program instructions and/or data. The methods provided by the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, it can 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. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, a special purpose computer, a computer network, network equipment, user equipment, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL), or wireless (eg, infrared, wireless, microwave, etc.) A readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The available media can be magnetic media (eg, floppy disks, hard disks, magnetic tapes) ), optical media (eg, digital video disc (DWD), or semiconductor media (eg, SSD), etc.).
本申请实施例提供一种计算机程序产品,当所述计算机程序产品在终端运行时,使得所述终端执行上述实施例中的技术方案。其实现原理和技术效果与上述相关实施例类似,此处不再赘述。The embodiments of the present application provide a computer program product, which enables the terminal to execute the technical solutions in the foregoing embodiments when the computer program product runs on a terminal. The implementation principle and technical effect thereof are similar to those of the above-mentioned related embodiments, which will not be repeated here.
本申请实施例提供一种计算机可读存储介质,其上存储有程序指令,所述程序指令被终端执行时,使得所述终端执行上述实施例的技术方案。其实现原理和技术效果与上述相关实施例类似,此处不再赘述。综上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。The embodiments of the present application provide a computer-readable storage medium, on which program instructions are stored, and when the program instructions are executed by a terminal, the terminal executes the technical solutions of the foregoing embodiments. The implementation principle and technical effect thereof are similar to those of the above-mentioned related embodiments, which will not be repeated here. To sum up, the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still The technical solutions described in the foregoing embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims (34)

  1. 一种基于蓝牙的解锁方法,其特征在于,应用于终端设备和智能锁组成的系统,所述方法包括:A Bluetooth-based unlocking method, characterized in that it is applied to a system composed of a terminal device and a smart lock, the method comprising:
    所述智能锁发送低功耗蓝牙BLE广播消息;The smart lock sends a low-power Bluetooth BLE broadcast message;
    所述终端设备接收所述BLE广播消息,识别所述智能锁;The terminal device receives the BLE broadcast message and identifies the smart lock;
    所述终端设备生成目标消息,所述目标消息用于指示所述智能锁解锁;The terminal device generates a target message, and the target message is used to instruct the smart lock to be unlocked;
    所述终端设备采用第一发射功率向所述智能锁发送所述目标消息,所述第一发射功率小于或等于第一阈值,所述第一阈值包括-50dBm;sending, by the terminal device, the target message to the smart lock using a first transmit power, where the first transmit power is less than or equal to a first threshold, and the first threshold includes -50dBm;
    所述智能锁接收所述目标消息;the smart lock receives the target message;
    所述智能锁根据所述目标消息解锁。The smart lock is unlocked according to the target message.
  2. 根据权利要求1所述的方法,其特征在于,所述终端设备生成目标消息之前,还包括:The method according to claim 1, wherein before the terminal device generates the target message, the method further comprises:
    所述智能锁发送加密信息;The smart lock sends encrypted information;
    所述终端设备生成目标消息,包括:The terminal device generates a target message, including:
    所述终端设备根据所述加密信息生成所述目标消息;The terminal device generates the target message according to the encrypted information;
    所述智能锁根据所述目标消息解锁,包括:The smart lock is unlocked according to the target message, including:
    所述智能锁根据所述加密信息和所述目标消息解锁。The smart lock is unlocked according to the encrypted information and the target message.
  3. 根据权利要求1或2所述的方法,其特征在于,所述终端设备采用第一发射功率向所述智能锁发送所述目标消息之前,还包括:The method according to claim 1 or 2, wherein before the terminal device uses the first transmit power to send the target message to the smart lock, the method further comprises:
    所述终端设备判断所述终端设备与所述智能锁的位置是否满足预设条件;The terminal device determines whether the positions of the terminal device and the smart lock satisfy a preset condition;
    所述终端设备采用第一发射功率向所述智能锁发送所述目标消息,包括:The terminal device uses the first transmit power to send the target message to the smart lock, including:
    若所述终端设备与所述智能锁的位置满足预设条件,则所述终端设备采用所述第一发射功率向所述智能锁发送所述目标消息。If the positions of the terminal device and the smart lock satisfy a preset condition, the terminal device sends the target message to the smart lock by using the first transmit power.
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述终端设备生成目标消息之前,还包括:The method according to any one of claims 1-3, wherein before the terminal device generates the target message, the method further comprises:
    所述智能锁发送所述智能锁的能力信息;所述能力信息用于指示所述智能锁是否支持无感解锁;The smart lock sends capability information of the smart lock; the capability information is used to indicate whether the smart lock supports sensorless unlocking;
    所述终端设备生成目标消息,包括:The terminal device generates a target message, including:
    若所述智能锁的能力信息指示所述智能锁支持无感解锁,则所述终端设备生成所述目标消息。If the capability information of the smart lock indicates that the smart lock supports sensorless unlocking, the terminal device generates the target message.
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1-4, characterized in that, further comprising:
    所述智能锁向所述终端设备发送响应消息,所述响应消息用于指示所述智能锁是否解锁成功。The smart lock sends a response message to the terminal device, where the response message is used to indicate whether the smart lock is successfully unlocked.
  6. 一种基于蓝牙的解锁方法,其特征在于,应用于终端设备,所述方法包括:A Bluetooth-based unlocking method, characterized in that it is applied to a terminal device, the method comprising:
    接收智能锁发送的低功耗蓝牙BLE广播消息,识别所述智能锁;Receive the low-power Bluetooth BLE broadcast message sent by the smart lock, and identify the smart lock;
    生成目标消息,所述目标消息用于指示所述智能锁解锁;generating a target message, the target message is used to instruct the smart lock to unlock;
    采用第一发射功率向所述智能锁发送所述目标消息,所述第一发射功率小于或等于第一阈值,所述第一阈值包括-50dBm。The target message is sent to the smart lock using a first transmit power, where the first transmit power is less than or equal to a first threshold, and the first threshold includes -50dBm.
  7. 根据权利要求6所述的方法,其特征在于,所述生成目标消息之前,还包括:The method according to claim 6, wherein before generating the target message, further comprising:
    接收所述智能锁发送的加密信息;Receive encrypted information sent by the smart lock;
    所述生成目标消息,包括:The generating target message includes:
    根据所述加密信息生成所述目标消息。The target message is generated according to the encrypted information.
  8. 根据权利要求7所述的方法,其特征在于,所述加密信息包括随机数;所述根据所述加密信息生成所述目标消息,包括:The method according to claim 7, wherein the encrypted information comprises a random number; and the generating the target message according to the encrypted information comprises:
    根据预设加解密算法对所述随机数加密,生成加密随机数;Encrypt the random number according to a preset encryption and decryption algorithm to generate an encrypted random number;
    生成所述目标消息;所述目标消息包括所述加密随机数和解锁指令。The target message is generated; the target message includes the encrypted random number and an unlock instruction.
  9. 根据权利要求7所述的方法,其特征在于,所述加密信息包括非对称密钥对中的公钥;所述根据所述加密信息生成所述目标消息,包括:The method according to claim 7, wherein the encrypted information includes a public key in an asymmetric key pair; and the generating the target message according to the encrypted information includes:
    使用所述公钥加密解锁指令,生成加密解锁指令;using the public key to encrypt and unlock the instruction to generate an encrypted unlocking instruction;
    生成所述目标消息;所述目标消息包括所述加密解锁指令。The target message is generated; the target message includes the encrypted unlock instruction.
  10. 根据权利要求7-9中任一项所述的方法,其特征在于,所述加密信息携带在所述智能锁发送的BLE广播消息中。The method according to any one of claims 7-9, wherein the encrypted information is carried in a BLE broadcast message sent by the smart lock.
  11. 根据权利要求6-10中任一项所述的方法,其特征在于,所述采用第一发射功率向所述智能锁发送所述目标消息之前,还包括:The method according to any one of claims 6-10, wherein before the using the first transmit power to send the target message to the smart lock, the method further comprises:
    判断所述终端设备与所述智能锁的位置是否满足预设条件;Determine whether the position of the terminal device and the smart lock meets a preset condition;
    所述采用第一发射功率向所述智能锁发送所述目标消息,包括:The using the first transmit power to send the target message to the smart lock includes:
    若所述终端设备与所述智能锁的位置满足预设条件,则采用所述第一发射功率向所述智能锁发送所述目标消息。If the positions of the terminal device and the smart lock satisfy a preset condition, the target message is sent to the smart lock by using the first transmission power.
  12. 根据权利要求11所述的方法,其特征在于,所述判断所述终端设备与所述智能锁的位置是否满足预设条件,包括:The method according to claim 11, wherein the judging whether the positions of the terminal device and the smart lock meet a preset condition comprises:
    接收所述智能锁发送的测距广播消息;receiving a ranging broadcast message sent by the smart lock;
    判断所述测距广播消息的信号强度是否满足预设条件。Determine whether the signal strength of the ranging broadcast message satisfies a preset condition.
  13. 根据权利要求12所述的方法,其特征在于,所述智能锁包括至少一个天线,所述测距广播消息为所述智能锁通过任意一个所述天线发送的;The method according to claim 12, wherein the smart lock comprises at least one antenna, and the ranging broadcast message is sent by the smart lock through any one of the antennas;
    所述判断所述测距广播消息的信号强度是否满足预设条件,包括:The judging whether the signal strength of the ranging broadcast message satisfies a preset condition includes:
    判断所述测距广播消息的信号强度是否大于预设阈值。Determine whether the signal strength of the ranging broadcast message is greater than a preset threshold.
  14. 根据权利要求12或13所述的方法,其特征在于,所述智能锁包括第一天线和第二天线,所述智能锁安装在门上时,所述第一天线位于所述门的外侧,所述第二天线位于所述门的内侧,所述测距广播消息包括第一测距广播消息和第二测距广播消息,所述第一测距广播消息为所述智能锁通过所述第一天线发送的且包括第一标识信息,所述第一标识信息用于指示所述第一天线位于门外,所述第二测距广播消息为所述智能锁通过所述第二天线发送的且包括第二标识信息,所述第二标识信息用于指示所述第二天线位于门内;The method according to claim 12 or 13, wherein the smart lock comprises a first antenna and a second antenna, and when the smart lock is installed on a door, the first antenna is located outside the door, The second antenna is located inside the door, the ranging broadcast message includes a first ranging broadcast message and a second ranging broadcast message, and the first ranging broadcast message is for the smart lock to pass through the first ranging broadcast message. Sent by an antenna and including first identification information, the first identification information is used to indicate that the first antenna is located outside the door, and the second ranging broadcast message is sent by the smart lock through the second antenna and includes second identification information, the second identification information is used to indicate that the second antenna is located in the door;
    所述判断所述测距广播消息的信号强度是否满足预设条件,包括:The judging whether the signal strength of the ranging broadcast message satisfies a preset condition includes:
    判断所述第一测距广播消息的信号强度是否大于所述第二测距广播消息的信号强度。Determine whether the signal strength of the first ranging broadcast message is greater than the signal strength of the second ranging broadcast message.
  15. 根据权利要求6-14中任一项所述的方法,其特征在于,所述采用第一发射功率向所述智能锁发送所述目标消息,包括:The method according to any one of claims 6-14, wherein the using the first transmit power to send the target message to the smart lock comprises:
    采用所述第一发射功率持续向所述智能锁发送所述目标消息,直至达到预设发送时长或达到预设发送次数。The target message is continuously sent to the smart lock by using the first transmit power until a preset sending time or a preset number of sending times is reached.
  16. 根据权利要求6-15中任一项所述的方法,其特征在于,所述目标消息为BLE广播消息。The method according to any one of claims 6-15, wherein the target message is a BLE broadcast message.
  17. 根据权利要求6-16中任一项所述的方法,其特征在于,所述生成目标消息之前,还包括:The method according to any one of claims 6-16, wherein before the generating the target message, the method further comprises:
    接收所述智能锁发送的所述智能锁的能力信息;receiving the capability information of the smart lock sent by the smart lock;
    所述生成目标消息,包括:The generating target message includes:
    若所述智能锁的能力信息指示所述智能锁支持无感解锁,则生成所述目标消息。If the capability information of the smart lock indicates that the smart lock supports sensorless unlocking, the target message is generated.
  18. 根据权利要求6-17中任一项所述的方法,其特征在于,还包括:The method according to any one of claims 6-17, further comprising:
    接收所述智能锁发送的响应消息,所述响应消息用于指示所述智能锁是否解锁成功。A response message sent by the smart lock is received, where the response message is used to indicate whether the smart lock is successfully unlocked.
  19. 根据权利要求6-18中任一项所述的方法,其特征在于,所述识别所述智能锁之后,还包括:The method according to any one of claims 6-18, wherein after identifying the smart lock, the method further comprises:
    与所述智能锁建立BLE连接。Establish a BLE connection with the smart lock.
  20. 一种基于蓝牙的解锁方法,其特征在于,应用于智能锁,所述方法包括:A Bluetooth-based unlocking method, characterized in that, applied to a smart lock, the method comprising:
    发送低功耗蓝牙BLE广播消息;Send low energy bluetooth BLE broadcast message;
    发送加密信息;send encrypted messages;
    接收终端设备发送的目标消息,所述目标消息用于指示所述智能锁解锁;receiving a target message sent by a terminal device, where the target message is used to instruct the smart lock to be unlocked;
    根据所述加密信息和所述目标消息解锁。Unlock according to the encrypted information and the target message.
  21. 根据权利要求20所述的方法,其特征在于,所述加密信息包括随机数,所述目标消息包括加密随机数和解锁指令,所述加密随机数是所述终端设备根据预设加解密算法对所述随机数加密生成的;The method according to claim 20, wherein 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 the encrypted random number obtained by the terminal device according to a preset encryption and decryption algorithm. The random number is encrypted and generated;
    所述根据所述加密信息和所述目标消息解锁,包括:The unlocking according to the encrypted information and the target message includes:
    根据所述预设加解密算法对所述加密随机数解密,得到解密随机数;Decrypt the encrypted random number according to the preset encryption and decryption algorithm to obtain a decrypted random number;
    若所述解密随机数与所述随机数相同,则根据所述解锁指令解锁。If the decryption random number is the same as the random number, unlock according to the unlocking instruction.
  22. 根据权利要求20所述的方法,其特征在于,所述加密信息包括非对称密钥对中的公钥,所述目标消息包括加密解锁指令,所述加密解锁指令是所述终端设备根据所述公钥对所述解锁指令加密生成的;The method according to claim 20, wherein the encrypted information includes a public key in an asymmetric key pair, the target message includes an encrypted unlock instruction, and the encrypted unlock instruction is the The public key is generated by encrypting the unlocking instruction;
    所述根据所述加密信息和所述目标消息解锁,包括:The unlocking according to the encrypted information and the target message includes:
    根据所述非对称密钥对中的私钥对所述加密解锁指令解密,获得所述解锁指令;Decrypt the encrypted unlock instruction according to the private key in the asymmetric key pair to obtain the unlock instruction;
    根据所述解锁指令解锁。Unlock according to the unlocking instruction.
  23. 根据权利要求20-22中任一项所述的方法,其特征在于,所述加密信息携带在BLE广播消息中。The method according to any one of claims 20-22, wherein the encryption information is carried in a BLE broadcast message.
  24. 根据权利要求20-23中任一项所述的方法,其特征在于,所述接收终端设备发送的目标消息之前,还包括:The method according to any one of claims 20-23, wherein before the receiving the target message sent by the terminal device, the method further comprises:
    发送测距广播消息。Send a ranging broadcast message.
  25. 根据权利要求24所述的方法,其特征在于,所述智能锁包括N个天线,N大于或等于1,所述发送测距广播消息,包括:The method according to claim 24, wherein the smart lock includes N antennas, and N is greater than or equal to 1, and the sending a ranging broadcast message includes:
    通过所述N个天线中的至少一个天线发送所述测距广播消息。The ranging broadcast message is transmitted through at least one of the N antennas.
  26. 根据权利要求24所述的方法,其特征在于,所述智能锁包括第一天线和第二天线,所述智能锁安装在门上时,所述第一天线位于所述门的外侧,所述第二天线位于所述门的 内侧;所述发送测距广播消息,包括:The method according to claim 24, wherein the smart lock comprises a first antenna and a second antenna, and when the smart lock is installed on a door, the first antenna is located outside the door, the The second antenna is located on the inner side of the door; the sending of the ranging broadcast message includes:
    采用目标功率通过所述第一天线发送第一测距广播消息,以及,采用所述目标功率通过所述第二天线发送第二测距广播消息;所述第一测距广播消息包括指示第一天线位于门外的第一标识信息,第二测距广播消息包括指示第二天线位于门内的第二标识信息。A first ranging broadcast message is sent through the first antenna using a target power, and a second ranging broadcast message is sent through the second antenna using the target power; the first ranging broadcast message includes an indication of the first ranging broadcast message. The first identification information indicating that the 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. 根据权利要求20-26中任一项所述的方法,其特征在于,所述目标消息为所述终端设备发送的BLE广播消息。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. 根据权利要求20-27中任一项所述的方法,其特征在于,所述接收终端设备发送的目标消息之前,还包括:The method according to any one of claims 20-27, wherein before the receiving the target message sent by the terminal device, the method further comprises:
    发送所述智能锁的能力信息;所述能力信息用于指示所述智能锁是否支持无感解锁。Send capability information of the smart lock; the capability information is used to indicate whether the smart lock supports sensorless unlocking.
  29. 根据权利要求20-28中任一项所述的方法,其特征在于,还包括:The method according to any one of claims 20-28, further comprising:
    向所述终端设备发送响应消息,所述响应消息用于指示所述智能锁是否解锁成功。Send a response message to the terminal device, where the response message is used to indicate whether the smart lock is unlocked successfully.
  30. 根据权利要求20-29中任一项所述的方法,其特征在于,所述接收终端设备发送的目标消息之前,还包括:The method according to any one of claims 20-29, wherein before the receiving the target message sent by the terminal device, the method further comprises:
    与所述终端设备建立BLE连接。A BLE connection is established with the terminal device.
  31. 一种终端设备,其特征在于,所述终端设备包括处理器,所述处理器用于与存储器耦合,并读取存储器中的指令并根据所述指令使得所述终端设备执行如权利要求6-19中任一项所述的方法。A terminal device, characterized in that the terminal device includes a processor, and the processor is configured to be coupled with a memory, and read instructions in the memory and cause the terminal device to execute the execution according to the instructions according to claims 6-19. The method of any of the above.
  32. 一种智能锁,其特征在于,所述智能锁包括处理器,所述处理器用于与存储器耦合,并读取存储器中的指令并根据所述指令使得所述智能锁执行如权利要求20-30中任一项所述的方法。A smart lock, characterized in that the smart lock includes a processor, which is coupled to a memory, reads instructions in the memory, and causes the smart lock to perform as claimed in claims 20-30 according to the instructions The method of any of the above.
  33. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求6-19中任一项所述的方法,或者执行如权利要求20-30中任一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions, when the computer instructions are executed on an electronic device, the electronic device is made to perform any one of claims 6-19. A method as claimed in any one of claims 20-30, or performing a method as claimed in any one of claims 20-30.
  34. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在终端上运行时,使得所述终端执行如权利要求6-19中任一项所述的方法,或者执行如权利要求20-30中任一项所述的方法。A computer program product comprising instructions, characterized in that, when the computer program product is run on a terminal, the terminal is made to execute the method according to any one of claims 6-19, or to execute the method according to claim 6. The method of any one of 20-30.
PCT/CN2022/082054 2021-03-24 2022-03-21 Bluetooth-based unlocking method, terminal device, smart lock and storage medium WO2022199533A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110314750.6 2021-03-24
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
WO2022199533A1 true WO2022199533A1 (en) 2022-09-29

Family

ID=83395165

Family Applications (1)

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

Country Status (2)

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

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104103111A (en) * 2014-07-19 2014-10-15 张明 Automatic access control system based on mobile phone Bluetooth communication and implementation method 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
CN108133523A (en) * 2016-12-01 2018-06-08 阿里巴巴集团控股有限公司 Door-access control method and device
CN108541324A (en) * 2016-12-27 2018-09-14 深圳易马达科技有限公司 A kind of unlocking method of electronic lock device, client and its electronic lock device
EP3444173A1 (en) * 2017-08-17 2019-02-20 MOBIT BELGIUM, besloten vennootschap met beperkte aansprakelijkheid Public bike sharing system

Family Cites Families (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
CN105406923B (en) * 2015-12-28 2018-07-17 惠州Tcl移动通信有限公司 A kind of Bluetooth interconnection method and system of 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
CN110139262B (en) * 2019-06-10 2022-06-14 Oppo广东移动通信有限公司 Bluetooth communication control method and related product
CN111798691B (en) * 2020-05-29 2023-05-05 领翌技术(横琴)有限公司 Control method and system for parking space ground lock

Patent Citations (5)

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

Also Published As

Publication number Publication date
CN115206003A (en) 2022-10-18

Similar Documents

Publication Publication Date Title
WO2020143414A1 (en) Wireless network access method, device, equipment and system
US11934505B2 (en) Information content viewing method and terminal
US10341860B2 (en) Learned dual band WIFI network association
US10951592B2 (en) Secure wireless communication between controllers and accessories
WO2020233538A1 (en) Method for accessing wireless local area network and terminal
US20220207189A1 (en) Secure storage device
WO2016082801A1 (en) Method and device for establishing wireless connection
KR101830940B1 (en) Porting wifi settings
KR20160010236A (en) processing Method and apparatus for provisioning profile
JP2016528844A (en) Network connection method, hotspot terminal and management terminal
CN108476460B (en) Method for establishing hotspot connection and terminal equipment
WO2019019185A1 (en) Method for updating network access application authentication information, terminal and server
JP2016127598A (en) Communication control apparatus, authentication device, central control apparatus and communication system
US20230344626A1 (en) Network connection management method and apparatus, readable medium, program product, and electronic device
CN112291100A (en) Network distribution method, network distribution device and storage medium
CN110557845B (en) Configuring accessory network connections
CN114584613B (en) Message pushing method, message pushing system and electronic equipment
WO2022143130A1 (en) Application program login method and system
WO2021164312A1 (en) Wireless network information configuration method and apparatus for device
KR20200116059A (en) Method and system for data transmission between a sensor device and an electronic device
KR20140128764A (en) Method for connectivity information control and an electronic device thereof
KR102072725B1 (en) METHOD FOR LINKING IoT DEVICE AND USER TERMINAL, IoT DEVICE MANAGING SERVER AND SYSTEM FOR SAME
WO2022199533A1 (en) Bluetooth-based unlocking method, terminal device, smart lock and storage medium
US20210385088A1 (en) Network access method, user equipment, network entity, and storage medium
WO2019204039A1 (en) System, method and processor-readable storage media cellular extension on a datalink layer communication channel

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22774192

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22774192

Country of ref document: EP

Kind code of ref document: A1