Security verification method, electronic device and medium
By using randomly generated key factors and verification keys in the smart door lock system for identity verification, the problems of password blasting and network attacks in the existing technology are solved, and the security and verification efficiency of the door lock are improved.
Patent Information
- Application Number
- CN202010833896.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-18
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-08-18
AI Technical Summary
Existing smart door locks have the risk of password blasting and network attacks during the security verification process, threatening access security.
By randomly generating key factors between the door lock, the guest terminal and the cloud, the verification key is generated and matched with the authorized key to complete the identity verification, avoiding the risk of password being cracked and stolen after the communication connection, and simplifying Security verification process.
It improves the security of identity verification, prevents illegal access, simplifies the security verification process, and enhances the security of door lock access.
Smart Images

Figure CN114155630B
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet, and in particular to a security verification method, electronic device and medium. Background Art
[0002] With the development of the Internet of Things (IoT), smart door locks are gaining popularity and are widely used in various scenarios, including personal residences, rental apartments, student dormitories, and offices. They currently support a variety of door unlocking methods, including digital passwords, fingerprints, and access cards. Digital locks offer a convenient authorized unlocking method, temporarily authenticating the visitor's password, allowing access even when the owner is not present.
[0003] Currently, door locks typically perform security verification by first establishing a Bluetooth connection and then completing unlock authentication through signaling or file transfer. The visitor and door lock encrypt and decrypt the transmitted content to verify the correct encryption and decryption, or to verify the identity by matching the decrypted file with locally configured information. This solution poses the risk of password cracking once the door lock is connected via Bluetooth, threatening access security. Alternatively, door lock security verification can be performed by a cloud server. If the cloud successfully compares the visitor information with the door lock's information, the cloud server notifies the door lock to directly unlock the door. However, since the cloud server's notification to the door lock to unlock the door is transmitted over the network, there is a risk of network manipulation and unlocking the door. Summary of the Invention
[0004] The embodiments of the present application provide a security verification method, electronic device, and medium to improve the security of door lock identity verification.
[0005] The embodiment of the present application discloses a security verification method, which is executed by a door lock terminal, and the method includes:
[0006] In response to a communication connection request sent by a visitor terminal, a key factor is randomly generated;
[0007] sending the key factor to the visitor terminal, and receiving a verification key generated by the visitor terminal according to the key factor and an identifier of the visitor terminal;
[0008] Matching the verification key with the authorized key to perform security verification on the identity of the visitor terminal;
[0009] The authorized key is generated according to the identifier of the authorized terminal within the authorization validity period and the key factor.
[0010] The above-described embodiment has the following advantages or beneficial effects: By deploying the security verification process during the communication connection authentication phase, compared to the current solution of transmitting the unlocking password to the visitor terminal after establishing a communication connection and completing unlocking authentication via signaling / file transfer, the present embodiment avoids the problem of the connection password being cracked after the communication connection is established, as well as the risk of the unlocking password being stolen during transmission, thereby improving the security of identity verification. Furthermore, because security verification is completed during the communication connection authentication process, the security verification process is simplified. Furthermore, the key factors in the verification key and the authorized key are randomly generated, making them impossible for unauthorized individuals to obtain or crack, thereby further improving the security of verification.
[0011] The embodiment of the present application also discloses a security verification method, which is executed by a visitor terminal and includes:
[0012] Send a communication connection request to the door lock end;
[0013] receiving a key factor randomly generated by the door lock terminal in response to the communication connection request, and generating a verification key according to the key factor and an identifier of the visitor terminal;
[0014] Sending the verification key to the door lock end so that the door lock end matches the verification key with the authorized key and performs security verification on the identity of the visitor terminal;
[0015] The authorized key is generated by the door lock terminal according to the identifier of the authorized terminal within the authorization validity period and the key factor.
[0016] The above-described embodiment has the following advantages or beneficial effects: When the visitor terminal requests the door lock terminal to establish a communication connection, the door lock terminal completes the security verification of the visitor terminal. Compared with the current solution of transmitting the unlocking password to the visitor terminal after establishing a communication connection and completing the unlocking authentication through signaling / file transmission, the embodiment of the present application avoids the problem of the connection password being cracked after the communication connection is established, as well as the risk of the unlocking password being stolen during transmission, and can improve the security of identity authentication. In addition, since the security verification is completed during the communication connection authentication process, the security verification process is simplified. The visitor terminal generates a verification key based on the key factor and the visitor terminal identifier. The key factor is randomly generated by the door lock terminal, so it cannot be cracked or obtained by illegal visitors, thereby improving the security of the verification.
[0017] The present application also discloses a security verification method, which is executed by the cloud and includes:
[0018] Receive authorization verification information sent by the owner terminal, and send the authorization verification information to the visitor terminal;
[0019] receiving visitor terminal information returned by the visitor terminal in response to the authorization verification information, and performing authorization verification on the visitor terminal according to the visitor terminal information;
[0020] If the verification is successful, a random value is generated as the identifier of the visitor terminal, and the identifier of the visitor terminal and the door lock terminal information are sent to the visitor terminal, so that the visitor terminal sends a communication connection request to the door lock terminal according to the door lock terminal information, and generates a verification key according to the identifier of the visitor terminal and the key factor generated by the door lock terminal;
[0021] The visitor terminal is regarded as an authorized terminal, and the identifier of the visitor terminal is regarded as the identifier of the authorized terminal. The identifier of the authorized terminal and the authorization validity period are sent to the door lock end, so that the door lock end generates an authorized key based on the generated key factor and the identifier of the authorized terminal within the authorization validity period.
[0022] The above embodiment has the following advantages or beneficial effects: The visitor terminal identifier and the authorized terminal identifier are randomly generated, making it difficult for unauthorized visitors to decipher or obtain them, thereby ensuring the security of identity authentication. Furthermore, by sending the visitor terminal identifier to the visitor terminal and the authorized terminal identifier and authorization validity period to the door lock, the visitor terminal and the door lock generate a verification key and an authorized key for secure authentication during the communication connection phase, thereby improving the security and reliability of authentication.
[0023] The present application also discloses an electronic device, which includes:
[0024] at least one processor; and
[0025] a memory communicatively connected to the at least one processor; wherein,
[0026] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method executed by the door lock end as described in any embodiment of the present application, or execute the method executed by the visitor terminal as described in any embodiment of the present application, or execute the method executed by the cloud as described in any embodiment of the present application.
[0027] An embodiment of the present application also discloses a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the method executed by the door lock end as described in any embodiment of the present application, or to execute the method executed by the visitor terminal as described in any embodiment of the present application, or to execute the method executed by the cloud as described in any embodiment of the present application.
[0028] Other effects of the above optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present application.
[0030] Figure 1 1 is a flow chart of a security verification method performed by a door lock terminal according to an embodiment of the present application;
[0031] Figure 2 This is a security verification signaling diagram provided according to an embodiment of the present application;
[0032] Figure 3 1 is a flow chart of another security verification method performed by a door lock end according to an embodiment of the present application;
[0033] Figure 4 1 is a flow chart of a security verification method performed by a visitor terminal according to an embodiment of the present application;
[0034] Figure 5 This is a flowchart of a security verification method performed by the cloud according to an embodiment of the present application;
[0035] Figure 6 This is a schematic diagram of the structure of a safety verification device provided at a door lock end according to an embodiment of the present application;
[0036] Figure 7 2 is a schematic diagram of the structure of a security verification device configured in a visitor terminal according to an embodiment of the present application;
[0037] Figure 8 This is a schematic diagram of the structure of a security verification device configured in the cloud according to an embodiment of the present application.
[0038] Figure 9 3 is a block diagram of an electronic device used to implement the security verification method of an embodiment of the present application. DETAILED DESCRIPTION
[0039] The following description of exemplary embodiments of the present application is made in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0040] Figure 1This is a flow chart of a security verification method performed by a door lock end according to an embodiment of the present application. This embodiment is applicable to the case where the door lock end performs security verification on a door opening request from a visitor terminal. Typically, this embodiment is applicable to the case where the door lock end performs security verification on a door opening request from a visitor terminal when the visitor terminal requests to establish a communication connection. The security verification method disclosed in this embodiment can be executed by a security verification device configured on the door lock end, which can be implemented by software and / or hardware and can be configured in an electronic device. See Figure 1 The security verification method provided by the door lock terminal in this embodiment includes:
[0041] S110 : Responding to the communication connection request sent by the visitor terminal, randomly generating a key factor.
[0042] In an embodiment of the present application, the visitor terminal may be a mobile phone, a tablet computer, a wearable device, etc. The visitor terminal is configured with a small program or an APP for interacting with the owner terminal and the door lock terminal. The owner terminal and the door lock terminal may also be configured with a small program or an APP for interaction. The owner terminal may be a mobile phone, a tablet computer, a wearable device, etc. The communication connection is a physical communication link, such as a Bluetooth connection. Due to its single-channel transmission, the physical communication link avoids the risk of theft during data transmission and is more secure than Internet transmission. In addition, there is a distance limit for Bluetooth connection, which further improves the security of communication.
[0043] In an embodiment of the present application, before responding to the communication connection request sent by the visitor terminal, the method further includes: receiving the identifier of the authorized terminal and the authorization validity period sent by the cloud; if there is an authorized terminal within the authorization validity period, receiving the communication connection request sent by the visitor terminal.
[0044] For example, by default, if the number of devices allowed to connect and pair stored on the door lock is less than or equal to the number of owner terminals, the Bluetooth of the door lock is in a state where it cannot be searched and paired by other devices. If the cloud successfully verifies the authorization of the visitor terminal, the information of the visitor terminal will be sent to the door lock, and the door lock will add the visitor terminal as an authorized terminal and update the number of devices allowed to connect and pair. At this time, the number of devices allowed to connect and pair is greater than the number of owner terminals, that is, there are authorized terminals within the authorization validity period. The door lock allows itself to be searched by other devices and receive communication connection requests from other devices. Figure 2As shown, if a visitor terminal requests to open the door lock, it searches for the door lock's Bluetooth signal based on locally stored information about the door lock and sends a Bluetooth connection request to the door lock for pairing. The door lock receives the connection request from the visitor terminal, responds, and generates a key factor. The key factor is a single, random value; a new key factor is generated for each connection request. Because of its single, random nature, the key factor is difficult for unauthorized visitors to crack or steal and reuse, enhancing security.
[0045] In the embodiment of the present application, before responding to the communication connection request sent by the visitor terminal, a visitor terminal authorization process is also included, such as Figure 2 As shown, specifically, the owner's terminal accesses their WeChat friends list or contact list through a mini-program or app, selects authorized users from the list, and sets the validity period for authorized access to the door lock. The mini-program or app generates an invitation link and sends it to the guest terminal via the cloud. The guest terminal opens the invitation link through the mini-program or app and logs in using WeChat or their mobile phone number, allowing the cloud to retrieve the guest's login information, such as their WeChat ID or mobile phone number. The cloud then matches the guest's login information with the information of the authorized user selected by the owner. If a match is found, the guest terminal is authorized and becomes authorized. After successful authorization, the cloud generates a random value as the authorized user's identifier and sends it to the guest terminal as its identifier. Since the authorized user's identifier is a random value generated by the cloud and is only sent to the guest terminal, it cannot be accessed by other unauthorized guest terminals. Therefore, when verifying access based on the guest terminal's identifier, unauthorized guest terminals will fail verification due to lack of the correct identifier, thus ensuring secure access to the door lock. The cloud sends door lock information to the visitor terminal, such as the door lock's MAC address, or identifiers such as the door lock's MAC address and product serial number. Furthermore, the cloud sends the door lock the identifier of the authorized terminal and the authorization validity period. The door lock records the number of authorized terminals within the authorization validity period and records the number of paired devices allowed to connect as AllowedNum. If a new authorized terminal is added, AllowedNum+1. The door lock makes a validity judgment on the authorized terminal based on its authorization validity period. If the authorized terminal is not within the authorization validity period, it is determined to be an invalid terminal and the number of devices allowed to connect is updated. For example, the number of paired devices allowed to connect is recorded as AllowedNum-1.
[0046] S120: Send the key factor to the visitor terminal, and receive a verification key generated by the visitor terminal according to the key factor and an identifier of the visitor terminal.
[0047] Exemplarily, after the door lock generates a key factor, it sends it to the visitor terminal. The visitor terminal receives the key factor and generates a verification key based on the key factor and the visitor terminal's identifier. The visitor terminal's identifier is stored in the visitor terminal. If the visitor terminal is an authorized terminal authorized by the owner terminal, the visitor terminal's identifier is the authorized terminal identifier issued by the cloud. If the visitor terminal is an unauthorized visitor terminal, the visitor terminal's identifier is not the authorized terminal identifier issued by the cloud and is inconsistent with the authorized terminal identifier. The visitor terminal generates a verification key based on the key factor and the visitor terminal's identifier and sends it to the door lock, which then securely verifies the visitor terminal's identity using the verification key.
[0048] In an embodiment of the present application, the process of generating the verification key may be: encrypting the key factor using an encryption algorithm to obtain an encrypted key factor; generating the verification key based on the identifier of the visitor terminal and the encrypted key factor; or, encrypting the key factor, the door lock end identifier and the owner terminal identifier using an encryption algorithm to obtain an encrypted key factor; generating the verification key based on the identifier of the visitor terminal and the encrypted key factor; or, using the key factor as the encryption factor of the encryption algorithm, encrypting the door lock end identifier and the owner terminal identifier using the encryption algorithm to obtain an encrypted key factor; generating the verification key based on the identifier of the visitor terminal and the encrypted key factor; wherein the identifier of the authorized terminal is a random value generated by the cloud and associated with the authorized terminal.
[0049] Specifically, the visitor terminal generates a verification key C-KEY. C-KEY can be "visitor terminal identifier + encrypted (key factor)", "visitor terminal identifier + encrypted (key factor + door lock identifier + owner terminal identifier)", or "visitor terminal identifier + key factor algorithm (door lock identifier + owner terminal identifier)". The door lock identifier and owner terminal identifier can be sent to the visitor terminal by the cloud after authorization, or requested by the visitor terminal from the cloud before sending a communication connection request to the door lock.
[0050] S130. Match the verification key with the authorized key to perform security verification on the identity of the visitor terminal; wherein the authorized key is generated based on the identifier of the authorized terminal within the authorization validity period and the key factor.
[0051] The authorized key is generated by the door lock based on the identifier of an authorized terminal within the authorization validity period and the key factor. Each authorized terminal within the authorization validity period corresponds to an authorized key. For example, if the verification key and the authorized key are consistent, the guest terminal is determined to be a guest terminal within the authorization validity period, and the guest terminal's identity verification is confirmed to have succeeded. If the verification key and the authorized key are inconsistent, the guest terminal's identity verification is determined to have failed.
[0052] In an embodiment of the present application, before matching the verification key with the authorized key and performing security verification on the identity of the visitor terminal, the method further includes: encrypting the key factor using an encryption algorithm to obtain an encrypted key factor; generating an authorized key based on the identifier of the authorized terminal within the authorization validity period and the encrypted key factor; or, encrypting the key factor, the door lock end identifier and the owner terminal identifier using an encryption algorithm to obtain an encrypted key factor; generating an authorized key based on the identifier of the authorized terminal within the authorization validity period and the encrypted key factor; or, using the key factor as an encryption factor of the encryption algorithm, encrypting the door lock end identifier and the owner terminal identifier using the encryption algorithm to obtain an encrypted key factor; generating an authorized key based on the identifier of the authorized terminal within the authorization validity period and the encrypted key factor; wherein the identifier of the authorized terminal is a random value generated by the cloud and associated with the authorized terminal, and different authorized keys are generated according to different authorized terminal identifiers.
[0053] Exemplarily, the door lock end generates an authorized key E-KEY based on the identification of the authorized terminal and the key factor. The E-KEY can be "identification of the authorized terminal + encryption processing (key factor)", for example, E-KEY(1) = "authorized terminal id(1) + encryption processing (key factor P-KEY)"; E-KEY(2) = "authorized terminal id(2) + encryption processing (key factor P-KEY)"...E-KEY(n) = "authorized terminal id(n) + encryption processing (key factor P-KEY)". Alternatively, it may be "authorized terminal identification + encryption processing (key factor + door lock terminal identification + owner terminal identification)", for example, E-KEY(1) = "authorized terminal ID(1) + encryption processing (key factor P-KEY + door lock terminal identification + owner terminal identification)"; E-KEY(2) = "authorized terminal ID(2) + encryption processing (key factor P-KEY + door lock terminal identification + owner terminal identification)" ... E-KEY(n) = "authorized terminal ID(n) + encryption processing (key factor P-KEY + door lock terminal identification + owner terminal identification)". Alternatively, it may be "authorized terminal identification + key factor algorithm (door lock terminal identification + owner terminal identification)". For example, E-KEY(1) = "authorized terminal id(1) + encryption algorithm (key factor P-KEY)(door lock terminal identifier + owner terminal identifier)"; E-KEY(2) = "authorized terminal id(2) + encryption algorithm (key factor P-KEY)(key factor P-KEY+door lock terminal identifier + owner terminal identifier)" ... E-KEY(n) = "authorized terminal id(n) + encryption algorithm (key factor P-KEY)(key factor P-KEY+door lock terminal identifier + owner terminal identifier)". Different authorized keys are generated according to different authorized terminal identifiers. The number of authorized keys is the same as the number of authorized terminals within the authorization validity period, corresponding to the authorized terminals. Since the key factor is randomly generated and valid only once, the authorized key is also valid only once. When there is a new communication connection request, the authorized key is regenerated based on the authorized terminal currently within the authorization validity period. Since the key factor is randomly generated and valid only once, other illegal visitor terminals cannot crack or obtain it, so that the generated authorized key can be reliably used for security verification. If the verification key and the authorized key do not match, it can be determined that the visitor terminal corresponding to the verification key is not an authorized terminal within the authorization validity period, thereby improving the access security to the door lock end.
[0054] In the embodiment of the present application, after performing security verification on the identity of the visitor terminal, the method further includes: if the number of times the security verification result fails reaches a preset threshold, sending an alarm message to the owner terminal.
[0055] For example, if the number of times a certain visitor terminal fails security verification reaches a preset threshold, or the cumulative number of times two or more visitor terminals fail security verification reaches a preset threshold, there may be a situation where an illegal visitor attempts to access illegally multiple times, or there may be a situation where multiple illegal visitors access illegally, so an alarm message is sent to the terminal to remind the owner to pay attention and increase security vigilance.
[0056] The technical solution of the embodiment of the present application deploys the security verification process during the communication connection authentication phase. Compared with the current solution of transmitting the unlocking password to the visitor terminal after establishing a communication connection and completing the unlocking authentication through signaling / file transfer, the embodiment of the present application avoids the problem of the connection password being cracked after the communication connection is established, as well as the risk of the unlocking password being stolen during transmission, thereby improving the security of identity verification. Moreover, because the security verification is completed during the communication connection authentication process, the security verification process is simplified. In addition, the key factors in the verification key and the authorized key are randomly generated and cannot be obtained or cracked by unauthorized elements, thereby improving the security of verification.
[0057] Figure 3 This is a flow chart of another security verification method performed by the door lock end according to an embodiment of the present application. This embodiment is an optional solution proposed based on the above embodiment. Figure 3 The security verification method provided in this embodiment includes:
[0058] S210 : Responding to the communication connection request sent by the visitor terminal, randomly generating a key factor.
[0059] S220: Send the key factor to the visitor terminal, and receive a verification key generated by the visitor terminal according to the key factor and an identifier of the visitor terminal.
[0060] S230. Match the identifier of the visitor terminal in the verification key with the identifier of the authorized terminal in the authorized key to determine whether the match is successful; if not, execute S240; if successful, execute S250.
[0061] For example, the visitor terminal identifier can directly reflect the identity of the visitor terminal. Illegal visitors do not have the visitor terminal identifier issued after cloud authorization, so illegal visitors can be directly and quickly screened out through identifier matching. After the door lock receives the verification key sent by the visitor terminal, the identifier of the visitor terminal in the verification key is matched one by one with the identifier of the authorized terminal in the authorized key. If the visitor terminal is an authorized terminal saved by the door lock, the identifier of the visitor terminal can be matched with the identifier of the authorized terminal in one of the authorized keys of the door lock. In an embodiment of the present application, in order to improve the efficiency of security verification and quickly and efficiently screen out illegal visitors who are not authorized terminals, the identifier of the visitor terminal in the verification key is first matched with the identifier of the authorized terminal in the authorized key, thereby achieving the screening of illegal visitors.
[0062] S240: Determine that the visitor terminal is an unauthorized terminal or that the visitor terminal is not within the authorization validity period, and the security verification result is failure.
[0063] For example, since the authorized key is generated based on the identifier of the authorized terminal within the authorization validity period and the key factor, if the identifier of the visitor terminal in the verification key does not match the identifier of the authorized terminal in the authorized key, it means that the visitor terminal is not an authorized terminal, or although the visitor terminal is an authorized terminal, it is not within the authorization validity period. Therefore, the security verification result of the visitor terminal is determined to be failed, the visitor terminal is not allowed to establish a communication connection with the door lock terminal, and the door lock will not be opened.
[0064] S250: Match the encryption key factor in the verification key with the encryption key factor in the authorized key.
[0065] For example, if the identifier of the guest terminal in the verification key matches the identifier of the authorized terminal in the authorized key, further verification of the encryption key factor is required to provide a more comprehensive and in-depth verification process and enhance security. If the encryption factor in the verification key matches the encryption key factor in the authorized key, then the key factor in the encryption key factor of the verification key is determined to be consistent with the key factor in the encryption key factor of the authorized key. The key factor held by the guest terminal is the key factor issued by the cloud after authorization, and the guest terminal is therefore an authorized terminal.
[0066] In an embodiment of the present application, the identity of the visitor terminal is securely verified based on the encryption key factor in the verification key and the encryption key factor in the authorized key, including: matching the encryption key factor in the verification key with the encryption key factor in the authorized key; if the match is successful, determining that the security verification result is passed, establishing a communication connection with the visitor terminal and opening the door lock; if the match fails, determining that the security verification result is failed.
[0067] In an embodiment of the present application, after the identity of the visitor terminal is securely verified, the method further includes: if the security verification result of the visitor terminal is passed, updating the number of visitor terminals whose security verification results are passed; if the number of visitor terminals whose security verification results are passed is equal to or greater than the number of authorized terminals within the authorization validity period, refusing to receive the communication connection request sent by the visitor terminal.
[0068] For example, when the recorded security verification result shows that the number of passed visitor terminals is equal to the number of authorized terminals within the authorization period, it means that all authorized visitor terminals have passed verification and are recorded on the door lock terminal. For visitor terminals that are greater than the number of authorized terminals within the authorization validity period, it means that they are not authorized terminals within the authorization validity period. Therefore, when the security verification result shows that the number of passed visitor terminals is equal to or greater than the number of authorized terminals within the authorization validity period, the communication connection request sent by the visitor terminal is rejected, and the door lock terminal is in a state where it cannot be searched by other devices, thereby preventing access by illegal visitors and unnecessary verification processes for them.
[0069] In an embodiment of the present application, after performing security verification on the identity of the visitor terminal, the method further includes: if the security verification result of the visitor terminal is passed, determining the visitor terminal as a trusted terminal, so as to establish a communication connection with the trusted terminal when receiving a communication connection request from the trusted terminal.
[0070] For example, if the security verification result of the visitor terminal passes, the visitor terminal is determined to be a trusted terminal and added to the trusted list. When the trusted terminal sends a communication connection request again, a communication connection can be directly established with the trusted terminal and the door lock can be opened, thereby reducing unnecessary verification processes and improving unlocking efficiency.
[0071] In the embodiment of the present application, the identifier of the visitor terminal in the verification key is matched with the identifier of the authorized terminal in the authorized key, thereby quickly screening out unauthorized terminals or authorized terminals that are not within the authorization validity period, and further verification is performed based on the encryption key factor, thereby more comprehensively and accurately determining the identity of the visitor terminal, ensuring the security of access to the door lock, and avoiding illegal intrusion by illegal visitors.
[0072] Figure 4It is a flowchart of a security verification method performed by a visitor terminal according to an embodiment of the present application. This embodiment is applicable to the situation where a visitor terminal requests a door lock end to open the door, and the door lock end performs security verification. Typically, this embodiment is applicable to the situation where the door lock end performs security verification on the visitor terminal during the process of the visitor terminal requesting the door lock end to establish a communication connection. The security verification method disclosed in this embodiment can be executed by a security verification device configured in the visitor terminal, which can be implemented by software and / or hardware and can be configured in an electronic device. For details not fully described in the embodiments of the present application, such as explanations of terms, etc., please refer to the above embodiments. See Figure 4 The security verification method provided by the visitor terminal in this embodiment includes:
[0073] S310: Send a communication connection request to the door lock terminal.
[0074] For example, if the visitor terminal needs to open the door lock of the door lock end, the visitor terminal searches for the Bluetooth of the door lock end according to the information of the door lock end stored locally, and sends a communication connection request to the door lock end to perform Bluetooth pairing connection with the door lock end.
[0075] In the embodiment of the present application, by default, if the number of devices allowed to connect and pair stored on the door lock is less than or equal to the number of the owner's terminals, the door lock's Bluetooth is in a state where it cannot be searched and paired by other devices. If the cloud successfully verifies the authorization of the guest terminal, the guest terminal's information is sent to the door lock, and the door lock adds the guest terminal as an authorized terminal and updates the number of devices allowed to connect and pair. In this case, the number of devices allowed to connect and pair is greater than the number of the owner's terminals, and the door lock is allowed to be searched by other devices and receive communication connection requests from other devices.
[0076] In an embodiment of the present application, before sending a communication connection request to the door lock terminal, the method further includes: responding to the authorization verification information sent by the owner terminal, returning the visitor terminal information to the cloud, so that the cloud performs authorization verification on the visitor terminal based on the visitor terminal information; and receiving the door lock terminal information and the visitor terminal identifier sent by the cloud after the authorization verification is successful. Before sending a communication connection request to the door lock terminal, the method further includes: searching for door lock terminals within a preset range based on the door lock terminal information.
[0077] When a visitor terminal needs to access the door lock end, it searches for a door lock end matching the MAC address in the nearby range based on the door lock end's MAC address sent from the cloud, and sends a communication connection request to the door lock end, thereby selectively selecting the door lock end to send the communication connection request to avoid mistakenly connecting to other devices.
[0078] Exemplarily, before responding to a communication connection request from a guest terminal, a guest terminal authorization process is also included. Specifically, the owner terminal accesses a WeChat friend list or contact list through a mini-program or app, selects an authorized party from the list, and sets an authorization validity period for access to the door lock. The mini-program or app generates an invitation link and sends it to the guest terminal via the cloud. The guest terminal opens the invitation link through the mini-program or app and logs in using WeChat or a mobile phone number, allowing the cloud to obtain the guest terminal's login information, such as a WeChat ID or mobile phone number. The cloud matches the guest terminal's login information with the information of the authorized party selected by the owner terminal. If a match is successful, the guest terminal is authorized and becomes an authorized terminal. After successful authorization, the cloud generates a random value as an identifier for the authorized terminal and sends the authorized terminal identifier to the guest terminal as its identifier. Since the authorized terminal identifier is a random value generated by the cloud and is only sent to the guest terminal, it cannot be obtained by other unauthorized guest terminals. Therefore, when verifying the door lock terminal based on the guest terminal identifier, unauthorized guest terminals will not be able to pass verification due to lacking the correct identifier, thereby ensuring the security of door lock access. The cloud sends door lock information to the visitor terminal, such as the door lock's MAC address, or identifiers such as the door lock's MAC address and product serial number. The cloud also sends the door lock the identifier of the authorized terminal and the authorization validity period. The door lock verifies the validity of the authorized terminal based on the authorization validity period. If the authorized terminal is no longer within the authorization validity period, it is deemed invalid and the number of devices allowed to connect is updated.
[0079] S320: Receive a key factor randomly generated by the door lock end in response to the communication connection request, and generate a verification key according to the key factor and the identifier of the visitor terminal.
[0080] Exemplarily, after the door lock generates a key factor, it sends it to the visitor terminal. The visitor terminal receives the key factor and generates a verification key based on the key factor and the visitor terminal's identifier. The visitor terminal's identifier is stored in the visitor terminal. If the visitor terminal is an authorized terminal authorized by the owner terminal, the visitor terminal's identifier is the authorized terminal identifier issued by the cloud. If the visitor terminal is an unauthorized visitor terminal, the visitor terminal's identifier is not the authorized terminal identifier issued by the cloud and is inconsistent with the authorized terminal identifier. The visitor terminal generates a verification key based on the key factor and the visitor terminal's identifier and sends it to the door lock, which then securely verifies the visitor terminal's identity using the verification key.
[0081] In an embodiment of the present application, the process of generating the verification key may be: encrypting the key factor using an encryption algorithm to obtain an encrypted key factor; generating the verification key based on the identifier of the visitor terminal and the encrypted key factor; or, encrypting the key factor, the door lock end identifier and the owner terminal identifier using an encryption algorithm to obtain an encrypted key factor; generating the verification key based on the identifier of the visitor terminal and the encrypted key factor; or, using the key factor as the encryption factor of the encryption algorithm, encrypting the door lock end identifier and the owner terminal identifier using the encryption algorithm to obtain an encrypted key factor; generating the verification key based on the identifier of the visitor terminal and the encrypted key factor; wherein the identifier of the authorized terminal is a random value generated by the cloud and associated with the authorized terminal.
[0082] Specifically, the visitor terminal generates a verification key C-KEY. C-KEY can be "visitor terminal identifier + encrypted (key factor)", "visitor terminal identifier + encrypted (key factor + door lock identifier + owner terminal identifier)", or "visitor terminal identifier + key factor algorithm (door lock identifier + owner terminal identifier)". The door lock identifier and owner terminal identifier can be sent to the visitor terminal by the cloud after authorization, or requested by the visitor terminal from the cloud before sending a communication connection request to the door lock.
[0083] S330. Send the verification key to the door lock end so that the door lock end matches the verification key with the authorized key and performs security verification on the identity of the visitor terminal; wherein, the authorized key is generated by the door lock end based on the identification of the authorized terminal within the authorization validity period and the key factor.
[0084] The authorized key is generated by the door lock based on the identifier of an authorized terminal within the authorization validity period and the key factor. Each authorized terminal within the authorization validity period corresponds to an authorized key. For example, if the verification key and the authorized key are consistent, the guest terminal is determined to be a guest terminal within the authorization validity period, and the guest terminal's identity verification is confirmed to have succeeded. If the verification key and the authorized key are inconsistent, the guest terminal's identity verification is determined to have failed.
[0085] In an embodiment of the present application, the door lock end matches the verification key with the authorized key, and before performing security verification on the identity of the visitor terminal, it also includes: encrypting the key factor using an encryption algorithm to obtain an encrypted key factor; generating an authorized key based on the identifier of the authorized terminal within the authorization validity period and the encrypted key factor; or, encrypting the key factor, the door lock end identifier and the owner terminal identifier using an encryption algorithm to obtain an encrypted key factor; generating an authorized key based on the identifier of the authorized terminal within the authorization validity period and the encrypted key factor; or, using the key factor as the encryption factor of the encryption algorithm, encrypting the door lock end identifier and the owner terminal identifier using the encryption algorithm to obtain an encrypted key factor; generating an authorized key based on the identifier of the authorized terminal within the authorization validity period and the encrypted key factor; wherein, the identifier of the authorized terminal is a random value generated by the cloud and associated with the authorized terminal.
[0086] Exemplarily, the door lock end generates an authorized key E-KEY based on the identification of the authorized terminal and the key factor. The E-KEY can be "identification of the authorized terminal + encryption processing (key factor)", for example, E-KEY(1) = "authorized terminal id(1) + encryption processing (key factor P-KEY)"; E-KEY(2) = "authorized terminal id(2) + encryption processing (key factor P-KEY)"...E-KEY(n) = "authorized terminal id(n) + encryption processing (key factor P-KEY)". It can also be "authorized terminal identification + encryption processing (key factor + door lock end identification + owner terminal identification)", for example, E-KEY (1) = "authorized terminal id (1) + encryption processing (key factor P-KEY + door lock end identification + owner terminal identification)"; E-KEY (2) = "authorized terminal id (2) + encryption processing (key factor P-KEY + door lock end identification + owner terminal identification)"... E-KEY (n) = "authorized terminal id (n) + encryption processing (key factor P-KEY + door lock end identification + owner terminal identification)". It can also be "authorized terminal identification + key factor algorithm (door lock end identification + owner terminal identification)", for example, E-KEY (1) = "authorized terminal id (1) + encryption algorithm (key factor P-KEY) (door lock end identification + owner terminal identification)"; E-KEY (2) = "authorized terminal id (2) + encryption algorithm (key factor P-KEY) (key factor P-KEY + door lock end identification + owner terminal identification)"... E-KEY (n) = "authorized terminal id (n) + encryption algorithm (key factor P-KEY) (key factor P-KEY + door lock end identification + owner terminal identification)". Different authorized keys are generated according to different authorized terminal identifications. The number of authorized keys is the same as the number of authorized terminals within the authorization validity period, corresponding to the authorized terminals. Since the key factor is randomly generated and valid only once, the authorized key is also valid only once. When there is a new communication connection request, the authorized key is regenerated according to the authorized terminal currently within the authorization validity period. Since the key factor is randomly generated and valid only once, other illegal visitor terminals cannot crack or obtain it, so that the generated authorized key can be reliably used for security verification. If the verification key and the authorized key do not match, it can be determined that the visitor terminal corresponding to the verification key is not an authorized terminal within the authorization validity period, thereby improving the access security to the door lock end.
[0087] In the embodiment of the present application, when the visitor terminal requests to establish a communication connection with the door lock terminal, the door lock terminal completes the security verification of the visitor terminal. Compared with the current solution of transmitting the unlocking password to the visitor terminal after establishing a communication connection and completing the unlocking authentication through signaling / file transmission, the embodiment of the present application avoids the problem of the connection password being cracked after the communication connection is established, as well as the risk of the unlocking password being stolen during transmission, and can improve the security of identity authentication. In addition, since the security verification is completed during the communication connection authentication process, the security verification process is simplified. The visitor terminal generates a verification key based on the key factor and the visitor terminal's identifier. The key factor is randomly generated by the door lock terminal, so it cannot be cracked or obtained by illegal visitors, thereby improving the security of the verification.
[0088] Figure 5 This is a flow chart of a security verification method performed by the cloud according to an embodiment of the present application. This embodiment is applicable to the situation where the cloud authorizes the visitor terminal before the door lock performs security verification on the visitor terminal. Typically, this embodiment is applicable to the situation where the cloud authorizes the visitor terminal before the door lock performs security verification on the visitor terminal, and then sends authorization information to the door lock and the visitor terminal after the cloud authorizes the visitor terminal, so that the door lock can perform security verification on the visitor terminal based on the authorization information. The security verification method disclosed in this embodiment can be executed by a security verification device configured in the cloud, which can be implemented by software and / or hardware and can be configured in an electronic device. See Figure 5 The security verification method provided by this embodiment and executed by the cloud includes:
[0089] S410: Receive authorization verification information sent by the owner terminal, and send the authorization verification information to the visitor terminal.
[0090] For example, the owner's terminal accesses their WeChat friends list or contact list through a mini-program or app, selects authorized users, and sets a validity period for access to the door lock. The mini-program or app generates an invitation link, which is then sent to the guest terminal via the cloud. The guest terminal opens the invitation link through the mini-program or app and logs in using WeChat or their mobile phone number, allowing the cloud to access the guest terminal's login information, such as their WeChat ID or mobile phone number.
[0091] S420: Receive visitor terminal information returned by the visitor terminal in response to the authorization verification information, and perform authorization verification on the visitor terminal according to the visitor terminal information.
[0092] In an embodiment of the present application, authorization verification of the visitor terminal based on the visitor terminal information includes: matching the visitor terminal information with the visitor terminal information sent by the owner terminal; if a match is successful, determining that the authorization verification is successful. Exemplarily, the cloud matches the login information of the visitor terminal with the information of the authorization object selected by the owner terminal. If a match is successful, authorization of the visitor terminal is completed, and the visitor terminal is deemed an authorized terminal.
[0093] S430. If the verification is successful, a random value is generated as the identification of the visitor terminal, and the identification of the visitor terminal and the door lock end information are sent to the visitor terminal, so that the visitor terminal sends a communication connection request to the door lock end according to the door lock end information, and generates a verification key according to the identification of the visitor terminal and the key factor generated by the door lock end.
[0094] For example, after successful authorization, the cloud generates a random value as the identifier of the authorized terminal and sends the identifier of the authorized terminal to the visitor terminal as the visitor terminal's identifier. Since the identifier of the authorized terminal is a random value generated by the cloud and is only sent to the visitor terminal, other unauthorized visitor terminals cannot obtain it. Therefore, when verifying based on the visitor terminal's identifier, unauthorized visitor terminals will not be able to pass verification because they do not have the correct visitor terminal identifier, thereby ensuring the security of door lock access. The cloud sends door lock information to the visitor terminal, such as the door lock's MAC address, or identifiers such as the door lock's MAC address and product serial number.
[0095] S440: The visitor terminal is regarded as an authorized terminal, and the identifier of the visitor terminal is used as the identifier of the authorized terminal. The identifier of the authorized terminal and the authorization validity period are sent to the door lock end, so that the door lock end generates an authorized key according to the generated key factor and the identifier of the authorized terminal within the authorization validity period.
[0096] Exemplarily, the cloud sends the identification of the authorized terminal and the authorization validity period to the door lock end. The door lock end makes a validity judgment on the authorized terminal based on the authorization validity period of the authorized terminal. If the authorized terminal is no longer within the authorization validity period, it is determined to be an invalid terminal, and the number of devices allowed to connect is updated at the same time. If the visitor terminal has the need to open the door lock of the door lock end, the visitor terminal searches for the Bluetooth of the door lock end based on the information of the door lock end stored locally, and sends a communication connection request to the door lock end to perform Bluetooth pairing connection with the door lock end. The door lock end receives the communication connection request sent by the visitor terminal, responds to the communication connection request, and generates a key factor. The key factor is a random value generated once, and a new key factor is regenerated for each communication connection request. Due to the characteristics of single generation and randomness, the key factor is difficult to be cracked or stolen and reused by illegal visitors, thereby improving security.
[0097] The visitor terminal generates a verification key based on the key factor and the visitor terminal's identity and sends it to the door lock, which then securely verifies the visitor terminal's identity using the verification key. The door lock then generates an authorized key based on the identity of an authorized terminal within the authorization validity period and the key factor, matches the verification key with the authorized key, and securely verifies the visitor terminal's identity.
[0098] In this embodiment of the present application, the visitor terminal identifier and the authorized terminal identifier are randomly generated, making it difficult for unauthorized visitors to decipher or obtain them, thereby ensuring the security of identity verification. Furthermore, by sending the visitor terminal identifier to the visitor terminal and the authorized terminal identifier and authorization validity period to the door lock, the visitor terminal and the door lock generate a verification key and an authorized key for secure verification during the communication connection phase, thereby improving the security and reliability of verification.
[0099] Figure 6 This is a schematic diagram of the structure of a security verification device configured at a door lock end according to an embodiment of the present application. Figure 6 The embodiment of the present application discloses a security verification device 500 configured at the door lock end, and the device 500 includes: a key factor generation module 501, a verification key receiving module 502 and a security verification module 503.
[0100] The key factor generation module 501 is used to randomly generate a key factor in response to a communication connection request sent by a visitor terminal; the verification key receiving module 502 is used to send the key factor to the visitor terminal and receive a verification key generated by the visitor terminal based on the key factor and the visitor terminal identifier; and the security verification module 503 is used to match the verification key with an authorized key to perform security verification on the visitor terminal's identity.
[0101] The authorized key is generated according to the identifier of the authorized terminal within the authorization validity period and the key factor.
[0102] In an embodiment of the present application, the device further includes:
[0103] a first encryption key factor determination module, configured to encrypt the key factor using an encryption algorithm to obtain an encryption key factor;
[0104] A first authorized key generation module is configured to generate an authorized key according to an identifier of an authorized terminal within the authorization validity period and the encryption key factor; or
[0105] a second encryption key factor determination module, configured to encrypt the key factor, the door lock terminal identifier, and the owner terminal identifier using an encryption algorithm to obtain an encryption key factor;
[0106] A second authorized key generation module is configured to generate an authorized key according to the identifier of the authorized terminal within the authorization validity period and the encryption key factor; or
[0107] a third encryption key factor determination module, configured to use the key factor as an encryption factor of an encryption algorithm, and encrypt the door lock terminal identifier and the owner terminal identifier using the encryption algorithm to obtain an encryption key factor;
[0108] a third authorized key generation module, configured to generate an authorized key according to the identifier of the authorized terminal within the authorization validity period and the encryption key factor;
[0109] The identifier of the authorized terminal is a random value generated by the cloud and associated with the authorized terminal.
[0110] In the embodiment of the present application, the security verification module 503 includes:
[0111] an identification matching unit, configured to match the identification of the visitor terminal in the verification key with the identification of the authorized terminal in the authorized key;
[0112] an identification matching failure determining unit, configured to determine, if the matching fails, that the visitor terminal is an unauthorized terminal or that the visitor terminal is not within the authorization validity period, and the security verification result is a failure;
[0113] The identification matching success determination unit is configured to perform security verification on the identity of the visitor terminal based on the encryption key factor in the verification key and the encryption key factor in the authorized key if the match is successful.
[0114] In the embodiment of the present application, the identification matching success determination unit includes:
[0115] a factor matching subunit, configured to match the encryption key factor in the verification key with the encryption key factor in the authorized key;
[0116] a verification pass determination subunit, configured to determine that the security verification result is passed if the match is successful, establish a communication connection with the visitor terminal, and unlock the door;
[0117] The verification failure determination subunit is used to determine that the security verification result is failed if the match fails.
[0118] In an embodiment of the present application, the device further includes:
[0119] The alarm module is used to send an alarm message to the owner terminal if the number of times the security verification result fails reaches a preset threshold.
[0120] In an embodiment of the present application, the device further includes:
[0121] The authorization information receiving module is used to receive the identifier of the authorized terminal and the authorization validity period sent by the cloud;
[0122] The communication connection request receiving module is configured to receive a communication connection request sent by a visitor terminal if there is an authorized terminal within the authorization validity period.
[0123] In an embodiment of the present application, the device further includes:
[0124] a number updating module, configured to update the number of the visitor terminals whose security verification results are passed if the security verification result of the visitor terminal is passed;
[0125] The connection rejection module is configured to reject a communication connection request sent by a guest terminal if the number of guest terminals that have passed the security verification is equal to or greater than the number of authorized terminals within the authorization validity period.
[0126] In an embodiment of the present application, the device further includes:
[0127] The trusted terminal determining module is configured to determine the visitor terminal as a trusted terminal if the security verification result of the visitor terminal is passed, so as to establish a communication connection with the trusted terminal when receiving a communication connection request from the trusted terminal.
[0128] In the embodiment of the present application, the communication connection is a physical communication link.
[0129] The security verification device configured at the door lock end provided in the embodiment of the present application can execute the security verification method executed by the door lock end provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.
[0130] Figure 7 This is a schematic diagram of the structure of a security verification device configured in a visitor terminal according to an embodiment of the present application. Figure 7 The embodiment of the present application discloses a security verification device 600 configured in a visitor terminal, and the device 600 includes: a communication connection request sending module 601, a verification key generating module 602 and a verification key sending module 603.
[0131] Among them, the communication connection request sending module 601 is used to send a communication connection request to the door lock end; the verification key generation module 602 is used to receive the key factor randomly generated by the door lock end in response to the communication connection request, and generate a verification key based on the key factor and the identifier of the visitor terminal; the verification key sending module 603 is used to send the verification key to the door lock end, so that the door lock end matches the verification key with the authorized key and performs security verification on the identity of the visitor terminal;
[0132] The authorized key is generated by the door lock terminal according to the identifier of the authorized terminal within the authorization validity period and the key factor.
[0133] In this embodiment of the present application, the verification key generation module 602 includes:
[0134] a first encryption unit, configured to encrypt the key factor using an encryption algorithm to obtain an encrypted key factor;
[0135] a first verification key generating unit, configured to generate the verification key according to the identifier of the visitor terminal and the encryption key factor; or
[0136] a second encryption unit, configured to encrypt the key factor, the door lock terminal identifier, and the owner terminal identifier using an encryption algorithm to obtain an encrypted key factor;
[0137] a second verification key generating unit, configured to generate the verification key according to the identifier of the visitor terminal and the encryption key factor; or
[0138] a third encryption unit, configured to use the key factor as an encryption factor of an encryption algorithm, and encrypt the door lock terminal identifier and the owner terminal identifier using the encryption algorithm to obtain an encryption key factor;
[0139] a third verification key generating unit, configured to generate the verification key according to the identifier of the visitor terminal and the encryption key factor;
[0140] The identifier of the authorized terminal is a random value generated by the cloud and associated with the authorized terminal.
[0141] In an embodiment of the present application, the device further includes:
[0142] A response module, configured to respond to the authorization verification information sent by the owner terminal and return the visitor terminal information to the cloud, so that the cloud performs authorization verification on the visitor terminal according to the visitor terminal information;
[0143] The visitor information receiving module is used to receive the door lock terminal information and the identifier of the visitor terminal sent by the cloud after the authorization verification is passed.
[0144] In an embodiment of the present application, the device further includes:
[0145] The door lock terminal search module is used to search for a door lock terminal within a preset range according to the door lock terminal information.
[0146] The security verification device configured at the visitor terminal provided in the embodiment of the present application can execute the security verification method performed by the visitor terminal provided in any embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method.
[0147] Figure 8 This is a schematic diagram of the structure of a security verification device configured in the cloud according to an embodiment of the present application. Figure 8 , an embodiment of the present application discloses a security verification device 600 configured in the cloud, the device 700 includes: an authorization verification information sending module 701, an authorization verification module 702, a random value generation module 703 and an authorization information sending module 704.
[0148] Among them, the authorization verification information sending module 701 receives the authorization verification information sent by the owner terminal and sends the authorization verification information to the visitor terminal; the authorization verification module 702 is used to receive the visitor terminal information returned by the visitor terminal in response to the authorization verification information, and perform authorization verification on the visitor terminal according to the visitor terminal information; the random value generation module 703 is used to generate a random value as the identification of the visitor terminal if the verification is passed, and send the identification of the visitor terminal and the door lock end information to the visitor terminal, so that the visitor terminal sends a communication connection request to the door lock end according to the door lock end information, and generates a verification key according to the identification of the visitor terminal and the key factor generated by the door lock end; the authorization information sending module 704 is used to take the visitor terminal as an authorized terminal and the identification of the visitor terminal as the identification of the authorized terminal, and send the identification of the authorized terminal and the authorization validity period to the door lock end, so that the door lock end generates an authorized key according to the generated key factor and the identification of the authorized terminal within the authorization validity period.
[0149] In this embodiment of the present application, the authorization verification module 702 includes:
[0150] an information matching unit, configured to match the visitor terminal information with the visitor terminal information sent by the owner terminal;
[0151] The pass determination unit is used to determine that the authorization verification is passed if the match is successful.
[0152] In the embodiment of the present application, the door lock terminal information includes the MAC address of the door lock terminal; or,
[0153] The door lock terminal information includes the door lock terminal's MAC address and product serial number.
[0154] The security verification device configured on the cloud provided in the embodiment of the present application can execute the security verification method executed by the cloud provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.
[0155] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.
[0156] like Figure 9 As shown, Figure 9 1 is a block diagram of an electronic device for implementing the security verification method of an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, electronic devices, blade electronic devices, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable electronic devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0157] like Figure 9 As shown, the electronic device includes: one or more processors 801, a memory 802, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The electronic device can implement a method executed by the door lock end, or execute a method executed by the visitor terminal, or execute a method executed by the cloud. The various components are interconnected using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display electronic device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, each electronic device providing part of the necessary operations (for example, as an electronic device array, a group of blade electronic devices, or a multi-processor system). Figure 9 A processor 801 is taken as an example.
[0158] Memory 802 is the non-transitory computer-readable storage medium provided in this application. The memory stores instructions executable by at least one processor to cause the at least one processor to perform the security verification method provided in this application. The non-transitory computer-readable storage medium of this application stores computer instructions for causing a computer to perform the security verification method provided in this application.
[0159] The memory 802 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as the program instructions / modules corresponding to the security verification method in the embodiment of the present application (for example, Figure 6 The key factor generation module 501, the verification key receiving module 502 and the security verification module 503 shown, or Figure 7 The communication connection request sending module 601, the verification key generating module 602 and the verification key sending module 603 shown, or Figure 8 The authorization verification information sending module 701, the authorization verification module 702, the random value generation module 703 and the authorization information sending module 704 are shown. Figure 6 When the key factor generation module 501, the verification key receiving module 502 and the security verification module 503 are shown, the electronic device is a door lock terminal. Figure 7 When the communication connection request sending module 601, the verification key generating module 602 and the verification key sending module 603 are shown, the electronic device is a visitor terminal. Figure 8 When the authorization verification information sending module 701, the authorization verification module 702, the random value generation module 703, and the authorization information sending module 704 are shown, the electronic device is a cloud device. The processor 801 executes the non-transient software programs, instructions, and modules stored in the memory 802 to execute various functional applications and data processing of the electronic device, that is, to implement the security verification method in the above method embodiment.
[0160] The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created based on the use of the securely verified electronic device, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 802 may optionally include a memory remotely located relative to the processor 801, and these remote memories may be connected to the securely verified electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0161] The electronic device of the security verification method may further include: an input device 803 and an output device 804. The processor 801, the memory 802, the input device 803 and the output device 804 may be connected via a bus or other means. Figure 9 The bus connection is taken as an example.
[0162] The input device 803 can receive input digital or character information and generate key signal input related to user settings and function control of the electronic device for security verification, such as input devices such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 804 may include display electronics, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibration motors). The display electronics may include, but are not limited to, liquid crystal displays (LCDs), light emitting diode (LED) displays, and plasma displays. In some embodiments, the display electronics may be a touch screen.
[0163] Various implementations of the systems and techniques described herein can be realized in digital electronic circuitry, integrated circuitry, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that can be executed and / or interpreted on a programmable system comprising at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input, and at least one output device, and transmit data and instructions to the storage system, the at least one input, and the at least one output device.
[0164] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for a programmable processor and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, electronic device, and / or device (e.g., a magnetic disk, an optical disk, a memory, a programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0165] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0166] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as data electronics), or a computing system that includes middleware components (e.g., application electronics), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0167] A computer system may include a client and an electronic device. The client and the electronic device are generally remote from each other and typically interact via a communication network. The relationship between the client and the electronic device is generated by computer programs running on the respective computers and having a client-electronic device relationship with each other.
[0168] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this application can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this application can be achieved. This is not a limitation herein.
[0169] The above specific embodiments do not constitute a limitation on the scope of protection of this application. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application shall be included within the scope of protection of this application.
Claims
1. A security verification method, characterized in that: Executed by the door lock end, the method includes: In response to a communication connection request sent by a visitor terminal, a key factor is randomly generated; sending the key factor to the visitor terminal, and receiving a verification key generated by the visitor terminal according to the key factor and an identifier of the visitor terminal; Matching the verification key with the authorized key to perform security verification on the identity of the visitor terminal; The authorized key is generated according to the identifier of the authorized terminal within the authorization validity period and the key factor.
2. The method according to claim 1, characterized in that Before matching the verification key with the authorized key and performing security verification on the identity of the visitor terminal, the method further includes: Encrypting the key factor using an encryption algorithm, or, The key factor, the door lock terminal identifier and the owner terminal identifier are encrypted using an encryption algorithm, or, The key factor is used as an encryption factor of an encryption algorithm, and the door lock terminal identifier and the owner terminal identifier are encrypted using the encryption algorithm to obtain an encryption key factor; generating an authorized key according to the identifier of the authorized terminal within the authorization validity period and the encryption key factor; The identifier of the authorized terminal is a random value generated by the cloud and associated with the authorized terminal.
3. The method according to claim 1 or 2, characterized in that: Matching the verification key with the authorized key to perform security verification on the identity of the visitor terminal includes: matching the identifier of the visitor terminal in the verification key with the identifier of the authorized terminal in the authorized key; If the match fails, it is determined that the visitor terminal is an unauthorized terminal or the visitor terminal is not within the authorization validity period, and the security verification result is failed; If the match is successful, the identity of the visitor terminal is securely verified based on the encryption key factor in the verification key and the encryption key factor in the authorized key.
4. The method according to claim 3, characterized in that The security verification of the identity of the visitor terminal is performed according to the encryption key factor in the verification key and the encryption key factor in the authorized key, including: matching the encryption key factor in the verification key with the encryption key factor in the authorized key; If the match is successful, the security verification result is determined to be passed, a communication connection is established with the visitor terminal and the door lock is opened; If the match fails, the security verification result is determined to be failed.
5. The method according to claim 1, characterized in that Before responding to the communication connection request sent by the visitor terminal, the method further includes: Receive the authorized terminal identification and authorization validity period sent by the cloud; If there is an authorized terminal within the authorization validity period, a communication connection request sent by the visitor terminal is received.
6. The method according to claim 1, characterized in that After performing security verification on the identity of the visitor terminal, the method further includes: If the security verification result of the visitor terminal is passed, the number of visitor terminals whose security verification result is passed is updated; If the security verification result is that the number of passed visitor terminals is equal to or greater than the number of authorized terminals within the authorization validity period, then the communication connection request sent by the visitor terminal is rejected; After performing security verification on the identity of the visitor terminal, the method further includes: If the security verification result of the visitor terminal is passed, the visitor terminal is determined as a trusted terminal, so that when a communication connection request from the trusted terminal is received, a communication connection with the trusted terminal is established.
7. A security verification method, characterized in that: Executed by a visitor terminal, the method includes: Send a communication connection request to the door lock end; Receiving a key factor randomly generated by the door lock terminal in response to the communication connection request, and generating a verification key according to the key factor and the identifier of the visitor terminal; Sending the verification key to the door lock end so that the door lock end matches the verification key with the authorized key and performs security verification on the identity of the visitor terminal; The authorized key is generated by the door lock terminal according to the identifier of the authorized terminal within the authorization validity period and the key factor.
8. A security verification method, characterized in that: Executed by the cloud, the method includes: Receiving authorization verification information sent by the owner terminal, and sending the authorization verification information to the visitor terminal; receiving visitor terminal information returned by the visitor terminal in response to the authorization verification information, and performing authorization verification on the visitor terminal according to the visitor terminal information; If the verification is successful, a random value is generated as the identifier of the visitor terminal, and the identifier of the visitor terminal and the door lock terminal information are sent to the visitor terminal, so that the visitor terminal sends a communication connection request to the door lock terminal according to the door lock terminal information, and generates a verification key according to the identifier of the visitor terminal and the key factor generated by the door lock terminal; The visitor terminal is regarded as an authorized terminal, and the identifier of the visitor terminal is regarded as the identifier of the authorized terminal, and the identifier of the authorized terminal and the authorization validity period are sent to the door lock end, so that the door lock end generates an authorized key according to the generated key factor and the identifier of the authorized terminal within the authorization validity period; The verification key is matched with the authorized key to perform security verification on the identity of the visitor terminal.
9. A security verification electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method executed by the door lock end as described in any one of claims 1-6, or can execute the method executed by the visitor terminal as described in claim 7, or can execute the method executed by the cloud as described in claim 8.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer to execute the method executed by the door lock end as described in any one of claims 1-6, or to execute the method executed by the visitor terminal as described in claim 7, or to execute the method executed by the cloud as described in claim 8.
