Door lock unlocking methods and devices, storage media and electronic devices
By using facial image recognition and identification code verification, the security risks of remote unlocking are resolved, ensuring the security and identity verification of remote unlocking.
Patent Information
- Application Number
- CN202310215771.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2043-02-28
AI Technical Summary
Existing remote unlocking methods pose significant security risks and cannot verify the identity of the person opening the door, leading to accidental unlocking or security threats.
By detecting the facial image of the target object, a first identification code is generated and an unlocking command is sent to the control terminal. The control terminal determines whether to unlock the door lock based on the facial image and the second identification code, and verifies it by combining the pre-generated first identification code.
This effectively prevents criminals from capturing unlocking commands through network packet sniffing, ensuring the security of remote unlocking and verifying the identity of the person opening the door.
Smart Images

Figure CN116311614B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart home technology, and more specifically, to a door lock unlocking method and device, storage medium and electronic device. Background Technology
[0002] With the rapid development of the Internet of Things (IoT), current door locks can support remote opening and closing using IoT communication methods. Specifically, users can remotely control the lock to open it. However, this method poses a significant security risk. If criminals capture the unlocking command through network packet sniffing, they can use it to arbitrarily open the smart lock, compromising the safety of users' lives and property. Furthermore, because the person unlocking the door cannot be clearly seen when using remote unlocking, accidental opening can occur.
[0003] Regarding the issue that existing remote unlocking methods pose significant security risks, no effective solution has yet been proposed.
[0004] Therefore, it is necessary to improve the relevant technology to overcome the aforementioned defects. Summary of the Invention
[0005] This invention provides a door lock unlocking method and apparatus, storage medium and electronic device, to at least solve the problem of high security risks in existing remote unlocking methods.
[0006] According to one aspect of the present invention, a method for unlocking a door lock is provided, comprising: acquiring a facial image of the target object when a target object is detected to have an intention to open the door; sending an unlocking command to a control terminal, wherein the unlocking command is used to instruct the control terminal to determine whether to unlock the door lock based on the facial image; and determining whether to unlock the door lock based on a pre-generated first identification code and the second identification code when an opening command sent by the control terminal in response to the unlocking command is received, and the opening command carries a second identification code, wherein the first identification code is an identification code generated by the door lock according to a target algorithm.
[0007] In an exemplary embodiment, determining whether the target object has the intention to open the door is achieved by at least one of the following methods: determining that the target object has the intention to open the door when a control operation is detected, wherein the control operation includes at least: touching the unlocking component of the door lock; or determining that the target object has the intention to open the door when the target object stays in a preset area for a preset duration.
[0008] In an exemplary embodiment, sending an unlocking command to a control terminal includes: when the control terminal and the door lock have a communication connection, sending the unlocking command to the control terminal through the communication connection; wherein the communication connection includes one of the following: a local area network communication connection, a Bluetooth connection; when the control terminal and the door lock do not have a communication connection, sending the unlocking command to a cloud server to instruct the cloud server to send the unlocking command to the control terminal associated with the door lock.
[0009] In an exemplary embodiment, obtaining the door opening command sent by the control terminal in response to the unlocking command includes: obtaining the door opening command sent by the control terminal, wherein the door opening command is a command generated by the server when the control terminal determines that the target object is allowed to access based on the facial image; the server generates the door opening command through the second identification code when it determines that the control terminal has the authority to unlock the door lock.
[0010] In an exemplary embodiment, obtaining the door opening command sent by the control terminal in response to the unlocking command includes: if the unlocking command carries the first identification code, obtaining the first door opening command sent by the control terminal, wherein the second identification code carried in the first door opening command is an identification code generated by the control terminal based on the first identification code; if the unlocking command does not carry the first identification code, obtaining the second door opening command sent by the control terminal, wherein the second identification code carried in the second door opening command is an identification code generated by the control terminal through the target algorithm.
[0011] In an exemplary embodiment, determining whether to unlock the door lock based on the first identification code and the second identification code includes: determining whether the first identification code meets a time limit requirement; if the first identification code meets the time limit requirement and the first identification code and the second identification code are consistent, determining to unlock the door lock; if the first identification code does not meet the time limit requirement or the first identification code and the second identification code are inconsistent, determining not to unlock the door lock.
[0012] In an exemplary embodiment, when the door lock is determined to be unlocked based on a pre-generated first identifier and a second identifier, the method further includes: detecting whether the door lock is in a locked state at a preset time, wherein the preset time is a specified time after the door lock is unlocked; if the door lock is detected to be not in a locked state at the preset time, performing at least one of the following: sending a prompt message to the control terminal, instructing a playback device to play a prompt voice, or playing the prompt voice through the door lock; wherein the playback device is the device closest to the target object, and both the prompt message and the prompt voice are used to indicate that the door lock is not in a locked state.
[0013] According to another aspect of the present invention, a door lock unlocking device is also provided, comprising: an acquisition module, configured to acquire a facial image of the target object when a target object is detected to have an intention to open the door; a sending module, configured to send an unlocking command to a control terminal, wherein the unlocking command is configured to instruct the control terminal to determine whether to unlock the door lock based on the facial image; and a determination module, configured to determine whether to unlock the door lock based on a pre-generated first identification code and the second identification code when an opening command sent by the control terminal in response to the unlocking command is acquired, and the opening command carries a second identification code, wherein the first identification code is an identification code generated by the door lock according to a target algorithm.
[0014] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, wherein the computer program is configured to execute the above-described door lock unlocking method when it is run.
[0015] According to another aspect of the present invention, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the unlocking method of the door lock through the computer program.
[0016] This invention, upon detecting an intention to open a door by a target object, acquires the target object's facial image and sends an unlock command to a control terminal. The control terminal then determines whether to unlock the door based on the facial image. Furthermore, it determines whether to unlock the door based on a second identifier carried in the door-opening command sent by the control terminal in response to the unlock command, and a pre-generated first identifier. The first identifier is generated by the door lock according to a target algorithm. Because the door lock needs to determine whether to unlock based on its own generated identifier, it prevents criminals from intercepting unlocking commands through network packet sniffing, thus solving the high security risks associated with existing remote unlocking methods and ensuring the security of remote unlocking. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the hardware environment for a door lock unlocking method according to an embodiment of this application;
[0020] Figure 2 This is a flowchart of a door lock unlocking method according to an embodiment of the present invention;
[0021] Figure 3 This is a flowchart of another door lock unlocking method according to an embodiment of the present invention;
[0022] Figure 4 This is an overall flowchart of a door lock unlocking method according to an embodiment of the present invention;
[0023] Figure 5 This is a structural block diagram (a) of a door lock unlocking device according to an embodiment of the present invention;
[0024] Figure 6 This is a structural block diagram (II) of a door lock unlocking device according to an embodiment of the present invention. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] According to one aspect of the embodiments of this application, a method for unlocking a door lock is provided. This door lock unlocking method is widely applicable to whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligencehouse ecosystems. Optionally, in this embodiment, the above-mentioned door lock unlocking method can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1 As shown, server 104 is connected to terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.
[0028] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.
[0029] To address the aforementioned problems, this embodiment provides a door lock unlocking method, including but not limited to methods applied to door locks. Figure 2 This is a flowchart of a door lock unlocking method according to an embodiment of the present invention, the process including the following steps:
[0030] Step S202: If the target object is detected to have the intention to open the door, acquire the face image of the target object;
[0031] As an alternative example, the target audience is users who want to enter the room, including but not limited to: visitors.
[0032] In an exemplary embodiment, it can be determined whether the target object has the intention to open the door by at least one of the following: if the target object performs a control operation, it is determined that the target object has the intention to open the door, wherein the control operation includes at least: touching the unlocking component of the door lock; or if the target object stays in a preset area for a preset time period, it is determined that the target object has the intention to open the door.
[0033] It should be noted that the control operations also include: the target object making a target gesture, uttering a voice indicating that it wants to open the door, etc. Unlocking components include, but are not limited to, the unlock button on the door lock. The preset duration can be 2 minutes. The door lock can use its own built-in image acquisition device or an external image acquisition device to capture the target object's image and voice, thereby determining the target object's actions.
[0034] In this embodiment, by using the above method, it is possible to accurately determine whether the target object has the intention to open the door.
[0035] Step S204: Send an unlock command to the control terminal, wherein the unlock command is used to instruct the control terminal to determine whether to unlock the door lock based on the face image;
[0036] It should be noted that the control terminal includes, but is not limited to, mobile phones, tablets, etc. As an optional example, the unlock command may also carry a first identification code.
[0037] In an exemplary embodiment, step S204 can be implemented as follows: when there is a communication connection between the control terminal and the door lock, the unlocking command is sent directly to the control terminal through the communication connection; wherein the communication connection includes one of the following: local area network communication connection, Bluetooth connection; when there is no communication connection between the control terminal and the door lock, the unlocking command is sent to the cloud server to instruct the cloud server to send the unlocking command to the control terminal associated with the door lock.
[0038] In other words, the door lock checks if a control terminal has established a communication connection with it. If so, it sends the unlock command directly to the terminal with which it has established a communication connection. Otherwise, it sends the unlock command to the server, which then forwards the unlock command to the control terminal associated with the door lock. In this embodiment, the door lock can send unlock commands quickly and accurately using the above method.
[0039] Step S206: If the control terminal sends an opening command in response to the unlocking command and the opening command carries a second identifier code, determine whether to unlock the door lock based on the pre-generated first identifier code and the second identifier code, wherein the first identifier code is an identifier code generated by the door lock according to the target algorithm.
[0040] As an optional example, the door opening command may also carry a lock identifier, which the lock then uses to determine whether the door opening command is intended to unlock the lock.
[0041] As an optional example, the first identifier can be generated by the door lock when it detects that the target object has the intention to unlock, or it can be generated according to a time period (e.g., generated once every 5 minutes or once every half hour). The target algorithm can be an algorithm agreed upon with the control terminal, including but not limited to a random generation algorithm.
[0042] As an optional example, when the first identifier is generated by the door lock upon detecting an intention to unlock the door by a target object, the door lock needs to determine the target time when the intention to unlock the door is detected and the target time period in which the target time falls before using the target algorithm to generate the first identifier. Then, the target algorithm corresponding to the target time period is determined from an algorithm set, wherein the algorithm set contains algorithms corresponding to different time periods. Using the above technical solution can prevent criminals from cracking the target algorithm for generating the first identifier.
[0043] In an exemplary embodiment, obtaining the door opening command sent by the control terminal in response to the unlocking command includes: obtaining the door opening command sent by the control terminal, wherein the door opening command is a command generated by the server when the control terminal determines that the target object is allowed to access based on the facial image; the server generates the door opening command through the second identification code when it determines that the control terminal has the authority to unlock the door lock.
[0044] It should be noted that after receiving the unlock command, the control terminal will display the target object's facial image on the monitor. The user corresponding to the control terminal will then determine whether to allow the target object to access based on the facial image. If access is allowed, the control terminal will generate a second identification code and send the second identification code, user identification, and door lock identification to the server. The server will verify the user identification and door lock identification to determine whether the user has the authority to unlock the door. If the server verifies the user's identity, it will generate an opening command based on the door lock identification and the second identification code.
[0045] As an optional example, the server determines whether the control terminal has the authority to unlock the door lock by: determining whether the user corresponding to the control terminal has the authority to unlock the door lock.
[0046] In this embodiment, the above method can prevent terminals and users without unlocking permissions from issuing door-opening commands to the door lock, further ensuring the security of remote unlocking.
[0047] In an exemplary embodiment, obtaining the door opening command sent by the control terminal in response to the unlock command includes: if the unlock command carries the first identification code, obtaining the first door opening command sent by the control terminal, wherein the second identification code carried in the first door opening command is an identification code generated by the control terminal based on the first identification code; if the unlock command does not carry the first identification code, obtaining the second door opening command sent by the control terminal, wherein the second identification code carried in the second door opening command is an identification code generated by the control terminal through the target algorithm. It should be noted that the door opening command can be either the first door opening command or the second door opening command.
[0048] As an alternative example, if the unlocking command carries a first identifier, the control terminal can generate a second identifier based on an algorithm agreed upon with the door lock, where the second identifier is generated from the first identifier. For instance, the control terminal can directly use the first identifier as the second identifier. Then, after obtaining the second identifier, the door lock can verify it using the agreed-upon algorithm.
[0049] As an alternative example, if the unlocking command does not carry the first identifier code, the control terminal can generate the second identifier code according to the algorithm agreed upon with the door lock for generating the first identifier code.
[0050] In this embodiment, the control terminal generates a second identification code using an algorithm agreed upon with the door lock, which can further ensure the security of remote unlocking.
[0051] In an exemplary embodiment, the determination of whether to unlock the door lock based on the first identification code and the second identification code can be achieved through the following steps S11-S13:
[0052] Step S11: Determine whether the first identifier code meets the time limit requirement;
[0053] It should be noted that the time limit requirements include whether the generation of the first identifier code exceeds the preset time limit, which can be 1 minute, 2 minutes, etc.
[0054] Step S12: If it is determined that the first identification code meets the time limit requirement and the first identification code and the second identification code are consistent, then the door lock is unlocked;
[0055] It should be noted that if the second identifier is generated by the control terminal according to the algorithm agreed upon with the door lock to generate the second identifier from the first identifier, then the door lock also needs to verify the second identifier in conjunction with the agreed algorithm to generate the second identifier from the first identifier.
[0056] Step S13: If it is determined that the first identification code does not meet the time limit requirement, or that the first identification code and the second identification code are inconsistent, then the door lock is not unlocked.
[0057] Through steps S202-S206 above, when the target object is detected to have the intention to open the door, a facial image of the target object is acquired, and an unlocking command is sent to the control terminal. The control terminal is instructed to determine whether to unlock the door lock based on the facial image. Then, the control terminal determines whether to unlock the door lock based on the second identifier code carried in the door opening command sent in response to the unlocking command and a pre-generated first identifier code. The first identifier code is an identifier code generated by the door lock according to the target algorithm. Because the door lock needs to determine whether to unlock based on its own generated identifier code when unlocking, it avoids criminals from capturing unlocking commands through network packet sniffing and thus solves the problem of high security risks in existing remote unlocking methods, thereby ensuring the security of remote unlocking.
[0058] In an exemplary embodiment, when the door lock is determined to be unlocked based on a pre-generated first identifier and a second identifier, the method further includes the following steps S21-S22:
[0059] Step S21: Detect whether the door lock is in a locked state at a preset time, wherein the preset time is a specified time after the door lock is unlocked;
[0060] It should be noted that the preset time can be the 2nd minute, 5th minute, etc. after the door lock is unlocked. That is, the door lock needs to determine whether the target person has closed the door in time after the door is opened for the target person.
[0061] Step S22: If the door lock is detected to be not in the locked state at the preset time, perform at least one of the following: send a prompt message to the control terminal, instruct the playback device to play a prompt voice, or play the prompt voice through the door lock; wherein the playback device is the device closest to the target object, and both the prompt message and the prompt voice are used to prompt that the door lock is not in the locked state.
[0062] It should be noted that when the door lock is in the locked state, the door is closed and strangers cannot open the door from the outside.
[0063] As an alternative example, after the door lock sends a prompt message to the control terminal, the user can control the rotating component on the door through the control terminal to close the door, thereby locking the door lock.
[0064] In this embodiment, the above method can prevent the target from forgetting to close the door after entering.
[0065] Obviously, the embodiments described above are merely some embodiments of the present invention, and not all embodiments. To better understand the above method, the following description, in conjunction with embodiments, illustrates the process, but is not intended to limit the technical solutions of the embodiments of the present invention. Specifically:
[0066] In an optional embodiment, Figure 3 This is a flowchart of another door lock unlocking method according to an embodiment of the present invention, comprising the following steps:
[0067] Step S302: User binds door lock;
[0068] Specifically, users can use their mobile phones or central control screens to configure the network for the door lock and bind the door lock to their own accounts.
[0069] Step S304: The visitor clicks the door lock to make a call;
[0070] Specifically, the visitor clicks the call button on the door lock;
[0071] Step S306: Call notification on mobile phone / central control screen;
[0072] Specifically, the mobile app / central control screen receives a door lock call request and notifies the user of a visitor's arrival;
[0073] Step S308: Remotely unlock via mobile phone / central control screen;
[0074] Specifically, users can verify the visitor's identity by using a photo captured by the door lock on their mobile phone / central control screen, and then click the remote unlock button to unlock the door for the visitor after verifying their identity.
[0075] Step S310: Remotely unlock the door lock.
[0076] Specifically, the door lock receives an unlocking request from the user and then unlocks the door.
[0077] In an optional embodiment, Figure 4 This is an overall flowchart of a door lock unlocking method according to an embodiment of the present invention, wherein challengeCode is an identification code generated by the door lock each time it receives a visitor access request; optionally, the identification code is randomly generated; DeviceID: device identifier; UserID: user identifier; it should be noted that the cloud service and the door lock device need to agree on the encryption and decryption methods of the "device unlocking verification code" in advance; the cloud service has established a relationship between the door lock and the user and provides a communication channel.
[0078] Specifically, it involves the following steps:
[0079] 1. When a visitor clicks the remote unlock button, the door lock's business logic is triggered;
[0080] 2. The door lock generates a unique identifier, challengeCode, for this unlocking and saves it locally. The challengeCode is valid for 60 seconds and will be deleted after expiration.
[0081] 3. Capture visitor photos using the door lock camera module;
[0082] 4. The door lock sends a call request to the mobile phone, carrying the challenge code and a captured photo of the visitor;
[0083] 5. The mobile app or central control screen will notify the user of a door opening request and inform the user of a 60-second unlocking time.
[0084] 6. Users can view the captured photos of visitors to determine if they opened the door for a visitor;
[0085] 7. After selecting to open the door, click the remote door opening button to open the door;
[0086] 8. The mobile app or central control screen uses userID, DeviceID, and challengeCode to request a device unlock verification code from the cloud service;
[0087] 9. Cloud service verifies the validity of DeviceID and userID;
[0088] 10. Cloud service verifies the binding relationship between DeviceID and userID;
[0089] 11. The cloud service uses userID, DeviceID, challengeCode, and a pre-agreed encryption method with the door lock to generate a device unlocking verification code;
[0090] 12. Send a remote door opening request to the door lock from the mobile phone or central control screen, along with the device door opening verification code requested from the cloud;
[0091] 13. The door lock parses the userID, DeviceID, and challengeCode from the remote door opening verification code;
[0092] 14. The door lock verifies whether the DeviceID is the same as the local machine ID;
[0093] 15. Verify whether the door lock challengeCode is valid and whether it is a locally stored challengeCode;
[0094] 16. After the door lock verification is passed, unlock it;
[0095] 17. Delete the locally saved challengeCode from the door lock;
[0096] 18. The door lock will send a message indicating successful unlocking to the mobile phone or central control screen;
[0097] 19. The user is notified of successful unlocking via mobile app or central control screen.
[0098] It should be noted that in this embodiment, users can identify the person requesting the door opening through a photo to ensure business security. The challengeCode verification mechanism and the device and user authentication mechanism ensure the technical security of the door opening operation. This solves the problem that users cannot know the identity of the person opening the door remotely. Furthermore, through the above technical means, it can be ensured that even if the remote door opening command is captured by criminals, a second door opening cannot be performed.
[0099] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0100] This embodiment also provides a door lock unlocking device, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0101] Figure 5 This is a structural block diagram (I) of a door lock unlocking device according to an embodiment of the present invention, the device comprising:
[0102] The acquisition module 52 is used to acquire the face image of the target object when the target object is detected to have the intention to open the door;
[0103] The sending module 54 is used to send an unlocking command to the control terminal, wherein the unlocking command is used to instruct the control terminal to determine whether to unlock the door lock based on the face image;
[0104] The determining module 56 is used to determine whether to unlock the door lock based on a pre-generated first identifier code and the second identifier code when the control terminal sends an opening command in response to the unlocking command and the opening command carries a second identifier code. The first identifier code is an identifier code generated by the door lock according to a target algorithm.
[0105] Using the aforementioned device, upon detecting an intention to open the door by a target object, a facial image of the target object is acquired, and an unlocking command is sent to the control terminal. The control terminal is instructed to determine whether to unlock the door based on the facial image. Furthermore, the unlocking command sent by the control terminal in response to the unlocking command is compared with a pre-generated first identifier code to determine whether to unlock the door. The first identifier code is generated by the door lock according to a target algorithm. Because the door lock needs to determine whether to unlock based on its own generated identifier code, it prevents criminals from intercepting unlocking commands through network packet sniffing, thus solving the high security risks associated with existing remote unlocking methods and ensuring the security of remote unlocking.
[0106] In an exemplary embodiment, the acquisition module 52 is configured to determine whether the target object has the intention to open the door by at least one of the following: determining that the target object has the intention to open the door when it is detected that the target object has performed a control operation, wherein the control operation includes at least: touching the unlocking component of the door lock; determining that the target object has the intention to open the door when it is detected that the target object stays in a preset area for a preset time period exceeding a preset duration.
[0107] In an exemplary embodiment, the sending module 54 is further configured to send the unlocking command directly to the control terminal through the communication connection when the control terminal and the door lock have a communication connection; wherein the communication connection includes one of the following: a local area network communication connection and a Bluetooth connection; and when the control terminal and the door lock do not have a communication connection, send the unlocking command to a cloud server to instruct the cloud server to send the unlocking command to the control terminal associated with the door lock.
[0108] In an exemplary embodiment, the determining module 56 includes: an acquisition unit, configured to acquire an opening instruction sent by the control terminal, wherein the opening instruction is an instruction generated by the server when the control terminal determines that the target object is allowed to access the door based on the facial image; the server generates the opening instruction using the second identification code when it determines that the control terminal has the authority to unlock the door lock.
[0109] In an exemplary embodiment, the acquisition unit is further configured to acquire a first door opening command sent by the control terminal when the unlocking command carries the first identification code, wherein the second identification code carried in the first door opening command is an identification code generated by the control terminal based on the first identification code; and to acquire a second door opening command sent by the control terminal when the unlocking command does not carry the first identification code, wherein the second identification code carried in the second door opening command is an identification code generated by the control terminal through the target algorithm.
[0110] In an exemplary embodiment, the determining module 56 includes: a determining unit, configured to determine whether the first identification code meets the time limit requirement; if the first identification code meets the time limit requirement and the first identification code and the second identification code are consistent, determine to unlock the door lock; if the first identification code does not meet the time limit requirement or the first identification code and the second identification code are inconsistent, determine not to unlock the door lock.
[0111] In one exemplary embodiment, Figure 6This is a structural block diagram (II) of a door lock unlocking device according to an embodiment of the present invention. The device includes: a processing module 58, configured to, when determining that the door lock is to be unlocked based on a pre-generated first identifier and a second identifier, detect at a preset time whether the door lock is in a locked state, wherein the preset time is a specified time after the door lock is unlocked; and if the door lock is detected to be not in a locked state at the preset time, perform at least one of the following: send a prompt message to the control terminal, instruct a playback device to play a prompt voice, or play the prompt voice through the door lock; wherein the playback device is the device closest to the target object, and both the prompt message and the prompt voice are used to indicate that the door lock is not in a locked state.
[0112] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0113] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0114] S1, if the target object is detected to have the intention to open the door, obtain the face image of the target object;
[0115] S2, send an unlock command to the control terminal, wherein the unlock command is used to instruct the control terminal to determine whether to unlock the door lock based on the face image;
[0116] S3, when the control terminal sends an opening command in response to the unlocking command, and the opening command carries a second identification code, determine whether to unlock the door lock according to the pre-generated first identification code and the second identification code, wherein the first identification code is an identification code generated by the door lock according to the target algorithm.
[0117] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0118] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0119] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0120] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0121] S1, if the target object is detected to have the intention to open the door, obtain the face image of the target object;
[0122] S2, send an unlock command to the control terminal, wherein the unlock command is used to instruct the control terminal to determine whether to unlock the door lock based on the face image;
[0123] S3, when the control terminal sends an opening command in response to the unlocking command, and the opening command carries a second identification code, determine whether to unlock the door lock according to the pre-generated first identification code and the second identification code, wherein the first identification code is an identification code generated by the door lock according to the target algorithm.
[0124] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0125] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0126] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0127] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for unlocking a door lock, characterized in that, include: If the target object is detected to have the intention to open the door, the face image of the target object is acquired; Send an unlock command to the control terminal, wherein the unlock command is used to instruct the control terminal to determine whether to unlock the door lock based on the face image; When the control terminal receives an opening command sent in response to the unlocking command, and the opening command carries a second identification code, it is determined whether to unlock the door lock based on the pre-generated first identification code and the second identification code, wherein the first identification code is an identification code generated by the door lock according to the target algorithm; The step of determining whether to unlock the door lock based on the first identification code and the second identification code includes: determining whether the first identification code meets the time limit requirement; if the first identification code meets the time limit requirement and the first identification code and the second identification code are consistent, determining to unlock the door lock; if the first identification code does not meet the time limit requirement or the first identification code and the second identification code are inconsistent, determining not to unlock the door lock. The method further includes: when the first identifier is generated by the door lock when it detects that the target object has the intention to open the door, before the door lock generates the first identifier using the target algorithm, determining the target time when the target object has the intention to open the door; determining the target time period in which the target time is located; and determining the target algorithm corresponding to the target time period from the algorithm set, wherein the algorithm set contains algorithms corresponding to different time periods.
2. The method according to claim 1, characterized in that, Determining whether the target object has the intention to open the door can be done by at least one of the following: If the target object is detected to have performed a control operation, it is determined that the target object has the intention to open the door, wherein the control operation includes at least: touching the unlocking component of the door lock; If the target object is detected to have stayed in the preset area for a period of time exceeding a preset duration, it is determined that the target object has the intention to open the door.
3. The method according to claim 1, characterized in that, Send an unlock command to the control terminal, including: When there is a communication connection between the control terminal and the door lock, the unlocking command is sent to the control terminal through the communication connection; wherein, the communication connection includes one of the following: local area network communication connection, Bluetooth connection; In the absence of a communication connection between the control terminal and the door lock, the unlocking command is sent to the cloud server to instruct the cloud server to send the unlocking command to the control terminal associated with the door lock.
4. The method according to claim 1, characterized in that, Obtaining the door opening command sent by the control terminal in response to the unlocking command includes: The system obtains an opening command sent by the control terminal, wherein the opening command is a command generated by the server when the control terminal determines that the target object is allowed to access the door based on the facial image; the server generates the opening command using the second identification code when it determines that the control terminal has the authority to unlock the door lock.
5. The method according to claim 1, characterized in that, Obtaining the door opening command sent by the control terminal in response to the unlocking command includes: If the unlocking command carries the first identification code, the first door opening command sent by the control terminal is obtained, wherein the second identification code carried in the first door opening command is an identification code generated by the control terminal based on the first identification code; If the unlocking command does not carry the first identification code, a second door opening command sent by the control terminal is obtained, wherein the second identification code carried in the second door opening command is an identification code generated by the control terminal through the target algorithm.
6. The method according to claim 1, characterized in that, When the door lock is determined to be unlocked based on a pre-generated first identifier and a second identifier, the method further includes: The system detects whether the door lock is in a locked state at a preset time, wherein the preset time is a specified time after the door lock is unlocked; If the door lock is detected to be not locked at the preset time, at least one of the following actions is performed: sending a prompt message to the control terminal, instructing a playback device to play a prompt voice message, or playing the prompt voice message through the door lock; wherein the playback device is the device closest to the target object, and both the prompt message and the prompt voice message are used to indicate that the door lock is not locked.
7. A door lock unlocking device, characterized in that, include: The acquisition module is used to acquire the face image of the target object when the target object is detected to have the intention to open the door; The sending module is used to send an unlocking command to the control terminal, wherein the unlocking command is used to instruct the control terminal to determine whether to unlock the door lock based on the face image; The determining module is used to determine whether to unlock the door lock based on a pre-generated first identifier code and the second identifier code when the control terminal sends an opening command in response to the unlocking command and the opening command carries a second identifier code. The first identifier code is an identifier code generated by the door lock according to the target algorithm. The determining module is further configured to determine whether the first identification code meets the time limit requirement; if the first identification code meets the time limit requirement and the first identification code and the second identification code are consistent, determine to unlock the door lock; if the first identification code does not meet the time limit requirement or the first identification code and the second identification code are inconsistent, determine not to unlock the door lock. The device is further configured to, when the first identifier is generated by the door lock when it detects that the target object has the intention to open the door, determine the target time when the door lock detects that the target object has the intention to open the door before using the target algorithm to generate the first identifier; determine the target time period in which the target time is located; and determine the target algorithm corresponding to the target time period from the algorithm set, wherein the algorithm set contains algorithms corresponding to different time periods.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method of any one of claims 1 to 6.
9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 6 through the computer program.
Citation Information
Patent Citations
Unlocking method and device of intelligent door lock
CN110047185A
Door lock control method and device, equipment and storage medium
CN112381971A
Access control device based on face recognition and access control management system
CN114187684A