CN111354116A - Lock control method and device, electronic lock and lock control system - Google Patents

Lock control method and device, electronic lock and lock control system Download PDF

Info

Publication number
CN111354116A
CN111354116A CN202010159608.4A CN202010159608A CN111354116A CN 111354116 A CN111354116 A CN 111354116A CN 202010159608 A CN202010159608 A CN 202010159608A CN 111354116 A CN111354116 A CN 111354116A
Authority
CN
China
Prior art keywords
code
random
electronic lock
unlocking
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010159608.4A
Other languages
Chinese (zh)
Other versions
CN111354116B (en
Inventor
李保福
杨绍华
陆海江
陈立伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Unitech Power Technology Co Ltd
Original Assignee
Zhuhai Unitech Power Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Unitech Power Technology Co Ltd filed Critical Zhuhai Unitech Power Technology Co Ltd
Priority to CN202010159608.4A priority Critical patent/CN111354116B/en
Publication of CN111354116A publication Critical patent/CN111354116A/en
Application granted granted Critical
Publication of CN111354116B publication Critical patent/CN111354116B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00571Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated by interacting with a central unit
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • G07C2009/0042Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks the transmitted data signal containing a code which is changed
    • G07C2009/00476Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks the transmitted data signal containing a code which is changed dynamically

Abstract

The application provides a lock control method, a lock control device, an electronic lock and a lock control system, which are applied to the electronic lock. The method comprises the following steps: acquiring a first time code input through an input end of an electronic lock; verifying the first temporary code according to the random table and a preset verification rule; when the first temporary code passes the verification, outputting a first random code for the management terminal to generate an unlocking code based on the first random code; when the first unlocking code is received within the preset time length of outputting the first random code, verifying the first unlocking code according to the random table and the first random code to obtain a verification result representing whether the verification of the first unlocking code passes; and controlling the electronic lock to be in a locking state corresponding to the verification result according to the verification result, realizing unlocking control when the electronic lock is in an off-line state, and improving the safety and reliability of locking and unlocking control of the electronic lock in the off-line state.

Description

Lock control method and device, electronic lock and lock control system
Technical Field
The invention relates to the technical field of intelligent door locks, in particular to a lock control method, a lock control device, an electronic lock and a lock control system.
Background
The intelligent door lock is a lockset which is improved on the basis of a mechanical lock, is different from the traditional mechanical lock and is more intelligent, simple and convenient in the aspects of user safety, identification and manageability. At present, the intelligent door lock can be opened and closed through a remote temporary password and an offline password. In the encryption process of generating the password by the intelligent door lock, if a common encryption algorithm is selected, the encryption algorithm is easy to be tested out, and then the intercepted secret key is used for calculating the temporary password, so that the potential safety hazard of the door lock is caused.
Disclosure of Invention
The application provides a lock control method, a lock control device, an electronic lock and a lock control system, which can solve the problem of low safety of the electronic lock.
In order to achieve the above purpose, the technical solutions provided in the embodiments of the present application are as follows:
in a first aspect, an embodiment of the present application provides a lock control method, which is applied to an electronic lock, and the method includes:
acquiring a first time code input through an input end of the electronic lock;
verifying the first temporary code according to a random table and a preset verification rule;
when the first temporary code passes the verification, outputting a first random code for the management terminal to generate an unlocking code based on the first random code;
when a first unlocking code is received within a preset time length of outputting the first random code, verifying the first unlocking code according to the random table and the first random code to obtain a verification result representing whether the first unlocking code verification passes;
and controlling the electronic lock to be in a locking state corresponding to the verification result according to the verification result.
In the above embodiment, the electronic lock authenticates the first temporary code input by the guest, and during the authentication period, it is characterized that the guest has reached the door lock. And after the first temporary code passes the authentication, externally outputting a first random code for the management terminal to generate an unlocking code based on the first random code. And then, the first unlocking code input by the guest is authenticated, so that unlocking control can be realized when the electronic lock is in an off-line state, and the safety and reliability of unlocking and locking control of the electronic lock in the off-line state are improved.
With reference to the first aspect, in some optional implementations, verifying the first temporary code according to a random table and a preset verification rule includes:
converting each code segment in the first temporary code into a clear code segment corresponding to a corresponding cell in the random table based on the random table and a preset management password, and forming a first clear code according to the clear code segment;
judging whether the password type corresponding to a first code segment in the first clear code is a specified type or not and whether the content corresponding to a second code segment of the first clear code is the time of a specified format or not;
and when the password type corresponding to the first code segment is the specified type and the content corresponding to the second code segment is the time of the specified format, determining that the first temporary code passes the verification.
In the above embodiment, the first temporary code is verified by using the random table and the preset management password in the electronic lock, and the server is not required to participate in password verification, so that the offline verification of the first temporary code can be quickly realized.
With reference to the first aspect, in some optional embodiments, the random table includes a first random table and a second random table, each random table includes a plurality of random codes respectively corresponding to corresponding characters, and each random code includes a corresponding character; based on the random table and a preset management password, converting each code segment in the first temporary code into a clear code segment corresponding to a corresponding cell in the random table, and forming a first clear code, including:
determining a first intermediate code based on the preset management password and the first temporary code, wherein the first intermediate code comprises a plurality of code segments, and each code segment comprises a corresponding character;
determining characters of cells corresponding to each code segment of the first intermediate code from the first random table according to the first intermediate code and the first random table to form a second intermediate code;
and determining the characters of the cells corresponding to each code segment of the second intermediate code from the second random table according to the second intermediate code and the second random table so as to form a clear code segment, and forming the first clear code by the clear code segment.
In the above-described embodiment, when the temporary code is generated from a plurality of random tables, the first clear code of the first temporary code is estimated by inverse operation using a plurality of random tables such as the first random table and the second random table when the first temporary code is verified.
With reference to the first aspect, in some optional implementations, verifying the first unlocking code according to the random table and the first random code includes:
converting each code segment in the first unlocking code into a clear code segment corresponding to a corresponding cell in the random table based on the random table, and forming a second clear code according to the clear code segment;
judging whether the second clear code is the same as the first random code or not;
when the second plain code is the same as the first random code, determining that the first unlocking code passes verification;
and when the second clear code is different from the first random code, determining that the first unlocking code is not verified.
In the above embodiment, the management terminal generates the unlocking code by the random code, which is the reverse of the way in which the electronic lock decodes the unlocking code to obtain the clear code. If the electronic lock resolves that the second plain code of the first unlocking code is the same as the first random code, the verification of the first unlocking code is passed. If the second clear code is different from the first random code, the verification of the first unlocking code is not passed. Therefore, the unlocking code can be authenticated under the condition that the electronic lock is off-line.
With reference to the first aspect, in some optional implementations, verifying the first unlocking code according to the random table and the first random code includes:
judging whether a second unlocking code generated by the electronic lock is the same as the first unlocking code or not, wherein the second unlocking code is a verification code generated by the electronic lock according to the first random code and the random table;
when the first unlocking code is the same as the second unlocking code, determining that the first unlocking code passes verification;
and when the first unlocking code is different from the second unlocking code, determining that the first unlocking code is not verified.
In the above embodiment, the electronic lock may generate the second unlocking code as the verification code according to the first random code and the random table, and the first unlocking code may be verified without looking up a table reversely.
With reference to the first aspect, in some optional embodiments, the locking state includes an unlocking state and a locking state, and controlling the electronic lock to be in the locking state corresponding to the verification result according to the verification result includes:
when the verification result is a first result representing that the first unlocking code passes verification, controlling the electronic lock to be in an unlocking state corresponding to the first result;
and when the verification result is a second result representing that the first unlocking code verification fails, controlling the electronic lock to be in a locking state corresponding to the second result.
In the above embodiment, the lock is unlocked after the verification of the first time code and the first unlocking code is passed, which is beneficial to improving the security of the electronic lock for controlling the locking and unlocking actions in the off-line state.
In a second aspect, an embodiment of the present application further provides a lock control device, which is applied to an electronic lock, where the device includes:
the acquisition unit is used for acquiring a first time code input through the input end of the electronic lock;
the verification unit is used for verifying the first temporary code according to a random table and a preset verification rule;
the output unit is used for outputting a first random code when the first temporary code passes the verification, and the first random code is used for generating an unlocking code by the management terminal based on the first random code;
the verification unit is further configured to verify the first unlocking code according to the random table and the first random code when the first unlocking code is received within a preset time period for outputting the first random code, and obtain a verification result representing whether the verification of the first unlocking code passes;
and the control unit is used for controlling the electronic lock to be in a locking state corresponding to the verification result according to the verification result.
With reference to the second aspect, in some optional embodiments, the verification unit is further configured to:
converting each code segment in the first temporary code into a clear code segment corresponding to a corresponding cell in the random table based on the random table and a preset management password, and forming a first clear code according to the clear code segment;
judging whether the password type corresponding to a first code segment in the first clear code is a specified type or not and whether the content corresponding to a second code segment of the first clear code is the time of a specified format or not;
and when the password type corresponding to the first code segment is the specified type and the content corresponding to the second code segment is the time of the specified format, determining that the first temporary code passes the verification.
In a third aspect, an embodiment of the present application further provides an electronic lock, where the electronic lock includes a memory, a processor, a cylinder assembly and an input end, the input end is used for a user to input a password, the cylinder assembly is used for controlling the cylinder assembly to act on the processor according to a verification result of the password, and a computer program is stored in the memory, and when the computer program is executed by the processor, the electronic lock is enabled to perform the method described above.
In a fourth aspect, an embodiment of the present application further provides a lock control system, the lock control system includes a management terminal and an electronic lock, where all store random tables, and wherein:
the management terminal is used for generating a current time code according to time, a password type, a preset management password and a random table so as to enable the current time code to be sent to a designated terminal;
the electronic lock is used for acquiring a first time code input through an input end of the electronic lock;
the electronic lock is further used for verifying the first temporary code according to a random table and a preset verification rule;
the electronic lock is also used for outputting a first random code when the first temporary code passes verification;
the management terminal is further used for generating a current unlocking code based on the first random code and the random table so that the current unlocking code is sent to the appointed terminal;
the electronic lock is further used for verifying the first unlocking code according to the random table and the first random code when the first unlocking code is received within a preset time length of outputting the first random code, and obtaining a verification result representing whether the verification of the first unlocking code passes or not;
the electronic lock is also used for controlling the electronic lock to be in a locking state corresponding to the verification result according to the verification result.
In a fifth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when run on a computer, causes the computer to perform the method as described above.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below. It is appreciated that the following drawings depict only certain embodiments of the application and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.
Fig. 1 is a communication connection diagram of a lock control system provided in an embodiment of the present application.
Fig. 2 is a block diagram illustrating an electronic lock according to an embodiment of the present application.
Fig. 3 is a schematic flow chart of a lock control method according to an embodiment of the present application.
Fig. 4 is a schematic diagram of a first-level mapping table according to an embodiment of the present application.
Fig. 5 is a schematic diagram of a second-level mapping table according to an embodiment of the present application.
Fig. 6 is a schematic diagram of a three-level mapping table according to an embodiment of the present application.
Fig. 7 is a schematic diagram of a four-level mapping table according to an embodiment of the present application.
Fig. 8 is a functional block diagram of a lock control device according to an embodiment of the present application.
Icon: 10-a lock control system; 20-an electronic lock; 21-an input terminal; 22-a processing module; 23-a storage module; 24-a communication module; 25-a display module; 30-a management terminal; 40-a server; 50-designating a terminal; 100-a lock control device; 110-an obtaining unit; 120-a verification unit; 130-an output unit; 140-control unit.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. It should be noted that the terms "first," "second," and the like are used merely to distinguish one description from another, and are not intended to indicate or imply relative importance.
Referring to fig. 1, the present application provides a lock control system 10, which may include an electronic lock 20 and a management terminal 30. A binding relationship may be established between the electronic lock 20 and the management terminal 30, and the binding relationship may be established according to actual situations. For example, one electronic lock 20 may be bound to one management terminal 30, and management terminals 30 bound to different electronic locks 20 may be different. Alternatively, a plurality of electronic locks 20 may be bound to the same management terminal 30.
For an electronic lock 20 and a management terminal 30 that have a binding relationship, the electronic lock 20 and the management terminal 30 may both store random tables, and the number of the random tables may be one or more, and may be set according to actual situations, which is not specifically limited herein. In addition, the random table stored in the electronic lock 20 and the random table stored in the management terminal 30 may be the same, or the random table in the electronic lock 20 and the random table of the management terminal 30 may be the inverse.
The random table of the management terminal 30 is used to generate a time code and an unlock code. The random table in the electronic lock 20 is used to analyze and verify the temporary code and the unlock code to determine whether the temporary code and the unlock code are valid.
In this embodiment, the lock control system 10 may also include a server 40. The server 40 may establish a communication connection with the management terminal 30 and the electronic lock 20 through a network. When the server 40 is included in the lock control system 10, the server 40 may store the random table, and the server 40 may generate the corresponding time code and unlock code. In this case, the management terminal 30 is not required to generate the time code and the unlock code, which is advantageous for reducing the operation pressure of the management terminal 30. The temporary code and the unlock code generated by the server 40 may be transmitted to the management terminal 30. The management terminal 30 can send the generated time code and the management code to the designated terminal 50 according to the requirement, so that the guest user can unlock the lock based on the time code and the unlocking code received by the designated terminal 50. Here, the management terminal 30 may be understood as a terminal device held by a householder or an administrator. The designated terminal 50 is a terminal device held by the guest user.
When the communication connection between the electronic lock 20 and the management terminal 30 can be established, the user can control the electronic lock 20 to unlock or close through the management terminal 30.
When the electronic lock 20 cannot establish a communication connection with the management terminal 30 (when the lock control system 10 further includes the server 40, that is, a communication connection cannot be established between the electronic lock 20 and the management terminal 30 or the server 40), the electronic lock 20 may be considered to be in an offline state. During the off-line state, the unlocking control of the electronic lock 20 requires the guest to input the corresponding time code and unlocking code to unlock. The time code and the unlock code input by the guest are directly or indirectly acquired by the householder through the management terminal 30.
For example, the management terminal 30 may generate a corresponding time code and an unlock code based on a random table stored in the management terminal, so that the time code and the unlock code can be directly acquired. Or, the server 40 generates the time code and the unlock code according to the stored random table, and sends the generated time code and the unlock code to the management terminal 30, so that the management terminal 30 can indirectly obtain the time code and the unlock code.
In this embodiment, the electronic lock 20 may include a lock body and an input terminal 21. The setting can be installed according to actual demand to the lock body, can be used for the lock to hold or open corresponding door and window.
For example, the door lock body may be installed on a gate of an entrance and exit company, or the door lock body may be installed on a gate of an entrance and exit building in a residential area. The input end 21 can be arranged outside a gate on which the door lock body is arranged, so that a guest user can input a temporary code and an unlocking code. The lock body can be controlled to be in the unlocking state after the input temporary code and the unlocking code are verified.
In the lock control system 10, random tables are stored in the management terminal 30 and the electronic lock 20. The management terminal 30 and the electronic lock 20 may function as follows:
the management terminal 30 is configured to generate a current time code according to the time, the password type, the preset management password, and the random table, so that the current time code is sent to the designated terminal 50;
the electronic lock 20 is used for acquiring a first time code input through an input end 21 of the electronic lock 20;
the electronic lock 20 is further configured to verify the first temporary code according to the random table and a preset verification rule;
the electronic lock 20 is further configured to output a first random code when the first temporary code passes verification;
the management terminal 30 is further configured to generate a current unlock code based on the first random code and the random table, so that the current unlock code is sent to the designated terminal 50;
the electronic lock 20 is further configured to verify the first unlock code according to the random table and the first random code when the first unlock code is received within a preset time period during which the first random code is output, and obtain a verification result indicating whether the verification of the first unlock code passes;
the electronic lock 20 is further configured to control the electronic lock 20 to be in a locking state corresponding to the verification result according to the verification result.
Understandably, when the electronic lock 20 is in the offline state, the electronic lock 20 cannot be directly connected to the management terminal 30 in a communication manner. The management terminal 30 can communicate with the designated terminal 50 of the guest. The guest can unlock the lock according to the first time code and the first unlocking code received by the designated terminal 50 from the management terminal 30 in sequence.
For example, when a guest subscribes that an administrator will enter a cell (or a company) in which the electronic lock 20 is installed in advance, the administrator may generate a temporary code using the management terminal 30 and transmit the temporary code to the guest's designated terminal 50. After the guest arrives at the front of the door of the cell (or company), the input terminal 21 of the electronic lock 20 may input the temporary code received from the management terminal 30, and the input temporary code is the first temporary code. The temporary code may be generally authenticated by the electronic lock 20 (if the temporary code is not a temporary code generated by the management terminal 30, the temporary code may not be generally authenticated by the electronic lock 20). After the electronic lock 20 passes the authentication of the first temporary password, the electronic lock 20 may output a first random code, and then the guest sends the first random code to the management terminal 30, and the management terminal 30 generates a first unlock code based on the first random code and sends the unlock code to the designated terminal 50. Finally, the guest inputs the unlocking code received from the management terminal 30 from the input terminal 21, and the input unlocking code is the first unlocking code. After the electronic lock 20 passes the authentication of the first unlocking code, the electronic lock 20 can control the movement of the lock cylinder assembly through the processor to release the locking state. If the first unlock code is not authenticated by the electronic lock 20, the electronic lock 20 continues to be in the locked state.
In the present embodiment, the management terminal 30 may be, but is not limited to, a smart phone, a Personal Computer (PC), a tablet PC, a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), and the like. The designated terminal 50 may be, but is not limited to, a smart phone, a tablet computer, a Personal Digital Assistant (PDA), and the like.
Referring to fig. 2, an embodiment of the present invention further provides an electronic lock 20, which may include a storage module 23, a processing module 22, a cylinder assembly and an input end 21, where the input end 21 is used for a user to input a password, the cylinder assembly is used for controlling the cylinder assembly to operate in the processing module 22 according to a verification result of the password, and the storage module 23 stores a computer program, and when the computer program is executed by the processing module 22, the electronic lock 20 may perform the following steps of the lock control method.
Wherein, the lock core component is a structure capable of realizing extension and retraction under the control of the processing module 22. For example, the plug assembly may be retracted under the control of the processing module 22 during unlocking. The plug assembly may be extended under the control of the processing module 22 when the lock is closed. The principles of operation and construction of the plug assembly are well known to those skilled in the art and will not be described in detail herein.
In the present embodiment, the electronic lock 20 may further include other modules, for example, the electronic lock 20 may further include a communication module 24 and a display module 25. The communication module 24 may be used to establish a communication connection between the management terminal 30 and the electronic lock 20 when communication is normal. The display module 25 may be used to display the random code output by the electronic lock 20.
The input terminal 21, the processing module 22, the storage module 23, the communication module 24 and the display module 25 are electrically connected directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
Referring to fig. 3, the present application further provides a lock control method, which can be applied to the electronic lock 20, and each step in the lock control method is executed or implemented by the electronic lock 20, so as to improve the problem of low security of the electronic lock 20, where the method may include steps S210 to S250. The individual steps of the process are explained in detail below, as follows:
step S210, obtaining the first time code input through the input end 21 of the electronic lock 20.
In the present embodiment, the temporary code input from the input terminal 21 of the electronic lock 20 may be understood as a first temporary code. The first temporary pass code is used for the electronic lock 20 to confirm a guest to reach the door in which the electronic lock 20 is installed.
During the period that the electronic lock 20 is in the offline state, when a guest needs to open a gate provided with the electronic lock 20, an administrator is not near the gate, and it is inconvenient to manually open the gate by visiting the gate site in person, the guest can establish communication with the administrator. For example, a guest appoints a time to go to a gate to an administrator. After the administrator knows the time when the guest goes to the gate, the management terminal 30 may transmit the time code generated by the management terminal 30 to the designation terminal 50 of the guest. The guest may enter a time code through the input 21 of the electronic lock 20. The input temporary code is the first temporary code.
After the guest inputs the time code through the input terminal 21 of the electronic lock 20, the electronic lock 20 may obtain the first time code.
In this embodiment, the electronic lock 20 and the management terminal 30 may both store the same random table. The number of random tables may be one or more. The way of generating the time code by the management terminal 30 may be: the current time code is generated based on time, password type, preset management password and random table.
For example, referring to fig. 4 to 7, fig. 4 is a schematic diagram of a first-level mapping table, fig. 5 is a schematic diagram of a second-level mapping table, fig. 6 is a schematic diagram of a third-level mapping table, and fig. 7 is a schematic diagram of a fourth-level mapping table. Each mapping table is a random table, and the data in the table is a random number. Of course, the random number in the cells in each mapping table may also be a number different from that shown in the figure during actual use of the electronic lock 20. In addition, the numbers in the cells may be characters, letters, or the like. In the first-level mapping table to the third-level mapping table, X represents ten bits, and Y represents each bit. The two digits in each mapping table are nonlinear randomly-filled irregular numbers, so that the secrecy and security of the temporal code and the unlocking code obtained by clear code conversion can be improved, a hacker cannot easily obtain the conversion rule, and the temporal code and the unlocking code cannot be calculated according to the clear code, and the security of switching lock control of the electronic lock 20 in an off-line state can be improved.
The following description will be given by way of example of a process for generating a temporal code based on a plurality of random tables:
for example, the management terminal 30 may obtain a clear code based on the time, the password type, and the time may be, but is not limited to, the current time, the planned unlocking time. The time may include one or more of year, date, hour, and minute, and may be determined according to the actual situation, and is not particularly limited herein. Additionally, the password types include, but are not limited to, permanent passwords, one-time passwords, round passwords, time-limited passwords, and the like. One clear code can be '61723526', wherein, the code segment '61' can be used to represent the type of the password, the rest code segments '723526' can respectively correspond to the date, hour and minute of the time, the corresponding relation can be set according to the actual situation, and one code segment is two digits or two characters. Understandably, the management terminal 30 may generate a plain code in a format similar to "61723526" based on the password type of the electronic lock 20, the current time.
The management terminal 30 may convert each code segment in the plain code into a one-time ciphertext by looking up the one-level mapping table after generating the plain code such as "61723526", for example, "61723526" may be converted into a one-time ciphertext "55367365" after looking up the one-level mapping table shown in fig. 4. And then checking a secondary mapping table based on the primary ciphertext. For example, after looking up the two-level mapping table shown in FIG. 5, the primary ciphertext "55367365" may be converted into the secondary ciphertext "95966387". And then looking up a three-level mapping table based on the secondary ciphertext. For example, after looking up the three-level mapping table shown in FIG. 6, the secondary ciphertext "95966387" may be converted into a tertiary ciphertext "61350649". Then, each code segment in the intermediate code is subtracted (or added in other embodiments), and the ciphertext formed by the finally obtained code segments is the temporary code generated by the management terminal 30.
The intermediate code is a cipher text obtained by table look-up of a four-level mapping table based on a preset management password input by a user. If the number of inputted management password bits is less than the number of plain bits, the number of the bad bits is complemented with the designated number. The number assigned can be selected as appropriate. For example, the designated number is 9. If the management password is more than the clear number, the redundant number input last is abandoned. For example, the preset management password input: 123456, the electronic lock 20 may process "123456" to "12345699" and then look up the four-level mapping table using "12345699" to obtain the intermediate code. For example, looking up the four-level mapping table shown in FIG. 7, "12345699" can be converted to the intermediate code "84972155".
After three ciphertexts (e.g., 61350649) and intermediate codes (e.g., 84972155) are obtained, the operation is performed by taking the subtraction of the bits for each code segment. And in the process of subtracting each code segment, if the number is less than the number corresponding to the password, adding 10 to subtract automatically. For example, code segment "49" in cubic cipher is subtracted from code segment "55" in intermediate code, resulting in code segment "94". The code segment "06" in the cubic cipher is subtracted from the code segment "21" in the intermediate code, and the obtained code segment is "85". Finally, the temporary code obtained by subtracting the intermediate code "84972155" from the tertiary ciphertext "61350649" is "87438594".
After obtaining the temporary code, the management terminal 30 may send the temporary code to the designated terminal 50, so that the guest may perform an input operation according to the temporary code of the designated terminal 50.
In this embodiment, the second-level mapping table and the third-level mapping table may also be changed cyclically. For example, there are multiple secondary mapping tables and multiple tertiary mapping tables, where the numbers in the secondary mapping tables are different and the numbers in the tertiary mapping tables are different. The two-level mapping table and the three-level mapping table which are currently selected and used for cryptograph conversion. For example, the second level mapping table may include 16 and be provided with sequential numbers 0-15, and the third level mapping table may include 12 and be provided with sequential numbers 0-11. When the current second-level mapping table is selected, 16 of the first-time ciphertext or the plain code can be left, and the obtained remainder is the number of the currently selected second-level mapping table. Similarly, when the current three-level mapping table is selected, the secondary ciphertext or the plain code may be left over to the 12, and the obtained preset is the number of the currently selected three-level mapping table.
In this embodiment, each secondary mapping table may be a remaining secondary mapping table obtained through iterative operations on the basis of the basic secondary mapping table. The base secondary mapping table may be a random table obtained by operating on the activation password. Likewise, each three-level mapping table may be a remaining three-level mapping table obtained through an iterative operation based on the basic three-level mapping table. The base tertiary mapping table may be a random table generated based on the unique MAC address of the electronic lock 20. The manner of the random table generated based on the activation password and the random table generated based on the MAC address of the electronic lock 20 may be set according to actual situations. In addition, the mode of obtaining the residual mapping table by iterating the basic mapping table can be set according to the actual situation. For example, a subtraction operation is performed on each number (two digits) in the cells of the basic secondary mapping, 15 iteration operations are continuously performed to obtain 15 secondary mapping tables, and then 16 secondary mapping tables can be obtained by combining the basic secondary mapping tables.
The activation password may be a numeric string generated by the server 40 (or the management terminal 30) when the electronic lock 20 is activated. For example, when the electronic lock 20 is used for the first time, the electronic lock 20 needs to be activated. In addition, when the user changes the management password (or when the password type is changed), it is also generally necessary to activate the electronic lock 20 again. The server 40 (or the management terminal 30) may generate a different activation password each time the same electronic lock 20 is activated.
It should be noted that the manner in which the management terminal 30 generates the first unlocking code based on the first random code is similar to the manner in which the temporal code is generated according to the clear code, and is not described here again.
Step S220, verifying the first temporary code according to the random table and a preset verification rule.
In this embodiment, when the electronic lock 20 verifies the first time code (or the first unlock code), the parsing process of the electronic lock 20 for verifying the first time code is the reverse of the process of the management terminal 30 for generating the time code based on the clear code. That is, the electronic lock 20 may convert the first temporary code into the plain code through the random table and the preset verification rule, and then determine the format of the plain code obtained through parsing. For example, whether the date, hour, minute and password type corresponding to each code segment of the plain code meet the preset conditions is judged. Of course, in other embodiments, the clear code may also include other code segments, for example, the clear code may also include a code segment characterizing the check code, a code segment characterizing the universal identification code, and the like. Wherein, each code segment in the clear code can be set according to the actual situation.
The preset condition can be set according to the actual situation. For example, in the time number corresponding to the plain code, in a normal case, the number of hours and minutes is less than or equal to 59, and if the number representing the hour obtained by the plain code analysis is greater than or equal to 60, the plain code segment corresponding to the hour is abnormal; and if the number of the representative hours obtained by clear code analysis is less than or equal to 59, the clear code segment corresponding to the hour is normal. If the number of the representative minutes obtained by the clear code analysis is greater than or equal to 60, the clear code segment corresponding to the minutes is abnormal; if the number representing the minute obtained by the cleartext analysis is less than or equal to 59, the cleartext segment corresponding to the minute is normal. If the password type represented in the clear code is different from the current preset password type, the clear code segment representing the password type in the clear code is abnormal; and if the password type represented in the clear code is analyzed to be the same as the current preset password type, indicating that the clear code segment representing the password type in the clear code is normal.
When the explicit code comprises the code segment of the representation check code, if the code segment of the representation check code is analyzed to be the same as the preset check code, the code segment of the representation check code in the explicit code is normal. When the plain code comprises the code segment representing the universal identification code, if the code segment representing the universal identification code is analyzed to be the same as the preset universal identification code, the code segment representing the universal identification code in the plain code is normal. The preset check code and the preset universal identification code can be set according to actual conditions. For example, the check code and the universal identification code are first two digits in the plain code, for example, in a pair of the electronic lock 20 and the management terminal 30 having a binding relationship, the check code and the universal identification code may be first two fixed digits in the plain code. For the electronic lock 20 and the management terminal 30 with different binding relationships, the corresponding check code and the universal identification code may not be the same.
When the verification of each clear code segment in the clear code is normal, the clear code is determined to meet the preset condition, and the verification of the first temporary code is passed at the moment.
In this embodiment, the number of the random tables stored in the electronic lock 20 and the management terminal 30 may be one or more. For example, when the number of the random table is one, as an alternative embodiment, the step S220 may include:
converting each code segment in the first temporary code into a clear code segment corresponding to a corresponding cell in the random table based on the random table and a preset management password, and forming a first clear code according to the clear code segment; judging whether the password type corresponding to a first code segment in the first clear code is a specified type or not and whether the content corresponding to a second code segment of the first clear code is the time of a specified format or not; and when the password type corresponding to the first code segment is the specified type and the content corresponding to the second code segment is the time of the specified format, determining that the first temporary code passes the verification.
Understandably, when the number of the random table is one, the electronic lock 20 and the management terminal 30 may further store a four-level mapping table for converting the management password as shown in fig. 7, so as to convert the preset management password. In the process of generating the temporary code and the unlocking code by the administrator, the first-level mapping table shown in fig. 4 can be used as a random table, and then the plain code is subjected to table lookup to obtain a first ciphertext. The intermediate code of the preset management password is obtained by combining the four-level mapping table shown in fig. 6, and the temporary code can be obtained by subtracting the intermediate code from the ciphertext once.
When the first temporary code is verified, the analysis process of the electronic watch verification is the reverse of the process of generating the temporary code, so that the first temporary code can be converted into the first plain code. And then, judging the time and the password type corresponding to each code segment in the first clear code, and when the preset conditions are met, determining that the first clear code passes the authentication, and meanwhile, indicating that the first temporary password passes the authentication.
In this embodiment, the random table includes a first random table and a second random table, each random table includes a plurality of random codes respectively corresponding to the corresponding characters, and each random code includes the corresponding character. Wherein, based on the random table and the preset management password, each code segment in the first temporary code is converted into a clear code segment corresponding to a corresponding cell in the random table, and a first clear code is formed, including: determining a first intermediate code based on the preset management password and the first temporary code, wherein the first intermediate code comprises a plurality of code segments, and each code segment comprises a corresponding character; determining characters of cells corresponding to each code segment of the first intermediate code from the first random table according to the first intermediate code and the first random table to form a second intermediate code; and determining the characters of the cells corresponding to each code segment of the second intermediate code from the second random table according to the second intermediate code and the second random table so as to form a clear code segment, and forming the first clear code by the clear code segment.
Understandably, the first random table and the second random table can be referred to as a random table, respectively, and are not limited to being referred to as a random table. For example, a first random table may refer to a mapping table that requires a round-robin change. The second random table refers to a random table that does not require cyclic variations. For example, the first random table may include a secondary mapping table and a tertiary mapping table as described in fig. 5 and 6. The second random table may refer to a primary mapping table as shown in convex 4. The random code comprises corresponding characters, which is understood to mean that the characters in the random code are characters in corresponding cells of a random table. The position of the random code in the random table in the table can be represented by a corresponding character. For example, the position may be represented by a corresponding character (e.g., number) in the top row and column of the random table.
In the process of authenticating the first temporary code, it is assumed that the first random table may include a secondary mapping table and a tertiary mapping table as described in fig. 5 and 6. The second random table may refer to a primary mapping table as shown in convex 4. Further, assuming that the temporary code input by the guest is "87438594", and in combination with the above example, the preset management password is "12345699", the intermediate code is "84972155", and the temporary code can be successively converted into the third ciphertext "61350649", the second ciphertext "95966387", the first ciphertext "55367365", and the first plaintext "61723526" through an inverse operation. Then, the meaning corresponding to each code segment in the first clear code "61723526" is analyzed, and if each code segment satisfies the preset condition, the authentication of the first clear code is passed, and the authentication of the first temporary password is also passed. Understandably, the three mapping tables are used for carrying out three times of conversion, and the four mapping tables for managing the password are combined for carrying out the conversion of the password, so that the safety of the temporary password generated offline can be ensured to the greatest extent, and the probability of being cracked is reduced.
Step S230, when the first temporary code passes the verification, outputting a first random code for the management terminal 30 to generate an unlocking code based on the first random code.
Understandably, after the electronic lock 20 authenticates the first temporary code, the electronic lock 20 may generate a random code as the first random code through a random algorithm. The first random code is then output to cause the display module 25 to display the first random code. After the guest sees the first random code, the guest can send the random code to the management terminal 30, and the management terminal 30 generates a first unlocking code by using the first random code, combining the random table and the preset management password. The manner of generating the first unlocking code by the management terminal 30 can be seen in the above example of generating the time code "87438594" by using the plain code, the random table, and the preset management password, and will not be described herein again. The number of bits of the first random code is an even number of bits, and may be the same as the number of bits of the clear code "61723526", for example. The way of generating the first random code using a random algorithm is well known to those skilled in the art, and is no longer known here.
The interaction of the first temporary password can ensure that a person using the temporary password is at the door and unlocks immediately, so that the administrator can control the unlocking time of the temporary password to a certain extent.
Step S240, when a first unlocking code is received within a preset time length of outputting the first random code, the first unlocking code is verified according to the random table and the first random code, and a verification result representing whether the first unlocking code verification passes is obtained.
In this embodiment, the verification process of the electronic lock 20 on the first unlocking code is the reverse of the process of the user terminal generating the unlocking code based on the first random code. The verification process of the electronic lock 20 for the first unlocking code may refer to the verification process of the electronic lock 20 for the first time code. The preset time period may be set according to actual conditions, and is, for example, 5 minutes, 10 minutes, and the like. Understandably, within the preset time period, the guest does not input the correct unlocking password, and the unlocking code generated by the management terminal 30 based on the first random code is invalid, at this time, if the guest needs to continue unlocking, the unlocking process needs to be performed again (for example, the electronic lock 20 re-executes steps S210 to S250).
In this embodiment, step S240 may include: converting each code segment in the first unlocking code into a clear code segment corresponding to a corresponding cell in the random table based on the random table, and forming a second clear code according to the clear code segment; judging whether the second clear code is the same as the first random code or not; when the second plain code is the same as the first random code, determining that the first unlocking code passes verification; and when the second clear code is different from the first random code, determining that the first unlocking code is not verified.
Understandably, for the electronic lock 20 and the management terminal 30 having the binding relationship, the management terminal 30 generates the time code and the unlocking code, which is contrary to the analyzing process of the electronic lock 20 on the first time code and the first unlocking code. After the electronic lock 20 analyzes the first unlocking code to obtain the second clear code, the second clear code may be compared with the first random code, and if the first random code is the same as the second clear code, it indicates that the first unlocking code input by the guest is the unlocking code generated by the management terminal 30 bound to the electronic lock 20, that is, the first unlocking code is verified. If the first random code is different from the second clear code, it indicates that the first unlocking code input by the guest is not the unlocking code generated by the management terminal 30 bound with the electronic lock 20, i.e. the verification of the first unlocking code is not passed.
When the unlocking code is obtained by performing three times of conversion on the management terminal 30 through three mapping tables and then performing operation by using a four-level mapping table of a preset management code, the safety of the temporary code generated offline can be ensured to the greatest extent, and the probability of being cracked is reduced.
As an alternative implementation, step S240 may include: judging whether a second unlocking code generated by the electronic lock 20 is the same as the first unlocking code, wherein the second unlocking code is a verification code generated by the electronic lock 20 according to the first random code and the random table; when the first unlocking code is the same as the second unlocking code, determining that the first unlocking code passes verification; and when the first unlocking code is different from the second unlocking code, determining that the first unlocking code is not verified.
Understandably, the way of the electronic lock 20 generating the second unlocking code according to the first random code and the random table is similar to the process of the management terminal 30 generating the time code, and the specific process of the electronic lock 20 generating the second unlocking code may refer to the process of the management terminal 30 generating the time code according to the clear code and the random table, which is not repeated herein for describing the specific process of the electronic lock 20 generating the second unlocking code.
In this embodiment, the electronic lock 20 may generate the second unlocking code as the verification code according to the first random code and the random table, and may verify the first unlocking code without looking up the table reversely.
Step S250, controlling the electronic lock 20 to be in a locking state corresponding to the verification result according to the verification result.
Understandably, the locking state may include an unlocking state and a locking state, and the step S250 may include: when the verification result is a first result representing that the first unlocking code passes the verification, controlling the electronic lock 20 to be in an unlocking state corresponding to the first result; and when the verification result is a second result representing that the first unlocking code verification fails, controlling the electronic lock 20 to be in a locking state corresponding to the second result.
Here, controlling the electronic lock 20 to be in the unlocking state corresponding to the first result can be understood as: when the electronic lock 20 is in the locked state before the verification result is determined, the electronic lock 20 is unlocked by controlling the electronic lock to act to unlock the electronic lock 20, so that the electronic lock 20 is in the unlocked state. When the electronic lock 20 is in the unlocked state before the verification result is determined, the electronic lock continues to maintain the unlocked state without any action.
Likewise, controlling the electronic lock 20 to be in the locked state corresponding to the second result can be understood as: when the electronic lock 20 is in the unlocked state before the verification result is determined, the electronic lock is controlled to act to lock the door lock, so that the electronic lock 20 is closed, and the electronic lock 20 is in the locked state. When the electronic lock 20 is in the locked state before the verification result is determined, the electronic lock continues to maintain the locked state without any action.
Referring to fig. 8, an embodiment of the present application further provides a lock control device 100, which can be applied to the electronic lock 20 described above for implementing steps of the lock control method. The lock control device 100 includes at least one software function module which can be stored in the form of software or Firmware (Firmware) in the memory module 23 or solidified in an Operating System (OS) of the electronic lock 20. The processing module 22 is used for executing executable modules stored in the storage module 23, such as software functional modules and computer programs included in the lock control device 100. The lock control device 100 may include an acquisition unit 110, a verification unit 120, an output unit 130, and a control unit 140.
The obtaining unit 110 is configured to obtain the first time code input through the input end 21 of the electronic lock 20.
The verification unit 120 is configured to verify the first temporary code according to a random table and a preset verification rule.
The output unit 130 is configured to output a first random code when the first temporary code passes verification, so that the management terminal 30 generates an unlocking code based on the first random code.
The verification unit 120 is further configured to verify the first unlock code according to the random table and the first random code when the first unlock code is received within a preset time period during which the first random code is output, so as to obtain a verification result indicating whether the verification of the first unlock code passes or not.
And a control unit 140, configured to control the electronic lock 20 to be in a lock holding state corresponding to the verification result according to the verification result.
Optionally, the verification unit 120 may be further configured to: converting each code segment in the first temporary code into a clear code segment corresponding to a corresponding cell in the random table based on the random table and a preset management password, and forming a first clear code according to the clear code segment; judging whether the password type corresponding to a first code segment in the first clear code is a specified type or not and whether the content corresponding to a second code segment of the first clear code is the time of a specified format or not; and when the password type corresponding to the first code segment is the specified type and the content corresponding to the second code segment is the time of the specified format, determining that the first temporary code passes the verification.
Optionally, the random table comprises a first random table and a second random table, each random table comprising a plurality of random codes corresponding to respective characters, each said random code comprising a respective character. The verification unit 120 may also be configured to:
determining a first intermediate code based on the preset management password and the first temporary code, wherein the first intermediate code comprises a plurality of code segments, and each code segment comprises a corresponding character; determining characters of cells corresponding to each code segment of the first intermediate code from the first random table according to the first intermediate code and the first random table to form a second intermediate code; according to the second intermediate code and the second random table, determining characters of cells corresponding to each code segment of the second intermediate code from the second random table to form clear code segments, and forming the first clear code from the clear code segments
Optionally, the verification unit 120 may be further configured to: converting each code segment in the first unlocking code into a clear code segment corresponding to a corresponding cell in the random table based on the random table, and forming a second clear code according to the clear code segment; judging whether the second clear code is the same as the first random code or not; when the second plain code is the same as the first random code, determining that the first unlocking code passes verification; and when the second clear code is different from the first random code, determining that the first unlocking code is not verified.
Optionally, the verification unit 120 may be further configured to: judging whether a second unlocking code generated by the electronic lock 20 is the same as the first unlocking code, wherein the second unlocking code is a verification code generated by the electronic lock 20 according to the first random code and the random table; when the first unlocking code is the same as the second unlocking code, determining that the first unlocking code passes verification; and when the first unlocking code is different from the second unlocking code, determining that the first unlocking code is not verified.
Optionally, the locking state includes an unlocking state and a locking state. The control unit 140 may also be configured to: and when the verification result is a first result representing that the first unlocking code passes the verification, controlling the electronic lock 20 to be in an unlocking state corresponding to the first result. And when the verification result is a second result representing that the first unlocking code verification fails, controlling the electronic lock 20 to be in a locking state corresponding to the second result.
It should be noted that, for convenience and brevity of description, it can be clearly understood by those skilled in the art that the specific working processes of the electronic lock 20 and the lock control device 100 described above may refer to the corresponding processes of the steps in the foregoing method, and redundant description is not repeated herein.
Referring to fig. 2 again, in the present embodiment, the input end 21 may be a keyboard, a touch display screen, and the like, and may be used for a guest user to input numbers, characters, and the like.
The processing module 22 may be an integrated circuit chip having signal processing capabilities. The processing module 22 may be a general purpose processor. For example, the Processor may be a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Network Processor (NP), or the like; the method, the steps and the logic block diagram disclosed in the embodiments of the present application may also be implemented or executed by a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, or discrete hardware components.
The memory module 23 may be, but is not limited to, a random access memory, a read only memory, a programmable read only memory, an erasable programmable read only memory, an electrically erasable programmable read only memory, and the like. In this embodiment, the storage module 23 may be used for storing a random table, a verification rule, and the like. Of course, the storage module 23 may also be used to store a program, which the processing module 22 executes after receiving the execution instruction.
The communication module 24 is configured to establish a communication connection between the electronic lock 20 and the management terminal 30 and the server 40 via a network, and to transmit and receive data via the network.
It is understood that the configuration shown in fig. 2 is only a schematic configuration of the electronic lock 20, and the electronic lock 20 may further include more components than those shown in fig. 2. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof.
The embodiment of the application also provides a computer readable storage medium. The readable storage medium has stored therein a computer program which, when run on a computer, causes the computer to execute the lock control method as described in the above embodiments.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by hardware, or by software plus a necessary general hardware platform, and based on such understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments of the present application.
In summary, the application provides a lock control method, a lock control device, an electronic lock and a lock control system, which are applied to an electronic lock. The method comprises the following steps: acquiring a first time code input through an input end of an electronic lock; verifying the first temporary code according to the random table and a preset verification rule; when the first temporary code passes the verification, outputting a first random code for the management terminal to generate an unlocking code based on the first random code; when the first unlocking code is received within the preset time length of outputting the first random code, verifying the first unlocking code according to the random table and the first random code to obtain a verification result representing whether the verification of the first unlocking code passes; and controlling the electronic lock to be in a locking state corresponding to the verification result according to the verification result. In the scheme, the electronic lock authenticates the first temporary code input by the guest, and the electronic lock represents that the guest reaches the door lock before the authentication period. And after the first temporary code passes the authentication, externally outputting a first random code for the management terminal to generate an unlocking code based on the first random code. And then, the first unlocking code input by the guest is authenticated, so that unlocking control can be realized when the electronic lock is in an off-line state, and the safety and reliability of unlocking and locking control of the electronic lock in the off-line state are improved.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A lock control method is applied to an electronic lock, and comprises the following steps:
acquiring a first time code input through an input end of the electronic lock;
verifying the first temporary code according to a random table and a preset verification rule;
when the first temporary code passes the verification, outputting a first random code for the management terminal to generate an unlocking code based on the first random code;
when a first unlocking code is received within a preset time length of outputting the first random code, verifying the first unlocking code according to the random table and the first random code to obtain a verification result representing whether the first unlocking code verification passes;
and controlling the electronic lock to be in a locking state corresponding to the verification result according to the verification result.
2. The method of claim 1, wherein verifying the first temporary code according to the random table and a predetermined verification rule comprises:
converting each code segment in the first temporary code into a clear code segment corresponding to a corresponding cell in the random table based on the random table and a preset management password, and forming a first clear code according to the clear code segment;
judging whether the password type corresponding to a first code segment in the first clear code is a specified type or not and whether the content corresponding to a second code segment of the first clear code is the time of a specified format or not;
and when the password type corresponding to the first code segment is the specified type and the content corresponding to the second code segment is the time of the specified format, determining that the first temporary code passes the verification.
3. The method of claim 2, wherein said random tables include a first random table, a second random table, each random table including a plurality of random codes respectively corresponding to respective characters, each of said random codes including a respective character; based on the random table and a preset management password, converting each code segment in the first temporary code into a clear code segment corresponding to a corresponding cell in the random table, and forming a first clear code, including:
determining a first intermediate code based on the preset management password and the first temporary code, wherein the first intermediate code comprises a plurality of code segments, and each code segment comprises a corresponding character;
determining characters of cells corresponding to each code segment of the first intermediate code from the first random table according to the first intermediate code and the first random table to form a second intermediate code;
and determining the characters of the cells corresponding to each code segment of the second intermediate code from the second random table according to the second intermediate code and the second random table so as to form a clear code segment, and forming the first clear code by the clear code segment.
4. The method of claim 1, wherein verifying the first unlock code based on the random table and the first random code comprises:
converting each code segment in the first unlocking code into a clear code segment corresponding to a corresponding cell in the random table based on the random table, and forming a second clear code according to the clear code segment;
judging whether the second clear code is the same as the first random code or not;
when the second plain code is the same as the first random code, determining that the first unlocking code passes verification;
and when the second clear code is different from the first random code, determining that the first unlocking code is not verified.
5. The method of claim 1, wherein verifying the first unlock code based on the random table and the first random code comprises:
judging whether a second unlocking code generated by the electronic lock is the same as the first unlocking code or not, wherein the second unlocking code is a verification code generated by the electronic lock according to the first random code and the random table;
when the first unlocking code is the same as the second unlocking code, determining that the first unlocking code passes verification;
and when the first unlocking code is different from the second unlocking code, determining that the first unlocking code is not verified.
6. The method according to claim 1, wherein the lock-holding state includes an unlock state and a lock-closing state, and controlling the electronic lock to be in the lock-holding state corresponding to the verification result according to the verification result includes:
when the verification result is a first result representing that the first unlocking code passes verification, controlling the electronic lock to be in an unlocking state corresponding to the first result;
and when the verification result is a second result representing that the first unlocking code verification fails, controlling the electronic lock to be in a locking state corresponding to the second result.
7. A lock control device, for use with an electronic lock, the device comprising:
the acquisition unit is used for acquiring a first time code input through the input end of the electronic lock;
the verification unit is used for verifying the first temporary code according to a random table and a preset verification rule;
the output unit is used for outputting a first random code when the first temporary code passes the verification, and the first random code is used for generating an unlocking code by the management terminal based on the first random code;
the verification unit is further configured to verify the first unlocking code according to the random table and the first random code when the first unlocking code is received within a preset time period for outputting the first random code, and obtain a verification result representing whether the verification of the first unlocking code passes;
and the control unit is used for controlling the electronic lock to be in a locking state corresponding to the verification result according to the verification result.
8. An electronic lock, characterized in that the electronic lock comprises a memory, a processor, a cylinder assembly and an input coupled to each other, the input is used for a user to input a password, the cylinder assembly is used for controlling the cylinder assembly to act in the processor according to the verification result of the password, a computer program is stored in the memory, and when the computer program is executed by the processor, the electronic lock is caused to execute the method according to any one of claims 1-6.
9. The utility model provides a lock control system, its characterized in that, lock control system includes that all stores management terminal and the electronic lock of random table, wherein:
the management terminal is used for generating a current time code according to time, a password type, a preset management password and a random table so as to enable the current time code to be sent to a designated terminal;
the electronic lock is used for acquiring a first time code input through an input end of the electronic lock;
the electronic lock is further used for verifying the first temporary code according to a random table and a preset verification rule;
the electronic lock is also used for outputting a first random code when the first temporary code passes verification;
the management terminal is further used for generating a current unlocking code based on the first random code and the random table so that the current unlocking code is sent to the appointed terminal;
the electronic lock is further used for verifying the first unlocking code according to the random table and the first random code when the first unlocking code is received within a preset time length of outputting the first random code, and obtaining a verification result representing whether the verification of the first unlocking code passes or not;
the electronic lock is also used for controlling the electronic lock to be in a locking state corresponding to the verification result according to the verification result.
10. A computer-readable storage medium, in which a computer program is stored which, when run on a computer, causes the computer to carry out the method according to any one of claims 1-6.
CN202010159608.4A 2020-03-09 2020-03-09 Lock control method and device, electronic lock and lock control system Active CN111354116B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010159608.4A CN111354116B (en) 2020-03-09 2020-03-09 Lock control method and device, electronic lock and lock control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010159608.4A CN111354116B (en) 2020-03-09 2020-03-09 Lock control method and device, electronic lock and lock control system

Publications (2)

Publication Number Publication Date
CN111354116A true CN111354116A (en) 2020-06-30
CN111354116B CN111354116B (en) 2022-03-29

Family

ID=71196032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010159608.4A Active CN111354116B (en) 2020-03-09 2020-03-09 Lock control method and device, electronic lock and lock control system

Country Status (1)

Country Link
CN (1) CN111354116B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113674455A (en) * 2021-08-13 2021-11-19 京东科技信息技术有限公司 Intelligent door lock remote control method, device, system, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5191611A (en) * 1989-04-03 1993-03-02 Lang Gerald S Method and apparatus for protecting material on storage media and for transferring material on storage media to various recipients
CN107145919A (en) * 2017-05-09 2017-09-08 南京大学 Towards the open RFID gate control systems and its processing method of the detection that comes in and goes out
CN107767509A (en) * 2017-10-16 2018-03-06 深圳市叮咚互联科技有限公司 Authorization method, server, authoring system and storage medium
CN108288314A (en) * 2017-12-20 2018-07-17 珠海耀阳电子科技有限公司 It is a kind of intelligence lock cipher generate and verification method
US20190051076A1 (en) * 2012-09-10 2019-02-14 Mdi Security, Llc System and method for deploying handheld devices to secure an area
CN110022205A (en) * 2019-04-16 2019-07-16 宁波久婵物联科技有限公司 A kind of multifunctional off-line method of password authentication of electronic lock
CN110443925A (en) * 2019-08-06 2019-11-12 深圳市沃特沃德股份有限公司 Generation method, device, storage medium and the computer equipment of temporary password
CN110689645A (en) * 2019-08-30 2020-01-14 安钥(北京)科技股份有限公司 Reservation authorization method, reservation authorization verification method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5191611A (en) * 1989-04-03 1993-03-02 Lang Gerald S Method and apparatus for protecting material on storage media and for transferring material on storage media to various recipients
US20190051076A1 (en) * 2012-09-10 2019-02-14 Mdi Security, Llc System and method for deploying handheld devices to secure an area
CN107145919A (en) * 2017-05-09 2017-09-08 南京大学 Towards the open RFID gate control systems and its processing method of the detection that comes in and goes out
CN107767509A (en) * 2017-10-16 2018-03-06 深圳市叮咚互联科技有限公司 Authorization method, server, authoring system and storage medium
CN108288314A (en) * 2017-12-20 2018-07-17 珠海耀阳电子科技有限公司 It is a kind of intelligence lock cipher generate and verification method
CN110022205A (en) * 2019-04-16 2019-07-16 宁波久婵物联科技有限公司 A kind of multifunctional off-line method of password authentication of electronic lock
CN110443925A (en) * 2019-08-06 2019-11-12 深圳市沃特沃德股份有限公司 Generation method, device, storage medium and the computer equipment of temporary password
CN110689645A (en) * 2019-08-30 2020-01-14 安钥(北京)科技股份有限公司 Reservation authorization method, reservation authorization verification method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113674455A (en) * 2021-08-13 2021-11-19 京东科技信息技术有限公司 Intelligent door lock remote control method, device, system, equipment and storage medium
CN113674455B (en) * 2021-08-13 2023-08-04 京东科技信息技术有限公司 Remote control method, device, system, equipment and storage medium for intelligent door lock

Also Published As

Publication number Publication date
CN111354116B (en) 2022-03-29

Similar Documents

Publication Publication Date Title
CN105279832A (en) Intelligent door lock system and control method thereof
CN109587162B (en) Login verification method, device, terminal, password server and storage medium
CN103530924A (en) Dynamic password lock system and method for self-help network management
CN103929306A (en) Intelligent secret key device and information management method of intelligent secret key device
CN110224811B (en) Internet of things encryption processing method, device and system
CN101072100A (en) Authenticating system and method utilizing reliable platform module
CN108447154A (en) Safe unlocking method and device, encryption and decryption method and device, lock and server
CN107958513A (en) A kind of offline authorization method and system of electronic lock
CN112863017A (en) Smart community building intercom system dynamic password unlocking device, method, equipment and storage medium
CN111028392A (en) Combined password verification method, hardware terminal and password system
CN103297391A (en) Graphical dynamic password inputting and verifying method
CN111340987A (en) Internet of things door lock communication method, device and system and computer storage medium
CN111354116B (en) Lock control method and device, electronic lock and lock control system
CN113656775A (en) Offline password verification method and system with expiration date and intelligent lock
US20160070901A1 (en) Device and method for authenticating on basis of position value
CN103324878A (en) Method and system for remotely controlling unlocking permission of hand-held equipment
CN116527258B (en) Unlocking method, device, equipment and storage medium of coded lock
Hutto et al. Puf-based two-factor authentication protocol for securing the power grid against insider threat
CN106375304A (en) One-time authentication method realized by utilization of intelligent hardware
US20030088794A1 (en) Method and system for rendering secure pin entry
CN110298941A (en) A kind of disposable temporary password generation method of intelligent door lock
CN101465011B (en) Lock control system
CN106534214A (en) Router security authentication method, device and system
CN102457484A (en) Method for checking user information by combining user name/password authentication and check code
Shah et al. New factor of authentication: Something you process

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230118

Address after: 519085 No. 68, Jinhong 7th Road, High-tech Zone, Zhuhai City, Guangdong Province

Patentee after: ZHUHAI UNITECH POWER TECHNOLOGY Co.,Ltd.

Address before: 519000 1 E301-17, 1 Harbin Industrial Road, Tangjia Bay, Zhuhai high tech Zone, Guangdong

Patentee before: ZHUHAI UTAIOT TECHNOLOGY Co.,Ltd.