Offline password generation method and system, terminal and storage medium
By generating offline passwords with time attributes in the smart door lock terminal, using technologies such as RTC and cyclic redundancy verification, the problem of insufficient security of offline passwords of smart door locks is solved, and high security, convenience and flexibility are achieved , reduces management and maintenance costs.
Patent Information
- Application Number
- CN202411402600.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-03
AI Technical Summary
The existing smart door lock offline password technology has problems such as insufficient security, high management complexity, insufficient flexibility and poor user experience. Especially because the simple preset password method is easy to be cracked and the algorithm lacks sufficient complexity, resulting in The risk of passwords being reverse engineered and calculated.
By generating offline passwords with time attributes in the terminal, using time synchronization and real-time clock (RTC) to ensure that the time limit attributes of passwords are valid, cyclic redundancy checks and random number combinations are used to generate complex offline keys, providing multiple passwords Type (single, permanent, limited time, weekly loop) and use whitelist and blacklist to manage passwords to ensure the security and effectiveness of passwords.
It improves the security and convenience of passwords, reduces management complexity and maintenance costs, enhances the anti-cracking ability of passwords, adapts to different security needs scenarios, and reduces user operation burden and administrator maintenance workload.
Smart Images

Figure CN119251938A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of door lock offline password technology, and in particular to an offline password generation method, system, terminal and storage medium. Background Art
[0002] With the rapid development of smart home technology, smart door locks have gradually become an important part of home security. Traditional smart door locks usually rely on networking to achieve remote unlocking and management. Although this method brings convenience, it also has some limitations. For example, problems such as unstable network connection, device disconnection or server failure may cause users to be unable to unlock the door normally. In addition, network-based smart door locks may have the risk of information leakage during data transmission, posing a potential threat to user privacy and security.
[0003] In order to solve these problems, offline password technology has gradually been applied to the field of smart door locks in recent years. Offline password refers to the use of preset passwords to authenticate and unlock the door without the need for real-time network connection. This method effectively avoids network connection interruption or information leakage by presetting passwords between the device and the server. At the same time, offline passwords can also dynamically update and manage passwords through certain algorithms and logic, thereby further improving security and convenience.
[0004] However, traditional offline passwords mostly use simple preset passwords, which can be easily obtained by attackers through brute force cracking and other means. In addition, the algorithms of some offline password technologies lack sufficient complexity and may be at risk of being reverse engineered and calculated, resulting in password cracking or leakage.
[0005] Therefore, the prior art still needs to be improved and developed. Summary of the invention
[0006] The main purpose of the present application is to provide an offline password generation method, system, terminal and storage medium, aiming to solve the problem that the smart lock offline password solution in the prior art adopts a simple preset password method resulting in low security.
[0007] A first aspect of an embodiment of the present application provides an offline password generation method, which is applied to a terminal and includes the following steps: obtaining the application time of the terminal; when the smart lock performs time synchronization according to the application time, designing the password type of the terminal; generating an offline password according to the password type, so that the user can open the smart lock according to the offline password; wherein the offline password is a password with a time attribute.
[0008] Optionally, in one embodiment of the present application, generating an offline password according to the password type specifically includes: obtaining a duration corresponding to the password type; performing a cyclic redundancy check on the duration to obtain a check value; and obtaining an offline key according to the check value, the password type and the duration.
[0009] Optionally, in an embodiment of the present application, obtaining the offline key according to the verification value, the password type and the duration specifically includes: combining the verification value and the duration according to the password type to obtain first data; processing the first data according to the password type to obtain second data; and processing the second data to obtain an offline password.
[0010] Optionally, in one embodiment of the present application, processing the first data according to the password type to obtain the second data specifically includes: determining a target number from a preset list; processing the target number and the first data according to the password type to obtain the second data.
[0011] Optionally, in one embodiment of the present application, the processing of the second data to obtain the offline password specifically includes: obtaining a timestamp input by the user, wherein the timestamp is the starting time of the offline password; processing the timestamp to generate key data; and obtaining the offline password based on the second data and the key data.
[0012] Optionally, in one embodiment of the present application, the offline password is generated according to the password type, and then further includes: when the smart lock detects that the duration corresponding to the offline password meets preset requirements, controlling the smart lock to unlock, and saving the offline password to a whitelist, wherein the whitelist stores offline passwords of any password type including one-time passwords, permanent passwords, time-limited passwords and weekly cycle passwords.
[0013] Optionally, in an embodiment of the present application, the offline password generation method further includes: detecting the offline passwords in the whitelist to obtain a detection result; and deleting the offline passwords for which the detection result is invalid.
[0014] The second aspect of the embodiment of the present application further provides an offline password generation system, wherein the offline password generation system includes:
[0015] A time acquisition module, used to acquire the application time of the terminal;
[0016] A time synchronization and type design module, used to design the password type of the terminal when the smart lock performs time synchronization according to the application time;
[0017] A password generation module is used to generate an offline password according to the password type, so that the user can open the smart lock according to the offline password; wherein the offline password is a password with a time attribute.
[0018] The third aspect of an embodiment of the present application also provides a terminal, wherein the terminal includes: a memory, a processor, and an offline password generation program stored in the memory and executable on the processor, wherein the offline password generation program implements the steps of the offline password generation method as described above when executed by the processor.
[0019] A fourth aspect of an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores an offline password generation program, and when the offline password generation program is executed by a processor, the steps of the offline password generation method as described above are implemented.
[0020] Beneficial effect: The present application provides an offline password generation method, system, terminal and storage medium. The method synchronizes the terminal application time with the lock end time of the smart lock, and the terminal generates an offline password with a time attribute according to the designed password type. In the absence of a network connection, it can ensure that the time limit attribute of the password is valid, thereby improving the security of the password. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 It is a flow chart of a preferred embodiment of the offline password generation method of the present application;
[0023] Figure 2 It is a schematic diagram of encryption in a preferred embodiment of the off-line password generation method of the present application;
[0024] Figure 3 It is a schematic diagram of decryption in a preferred embodiment of the off-line password generation method of the present application;
[0025] Figure 4 It is a structural diagram of a preferred embodiment of the off-line password generation system of the present application;
[0026] Figure 5 This is a structural diagram of a preferred embodiment of the terminal of this application.
[0027] Description of reference numerals:
[0028] 100. Time acquisition module; 200. Time synchronization and type design module; 300. Password generation module.
[0029] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical scheme and effect of the present application clearer and more specific, the technical scheme in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. The described embodiments are only possible technical implementations of the present application, not all possible implementations. Based on the embodiments in the present application, those skilled in the art can completely combine the embodiments of the present application to obtain other embodiments without creative work, and these embodiments are also within the scope of protection of the present application.
[0031] In the related technologies, although offline cryptography technology has solved the problem of network dependence to a certain extent, the existing offline cryptography technology still has some shortcomings:
[0032] Insufficient security: Traditional offline passwords mostly use simple preset passwords, which are easily obtained by attackers through brute force cracking and other means. In addition, the algorithms of some offline password technologies lack sufficient complexity and may be at risk of being reverse engineered and calculated, resulting in password cracking or leakage. High management complexity: Offline passwords usually need to be synchronized on the server and device in advance, which increases the complexity of management. Especially when multiple devices need to change passwords frequently, it is easy to cause untimely synchronization or password asynchrony, thus affecting normal use. Insufficient flexibility: Most existing offline passwords use fixed update cycles and methods, which cannot be flexibly adjusted according to specific security requirements. For example, in scenarios with high security requirements, the frequency of password updates may not be enough, which may easily bring security risks; while in scenarios with low security requirements, too frequent password updates will increase the management burden. Poor user experience: The design of some offline password systems is too complex, and users need to remember multiple passwords or perform multi-step verification operations, resulting in poor user experience. In addition, the lack of effective user prompts and feedback mechanisms makes it easy for users to be confused and make mistakes during use. High cost: In order to achieve high security and complex management of offline passwords, it is usually necessary to make large investments at the hardware and software levels. This increases the manufacturing and maintenance costs of smart door locks, posing challenges to the popularization of the product.
[0033] First, the nouns involved in this application are introduced:
[0034] CRC: Cyclic Redundancy Check, a technology used to detect data transmission or storage errors, ensuring data integrity by calculating a specific check value of the data.
[0035] CRC16_IBM: is a specific implementation of CRC. CRC16 indicates that this is a 16-bit cyclic redundancy check algorithm, which is used in this embodiment to check the duration D to generate a short check value with a fixed number of bits.
[0036] Data_1: The first data is an integer obtained by combining the CRC value and the duration according to the password type. This integer may be an input parameter in subsequent steps.
[0037] Data_2: The second data refers to a random number selected from the random number list and a new value obtained by performing some processing with Data_1. This new value is an input parameter in the subsequent steps.
[0038] key_part: key data. In the process of building the key, the timestamp is processed and combined with the key factor to generate a complete key, which is used to operate with Data_2 to generate the final password.
[0039] The offline password generation method, system, terminal and storage medium of the embodiment of the present application are described below with reference to the accompanying drawings. In view of the problem that the offline password scheme of the smart lock in the above-mentioned related art adopts a simple preset password method, resulting in low security, the present application provides an offline password generation method, in which the terminal application time is synchronized with the lock end time of the smart lock, and the terminal generates an offline password with a time attribute according to the designed password type. In the absence of a network connection, it can ensure that the time limit attribute of the password is valid, thereby improving the security of the password. As a result, the technical problem that the offline password scheme of the smart lock in the related art adopts a simple preset password method, resulting in low security, is solved.
[0040] In this application, the generation of the offline password is performed on the mobile phone, but it relies on the RTC time of the smart lock to ensure the time limit attribute of the password, and can maintain a high degree of security and effectiveness without a network connection.
[0041] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0042] The offline password generation method described in the preferred embodiment of the present application is applied to a terminal, such as Figure 1 As shown, the offline password generation method includes the following steps:
[0043] In step S101, the application time of the terminal is obtained, and the application time is sent to the smart lock.
[0044] Specifically, an accurate target time information is obtained. This time information usually comes from a terminal (i.e., mobile phone) application (App), because the mobile phone usually connects to an Internet time server through a network to maintain the accuracy of the time.
[0045] It should be noted that the terminal will communicate and synchronize the time when it connects to the smart lock via Bluetooth for the first time. Subsequently, except for deleting the password, the smart lock will not communicate with the terminal at other times.
[0046] In step S102, when the smart lock performs time synchronization according to the application time, the password type of the terminal is designed.
[0047] When you first bind the smart lock and the terminal application (App), synchronize the lock end time with the App time. This ensures the time consistency between the lock and the App in subsequent operations, thus providing a reliable time basis for the generation and verification of offline passwords. After synchronizing the time, the lock end uses the real-time clock (RTC) to maintain the accuracy of the time.
[0048] In the embodiment of the present application, during the time synchronization process, first binding: When the smart lock and the mobile phone App are bound for the first time, they will synchronize the time, which means that the App sends the current time (which may be obtained from the network time server) to the smart lock, and the smart lock uses its real-time clock (RTC) to calibrate its own time. RTC maintains time: After that, the smart lock will rely on its RTC to maintain the accuracy of time and maintain the continuity of time even when the network is disconnected.
[0049] It should be noted that the RTC module keeps the time accurate through an internal high-precision crystal oscillator. These crystal oscillators can maintain a stable frequency over a wide temperature range and maintain high accuracy even in extreme environmental conditions. For example, the real-time clock module has a built-in DTCXO (digital temperature compensated crystal oscillator) to improve clock accuracy through temperature compensation.
[0050] That is, since the generation of the offline password is based on the RTC time of the smart lock, and this time is taken into account when generating the password, the time limit attribute of the password can be ensured to be valid even when there is no network connection. This enhances the security of the password because an attacker cannot simply bypass the time limit by modifying the network time or bypassing network verification.
[0051] Specifically, this application defines four types of offline passwords, all of which are 10 digits long, to meet different security requirements and usage scenarios:
[0052] Single-time password: can only be used once and is valid for 6 hours after the start time; a maximum of 20 non-repetitive passwords can be generated in the same hour.
[0053] Permanent password: valid for a long time, can be used to unlock the door an unlimited number of times; must be used once within 24 hours after the start time, otherwise it will become invalid; a maximum of 20 non-repetitive passwords can be generated in the same hour.
[0054] Time-limited password: unlimited number of unlocking times within the specified time range; the maximum valid span is three years; time span > 1 year: calculated on a monthly basis; ≤ 1 year: calculated on an hourly basis; must be used once within 24 hours after the start time, otherwise it will become invalid; the passwords generated in the same time period are the same.
[0055] Weekly cycle password: It is used in a 7-day cycle according to the set date and time period; it supports a cycle mode of every day, weekend, weekday or a specific day; it must be used once within 24 hours after the start time, otherwise it will become invalid; the passwords generated in the same time period are the same.
[0056] Clear code: used to clear all saved passwords; must be used once within 24 hours after the start time, otherwise it will become invalid; a maximum of 20 non-repetitive passwords can be generated in the same hour.
[0057] In step S103, an offline password is generated according to the password type, so that the user can open the smart lock according to the offline password; wherein the offline password is a password with a time attribute.
[0058] It is understood that after synchronizing the time, the lock uses the real-time clock (RTC) to maintain the accuracy of the time. After that, the App can generate an offline password with a time limit attribute without a network connection. The password is generated based on the RTC time of the lock, which makes the offline password valid within the preset time range, enhancing the security of the password.
[0059] It should be noted that during the first Bluetooth communication, the terminal will tell the lock the time it has obtained, and the lock will record the time. The lock will start from this time, and the subsequent APP will generate a password with time attributes based on the current time. When the lock enters the password, it will determine whether the password has timed out or the symbol condition is used to open the door based on the time it has recorded.
[0060] In the offline password generation process of this application, the password is generated on the mobile phone: when an offline password needs to be generated, this operation is completed on the mobile phone App. The mobile phone App will know the current RTC time of the smart lock (this can be obtained through the previous synchronization process, or if the App has access to the local time of the mobile phone, and assuming that the mobile phone time is accurate, it can also be known indirectly), but it does not actually need to directly access the RTC of the smart lock. Addition of time limit attributes: When generating a password, the App will embed time limit attributes into the password as needed (such as the validity period of a single password, the time range of a limited-time password, etc.). This is usually achieved by combining time information with other parts of the password in some form (such as a timestamp, time interval, or specific time code).
[0061] In a possible implementation, a duration corresponding to the password type is obtained; a cyclic redundancy check is performed on the duration to obtain a check value (ie, a CRC value); and an offline key is obtained according to the check value, the password type, and the duration.
[0062] It should be noted that different password types have different validity periods. For example, a one-time password is valid for 6 hours, and the duration D is 6. The start time is the timestamp, which can also be said to be the start time of the password. The CRC value ensures that the password has not been tampered with during transmission.
[0063] Specifically, duration and CRC calculation: the CRC value of duration D is calculated by CRC16_IBM algorithm, and the intermediate data is generated in combination with the duration to ensure the randomness of the password.
[0064] In a possible implementation, the check value and the duration are combined according to the password type to obtain first data; the first data is processed according to the password type to obtain second data; and the second data is processed to obtain an offline password.
[0065] It should be noted that the construction of the key is based on the timestamp and key factor, which enhances the security of the password; the generation of the final password is the result of the encryption process, and only the lock end with the correct key can decrypt and verify the validity of the password.
[0066] Specifically, Data_1 is generated by using different padding and combination rules according to the password type (single, permanent, limited time, periodic), combining the CRC value and the duration D into an integer. Use of random number list: Extract random numbers from the random number list R
[20] , combine them with Data_1 through index shift and XOR operation, and generate Data_2 to ensure the non-repetitiveness of the offline password.
[0067] In a possible implementation manner, a target number is determined from a preset list; and the target number and the first data are processed according to the password type to obtain second data.
[0068] In a possible implementation, a timestamp input by a user is obtained, wherein the timestamp is the start time of the offline password; the timestamp is processed to generate key data; and the offline password is obtained according to the second data and the key data.
[0069] Specifically, the key data is constructed by aligning the timestamp T_timestamp and combining it with the key factor to generate a SHA256 hash value, extracting the first 4 bytes to form key_part to increase the security of the password. The final password is generated by performing an XOR operation on Data_2 and key_part to generate the final 10-digit offline password pwd to ensure the complexity and security of the password.
[0070] In the examples of this application, see Figure 2 and Figure 3 , the password generation and decryption process is as follows:
[0071] K1, calculate the CRC value: calculate CRC16_IBM for the 15-bit duration D to obtain a 16-bit CRC value. The 15-bit duration D refers to a value used to represent the validity period of the password, which exists in a certain encoding form (such as binary or hexadecimal) and occupies 15 bits of space.
[0072] K2, generate Data_1: According to the password type (single, permanent, limited time, periodic), combine the CRC value and the duration to get an integer to ensure that the password is 10 bits.
[0073] K3, generate Data_2: select a random number from the random number list, process Data_1 and the random number according to the password type, and obtain Data_2.
[0074] K4, build key: process the timestamp, combine the key factor to generate the key, get the final key through SHA256 hash, and extract its part as key_part.
[0075] K5, generate the final password: perform operation on Data_2 and key_part to obtain the final password.
[0076] In one possible implementation, when the smart lock detects that the duration corresponding to the offline password meets the preset requirements, the smart lock is controlled to unlock and the offline password is saved to a whitelist, wherein the whitelist stores offline passwords of any password type including one-time passwords, permanent passwords, time-limited passwords and weekly cycle passwords.
[0077] Specifically, during the verification process, when the mobile app sends the offline password to the smart lock for verification, the smart lock will check whether the time limit attribute in the password meets the current RTC time requirements. If it does, the smart lock will unlock; if it does not (such as the password has expired), it will refuse to unlock.
[0078] Furthermore, the password generation process is all done on the app. After the user enters the password, the lock is responsible for determining whether the password is correct. The synchronization time is because the lock needs to calculate backwards from the current time. If the calculated time is the same as the password generated by the user, it means the password is correct.
[0079] In a possible implementation, the offline passwords in the whitelist are detected to obtain a detection result; and the offline passwords for which the detection result indicates that the passwords are invalid are deleted.
[0080] Specifically, the server (terminal application) and the lock have a list for saving passwords. The list is used to store currently valid passwords, including one-time passwords, permanent passwords, time-limited passwords, and periodic passwords, which is called the "white list". The list is used to store expired passwords, which is called the "black list". The server and the lock periodically check the black and white password lists and delete expired passwords. Password management mechanism: manage valid passwords through the white list, manage invalid passwords through the black list, and automatically delete expired passwords regularly to maintain the security and effectiveness of the system.
[0081] The embodiments of the present application have the following effects:
[0082] (1) Strengthened system security. Time synchronization and RTC use: Time synchronization during the first binding ensures the time consistency between the lock and the App. The subsequent RTC-based offline password generation and verification mechanism can prevent time errors caused by network instability or disconnection, thereby avoiding potential security vulnerabilities. Multi-type password design: Different types of passwords (single, permanent, limited time, periodic) meet the needs of various usage scenarios, allowing the system to flexibly respond to different security requirements. Single-time passwords and limited-time passwords automatically expire after use or expiration, greatly reducing the risk of password abuse.
[0083] (2) Improved convenience and flexibility of use. Offline password generation: Even in an offline environment, users can generate valid offline passwords through the App, which greatly improves the convenience of system operation and is suitable for situations where the network connection is unstable or disconnected. Periodic password: Through the automatic update of the periodic password design, users do not need to frequently change passwords manually, thereby improving the user experience and reducing the operational burden.
[0084] (3) Optimized password management. Whitelist and blacklist mechanism: By using whitelist and blacklist, current valid and invalid passwords can be effectively managed. Valid passwords are stored in the whitelist, and invalid passwords are transferred to the blacklist. This mechanism ensures dynamic management of passwords and avoids security issues caused by redundant passwords. Automatically delete expired passwords: Regularly check and delete expired passwords to maintain the neatness and security of the password list, reducing the maintenance workload of administrators.
[0085] (4) Improved password cracking resistance. Combination of CRC and random numbers: Data_1 and Data_2 are generated using a combination of CRC values and random numbers, making the generated password more random and complex, increasing the difficulty of password cracking. Key operation: By performing SHA256 hash operations on the timestamp and key factor, the generated key is used to generate the final password, ensuring that the password is not easily cracked during transmission and storage.
[0086] (5) Reduced maintenance and operating costs. Automated management: Password generation, verification, and deletion can be performed automatically, reducing the need for human intervention and lowering maintenance and management costs. Reduced communication dependence: Relying on offline password generation and verification reduces the need for communication between devices and servers, thereby reducing the system's network load and operating costs.
[0087] This application not only improves the security and convenience of passwords, but also optimizes the password management process, reduces operating costs, and provides users with an efficient and secure smart lock solution.
[0088] Next, the offline password generation system proposed according to the embodiment of the present application is described with reference to the accompanying drawings.
[0089] Figure 4 It is a block diagram of an offline password generation system according to an embodiment of the present application.
[0090] like Figure 4 As shown, the offline password generation system includes: a time acquisition module 100, a time synchronization and type design module 200 and a password generation module 300.
[0091] Specifically, the time acquisition module 100 is used to acquire the application time of the terminal;
[0092] The time synchronization and type design module 200 is used to design the password type of the terminal when the smart lock performs time synchronization according to the application time;
[0093] The password generation module 300 is used to generate an offline password according to the password type, so that the user can open the smart lock according to the offline password; wherein the offline password is a password with a time attribute.
[0094] Figure 5 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. The terminal may include:
[0095] A memory 501 , a processor 502 , and a computer program stored in the memory 501 and executable on the processor 502 .
[0096] When the processor 502 executes the program, the offline password generation method provided in the above embodiment is implemented.
[0097] Furthermore, the terminal further includes:
[0098] The communication interface 503 is used for communication between the memory 501 and the processor 502 .
[0099] The memory 501 is used to store computer programs that can be executed on the processor 502 .
[0100] The memory 501 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0101] If the memory 501, the processor 502 and the communication interface 503 are implemented independently, the communication interface 503, the memory 501 and the processor 502 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EIS) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0102] Optionally, in a specific implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 can communicate with each other through an internal interface.
[0103] The processor 502 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0104] This embodiment also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned offline password generation method is implemented.
[0105] One embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the present application Figure 1 The offline password generation method provided by any embodiment in the corresponding embodiment.
[0106] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0107] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0108] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0109] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable storage medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, a "computer-readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable storage media include the following: an electrical connection with one or N wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable storage medium may even be paper or other suitable medium on which the program is printed, since the program can be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary, and then storing it in a computer memory.
[0110] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0111] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0112] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0113] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
[0114] It should be understood that the application of the present application is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to this application.
[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. An offline password generation method, characterized in that: Applied to a terminal, the offline password generation method includes: Obtaining the application time of the terminal and sending the application time to the smart lock; When the smart lock performs time synchronization according to the application time, designing a password type of the terminal; An offline password is generated according to the password type, so that the user can open the smart lock according to the offline password; wherein the offline password is a password with a time attribute.
2. The offline password generation method according to claim 1, characterized in that: The generating of the offline password according to the password type specifically includes: Get the duration corresponding to the password type; Performing a cyclic redundancy check on the duration to obtain a check value; An offline key is obtained according to the verification value, the password type and the duration.
3. The offline password generation method according to claim 2, characterized in that: The obtaining of the offline key according to the verification value, the password type and the duration specifically includes: According to the password type, combining the check value and the duration to obtain first data; Processing the first data according to the password type to obtain second data; The second data is processed to obtain an offline password.
4. The offline password generation method according to claim 3, characterized in that: The processing of the first data according to the password type to obtain the second data specifically includes: Determine the number of targets from a preset list; The target number and the first data are processed according to the password type to obtain second data.
5. The offline password generation method according to claim 3, characterized in that: The processing of the second data to obtain the offline password specifically includes: Obtaining a timestamp input by a user, wherein the timestamp is the start time of the offline password; Processing the timestamp to generate key data; An offline password is obtained according to the second data and the key data.
6. The offline password generation method according to claim 3, characterized in that: The step of generating an offline password according to the password type further comprises: When the smart lock detects that the duration corresponding to the offline password meets the preset requirements, the smart lock is controlled to unlock and the offline password is saved to a whitelist, wherein the whitelist stores offline passwords of any password type including one-time passwords, permanent passwords, time-limited passwords and weekly cycle passwords.
7. The offline password generation method according to claim 6, characterized in that: The offline password generation method further comprises: Detecting the offline passwords in the whitelist to obtain a detection result; The offline password with the detection result of being invalid is deleted.
8. An offline password generation system, characterized in that: The offline password generation system comprises: A time acquisition module is used to obtain the application time of the terminal; A time synchronization and type design module, used to design the password type of the terminal when the smart lock performs time synchronization according to the application time; A password generation module is used to generate an offline password according to the password type, so that the user can open the smart lock according to the offline password; wherein the offline password is a password with a time attribute.
9. A terminal, characterized in that: The terminal includes: a memory, a processor, and an offline password generation program stored in the memory and executable on the processor. When the offline password generation program is executed by the processor, the steps of the offline password generation method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an offline password generation program, and when the offline password generation program is executed by the processor, the steps of the offline password generation method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
System and method for managing password authority to smart door lock
CN106131179A
Unlocking method, intelligent lock and intelligent lock system
CN114220199A
Offline password acquisition method, computer readable storage medium and terminal equipment
CN114694279A
Offline password implementation method based on intelligent door lock and related product
CN116665350A
Cited By
Password offline management method and system of intelligent door lock
CN120375497A
