Offline password unlocking method and device, password lock and computer storage medium
By generating local and temporary passwords matching the current point in time, the problem of offline password is failed when the smart lock issuance is solved, and security is improved.
Patent Information
- Application Number
- CN202411704509.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-02-28
AI Technical Summary
Smart locks may fail to issue offline passwords when the network is in poor condition, and users cannot effectively cancel the issued passwords, resulting in security risks.
By obtaining the current time point, the local password of the door lock device is generated, and the terminal generates a temporary password according to the current time point, performing a matching, if the match is successful, the offline password unlocking operation is performed.
Solve the problem that passwords cannot be used due to network reasons, and there is no need to rely on network connections, which improves security.
Smart Images

Figure CN119541088A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart door locks, and more specifically, to an offline password unlocking method, device, password lock, and computer storage medium. Background Art
[0002] Current smart locks generally use network transmission to send a time-sensitive, limited-use offline password to the lock. When a visitor arrives, the offline password is simultaneously sent to a designated recipient via text message. This mechanism effectively mitigates the risk of the owner's password being leaked over time, thereby enhancing the lock's security.
[0003] However, poor network conditions can cause offline passwords to fail to be issued, creating inconvenience for the user experience. In some scenarios, users may wish to cancel an issued offline password, but network instability can also cause the deletion operation to fail, posing a security risk. This uncertainty in password management caused by network issues has become a pressing challenge in smart lock applications.
[0004] Currently, no effective solution has been found for the above-mentioned problems existing in the related technologies. Summary of the Invention
[0005] The present application provides an offline password unlocking method, device, password lock and computer storage medium to solve the above-mentioned technical problems existing in the related art.
[0006] According to one embodiment of the present application, an offline password unlocking method is provided, including: obtaining a current time point; generating a local password of a door lock device based on the current time point; receiving a temporary password inputted into the door lock device, the temporary password being generated by a terminal based on the current time point; matching the temporary password with the local password; and performing an offline password unlocking operation on the door lock device if the temporary password successfully matches the local password.
[0007] According to another embodiment of the present application, an offline password unlocking device is provided, including: an acquisition module for acquiring a current time point; a generation module for generating a local password of a door lock device according to the current time point; a receiving module for receiving a temporary password input into the door lock device, the temporary password being generated by a terminal according to the current time point; a matching module for matching the temporary password with the local password; and an unlocking module for performing an offline password unlocking operation on the door lock device if the temporary password successfully matches the local password.
[0008] Optionally, the generation module includes a first acquisition unit, used to obtain the password generation time interval and a first starting time point, the first starting time point being the time point when the local password was most recently generated; a first calculation unit, used to calculate the first difference between the current time point and the first starting time point; a first judgment unit, used to judge whether the first difference is greater than 0; and a first generation unit, used to generate the local password of the door lock device based on the generation time interval starting from the first starting time point if the first difference is greater than 0, and obtain a set of local passwords from the first starting time point to the current time point.
[0009] Optionally, the first generation unit is further configured to add the generation time interval to the first starting time point to obtain an intermediate time point, and iteratively perform the following steps until a current intermediate time point equals the current time point, whereupon generation of the local password stops, thereby obtaining a set of local passwords from the first starting time point to the current time point: generating a corresponding local password based on the current intermediate time point, determining whether the current intermediate time point equals the current time point; and if the current intermediate time point is not equal to the current time point, adding the generation time interval to the current intermediate time point to obtain a next intermediate time point, and setting the next intermediate time point as the current intermediate time point.
[0010] Optionally, the generation module also includes a second acquisition unit for obtaining the validity period of the local password; a second judgment unit for judging whether the first difference is greater than the validity period; a second calculation unit for calculating the second difference between the current time point and the validity period if the first difference is greater than the validity period, to obtain a second starting time point; and a second generation unit for generating a local password for the door lock device based on the generation time interval starting from the second starting time point, to obtain a set of local passwords from the second starting time point to the current time point.
[0011] Optionally, the generation module also includes a third acquisition unit, which is used to obtain the validity period of the local password and determine whether the first difference is greater than 0 and less than the validity period; a third calculation unit, which is used to generate the local password of the door lock device based on the generation time interval starting from the first starting time point if the first difference is greater than 0 and less than the validity period, and obtain the local password set from the first starting time point to the current time point; calculate the difference between the first starting time point and the validity period to obtain the expiration starting time point; obtain the local expiration password within the time period from the expiration starting time point to the first difference; and a replacement unit, which is used to replace the local expiration password with the local password set between the first starting time point and the current time point.
[0012] Optionally, the generation module also includes a conversion unit for converting the current time point into a current timestamp, calculating a first ratio between the current timestamp and the generation time interval, converting the first starting time point into a starting timestamp, and calculating a second ratio between the starting timestamp and the generation time interval; calculating a third difference between the first ratio and the second ratio; a third judgment unit for judging whether the third difference is greater than 0; and a third generation unit for generating a local password for the door lock device based on the generation time interval starting from the first starting time point if the third difference is greater than 0, and obtaining a set of local passwords from the first starting time point to the current time point.
[0013] Optionally, the generation module further includes a fourth generation unit, configured to obtain a device key of the door lock device; and generate a local password of the door lock device according to the device key and the current time point.
[0014] According to another embodiment of the present application, a computer storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned device embodiments when running.
[0015] According to another embodiment of the present application, an electronic device is also provided, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: the memory is used to store computer programs; the processor is used to execute the steps in the above method by running the program stored in the memory.
[0016] According to another embodiment of the present application, a computer program product comprising instructions is provided. When the computer program product is run on a computer, the computer is caused to execute the steps in the above method.
[0017] Through the embodiment of the present application, the current time point is obtained; based on the current time point, a local password of the door lock device is generated; a temporary password of the door lock device is received and input, and the temporary password is generated by the terminal based on the current time point; the temporary password is matched with the local password; if the temporary password matches the local password successfully, an offline password unlocking operation is performed on the door lock device, which solves the problem that the password cannot be used due to network reasons, does not need to rely on network connection, and improves security. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 This is a hardware structure block diagram of a smart lock according to an embodiment of the present application;
[0020] Figure 2 This is a flow chart of an offline password unlocking method according to an embodiment of the present application;
[0021] Figure 3 This is a structural block diagram of an offline password unlocking device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order 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 in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of this application. It should be noted that, in the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] Example 1
[0025] The method embodiment provided in the first embodiment of the present application can be executed in a smart lock such as a door lock device, a device security lock or a similar computing device. Taking running on a smart lock as an example, Figure 1 This is a hardware structure diagram of a smart lock according to an embodiment of the present application. Figure 1 As shown, the smart lock may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data. Optionally, the above-mentioned smart lock may also include a transmission device 106 for communication functions and an input and output device 108. It will be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the above-mentioned smart lock. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0026] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to an offline password unlocking method in an embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the smart lock 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.
[0027] The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by the smart lock's communications provider. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In one embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0028] In this embodiment, an offline password unlocking method is provided. Figure 2 This is a flow chart of an offline password unlocking method according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:
[0029] Step S10, obtaining the current time point;
[0030] Step S20: Generate a local password for the door lock device according to the current time point;
[0031] Step S30, receiving a temporary password inputted into the door lock device, the temporary password being generated by the terminal according to the current time point;
[0032] Step S40, matching the temporary password with the local password;
[0033] Step S50: If the temporary password matches the local password successfully, an offline password unlocking operation is performed on the door lock device.
[0034] In this embodiment, the lock terminal generates a local password corresponding to the current time point in real time based on the current time point. When a temporary password needs to be generated, the household owner terminal (such as a mobile phone APP) uses a corresponding algorithm to generate a corresponding temporary password based on the current time point. The temporary password and the local password are generated in the same way, that is, the local password generated by the lock terminal and the temporary password generated by the terminal at the same time point are the same. The terminal pushes the temporary password to the temporary user terminal or informs the temporary user through SMS or other means, so that the temporary user can use the temporary password to unlock the door lock device. The lock terminal receives the input temporary password and matches the temporary password with the local password. Since the local password corresponding to the current time point is generated in the lock terminal, the temporary password corresponding to the current time point and the local password can be matched. When the temporary password and the local password match successfully, the door lock device is unlocked.
[0035] Through the above steps, the current time point is obtained; based on the current time point, the local password of the door lock device is generated; the temporary password of the door lock device is received and input, and the temporary password is generated by the terminal based on the current time point; the temporary password is matched with the local password; if the temporary password matches the local password successfully, the offline password unlocking operation is performed on the door lock device, which solves the problem of the password being unusable due to network reasons, does not need to rely on network connection, and improves security.
[0036] In one implementation of this embodiment, generating a local password for the door lock device according to the current time point includes:
[0037] S21, obtaining a password generation interval and a first starting time point, where the first starting time point is the time point when the local password was most recently generated;
[0038] S22, calculating a first difference between the current time point and the first starting time point;
[0039] S23, determining whether the first difference is greater than 0;
[0040] S24: If the first difference is greater than 0, a local password of the door lock device is generated based on the generation time interval starting from the first starting time point, and a set of local passwords from the first starting time point to the current time point is obtained.
[0041] In this embodiment, the interval for generating offline passwords can be pre-set based on actual offline password usage, for example, every 30 seconds or every minute. In this embodiment, the interval is 30 seconds, meaning a new local password is updated every 30 seconds. Each 30-second interval corresponds to a fixed local password. When the lock is powered on, the initial starting time is initialized to 0, or another time point.
[0042] In one example, the first starting time point of the last local password generation is 15:00:00, and the current time point is 15:05:00. The first difference between the current time point and the first starting time point is calculated to be 5 minutes. If the first difference is greater than 0, there is a time difference between the current time and the time when the local password was last generated. Since the temporary password of the owner terminal is generated based on the current time point, the local password must also be updated to the password corresponding to the current time point in order to successfully perform offline password matching. Therefore, in this embodiment, when there is a time difference between the current time point and the first starting time point of the last local password generation, local passwords are generated based on the generation time interval starting from the first starting time point to obtain a set of local passwords between the first starting time point and the current time point, that is, 10 offline passwords within the 5 minutes from the first starting time point 15:00:00 to the current time point 15:05:00 are obtained to ensure that the local password of the lock terminal and the temporary password can be successfully matched.
[0043] In this embodiment, starting from the first starting time point, generating a local password of the door lock device based on the generation time interval, and obtaining a set of local passwords between the first starting time point and the current time point includes:
[0044] S241: Add the generation time interval to the first starting time point to obtain an intermediate time point, and iteratively perform the following steps until the current intermediate time point equals the current time point, then stop generating local passwords to obtain a set of local passwords from the first starting time point to the current time point.
[0045] S242, generating a corresponding local password based on the current intermediate time point, and determining whether the current intermediate time point is equal to the current time point;
[0046] S243: If the current intermediate time point is not equal to the current time point, add the generation time interval to the current intermediate time point to obtain the next intermediate time point, and use the next intermediate time point as the current intermediate time point.
[0047] In one example of this embodiment, the last generated local password is the local password corresponding to the first starting time point 15:00:00. The generation interval of 30 seconds is added to the first starting time point 15:00:00 to obtain the current intermediate time point 15:00:30. A local password corresponding to the current intermediate time point 15:00:30 is generated. If the current intermediate time point 15:00:30 is not equal to the current time point 15:05:00, 30 seconds are added to the current intermediate time point 15:00:30 to obtain the next intermediate time point 15:01:00. The next intermediate time point 15:01:00 is used as the current intermediate time point to continue generating the local password corresponding to 15:01:00. This iteration continues until the current intermediate time point equals the current time point, indicating that the local password has been updated to the current time point. The local password on the lock terminal can match the temporary password generated by the owner terminal. Then, local password generation stops, and the local password set from the first starting time point 15:00:00 to the current time point 15:05:00 is obtained.
[0048] This embodiment compares the difference between the current time and the start time and automatically updates the local password when there is a difference, thereby improving the intelligence of local offline password generation and increasing the matching success rate.
[0049] In another implementation of this embodiment, after calculating the first difference between the current time point and the first starting time point, the method further includes:
[0050] A1, obtain the validity period of the local password;
[0051] A2, determining whether the first difference is greater than the effective duration;
[0052] A3, if the first difference is greater than the effective duration, calculating a second difference between the current time point and the effective duration to obtain a second starting time point;
[0053] A4: Generate a local password for the door lock device based on the generation time interval starting from the second starting time point, and obtain a set of local passwords from the second starting time point to the current time point.
[0054] In this embodiment, the validity period of the local password can be set according to the actual usage of the local password. In this embodiment, the validity period is set to 20 minutes.
[0055] This embodiment targets the dormant state of the door lock device. When the door lock device is in dormant state, the local password will not be updated, and the local passwords generated historically by the lock end will be partially or completely invalid. Based on this, in one example, the door lock device goes into dormancy at the first starting time point (the time when the local password was last generated) 15:00:00, and wakes up 1 hour later (the current time point at this time is 16:00:00). The first difference between the current time point and the first starting time point is 1 hour, which is greater than the valid time length of 20 minutes, indicating that no password update has been performed for more than 20 minutes, and all local offline passwords generated historically by the lock end are invalid. The second difference between the current time point and the valid time length is calculated to obtain the second starting time point 15:40:00. Starting from the second starting time point, local passwords are generated based on a generation time interval of 30 seconds, and a set of local passwords within 20 minutes from the second starting time point 15:40:00 to the current time point 16:00:00 is obtained.
[0056] In this embodiment, when the door lock device is in a dormant state, etc., and the local password is not updated within the valid time, only the local password within 20 minutes before the current time point is updated, which saves computing resources and improves the password update speed.
[0057] In this embodiment, after calculating the first difference between the current time point and the first starting time point, the method further includes:
[0058] B1, obtaining the validity period of the local password, and determining whether the first difference is greater than 0 and less than the validity period;
[0059] B2: If the first difference is greater than 0 and less than the valid duration, generating a local password for the door lock device based on the generation time interval starting from the first starting time point, and obtaining a set of local passwords from the first starting time point to the current time point;
[0060] B3, calculating the difference between the first starting time point and the validity period to obtain an expiration starting time point;
[0061] B4, obtaining a local expiration password within a time period from the expiration start time point to the first difference;
[0062] B5: Replace the local invalid password with a set of local passwords between the first starting time point and the current time point.
[0063] In one example, the current time is 15:05:00; a first difference between the current time and the first starting time 15:00:00 is calculated to be 5 minutes, the first difference is greater than 0 and less than the valid time of 20 minutes. To maintain the valid time of 20 minutes, a fixed number of local passwords (40 local passwords in this embodiment) are continuously updated. When the first difference between the current time and the first starting time is greater than 0 and less than the valid time of 20 minutes, local passwords are generated based on the generation time interval starting from the first starting time 15:00:00, and the local passwords are obtained from the first starting time 15:00:00. 10 local passwords between 0:00 AM and the current time 15:05:00; calculate the difference between the first starting time and the validity period to obtain the expiration start time 14:40:00; determine the 10 historical local passwords within 5 minutes of the first difference from the expiration start time 14:40:00 (i.e., 14:40:00 to 14:45:00) as the local expiration passwords, and replace the local expiration passwords between 14:40:00 and 14:45:00 with the newly generated 10 local passwords between 15:00:00 and 15:05:00, to maintain 40 valid local passwords.
[0064] In another implementation of this embodiment, after obtaining the password generation time interval and the first starting time point, it includes: converting the current time point into a current timestamp, calculating a first ratio between the current timestamp and the generation time interval, converting the first starting time point into a starting timestamp, and calculating a second ratio between the starting timestamp and the generation time interval; calculating a third difference between the first ratio and the second ratio; judging whether the third difference is greater than 0; if the third difference is greater than 0, generating a local password for the door lock device based on the generation time interval starting from the first starting time point, and obtaining a set of local passwords from the first starting time point to the current time point.
[0065] This embodiment converts each time point (e.g., 2024-09-19 11:53:21) into a timestamp format (1726718001 seconds) to simplify the calculation process. In one example, the current time point is converted to a current timestamp of 3600 seconds, and a first ratio of 120 is calculated between the current timestamp and the 30-second generation interval. The first starting time point is converted to a starting timestamp of 2400 seconds, and a second ratio of 80 is calculated between the starting timestamp and the 30-second generation interval. A third difference of 40 is calculated between the first and second ratios, indicating that the current time point is 1200 seconds from the starting time point, which is the time it takes to generate 40 passwords. If the third difference is greater than 0, local passwords are generated based on the generation interval starting from the first starting time point, obtaining a set of local passwords from the first starting time point to the current time point.
[0066] In one implementation of this embodiment, generating a local password of the door lock device according to the current time point includes: obtaining a device key of the door lock device; and generating a local password of the door lock device according to the device key and the current time point.
[0067] The solution of this embodiment provides a specific application example of an offline password unlocking method, including:
[0068] 1. When the lock is powered on, the start and end time points are initialized to 0 and the index is 0. The start and end time points are converted to timestamps and divided by the change interval (the change interval is the generation time interval).
[0069] 2. The lock end obtains the current time and converts it into the current timestamp.
[0070] 3. The lock calculates the password group at the current time based on the timestamp. Password group = timestamp / change interval (for example, 14:40:30 to 14:40:59 corresponds to a fixed password, and 14:41:00 to 14:41:29 corresponds to another fixed password). The change interval is the frequency of changes in the local offline password. For example, if it changes every 30 seconds, the change interval is 30.
[0071] 4. Assuming the local password is valid for 20 minutes, the lock terminal has a total of 40 sets of local offline passwords.
[0072] 5. End time point = current time point (assign the current time point to the end time point).
[0073] 6. If the end time point - the start time point is greater than 40, then the start time point = the end time point - 40.
[0074] 7. The lock end obtains the current offline password based on the encryption key (device key) and the current time point. The starting time point + 1, the index + 1.
[0075] 8. Repeat steps 2-7. When the start time is equal to the end time, the offline password will no longer be updated.
[0076] 9. At this time, 40 sets of passwords have been updated (offline passwords 0, 1, 2...39 are recorded in array form), the starting time point is equal to the ending time point, and the index is 39.
[0077] 10. At this time, another 30 seconds have passed and the end time of the lock is greater than the starting time.
[0078] 11. The lock end obtains the current offline password based on the encryption key (device key) and the current time point. The start time point is equal to the end time point, and the index is 0 (index 0 originally has a key and is the password from 20 minutes ago. At this time, the newly generated offline password will overwrite the password from 20 minutes ago).
[0079] 12. Similarly, after another 30 seconds, the lock end obtains the current offline password based on the encryption key (device key) and the current time point. The start time point is equal to the end time point, and the index is 1.
[0080] 13. And so on, keep 40 sets of passwords, and the passwords are valid for 20 minutes.
[0081] This embodiment can solve the problem of being unable to connect to the network after the traditional smart lock WIFI connection is disconnected. It can solve the problem of connecting to the network well when there is a network, bringing a better experience to customers.
[0082] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0083] Example 2
[0084] This embodiment also provides an offline password unlocking device for implementing the above-mentioned embodiments and preferred implementations. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0085] Figure 3 This is a structural block diagram of an offline password unlocking device according to an embodiment of the present application. Figure 3 As shown, the device includes:
[0086] An acquisition module 31 is used to obtain the current time point;
[0087] A generating module 32, configured to generate a local password of the door lock device according to the current time point;
[0088] A receiving module 33 is configured to receive a temporary password input into the door lock device, where the temporary password is generated by the terminal according to the current time point;
[0089] a matching module 34, configured to match the temporary password with the local password;
[0090] The unlocking module 35 is configured to perform an offline password unlocking operation on the door lock device if the temporary password successfully matches the local password.
[0091] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0092] Example 3
[0093] An embodiment of the present application further provides a computer storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when running.
[0094] Optionally, in this embodiment, the computer storage medium may be configured to store a computer program for performing the following steps:
[0095] S1, get the current time point;
[0096] S2, generating a local password for the door lock device according to the current time point;
[0097] S3, receiving a temporary password inputted from the door lock device, the temporary password being generated by the terminal according to the current time point;
[0098] S4, matching the temporary password with the local password;
[0099] S5: If the temporary password successfully matches the local password, an offline password unlocking operation is performed on the door lock device.
[0100] Optionally, in this embodiment, the above-mentioned computer storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0101] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0102] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0103] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:
[0104] S1, get the current time point;
[0105] S2, generating a local password for the door lock device according to the current time point;
[0106] S3, receiving a temporary password inputted from the door lock device, the temporary password being generated by the terminal according to the current time point;
[0107] S4, matching the temporary password with the local password;
[0108] S5: If the temporary password successfully matches the local password, an offline password unlocking operation is performed on the door lock device.
[0109] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0110] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0111] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0112] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0113] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0114] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0115] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a computer storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned computer storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0116] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An offline password unlocking method, characterized in that: The method comprises: Get the current time point; Generate a local password for the door lock device according to the current time point; Receiving a temporary password inputted into the door lock device, the temporary password being generated by the terminal according to the current time point; Matching the temporary password with the local password; If the temporary password successfully matches the local password, an offline password unlocking operation is performed on the door lock device.
2. The method according to claim 1, characterized in that Generating a local password of the door lock device according to the current time point includes: Obtaining a password generation time interval and a first starting time point, where the first starting time point is the time point when the local password was most recently generated; Calculating a first difference between the current time point and the first starting time point; Determine whether the first difference is greater than 0; If the first difference is greater than 0, a local password of the door lock device is generated based on the generation time interval starting from the first starting time point, and a local password set from the first starting time point to the current time point is obtained.
3. The method according to claim 2, characterized in that Generate a local password of the door lock device based on the generation time interval starting from the first starting time point, and obtain a set of local passwords from the first starting time point to the current time point, comprising: Add the generation time interval to the first starting time point to obtain an intermediate time point, and iteratively perform the following steps until the current intermediate time point is equal to the current time point, stop generating local passwords, and obtain a set of local passwords from the first starting time point to the current time point: Generate a corresponding local password based on the current intermediate time point, and determine whether the current intermediate time point is equal to the current time point; If the current intermediate time point is not equal to the current time point, the current intermediate time point is added to the generated time interval to obtain the next intermediate time point, and the next intermediate time point is used as the current intermediate time point.
4. The method according to claim 2, characterized in that: After calculating the first difference between the current time point and the first starting time point, the method further includes: Get the validity period of the local password; Determine whether the first difference is greater than the effective duration; If the first difference is greater than the effective duration, then calculating a second difference between the current time point and the effective duration to obtain a second starting time point; Starting from the second starting time point, a local password of the door lock device is generated based on the generation time interval, and a local password set between the second starting time point and the current time point is obtained.
5. The method according to claim 2, characterized in that: After calculating the first difference between the current time point and the first starting time point, the method further includes: Obtaining the validity period of the local password, and determining whether the first difference is greater than 0 and less than the validity period; If the first difference is greater than 0 and less than the valid time, a local password of the door lock device is generated based on the generation time interval starting from the first starting time point, and a local password set between the first starting time point and the current time point is obtained; Calculate the difference between the first starting time point and the valid duration to obtain the expiration starting time point; Obtaining a local expiration password within a time period from the expiration start time point to the first difference; The local invalid password is replaced by a local password set between the first starting time point and the current time point.
6. The method according to claim 2, characterized in that Get the password generation time interval and after the first starting time point, including: Convert the current time point into a current timestamp, calculate a first ratio between the current timestamp and the generation time interval, convert the first starting time point into a starting timestamp, and calculate a second ratio between the starting timestamp and the generation time interval; calculating a third difference between the first ratio and the second ratio; Determine whether the third difference is greater than 0; If the third difference is greater than 0, a local password of the door lock device is generated based on the generation time interval starting from the first starting time point, and a local password set from the first starting time point to the current time point is obtained.
7. The method according to claim 1, characterized in that Generating a local password of the door lock device according to the current time point includes: Obtaining a device key of the door lock device; A local password of the door lock device is generated according to the device key and the current time point.
8. An offline password unlocking device, characterized in that: include: The acquisition module is used to obtain the current time point; A generating module, used to generate a local password of the door lock device according to the current time point; A receiving module, used for receiving a temporary password input into the door lock device, where the temporary password is generated by the terminal according to the current time point; A matching module, used for matching the temporary password with the local password; The unlocking module is used to perform an offline password unlocking operation on the door lock device if the temporary password successfully matches the local password.
9. A combination lock, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: Memory, used to store computer programs; A processor, configured to execute the offline password unlocking method according to any one of claims 1 to 7 by running a program stored in a memory.
10. A computer storage medium, characterized in that: The computer storage medium includes a stored program, wherein the program executes the offline password unlocking method according to any one of claims 1 to 7 when running.
Citation Information
Patent Citations
Intelligent door lock control method, intelligent door lock and storage medium
CN112419549A
Temporary password offline verification method and system of intelligent lock and intelligent lock
CN113593095A
Verification method and generation method of temporary password of intelligent door lock and device
CN113781686A
Unlocking method, intelligent lock and intelligent lock system
CN114220199A
Verification method and generation method of offline password and intelligent door lock
CN115714675A