CN107633588A - Control method, system, lockset, electronic equipment and readable storage medium storing program for executing - Google Patents
Control method, system, lockset, electronic equipment and readable storage medium storing program for executing Download PDFInfo
- Publication number
- CN107633588A CN107633588A CN201710999529.2A CN201710999529A CN107633588A CN 107633588 A CN107633588 A CN 107633588A CN 201710999529 A CN201710999529 A CN 201710999529A CN 107633588 A CN107633588 A CN 107633588A
- Authority
- CN
- China
- Prior art keywords
- unlocking
- lockset
- password
- moment
- server
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000004891 communication Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 10
- 238000000151 deposition Methods 0.000 claims 1
- 230000009977 dual effect Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 229910052710 silicon Inorganic materials 0.000 description 3
- 239000010703 silicon Substances 0.000 description 3
- 230000007547 defect Effects 0.000 description 2
- 229920000642 polymer Polymers 0.000 description 2
- 230000001681 protective effect Effects 0.000 description 2
- 230000032683 aging Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000005336 cracking Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- RJCRUVXAWQRZKQ-UHFFFAOYSA-N oxosilicon;silicon Chemical compound [Si].[Si]=O RJCRUVXAWQRZKQ-UHFFFAOYSA-N 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000002618 waking effect Effects 0.000 description 1
Landscapes
- Lock And Its Accessories (AREA)
Abstract
Description
技术领域technical field
本发明涉及控制技术领域,特别是涉及一种控制方法、系统、锁具、电子设备和可读存储介质。The present invention relates to the field of control technology, in particular to a control method, system, lock, electronic equipment and readable storage medium.
背景技术Background technique
目前,金库、保险库、武器弹药库及保险柜等安全性要求高的设备均采用带有密码的锁具来进行安全防护。但是,这些锁具均采用固定密码。以银行为例,如果各个营业网点的金库的锁具采用固定密码,则在频繁的工作交接过程中容易被泄露,而一旦被泄露则采用固定密码的锁具很难起到防护作用。此外,固定密码很容易被破解,而一旦密码被破解,则采用固定密码的锁具就无法起到防护作用了。At present, equipment with high security requirements such as vaults, vaults, weapons and ammunition stores, and safes all use locks with passwords for security protection. However, these locks all adopt fixed codes. Taking banks as an example, if the locks of the treasury of each business outlet use a fixed password, it is easy to be leaked during frequent work handovers, and once leaked, the lock with a fixed password is difficult to play a protective role. In addition, the fixed password is easy to be cracked, and once the password is cracked, the lockset using the fixed password cannot play a protective role.
因此,现有锁具由于采用固定密码而存在安全防护能力低的缺陷。Therefore, the existing lockset has the defect of low safety protection capability due to the use of a fixed password.
发明内容Contents of the invention
本发明实施例的目的在于提供一种控制方法、系统、锁具、电子设备和可读存储介质,以提高锁具的安全防护能力。The purpose of the embodiments of the present invention is to provide a control method, system, lock, electronic equipment and readable storage medium, so as to improve the security protection capability of the lock.
为了实现上述目的,第一方面,提供了以下技术方案:In order to achieve the above purpose, in the first aspect, the following technical solutions are provided:
一种控制方法,用于锁具,所述锁具与服务器相连;所述方法包括:A control method is used for a lock, and the lock is connected to a server; the method includes:
接收所述服务器发送的开锁信息;其中,所述开锁信息包括开锁密码和开锁时效,所述开锁密码基于预定时刻并按照预设加密算法生成;receiving the unlocking information sent by the server; wherein, the unlocking information includes an unlocking password and an unlocking time limit, and the unlocking password is generated based on a predetermined time and according to a preset encryption algorithm;
当接收到开锁指令时,记录接收到所述开锁指令的时刻;When an unlock instruction is received, record the moment when the unlock instruction is received;
根据所记录的时刻和所述开锁时效,确定开锁时间段;Determine the unlocking time period according to the recorded moment and the unlocking time limit;
在所述开锁时间段内,根据预定的时间间隔,对所述开锁时间段进行划分,得到多个时刻;In the unlocking time period, divide the unlocking time period according to a predetermined time interval to obtain multiple moments;
分别基于所述多个时刻,按照所述预设加密算法,生成各时刻对应的密码;Based on the plurality of moments respectively, according to the preset encryption algorithm, generate a password corresponding to each moment;
将所述各时刻对应的密码分别与所述开锁密码进行匹配;Matching the passwords corresponding to the respective moments with the unlocking passwords;
如果任一密码与所述开锁密码匹配成功,则控制自身执行打开操作。If any password matches the unlock password successfully, the control itself performs an unlock operation.
可选的,所述锁具具有编号和/或位置信息;所述服务器具有所述锁具的编号和/或所述锁具的位置信息;所述开锁密码是所述服务器根据所述锁具的编号和/或所述锁具的位置信息、以及所述预定时刻,按照所述加密算法生成的;Optionally, the lock has serial number and/or location information; the server has the serial number of the lock and/or the location information of the lock; Or the location information of the lock, and the predetermined time, generated according to the encryption algorithm;
所述分别基于所述多个时刻,按照所述预设加密算法,生成各时刻对应的密码的步骤,包括:The step of generating a password corresponding to each moment based on the plurality of moments and according to the preset encryption algorithm includes:
分别基于所述多个时刻,并结合自身的编号和/或位置信息,按照所述预设加密算法,生成各时刻对应的密码。Based on the multiple times respectively, combined with its own number and/or location information, according to the preset encryption algorithm, generate a password corresponding to each time.
可选的,所述锁具具有编号和/或位置信息、以及开锁人的信息;所述服务器具有所述锁具的编号和/或所述锁具的位置信息、以及开锁人的信息;所述开锁密码是所述服务器根据所述编号和/或所述位置信息、所述开锁人的信息、以及所述预定时刻,按照所述加密算法生成的;Optionally, the lock has number and/or location information, and the information of the unlocker; the server has the number of the lock and/or the location information of the lock, and the information of the unlocker; the unlock password It is generated by the server according to the encryption algorithm according to the number and/or the location information, the unlocker's information, and the predetermined time;
所述分别基于所述多个时刻,按照所述预设加密算法,生成各时刻对应的密码的步骤,包括:The step of generating a password corresponding to each moment based on the plurality of moments and according to the preset encryption algorithm includes:
分别基于所述多个时刻,并结合自身的编号和/或位置信息,以及所述开锁人的信息,按照所述预设加密算法,生成各时刻对应的密码。Respectively based on the multiple times, combined with its own number and/or location information, and the information of the unlocker, according to the preset encryption algorithm, generate a password corresponding to each time.
为了实现上述目的,第二方面,还提供了以下技术方案:In order to achieve the above purpose, the second aspect also provides the following technical solutions:
一种锁具,所述锁具与服务器相连;所述锁具包括:A kind of lock, described lock is connected with server; Described lock comprises:
接收模块,用于接收所述服务器发送的开锁信息;其中,所述开锁信息包括开锁密码和开锁时效,所述开锁密码基于预定时刻并按照预设加密算法生成;The receiving module is configured to receive the unlocking information sent by the server; wherein the unlocking information includes an unlocking password and an unlocking time limit, and the unlocking password is generated based on a predetermined time and according to a preset encryption algorithm;
第一记录模块,用于当接收到开锁指令时,记录接收到所述开锁指令的时刻;The first recording module is configured to record the time when the unlocking instruction is received when the unlocking instruction is received;
确定模块,用于根据所记录的时刻和所述开锁时效,确定开锁时间段;A determining module, configured to determine the unlocking time period according to the recorded time and the unlocking time limit;
划分模块,用于在所述开锁时间段内,根据预定的时间间隔,对所述开锁时间段进行划分,得到多个时刻;A dividing module, configured to divide the unlocking time period according to a predetermined time interval within the unlocking time period to obtain multiple moments;
第一生成模块,用于分别基于所述多个时刻,按照所述预设加密算法,生成各时刻对应的密码;A first generating module, configured to generate a password corresponding to each moment based on the plurality of moments and according to the preset encryption algorithm;
匹配模块,用于将所述各时刻对应的密码分别与所述开锁密码进行匹配;A matching module, configured to match the passwords corresponding to the respective moments with the unlocking passwords;
控制模块,用于在任一密码与所述开锁密码匹配成功的情况下,控制所述锁具执行打开操作。A control module, configured to control the lock to perform an opening operation if any password matches the unlocking password successfully.
可选的,所述锁具具有编号和/或位置信息;所述服务器具有所述锁具的编号和/或所述锁具的位置信息;所述开锁密码是所述服务器根据所述锁具的编号和/或所述锁具的位置信息、以及所述预定时刻,按照所述加密算法生成的;Optionally, the lock has serial number and/or location information; the server has the serial number of the lock and/or the location information of the lock; Or the location information of the lock, and the predetermined time, generated according to the encryption algorithm;
所述第一生成模块,具体用于分别基于所述多个时刻,并结合所述锁具的编号和/或位置信息,按照所述预设加密算法,生成所述各时刻对应的密码。The first generating module is specifically configured to generate passwords corresponding to each time based on the multiple times respectively in combination with the serial number and/or location information of the lock according to the preset encryption algorithm.
可选的,所述锁具具有编号和/或位置信息、以及开锁人的信息;所述服务器具有所述锁具的编号和/或所述锁具的位置信息、以及开锁人的信息;所述开锁密码是所述服务器根据所述编号和/或所述位置信息、所述开锁人的信息、以及所述预定时刻,按照所述加密算法生成的;Optionally, the lock has number and/or location information, and the information of the unlocker; the server has the number of the lock and/or the location information of the lock, and the information of the unlocker; the unlock password It is generated by the server according to the encryption algorithm according to the number and/or the location information, the unlocker's information, and the predetermined time;
所述第一生成模块,具体用于分别基于所述多个时刻,并结合所述锁具的编号和/或位置信息,以及所述开锁人的信息,按照所述预设加密算法,生成所述各时刻对应的密码。The first generation module is specifically configured to generate the lock according to the preset encryption algorithm based on the plurality of times, combined with the serial number and/or location information of the lock, and the information of the unlocker, according to the preset encryption algorithm. The password corresponding to each moment.
为了实现上述目的,第三方面,还提供了以下技术方案:In order to achieve the above purpose, the third aspect also provides the following technical solutions:
一种控制系统,包括服务器和锁具,所述服务器与所述锁具相连;其中:A control system includes a server and a lock, the server is connected to the lock; wherein:
所述服务器,用于在接收到打开所述锁具的指令时,记录接收所述指令的时刻,作为所述预定时刻,并基于所述预定时刻,按照加密算法,生成开锁密码,以及获取开锁时效,并将所述开锁密码和所述开锁时效发送至所述锁具;其中,所述开锁密码基于预定时刻并按照预设加密算法生成;The server is configured to, when receiving an instruction to open the lock, record the time when the instruction is received as the predetermined time, and based on the predetermined time, generate an unlock password according to an encryption algorithm, and obtain the unlocking time limit , and send the unlocking password and the unlocking time limit to the lock; wherein, the unlocking password is generated based on a predetermined time and according to a preset encryption algorithm;
所述锁具,用于接收所述服务器发送的所述开锁密码和所述开锁时效,并在接收到开锁指令时,记录接收到所述开锁指令的时刻,且根据所记录的时刻和所述开锁时效,确定开锁时间段;在所述开锁时间段内,根据预定的时间间隔,对所述开锁时间段进行划分,得到多个时刻;分别基于所述多个时刻,按照所述预设加密算法,生成各时刻对应的密码;将所述各时刻对应的密码分别与所述开锁密码进行匹配,如果任一密码与所述开锁密码匹配成功,则控制自身执行打开操作。The lock is configured to receive the unlocking password and the unlocking time limit sent by the server, and when receiving the unlocking instruction, record the time when the unlocking instruction is received, and according to the recorded time and the unlocking Aging, to determine the unlocking time period; within the unlocking time period, divide the unlocking time period according to a predetermined time interval to obtain multiple times; based on the multiple times, respectively, according to the preset encryption algorithm , generating passwords corresponding to each moment; matching the passwords corresponding to each moment with the unlocking password, and if any password matches the unlocking password successfully, then control itself to perform an opening operation.
可选的,所述锁具具有编号和/或位置信息;所述服务器具有所述锁具的编号和/或所述锁具的位置信息;所述开锁密码是所述服务器根据所述锁具的编号和/或所述锁具的位置信息、以及所述预定时刻,按照所述加密算法生成的;Optionally, the lock has serial number and/or location information; the server has the serial number of the lock and/or the location information of the lock; Or the location information of the lock, and the predetermined time, generated according to the encryption algorithm;
所述锁具,具体用于接收所述服务器发送的所述开锁密码和所述开锁时效,并在接收到开锁指令时,记录接收到所述开锁指令的时刻,且根据所记录的时刻和所述开锁时效,确定开锁时间段;在所述开锁时间段内,根据预定的时间间隔,对所述开锁时间段进行划分,得到多个时刻;分别基于所述多个时刻,并结合自身的编号和/或位置信息,按照所述预设加密算法,生成各时刻对应的密码;将所述各时刻对应的密码分别与所述开锁密码进行匹配,如果任一密码与所述开锁密码匹配成功,则控制自身执行打开操作。The lock is specifically configured to receive the unlock password and the unlock time limit sent by the server, and when receiving the unlock instruction, record the time when the unlock instruction is received, and according to the recorded time and the The time limit for unlocking is to determine the unlocking time period; within the unlocking time period, divide the unlocking time period according to a predetermined time interval to obtain multiple times; based on the multiple times respectively, combined with its own number and /or position information, according to the preset encryption algorithm, generate the password corresponding to each moment; match the password corresponding to each moment with the unlock password, if any password matches the unlock password successfully, then The control itself performs the open operation.
为了实现上述目的,第四方面,还提供了以下技术方案:In order to achieve the above purpose, the fourth aspect also provides the following technical solutions:
一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,所述处理器、所述通信接口和所述存储器通过所述通信总线完成相互间的通信;An electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete mutual communication through the communication bus;
所述存储器,用于存放计算机程序;The memory is used to store computer programs;
所述处理器,用于执行存储器上所存放的程序时,实现第一方面所述的方法步骤。The processor is configured to implement the method steps described in the first aspect when executing the program stored in the memory.
为了实现上述目的,第五方面,还提供了以下技术方案:In order to achieve the above purpose, the fifth aspect also provides the following technical solutions:
一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现第一方面所述的方法步骤。A computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps described in the first aspect are implemented.
本发明实施例提供一种控制方法、系统、锁具、电子设备和可读存储介质。其中,该控制方法用于锁具,锁具与服务器相连;该控制方法包括:接收服务器发送的开锁信息;其中,开锁信息包括开锁密码和开锁时效,开锁密码基于预定时刻并按照预设加密算法生成;当接收到开锁指令时,记录接收到开锁指令的时刻;根据所记录的时刻和开锁时效,确定开锁时间段;在开锁时间段内,根据预定的时间间隔,对开锁时间段进行划分,得到多个时刻;分别基于多个时刻,按照预设加密算法,生成各时刻对应的密码;将各时刻对应的密码分别与开锁密码进行匹配;如果任一密码与开锁密码匹配成功,则控制自身执行打开操作。The embodiment of the present invention provides a control method, a system, a lock, electronic equipment and a readable storage medium. Wherein, the control method is used for locks, and the locks are connected to a server; the control method includes: receiving unlocking information sent by the server; wherein, the unlocking information includes an unlocking password and an unlocking time limit, and the unlocking password is generated based on a predetermined time and according to a preset encryption algorithm; When the unlock command is received, record the time when the unlock command is received; determine the unlock time period according to the recorded time and the unlock time limit; within the unlock time period, divide the unlock time period according to the predetermined time interval, and obtain multiple time; based on multiple times respectively, according to the preset encryption algorithm, generate the corresponding password at each time; match the password corresponding to each time with the unlocking password; if any password matches the unlocking password successfully, then control itself to perform unlocking operate.
在该技术方案中,锁具生成密码时结合了时间要素,当接收到开锁指令时,记录接收到开锁指令的时刻;然后,从所记录的时刻起,利用开锁时效,确定出开锁时间段,再以预定的时间间隔,对开锁时间段进行划分,确定出服务器生成开锁密码所用到的时刻;然后,锁具通过所确定的时刻,生成与服务器计算得到的开锁密码相同的密码;最后,锁具再利用该生成的密码控制自身执行打开操作。可见,该技术方案中控制锁具执行打开操作的密码是锁具自身生成的,其不易被泄露,也不易被破解。因此,本发明实施例可以提高锁具的安全防护能力。In this technical solution, when the lockset generates the password, the time element is combined. When the unlocking command is received, the time when the unlocking command is received is recorded; Divide the unlocking time period at a predetermined time interval to determine the time used by the server to generate the unlocking password; then, the lock generates the same password as the unlocking password calculated by the server through the determined time; finally, the lock is reused The generated password controls itself to perform the open operation. It can be seen that in this technical solution, the password for controlling the lock to perform the opening operation is generated by the lock itself, which is not easy to be leaked or cracked. Therefore, the embodiment of the present invention can improve the safety protection capability of the lock.
本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而得以体现。本发明的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
当然,实施本发明的任一产品或方法并不一定需要同时达到以上所述的所有优点。Of course, implementing any product or method of the present invention does not necessarily need to achieve all the above-mentioned advantages at the same time.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为根据本发明实施例的应用场景的示意图;FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present invention;
图2为根据本发明实施例的控制方法的流程示意图;2 is a schematic flow chart of a control method according to an embodiment of the present invention;
图3为根据本发明实施例的锁具的结构示意图;Fig. 3 is a schematic structural diagram of a lockset according to an embodiment of the present invention;
图4为根据本发明实施例的控制系统的结构示意图;4 is a schematic structural diagram of a control system according to an embodiment of the present invention;
图5为根据本发明实施例的电子设备的结构示意图。Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
下面结合图1以银行工作人员到营业网点打开金库的锁具为例,来详细说明本发明的应用场景。The application scenario of the present invention will be described in detail below in conjunction with FIG. 1 by taking a bank staff member to a business outlet to open the lock of the vault as an example.
应用场景包括服务器11、锁具12和开锁人13。其中,服务器11包括所有营业网点的金库的锁具12的加密因子(例如,营业网点的地址)和秘钥。服务器11与锁具12相连,例如,可以通过有线(例如,网线)的方式相连,也可以通过无线的方式相连。锁具12处于待机状态。锁具12和服务器11可以分别具有时间模块,且锁具12的时间模块和服务器11的时间模块的时间是一致的,该时间可以均以格林威治时间为准;由此,可以确保服务器11和锁具12根据时间要素生成的密码能够匹配成功。The application scenario includes a server 11 , a lock 12 and a lock unlocker 13 . Wherein, the server 11 includes the encryption factors (for example, addresses of the business outlets) and secret keys of the locks 12 of the vaults of all business outlets. The server 11 is connected to the lock 12, for example, it may be connected in a wired (for example, network cable) manner, or it may be connected in a wireless manner. The lock 12 is in a standby state. The lockset 12 and the server 11 can have time modules respectively, and the time of the time module of the lockset 12 and the time module of the server 11 are consistent, and this time can be all based on Greenwich Mean Time; thus, it can be guaranteed that the server 11 and the lockset 12 The password generated according to the time element can be successfully matched.
在图1中,当银行需要派遣开锁人13到某个营业网点的金库打开锁具12的时候,银行调度员于某个预定时刻(也称为调度时刻),在服务器11里调取锁具12的信息并输入开锁时效和调度时刻。然后,服务器11利用所调取的锁具12的信息、开锁时效、调度时刻,生成密码,并将该密码及开锁时效发送至锁具12。当开锁人13到达营业网点后,通过向锁具12输入开锁指令,唤醒该锁具12,接着进行开锁操作。In Fig. 1, when the bank needs to dispatch the unlocker 13 to open the lock 12 in the vault of a certain business outlet, the bank dispatcher calls the lock 12 in the server 11 at a certain predetermined time (also called the scheduling time). information and enter the unlocking time limit and scheduling time. Then, the server 11 generates a password by using the retrieved information of the lock 12 , the time limit for unlocking, and the scheduling time, and sends the password and the time limit for unlocking to the lock 12 . When the unlocker 13 arrives at the business outlet, he will wake up the lock 12 by inputting an unlock command to the lock 12, and then perform the unlock operation.
由于现有锁具采用固定密码而存在安全防护能力低的缺陷。因此,本发明实施例提供一种控制方法。该控制方法用于锁具,锁具与服务器相连。如图2所示,该控制方法包括如下步骤S200至步骤S260。其中:Because the existing lockset adopts a fixed password, there is a defect of low safety protection capability. Therefore, an embodiment of the present invention provides a control method. The control method is used for locks, and the locks are connected to the server. As shown in FIG. 2, the control method includes the following steps S200 to S260. in:
S200:接收服务器发送的开锁信息;其中,开锁信息包括开锁密码和开锁时效,开锁密码基于预定时刻并按照预设加密算法生成。S200: Receive unlocking information sent by the server; wherein, the unlocking information includes an unlocking password and an unlocking time limit, and the unlocking password is generated based on a predetermined time and according to a preset encryption algorithm.
其中,开锁信息可以预先存储在服务器中。当需要开锁人去打开锁具的时候,服务器将开锁信息发送至锁具。Wherein, the unlocking information may be pre-stored in the server. When the unlocker needs to open the lock, the server sends the unlock information to the lock.
上述开锁时效可以根据实际情况进行设定,例如,银行调度员根据锁具的位置,估计开锁人到达锁具所在位置所需的时间,然后,根据该时间以及生成开锁密码所用的预定时刻,来设定开锁时效,例如,1个小时、2个小时等,本发明对此不作限定。The above-mentioned unlocking time limit can be set according to the actual situation. For example, the bank dispatcher estimates the time required for the unlocker to arrive at the location of the lock according to the position of the lock, and then sets it according to the time and the predetermined time used to generate the unlock password. The time limit for unlocking, for example, 1 hour, 2 hours, etc., is not limited in the present invention.
上述预设加密算法例如可以为国密算法(例如,分组密码算法、摘要算法),但绝不限于此。The aforementioned preset encryption algorithm may be, for example, a national secret algorithm (eg, a block cipher algorithm, a digest algorithm), but is by no means limited thereto.
上述预定时刻只由服务器用于生成开锁密码,而未发送至锁具。举例而言,银行调度员在某个时刻唤醒处于待机状态的服务器而进行开锁密码的生成时,可以将唤醒的时刻作为该预定时刻;该预定时刻可以只有调度员知道。由此增加了开锁密码的破解难度,从而提高了锁具的安全防护能力。The aforementioned predetermined time is only used by the server to generate the unlock code, but not sent to the lock. For example, when a bank dispatcher wakes up a server in a standby state at a certain time to generate an unlock password, the time of waking up can be used as the predetermined time; the predetermined time can only be known to the dispatcher. This increases the difficulty of deciphering the unlocking password, thereby improving the security protection capability of the lockset.
本发明实施例中开锁密码的生成考虑了时间要素,也就是说,基于预定时刻生成开锁密码。该预定时刻例如可以是银行调度员欲派遣开锁人去开锁而唤醒服务器的时刻,也可以根据实际情况设定的时刻。当需要派遣开锁人取开锁的时候,就可以基于该预定时刻,并按照上述预设加密算法生成开锁密码。The generation of the unlock password in the embodiment of the present invention considers the time element, that is, the unlock password is generated based on a predetermined time. The predetermined time can be, for example, the time when the bank dispatcher intends to send a lock unlocker to unlock and wake up the server, or it can be set according to the actual situation. When it is necessary to send someone to unlock the lock, the unlock password can be generated based on the preset time and according to the above-mentioned preset encryption algorithm.
S210:当接收到开锁指令时,记录接收到开锁指令的时刻。S210: When an unlock instruction is received, record the time when the unlock instruction is received.
其中,开锁指令由开锁人下达给锁具。锁具接收到开锁指令时,记录下此刻的时间。Wherein, the unlock command is given to the lock by the unlocker. When the lockset receives the unlock command, it records the time at this moment.
S220:根据所记录的时刻和开锁时效,确定开锁时间段。S220: Determine the unlocking time period according to the recorded time and the unlocking time limit.
本步骤利用开锁时效,从所记录的时刻起,在时间上逆推一个时间段,作为开锁时间段。In this step, by using the unlocking time limit, a time period is reversed in time from the recorded moment as the unlocking time period.
举例而言,如果所记录的时刻为10点且开锁时效为1个小时,则从10点起,逆推1个小时,得到从10点至9点这一时间段,将其作为开锁时间段。For example, if the recorded time is 10:00 and the time limit for unlocking is 1 hour, then from 10:00, reverse 1 hour to get the time period from 10:00 to 9:00 as the unlocking time period .
S230:在开锁时间段内,根据预定的时间间隔,对开锁时间段进行划分,得到多个时刻。S230: During the unlocking time period, divide the unlocking time period according to a predetermined time interval to obtain multiple moments.
其中,预定的时间间隔例如可以为1秒钟、5分钟、10分钟等,本发明对此不作限定。Wherein, the predetermined time interval may be, for example, 1 second, 5 minutes, 10 minutes, etc., which is not limited in the present invention.
对开锁时间段的划分可以根据实际情况,按照预定的时间间隔进行划分。The division of the unlocking time period can be divided according to the actual situation, according to the predetermined time interval.
下面举例对本步骤进行详细说明。The following example describes this step in detail.
如果开锁时间段为1小时、预定的时间间隔为5分钟,则本步骤在1小时内,以5分钟为划分单元,对1小时这一时间段进行划分,从而得到12个时刻。If the unlocking time period is 1 hour and the predetermined time interval is 5 minutes, then this step divides the time period of 1 hour within 1 hour with 5 minutes as the division unit, thereby obtaining 12 moments.
本步骤通过对开锁时间段的划分,以用于确定生成开锁密码所用到的预定时刻。In this step, the division of the unlocking time period is used to determine the predetermined time for generating the unlocking password.
S240:分别基于多个时刻,按照预设加密算法,生成各时刻对应的密码。S240: Generate passwords corresponding to each time based on multiple time points and according to a preset encryption algorithm.
本步骤中,锁具在未获得服务器计算开锁密码时所采用的预定时刻的情况下,针对每一个时刻,分别按照预设加密算法,生成与每一个时刻对应的密码。其中,利用时间要素来生成密码。由此,每次得到的密码随时间的不同而不同。所以,该密码是一种动态密码。In this step, if the lockset does not obtain the predetermined time used by the server to calculate the unlocking password, for each time, according to the preset encryption algorithm, a password corresponding to each time is generated. Among them, the time element is used to generate the password. Thus, the password obtained each time is different with time. Therefore, the password is a dynamic password.
在一些可选的实施例中,锁具具有编号和/或位置信息;服务器具有锁具的编号和/或锁具的位置信息;开锁密码是服务器根据锁具的编号和/或锁具的位置信息、以及预定时刻,按照预设加密算法生成的;步骤S240具体包括:分别基于多个时刻,并结合自身的编号和/或位置信息,按照预设加密算法,生成各时刻对应的密码。In some optional embodiments, the lock has number and/or location information; the server has the number of the lock and/or the location information of the lock; , generated according to a preset encryption algorithm; Step S240 specifically includes: generating a password corresponding to each time based on a plurality of times and combining with its own number and/or location information according to a preset encryption algorithm.
本实施例通过锁具的编号和位置信息可以指定打开某把或某些锁具。这对于诸如银行、金库等机构,可以进一步防范开锁密码的泄漏,从而提高锁具的安全防护能力。具体的锁具的打开操作的说明可参考前述实施例中的相关说明,在此不再赘述。In this embodiment, a certain lock or certain locks can be designated to be opened through the number and location information of the lock. For institutions such as banks and treasuries, this can further prevent the leakage of the unlocking password, thereby improving the security protection capability of the lock. For specific descriptions of the opening operation of the lock, reference may be made to relevant descriptions in the foregoing embodiments, and details are not repeated here.
下面结合图1所示应用场景对本实施例进行详细说明。This embodiment will be described in detail below in conjunction with the application scenario shown in FIG. 1 .
其中,假设服务器中预先存储某把锁具的编号和位置信息。服务器对锁具进行初始化,以将编号和位置信息输入该锁具。Wherein, it is assumed that the number and location information of a certain lock is pre-stored in the server. The server initializes the lock to enter number and location information into the lock.
当银行的调度员要派遣开锁人去某个银行营业网点开锁时,调度员唤醒服务器,并在服务器上调取锁具的信息并设定开锁时效,且记录调取时刻,将其作为预定时刻,然后,根据锁具的编号和位置信息,以及该预定时刻,按照预设加密算法生成开锁密码;最后,服务器将该开锁密码和开锁时效发送至锁具。在锁具,本发明实施例提供的控制方法包括如下步骤:When the dispatcher of the bank wants to send the unlocker to a certain bank business outlet to unlock, the dispatcher wakes up the server, and retrieves the information of the lock on the server and sets the time limit for unlocking, and records the retrieval time as the scheduled time. Then, according to the serial number and location information of the lock, as well as the predetermined time, an unlock password is generated according to a preset encryption algorithm; finally, the server sends the unlock password and the unlock time limit to the lock. In the lockset, the control method provided by the embodiment of the present invention includes the following steps:
步骤一:接收服务器发送的开锁密码和开锁时效;Step 1: Receive the unlock password and unlock time limit sent by the server;
步骤二:当接收到开锁指令时,记录接收到开锁指令的时刻;Step 2: when the unlock command is received, record the moment when the unlock command is received;
步骤三:根据所记录的时刻和开锁时效,确定开锁时间段;Step 3: Determine the unlocking time period according to the recorded time and unlocking time limit;
步骤四:在开锁时间段内,根据预定的时间间隔,对开锁时间段进行划分,得到多个时刻;Step 4: In the unlocking time period, according to the predetermined time interval, divide the unlocking time period to obtain multiple moments;
步骤五:分别基于多个时刻,并结合自身的编号和位置信息,按照预设加密算法,生成各时刻对应的密码;Step 5: Generate passwords corresponding to each moment based on multiple moments, combined with their own number and location information, according to the preset encryption algorithm;
步骤六:将各时刻对应的密码分别与开锁密码进行匹配;Step 6: Match the password corresponding to each moment with the unlock password;
步骤七:如果任一密码与开锁密码匹配成功,则控制自身执行打开操作。Step 7: If any password matches the unlock password successfully, then the control itself executes the opening operation.
本实施例通过采取上述技术方案,锁具在未获得服务器计算开锁密码时所采用的预定时刻的情况下,根据开锁密码和开锁时效以及接收到开锁指令的时刻,确定出服务器计算开锁密码所采用的预定时刻,然后,利用该时刻,再结合自身的编号和位置信息,按照与服务器计算开锁密码所用加密算法相同的加密算法,生成与开锁密码相同的密码,最后通过该密码控制自身执行打开操作。由此,本实施例考虑了锁具与其自身的编号和位置信息之间的唯一对应关系,并结合了时间要素,而推定服务器计算的开锁密码并与之进行匹配,以执行开锁操作,从而可以进一步确保锁具的密码不易被泄露,也不易被破解,因而进一步提高了锁具的安全防护能力。In this embodiment, by adopting the above-mentioned technical solution, when the lockset does not obtain the predetermined time used by the server to calculate the unlock password, it can determine the time used by the server to calculate the unlock password according to the unlock password, the time limit for unlocking and the time when the unlock instruction is received. Predetermined time, then, using this time, combined with its own number and location information, according to the same encryption algorithm as the encryption algorithm used by the server to calculate the unlocking password, generate the same password as the unlocking password, and finally control itself to perform the opening operation through the password. Thus, this embodiment considers the unique correspondence between the lock and its own number and position information, and combines the time element, and infers the unlock password calculated by the server and matches it to perform the unlock operation, so that further It is ensured that the password of the lock is not easy to be leaked or cracked, thereby further improving the security protection capability of the lock.
在另一些可选的实施例中,锁具具有编号和/或位置信息、以及开锁人的信息;服务器具有锁具的编号和/或锁具的位置信息、以及开锁人的信息;开锁密码是服务器根据编号和/或位置信息、开锁人的信息、以及预定时刻,按照加密算法生成的;步骤S240具体包括:分别基于多个时刻,并结合自身的编号和/或位置信息,以及开锁人的信息,按照预设加密算法,生成各时刻对应的密码。In some other optional embodiments, the lock has number and/or location information, and the information of the unlocker; the server has the number of the lock and/or the location information of the lock, and the information of the unlocker; the unlock password is the server according to the number and/or location information, information of the person who unlocks the lock, and the predetermined time are generated according to the encryption algorithm; step S240 specifically includes: based on multiple times respectively, combined with their own number and/or location information, and the information of the person who unlocks the lock, according to The encryption algorithm is preset to generate the corresponding password at each moment.
本实施例中,开锁人的信息包括但不限于开锁人的指纹、开锁人的人脸信息、开锁人的手机号、能够表征开锁人信息的任意字符串等。In this embodiment, the unlocker's information includes, but is not limited to, the unlocker's fingerprint, the unlocker's face information, the unlocker's mobile phone number, any character string that can represent the unlocker's information, and the like.
本实施例与前述实施例的不同在于,锁具生成密码时结合了开锁人的信息。因为开锁人的信息是唯一的,且难以被他人利用。所以,该技术方案增强了生成密码的难度,从而增强了密码的破解难度,进而增强了锁具的安全防护能力。The difference between this embodiment and the foregoing embodiments lies in that the information of the unlocker is combined with the password generated by the lock. Because the unlocker's information is unique and difficult to be used by others. Therefore, this technical solution increases the difficulty of generating the password, thereby increasing the difficulty of cracking the password, and further enhancing the security protection capability of the lock.
S250:将各时刻对应的密码分别与开锁密码进行匹配。S250: Match the password corresponding to each moment with the unlock password.
其中,各时刻对应的密码是锁具生成的;开锁密码是服务器生成的。所以,本步骤是将锁具根据每一个时刻生成的密码分别与服务器生成的开锁密码进行匹配。Wherein, the password corresponding to each moment is generated by the lock; the unlocking password is generated by the server. Therefore, this step is to match the password generated by the lock at each moment with the unlock password generated by the server.
S260:如果任一密码与开锁密码匹配成功,则控制自身执行打开操作。S260: If any password matches the unlock password successfully, then control itself to perform an unlock operation.
本步骤中,当锁具确定出的多个密码中存在与开锁密码相同的密码时,则该密码与开锁密码匹配时,就会匹配成功,此时,锁具控制自身执行打开操作。也就是说,锁具基于与服务器计算开锁密码所采用的时刻和加密算法相同的时刻和加密算法,可以得到与开锁密码相同的密码,即各时刻对应的密码中存在与开锁密码相同的密码,由此,当任一密码与开锁密码匹配成功时,锁具使用与开锁密码相同的密码控制锁具自身执行打开操作。In this step, when there is a password identical to the unlocking password among the plurality of passwords determined by the lock, then when the password matches the unlocking password, the match will be successful. At this time, the lock controls itself to perform an opening operation. That is to say, the lock can obtain the same password as the unlock password based on the same time and encryption algorithm as the time and encryption algorithm used by the server to calculate the unlock password, that is, the passwords corresponding to each time have the same password as the unlock password. Therefore, when any password matches the unlocking password successfully, the lock uses the same password as the unlocking password to control the lock itself to perform an opening operation.
现有技术所采取的技术方案是:锁具预先存储有开锁密码,当锁具接收到开锁人输入的密码时,将该密码与预先存储的开锁密码进行匹配;如果匹配成功,则锁具执行打开操作。在该技术方案中,锁具自身不计算密码,而只是进行密码匹配,以此实现打开操作。然而,图2所示实施例通过采取步骤S200至步骤S260,锁具自身生成与服务器计算得到的开锁密码相匹配的密码,最后通过匹配成功的密码执行打开操作。所以,该技术方案中控制锁具执行打开操作的密码是锁具自身生成的,其不易被泄露,也不易被破解。因此,图2所示实施例可以提高锁具的安全防护能力。The technical solution adopted in the prior art is: the lock is pre-stored with an unlock password, and when the lock receives the password input by the unlocker, the password is matched with the pre-stored unlock password; if the match is successful, the lock performs an opening operation. In this technical solution, the lock itself does not calculate the password, but only performs password matching, so as to realize the opening operation. However, in the embodiment shown in FIG. 2 , by taking steps S200 to S260 , the lock itself generates a password that matches the unlocking password calculated by the server, and finally executes the opening operation through the successfully matched password. Therefore, in this technical solution, the password for controlling the opening operation of the lock is generated by the lock itself, which is not easy to be leaked or cracked. Therefore, the embodiment shown in FIG. 2 can improve the safety protection capability of the lock.
为了提高锁具的安全防护能力,本发明实施例还提供一种锁具。该锁具与服务器相连。如图3所示,锁具包括:In order to improve the security protection capability of the lock, the embodiment of the present invention also provides a lock. The lock is connected to the server. As shown in Figure 3, the lock includes:
接收模块31,用于接收服务器发送的开锁信息;其中,开锁信息包括开锁密码和开锁时效,开锁密码基于预定时刻并按照预设加密算法生成;The receiving module 31 is used to receive the unlocking information sent by the server; wherein the unlocking information includes an unlocking password and an unlocking time limit, and the unlocking password is generated based on a predetermined time and according to a preset encryption algorithm;
第一记录模块32,用于当接收到开锁指令时,记录接收到开锁指令的时刻;The first recording module 32 is used to record the moment when the unlock instruction is received when the unlock instruction is received;
确定模块33,用于根据所记录的时刻和开锁时效,确定开锁时间段;Determining module 33 is used for determining the unlocking time period according to the recorded moment and the unlocking time limit;
划分模块34,用于在开锁时间段内,根据预定的时间间隔,对开锁时间段进行划分,得到多个时刻;The dividing module 34 is used for dividing the unlocking time period according to a predetermined time interval in the unlocking time period to obtain a plurality of moments;
第一生成模块35,用于分别基于多个时刻,按照预设加密算法,生成各时刻对应的密码;The first generation module 35 is used to generate passwords corresponding to each moment based on a plurality of moments and according to a preset encryption algorithm;
匹配模块36,用于将各时刻对应的密码分别与开锁密码进行匹配;The matching module 36 is used to match the passwords corresponding to each moment with the unlocking passwords;
控制模块37,用于在任一密码与开锁密码匹配成功的情况下,控制锁具执行打开操作。The control module 37 is configured to control the lock to perform an opening operation if any password matches the unlocking password successfully.
与现有锁具预先存储开锁密码并将其与接收到的密码匹配以根据匹配结果执行打开操作的技术方案相比,在本实施例提供的上述技术方案中,锁具在获得服务器计算开锁密码时所采用的预定时刻的情况下,通过划分模块34根据由接收模块31接收到的开锁信息、由记录模块32记录的时刻以及由确定模块33确定的开锁时间段,确定出服务器计算开锁密码所采用的预定时刻,然后,生成模块35利用该时刻,再按照与服务器计算开锁密码所用加密算法相同的加密算法,生成与开锁密码相同的密码,最后控制模块37利用由匹配模块36匹配成功的密码控制锁具执行打开操作。由此,本实施例通过自身生成密码,以控制执行打开操作,从而可以确保打开锁具的密码不易被泄露,也不易被破解,因而提高了锁具的安全防护能力。Compared with the technical solution in which the existing locks store the unlocking password in advance and match it with the received password to perform the opening operation according to the matching result, in the above technical solution provided by this embodiment, the lock is obtained when the server calculates the unlocking password. Under the situation of the predetermined time that adopts, by dividing module 34 according to the unlocking information that is received by receiving module 31, the time that is recorded by recording module 32 and the unlocking time period determined by determining module 33, determine the time period that server calculates the unlocking password that adopts. Predetermined moment, then, generation module 35 utilizes this moment, then according to the encryption algorithm identical with the encryption algorithm that server calculates the used encryption algorithm of unlocking password, generates the password identical with unlocking password, finally control module 37 utilizes the password that is successfully matched by matching module 36 to control the lockset Perform an open operation. Therefore, this embodiment generates a password by itself to control the execution of the opening operation, thereby ensuring that the password for opening the lock is not easily leaked or cracked, thus improving the security protection capability of the lock.
在一些可选的实施例中,在图3所示实施例的基础上,锁具具有编号和/或位置信息;服务器具有锁具的编号和/或锁具的位置信息;开锁密码是服务器根据锁具的编号和/或锁具的位置信息、以及预定时刻,按照加密算法生成的;In some optional embodiments, on the basis of the embodiment shown in Figure 3, the lock has number and/or location information; the server has the number of the lock and/or the location information of the lock; And/or the location information of the lock, as well as the scheduled time, are generated according to the encryption algorithm;
第一生成模块35,具体用于分别基于多个时刻,并结合锁具的编号和/或位置信息,按照预设加密算法,生成各时刻对应的密码。The first generating module 35 is specifically configured to generate a password corresponding to each time based on multiple times respectively in combination with the serial number and/or location information of the lock according to a preset encryption algorithm.
本实施例在图3所示实施例的基础上,考虑了锁具与其自身的编号和位置信息之间的唯一对应关系,并结合了时间要素,而推定服务器计算的开锁密码并与之进行匹配,以执行开锁操作,从而可以进一步确保锁具的密码不易被泄露,也不易被破解,因而进一步提高了锁具的安全防护能力。On the basis of the embodiment shown in Figure 3, this embodiment considers the unique correspondence between the lockset and its own serial number and position information, and combines the time element to infer the unlock password calculated by the server and match it, To perform the unlocking operation, so as to further ensure that the password of the lock is not easily leaked or cracked, thus further improving the security protection capability of the lock.
在另一些可选的实施例中,在图3所示实施例的基础上,锁具具有编号和/或位置信息、以及开锁人的信息;服务器具有锁具的编号和/或锁具的位置信息、以及开锁人的信息;开锁密码是服务器根据编号和/或位置信息、开锁人的信息、以及预定时刻,按照加密算法生成的;In some other optional embodiments, on the basis of the embodiment shown in Figure 3, the lock has number and/or location information, and the information of the unlocker; the server has the number of the lock and/or the location information of the lock, and The information of the unlocker; the unlock password is generated by the server according to the encryption algorithm according to the number and/or location information, the information of the unlocker, and the scheduled time;
第一生成模块35,具体用于分别基于多个时刻,并结合锁具的编号和/或位置信息,以及开锁人的信息,按照预设加密算法,生成各时刻对应的密码。The first generation module 35 is specifically configured to generate passwords corresponding to each time based on multiple times, combined with the serial number and/or location information of the lock, and the information of the unlocker, according to a preset encryption algorithm.
本实施例在图3所示实施例的基础上,考虑了锁具与其自身的编号和位置信息之间的唯一对应关系,并结合了时间要素,且更进一步结合了开锁人的信息,而推定服务器计算的开锁密码并与之进行匹配,以执行开锁操作。因为开锁人的信息是唯一的,且难以被他人利用。从而本实施例可以进一步确保锁具的密码不易被泄露,也不易被破解,因而进一步提高了锁具的安全防护能力。On the basis of the embodiment shown in Figure 3, this embodiment considers the unique correspondence between the lock and its own number and location information, combines the time element, and further combines the information of the person who unlocked the lock, and infers that the server The calculated unlock password and match it to perform the unlock operation. Because the unlocker's information is unique and difficult to be used by others. Therefore, this embodiment can further ensure that the password of the lock is not easy to be leaked or cracked, thus further improving the security protection capability of the lock.
为了提高锁具的安全防护能力,基于控制方法实施例相同的技术构思,本发明实施例还提供一种控制系统。如图4所示,该控制系统包括服务器41和锁具42,服务器41与锁具42相连;其中:In order to improve the safety protection capability of the lock, based on the same technical idea as the control method embodiment, the embodiment of the present invention also provides a control system. As shown in Figure 4, this control system comprises server 41 and lockset 42, and server 41 links to each other with lockset 42; Wherein:
服务器41,用于在接收到打开锁具的指令时,记录接收指令的时刻,作为预定时刻,并基于预定时刻,按照加密算法,生成开锁密码,以及获取开锁时效,并将开锁密码和开锁时效发送至锁具42;其中,开锁密码基于预定时刻并按照预设加密算法生成;The server 41 is used to record the time of receiving the instruction as the predetermined time when receiving the instruction to open the lock, and based on the predetermined time, according to the encryption algorithm, generate the unlock password, and obtain the unlocking time limit, and send the unlocking code and the unlocking time limit To the lockset 42; wherein, the unlock password is based on a predetermined moment and is generated according to a preset encryption algorithm;
锁具42,用于接收服务器发送的开锁密码和开锁时效,并在接收到开锁指令时,记录接收到开锁指令的时刻,且根据所记录的时刻和开锁时效,确定开锁时间段;在开锁时间段内,根据预定的时间间隔,对开锁时间段进行划分,得到多个时刻;分别基于多个时刻,按照预设加密算法,生成各时刻对应的密码;将各时刻对应的密码分别与开锁密码进行匹配,如果任一密码与开锁密码匹配成功,则控制自身执行打开操作。The lockset 42 is used to receive the unlocking password and the unlocking time limit sent by the server, and when receiving the unlocking instruction, record the moment when the unlocking instruction is received, and determine the unlocking time period according to the recorded moment and the unlocking time limit; Within, according to the predetermined time interval, the unlocking time period is divided to obtain multiple times; based on the multiple times respectively, according to the preset encryption algorithm, the passwords corresponding to each time are generated; the passwords corresponding to each time are respectively compared with the unlocking password Match, if any password matches successfully with the unlock password, then the control itself performs the opening operation.
本发明实施例通过采取上述技术方案,锁具42在未获得服务器41生成开锁密码时所用的预定时刻的情况下,根据服务器41发送来的开锁信息,生成与服务器41生成的开锁密码相匹配的密码,然后,利用该密码控制自身执行打开操作。由于锁具42利用自身生成的密码执行打开操作;所以,该密码不易被泄露,也不易被破解。因此,本发明实施例可以提高锁具的安全防护能力。In the embodiment of the present invention, by adopting the above-mentioned technical solution, the lockset 42 generates a password matching the unlocking password generated by the server 41 according to the unlocking information sent by the server 41 without obtaining the predetermined time when the server 41 generates the unlocking password. , which then controls itself to perform an open operation with that password. Because the lockset 42 uses the password generated by itself to perform the opening operation; therefore, the password is not easy to be leaked or cracked. Therefore, the embodiment of the present invention can improve the safety protection capability of the lock.
在一些可选的实施例中,锁具具有编号和/或位置信息;服务器具有锁具的编号和/或锁具的位置信息;开锁密码是服务器根据锁具的编号和/或锁具的位置信息、以及预定时刻,按照加密算法生成的;In some optional embodiments, the lock has number and/or location information; the server has the number of the lock and/or the location information of the lock; , generated according to the encryption algorithm;
锁具42,具体用于接收服务器41发送的开锁密码和开锁时效,并在接收到开锁指令时,记录接收到开锁指令的时刻,且根据所记录的时刻和开锁时效,确定开锁时间段;在开锁时间段内,根据预定的时间间隔,对开锁时间段进行划分,得到多个时刻;分别基于多个时刻,并结合自身的编号和/或位置信息,按照预设加密算法,生成各时刻对应的密码;将各时刻对应的密码分别与开锁密码进行匹配,如果任一密码与开锁密码匹配成功,则控制自身执行打开操作。The lockset 42 is specifically used to receive the unlocking password and the unlocking time limit sent by the server 41, and when receiving the unlocking command, record the moment when the unlocking command is received, and determine the unlocking time period according to the recorded time and the unlocking time limit; In the time period, according to the predetermined time interval, the unlocking time period is divided to obtain multiple times; based on the multiple times respectively, combined with its own number and/or location information, according to the preset encryption algorithm, generate the corresponding Password: match the password corresponding to each moment with the unlock password, and if any password matches the unlock password successfully, the control itself performs the unlock operation.
本实施例在图4所示实施例的基础上,进一步考虑了锁具42与其自身的编号和位置信息之间的唯一对应关系,并结合了时间要素,且更进一步结合了开锁人的信息,而推定服务器41计算的开锁密码并与之进行匹配,以执行开锁操作。因为开锁人的信息是唯一的,且难以被他人利用。从而本实施例可以进一步确保锁具的密码不易被泄露,也不易被破解,因而进一步提高了锁具的安全防护能力。On the basis of the embodiment shown in Figure 4, this embodiment further considers the unique correspondence between the lockset 42 and its own serial number and position information, combines the time element, and further combines the information of the unlocker, and Estimate the unlock password calculated by the server 41 and match it to perform the unlock operation. Because the unlocker's information is unique and difficult to be used by others. Therefore, this embodiment can further ensure that the password of the lock is not easy to be leaked or cracked, thus further improving the security protection capability of the lock.
为了提高锁具的安全防护能力,基于与控制方法实施例相同的技术构思,本发明实施例还提供了一种电子设备,如图5所示,包括处理器51、通信接口52、存储器53和通信总线54,其中,处理器51、通信接口52和存储器53通过通信总线54完成相互间的通信;In order to improve the security protection capability of the lock, based on the same technical concept as the control method embodiment, the embodiment of the present invention also provides an electronic device, as shown in FIG. 5 , including a processor 51, a communication interface 52, a memory 53 and a communication A bus 54, wherein the processor 51, the communication interface 52 and the memory 53 complete mutual communication through the communication bus 54;
存储器53,用于存放计算机程序;Memory 53, used to store computer programs;
处理器51,用于执行存储器53上所存放的程序时,实现上述任一控制方法实施例中的方法步骤。The processor 51 is configured to implement the method steps in any one of the above control method embodiments when executing the program stored in the memory 53 .
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral ComponentInterconnect,PCI)总线或扩展工业标准结构(Extended Industry StandardArchitecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图5中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus or the like. The communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 5 , but it does not mean that there is only one bus or one type of bus.
上述通信接口52用于上述电子设备与其他设备之间的通信。The communication interface 52 is used for communication between the electronic device and other devices.
上述存储器53可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(non-volatile memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The above-mentioned memory 53 may include a random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (non-volatile memory, NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far away from the aforementioned processor.
上述的处理器51可以是通用处理器,包括中央处理器(Central ProcessingUnit,简称CPU)、网络处理器(Ne twork Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Applica tion Specific IntegratedCircuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor 51 can be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP) etc.; it can also be a digital signal processor (Digital Signal Processing, DSP), Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
本实施例中,通过处理器51执行存储器53上所存放的程序时,实现了锁具利用自身生成的密码来控制自身执行打开操作,所以,该技术方案中的密码不易被泄露,也不易被破解。因此,本发明实施例可以提高锁具的安全防护能力。In this embodiment, when the processor 51 executes the program stored on the memory 53, it realizes that the lock uses the password generated by itself to control itself to perform the opening operation, so the password in this technical solution is not easily leaked or cracked. . Therefore, the embodiment of the present invention can improve the safety protection capability of the lock.
为了提高锁具的安全防护能力,基于与方法实施例相同的技术构思,本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质内存储有计算机程序,计算机程序被处理器执行时实现上述任一控制方法实施例所述的方法步骤。In order to improve the security protection capability of the lock, based on the same technical concept as the method embodiment, the embodiment of the present invention also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, The method steps described in any one of the above control method embodiments are realized.
上述计算机可读存储介质可以包括但不限于随机存取存储器(RAM)、动态随机存取存储器(DRAM)、静态随机存取存储器(SRAM)、只读存储器(ROM)、可编程只读存储器(PROM)、可擦写可编程只读存储器(EPROM)、电可擦写可编程只读存储器(EEPROM)、闪存(例如,NOR型闪存或NAND型闪存)、内容可寻址存储器(CAM)、聚合物存储器(例如,铁电聚合物存储器)、相变存储器、双向开关半导体存储器、硅-氧化物-氮化硅-氧化硅-硅(Silicon-Oxide-Nitride-Oxide-Silicon,SONOS)存储器、磁卡或者光卡,亦或是其他任意适当类型的计算机可读存储介质。The above-mentioned computer-readable storage medium may include, but not limited to, random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), read-only memory (ROM), programmable read-only memory ( PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory (for example, NOR-type flash memory or NAND-type flash memory), Content Addressable Memory (CAM), Polymer memory (for example, ferroelectric polymer memory), phase change memory, bidirectional switch semiconductor memory, silicon-oxide-silicon nitride-silicon oxide-silicon (Silicon-Oxide-Nitride-Oxide-Silicon, SONOS) memory, A magnetic or optical card, or any other suitable type of computer-readable storage medium.
本实施例中,计算机存储介质上存储的计算机程序被处理器执行时实现了锁具利用自身生成的密码来控制自身执行打开操作,所以,该技术方案中的密码不易被泄露,也不易被破解。因此,本发明实施例可以提高锁具的安全防护能力。In this embodiment, when the computer program stored on the computer storage medium is executed by the processor, the lock uses the password generated by itself to control itself to perform the opening operation. Therefore, the password in this technical solution is not easily leaked or cracked. Therefore, the embodiment of the present invention can improve the safety protection capability of the lock.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or order between them. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
本说明书中的各个实施例均采用相关的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。尤其,对于锁具实施例、控制系统实施例、电子设备实施例和计算机存储介质实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a related manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. Especially, for the embodiment of the lock, the embodiment of the control system, the embodiment of the electronic device and the embodiment of the computer storage medium, since they are basically similar to the embodiment of the method, the description is relatively simple. That's it.
以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present invention are included in the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710999529.2A CN107633588A (en) | 2017-10-24 | 2017-10-24 | Control method, system, lockset, electronic equipment and readable storage medium storing program for executing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710999529.2A CN107633588A (en) | 2017-10-24 | 2017-10-24 | Control method, system, lockset, electronic equipment and readable storage medium storing program for executing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107633588A true CN107633588A (en) | 2018-01-26 |
Family
ID=61105238
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710999529.2A Pending CN107633588A (en) | 2017-10-24 | 2017-10-24 | Control method, system, lockset, electronic equipment and readable storage medium storing program for executing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107633588A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108257319A (en) * | 2018-02-12 | 2018-07-06 | 中国电力科学研究院有限公司 | A kind of USBKEY secure storages cabinet and its application process with encryption and decryption functions |
CN108510626A (en) * | 2018-02-23 | 2018-09-07 | 深圳同心科技有限公司 | A kind of dynamic password access control management method and its management system |
CN110505182A (en) * | 2018-05-18 | 2019-11-26 | 惠州众创动力科技有限公司 | A kind of audio frequency control door lock method for unlocking being simple and efficient |
CN110660143A (en) * | 2019-08-31 | 2020-01-07 | 蔚复来(浙江)科技股份有限公司 | Dynamic temporary password generation method based on online low-power-consumption intelligent lock |
CN111917555A (en) * | 2020-07-13 | 2020-11-10 | 上海明略人工智能(集团)有限公司 | Data processing method and device |
WO2021017141A1 (en) * | 2019-07-29 | 2021-02-04 | 北京小米移动软件有限公司 | Access control method and apparatus, and medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103310513A (en) * | 2013-06-09 | 2013-09-18 | 清华大学 | Door-access control method and device |
CN103700177A (en) * | 2013-12-25 | 2014-04-02 | 袁磊 | Coded lock system capable of unlocking in specific time period by using encrypted authorization data |
CN105931326A (en) * | 2016-04-15 | 2016-09-07 | 刘双文 | Access control device and method |
CN105991776A (en) * | 2016-06-29 | 2016-10-05 | 北京三快在线科技有限公司 | Method, device and system for cipher lock control |
CN106340104A (en) * | 2016-08-31 | 2017-01-18 | 谢志豪 | Coded lock and control system and method of coded lock |
CN106504391A (en) * | 2016-11-24 | 2017-03-15 | 北京爱接力科技发展有限公司 | A control method, device and system for intelligent access control |
CN106652141A (en) * | 2016-12-30 | 2017-05-10 | 北京拜克洛克科技有限公司 | Unlocking method, unlocking system, and unlocking apparatus for bicycles |
CN106952378A (en) * | 2017-04-11 | 2017-07-14 | 徐士兰 | Method for unlocking and device, electronic lock |
-
2017
- 2017-10-24 CN CN201710999529.2A patent/CN107633588A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103310513A (en) * | 2013-06-09 | 2013-09-18 | 清华大学 | Door-access control method and device |
CN103700177A (en) * | 2013-12-25 | 2014-04-02 | 袁磊 | Coded lock system capable of unlocking in specific time period by using encrypted authorization data |
CN105931326A (en) * | 2016-04-15 | 2016-09-07 | 刘双文 | Access control device and method |
CN105991776A (en) * | 2016-06-29 | 2016-10-05 | 北京三快在线科技有限公司 | Method, device and system for cipher lock control |
CN106340104A (en) * | 2016-08-31 | 2017-01-18 | 谢志豪 | Coded lock and control system and method of coded lock |
CN106504391A (en) * | 2016-11-24 | 2017-03-15 | 北京爱接力科技发展有限公司 | A control method, device and system for intelligent access control |
CN106652141A (en) * | 2016-12-30 | 2017-05-10 | 北京拜克洛克科技有限公司 | Unlocking method, unlocking system, and unlocking apparatus for bicycles |
CN106952378A (en) * | 2017-04-11 | 2017-07-14 | 徐士兰 | Method for unlocking and device, electronic lock |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108257319A (en) * | 2018-02-12 | 2018-07-06 | 中国电力科学研究院有限公司 | A kind of USBKEY secure storages cabinet and its application process with encryption and decryption functions |
CN108257319B (en) * | 2018-02-12 | 2023-10-31 | 中国电力科学研究院有限公司 | USBKEY safe storage cabinet with encryption and decryption functions and application method thereof |
CN108510626A (en) * | 2018-02-23 | 2018-09-07 | 深圳同心科技有限公司 | A kind of dynamic password access control management method and its management system |
CN110505182A (en) * | 2018-05-18 | 2019-11-26 | 惠州众创动力科技有限公司 | A kind of audio frequency control door lock method for unlocking being simple and efficient |
WO2021017141A1 (en) * | 2019-07-29 | 2021-02-04 | 北京小米移动软件有限公司 | Access control method and apparatus, and medium |
US11100735B2 (en) | 2019-07-29 | 2021-08-24 | Beijing Xiaomi Mobile Software Co., Ltd. | Method and apparatus for controlling entrance guard |
CN110660143A (en) * | 2019-08-31 | 2020-01-07 | 蔚复来(浙江)科技股份有限公司 | Dynamic temporary password generation method based on online low-power-consumption intelligent lock |
CN110660143B (en) * | 2019-08-31 | 2021-07-30 | 蔚复来(浙江)科技股份有限公司 | Dynamic temporary password generation method based on online low-power-consumption intelligent lock |
CN111917555A (en) * | 2020-07-13 | 2020-11-10 | 上海明略人工智能(集团)有限公司 | Data processing method and device |
CN111917555B (en) * | 2020-07-13 | 2024-03-15 | 上海明略人工智能(集团)有限公司 | Data processing method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107633588A (en) | Control method, system, lockset, electronic equipment and readable storage medium storing program for executing | |
US9892245B2 (en) | Method and apparatus for using a multi-factor password or a dynamic password for enhanced security on a device | |
US8813248B2 (en) | System and method for authenticating a user | |
AU2012205457B2 (en) | System and method for tamper-resistant booting | |
WO2017012302A1 (en) | Message display method and apparatus | |
US20180359635A1 (en) | Securitization of Temporal Digital Communications Via Authentication and Validation for Wireless User and Access Devices | |
US20090249014A1 (en) | Secure management of memory regions in a memory | |
CN106952378A (en) | Method for unlocking and device, electronic lock | |
CN109325342A (en) | Identity information management method, apparatus, computer equipment and storage medium | |
US10872484B1 (en) | Mobile digital locking technology | |
CN112836221B (en) | Multi-security-level partition portable solid state disk and design method thereof | |
US20210099304A1 (en) | Composite identity authentication method and composite identity authentication system using same | |
WO2019047148A1 (en) | Password verification method, terminal, and computer readable storage medium | |
US20200036527A1 (en) | User authentication based on password-specific cryptographic keys | |
US8943559B2 (en) | Access authentication method and system | |
US20200244441A1 (en) | One-time password with unpredictable moving factor | |
CN109685946A (en) | Lock opening method, device, equipment and storage medium | |
Kumar et al. | Blockchain and internet of things (IoT) enabled smart e-voting system | |
US20200399929A1 (en) | Multi-party physical access controls | |
US20190068586A1 (en) | Temporal identity vaulting | |
US20190108328A1 (en) | Method and system for secure password storage | |
US10378240B2 (en) | EAC system with plurality of different algorithm/operand pairs having different functionality | |
US9369461B1 (en) | Passcode verification using hardware secrets | |
CN110349301A (en) | Gate inhibition's open method and device | |
US20140230045A1 (en) | Graphical object-based user authentication for computerized devices |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180126 |
|
RJ01 | Rejection of invention patent application after publication |