Verification result determination method and apparatus, storage medium, and electronic device
Patent Information
- Application Number
- CN202310342522.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-03-31
AI Technical Summary
[0004]但是以上实现方案在实际应用中,均存在技术缺陷:对于方式一,由于需要门锁设备连网进行验证,实际的开锁时间依赖设备网络通信时间,并且频繁激活网络通信也会导致数据泄露的概率变大,导致安全性较低
[0023] In the embodiments of the present application, in response to an unlocking operation performed by a target object on a smart door lock, a temporary unlocking password corresponding to the unlocking operation is acquired; a device local key of the smart door lock is acquired from a cloud platform, and a device unlocking password is generated based on the device local key; and the temporary unlocking password is verified according to the device unlocking password, and a verification result is determined. By using the above technical solution, the technical problem of how to determine a verification result of a device unlocking password of a door lock device to improve the security of the door lock is solved, and the security of the unlocking of the door lock is improved.
Smart Images

Figure CN116563975B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of smart home, in particular to a verification result determination method and device, a storage medium and an electronic device. BACKGROUND
[0002] At present, in the field of Internet of Things household appliances, the scheme for determining the verification result of the unlocking password of the door lock device based on the temporary unlocking password can be implemented in the following ways:
[0003] First, when the user unlocks the door lock device by using the temporary unlocking password, the user applies for a password to the cloud by using the mobile phone (the cloud can generate a new password for the door lock device), and then the user inputs the password obtained from the cloud to the door lock device, and the door lock device is connected to the cloud for password verification. If the device verifies that the password belongs to the password generated by the cloud, the verification is passed, and the door lock can be opened. Second, a batch of preset passwords are stored in the door lock device, and the preset passwords are also stored in the cloud. When the mobile phone unlocks the door lock device by using the temporary unlocking password function, a random password is obtained from the cloud and sent to the user. After the user inputs the password to the door lock device, if the device verifies that the password belongs to the preset password, the verification is passed, and the door lock can be opened.
[0004] However, the above implementation schemes have technical defects in actual application. For the first scheme, since the door lock device needs to be connected to the network for verification, the actual unlocking time depends on the network communication time of the device, and frequent activation of network communication will also increase the probability of data leakage, resulting in low security. Although the second scheme can support the door lock device to be unlocked without network, it can improve the security of the unlocking password compared with the first scheme, but since the password is preset, it is generally reused and cannot be used once and destroyed, so the security is still not high enough.
[0005] Therefore, in the related art, there is a technical problem of how to determine the verification result of the device unlocking password of the door lock device to improve the security of the door lock.
[0006] For the technical problem of how to determine the verification result of the device unlocking password of the door lock device to improve the security of the door lock in the related art, no effective solution has been proposed. SUMMARY
[0007] The embodiments of the present application provide a verification result determination method and device, a storage medium and an electronic device to at least solve the technical problem of how to determine the verification result of the device unlocking password of the door lock device to improve the security of the door lock in the related art.
[0008] According to an embodiment of the present application, an embodiment of a method for determining a verification result is provided, including: in response to a target object performing an unlocking operation on a smart door lock, obtaining a temporary unlocking password corresponding to the unlocking operation; obtaining a device local key of the smart door lock from a cloud platform, and generating a device unlocking password based on the device local key; verifying the temporary unlocking password according to the device unlocking password, and determining a verification result.
[0009] In an example embodiment, obtaining the device local key of the smart door lock from the cloud platform includes: in a case where it is detected that a network connection channel between the smart door lock and the cloud platform is established for the first time, obtaining a first device local key of the smart door lock from the cloud platform; or in a case where it is detected that the network connection channel between the smart door lock and the cloud platform is established for the second time, determining a first establishment time at which the network connection channel between the smart door lock and the cloud platform is established for the first time and a second establishment time at which the network connection channel between the smart door lock and the cloud platform is established for the second time; and obtaining a target device local key of the smart door lock from the cloud platform according to a comparison result of a time difference between the first establishment time and the second establishment time and a preset period of time.
[0010] In an example embodiment, obtaining the target device local key of the smart door lock from the cloud platform according to the comparison result of the time difference between the first establishment time and the second establishment time and the preset period of time includes: in a case where it is determined that the time difference between the first establishment time and the second establishment time is less than or equal to the preset period of time, obtaining a second device local key of the smart door lock from the cloud platform; and if it is determined that the second device local key is consistent with the first device local key, determining the second device local key as the target device local key.
[0011] In an example embodiment, generating the device unlocking password based on the device local key includes: in a case where it is detected that the network connection channel between the smart door lock and the cloud platform is established for the first time, generating a first device unlocking password based on the first device local key; and in a case where it is detected that the network connection channel between the smart door lock and the cloud platform is established for the second time, if it is determined that the target device local key is inconsistent with the first device local key, generating a second device unlocking password based on the target device local key.
[0012] In an example embodiment, verifying the temporary unlocking password according to the device unlocking password of the second device comprises: verifying the temporary unlocking password according to the device unlocking password of the first device, and determining a first verification result; in a case where the first verification result is a verification success, sending a notification message to the target object that the verification result is a verification success; in a case where the first verification result is a verification failure, verifying the temporary unlocking password according to the device unlocking password of the first device, and determining a second verification result.
[0013] In an example embodiment, verifying the temporary unlocking password according to the device unlocking password of the first device comprises: obtaining a first valid time period of the target device local key; determining an obtaining time period between an obtaining time of the first device local key and an obtaining time of the target device local key; and verifying the temporary unlocking password according to the device unlocking password of the first device in a case where the first valid time period belongs to the obtaining time period.
[0014] In an example embodiment, verifying the temporary unlocking password according to the device unlocking password of the first device comprises: obtaining a second valid time period of the device unlocking password of the first device; and verifying the temporary unlocking password according to the device unlocking password of the first device in a case where an unlocking time corresponding to the unlocking operation belongs to the second valid time period.
[0015] In an example embodiment, obtaining the second valid time period of the device unlocking password of the first device comprises: obtaining a first generation time when the device unlocking password of the first device is generated by using the first device local key; in a case where a minute value of the first generation time is an integer multiple of a preset minute value, obtaining i password verification times from the first generation time, wherein a number of the i password verification times is not greater than a first preset value, and i is a positive integer; and determining a time period between the first generation time and an i-1th password verification time as the second valid time period.
[0016] In an example embodiment, obtaining the second valid time period of the device unlocking password of the first device further comprises: in a case where the minute value of the first generation time is not an integer multiple of the preset minute value, obtaining a first password verification time with a minute value that is an integer multiple of the preset minute value from the first generation time; obtaining j password verification times from the first password verification time, wherein a number of the j password verification times is not greater than a second preset value, and j is a positive integer; and determining a time period between the first generation time and a j-1th password verification time as the second valid time period.
[0017] In one example embodiment, after generating the device unlocking password based on the device local key, the method further comprises: obtaining a usage identifier of the second device unlocking password; in a case where it is determined that the usage identifier of the second device unlocking password indicates that the second device unlocking password has been used, obtaining a fourth device unlocking password, obtaining a first global unlocking variable preset for the second device local key and a second global unlocking variable preset for the target device local key; and updating the first global unlocking variable using the second global unlocking variable.
[0018] In one example embodiment, after obtaining the usage identifier of the first device unlocking password, the method further comprises: in a case where it is determined that the usage identifier of the second device unlocking password indicates that the second device unlocking password has not been used, verifying the temporary unlocking password using the second device unlocking password.
[0019] In one example embodiment, updating the first global unlocking variable according to the second global unlocking variable comprises: obtaining a first type of global unlocking variable included in the first global unlocking variable and a second type of global unlocking variable included in the first global unlocking variable, wherein the first type of global unlocking variable included in the first global unlocking variable comprises a variable value corresponding to a usage identifier of a first group of passwords, the first group of passwords comprising a plurality of the first device unlocking passwords, and the second type of global unlocking variable included in the first global unlocking variable comprises a variable value corresponding to a usage identifier of a second group of passwords, the second group of passwords comprising a plurality of the second device unlocking passwords; obtaining a first type of global unlocking variable included in the second global variable and a second type of global unlocking variable included in the second global variable, wherein the second type of global unlocking variable included in the second global variable comprises a variable value corresponding to a usage identifier of a third group of passwords, the third group of passwords comprising a plurality of third device unlocking passwords, each third device unlocking password of the plurality of third device unlocking passwords being generated later than the second device unlocking password; updating the first type of global unlocking variable included in the first global unlocking variable to an intermediate global variable value, wherein the intermediate global variable value is equal to a variable value of the second type of global unlocking variable included in the second global variable, the variable value representing the usage identifier of the device unlocking password; and resetting the first type of global unlocking variable included in the second global unlocking variable to an initial global variable value.
[0020] According to another embodiment of the present application, a determination device of a verification result is also provided, comprising: a cloud platform and a smart door lock, wherein the smart door lock is configured to: in response to an unlocking operation performed by a target object on the smart door lock, acquire a temporary unlocking password corresponding to the unlocking operation; acquire a device local key of the smart door lock from the cloud platform, and generate a device unlocking password based on the device local key; and verify the temporary unlocking password according to the device unlocking password, and determine a verification result.
[0021] According to still another aspect of the present application, a computer readable storage medium is also provided, which stores a computer program, wherein the computer program is configured to execute the above-mentioned determination method of a verification result when running.
[0022] According to still another aspect of the present application, an electronic device is also provided, which comprises a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the above-mentioned determination method of a verification result through the computer program.
[0023] In the embodiments of the present application, in response to an unlocking operation performed by a target object on a smart door lock, a temporary unlocking password corresponding to the unlocking operation is acquired; a device local key of the smart door lock is acquired from a cloud platform, and a device unlocking password is generated based on the device local key; and the temporary unlocking password is verified according to the device unlocking password, and a verification result is determined. By using the above technical solution, the technical problem of how to determine a verification result of a device unlocking password of a door lock device to improve the security of the door lock is solved, and the security of the unlocking of the door lock is improved. BRIEF DESCRIPTION OF DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application together with the specification.
[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows, and obviously, other drawings can also be obtained by those skilled in the art without any creative labor on the basis of these drawings.
[0026] Figure 1 is a hardware environment schematic diagram of a determination method of a verification result according to an embodiment of the present application;
[0027] Figure 2 is a flowchart of the determination method of the verification result according to an embodiment of the present application;
[0028] Figure 3This is a flowchart (I) illustrating the method for determining the verification result according to an embodiment of this application;
[0029] Figure 4 This is a flowchart (II) illustrating the method for determining the verification result according to an embodiment of this application;
[0030] Figure 5 This is a schematic diagram illustrating the effective time period of a temporary unlocking password according to an embodiment of this application;
[0031] Figure 6 A structural block diagram of a verification result determination device according to an embodiment of this application. Detailed Implementation
[0032] 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.
[0033] 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.
[0034] According to one aspect of the embodiments of this application, a method for determining verification results is provided. This method for determining verification results is widely applicable to whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, smart home device ecosystems, and intelligence house ecosystems. Optionally, in this embodiment, the above-mentioned method for determining verification results can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1As shown, the server 104 is connected with the terminal device 102 through a network, and can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal, a database can be set on the server or independently of the server, used to provide data storage services for the server 104, cloud computing and / or edge computing services can be configured on the server or independently of the server, used to provide data operation services for the server 104.
[0035] The network can include but is not limited to at least one of the following: wired network, wireless network. The wired network can include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network. The wireless network can include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 can not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart oven, smart refrigerator, smart oven, smart oven, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projection equipment, smart television, smart clothesline, smart curtain, smart audio and video, smart socket, smart sound, smart sound box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart sweeping robot, smart window cleaning robot, smart mopping robot, smart air purification equipment, smart steamer, smart microwave oven, smart kitchen treasure, smart purifier, smart water dispenser, smart door lock, etc.
[0036] In this embodiment, a verification result determination method is provided, which is applied to the terminal device, Figure 2 is a flowchart of the verification result determination method according to the embodiment of the application, which includes the following steps:
[0037] Step S202, in response to the target object performing an unlocking operation on the smart door lock, obtaining a temporary unlocking password corresponding to the unlocking operation;
[0038] Step S204, obtaining a device local key of the smart door lock from a cloud platform, and generating a device unlocking password based on the device local key;
[0039] Step S206, verifying the temporary unlocking password according to the device unlocking password, and determining a verification result.
[0040] Through the above steps, in response to the target object performing an unlocking operation on the smart door lock, a temporary unlocking password corresponding to the unlocking operation is obtained; a device local key of the smart door lock is obtained from a cloud platform, and a device unlocking password is generated based on the device local key; the temporary unlocking password is verified according to the device unlocking password, and a verification result is determined, which solves the technical problem of how to determine the verification result of the device unlocking password of the door lock device in the related art to improve the security of the door lock, thereby improving the security of the door lock unlocking.
[0041] In one example embodiment, in order to explain the process of how to obtain the device local key of the smart door lock from the cloud platform in step S204, the following steps are specifically proposed: obtaining a first device local key of the smart door lock from the cloud platform in the case of detecting that the network connection channel between the smart door lock and the cloud platform is established for the first time; or, in the case of detecting that the network connection channel between the smart door lock and the cloud platform is not established for the first time, determining a first establishment time of the network connection channel between the smart door lock and the cloud platform and a second establishment time of the network connection channel between the smart door lock and the cloud platform; and obtaining a target device local key of the smart door lock from the cloud platform according to a comparison result of a time difference between the first establishment time and the second establishment time and a preset period of time.
[0042] In one example embodiment, the implementation process of obtaining the target device local key of the smart door lock from the cloud platform according to the comparison result of the time difference between the first establishment time and the second establishment time and the preset period of time is further explained, and the specific steps include: obtaining a second device local key of the smart door lock from the cloud platform in the case of determining that the time difference between the first establishment time and the second establishment time is less than or equal to the preset period of time; and if it is determined that the second device local key is consistent with the first device local key, determining the second device key as the target device local key.
[0043] In one example embodiment, other implementation schemes for obtaining the target device local key of the smart door lock from the cloud platform according to the comparison result of the time difference between the first establishment time and the second establishment time and the preset period of time are also proposed, and the specific steps include: obtaining a third device local key of the smart door lock from the cloud platform in the case of determining that the time difference between the first establishment time and the second establishment time is greater than the preset period of time; and if it is determined that the third device local key is inconsistent with the first device local key, determining the third device key as the target device local key.
[0044] In one example embodiment, the device unlocking password is generated based on the device local key by the following steps: in the case of detecting that the network connection channel between the smart door lock and the cloud platform is established for the first time, generating a first device unlocking password based on the first device local key; and in the case of detecting that the network connection channel between the smart door lock and the cloud platform is not established for the first time, if it is determined that the target device local key is inconsistent with the first device local key, generating a second device unlocking password based on the target device local key.
[0045] In an optional embodiment, the process step of generating the device unlocking password based on the device local key can include the following steps: obtaining a second-level time stamp corresponding to the time of obtaining the device local key, using a hash algorithm to hash encrypt the second-level time stamp, the device local key, and the device number of the smart door lock, to obtain a hash encryption result; determining the hash encryption result as the device unlocking password. Further, in this embodiment, a random string with a preset character bit number can be used to splice with the hash encryption result to obtain a spliced string; using the message digest MD5 algorithm to encrypt the string; and determining the unlocking password generated for the target object according to the encryption result of the encryption. In this embodiment, the random string with a preset character bit number can be, for example, "salt". This embodiment improves the complexity of the unlocking password by "salting" the hash encryption result, increases the difficulty of cracking the unlocking password, and improves the security of the unlocking password.
[0046] In an example embodiment, the implementation process of further verifying the temporary unlocking password according to the device unlocking password to determine a verification result is described, and the specific steps include: verifying the temporary unlocking password using the second device unlocking password to determine a first verification result; in the case where it is determined that the first verification result is a verification success, sending a notification message to the target object that the verification result is a verification success; and in the case where it is determined that the first verification result is a verification failure, verifying the temporary unlocking password using the first device unlocking password to determine a second verification result.
[0047] In an example embodiment, the process of verifying the temporary unlocking password using the first device unlocking password can be described by the following schemes, and the specific steps include: scheme 1, obtaining a first valid time period of the target device local key; determining an obtaining time period between the time of obtaining the first device local key and the time of obtaining the target device local key; and in the case where it is determined that the first valid time period belongs to the obtaining time period, verifying the temporary unlocking password using the first device unlocking password.
[0048] Scheme 2, obtaining a second valid time period of the first device unlocking password; and in the case where it is determined that the unlocking time corresponding to the unlocking operation belongs to the second valid time period, verifying the temporary unlocking password using the first device unlocking password.
[0049] In an example embodiment, the process of obtaining the second valid time period of the first device unlocking password is further illustrated, and specifically includes the following steps: obtaining a first generation time point when the first device unlocking password is generated using the first device local key; in a case where the minute value of the first generation time point is an integer multiple of a preset minute value, obtaining i password verification time points from the first generation time point, wherein the number of the i password verification time points is not greater than a first preset value, and i is a positive integer; and determining a time period between the first generation time point and the i-1th password verification time point as the second valid time period.
[0050] Optionally, the preset minute value is for example 10 minutes, and assuming that the first generation time point is 12:20, the minute value of the first generation time point is an integer multiple of the preset minute value, i is 20, and the time period between 12:20 and 12:39 is determined as the second valid time period.
[0051] In an example embodiment, the process of obtaining the second valid time period of the first device unlocking password is further illustrated, and specifically includes the following steps: obtaining a first generation time point when the first device unlocking password is generated using the first device local key; in a case where the minute value of the first generation time point is an integer multiple of a preset minute value, obtaining a first password verification time point with a minute value that is an integer multiple of the preset minute value from the first generation time point; obtaining j password verification time points from the first password verification time point, wherein the number of the j password verification time points is not greater than a second preset value, and j is a positive integer; and determining a time period between the first generation time point and the j-1th password verification time point as the second valid time period.
[0052] Optionally, the second preset value is for example 10.
[0053] In an example embodiment, after the device unlocking password is generated based on the device local key, other technical solutions are proposed, and specifically include: obtaining a use identifier of the second device unlocking password; in a case where the use identifier of the second device unlocking password indicates that the second device unlocking password has been used, obtaining a fourth device unlocking password, obtaining a first global unlocking variable preset for the second device local key and a second global unlocking variable preset for the target device local key; and updating the first global unlocking variable using the second global unlocking variable.
[0054] In an example embodiment, further, after the use identifier of the first device unlocking password is obtained, in a case where the use identifier of the second device unlocking password indicates that the second device unlocking password has not been used, the second device unlocking password is used to verify the temporary unlocking password.
[0055] In one example embodiment, the process of updating the first global unlocking variable according to the second global unlocking variable is implemented by the following steps, including: obtaining a first type of global unlocking variable contained in the first global unlocking variable and a second type of global unlocking variable contained in the first global unlocking variable, wherein the first type of global unlocking variable contained in the first global unlocking variable includes a variable value corresponding to a use identifier of a first group of passwords, the first group of passwords including a plurality of first device unlocking passwords, and the second type of global unlocking variable contained in the first global unlocking variable includes a variable value corresponding to a use identifier of a second group of passwords, the second group of passwords including a plurality of second device unlocking passwords; obtaining a first type of global unlocking variable contained in the second global variable and a second type of global unlocking variable contained in the second global variable, wherein the second type of global unlocking variable contained in the second global variable includes a variable value corresponding to a use identifier of a third group of passwords, wherein the third group of passwords includes a plurality of third device unlocking passwords, and each third device unlocking password of the plurality of third device unlocking passwords is generated at a time later than the second device unlocking password; updating the first type of global unlocking variable contained in the first global unlocking variable to an intermediate global variable value, wherein the intermediate global variable value is equal to a variable value of the second type of global unlocking variable contained in the second global variable, and the variable value represents a use identifier of the device unlocking password; and resetting the first type of global unlocking variable contained in the second global unlocking variable to an initial global variable value.
[0056] In one example embodiment, after resetting the first type of global unlocking variable contained in the second global unlocking variable to the initial global variable value, a target unlocking variable value can also be obtained from the initial global variable value, wherein the target unlocking variable value is used to represent a target use identifier of the target device unlocking password; and in a case where it is determined that the target use identifier of the target device unlocking password indicates that the target device unlocking password has not been used, the target unlocking variable value is modified so that the target use identifier represented by the modified target unlocking variable value indicates that the target device unlocking password has been used.
[0057] In order to better understand the process of the above-mentioned determination method of the verification result, the implementation method flow of the determination of the verification result will be described in combination with optional embodiments below, but not used to limit the technical solutions of the embodiments of the present application.
[0058] In the technical solutions of the present application, the meanings of each subject involved are as follows:
[0059]
Master
[0060]
Visitor
[0061]
Door lock detail page
[0062]
Password service center
[0063]
WIFI module
[0064]
Door lock body
[0065] Among them, the WIFI module (i.e. wireless module) and the door lock body jointly realize the function of the smart door lock.
[0066] In the embodiment, a method for determining a verification result is provided, Figure 3 which is a flowchart of the method for determining the verification result according to the embodiment of the application (one), as shown in Figure 3 , and the specific steps are as follows:
[0067] Step 1: The user obtains a one-time temporary password.
[0068] Step 2: The visitor inputs the one-time temporary password sent by the user into the smart door lock and opens the lock.
[0069] Among them, in step 1, the following steps are specifically included:
[0070] Step S301: The user uses a mobile phone to obtain a one-time temporary password;
[0071] Step S302: Obtain the one-time temporary password from the cloud platform;
[0072] Step S303: The cloud platform generates the one-time temporary password and saves the obtaining record (the saved record is only used to query the password obtaining record, and the password is not saved);
[0073] Step S304: The cloud platform returns the one-time temporary password to the user;
[0074] Step S305: When the return is successful, the one-time temporary password and the validity period are displayed to the user on the mobile phone;
[0075] Step S306: When the return fails, prompt the user to obtain again within the next 10 minutes;
[0076] Step S307: The user informs the visitor of the one-time temporary password through a short message or a phone call;
[0077] In step 2, the following steps are specifically included:
[0078] Step S308: The visitor inputs the one-time temporary password to the door lock body;
[0079] Step S309: The door lock body wakes up the WIFI module;
[0080] Step S3010: The door lock body verifies the one-time temporary password;
[0081] Step S3011: The door lock body locally calculates and verifies the one-time temporary password;
[0082] Step S3012: If the verification fails, an error is directly returned; if the verification passes, it is inquired whether the password has been used; if the password is used for the first time, a success is returned and the password is marked as used; if the password has been used, a failure is returned;
[0083] Step S3013: A verification result is returned;
[0084] Step S3014: If the verification succeeds, the door is unlocked and the visitor is reminded.
[0085] Through the above steps, the one-time temporary password can be dynamically generated, and the user can use the one-time temporary password applied to unlock the door even without a network. Moreover, the one-time temporary password is different each time and invalid after being used once, which improves the security of the unlocking result of the door lock.
[0086] In an embodiment, the generation algorithm and the verification algorithm of the one-time temporary password (i.e., the temporary unlocking password) mentioned in the above flowchart are further described.
[0087] In this embodiment, the one-time temporary password is described, which specifically includes:
[0088] Step S51: The valid period of the one-time temporary password (i.e., the above valid time period) is from the current time to the next whole 10 minutes. For example, if the current time is 16:43, the valid period of the obtained password is 16:43-17:00;
[0089] Step S52: Each time a request for obtaining the one-time temporary password is responded to, a newly generated password is returned. For example, only 8 passwords are allowed to be obtained within each whole 10 minutes; for example, up to 8 passwords are obtained at any time within 16:40-16:50 (not included);
[0090] Step S53, the one-time temporary password is generated based on the current time (validity period of 10-20 minutes), and is invalidated after each successful verification, i.e., each password can only be successfully used once;
[0091] Step S54, the verification time range of the one-time temporary password does not include the minute of the end of the validity period, for example, the validity period of a certain password is 11:43-12:00 (not including 12:00), i.e., 12:00 cannot be used to open the door, and details can be referred to Table 1.
[0092] Table 1: One-time temporary password verification time table
[0093]
[0094] For example, in Table 1, for the password generation time 12:23, the password verification time is from 12:23 to 12:39 (i.e., the above-mentioned validity period).
[0095] Step S55, for the smart door lock and the cloud platform, password generation requires a time parameter, if the time of the smart door lock and the cloud platform is not synchronized, it may cause the device unlocking password saved by the smart door lock and the temporary unlocking password generated by the cloud platform to be different. Therefore, the smart door lock and the cloud platform need to synchronize the time to achieve the purpose of generating the same password.
[0096] Next, the key parameters for generating the one-time temporary password are described in combination with step S56.
[0097] Step S56, key parameters for generating the one-time temporary password:
[0098] Parameter 1 (identification factor): device ID (i.e., device number of the smart door lock), public device unique identifier, different for each device, fixed in the device program;
[0099] Parameter 2 (secret key factor): device localkey (i.e., device local key), secret and regularly updated device secret key, device localkey acquisition and update process is described later;
[0100] Parameter 3 (dynamic factor): time (10-minute level), dynamic value that changes with time;
[0101] Other parameters: salt, salt represents a specific string, which is inserted into a specific string at a fixed position of the generated password, which can make the hash result different from the hash result using the original password, making the password more random and more difficult to crack.
[0102] In this embodiment, the generation process of the one-time temporary password is described, and the specific process includes:
[0103] Step S61, the owner obtains a one-time temporary password from the cloud platform-cryptographic service center (i.e. cloud platform) through the mobile phone;
[0104] Step S62, the cloud platform-cryptographic service center calculates the corresponding 10-minute time according to the current second-level timestamp ts (timespan), and the calculation formula is: 10-minute time T10 = (ts / 600)*600; wherein T10 is the above-mentioned unlocking time field;
[0105] The cloud platform-cryptographic service center uses (device ID, device localkey, time (10-minute time T10), salt) combination to perform SHA256, and generates a 32-byte password sequence (i.e. the above-mentioned password byte sequence);
[0106] Step S63, the cloud platform-cryptographic service center splits the 32-byte password sequence into 8 groups of passwords according to every 4 bytes (i.e. the above-mentioned preset byte number) to generate 8 one-time temporary password strings that can be returned; see steps S63.1 to S63.3 for specific splitting rules.
[0107] Step S63.1, if a 6-digit password is to be generated, each group of passwords (4 bytes) is converted into an unsigned integer, and the last (low) 6 digits are taken as a one-time temporary password (left padding 0, for example, 1000002, the final password is 000002);
[0108] Step S63.2, if an 8-digit password is to be generated, each group of passwords (4 bytes) is converted into an unsigned integer, and the last (low) 8 digits are taken as a one-time temporary password (left padding 0, for example, 1000002, the final password is 01000002);
[0109] Step S63.3, whether a 6-digit password or an 8-digit password is to be used can be agreed by the door lock end and the door lock detail page;
[0110] Step S64, the cloud platform-cryptographic service center selects the corresponding password from the 8 one-time temporary passwords and returns it to the mobile phone in the order of acquisition within 10 minutes.
[0111] Specific return steps include:
[0112] The first acquisition returns the first password;
[0113] The second acquisition returns the second password;
[0114] The loop processing continues until the eighth acquisition returns the eighth password;
[0115] The Jth acquisition, J>8, J is a positive integer, returns the prompt information that the current acquisition has exceeded the limit, prompts the user that "the one-time temporary password obtained in the current 10 minutes has exceeded the limit, please re-acquire in the next 10 minutes (16:40-16:50)";
[0116] Step S65, after successfully obtaining the one-time temporary password, the obtained password and the validity period are displayed to the owner.
[0117] In this embodiment, the verification process of the one-time temporary password is described, and the specific process includes:
[0118] Step S71, the visitor inputs the password through the door lock, and the door lock body verifies the password through the WIFI module;
[0119] Step S72, the WIFI module calculates the current 10-minute time according to the current second-level timestamp ts, and the calculation formula is: 10-minute time T10=(ts / 600)*600;
[0120] Step S73, the WIFI module uses (device ID, device localkey, time (10-minute time T10), salt) to generate a 32-byte password sequence after SHA256;
[0121] Step S74, the WIFI module splits the 32-byte password sequence into 8 groups of passwords according to every 4 bytes to generate 8 one-time temporary password strings for verification; the splitting rules are shown in steps S74.1 to S74.2.
[0122] Step S74.1, if the door lock is implemented according to a 6-digit password: convert each group of passwords (4 bytes) to an unsigned integer, and take the last (low) 6 digits as the one-time temporary password (left padding 0, for example, 1000002, the final password is 000002);
[0123] Step S74.2, if the door lock is implemented according to an 8-digit password: convert each group of passwords (4 bytes) to an unsigned integer, and take the last (low) 8 digits as the one-time temporary password (left padding 0, for example, 1000002, the final password is 01000002).
[0124] Further, the embodiment also includes the saving of T10 and the resetting process of the bit variable corresponding to T10, and the implementation process is as follows:
[0125] Step S81, WIFI module calculates the previous 10-minute time according to the current second-level timestamp ts, and the calculation formula is: 10-minute time T10' = ((ts / 600)-1)*600, and calculates the 8 passwords corresponding to the previous 10-minute time T10' according to the third / fourth step;
[0126] Step S82, WIFI module compares the 16 passwords (8 passwords calculated by T10 and 8 passwords calculated by T10') generated above with the password input by the user.
[0127] Step S82.1, if none of the 16 passwords matches, it is determined that the verification fails;
[0128] Step S82.2, if any one of the passwords matches, it is determined whether the password has been used and identified.
[0129] Specifically, step S82.2.1, WIFI module globally maintains two 8-bit variables (initial value is 00000000). Each bit of bit variable 1 (i.e., the first type of global unlocking variable included in the first global unlocking variable described above) represents whether the 8 passwords in the current 10 minutes T10 have been used, 0 represents not used, and 1 represents used; For example, the current value of bit variable 1 is 01000101, which indicates that 8 passwords in the current 10 minutes, of which the 2nd / 6th / 8th password has been used, and the 1st / 3rd / 4th / 5th / 7th password has not been used.
[0130] Among them, each bit of bit variable 2 (i.e., the second type of global unlocking variable included in the first global unlocking variable described above) represents whether the 8 passwords in the previous 10 minutes T10' have been used, and 0 represents not used and 1 represents used. For examples of bit variable 2, refer to bit variable 1.
[0131] Step S82.2.2, WIFI module maintains global 10-minute time gT10 (i.e., global unlocking time field, initial value is 0);
[0132] Step S82.2.3, WIFI module determines whether the current calculated time enters the next 10 minutes.
[0133] 1) If the current 10-minute time T10 calculated is different from the global maintained 10-minute time gT10, it is determined that the next 10 minutes is entered, and then the variable updating process of entering the next 10 minutes is executed:
[0134] The value of the next 10-minute corresponding bit variable 2 (i.e., the second type of global unlocking variable contained in the second global unlocking variable) is updated to the current 10-minute bit variable 1; and the next 10-minute corresponding bit variable 1 (i.e., the first type of global unlocking variable contained in the second global unlocking variable) is reset to 00000000 (indicating that none is used, i.e., the first type of global unlocking variable contained in the second global unlocking variable), the value of gT10 is set to T10; and the position corresponding to the comparison successful password of the bit variable 1 is set to 1, and it is determined that the verification is successful.
[0135] 2) If the calculated current 10-minute time T10 is the same as the globally maintained gT10, it is still within the current 10 minutes, and the next 10 minutes is not entered, and then it is determined whether the position of the comparison successful password corresponding password is 0: if it is 0, the bit variable corresponding to the comparison successful password is set to 1, and it is determined that the verification is successful; if it is 1, it is determined that the verification fails.
[0136] Step S83, the verification result of the WIFI module is sent to the door lock body.
[0137] Among them, at least two device localkeys corresponding to the current 10-minute time T10 need to be determined, and after the one-time temporary password generated based on the two device localkeys is verified, the verification result is returned to the door lock body.
[0138] Step S84, the door lock body receives the verification success returned by the WIFI module, and then the door is unlocked, and if the verification fails, the user is prompted to "enter the password again".
[0139] In other embodiments of the present application, in combination Figure 4 Further provided is an implementation scheme of device localkey acquisition and update, as shown in Figure 4 According to the determination method of the verification result of the embodiment of the present application, Figure 4 is a flowchart of the determination method of the verification result according to the embodiment of the present application (two), and the specific steps are as follows:
[0140] Step S401: determine that the WIFI module has been connected to the cloud platform last time;
[0141] Step S402: acquire localkey (take LK1, i.e., the first device localkey);
[0142] Step S403: save LK1 (Flash save);
[0143] Step S404: power off the WIFI module;
[0144] Step S405: determine that the door lock body enters sleep;
[0145] Step S406: The user acquires the temporary one-time password TmpPwd1 (i.e., the first device unlocking password, generated based on LK1);
[0146] Step S407: It is determined that the user presses the key to activate the door lock;
[0147] Step S408: The WIFI module is powered on;
[0148] Step S409: The cloud platform is connected;
[0149] Step S4010: The localkey is acquired (if more than 8 hours elapse from the acquisition of LK1, LK2, i.e., the target device localkey, is acquired);
[0150] Step S4011: The current effective localkey is modified to LK2 (Flash saving);
[0151] Step S4012: LK1 is continued to be saved as a historical localkey (Flash saving);
[0152] Step S4013: TmpPwd1 is input;
[0153] Step S4014: One-time temporary password verification;
[0154] Step S4015: LK2 (the current effective localkey) is used for verification;
[0155] Step S4016: When it is determined that the verification using LK2 is successful, verification success is returned;
[0156] Step S4017: When it is determined that the verification using LK2 fails, it is determined whether LK1 is acquired within 20 minutes after LK2 is acquired;
[0157] Step S4018: If the acquisition time of LK1 is not within 20 minutes after LK2 is acquired, verification failure is returned;
[0158] Step S4019: If the acquisition time of LK1 is within 20 minutes after LK2 is acquired, the password generated by LK1 is used for verification;
[0159] Step S4020: If the verification using the password generated by LK1 is successful, verification success is returned;
[0160] Step S4021: If the verification using the password generated by LK1 fails, verification failure is returned.
[0161] Based on the above steps, for example, the WIFI module obtains the device localkey from the cloud platform once every 8 hours, or each time it randomly connects to the cloud platform, and each time it obtains the device localkey from the cloud platform. The cloud platform determines the time since the last acquisition of a new value by the device, and if it is within 8 hours (equivalent to the preset period of time), it directly returns the last acquired localkey, and if it exceeds 8 hours, the cloud platform generates and returns a new localkey. In order to avoid the situation that the previous one-time temporary password obtained is not available due to the WIFI module localkey update (once every 8 hours), the WIFI module needs to save the history of the last localkey for a period of time for one-time temporary password verification.
[0162] Further, in one embodiment, the current latest localkey (such as LK2 in the above figure) can be used for verification; only when the current latest localkey verification fails, the history of the last localkey (such as LK1 in the above figure) is used for verification.
[0163] At the same time, the history of the last localkey also needs to maintain two global bit variables for marking whether the 16 passwords calculated based on the localkey are in the used state. If it is determined that it enters the next 10 minutes using the global 10-minute-level time gT10, the processing logic of the two global bit variables is the same as the current latest localkey, and details are shown in steps S81 to S84.
[0164] After entering the next 10 minutes, the variable update process of entering the next 10 minutes is executed in turn: the value of bit variable 2 corresponding to the next 10 minutes is updated to the bit variable 1 of the current 10 minutes; and the bit variable 1 corresponding to the next 10 minutes is reset to 00000000 (indicating that none is used), the gT10 value is set to T10; and the position corresponding to the bit variable 1 of the current comparison successful password is set to 1.
[0165] Further, in one embodiment, the history of the last localkey can also be combined with Figure 5 The effective time period of the temporary unlocking password of the above embodiment is described as follows: Figure 5 As shown, for the generation time corresponding to the 10-minute time period "12:40-12:50", the effective time period (i.e. the effective time of Figure 5 ) is "12:40-13:00", and does not include the time "13:00".
[0166] Based on the above embodiment, for example, in the implementation scenario where the owner is not at home and a visitor visits, the following scheme can be implemented:
[0167] 1. A visitor arrived at 12:43 on March 28, 2023. The homeowner was not home. The visitor called the homeowner, who obtained a one-time temporary password via mobile phone (valid from 12:43 to 13:00) and sent it to the visitor via WeChat. The visitor entered the one-time temporary password into the door lock within the password's validity period (12:43 to 13:00). If the verification was successful, the door lock opened, and the visitor entered.
[0168] 2. Subsequently, if a visitor accidentally leaks the one-time temporary password (including leaking the password within its validity period), and it is obtained by someone else, the door lock will not be able to be opened even if the other person enters the password, since the one-time temporary password can only be used once.
[0169] 3. Since the one-time temporary password verification of the door lock is performed entirely on the local machine and there is no network interaction with external parties such as the cloud, visitors can unlock the door in seconds after entering the one-time temporary password.
[0170] 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 this application, 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 this application.
[0171] Figure 6 A structural block diagram of a verification result determination device according to an embodiment of this application; as shown below. Figure 6 The following are shown: a cloud platform 62 and a smart door lock 64.
[0172] The smart lock 64 is configured to, in response to an unlocking operation performed by a target object on the smart lock, obtain a temporary unlocking password corresponding to the unlocking operation; obtain the device local key of the smart lock from the cloud platform, and generate a device unlocking password based on the device local key; verify the temporary unlocking password according to the device unlocking password, and determine the verification result.
[0173] By the above device, in response to the target object performing an unlocking operation on the smart door lock, a temporary unlocking password corresponding to the unlocking operation is obtained; a device local key of the smart door lock is obtained from the cloud platform, and a device unlocking password is generated based on the device local key; and the temporary unlocking password is verified according to the device unlocking password to determine a verification result, thereby solving the technical problem in the related art of how to determine the verification result of the device unlocking password of the door lock device to improve the security of the door lock, and further improving the security of the door lock unlocking.
[0174] In one example embodiment, the above-mentioned smart door lock 64 is further configured to: in a case where it is detected that a network connection channel between the smart door lock and the cloud platform is established for the first time, obtain a first device local key of the smart door lock from the cloud platform; or in a case where it is detected that a network connection channel between the smart door lock and the cloud platform is established for the second time, determine a first establishment time when the network connection channel between the smart door lock and the cloud platform is established for the first time and a second establishment time when the network connection channel between the smart door lock and the cloud platform is established for the second time; and obtain a target device local key of the smart door lock from the cloud platform according to a comparison result of a time difference between the first establishment time and the second establishment time and a preset period of time.
[0175] In one example embodiment, the above-mentioned smart door lock 64 is further configured to: further in a case where it is determined that the time difference between the first establishment time and the second establishment time is less than or equal to the preset period of time, obtain a second device local key of the smart door lock from the cloud platform; and if it is determined that the second device local key is consistent with the first device local key, determine the second device local key as the target device local key.
[0176] In one example embodiment, the above-mentioned smart door lock 64 is further configured to: in a case where it is determined that the time difference between the first establishment time and the second establishment time is greater than the preset period of time, obtain a third device local key of the smart door lock from the cloud platform; and if it is determined that the third device local key is inconsistent with the first device local key, determine the third device local key as the target device local key.
[0177] In one example embodiment, the above-mentioned smart door lock 64 is further configured to: in a case where it is detected that a network connection channel between the smart door lock and the cloud platform is established for the first time, generate a first device unlocking password based on the first device local key; and in a case where it is detected that a network connection channel between the smart door lock and the cloud platform is established for the second time, if it is determined that the target device local key is inconsistent with the first device local key, generate a second device unlocking password based on the target device local key.
[0178] In an example embodiment, the smart door lock 64 is further configured to: verify the temporary unlocking password using the second device unlocking password to obtain a first verification result; send a notification message to the target object indicating that the first verification result is a verification success; and verify the temporary unlocking password using the first device unlocking password to obtain a second verification result in a case where the first verification result is a verification failure.
[0179] In an example embodiment, the smart door lock 64 is further configured to perform the following schemes: Scheme 1, obtain a first valid time period of the target device local key; determine a time period between a time when the first device local key is obtained and a time when the target device local key is obtained; and verify the temporary unlocking password using the first device unlocking password in a case where the first valid time period belongs to the time period.
[0180] Scheme 2, obtain a second valid time period of the first device unlocking password; and verify the temporary unlocking password using the first device unlocking password in a case where an unlocking time corresponding to the unlocking operation belongs to the second valid time period.
[0181] In an example embodiment, the smart door lock 64 is further configured to: obtain a first generation time when the first device unlocking password is generated using the first device local key; obtain i password verification times from the first generation time in a case where a minute value of the first generation time is an integer multiple of a preset minute value, where the number of the i password verification times is not greater than a first preset value, and i is a positive integer; and determine a time period between the first generation time and an (i-1)th password verification time as the second valid time period.
[0182] In an example embodiment, the smart door lock 64 is further configured to: obtain a first password verification time with a minute value that is an integer multiple of a preset minute value from the first generation time in a case where the minute value of the first generation time is not an integer multiple of the preset minute value; obtain j password verification times from the first password verification time, where the number of the j password verification times is not greater than a second preset value, and j is a positive integer; and determine a time period between the first generation time and an (j-1)th password verification time as the second valid time period.
[0183] In an example embodiment, the smart door lock 64 is further configured to: obtain a use identifier of the second device unlocking password; and obtain a fourth device unlocking password, a first global unlocking variable preset for the second device local key, and a second global unlocking variable preset for the target device local key, in a case where it is determined that the use identifier of the second device unlocking password indicates that the second device unlocking password has been used.
[0184] In an example embodiment, the smart door lock 64 is further configured to: after obtaining the use identifier of the first device unlocking password, the temporary unlocking password can be verified using the second device unlocking password, in a case where it is determined that the use identifier of the second device unlocking password indicates that the second device unlocking password has not been used.
[0185] In an example embodiment, the smart door lock 64 is further configured to: obtain a use identifier of the second device unlocking password; and obtain a fourth device unlocking password, a first global unlocking variable preset for the second device local key, and a second global unlocking variable preset for the target device local key, in a case where it is determined that the use identifier of the second device unlocking password indicates that the second device unlocking password has been used.
[0186] In an example embodiment, the smart door lock 64 is further configured to: obtain a target unlocking variable value from the initial global variable value after resetting the first type of global unlocking variable contained in the second global unlocking variable to the initial global variable value, wherein the target unlocking variable value is used to represent a target usage identifier of the target device unlocking password; and modify the target unlocking variable value in a case where it is determined that the target usage identifier of the target device unlocking password indicates that the target device unlocking password is not used, so that the target usage identifier represented by the modified target unlocking variable value indicates that the target device unlocking password is used.
[0187] Embodiments of the present application also provide a storage medium comprising a stored program, wherein the program performs any of the above methods when executed.
[0188] Optionally, in the present embodiment, the storage medium can be configured to store program code for performing the following steps:
[0189] S1, in response to a target object performing an unlocking operation on a smart door lock, obtaining a temporary unlocking password corresponding to the unlocking operation;
[0190] S2, obtaining a device local key of the smart door lock from a cloud platform, and generating a device unlocking password based on the device local key;
[0191] S3, verifying the temporary unlocking password according to the device unlocking password, and determining a verification result.
[0192] Embodiments of the present application also provide an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any of the above method embodiments.
[0193] Optionally, the electronic device can further comprise 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.
[0194] Optionally, in the present embodiment, the processor can be configured to execute the following steps through the computer program:
[0195] S1, in response to a target object performing an unlocking operation on a smart door lock, obtaining a temporary unlocking password corresponding to the unlocking operation;
[0196] S2, obtaining a device local key of the smart door lock from a cloud platform, and generating a device unlocking password based on the device local key;
[0197] S3, verifying the temporary unlocking password according to the device unlocking password, and determining a verification result.
[0198] Optionally, in the embodiment, the storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various storage medium capable of storing program codes.
[0199] Optionally, the specific examples in the embodiment can refer to the examples described in the above embodiments and optional implementation manners, which will not be described herein.
[0200] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be realized by general computing devices, which can be concentrated on a single computing device or distributed on a network composed of multiple computing devices, and optionally, they can be realized by program codes executable by the computing devices, so that they can be stored in storage devices and executed by the computing devices, and in some cases, the steps shown or described herein can be executed in different order, or they can be manufactured into individual integrated circuit modules, or multiple modules or steps thereof can be manufactured into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
[0201] The above description is only the preferred embodiments of the present application, and it should be pointed out that those skilled in the art can make several improvements and refinements without departing from the principles of the present application, and these improvements and refinements should be considered as the protection scope of the present application.
Claims
1. A method of determining a result of a verification, characterized by, The method comprises: in response to an unlocking operation performed by a target object on a smart door lock, obtaining a temporary unlocking password corresponding to the unlocking operation; obtaining a device local key of the smart door lock from a cloud platform, and generating a device unlocking password based on the device local key; verifying the temporary unlocking password based on the device unlocking password, and determining a verification result; obtaining a device local key of the smart door lock from a cloud platform, comprising: in the case of detecting that a network connection channel is established between the smart door lock and the cloud platform for the first time, obtaining a first device local key of the smart door lock from the cloud platform; in the case of detecting that a network connection channel is established between the smart door lock and the cloud platform for the second time, determining a first establishment time when the network connection channel is established between the smart door lock and the cloud platform for the first time and a second establishment time when the network connection channel is established between the smart door lock and the cloud platform for the second time; and obtaining a target device local key of the smart door lock from the cloud platform according to a comparison result of a time difference between the first establishment time and the second establishment time and a preset period time; generating a device unlocking password based on the device local key, comprising: in the case of detecting that a network connection channel is established between the smart door lock and the cloud platform for the first time, generating a first device unlocking password based on the first device local key; and in the case of detecting that a network connection channel is established between the smart door lock and the cloud platform for the second time, if it is determined that the target device local key is inconsistent with the first device local key, generating a second device unlocking password based on the target device local key; verifying the temporary unlocking password based on the device unlocking password, and determining a verification result, comprising: verifying the temporary unlocking password using the second device unlocking password to determine a first verification result; in the case of determining that the first verification result is a verification success, sending a notification message to the target object that the verification result is a verification success; in the case of determining that the first verification result is a verification failure, obtaining a first generation time when the first device unlocking password is generated using the first device local key; in the case of determining that a minute value of the first generation time is an integer multiple of a preset minute value, obtaining i password verification times from the first generation time, wherein the number of the i password verification times is not greater than a first preset value, and i is a positive integer; determining a time period between the first generation time and the i-1 password verification time as a second effective time period; and in the case of determining that an unlocking time corresponding to the unlocking operation belongs to the second effective time period, verifying the temporary unlocking password using the first device unlocking password to determine a second verification result.
2. The method of claim 1, wherein obtaining a target device local key of the smart door lock from the cloud platform according to a comparison result of a time difference between the first establishment time and the second establishment time and a preset period time, comprising: In a case where a time difference between the first establishment moment and the second establishment moment is less than or equal to a preset period of time, a second device local key of the smart door lock is obtained from the cloud platform; If it is determined that the second device local key is consistent with the first device local key, the second device key is determined as the target device local key.
3. The method of claim 1, wherein Verifying the temporary unlocking password using the first device unlocking password further includes: Obtaining a first valid time period of the target device local key; Determining an acquisition time period between an acquisition moment of the first device local key and an acquisition moment of the target device local key; In a case where the first valid time period belongs to the acquisition time period, verifying the temporary unlocking password using the first device unlocking password.
4. The method of claim 1, wherein The method further includes: In a case where a minute value of the first generation moment is not an integer multiple of a preset minute value, a first password verification moment whose minute value is an integer multiple of the preset minute value is obtained from the first generation moment; A j password verification moments are obtained from the first password verification moment, where a number of the j password verification moments is not greater than a second preset value, and j is a positive integer; A time period between the first generation moment and a j-1 password verification moment is determined as the second valid time period.
5. The method of claim 1, wherein After generating a device unlocking password based on the device local key, the method further includes: Obtaining a use identifier of the second device unlocking password; In a case where the use identifier of the second device unlocking password indicates that the second device unlocking password has been used, a fourth device unlocking password is obtained, Obtaining a first global unlocking variable preset for the second device local key and a second global unlocking variable preset for the target device local key; Updating the first global unlocking variable using the second global unlocking variable.
6. The method of claim 5, wherein the determination of the verification result is based on the number of the plurality of the first and second hash values that match the third hash value. After obtaining the use identifier of the first device unlocking password, the method further includes: In a case where the use identifier of the second device unlocking password indicates that the second device unlocking password has not been used, verifying the temporary unlocking password using the second device unlocking password.
7. The method of claim 6, wherein the determination of the result of the verification is based on the number of the plurality of the first and second hash values that match the third hash value. Updating the first global unlocking variable using the second global unlocking variable includes: Obtaining a first type global unlocking variable included in the first global unlocking variable and a second type global unlocking variable included in the first global unlocking variable, where the first type global unlocking variable included in the first global unlocking variable includes a variable value corresponding to a use identifier of a first group of passwords, the first group of passwords including a plurality of the first device unlocking passwords, and the second type global unlocking variable included in the first global unlocking variable includes a variable value corresponding to a use identifier of a second group of passwords, the second group of passwords including a plurality of the second device unlocking passwords; The first type of global unlocking variable contained in the second global unlocking variable and the second type of global unlocking variable contained in the second global unlocking variable, wherein the second type of global unlocking variable contained in the second global unlocking variable includes a variable value corresponding to the use identifier of a third group of passwords, and the third group of passwords includes a plurality of third device unlocking passwords, each of which is generated later than the second device unlocking password; The first type of global unlocking variable contained in the second global unlocking variable is updated to an intermediate global variable value, wherein the intermediate global variable value is equal to the variable value of the second type of global unlocking variable contained in the second global unlocking variable, and the intermediate global variable value represents the use identifier of the plurality of third device unlocking passwords; The first type of global unlocking variable contained in the second global unlocking variable is reset to an initial global variable value.
8. A system for determining a result of a verification, characterized by Comprise: A cloud platform and a smart door lock, The smart door lock is configured to, in response to an unlocking operation performed by a target object on the smart door lock, acquire a temporary unlocking password corresponding to the unlocking operation; acquire a device local key of the smart door lock from the cloud platform and generate a device unlocking password based on the device local key; and verify the temporary unlocking password based on the device unlocking password to determine a verification result. Acquiring the device local key of the smart door lock from the cloud platform comprises: in a case where it is detected that a network connection channel between the smart door lock and the cloud platform is established for the first time, acquiring a first device local key of the smart door lock from the cloud platform; in a case where it is detected that a network connection channel between the smart door lock and the cloud platform is established for the second time, determining a first establishment time at which the network connection channel between the smart door lock and the cloud platform is established for the first time and a second establishment time at which the network connection channel between the smart door lock and the cloud platform is established for the second time; and acquiring a target device local key of the smart door lock from the cloud platform based on a comparison result of a time difference between the first establishment time and the second establishment time and a preset period of time. Generating the device unlocking password based on the device local key comprises: in a case where it is detected that a network connection channel between the smart door lock and the cloud platform is established for the first time, generating a first device unlocking password based on the first device local key; and in a case where it is detected that a network connection channel between the smart door lock and the cloud platform is established for the second time, if it is determined that the target device local key is inconsistent with the first device local key, generating a second device unlocking password based on the target device local key. The temporary unlocking password is verified according to the device unlocking password, and a verification result is determined, including: the temporary unlocking password is verified using the second device unlocking password, and a first verification result is determined; in a case where the first verification result is a verification success, a notification message for the verification result being a verification success is sent to the target object; in a case where the first verification result is a verification failure, a first generation time when the first device local key is used to generate a first device unlocking password is obtained; in a case where a minute value of the first generation time is an integer multiple of a preset minute value, i password verification times are obtained from the first generation time, wherein a number of the i password verification times is not greater than a first preset value, and i is a positive integer; a time period between the first generation time and an i-1th password verification time is determined as a second effective time period; in a case where an unlocking time corresponding to the unlocking operation belongs to the second effective time period, the temporary unlocking password is verified using the first device unlocking password, and a second verification result is determined.
9. 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 7. 10.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 7 by using the computer program.
Citation Information
Patent Citations
Intelligent door lock secret key updating method and system and computer storage medium
CN110445607A
Temporary password offline verification method and system of intelligent lock and intelligent lock
CN113593095A