CN116543486B - Offline control method of coded lock and coded lock system - Google Patents

Offline control method of coded lock and coded lock system Download PDF

Info

Publication number
CN116543486B
CN116543486B CN202310813222.4A CN202310813222A CN116543486B CN 116543486 B CN116543486 B CN 116543486B CN 202310813222 A CN202310813222 A CN 202310813222A CN 116543486 B CN116543486 B CN 116543486B
Authority
CN
China
Prior art keywords
identification code
array
user
coded lock
unlocking
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.)
Active
Application number
CN202310813222.4A
Other languages
Chinese (zh)
Other versions
CN116543486A (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.)
Shenzhen Sunson Tech Co ltd
Original Assignee
Shenzhen Sunson Tech 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 Shenzhen Sunson Tech Co ltd filed Critical Shenzhen Sunson Tech Co ltd
Priority to CN202310813222.4A priority Critical patent/CN116543486B/en
Publication of CN116543486A publication Critical patent/CN116543486A/en
Application granted granted Critical
Publication of CN116543486B publication Critical patent/CN116543486B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0852Quantum cryptography
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • 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/00817Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys where the code of the lock can be programmed
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S40/00Systems for electrical power generation, transmission, distribution or end-user application management characterised by the use of communication or information technologies, or communication or information technology specific aspects supporting them
    • Y04S40/20Information technology specific aspects, e.g. CAD, simulation, modelling, system security

Abstract

The application discloses an offline control method of a coded lock and a coded lock system, wherein the method is used for the coded lock system, the coded lock system comprises a server and a coded lock, when a terminal device of a user sends an unlocking request to the coded lock, the method firstly adopts the server to verify the unlocking authority of the terminal device of the user, after the unlocking authority is verified, an unlocking code is generated and sent to the terminal device of the user, and then after the unlocking code is input by the user, the unlocking code is verified by the coded lock, and after the unlocking authority is verified, the coded lock is unlocked. According to the method, when the coded lock is in the offline state, the unlocking password is generated in real time based on the unlocking request of the user terminal equipment to the coded lock, and the unlocking safety of the coded lock in the offline state is improved.

Description

Offline control method of coded lock and coded lock system
Technical Field
The application relates to the technical field of coded lock control, in particular to an offline control method of a coded lock and a coded lock system.
Background
With the development of electronic technology, the application of the coded lock is becoming widespread in daily life of people. Common door locks, car locks and the like have cases of using coded locks. Under normal conditions, when the server and the coded lock keep communication, the server generates an unlocking code according to an unlocking request sent by a user through the terminal equipment and sends the unlocking code to the terminal equipment and the coded lock of the user, the coded lock responds to the input of the unlocking code by the user, and the unlocking is carried out after the unlocking code input by the user is determined to be consistent with the unlocking code received by the user. When the coded lock is in an off-line state and the server cannot communicate with the coded lock, a user is required to input a specified off-line unlocking code on the coded lock to unlock the coded lock, and the off-line unlocking method is low in safety and has certain potential safety hazard.
Disclosure of Invention
The application provides an offline control method and an offline control system for a coded lock, which are used for improving the unlocking safety of the coded lock in an offline state.
In a first aspect, the present application provides an offline control method of a trick lock, for a trick lock system, where the trick lock system includes a server and a trick lock; when the coded lock is in an offline state, the method comprises the following steps:
The server responds to an unlocking request of the terminal equipment of the user for the coded lock and acquires the equipment code of the terminal equipment of the user;
the server analyzes the equipment password by using a first encryption algorithm to obtain an identification code of the terminal equipment of the user;
the server refers to a first preset identification code list according to the identification code of the terminal equipment of the user; the identification codes in the first preset identification code list are identification codes of terminal equipment with unlocking authority for the coded lock;
if the first preset identification code list comprises identification codes consistent with the identification codes of the terminal equipment of the user, the server generates an unlocking password and sends the unlocking password to the terminal equipment of the user;
the coded lock responds to the input of the unlocking code by the user, and the unlocking code is verified;
and if the verification is passed, unlocking the coded lock.
In some implementations, the server stores an identification code of the combination lock, and the method for generating the unlocking password by the server includes:
acquiring first time information, and generating a first quantum random array by using a quantum number random generator based on the first time information; the first moment information is moment information of starting to generate the unlocking password by the server;
Generating the unlocking password by using the first quantum random array, the identification code of the terminal equipment of the user and the identification code of the password lock based on a second encryption algorithm; when the unlocking password is verified by the password lock, the password lock analyzes the unlocking password by using the second encryption algorithm to obtain the first quantum random array, the identification code of the terminal equipment of the user and the identification code of the password lock.
In some implementations, the server generates the unlocking password using the first quantum random number, an identification code of the user's terminal device, and an identification code of the combination lock based on a second encryption algorithm, including:
generating a first array by using an identification code of the terminal equipment of the user based on a format conversion function of the second encryption algorithm;
generating a second array by using the identification code of the coded lock based on the format conversion function of the second encryption algorithm;
generating an intermediate code using the first array and the second array based on a first combining function of the second encryption algorithm;
the unlock cipher is generated using the first quantum random array and the intermediate code based on a second combining function of the second encryption algorithm.
In some implementations, the method for verifying the unlocking password by the coded lock in response to the user inputting the unlocking password includes:
inquiring a historical offline unlocking password database based on the unlocking password to judge whether the unlocking password is used for the first time;
if the unlocking password is used for the first time, storing the unlocking password into the historical offline unlocking password database, and analyzing the unlocking password based on the second encryption algorithm to acquire the identification code of the terminal equipment of the user, the identification code of the coded lock and the first quantum random number;
acquiring the first moment information based on the first quantum random number;
acquiring second time information, wherein the second time information is the time information of the unlocking password input by the user;
calculating the time length between the first time information and the second time information;
comparing the time length with a preset time length;
if the duration is not greater than the preset duration, referring to a second preset identification code list according to the identification code of the terminal equipment of the user; the identification codes in the second preset identification code list are identification codes of terminal equipment with unlocking authority for the coded lock;
If the second preset identification code list comprises identification codes consistent with the identification codes of the terminal equipment of the user, verifying whether the identification codes of the coded lock are consistent with preset coded lock identification codes or not;
if the identification code of the coded lock is consistent with the preset coded lock identification code, the verification is passed.
In some implementations, the resolving the unlocking password based on the second encryption algorithm to obtain the identification code of the terminal device of the user, the identification code of the coded lock, and the first quantum random number includes:
analyzing the unlocking password based on an inverse function of a second combination function of the second encryption algorithm to obtain the first quantum random array and the intermediate code;
resolving the intermediate code based on an inverse function of a first combination function of the second encryption algorithm to obtain the first array and the second array;
analyzing the first array based on an inverse function of a format conversion function of the second encryption algorithm to obtain an identification code of the terminal equipment of the user;
and analyzing the second array based on the inverse function of the format conversion function of the second encryption algorithm to obtain the identification code of the coded lock.
In some implementations, before the server sends the unlock code to the terminal device of the user, the server encrypts the unlock code, and the method of encrypting includes:
randomly sequencing all characters in a character display column in a preset coding table, and sequentially filling the characters into the character display column to obtain an updated preset coding table;
looking up the updated preset coding table based on the identification code of the terminal equipment of the user to obtain a third array;
looking up the updated preset encoding table based on the identification code of the server to obtain a fourth array;
randomly generating a first random array and a second random array;
generating a first encrypted array based on the third array and the first random array;
generating a second encrypted array based on the fourth array and the second random array;
encrypting the unlock code based on the first encryption array and the second encryption array.
In some implementations, the encrypting the unlock password based on the first encryption array and the second encryption array includes:
respectively extracting numbers of the first encryption array and the second encryption array at the appointed position;
Randomly sequencing all the extracted numbers to obtain a target encryption password;
and encrypting the unlocking password based on the target encryption password.
In a second aspect, the present application provides a combination lock system, comprising a server and a combination lock; wherein, the server includes:
the acquisition module is used for responding to an unlocking request of the terminal equipment of the user to the coded lock and acquiring the equipment code of the terminal equipment of the user;
the analysis module is used for analyzing the equipment password by using a first encryption algorithm to obtain the identification code of the terminal equipment of the user;
the query module is used for referring to a first preset identification code list according to the identification code of the terminal equipment of the user; the identification codes in the first preset identification code list are identification codes of terminal equipment with unlocking authority for the coded lock;
the generation module is used for generating an unlocking password if the first preset identification code list comprises identification codes consistent with the identification codes of the terminal equipment of the user, and sending the unlocking password to the terminal equipment of the user;
the coded lock comprises:
the verification module is used for responding to the input of the unlocking password by the user and verifying the unlocking password;
And the execution module is used for unlocking the coded lock if the verification is passed.
The application provides an offline control method of a coded lock and a coded lock system, wherein when a terminal device of a user sends an unlocking request to the coded lock, the offline control method of the coded lock firstly adopts a server to verify unlocking authority of the terminal device of the user, after the unlocking authority passes the verification, the unlocking code is generated and sent to the terminal device of the user, and then after the user inputs the unlocking code, the unlocking code is verified by the coded lock, and after the unlocking authority passes the verification, the coded lock is unlocked. According to the method, when the coded lock is in the offline state, the unlocking password is generated in real time based on the unlocking request of the user terminal equipment to the coded lock, and the unlocking safety of the coded lock in the offline state is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of an offline control method of a coded lock according to an embodiment of the present application;
fig. 2 is a schematic block diagram of a coded lock system according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations.
It is also to be understood that the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
With the development of electronic technology, the application of the coded lock is becoming widespread in daily life of people. Common door locks, car locks and the like have cases of using coded locks. Under normal conditions, when the server and the coded lock keep communication, the server generates an unlocking code according to an unlocking request sent by a user through the terminal equipment and sends the unlocking code to the terminal equipment and the coded lock of the user, the coded lock responds to the input of the unlocking code by the user, and the unlocking is carried out after the unlocking code input by the user is determined to be consistent with the unlocking code received by the user. When the coded lock is in an off-line state and the server cannot communicate with the coded lock, a user is required to input a specified off-line unlocking code on the coded lock to unlock the coded lock, and the off-line unlocking method is low in safety and has certain potential safety hazard. Therefore, the embodiment of the application provides an offline control method of a coded lock and a coded lock system, so as to solve the problems.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a flowchart illustrating an offline control method of a coded lock according to an embodiment of the present application, and as shown in fig. 1, the offline control method of a coded lock according to an embodiment of the present application includes steps S100 to S600.
Step S100, the server responds to an unlocking request of the terminal equipment of the user for the coded lock, and obtains the equipment code of the terminal equipment of the user.
And the user terminal equipment downloads an APP or an applet for unlocking the coded lock, and the unlocking request is generated by the user operating on the APP or the applet.
The device password is generated by encrypting the identification code of the user by using a first encryption algorithm through the terminal device of the user.
And step 200, the server analyzes the equipment password by using a first encryption algorithm to acquire the identification code of the terminal equipment of the user.
Step S300, the server refers to a first preset identification code list according to the identification code of the terminal equipment of the user; the identification codes in the first preset identification code list are identification codes of terminal equipment with unlocking authority for the coded lock.
Wherein the first list of identification codes is stored in the server.
Step 400, if the first preset identification code list includes an identification code consistent with the identification code of the terminal device of the user, the server generates an unlocking password and sends the unlocking password to the terminal device of the user.
And step 500, the coded lock responds to the input of the unlocking code by the user, and the unlocking code is verified.
The unlocking password is input by the user through an input keyboard of the coded lock.
And step S600, if the verification is passed, unlocking the coded lock.
When the terminal device of the user sends an unlocking request to the coded lock, the off-line control method of the coded lock provided by the embodiment firstly adopts the server to verify the unlocking authority of the terminal device of the user, generates the unlocking password after the unlocking authority passes the verification, and sends the unlocking password to the terminal device of the user, then utilizes the coded lock to verify the unlocking password after the user inputs the unlocking password, and unlocks the coded lock after the unlocking authority passes the verification. According to the method, when the coded lock is in the offline state, the unlocking password is generated in real time based on the unlocking request of the user terminal equipment to the coded lock, and the unlocking safety of the coded lock in the offline state is improved.
In some embodiments, the server stores the identification code of the combination lock, and the server in step S400 generates an unlock code, including steps S410 to S420.
Step S410, obtaining first time information, and generating a first quantum random array by using a quantum number random generator based on the first time information; the first time information is time information of starting to generate the unlocking password by the server.
As will be appreciated, the first quantum random number includes the first time information since the first quantum random number is generated using a quantum random generator based on the first time information.
Step S420, generating the unlocking password by using the first quantum random array, the identification code of the terminal equipment of the user and the identification code of the password lock based on a second encryption algorithm; when the unlocking password is verified by the password lock, the password lock analyzes the unlocking password by using the second encryption algorithm to obtain the first quantum random array, the identification code of the terminal equipment of the user and the identification code of the password lock.
It can be understood that the user who unlocks the coded lock may be a different person each time, and therefore, the identification code of the terminal device of the user who unlocks the coded lock each time may also be different, so that the unlocking password generated by using the identification code of the terminal device of the user and the identification code of the coded lock each time when unlocking the coded lock may also be different.
In some embodiments, step S420 generates the unlocking password using the first quantum random array, the identification code of the user' S terminal device, and the identification code of the combination lock based on a second encryption algorithm, including steps S421 to S424.
Step S421, a first array is generated by using the identification code of the terminal equipment of the user based on the format conversion function of the second encryption algorithm.
Step S422, generating a second array by using the identification code of the coded lock based on the format conversion function of the second encryption algorithm.
The format conversion function in steps S421 to S422 refers to a function of converting one data type into another data type, specifically refers to a function of converting an identification code into an array, where the format conversion function defines that each character that can form the identification code corresponds to a unique number.
Step S423, generating an intermediate code using the first array and the second array based on a first combining function of the second encryption algorithm.
Wherein the first combining function refers to a manner of combining the first array and the second array.
Illustratively, the first combining function is to arrange the second array directly in sequence after the first array.
Step S424, generating the unlock cipher by using the first quantum random array and the intermediate code based on a second combination function of the second encryption algorithm.
Wherein the second combining function is a way of combining the first quantum random array and the intermediate code.
Illustratively, the second combining function is to insert each digit in the intermediate code in turn into a specified position of the first quantum random array.
In this embodiment, the first array and the second array are generated based on the format conversion function of the second encryption algorithm, the intermediate code is generated based on the first combination function of the second encryption algorithm by using the first array and the second array, and the unlocking password is generated based on the second combination function of the second encryption algorithm by using the first quantum random array and the intermediate code, so that the complexity of the unlocking password can be further improved, and the unlocking security of the password lock in an offline state is improved.
In some embodiments, the method for verifying the unlocking password by the coded lock in step S500 in response to the user inputting the unlocking password includes steps S510 to S590.
Step S510, inquiring a historical offline unlocking password database based on the unlocking password to judge whether the unlocking password is used for the first time.
It can be appreciated that after the user obtains the unlocking password, the user may leave the password lock without unlocking the password lock for other reasons, but there may be other people who unlock the password lock offline before the user leaves the password lock, so that it is necessary to determine whether the unlocking password is used for the first time in order to improve the security of the password lock.
And step S520, if the unlocking password is used for the first time, storing the unlocking password into the historical offline unlocking password database, and analyzing the unlocking password based on the second encryption algorithm to acquire the identification code of the terminal equipment of the user, the identification code of the coded lock and the first quantum random number.
Step S530, acquiring the first time information based on the first quantum random number.
Step S540, obtaining second time information, wherein the second time information is the time information of the unlocking password input by the user.
Step S550, calculating a duration between the first time information and the second time information.
Step S560, comparing the duration with a preset duration.
Step 570, if the duration is not greater than the preset duration, referring to a second preset identifier list according to the identifier of the terminal device of the user; the identification codes in the second preset identification code list are identification codes of terminal equipment with unlocking authority for the coded lock.
The second preset identification code list is stored in the coded lock, and the second preset identification code list is consistent with the first preset identification code list.
It can be appreciated that if the duration is longer than the preset duration, the possibility that the unlocking password is stolen in the duration is increased, and a certain potential safety hazard is caused to the user, so that the verification cannot be passed as long as the duration is longer than the preset duration in order to improve the security of the coded lock.
Step S580, if the second preset identification code list includes an identification code consistent with the identification code of the terminal device of the user, verifying whether the identification code of the coded lock is consistent with the preset coded lock identification code.
The preset coded lock identification code is the true identification code of the coded lock, and the preset identification code is stored in the coded lock.
Step S590, if the identification code of the coded lock is consistent with the preset coded lock identification code, the verification is passed.
The method for verifying the unlocking password can further improve unlocking safety of the password lock in an offline state.
In some embodiments, the step S520 of resolving the unlocking password based on the second encryption algorithm to obtain the identification code of the terminal device of the user, the identification code of the coded lock, and the first quantum random number includes steps S521 to S524.
And step 521, resolving the unlocking password based on an inverse function of a second combination function of the second encryption algorithm to obtain the first quantum random array and the intermediate code.
Step S522, parsing the intermediate code based on an inverse function of the first combining function of the second encryption algorithm to obtain the first array and the second array.
Step S523, parsing the first array based on an inverse function of the format conversion function of the second encryption algorithm to obtain an identification code of the terminal device of the user.
And step S524, analyzing the second number group based on the inverse function of the format conversion function of the second encryption algorithm to obtain the identification code of the coded lock.
In some embodiments, before the server sends the unlock code to the terminal device of the user, the server performs encryption processing on the unlock code, and the method of encryption processing includes steps S10 to S70.
Step S10, after randomly sequencing all characters in a character display column in a preset coding table, sequentially filling the characters in the character display column to obtain the updated preset coding table.
Illustratively, the preset encoding table is shown in table 1, and the updated preset encoding table is shown in table 2.
Table 1 preset encoding table
Table 2 updated preset encoding table
And step S20, referring to the updated preset coding table based on the identification code of the terminal equipment of the user so as to acquire a third array.
Illustratively, if the identification code of the terminal device of the user is AHBEF, the third array is 64950.
And step S30, referring to the updated preset encoding table based on the identification code of the server to acquire a fourth array.
Illustratively, if the identification code of the server is GIDJCB, the fourth array is 278319.
Step S40, randomly generating a first random array and a second random array.
Illustratively, the first random array is 435816 and the second random array is 834912.
Step S50, generating a first encryption array based on the third array and the first random array.
Illustratively, the first encrypted array is generated based on the third array and the first random array by sequentially arranging the first random array after the third array.
For example, the third array is 64950, the first random array is 435816, and the first encrypted array is 64950435816.
Step S60, generating a second encryption array based on the fourth array and the second random array.
Illustratively, the second encrypted array is generated based on the fourth array and the second random array by randomly inserting each digit of the fourth array into the second random array.
For example, the fourth array is 278319, the second random array is 834912, and the second encrypted array is 812374893129.
And step S70, encrypting the unlocking password based on the first encryption array and the second encryption array.
According to the embodiment, the preset code table is updated, the updated preset code table is referred to based on the identification code of the terminal equipment of the user to obtain a third array, and the updated preset code table is referred to based on the identification code of the server to obtain a fourth array, so that the randomness of the third array and the fourth array is improved, the complexity of encrypting the unlocking password is improved, and the security of the unlocking password is further improved.
In some embodiments, step S70 encrypts the unlock password based on the first encryption array and the second encryption array. Including steps S71 to S73.
Step S71, respectively extracting numbers of the first encryption array and the second encryption array at the appointed position.
And step S72, randomly sequencing all the extracted numbers to obtain a target encryption password.
And step 73, encrypting the unlocking password based on the target encryption password.
For example, the first encryption array is 64950435816, the second encryption array is 812374893129, numbers with orders of 2, 5,8, and 9 in the first encryption array and numbers with orders of 1, 3, 6, and 7 in the second encryption array are extracted respectively, all the extracted numbers are 4,0,5,8,8,2,4,8, and a target encryption password obtained by randomly ordering all the extracted numbers is 24085848.
According to the method, the target encryption passwords are obtained by randomly sequencing all the extracted numbers, so that the randomness of the target encryption passwords can be improved, and the security of the unlocking passwords is further improved.
Referring to fig. 2, fig. 2 is a schematic block diagram of a combination lock system 100 according to an embodiment of the present application, and as shown in fig. 2, the combination lock system 100 includes a server 110 and a combination lock 120; wherein, the server 110 includes:
and the acquisition module is used for responding to the unlocking request of the terminal equipment of the user for the coded lock and acquiring the equipment code of the terminal equipment of the user.
And the analysis module is used for analyzing the equipment password by using a first encryption algorithm to acquire the identification code of the terminal equipment of the user.
The query module is used for referring to a first preset identification code list according to the identification code of the terminal equipment of the user; the identification codes in the first preset identification code list are identification codes of terminal equipment with unlocking authority for the coded lock.
And the generation module is used for generating an unlocking password if the first preset identification code list comprises identification codes consistent with the identification codes of the terminal equipment of the user, and sending the unlocking password to the terminal equipment of the user.
The combination lock 120 includes:
and the verification module is used for responding to the input of the unlocking password by the user and verifying the unlocking password.
And the execution module is used for unlocking the coded lock if the verification is passed.
In some embodiments, the server stores an identification code of the combination lock, and the generating module includes:
the first generation unit is used for acquiring first time information and generating a first quantum random array by using a quantum number random generator based on the first time information; the first time information is time information of starting to generate the unlocking password by the server.
The second generation unit is used for generating the unlocking password by using the first quantum random array, the identification code of the terminal equipment of the user and the identification code of the coded lock based on a second encryption algorithm; when the unlocking password is verified by the password lock, the password lock analyzes the unlocking password by using the second encryption algorithm to obtain the first quantum random array, the identification code of the terminal equipment of the user and the identification code of the password lock.
In some embodiments, the second generating unit is configured to perform the steps of:
generating a first array by using an identification code of the terminal equipment of the user based on a format conversion function of the second encryption algorithm;
Generating a second array by using the identification code of the coded lock based on the format conversion function of the second encryption algorithm;
generating an intermediate code using the first array and the second array based on a first combining function of the second encryption algorithm;
the unlock cipher is generated using the first quantum random array and the intermediate code based on a second combining function of the second encryption algorithm.
In some embodiments, the verification module comprises:
and the first query unit is used for querying the historical offline unlocking password database based on the unlocking password so as to judge whether the unlocking password is used for the first time.
And the analysis unit is used for storing the unlocking password into the historical offline unlocking password database if the unlocking password is used for the first time, and analyzing the unlocking password based on the second encryption algorithm to acquire the identification code of the terminal equipment of the user, the identification code of the coded lock and the first quantum random number.
And the first acquisition unit is used for acquiring the first moment information based on the first quantum random number.
The second obtaining unit is used for obtaining second time information, and the second time information is the time information of the unlocking password input by the user.
And the calculating unit is used for calculating the duration between the first time information and the second time information.
And the comparison unit is used for comparing the duration with a preset duration.
The second query unit is used for referring to a second preset identification code list according to the identification codes of the terminal equipment of the user if the duration is not greater than the preset duration; the identification codes in the second preset identification code list are identification codes of terminal equipment with unlocking authority for the coded lock.
And the verification unit is used for verifying whether the identification code of the coded lock is consistent with the preset coded lock identification code if the second preset identification code list comprises the identification code consistent with the identification code of the terminal equipment of the user.
And the decision unit is used for determining that the verification is passed if the identification code of the coded lock is consistent with the preset coded lock identification code.
In some embodiments, the parsing unit is configured to perform the steps of:
analyzing the unlocking password based on an inverse function of a second combination function of the second encryption algorithm to obtain the first quantum random array and the intermediate code;
resolving the intermediate code based on an inverse function of a first combination function of the second encryption algorithm to obtain the first array and the second array;
Analyzing the first array based on an inverse function of a format conversion function of the second encryption algorithm to obtain an identification code of the terminal equipment of the user;
and analyzing the second array based on the inverse function of the format conversion function of the second encryption algorithm to obtain the identification code of the coded lock.
In some embodiments, the server further comprises an encryption module comprising:
and the updating unit is used for randomly sequencing all the characters in the character display column in the preset encoding table and then sequentially filling the characters in the character display column to obtain the updated preset encoding table.
And the query unit is used for referring to the updated preset encoding table based on the identification code of the terminal equipment of the user to obtain a third array, and referring to the updated preset encoding table based on the identification code of the server to obtain a fourth array.
And the first generation unit is used for randomly generating a first random array and a second random array.
And a second generation unit configured to generate a first encryption array based on the third array and the first random array.
And a third generation unit configured to generate a second encryption array based on the fourth array and the second random array.
And the encryption unit is used for encrypting the unlocking password based on the first encryption array and the second encryption array.
In some embodiments, the encryption unit is configured to perform the steps of:
respectively extracting numbers of the first encryption array and the second encryption array at the appointed position;
randomly sequencing all the extracted numbers to obtain a target encryption password;
and encrypting the unlocking password based on the target encryption password.
It should be noted that, for convenience and brevity of description, specific working processes of the above-described system and each module and unit may refer to corresponding processes in the foregoing embodiment of the offline control method of the trick lock, which are not described herein again.
While the application has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (4)

1. The offline control method of the coded lock is characterized by being used for a coded lock system, wherein the coded lock system comprises a server and a coded lock; when the coded lock is in an offline state, the method comprises the following steps:
the server responds to an unlocking request of the terminal equipment of the user for the coded lock and acquires the equipment code of the terminal equipment of the user;
the server analyzes the equipment password by using a first encryption algorithm to obtain an identification code of the terminal equipment of the user;
the server refers to a first preset identification code list according to the identification code of the terminal equipment of the user; the identification codes in the first preset identification code list are identification codes of terminal equipment with unlocking authority for the coded lock;
if the first preset identification code list comprises identification codes consistent with the identification codes of the terminal equipment of the user, the server generates an unlocking password and sends the unlocking password to the terminal equipment of the user;
the coded lock responds to the input of the unlocking code by the user, and the unlocking code is verified;
if the verification is passed, the coded lock is unlocked;
The server stores the identification code of the coded lock, and the method for generating the unlocking password by the server comprises the following steps:
acquiring first time information, and generating a first quantum random array by using a quantum number random generator based on the first time information; the first moment information is moment information of starting to generate the unlocking password by the server;
generating the unlocking password by using the first quantum random array, the identification code of the terminal equipment of the user and the identification code of the password lock based on a second encryption algorithm; when the unlocking password is verified by the password lock, the password lock analyzes the unlocking password by utilizing the second encryption algorithm to obtain the first quantum random array, the identification code of the terminal equipment of the user and the identification code of the password lock;
the server generates the unlocking password by using the first quantum random number, the identification code of the terminal equipment of the user and the identification code of the coded lock based on a second encryption algorithm, and the unlocking password comprises the following steps:
generating a first array by using an identification code of the terminal equipment of the user based on a format conversion function of the second encryption algorithm;
Generating a second array by using the identification code of the coded lock based on the format conversion function of the second encryption algorithm;
generating an intermediate code using the first array and the second array based on a first combining function of the second encryption algorithm;
generating the unlocking password by using the first quantum random array and the intermediate code based on a second combination function of the second encryption algorithm;
the method for verifying the unlocking password by the coded lock in response to the input of the unlocking password by the user comprises the following steps:
inquiring a historical offline unlocking password database based on the unlocking password to judge whether the unlocking password is used for the first time;
if the unlocking password is used for the first time, storing the unlocking password into the historical offline unlocking password database, and analyzing the unlocking password based on the second encryption algorithm to acquire the identification code of the terminal equipment of the user, the identification code of the coded lock and the first quantum random number;
acquiring the first moment information based on the first quantum random number;
acquiring second time information, wherein the second time information is the time information of the unlocking password input by the user;
Calculating the time length between the first time information and the second time information;
comparing the time length with a preset time length;
if the duration is not greater than the preset duration, referring to a second preset identification code list according to the identification code of the terminal equipment of the user; the identification codes in the second preset identification code list are identification codes of terminal equipment with unlocking authority for the coded lock;
if the second preset identification code list comprises identification codes consistent with the identification codes of the terminal equipment of the user, verifying whether the identification codes of the coded lock are consistent with preset coded lock identification codes or not;
if the identification code of the coded lock is consistent with the preset coded lock identification code, the verification is passed;
before the server sends the unlocking password to the terminal equipment of the user, the server carries out encryption processing on the unlocking password, and the encryption processing method comprises the following steps:
randomly sequencing all characters in a character display column in a preset coding table, and sequentially filling the characters into the character display column to obtain an updated preset coding table;
looking up the updated preset coding table based on the identification code of the terminal equipment of the user to obtain a third array;
Looking up the updated preset encoding table based on the identification code of the server to obtain a fourth array;
randomly generating a first random array and a second random array;
generating a first encrypted array based on the third array and the first random array;
generating a second encrypted array based on the fourth array and the second random array;
encrypting the unlock code based on the first encryption array and the second encryption array.
2. The method for offline control of a combination lock according to claim 1, wherein the parsing the unlocking password based on the second encryption algorithm to obtain the identification code of the terminal device of the user, the identification code of the combination lock, and the first quantum random number comprises:
analyzing the unlocking password based on an inverse function of a second combination function of the second encryption algorithm to obtain the first quantum random array and the intermediate code;
resolving the intermediate code based on an inverse function of a first combination function of the second encryption algorithm to obtain the first array and the second array;
analyzing the first array based on an inverse function of a format conversion function of the second encryption algorithm to obtain an identification code of the terminal equipment of the user;
And analyzing the second array based on the inverse function of the format conversion function of the second encryption algorithm to obtain the identification code of the coded lock.
3. The method for offline control of a combination lock according to claim 1, wherein encrypting the unlock code based on the first encryption array and the second encryption array comprises:
respectively extracting numbers of the first encryption array and the second encryption array at the appointed position;
randomly sequencing all the extracted numbers to obtain a target encryption password;
and encrypting the unlocking password based on the target encryption password.
4. The coded lock system is characterized by comprising a server and a coded lock; wherein, the server includes:
the acquisition module is used for responding to an unlocking request of the terminal equipment of the user to the coded lock and acquiring the equipment code of the terminal equipment of the user;
the analysis module is used for analyzing the equipment password by using a first encryption algorithm to obtain the identification code of the terminal equipment of the user;
the query module is used for referring to a first preset identification code list according to the identification code of the terminal equipment of the user; the identification codes in the first preset identification code list are identification codes of terminal equipment with unlocking authority for the coded lock;
The generation module is used for generating an unlocking password if the first preset identification code list comprises identification codes consistent with the identification codes of the terminal equipment of the user, and sending the unlocking password to the terminal equipment of the user;
the coded lock comprises:
the verification module is used for responding to the input of the unlocking password by the user and verifying the unlocking password;
the execution module is used for unlocking the coded lock if the verification is passed;
wherein the server stores the identification code of the coded lock, and the generating module comprises:
the first generation unit is used for acquiring first time information and generating a first quantum random array by using a quantum number random generator based on the first time information; the first moment information is moment information of starting to generate the unlocking password by the server;
the second generation unit is used for generating the unlocking password by using the first quantum random array, the identification code of the terminal equipment of the user and the identification code of the coded lock based on a second encryption algorithm; when the unlocking password is verified by the password lock, the password lock analyzes the unlocking password by utilizing the second encryption algorithm to obtain the first quantum random array, the identification code of the terminal equipment of the user and the identification code of the password lock;
The second generation unit is configured to, when executing the second encryption algorithm to generate the unlock code using the first quantum random number, the identification code of the terminal device of the user, and the identification code of the code lock, execute:
generating a first array by using an identification code of the terminal equipment of the user based on a format conversion function of the second encryption algorithm;
generating a second array by using the identification code of the coded lock based on the format conversion function of the second encryption algorithm;
generating an intermediate code using the first array and the second array based on a first combining function of the second encryption algorithm;
generating the unlocking password by using the first quantum random array and the intermediate code based on a second combination function of the second encryption algorithm;
the verification module comprises:
the first query unit is used for querying a historical offline unlocking password database based on the unlocking password so as to judge whether the unlocking password is used for the first time;
the analysis unit is used for storing the unlocking password into the historical offline unlocking password database if the unlocking password is used for the first time, and analyzing the unlocking password based on the second encryption algorithm to acquire the identification code of the terminal equipment of the user, the identification code of the coded lock and the first quantum random number;
A first acquisition unit configured to acquire the first time information based on the first quantum random number;
the second acquisition unit is used for acquiring second time information, wherein the second time information is the time information of the unlocking password input by the user;
a calculating unit, configured to calculate a duration between the first time information and the second time information;
the comparison unit is used for comparing the duration with a preset duration;
the second query unit is used for referring to a second preset identification code list according to the identification codes of the terminal equipment of the user if the duration is not greater than the preset duration; the identification codes in the second preset identification code list are identification codes of terminal equipment with unlocking authority for the coded lock;
the verification unit is used for verifying whether the identification code of the coded lock is consistent with the preset coded lock identification code if the second preset identification code list comprises the identification code consistent with the identification code of the terminal equipment of the user;
the decision unit is used for determining that the verification is passed if the identification code of the coded lock is consistent with the preset coded lock identification code;
the server further includes an encryption module, the encryption module including:
The updating unit is used for randomly sequencing all the characters in the character display columns in the preset encoding table and then sequentially filling the characters into the character display columns to obtain the updated preset encoding table;
the query unit is used for referring to the updated preset encoding table based on the identification code of the terminal equipment of the user to obtain a third array, and referring to the updated preset encoding table based on the identification code of the server to obtain a fourth array;
a first generation unit for randomly generating a first random array and a second random array;
a second generation unit configured to generate a first encryption array based on the third array and the first random array;
a third generation unit configured to generate a second encryption array based on the fourth array and the second random array;
and the encryption unit is used for encrypting the unlocking password based on the first encryption array and the second encryption array.
CN202310813222.4A 2023-07-05 2023-07-05 Offline control method of coded lock and coded lock system Active CN116543486B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310813222.4A CN116543486B (en) 2023-07-05 2023-07-05 Offline control method of coded lock and coded lock system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310813222.4A CN116543486B (en) 2023-07-05 2023-07-05 Offline control method of coded lock and coded lock system

Publications (2)

Publication Number Publication Date
CN116543486A CN116543486A (en) 2023-08-04
CN116543486B true CN116543486B (en) 2023-09-26

Family

ID=87454454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310813222.4A Active CN116543486B (en) 2023-07-05 2023-07-05 Offline control method of coded lock and coded lock system

Country Status (1)

Country Link
CN (1) CN116543486B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093982B (en) * 2023-10-18 2024-01-30 深圳市菲尼基科技有限公司 Data interaction method and system for modularized battery-changing cabinet

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008258663A (en) * 2007-03-30 2008-10-23 Nippon Telegraph & Telephone West Corp Information communication system
KR20180075885A (en) * 2016-12-27 2018-07-05 박남석 Smart door rock system
CN108320355A (en) * 2017-12-29 2018-07-24 中国船舶重工集团公司第七八研究所 A kind of the emergency cryptosystem open system and its open method of intelligent door lock
CN109035499A (en) * 2018-06-30 2018-12-18 恒宝股份有限公司 A kind of electronic password lock authentication method based on dynamic password
CN109448203A (en) * 2018-12-26 2019-03-08 江苏亨通问天量子信息研究院有限公司 Control method, device, system and the smart lock of smart lock
CN110535968A (en) * 2019-09-07 2019-12-03 长沙北之辰智能技术有限公司 A kind of cabinet door access control system and method based on dynamic password
CN111817843A (en) * 2020-07-27 2020-10-23 山东体育学院 Program code encryption method and system based on homomorphic encryption algorithm
CN112750242A (en) * 2021-01-25 2021-05-04 广州畅联信息科技有限公司 Unlocking method and system of dynamic coded lock and dynamic coded lock circuit
CN113223210A (en) * 2020-01-21 2021-08-06 深圳市云海物联科技有限公司 Offline control method and device for electronic lock and terminal equipment
CN114049716A (en) * 2021-11-23 2022-02-15 四川卡雷拉科技有限公司 Offline unlocking method, device, system and medium based on user terminal
CN114758433A (en) * 2022-02-23 2022-07-15 珠海汇金科技股份有限公司 Cloud-based dynamic password generation method and system and intelligent lock
CN115100762A (en) * 2022-05-31 2022-09-23 深圳市旭子科技有限公司 Safe unlocking method for generating 12-bit true random dynamic password
CN116318671A (en) * 2023-03-16 2023-06-23 广东坚朗海贝斯智能科技有限公司 Offline password generation and verification method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022002146A1 (en) * 2020-06-30 2022-01-06 云丁网络技术(北京)有限公司 Smart device control method and system
KR102336068B1 (en) * 2020-12-30 2021-12-07 주식회사 피에스디엘 Security Door-lock, Device for Controlling Door-lock, Program for Controlling Door-lock and Server for Managing Door-lock

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008258663A (en) * 2007-03-30 2008-10-23 Nippon Telegraph & Telephone West Corp Information communication system
KR20180075885A (en) * 2016-12-27 2018-07-05 박남석 Smart door rock system
CN108320355A (en) * 2017-12-29 2018-07-24 中国船舶重工集团公司第七八研究所 A kind of the emergency cryptosystem open system and its open method of intelligent door lock
CN109035499A (en) * 2018-06-30 2018-12-18 恒宝股份有限公司 A kind of electronic password lock authentication method based on dynamic password
CN109448203A (en) * 2018-12-26 2019-03-08 江苏亨通问天量子信息研究院有限公司 Control method, device, system and the smart lock of smart lock
CN110535968A (en) * 2019-09-07 2019-12-03 长沙北之辰智能技术有限公司 A kind of cabinet door access control system and method based on dynamic password
CN113223210A (en) * 2020-01-21 2021-08-06 深圳市云海物联科技有限公司 Offline control method and device for electronic lock and terminal equipment
CN111817843A (en) * 2020-07-27 2020-10-23 山东体育学院 Program code encryption method and system based on homomorphic encryption algorithm
CN112750242A (en) * 2021-01-25 2021-05-04 广州畅联信息科技有限公司 Unlocking method and system of dynamic coded lock and dynamic coded lock circuit
CN114049716A (en) * 2021-11-23 2022-02-15 四川卡雷拉科技有限公司 Offline unlocking method, device, system and medium based on user terminal
CN114758433A (en) * 2022-02-23 2022-07-15 珠海汇金科技股份有限公司 Cloud-based dynamic password generation method and system and intelligent lock
CN115100762A (en) * 2022-05-31 2022-09-23 深圳市旭子科技有限公司 Safe unlocking method for generating 12-bit true random dynamic password
CN116318671A (en) * 2023-03-16 2023-06-23 广东坚朗海贝斯智能科技有限公司 Offline password generation and verification method

Also Published As

Publication number Publication date
CN116543486A (en) 2023-08-04

Similar Documents

Publication Publication Date Title
JP4607455B2 (en) System and portable terminal
JP4741629B2 (en) Authentication method using icon encryption
CN102804200B (en) Two-factor user authentication system, and method therefor
US20120155636A1 (en) On-Demand Secure Key Generation
CN110245482B (en) Authentication method and system
CN108965222B (en) Identity authentication method, system and computer readable storage medium
CN104011729B (en) Input information authenticating apparatus, server unit and input authentification of message system
JPWO2003069489A1 (en) Identification method
JP2012212211A (en) Authentication cooperation system and authentication cooperation method
CN108711209A (en) dynamic password generation and verification method and system
CN116543486B (en) Offline control method of coded lock and coded lock system
CN106779705B (en) Dynamic payment method and system
JP2006287843A (en) Authentication processing method and device
CN111125456A (en) Virtual password comparison method and system and intelligent lock
CN112529586B (en) Transaction information management method, device, equipment and storage medium
CN114090994A (en) Face recognition authentication method and system based on block chain
CN116580489B (en) Access control equipment, access control card and card sender control method, equipment and medium
JP2006155547A (en) Individual authentication system, terminal device and server
CN111770089B (en) Authentication method for blockchain sensor and blockchain network
CN116527258B (en) Unlocking method, device, equipment and storage medium of coded lock
TWI621029B (en) Personal identity authentication method and system using graphic lock
KR100868367B1 (en) Fingerprint-Information based User Authentication Method and System
CN113792272A (en) Method and device for managing and controlling password library, storage medium and electronic equipment
CN113326494B (en) Identity information authentication method, system, computer device and readable storage medium
KR102291942B1 (en) A method of saving and using OTP backup codes or temporal user OTP codes by using multi-dimensional barcode

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