[go: up one dir, main page]

CN115822384A - A kind of intelligent lock management system and using method - Google Patents

A kind of intelligent lock management system and using method Download PDF

Info

Publication number
CN115822384A
CN115822384A CN202211474155.XA CN202211474155A CN115822384A CN 115822384 A CN115822384 A CN 115822384A CN 202211474155 A CN202211474155 A CN 202211474155A CN 115822384 A CN115822384 A CN 115822384A
Authority
CN
China
Prior art keywords
intelligent
information
lock
electronic key
identity information
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
Application number
CN202211474155.XA
Other languages
Chinese (zh)
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.)
Linyi University
Original Assignee
Linyi University
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 Linyi University filed Critical Linyi University
Priority to CN202211474155.XA priority Critical patent/CN115822384A/en
Publication of CN115822384A publication Critical patent/CN115822384A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Lock And Its Accessories (AREA)

Abstract

The invention provides an intelligent lock management system, and belongs to the field of intelligent electronic products. The intelligent lock is used for sending self identity information LID to the intelligent electronic key; the intelligent electronic key is used for acquiring the identity information LID of the intelligent lock, encrypting the identity information LID of the intelligent lock, the identity information KID of the intelligent electronic key and the unlocking request to form first encryption information and sending the first encryption information to the intelligent terminal; the intelligent terminal is used for receiving first encryption information sent by the intelligent electronic key, encrypting the identity information UID of the staff and the first encryption information to form second encryption information, and sending the second encryption information to the data management center; and the data management center is used for receiving the second encrypted information sent by the intelligent terminal, generating a verification code and a random number R, obtaining an intelligent electronic key ciphertext c and an intelligent lock data integrity tag t based on the verification code and the random number R, and obtaining third encrypted information. The invention carries out integrity protection on the unlocking instruction data and the unlocking state data, and can resist illegal tampering and counterfeiting and data replay attack.

Description

一种智能锁管理系统及使用方法A kind of intelligent lock management system and using method

技术领域technical field

本发明属于智能电子产品技术领域,尤其涉及一种智能锁管理系统及使用方法。The invention belongs to the technical field of intelligent electronic products, and in particular relates to an intelligent lock management system and a use method.

背景技术Background technique

本部分的陈述仅仅是提供了与本发明相关的背景技术信息,不必然构成在先技术。The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

当前,各种网络基础设施遍布城市的各个角落。许多关键设施需要定期检修。一些网络衔接点、室外机柜、室外检测设备等,需要防潮、防火、防盗等安全要求,通常锁在一个安全箱体内或专用屋内,屋门或箱门上锁,检修人员需要开锁才能进入工作区域。Currently, various network infrastructures are spread across every corner of the city. Many critical facilities require regular maintenance. Some network connection points, outdoor cabinets, outdoor testing equipment, etc. require safety requirements such as moisture-proof, fire-proof, and anti-theft. They are usually locked in a safe box or a special room. The door or box door is locked, and maintenance personnel need to unlock it to enter the work area. .

发明人发现,传统的锁不方便管理,特别是使用金属钥匙的锁。如果需要临时更换工作人员,接受任务的临时工作人员需要首先拿到钥匙才能开锁。钥匙的领取、归还等都需要人工记录,而且容易出错。如果允许一把锁对应多把钥匙,则钥匙的管理会变得比较复杂,出现意外情况时难以寻找责任人,而且,一旦有一把钥匙丢失,则需要更换锁,否则会带来安全隐患;如果一把锁对应一把钥匙,如果拿钥匙的人临时有事,则开锁就变得困难,在临时找人代替拿钥匙的人进行工作时,往往会因此耽误工作处理进程。The inventor found that traditional locks are inconvenient to manage, especially locks using metal keys. If it is necessary to temporarily replace the staff, the temporary staff who accept the task need to get the key before they can unlock the lock. The collection and return of keys need to be recorded manually and are prone to errors. If one lock is allowed to correspond to multiple keys, the management of the keys will become more complicated, and it will be difficult to find the responsible person when an accident occurs. Moreover, once a key is lost, the lock needs to be replaced, otherwise it will bring safety hazards; if A lock corresponds to a key. If the person holding the key is temporarily busy, it will be difficult to unlock the lock. When someone temporarily finds someone to replace the person holding the key to work, the work process will often be delayed.

即使使用指纹锁,也同样存在许多问题,包括如下问题:(1)开锁行为没有记录,不知道谁在什么时间开了哪个锁;(2)关锁时间没有记录,不知道工作人员的实际工作时长;(3)如果多人对同一把指纹锁都能开启,一旦发生受检设备损坏,难以追究责任;(4)不方便应急处理。例如,某个设备出现问题需要紧急维修,但能开锁的维修人员都不在附近。Even if fingerprint locks are used, there are still many problems, including the following problems: (1) There is no record of unlocking behavior, and it is not known who opened which lock at what time; (2) There is no record of closing time, and the actual work of the staff is not known (3) If multiple people can open the same fingerprint lock, once the inspected equipment is damaged, it will be difficult to pursue responsibility; (4) It is inconvenient for emergency treatment. For example, a problem with a piece of equipment requires urgent repairs, but no repair person who can unlock the lock is nearby.

在现有的上述这类业务中,通常一个维修人员可以开多个锁,同一个锁也可以被多个维修人员开启。这种复杂的情况给管理者带来不少问题,也有些企业尝试通过辅助手段来解决这些问题,例如添加视频监控,这样,维修人员的开锁、关锁以及实际工作情况就能完全掌握。但视频监控系统成本很高,仅仅维护视频监控数据就需要不少的存储设备和服务平台。当锁的数量较大(如数千个甚至更多)时,需要更为廉价有效的解决方案。In the existing above-mentioned business, usually one maintenance personnel can open multiple locks, and the same lock can also be opened by multiple maintenance personnel. This complicated situation has brought many problems to managers, and some companies try to solve these problems through auxiliary means, such as adding video surveillance, so that maintenance personnel can fully grasp the unlocking, locking and actual working conditions. However, the cost of the video surveillance system is very high, and a lot of storage devices and service platforms are needed just to maintain the video surveillance data. When the number of locks is large (such as thousands or even more), a cheaper and more effective solution is required.

发明内容Contents of the invention

为克服上述现有技术的不足,本发明提供了一种智能锁管理系统及使用方法,智能锁与智能电子钥匙可以通过远程授权,对使用人员、智能电子钥匙和智能锁之间进行灵活匹配,在应急情况下非常方便;对开锁指令数据和开关锁状态数据进行完整性保护,可抵抗非法篡改和伪造,对随机数的使用,可抵抗数据重放攻击,提高了使用中得安全性;数据管理中心通过记录开锁和关锁的相关信息,能够掌握何时何人用哪把智能电子钥匙开启或关闭哪个智能锁,增加了使用过程的可控性、可追溯性。In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides an intelligent lock management system and a method of use. The intelligent lock and the intelligent electronic key can be flexibly matched between the user, the intelligent electronic key and the intelligent lock through remote authorization. It is very convenient in emergency situations; the integrity protection of unlock command data and switch lock status data can resist illegal tampering and forgery, and the use of random numbers can resist data replay attacks and improve the security in use; data The management center can know when and who uses which smart electronic key to open or close which smart lock by recording the relevant information of unlocking and closing, which increases the controllability and traceability of the use process.

为实现上述目的,本发明的一个或多个实施例提供了如下技术方案:In order to achieve the above purpose, one or more embodiments of the present invention provide the following technical solutions:

本发明第一方面提供了一种智能锁管理系统。The first aspect of the present invention provides an intelligent lock management system.

一种智能锁管理系统,包括智能锁、智能电子钥匙、智能终端和数据管理中心,其中:An intelligent lock management system, including an intelligent lock, an intelligent electronic key, an intelligent terminal and a data management center, wherein:

智能锁,其用于与智能电子钥匙进行通讯连接,将自身的身份信息LI D发送给智能电子钥匙;接收智能电子钥匙发送的验证码code、随机数R和第三加密信息,基于验证码code、随机数R和智能锁身份信息LI D对应的密钥LK,生成验证加密信息t,比较t和第三加密信息中的t,若两者相同,则执行开锁动作;Smart lock, which is used to communicate with the smart electronic key, and send its own identity information LID to the smart electronic key; receive the verification code code, random number R and third encrypted information sent by the smart electronic key, based on the verification code code 1. Random number R and the key LK corresponding to the identity information LID of the smart lock, generate verification encrypted information t ' , compare t ' with t in the third encrypted information, and if the two are the same, perform the unlocking action;

智能电子钥匙,其用于与智能锁进行通讯连接,获取智能锁的身份信息LI D,将智能锁的身份信息LI D、智能电子钥匙身份信息KI D与开锁请求加密形成第一加密信息,将第一加密信息发送给智能终端;还用于接收智能终端发送的验证码code和第三加密信息,对第三加密信息进行解密,得到随机数R,将验证码code、随机数R和第三加密信息发送给智能锁;The smart electronic key is used to communicate with the smart lock, obtain the identity information LID of the smart lock, and encrypt the identity information LID of the smart lock, the identity information KID of the smart electronic key and the unlocking request to form the first encrypted information. The first encrypted information is sent to the smart terminal; it is also used to receive the verification code code and the third encrypted information sent by the smart terminal, decrypt the third encrypted information, obtain the random number R, and combine the verification code code, the random number R and the third The encrypted information is sent to the smart lock;

智能终端,其用于接收智能电子钥匙发送的第一加密信息,将工作人员身份信息UI D和第一加密信息进行加密,形成第二加密信息,将第二加密信息发送给数据管理中心;还用于接收数据管理中心发送的验证码code和第三加密信息,将验证码code和第三加密信息发送给智能电子钥匙;An intelligent terminal, which is used to receive the first encrypted information sent by the smart electronic key, encrypt the staff identity information UID and the first encrypted information to form the second encrypted information, and send the second encrypted information to the data management center; It is used to receive the verification code code and the third encrypted information sent by the data management center, and send the verification code code and the third encrypted information to the smart electronic key;

数据管理中心,其用于接收智能终端发送的第二加密信息,产生验证码code和随机数R,将验证码code发送至智能终端;基于验证码code和随机数R,得到智能电子钥匙密文c和智能锁数据完整性标签t,基于c和t得到第三加密信息,将第三加密信息发送至智能终端。The data management center is used to receive the second encrypted information sent by the smart terminal, generate a verification code code and a random number R, and send the verification code code to the smart terminal; based on the verification code code and the random number R, obtain the smart electronic key ciphertext c and the smart lock data integrity tag t, obtain the third encrypted information based on c and t, and send the third encrypted information to the smart terminal.

优选的,所述数据管理中心用K I D对应的密钥KK加密随机数R,得到密文c;编辑开锁指令OPEN,对验证码code、随机数R、开锁指令OPEN和L I D对应的密钥LK进行加密得到数据完整性标签t。Preferably, the data management center encrypts the random number R with the key KK corresponding to the K I D to obtain the ciphertext c; edit the unlock command OPEN, and perform the verification code, random number R, unlock command OPEN and the key LK corresponding to the L I D Encrypt to get the data integrity label t.

优选的,所述数据管理中心还用于,基于工作人员、智能电子钥匙和智能锁对应关系的数据库,判断接收到的第二加密信息中的工作人员是否持有智能电子钥匙KI D,判断智能电子钥匙KI D是否有权限开启智能锁L I D。Preferably, the data management center is also used for judging whether the staff in the received second encrypted information holds the smart electronic key KID based on the database of the corresponding relationship between the staff, the smart electronic key and the smart lock, and judging whether the smart key Whether the electronic key KI D has the authority to open the smart lock L I D.

优选的,preferred,

所述智能电子钥匙还用于发送关锁指令至智能锁;The smart electronic key is also used to send a lock command to the smart lock;

所述智能锁还用于接收智能电子钥匙发送的关锁指令,执行关锁操作;The smart lock is also used to receive the lock command sent by the smart electronic key, and execute the lock operation;

或者,or,

所述智能锁还用于检测关锁状态或开锁状态,在开锁成功后和关锁成功后将开锁成功信息、关锁成功信息、智能锁身份信息L I D发送至智能电子钥匙;Described intelligent lock is also used for detecting lock-off state or unlock state, after unlocking success and closing lock successfully, unlock success information, lock success information, intelligent lock identity information L I D are sent to intelligent electronic key;

所述智能电子钥匙还用于接收智能锁发送的开锁成功信息、关锁成功信息、智能锁身份信息L I D,并将智能电子钥匙身份信息KI D、开锁成功信息、关锁成功信息、智能锁身份信息L I D发送至智能终端;The smart electronic key is also used to receive the unlocking success information, lock closing success information, and smart lock identity information L I D sent by the smart lock, and send the smart electronic key identity information KID, unlocking success information, lock closing success information, and smart lock identity information. The information L I D is sent to the smart terminal;

所述智能终端还用于接收智能电子钥匙发送的智能电子钥匙身份信息KI D、开锁成功信息、关锁成功信息、智能锁身份信息L I D,将工作人员身份信息U I D、智能电子钥匙身份信息K I D、开锁成功信息、关锁成功信息、智能锁身份信息L I D发送至数据管理中心;The smart terminal is also used to receive the smart electronic key identity information KID, unlock success information, lock success information, and smart lock identity information LID sent by the smart electronic key, and store the staff identity information UID, smart electronic key identity information KID, The unlocking success information, the locking success information, and the smart lock identity information L I D are sent to the data management center;

所述数据管理中心还用于接收工作人员身份信息U I D、智能电子钥匙身份信息KI D、开锁成功信息、关锁成功信息、智能锁身份信息L I D,将数据管理中心当前时间T、工作人员身份信息U I D、智能电子钥匙身份信息KI D、开锁成功信息、关锁成功信息、智能锁身份信息L I D进行保存。The data management center is also used to receive staff identity information U I D, intelligent electronic key identity information KID, unlock success information, lock success information, smart lock identity information L I D, and transfer the data management center current time T, staff identity information The U I D, the smart electronic key identity information KID, the unlock success information, the lock success information, and the smart lock identity information L I D are saved.

优选的,所述智能锁包括:Preferably, the smart lock includes:

存储模块,其用于存储关键数据,包括锁的身份标识LI D、锁与数据管理中心之间共享的数据加密密钥LK、开锁和关锁记录数据;A storage module, which is used to store key data, including the lock's identity LID, the data encryption key LK shared between the lock and the data management center, and the record data for unlocking and closing the lock;

通信模块,其用于与连接智能锁的智能电子钥匙进行通信,接收智能电子钥匙发送的开锁指令、关锁指令、验证码code、随机数R和第三加密信息,将开锁指令、关锁指令、验证码code、随机数R和第三加密信息发送给计算模块;A communication module, which is used to communicate with the smart electronic key connected to the smart lock, receives the unlock instruction, lock instruction, verification code code, random number R and the third encrypted information sent by the smart electronic key, and converts the unlock instruction and lock instruction , the verification code code, the random number R and the third encrypted information are sent to the calculation module;

计算模块,其用于接收通信模块发送的开锁指令、验证码code、随机数R和第三加密信息,获取存储模块内的数据加密密钥LK并执行数据完整性保护算法MAC,基于验证码code、随机数R和密钥LK,生成验证加密信息t,比较t和第三加密信息中的t,若两者相同,则发送开锁指令至机械控制模块;还用于接收通信模块发送的关锁指令,将关锁指令发送给机械控制模块;The calculation module is used to receive the unlock instruction, verification code code, random number R and third encrypted information sent by the communication module, obtain the data encryption key LK in the storage module and execute the data integrity protection algorithm MAC, based on the verification code code , random number R and key LK, generate verification encrypted information t ' , compare t ' with t in the third encrypted information, if the two are the same, send an unlock command to the mechanical control module; it is also used to receive the information sent by the communication module lock command, send the lock command to the mechanical control module;

机械控制模块,其用于接收计算模块发送的开锁指令和关锁指令,基于开锁指令和关锁指令执行开锁操作和关锁操作。The mechanical control module is used to receive the unlocking instruction and the locking instruction sent by the calculation module, and execute the unlocking operation and the locking operation based on the unlocking instruction and the locking instruction.

优选的,preferred,

所述计算模块还用于获取机械控制模块的开锁成功信息和关锁成功信息,将开锁成功信息和关锁成功信息发送给通信模块;The calculation module is also used to obtain the successful unlocking information and the successful locking information of the mechanical control module, and send the successful unlocking information and successful locking information to the communication module;

所述通信模块还用于接收计算模块发送的开锁成功信息和关锁成功信息,将开锁成功信息、关锁成功信息及智能锁的身份标识LI D发送给智能电子钥匙。The communication module is also used to receive the successful unlocking information and successful locking information sent by the computing module, and send the successful unlocking information, successful locking information and the ID LID of the smart lock to the smart electronic key.

优选的,所述智能电子钥匙包括:Preferably, the smart electronic key includes:

存储模块,其用于存储关键数据,包括智能电子钥匙身份标识KI D、钥匙的内置密钥KK;A storage module, which is used to store key data, including the smart electronic key ID KID and the built-in key KK of the key;

对智能终端通信模块,其用于接收计算模块发送的第一加密信息并发送至智能终端,接收智能终端发送的验证码code、第三加密信息,将验证码code、第三加密信息发送给计算模块;For the smart terminal communication module, it is used to receive the first encrypted information sent by the computing module and send it to the smart terminal, receive the verification code code and the third encrypted information sent by the smart terminal, and send the verification code code and the third encrypted information to the computing module module;

计算模块,其用于实现数据解密,接收对智能终端通信模块发送的验证码code和第三加密信息,对第三加密信息进行解密,得到随机数R,将开锁指令、关锁指令、验证码code、随机数R和第三加密信息发送给对锁通信模块;还用于数据加密,接收对锁通信模块发送的智能锁的身份标识LI D,获取存储模块的智能电子钥匙身份标识KI D,将智能锁的身份信息LI D、智能电子钥匙身份信息KI D与开锁请求加密形成第一加密信息,将第一加密信息发送给对智能终端通信模块;接收对锁通信模块发送的开锁成功信息、关锁成功信息及智能锁的身份标识LI D,并发送给对智能终端通信模块;The calculation module is used to realize data decryption, receives the verification code code and the third encrypted information sent by the communication module of the intelligent terminal, decrypts the third encrypted information, obtains the random number R, and converts the unlocking instruction, the locking instruction, the verification code code, random number R and the third encrypted information are sent to the communication module for the lock; it is also used for data encryption, receiving the ID LID of the smart lock sent by the communication module for the lock, and obtaining the ID KID of the smart electronic key of the storage module, Encrypt the identity information LID of the smart lock, the identity information KID of the smart electronic key, and the unlocking request to form the first encrypted information, and send the first encrypted information to the communication module of the intelligent terminal; receive the unlocking success information sent by the communication module of the lock, Close the lock successfully information and the identity LID of the smart lock, and send it to the communication module of the smart terminal;

对锁通信模块,其用于获取计算模块发送的开锁指令、关锁指令、验证码code、随机数R和第三加密信息,将开锁指令、关锁指令、验证码code、随机数R和第三加密信息发送给智能锁;接收智能锁发送的开锁成功信息、关锁成功信息及智能锁身份标识LI D并发送给计算模块。The lock-to-lock communication module is used to obtain the unlocking instruction, the locking instruction, the verification code code, the random number R and the third encrypted information sent by the computing module, and the unlocking instruction, the locking instruction, the verification code code, the random number R and the third encryption information 3. Send the encrypted information to the smart lock; receive the unlocking success information, the locking success information and the smart lock ID LID sent by the smart lock and send them to the computing module.

或者,or,

所述智能电子钥匙还包括:The smart electronic key also includes:

电力供应模块,其用于为智能电子钥匙进行供电;A power supply module, which is used to supply power to the smart electronic key;

电力输出模块,其用于为智能锁提供电力供应;A power output module, which is used to provide power supply for the smart lock;

信号显示模块,其用于通过不同的光电信号表示当前的处理结果。The signal display module is used to represent the current processing result through different photoelectric signals.

本发明第二方面提供了一种智能锁管理系统的使用方法。The second aspect of the present invention provides a method for using an intelligent lock management system.

一种智能锁管理系统的使用方法,包括开锁方法,所述开锁方法包括以下步骤:A method for using an intelligent lock management system, including an unlocking method, the unlocking method comprising the following steps:

智能电子钥匙获取智能锁身份信息LI D,将智能锁的身份信息LI D、智能电子钥匙身份信息KI D与开锁请求加密形成第一加密信息,并发送给智能终端;The smart electronic key obtains the identity information LID of the smart lock, encrypts the identity information LID of the smart lock, the identity information KID of the smart electronic key, and the unlock request to form the first encrypted information, and sends it to the smart terminal;

智能终端接收智能电子钥匙发送的第一加密信息,将工作人员身份信息UI D和第一加密信息进行加密,形成第二加密信息,将第二加密信息发送给数据管理中心;The smart terminal receives the first encrypted information sent by the smart electronic key, encrypts the staff identity information UID and the first encrypted information to form the second encrypted information, and sends the second encrypted information to the data management center;

数据管理中心接收智能终端发送的第二加密信息,产生验证码code和随机数R,将验证码code发送至智能终端;基于验证码code和随机数R,得到智能电子钥匙密文c和智能锁数据完整性标签t,基于c和t得到第三加密信息,将第三加密信息发送至智能终端;The data management center receives the second encrypted information sent by the smart terminal, generates a verification code code and a random number R, and sends the verification code code to the smart terminal; based on the verification code code and random number R, the smart electronic key ciphertext c and the smart lock are obtained Data integrity label t, obtain the third encrypted information based on c and t, and send the third encrypted information to the smart terminal;

智能终端接收数据管理中心发送的验证码code和第三加密信息,将验证码code和第三加密信息发送给智能电子钥匙;The smart terminal receives the verification code code and the third encrypted information sent by the data management center, and sends the verification code code and the third encrypted information to the smart electronic key;

智能电子钥匙接收智能终端发送的验证码code和第三加密信息,对第三加密信息进行解密,得到随机数R,将验证码code、随机数R和第三加密信息发送给智能锁;The smart electronic key receives the verification code code and the third encrypted information sent by the smart terminal, decrypts the third encrypted information, obtains the random number R, and sends the verification code code, the random number R and the third encrypted information to the smart lock;

智能锁接收智能电子钥匙发送的验证码code、随机数R和第三加密信息,基于验证码code、随机数R和智能锁身份信息LI D对应的密钥LK,生成验证加密信息t,比较t和第三加密信息中的t,若两者相同,则执行开锁动作。The smart lock receives the verification code code, random number R and third encrypted information sent by the smart electronic key, and generates verification encrypted information t ' based on the verification code code, random number R and the key LK corresponding to the identity information LID of the smart lock. If t ' and t in the third encrypted information are the same, the unlocking action is performed.

优选的,还包括以下步骤:Preferably, the following steps are also included:

智能锁在开锁成功后将开锁成功信息智能锁身份信息LI D发送至智能电子钥匙;After the smart lock is successfully unlocked, the smart lock identity information LID of the successful unlocking information is sent to the smart electronic key;

智能电子钥匙接收智能锁发送的开锁成功信息、智能锁身份信息L I D,并将智能电子钥匙身份信息KI D、开锁成功信息、智能锁身份信息LI D发送至智能终端;The smart electronic key receives the unlocking success information and the smart lock identity information L I D sent by the smart lock, and sends the smart electronic key identity information KID, unlocking success information, and smart lock identity information L I D to the smart terminal;

智能终端接收智能电子钥匙发送的智能电子钥匙身份信息KI D、开锁成功信息、智能锁身份信息L I D,将工作人员身份信息U I D、智能电子钥匙身份信息KI D、开锁成功信息、智能锁身份信息L I D发送至数据管理中心;The smart terminal receives the smart electronic key identity information KID, unlocking success information, and smart lock identity information L I D sent by the smart electronic key, and sends the staff identity information U I D, smart electronic key identity information KID, unlocking success information, and smart lock identity information L I D sent to the data management center;

数据管理中心接收工作人员身份信息U I D、智能电子钥匙身份信息KI D、开锁成功信息、智能锁身份信息L I D,将数据管理中心当前时间T、工作人员身份信息U I D、智能电子钥匙身份信息KI D、开锁成功信息、智能锁身份信息L I D进行保存。The data management center receives the staff identity information U I D, the smart electronic key identity information KID, the unlock success information, and the smart lock identity information L I D, and sends the data management center the current time T, the staff identity information U I D, the smart electronic key identity information KID, The unlocking success information and the smart lock identity information L I D are saved.

优选的,还包括关锁方法,所述关锁方法,包括以下步骤:Preferably, a locking method is also included, and the locking method includes the following steps:

智能电子钥匙发送关锁指令至智能锁;The smart electronic key sends a lock command to the smart lock;

智能锁接收智能电子钥匙发送的关锁指令,执行关锁操作;The smart lock receives the lock command sent by the smart electronic key and executes the lock operation;

关锁完成后,智能锁检测关锁状态,将关锁成功信息、智能锁身份信息L I D发送至智能电子钥匙;After the lock is completed, the smart lock detects the lock status, and sends the lock success information and the smart lock identity information L I D to the smart electronic key;

智能电子钥匙接收智能锁发送的关锁成功信息、智能锁身份信息L I D,并将智能电子钥匙身份信息KI D、关锁成功信息、智能锁身份信息L I D发送至智能终端;The smart electronic key receives the successful closing information and the identity information L I D of the smart lock sent by the smart lock, and sends the identity information KID of the smart electronic key, the successful closing information, and the identity information L I D of the smart lock to the smart terminal;

智能终端接收智能电子钥匙发送的智能电子钥匙身份信息KI D、关锁成功信息、智能锁身份信息L I D,将工作人员身份信息U I D、智能电子钥匙身份信息KI D、开锁成功信息、关锁成功信息、智能锁身份信息LI D发送至数据管理中心;The smart terminal receives the smart electronic key identity information KID, successful locking information, and smart lock identity information L I D sent by the smart electronic key, and sends the staff identity information U I D, smart electronic key identity information KID, unlocking success information, and locking success information , The smart lock identity information LID is sent to the data management center;

数据管理中心接收工作人员身份信息U I D、智能电子钥匙身份信息KI D、关锁成功信息、智能锁身份信息L I D,将数据管理中心当前时间T、工作人员身份信息U I D、智能电子钥匙身份信息KI D、关锁成功信息、智能锁身份信息L I D进行保存;The data management center receives the staff identity information U I D, the smart electronic key identity information KID, the lock success information, and the smart lock identity information L I D, and sends the data management center the current time T, the staff identity information U I D, and the smart electronic key identity information KID , lock success information, smart lock identity information L I D to save;

或者,or,

工作人员通过外力将智能锁关闭,使智能锁内的锁闩恢复到原位;The staff closes the smart lock by external force, so that the latch inside the smart lock returns to its original position;

智能锁检测关锁状态,将关锁成功信息、智能锁身份信息L I D发送至智能电子钥匙。The smart lock detects the lock status, and sends the lock success information and the smart lock identity information L I D to the smart electronic key.

以上一个或多个技术方案存在以下有益效果:The above one or more technical solutions have the following beneficial effects:

一.本发明提供了一种智能锁管理系统及使用方法,智能锁与智能电子钥匙可以通过远程授权,对使用人员、智能电子钥匙和智能锁之间进行灵活匹配,在应急情况下非常方便;对开锁指令数据和开关锁状态数据进行完整性保护,可抵抗非法篡改和伪造,对随机数的使用,可抵抗数据重放攻击,提高了使用中得安全性;数据管理中心通过记录开锁和关锁的相关信息,能够掌握何时何人用哪把智能电子钥匙开启或关闭哪个智能锁,增加了使用过程的可控性、可追溯性。1. The present invention provides a smart lock management system and a method of use. The smart lock and the smart electronic key can be remotely authorized to flexibly match the user, the smart electronic key and the smart lock, which is very convenient in emergency situations; Integrity protection of unlock instruction data and switch lock status data can resist illegal tampering and forgery, and the use of random numbers can resist data replay attacks and improve the security in use; the data management center records the unlocking and closing The relevant information of the lock can know when and who uses which smart electronic key to open or close which smart lock, which increases the controllability and traceability of the use process.

二.本发明的智能电子钥匙具有如下特点:不同的用户可以使用同一把智能电子钥匙,但只能控制他们已经授权的那些智能锁;同一把智能电子钥匙可以控制多个智能锁;开锁时,需要授权的智能电子钥匙和智能手机,任何一个不匹配都不能完成开锁过程;每次开锁后,智能电子钥匙将智能锁的身份标识信息、智能电子钥匙的身份标识信息、开锁/关锁成功信号等信息通过绑定的智能手机发送到数据管理中心;数据管理中心通过记录开锁和关锁的相关信息,掌握何时何人用哪把智能电子钥匙开启或关闭哪个智能锁等信息。这些功能是传统的锁和指纹密码锁所不具有的。本发明所使用的关键技术是对开锁指令数据和开关锁状态数据完整性保护,可抵抗非法篡改和伪造;通过对随机数的使用,可抵抗数据重放攻击。Two. the intelligent electronic key of the present invention has the following characteristics: different users can use the same intelligent electronic key, but they can only control those intelligent locks they have authorized; the same intelligent electronic key can control multiple intelligent locks; when unlocking, The smart electronic key that needs to be authorized and the smart phone, if any one does not match, the unlocking process cannot be completed; after each unlock, the smart electronic key will send the identity information of the smart lock, the identity information of the smart electronic key, and the unlock/close success signal Such information is sent to the data management center through the bound smart phone; the data management center records the relevant information of unlocking and closing the lock to know when and who uses which smart electronic key to open or close which smart lock and other information. These functions are not available in traditional locks and fingerprint combination locks. The key technology used in the present invention is to protect the integrity of the unlocking command data and the switch lock state data, which can resist illegal tampering and forgery; through the use of random numbers, it can resist data replay attacks.

本发明附加方面的优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Advantages of additional aspects 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.

附图说明Description of drawings

构成本发明的一部分的说明书附图用来提供对本发明的进一步理解,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention, and the schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations to the present invention.

图1为智能锁的结构示意图。Fig. 1 is a schematic structural diagram of an intelligent lock.

图2为智能电子钥匙的结构示意图。Fig. 2 is a schematic structural diagram of an intelligent electronic key.

图3为智能锁管理系统的结构示意图。Fig. 3 is a schematic structural diagram of an intelligent lock management system.

具体实施方式Detailed ways

应该指出,以下详细说明都是示例性的,旨在对本发明提供进一步的说明。除非另有指明,本文使用的所有技术和科学术语具有与本发明所属技术领域的普通技术人员通常理解的相同含义。It should be noted that the following detailed description is exemplary and intended to provide further explanation of the present invention. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

需要注意的是,这里所使用的术语仅是为了描述具体实施方式,而非意图限制根据本发明的示例性实施方式。It should be noted that the terminology used here is only for describing specific embodiments, and is not intended to limit exemplary embodiments according to the present invention.

在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。In the case of no conflict, the embodiments and the features in the embodiments of the present invention can be combined with each other.

本发明的发明构思:Invention concept of the present invention:

本发明属于电子产品技术领域,涉及电子技术与前沿信息技术的结合,将现代密码学技术应用于电子芯片控制的智能锁的应用场景。对智能锁开锁时,首先需要智能电子钥匙向数据管理平台发送开锁请求,该请求是在智能电子钥匙与智能锁连接后,获取智能锁的身份标识,连同智能电子钥匙自己的身份标识,使用数据完整性保护措施,通过智能手机传输到后台数据管理中心的。The invention belongs to the technical field of electronic products, and relates to the combination of electronic technology and cutting-edge information technology, and the application scene of applying modern cryptography technology to an intelligent lock controlled by an electronic chip. When unlocking the smart lock, the smart electronic key first needs to send an unlock request to the data management platform. The request is to obtain the identity of the smart lock after the smart electronic key is connected to the smart lock, together with the identity of the smart electronic key itself, use the data Integrity protection measures are transmitted to the background data management center through the smartphone.

开锁指令由数据管理中心产生,绑定智能开锁钥匙和工作人员的手机号码,使用数据完整性保护措施,通过智能手机传送给智能电子钥匙,智能手机同时将其它信息传给电子钥匙;智能电子钥匙将开锁指令连同智能手机发送的其它数据一起传送给智能锁;智能锁收到数据并进行一定的计算和验证后,通过微型电机将一个细小的弹簧闩拉开,智能锁在弹簧力的作用下自动开启。The unlock command is generated by the data management center, which binds the smart unlock key and the mobile phone number of the staff, uses data integrity protection measures, and transmits it to the smart electronic key through the smart phone, and the smart phone transmits other information to the electronic key at the same time; the smart electronic key Send the unlock command together with other data sent by the smart phone to the smart lock; after the smart lock receives the data and performs certain calculations and verifications, it pulls a small spring latch through a micro motor, and the smart lock is under the action of the spring force. automatically turned on.

本发明能够解决以下问题:The present invention can solve the following problems:

(1)钥匙丢失问题。(1) The problem of key loss.

在日常生活中,经常发生钥匙丢失事件。对传统的金属锁,要允许多个工作人员都有权开锁,就需要配多把钥匙。但是,一旦一把钥匙丢失了,就面临锁被非法开启的安全风险。无论丢失的钥匙是放到某个地方想不起来了,还是掉落了,还是被别人盗取了,都意味着潜在的安全隐患。对安全要求比较高的锁控区域,发生钥匙丢失事件后一般需要更换锁芯,然后将钥匙分配给所有能开此锁的人员。锁芯很容易更换,但把钥匙分发到每个开锁人的手中可能就不是很方便。In daily life, key loss incidents often occur. For traditional metal locks, to allow multiple staff to have the right to unlock, multiple keys need to be allocated. However, once a key is lost, it faces the security risk of the lock being opened illegally. Whether a lost key is lost somewhere, dropped, or stolen, it represents a potential security risk. For lock control areas with relatively high safety requirements, the lock cylinder generally needs to be replaced after a key loss event occurs, and then the key is distributed to all personnel who can open the lock. Lock cylinders are easy to replace, but distributing the keys to each lock picker may not be very convenient.

本发明设计的锁系统就不存在这个问题。即使智能钥匙被他人拿走,在没有得到数据管理中心许可的情况下,也不能打开任何锁。因此,丢失智能电子钥匙不会带来严重的安全隐患。如果有人盗取了智能电子钥匙和工作人员的智能手机,没有工作人员密码也无法登录智能手机软件管理系统,无法与数据管理中心进行通信,得不到数据中心的授权,也无法使用智能电子钥匙,因此无法控制智能锁。The lock system designed by the present invention does not have this problem. Even if the smart key is taken away by others, no lock can be opened without the permission of the data management center. Therefore, the loss of the smart electronic key does not pose a serious security risk. If someone steals the smart electronic key and the smart phone of the staff, they cannot log in to the smart phone software management system without the staff password, cannot communicate with the data management center, cannot obtain authorization from the data center, and cannot use the smart electronic key , so the smart lock cannot be controlled.

(2)恶意旷工问题。(2) Malicious absenteeism.

如果使用传统的锁,很难考证工作人员是否到达工作现场。当然借助路边监控录像可以找到证据,但除非发生刑事事件,这种证据很难获得。因此,实际上无法确认工作人员是否达到工作现场开锁并进行相应的检查工作,也无法确保检查工作的质量,除非遇到紧急情况,如设备需要检修。With traditional locks, it is difficult to verify that workers have arrived at the job site. Of course, evidence can be found with the help of roadside surveillance video, but unless there is a criminal incident, this kind of evidence is difficult to obtain. Therefore, it is actually impossible to confirm whether the staff arrives at the work site to unlock and carry out corresponding inspection work, and it is also impossible to ensure the quality of the inspection work, unless there is an emergency, such as equipment that needs to be overhauled.

本发明非常方便的解决了员工旷工的监控问题。The invention very conveniently solves the monitoring problem of employee absenteeism.

(3)私自代工问题。(3) Private OEM problem.

对传统的锁来说,工作人员可以私自委托他人去开锁,完成检修工作后关锁,而不被企业管理人员发现。For traditional locks, the staff can entrust others to unlock the lock without permission, and close the lock after completing the maintenance work without being discovered by the enterprise management personnel.

但是,本发明设计的智能锁就很难发生这类代工事件,除非委托人将自己的智能手机也交给受委托人。在人们对智能手机的依赖日益严重的今天,这种情况不太可能发生。如果受委托人使用自己的手机,登录委托人在数据管理中心的账号,委托人在收到短信验证码时告诉受委托人,则仍然可以私自代工。这一问题可以通过管理手段来限制,也可以进一步通过短信与手机终端APP的互动从技术上实现,即短信验证码自动转给手机APP,无须手工输入。在一般应用中,对这种技术的需求并不强烈。However, it is difficult for the smart lock designed by the present invention to produce this kind of foundry event, unless the client also gives his smart phone to the client. That's unlikely to happen in today's age of increasing reliance on smartphones. If the client uses his own mobile phone to log in to the account of the client in the data management center, and the client tells the client when he receives the SMS verification code, he can still do the contract privately. This problem can be limited by means of management, and it can also be technically realized through the interaction between SMS and mobile terminal APP, that is, the SMS verification code is automatically transferred to the mobile APP without manual input. In general applications, the need for this technique is not strong.

(4)谎报工作量问题。(4) Misreporting the workload problem.

在使用传统锁的情况下,工作人员可能工作了很短时间,但谎称更长的时间。管理人员无法知道工作人员开锁后实际工作了多长时间。In the case of traditional locks, workers may have worked for short periods of time but falsely claimed to have longer periods of time. Managers have no way of knowing how long workers have actually been working since unlocking.

本发明的系统可以解决这个问题,因为开锁时间和关锁时间都需要连接数据管理中心,这样,数据管理中心清楚记录了工作时长。工作过程中通过手机终端APP进行拍照或者视频取证,也能够保证工作质量。但是不排除恶意串改视频或者照片的问题,工作人员的具体工作质量,不是本系统关注的重点。取证信息可以作为事故发生追责溯源的辅助手段。The system of the present invention can solve this problem, because both the unlocking time and the closing time need to be connected to the data management center, so that the data management center clearly records the working hours. During the work process, taking pictures or video forensics through the mobile terminal APP can also ensure the quality of work. However, the problem of maliciously altering videos or photos cannot be ruled out. The specific work quality of the staff is not the focus of this system. Forensic information can be used as an auxiliary means to trace the source of the accident.

(5)应急调配问题。(5) Emergency allocation problem.

在实际工作中,经常遇到这样的情况:某人X负责的某个设备需要紧急检修,但X因故不能在短时间内到达,而附近的人员Y不掌握X的钥匙。这就需要Y首先到钥匙管理部门领取钥匙后才能代替X工作。这种情况显然不利于处理紧急情况。In actual work, such a situation is often encountered: a certain equipment in charge of a person X needs emergency maintenance, but X cannot arrive in a short time for some reason, and the nearby person Y does not have the key of X. This requires that Y first go to the key management department to collect the key before he can work instead of X. This situation is obviously not conducive to dealing with emergencies.

本发明的系统不存在这个问题。管理部门在派遣Y代替X进行检修工作时,就授权Y使用Y所携带的智能电子钥匙对某个智能锁的开启权限。这种灵活设置可以高效率解决应急调配问题。这种应急权限可以是临时的,一次授权或多次授权都可以灵活掌握。The system of the present invention does not have this problem. When the management department dispatches Y to replace X for maintenance work, it authorizes Y to use the smart electronic key carried by Y to open a certain smart lock. This flexible setting can efficiently solve the emergency allocation problem. This kind of emergency authority can be temporary, and one-time authorization or multiple authorizations can be flexibly controlled.

(6)更换锁的问题。(6) The problem of changing the lock.

传统的锁如果更换了锁体或锁芯,也需要更换对应的钥匙。本发明的智能锁系统不存在这个问题。工作人员无须知道锁是否被更换,因为开启任何智能锁的过程都是一样的。If the traditional lock body or lock cylinder is replaced, the corresponding key also needs to be replaced. This problem does not exist in the intelligent lock system of the present invention. Workers don't have to know if the lock has been replaced, as the process for opening any smart lock is the same.

(7)钥匙与锁的匹配问题。(7) The matching problem between the key and the lock.

如果一个工作人员需要开启多个锁,按照传统金属锁的工作方式,工作人员需要携带一串钥匙,而且每次开锁时需要寻找匹配的钥匙。钥匙数量越多,寻找匹配的钥匙就可能越麻烦,特别当钥匙形状都相同时更是如此。If a worker needs to open multiple locks, according to the working method of traditional metal locks, the worker needs to carry a bunch of keys, and needs to find a matching key every time he unlocks. The greater the number of keys, the more difficult it can be to find a matching key, especially if the keys are all the same shape.

本发明中的智能锁不存在这个问题。无论有多少个智能锁,也无论某个智能锁可以被多少把智能电子钥匙开启,用智能电子钥匙开启智能锁的过程都是完全一样的。这个性质非常适合有较大数量锁和较大数量开锁人员的行业应用业务需求。This problem does not exist in the intelligent lock among the present invention. No matter how many smart locks there are, and no matter how many smart electronic keys a certain smart lock can be opened, the process of opening a smart lock with a smart electronic key is exactly the same. This property is very suitable for industrial application business needs with a large number of locks and a large number of unlockers.

(8)指纹锁更换指纹或密码问题。(8) Fingerprint lock replacement fingerprint or password problem.

指纹密码锁相对传统的金属锁有许多优势,但仍存在不少问题。例如,消除某个特定指纹的操作需要一定的技巧,而且不一定能及时;消除某个密码口令则可能会导致使用该口令的所有用户都失去开锁能力。同时指纹锁需要配备电池,不利于恶劣户外环境下的长期使用。Fingerprint combination locks have many advantages over traditional metal locks, but there are still many problems. For example, the operation of erasing a specific fingerprint requires certain skills and may not be timely; erasing a certain password may cause all users using the password to lose the ability to unlock. At the same time, fingerprint locks need to be equipped with batteries, which is not conducive to long-term use in harsh outdoor environments.

本发明中的智能锁不存在这个问题。每次开锁的过程都是一个用户身份(基于注册的手机号码)、智能锁的身份标识(数据管理中心可以验证该工作人员的业务是否需要开启该智能锁)、智能电子钥匙(数据管理中心可以验证该用户是否携带该智能电子钥匙)绑定,并且得到数据管理中心授权后才能开锁。该开锁授权是一次性的,关锁后不能再此开启,除非重新经过一遍开锁流程。This problem does not exist in the intelligent lock among the present invention. Each unlocking process is a user identity (based on the registered mobile phone number), the identity of the smart lock (the data management center can verify whether the staff’s business needs to open the smart lock), an intelligent electronic key (the data management center can Verify whether the user carries the smart electronic key) binding, and can only unlock after being authorized by the data management center. The unlock authorization is one-time, and it cannot be opened again after the lock is closed, unless the unlocking process is performed again.

实施例一Embodiment one

本实施例公开了一种智能锁管理系统。This embodiment discloses an intelligent lock management system.

如图1-3所示,本发明设计了一种由电子芯片控制机械锁体构成的智能锁,以及网络管理的智能电子钥匙。As shown in Figures 1-3, the present invention designs a smart lock composed of an electronic chip-controlled mechanical lock body and a smart electronic key managed by a network.

(一)智能锁(1) Smart lock

智能锁的构成包括计算模块、存储模块、通信模块、机械控制模块、机械锁体等。计算模块是一个小型处理器,通过计算验证开锁或关锁指令是否合法;存储模块存储相关的数据,包括智能锁体的身份标识L I D、智能锁的内置密钥(一个秘密信息)LK、开锁和关锁记录数据等;通信模块是与智能电子钥匙的通信接口,是一种物理接口,有时还兼有给锁体的供电功能;机械控制模块在于控制一个微型电机,在收到开锁指令时,控制电机转动,带动一个类似于锁闩的金属条,使得智能锁在弹簧作用下打开;在收到关锁指令时电机转动,能够在外力作用下关锁,锁闩金属条自动复位;机械锁体部分根据不同类型的应用需求可以千差万别,但其根本原理是锁闩对锁舌弹出的阻碍作用。移除锁闩的阻碍,就是开锁;锁闩恢复对锁舌的阻碍,就是关锁。The composition of the smart lock includes a computing module, a storage module, a communication module, a mechanical control module, and a mechanical lock body. The computing module is a small processor, which verifies whether the instruction of unlocking or closing the lock is legal through calculation; the storage module stores relevant data, including the identity mark L I D of the smart lock body, the built-in key (a secret information) LK of the smart lock, the unlocking and The lock records data, etc.; the communication module is the communication interface with the smart electronic key, which is a physical interface, and sometimes also has the power supply function for the lock body; the mechanical control module is to control a micro motor. When receiving the unlock command, Control the rotation of the motor to drive a metal bar similar to a latch, so that the smart lock is opened under the action of a spring; when the lock command is received, the motor rotates, and the lock can be closed under the action of an external force, and the metal bar of the latch automatically resets; the mechanical lock The body part can vary greatly according to different types of application requirements, but the basic principle is the blocking effect of the latch on the ejection of the deadbolt. To remove the obstruction of the bolt is to open the lock; to restore the obstruction of the bolt to the bolt is to close the lock.

本发明所公开的是一种由电子芯片控制机械锁体构成的智能锁,包括如下组成部分:Disclosed in the present invention is an intelligent lock composed of an electronic chip controlling a mechanical lock body, which includes the following components:

1)计算模块,用于执行数据完整性保护算法MAC,以及其它简单运算和判断;1) Calculation module, used to execute data integrity protection algorithm MAC, and other simple operations and judgments;

2)存储模块,用于存储关键数据,包括锁的身份标识L I D,锁与数据管理中心之间共享的数据加密密钥LK;2) storage module, used to store key data, including the identity mark L I D of the lock, and the data encryption key LK shared between the lock and the data management center;

3)通信模块,用于连接所述智能锁的智能电子钥匙;3) a communication module, used to connect the smart electronic key of the smart lock;

4)机械控制模块,在计算模块发送的控制指令下,通过微型电机拉开锁闩。4) The mechanical control module pulls the latch through the micro motor under the control command sent by the computing module.

智能锁的开锁过程包括如下步骤:The unlocking process of the smart lock includes the following steps:

1)将所述智能锁与一个智能电子钥匙连接;1) Connect the smart lock with a smart electronic key;

2)所述通信模块接收到与所述智能锁连接的智能电子钥匙发送的开锁指令,将此指令数据传输给所述计算模块;2) The communication module receives the unlock instruction sent by the smart electronic key connected to the smart lock, and transmits the instruction data to the calculation module;

3)所述计算模块根据数据格式进行计算,包括数据完整性保护算法和数据比对判断。若数据验证正确无误,则所述计算模块将开锁指令发送到所述机械控制模块;3) The calculation module performs calculation according to the data format, including data integrity protection algorithm and data comparison judgment. If the data verification is correct, the calculation module sends an unlock command to the mechanical control module;

4)所述机械控制模块收到步骤2)的开锁指令后,启动所述微型电机拉开锁闩,并将执行结果反馈给所述计算模块;4) After the mechanical control module receives the unlock instruction in step 2), it starts the micro motor to pull the latch, and feeds back the execution result to the calculation module;

5)所述计算模块将开锁成功信息连同所述智能锁的身份标识L I D通过所述通信模块发送给所述智能电子钥匙。5) The computing module sends the successful unlocking information together with the ID of the smart lock L ID to the smart electronic key through the communication module.

本发明所公开的智能锁的构成示意图如图1所示。The composition diagram of the smart lock disclosed by the present invention is shown in FIG. 1 .

本发明所公开的智能锁所的关锁过程包括如下步骤:The locking process of the smart lock disclosed by the present invention includes the following steps:

1)将所述智能锁与一个智能电子钥匙连接;1) Connect the smart lock with a smart electronic key;

2)通过外力作用将锁舌插入锁体,在弹簧作用下锁闩恢复原位;2) The bolt is inserted into the lock body by external force, and the bolt returns to its original position under the action of the spring;

3)所述计算模块探测到关锁成功信号后,将执行结果连同所述智能锁的身份标识LI D通过所述通信模块发送给与所述智能锁连接的智能电子钥匙。3) After the calculation module detects the lock-closing success signal, it sends the execution result together with the identity LID of the smart lock to the smart electronic key connected to the smart lock through the communication module.

或者包括如下步骤:Or include the following steps:

1)将所述智能锁与一个智能电子钥匙连接;1) Connect the smart lock with a smart electronic key;

2)通过外力作用将锁舌插入锁体;2) Insert the lock tongue into the lock body by external force;

3)所述智能电子钥匙向所述智能锁发送关锁指令;3) The smart electronic key sends a lock instruction to the smart lock;

4)所述计算模块将关锁指令传给所述机械控制模块;4) The calculation module transmits the locking instruction to the mechanical control module;

5)所述机械控制模块启动所述微型电机将锁闩推回原位;5) The mechanical control module starts the micro motor to push the latch back to its original position;

6)所述计算模块探测到关锁成功信号后,将执行结果连同所述智能锁的身份标识LI D通过所述通信模块发送给与所述智能锁连接的智能电子钥匙。6) After the calculation module detects the lock-closing success signal, it sends the execution result together with the identity LID of the smart lock to the smart electronic key connected to the smart lock through the communication module.

(二)智能电子钥匙(2) Smart electronic key

本发明设计的智能电子钥匙是一个具有如下功能的电子设备:(1)与智能锁的通信,包括向智能锁发送数据、接收数据,通过物理接口或无线接口完成;(2)与智能手机的通信,包括发送数据和接收数据,通过无线(如蓝牙、WI FI)连接来实现;(3)数据加密算法E和解密算法D;(4)对数据来源的身份鉴别,避免伪造数据。The smart electronic key designed by the present invention is an electronic device with the following functions: (1) communication with the smart lock, including sending and receiving data to the smart lock, and completing through a physical interface or a wireless interface; (2) communication with the smart phone Communication, including sending data and receiving data, is realized through wireless (such as Bluetooth, WI FI) connection; (3) data encryption algorithm E and decryption algorithm D; (4) identification of data sources to avoid forged data.

为此,智能电子钥匙的物理组成包括如下部分:(1)计算模块,即微处理器,能实现数据加密与数据解密;(2)存储模块,存储关键数据,包括钥匙自身的身份标识KI D、钥匙的内置密钥KK、数据管理中心的地址等;(3)通信模块,包括与智能锁之间的通信接口和与智能手机之间的无线通信;(4)电力供应模块,使用可充电电池供电;(5)电力输出模块,在必要的情况下,为智能锁的内部处理器提供电力;(6)信号显示模块,通过不同的光电信号,表示不同处理的结果,例如成功,或失败,或进行中。For this reason, the physical composition of the smart electronic key includes the following parts: (1) computing module, that is, a microprocessor, which can realize data encryption and data decryption; (2) storage module, which stores key data, including the identity of the key itself KID , the built-in key KK of the key, the address of the data management center, etc.; (3) the communication module, including the communication interface with the smart lock and the wireless communication with the smart phone; (4) the power supply module, which uses a rechargeable Battery power supply; (5) Power output module, if necessary, provides power for the internal processor of the smart lock; (6) Signal display module, through different photoelectric signals, indicating different processing results, such as success or failure , or in progress.

本发明所公开的智能电子钥匙,包括如下组成部分:The intelligent electronic key disclosed by the present invention includes the following components:

1)计算模块,用于执行加密算法E和解密算法D,以及其它简单运算和判断;1) Calculation module, used to execute encryption algorithm E and decryption algorithm D, and other simple calculations and judgments;

2)存储模块,用于存储关键数据,包括所述智能电子钥匙的身份标识KI D,所述智能电子钥匙与数据管理中心之间共享的数据加密密钥KK;2) a storage module, used to store key data, including the identity KID of the smart electronic key, and the data encryption key KK shared between the smart electronic key and the data management center;

3)对锁通信模块,用于连接智能锁,通过物理接口向智能锁发送指令,接收智能锁发送的数据;3) The lock communication module is used to connect the smart lock, send instructions to the smart lock through the physical interface, and receive the data sent by the smart lock;

4)对手机通信模块,用于连接工作人员的智能手机,通过手机连接后台数据管理中心,从而发送和接收数据;4) The mobile phone communication module is used to connect the smart phones of the staff, and connect to the background data management center through the mobile phone, so as to send and receive data;

5)电力输入模块,用于为所述智能电子钥匙充电;5) a power input module, used to charge the smart electronic key;

6)电力输出模块,为与其物理连接的智能锁提供电力供应。6) The power output module provides power supply for the smart lock physically connected with it.

本发明所公开的智能电子钥匙的构成示意图如图2所示。The composition diagram of the smart electronic key disclosed by the present invention is shown in FIG. 2 .

本发明所公开的智能电子钥匙,在开锁过程中执行如下步骤:The intelligent electronic key disclosed by the present invention performs the following steps in the unlocking process:

1)通过物理通信接口向与其连接的智能锁发送通信请求,智能锁回复自己的身份标识L I D;1) Send a communication request to the smart lock connected to it through the physical communication interface, and the smart lock replies with its own identity L ID;

2)所述智能电子钥匙接收到与之连接的智能锁的身份标识L I D后,将开锁指令CMD,智能锁身份标识L I D,和所述智能电子钥匙的身份标识KI D发送给与所述智能电子钥匙连接的智能手机,由所述智能手机转发给数据管理中心。2) After the smart electronic key receives the identity mark L I D of the smart lock connected to it, it sends the unlock command CMD, the identity mark L I D of the smart lock, and the identity mark KID of the smart electronic key to the smart electronic key. The smart phone connected with the key is forwarded to the data management center by the smart phone.

本发明所公开的智能电子钥匙在关锁过程中执行如下步骤:The intelligent electronic key disclosed by the present invention performs the following steps in the process of locking:

1)从所述对锁的通信模块接收到所述智能锁的关锁成功消息(L I D,LOCKED);1) Receive the lock success message (L I D, LOCKED) of the smart lock from the communication module of the lock;

2)将(L I D,LOCKED)通过所述用户手机发送给所述数据管理中心。2) Send (L I D, LOCKED) to the data management center through the user's mobile phone.

或执行如下步骤:Or perform the following steps:

1)所述智能电子钥匙向与其连接的智能锁发送关锁指令;1) The smart electronic key sends a lock command to the smart lock connected to it;

2)所述智能锁成果关锁后,将消息(LI D,LOCKED)发送给所述智能电子钥匙;2) After the smart lock function is locked, send a message (LID, LOCKED) to the smart electronic key;

3)所述智能电子钥匙将(LI D,LOCKED)通过与其连接的所述智能手机,由所述智能手机转发给所述数据管理中心,其中LI D是所述智能锁身份标识,LOCKED是锁成功关闭的特殊标识。3) The smart electronic key forwards (LID, LOCKED) to the data management center through the smart phone connected to it, where L D is the identity of the smart lock, and LOCKED is the lock A special flag for a successful shutdown.

(三)智能锁管理系统(3) Intelligent lock management system

本发明的设备不是独立使用的设备,而是一个应用系统。该应用系统包括数据管理中心、智能锁、智能电子钥匙、工作人员的智能手机。The device of the present invention is not an independently used device, but an application system. The application system includes a data management center, smart locks, smart electronic keys, and smart phones of staff.

一种智能锁管理系统,包括智能锁、智能电子钥匙、智能终端和数据管理中心,其中:An intelligent lock management system, including an intelligent lock, an intelligent electronic key, an intelligent terminal and a data management center, wherein:

智能锁,其用于与智能电子钥匙进行通讯连接,将自身的身份信息LI D发送给智能电子钥匙;接收智能电子钥匙发送的验证码code、随机数R和第三加密信息,基于验证码code、随机数R和智能锁身份信息LI D对应的密钥LK,生成验证加密信息t,比较t和第三加密信息中的t,若两者相同,则执行开锁动作;Smart lock, which is used to communicate with the smart electronic key, and send its own identity information LID to the smart electronic key; receive the verification code code, random number R and third encrypted information sent by the smart electronic key, based on the verification code code 1. Random number R and the key LK corresponding to the identity information LID of the smart lock, generate verification encrypted information t ' , compare t ' with t in the third encrypted information, and if the two are the same, perform the unlocking action;

智能电子钥匙,其用于与智能锁进行通讯连接,获取智能锁的身份信息LI D,将智能锁的身份信息LI D、智能电子钥匙身份信息KI D与开锁请求加密形成第一加密信息,将第一加密信息发送给智能终端;还用于接收智能终端发送的验证码code和第三加密信息,对第三加密信息进行解密,得到随机数R,将验证码code、随机数R和第三加密信息发送给智能锁;The smart electronic key is used to communicate with the smart lock, obtain the identity information LID of the smart lock, and encrypt the identity information LID of the smart lock, the identity information KID of the smart electronic key and the unlocking request to form the first encrypted information. The first encrypted information is sent to the smart terminal; it is also used to receive the verification code code and the third encrypted information sent by the smart terminal, decrypt the third encrypted information, obtain the random number R, and combine the verification code code, the random number R and the third The encrypted information is sent to the smart lock;

智能终端,其用于接收智能电子钥匙发送的第一加密信息,将工作人员身份信息UI D和第一加密信息进行加密,形成第二加密信息,将第二加密信息发送给数据管理中心;还用于接收数据管理中心发送的验证码code和第三加密信息,将验证码code和第三加密信息发送给智能电子钥匙;An intelligent terminal, which is used to receive the first encrypted information sent by the smart electronic key, encrypt the staff identity information UID and the first encrypted information to form the second encrypted information, and send the second encrypted information to the data management center; It is used to receive the verification code code and the third encrypted information sent by the data management center, and send the verification code code and the third encrypted information to the smart electronic key;

数据管理中心,其用于接收智能终端发送的第二加密信息,产生验证码code和随机数R,将验证码code发送至智能终端;基于验证码code和随机数R,得到智能电子钥匙密文c和智能锁数据完整性标签t,基于c和t得到第三加密信息,将第三加密信息发送至智能终端。The data management center is used to receive the second encrypted information sent by the smart terminal, generate a verification code code and a random number R, and send the verification code code to the smart terminal; based on the verification code code and the random number R, obtain the smart electronic key ciphertext c and the smart lock data integrity tag t, obtain the third encrypted information based on c and t, and send the third encrypted information to the smart terminal.

进一步的,所述数据管理中心用KI D对应的密钥KK加密随机数R,得到密文c;编辑开锁指令OPEN,对验证码code、随机数R、开锁指令OPEN和L I D对应的密钥LK进行加密得到数据完整性标签t。Further, the data management center encrypts the random number R with the key KK corresponding to the KID to obtain the ciphertext c; edits the unlock command OPEN, and performs the verification code, the random number R, the unlock command OPEN and the key LK corresponding to the L I D Encrypt to get the data integrity label t.

进一步的,所述数据管理中心还用于,基于工作人员、智能电子钥匙和智能锁对应关系的数据库,判断接收到的第二加密信息中的工作人员是否持有智能电子钥匙KI D,判断智能电子钥匙KI D是否有权限开启智能锁L I D。Further, the data management center is also used for judging whether the staff in the received second encrypted information holds the smart electronic key KID based on the database of the corresponding relationship between the staff, the smart electronic key and the smart lock, and judging whether the smart key Whether the electronic key KI D has the authority to open the smart lock L I D.

进一步的,further,

所述智能电子钥匙还用于发送关锁指令至智能锁;The smart electronic key is also used to send a lock command to the smart lock;

所述智能锁还用于接收智能电子钥匙发送的关锁指令,执行关锁操作;The smart lock is also used to receive the lock command sent by the smart electronic key, and execute the lock operation;

或者,or,

所述智能锁还用于检测关锁状态或开锁状态,在开锁成功后和关锁成功后将开锁成功信息、关锁成功信息、智能锁身份信息L I D发送至智能电子钥匙;Described intelligent lock is also used for detecting lock-off state or unlock state, after unlocking success and closing lock successfully, unlock success information, lock success information, intelligent lock identity information L I D are sent to intelligent electronic key;

所述智能电子钥匙还用于接收智能锁发送的开锁成功信息、关锁成功信息、智能锁身份信息L I D,并将智能电子钥匙身份信息KI D、开锁成功信息、关锁成功信息、智能锁身份信息L I D发送至智能终端;The smart electronic key is also used to receive the unlocking success information, lock closing success information, and smart lock identity information L I D sent by the smart lock, and send the smart electronic key identity information KID, unlocking success information, lock closing success information, and smart lock identity information. The information L I D is sent to the smart terminal;

所述智能终端还用于接收智能电子钥匙发送的智能电子钥匙身份信息KI D、开锁成功信息、关锁成功信息、智能锁身份信息L I D,将工作人员身份信息U I D、智能电子钥匙身份信息K I D、开锁成功信息、关锁成功信息、智能锁身份信息L I D发送至数据管理中心;The smart terminal is also used to receive the smart electronic key identity information KID, unlock success information, lock success information, and smart lock identity information LID sent by the smart electronic key, and store the staff identity information UID, smart electronic key identity information KID, The unlocking success information, the locking success information, and the smart lock identity information L I D are sent to the data management center;

所述数据管理中心还用于接收工作人员身份信息U I D、智能电子钥匙身份信息KI D、开锁成功信息、关锁成功信息、智能锁身份信息L I D,将数据管理中心当前时间T、工作人员身份信息U I D、智能电子钥匙身份信息KI D、开锁成功信息、关锁成功信息、智能锁身份信息L I D进行保存。The data management center is also used to receive staff identity information U I D, intelligent electronic key identity information KID, unlock success information, lock success information, smart lock identity information L I D, and transfer the data management center current time T, staff identity information The U I D, the smart electronic key identity information KID, the unlock success information, the lock success information, and the smart lock identity information L I D are saved.

使用时,工作人员的智能手机与智能电子钥匙进行无线连接,智能电子钥匙连接智能锁,获取智能锁的身份信息,然后将相关数据发送给工作人员的智能手机,工作人员的智能手机将相关数据发送到数据管理中心。由于工作人员的智能手机与智能电子钥匙的关联关系是在数据管理中心授权绑定的,因此智能电子钥匙不能独立工作;数据管理中心根据这些信息发送开锁指令;智能电子钥匙接收到开锁指令后,将指令通过工作人员的智能手机发送给智能电子钥匙,由智能电子钥匙将数据发送给智能锁;智能锁接收到指令后,进行一定的计算,判断指令是否正确,然后开锁。When in use, the staff's smart phone is wirelessly connected to the smart electronic key, the smart electronic key is connected to the smart lock, and the identity information of the smart lock is obtained, and then the relevant data is sent to the staff's smart phone, and the staff's smart phone sends the relevant data sent to the data management center. Since the relationship between the staff's smart phone and the smart electronic key is authorized and bound by the data management center, the smart electronic key cannot work independently; the data management center sends an unlock command based on this information; after the smart electronic key receives the unlock command, The instruction is sent to the smart electronic key through the staff's smart phone, and the smart electronic key sends the data to the smart lock; after receiving the instruction, the smart lock performs certain calculations to determine whether the instruction is correct, and then unlocks.

实施例二Embodiment two

本实施例公开了一种智能锁管理系统的使用方法。This embodiment discloses a method for using an intelligent lock management system.

本发明所公开的智能锁系统包括一个智能锁,一个智能电子钥匙,一个与智能电子钥匙连接的用户智能手机,并且在开锁过程中执行如下步骤:The intelligent lock system disclosed in the present invention includes an intelligent lock, an intelligent electronic key, and a user's smart phone connected with the intelligent electronic key, and performs the following steps during the unlocking process:

1)工作人员将所述智能电子钥匙与所述智能锁进行通信连接;1) The staff communicates and connects the smart electronic key to the smart lock;

2)所述智能电子钥匙询问所述智能锁的身份标识,所述智能锁反馈其身份信息LI D给所述智能电子钥匙;2) The smart electronic key inquires about the identity of the smart lock, and the smart lock feeds back its identity information LID to the smart electronic key;

3)所述智能电子钥匙将如下信息发送给所述智能手机:(CMD,L I D,KI D),其中CMD是开锁请求;所述智能手机将如下信息发送给数据管理中心:(U I D,CMD,L I D,KID),其中U I D是所述工作人员的身份标识,可以是工作人员在数据管理中心的账号;3) The smart electronic key sends the following information to the smart phone: (CMD, L I D, KID), wherein CMD is a request for unlocking; the smart phone sends the following information to the data management center: (U I D, CMD, L I D, KID), wherein U I D is the identity of the staff member, which can be the account number of the staff member in the data management center;

4)所述数据管理中心收到步骤3)的数据后执行如下步骤:4) The data management center performs the following steps after receiving the data in step 3):

a)根据U I D检查用户是否持有智能电子钥匙KI D,是否有权限开启智能锁L ID。如果验证不通过,则根据提示错误;否则继续执行。a) According to the U ID, check whether the user holds the smart electronic key KID, and whether the user has the authority to open the smart lock L ID. If the verification is not passed, it will make an error according to the prompt; otherwise, continue to execute.

b)查看所述工作人员的手机号码,随机产生一个验证码code,将所述验证码发送到所述工作人员的手机号码;b) check the mobile phone number of the staff member, randomly generate a verification code code, and send the verification code to the mobile phone number of the staff member;

c)产生一个随机数R,使用KI D对应的密钥KK加密R,得到密文c=E(KK,R);c) Generate a random number R, use the key KK corresponding to KID to encrypt R, and obtain the ciphertext c=E(KK, R);

d)编辑开锁指令OPEN,使用L I D对应的密钥LK计算数据完整性标签t=MAC(LK,OPEN,code,R),其中OPEN是开锁指令;d) Edit the unlock command OPEN, use the key LK corresponding to LID to calculate the data integrity label t=MAC(LK, OPEN, code, R), where OPEN is the unlock command;

e)将加密结果(OPEN,c,t)发送到所述工作人员的智能手机;e) send the encrypted result (OPEN,c,t) to said worker's smartphone;

5)所述工作人员的智能手机收到上述数据(OPEN,c,t)后,应用软件提示用户输入验证码,输入验证码code后,所述智能手机将(OPEN,c,t,code)发送给所述智能电子钥匙;5) After the staff's smart phone receives the above data (OPEN, c, t), the application software prompts the user to input the verification code, and after inputting the verification code code, the smart phone will (OPEN, c, t, code) sent to the smart electronic key;

6)所述智能电子钥匙使用内置密钥KK解密c得到R,将(OPEN,code,R,t)发送给所述智能锁;6) The smart electronic key uses the built-in key KK to decrypt c to obtain R, and sends (OPEN, code, R, t) to the smart lock;

7)所述智能锁收到步骤6)的数据后,使用内置密钥LK计算t'=MAC(LK,OPEN,code,R),验证等式t'=t是否成立。若验证通过,则启动微型电机进行开锁;7) After the smart lock receives the data in step 6), it uses the built-in key LK to calculate t'=MAC(LK,OPEN,code,R), and verifies whether the equation t'=t is established. If the verification is passed, start the micro motor to unlock;

8)所述智能锁成功开锁后,向所述智能电子钥匙发送数据(L I D,UNLOCKED)表示开锁成功。智能电子钥匙将数据(L I D,KI D,UNLOCKED)发送到所述工作人员的智能手机,所述工作人员的智能手机将数据转发给所述数据管理中心。8) After the smart lock is successfully unlocked, send data (L I D, UNLOCKED) to the smart electronic key to indicate successful unlocking. The smart electronic key sends data (L I D, KID, UNLOCKED) to the smart phone of the staff member, and the smart phone of the staff member forwards the data to the data management center.

9)所述数据管理中心收到步骤8)的数据后,记录U I D,L I D,KI D,T,UNLOCKED等数据,其中T是所述数据管理中心的当前时间。9) After the data management center receives the data in step 8), it records data such as U ID, L ID, KID, T, UNLOCKED, etc., wherein T is the current time of the data management center.

本发明所公开的智能锁系统的关锁过程包括如下步骤:The locking process of the intelligent lock system disclosed in the present invention includes the following steps:

1)工作人员通过外力将所述智能锁关闭,使所述智能锁内的锁闩恢复到原位;1) The staff closes the smart lock by external force, so that the latch in the smart lock returns to its original position;

2)所述智能锁向所述智能电子钥匙发送数据L I D,LOCKED;2) The smart lock sends data L I D, LOCKED to the smart electronic key;

3)所述智能电子钥匙向所述智能手机发送数据(L I D,KI D,LOCKED);3) The smart electronic key sends data (L I D, KID, LOCKED) to the smart phone;

4)所述智能手机将数据(U I D,L I D,KI D,LOCKED)发送到所述数据管理中心;4) The smart phone sends data (UID, LID, KID, LOCKED) to the data management center;

5)所述数据管理中心记录数据U I D,L I D,KI D,T,LOCKED,其中T是所述数据管理中心的当前时间。5) The data management center records data U I D, L I D, KID, T, LOCKED, wherein T is the current time of the data management center.

或如下步骤:or the following steps:

1)工作人员将所述智能电子钥匙与所述智能锁进行连接;1) The staff connects the smart electronic key with the smart lock;

2)所述智能电子钥匙向所述智能锁发送关锁指令LOCK;2) The smart electronic key sends a lock command LOCK to the smart lock;

3)通过外力将所述智能锁关闭;3) closing the smart lock by external force;

4)所述智能锁内的所述机械控制模块收到步骤2)中的关锁指令LOCK后,启动所述微型电机,将所述锁闩推回原位;4) After the mechanical control module in the smart lock receives the lock command LOCK in step 2), it starts the micro motor and pushes the latch back to its original position;

5)所述智能锁向所述智能电子钥匙发送数据(LI D,LOCKED);5) The smart lock sends data (LID, LOCKED) to the smart electronic key;

6)所述智能电子钥匙向所述智能手机发送数据(LI D,KI D,LOCKED);6) The smart electronic key sends data (LID, KID, LOCKED) to the smart phone;

7)所述智能手机将数据(UI D,LI D,KI D,LOCKED)发送到所述数据管理中心;7) The smart phone sends data (UI D, L D, KID, LOCKED) to the data management center;

8)所述数据管理中心记录数据UI D,LI D,KI D,T,LOCKED,其中T是所述数据管理中心的当前时间。8) The data management center records data UI D, LI D, KID, T, LOCKED, where T is the current time of the data management center.

虽然本发明的智能锁和智能电子钥匙有许多优越性,开锁过程除了需要用户将智能电子钥匙与智能锁的物理接口进行连接,输入验证码外,不需要更多操作,所有开锁流程由智能电子钥匙和工作人员的智能手机之间,以及智能手机和数据管理中心之间交互完成。根据网络质量,开锁过程可能需要等待一两秒甚至更长时间,但不影响一般业务应用。Although the smart lock and the smart electronic key of the present invention have many advantages, the unlocking process requires the user to connect the smart electronic key with the physical interface of the smart lock and input a verification code, and no more operations are required. All the unlocking processes are controlled by the smart electronic key. The interaction between the key and the staff's smart phone, and between the smart phone and the data management center is completed. Depending on the network quality, the unlocking process may take one or two seconds or even longer, but it does not affect general business applications.

以下将对本实施例所述的步骤进行举例说明:The steps described in this embodiment will be described with examples below:

(一)基于国家Hash函数标准SM3和国家密码算法标准SM4的实现(1) Implementation based on the national Hash function standard SM3 and the national cryptographic algorithm standard SM4

本发明在具体实施过程中,可以使用任何密码算法对数据进行加密和解密处理。一般地,商用加密算法是安全可靠的。在我们的实施例中,考虑到国家对相关安全产品的管理监督,可以使用国家Hash函数标准SM3和国家密码算法标准SM4。During the specific implementation of the present invention, any cryptographic algorithm can be used to encrypt and decrypt data. Generally, commercial encryption algorithms are safe and reliable. In our embodiment, considering the state's management and supervision of related security products, the national Hash function standard SM3 and the national encryption algorithm standard SM4 can be used.

SM3是一种国家密码标准,规范了一种基于32bite字运算的Hash函数,输出256比特,即32个字节;SM4是一种国家密码算法标准,是一种分组长度为128比特的分组密码。原始数据分组为128比特长的明文组,加密后得到128比特长的密文组。给定密钥k和数据data,SM4加密算法得到密文数据c=SM4Enc(k,data),对应的解密算法为data=SM4Dec(k,c)。SM3 is a national encryption standard, which regulates a Hash function based on 32bit word operation, and outputs 256 bits, that is, 32 bytes; SM4 is a national encryption algorithm standard, which is a block cipher with a block length of 128 bits . The original data group is a 128-bit long plaintext group, and after encryption, a 128-bit long ciphertext group is obtained. Given the key k and the data data, the SM4 encryption algorithm obtains the ciphertext data c=SM4Enc(k,data), and the corresponding decryption algorithm is data=SM4Dec(k,c).

(二)具体举例(2) Specific examples

假设一个智能锁的身份标识LI D=0001001a(16进制表示),一个智能电子钥匙的身份标识为KI D=00020013,使用该智能电子钥匙的工作人员的手机号码为12345678900。Assume that the ID of an intelligent lock LID=0001001a (hexadecimal representation), the ID of a smart electronic key is KID=00020013, and the mobile phone number of the staff using the smart electronic key is 12345678900.

在数据管理中心,记录着(张三,12345678900,KI D=00020013,L I D=0001001a),(张三,12345678900,KI D=00020013,L I D=0001001b)等数据,说明张三是掌握身份标识为KI D=00020013的智能电子钥匙的工作人员,有权限开启智能锁0001001a和0001001b。数据管理中心实现了各种国家标准加密算法和Hash函数算法。In the data management center, there are records such as (Zhang San, 12345678900, KID=00020013, L I D=0001001a), (Zhang San, 12345678900, KID=00020013, L I D=0001001b) and other data, indicating that Zhang San has the identity as KI The staff of the smart electronic key with D=00020013 has the authority to open the smart locks 0001001a and 0001001b. The data management center implements various national standard encryption algorithms and Hash function algorithms.

当张三使用智能电子钥匙开启智能锁0001001a时,将智能电子钥匙00020013与智能锁L I D=0001001a进行连接(如物理连接)。智能电子钥匙询问智能锁的身份标识,智能锁反馈数据0001001a,智能电子钥匙将数据(OPEN,L I D=0001001a,KI D=00020013)发送到张三的手机,张三的手机将(OPEN,L I D=0001001a,KI D=00020013)通过自己的账号发送到数据管理中心,数据管理中心收到数据(OPEN,L I D=0001001a,KI D=00020013),并知道该数据来自U I D的账号,因此记录(U I D,T,OPEN,L I D=0001001a,KI D=00020013),其中T是系统时钟。When Zhang San uses the smart electronic key to open the smart lock 0001001a, connect the smart electronic key 00020013 with the smart lock L I D =0001001a (such as a physical connection). The smart electronic key inquires about the identity of the smart lock, the smart lock feeds back data 0001001a, the smart electronic key sends the data (OPEN, L I D = 0001001a, KID = 00020013) to Zhang San's mobile phone, and Zhang San's mobile phone sends (OPEN, L I D = 0001001a, KI D = 00020013) is sent to the data management center through its own account, and the data management center receives the data (OPEN, L I D = 0001001a, KI D = 00020013), and knows that the data comes from the account of U I D, so record (U I D, T, OPEN, L I D = 0001001a, KID = 00020013), where T is the system clock.

数据管理中心然后执行如下操作:The data management center then performs the following operations:

a)根据U I D检查用户是否持有智能电子钥匙KI D=00020013,是否有权限开启LI D=0001001a。如果验证不通过,则根据需要提示错误;否则继续执行。a) Check whether the user holds the intelligent electronic key KID=00020013 according to the U ID, and whether the user has the authority to open the LID=0001001a. If the verification fails, an error will be prompted as required; otherwise, continue to execute.

b)查看当前工作人员的手机号码,随机产生一个验证码b) Check the mobile phone number of the current staff member and randomly generate a verification code

code=1234,将验证码发送到工作人员的手机号码;code=1234, send the verification code to the mobile phone number of the staff;

c)产生一个随机数R=01234567,使用KI D对应的密钥KK加密R,得到密文c=SM4Enc(KK,01234567);c) generate a random number R=01234567, use the key KK corresponding to KID to encrypt R, and obtain the ciphertext c=SM4Enc(KK, 01234567);

d)使用L I D对应的密钥LK计算数据完整性保护标签t=SM3(LK,d) Use the key LK corresponding to L I D to calculate the data integrity protection label t=SM3(LK,

OPEN=01,code=1234,R=01234567),其中OPEN=01表示开锁指令;OPEN=01, code=1234, R=01234567), wherein OPEN=01 means unlock command;

e)将加密结果(OPEN=01,t,c)发送到工作人员的智能手机;e) Send the encrypted result (OPEN=01, t, c) to the staff's smartphone;

工作人员的智能手机收到上述数据(01,t,c)后,输入从数据管理中心发来的验证码code=1234;用户输入验证码code=1234后,智能手机将(OPEN=01,t,c,code=1234)发送给智能电子钥匙;After receiving the above data (01, t, c) on the smart phone of the staff, input the verification code code=1234 sent from the data management center; after the user enters the verification code code=1234, the smart phone will (OPEN=01, t ,c,code=1234) sent to the smart electronic key;

智能电子钥匙使用内置密钥KK解密c得到R=SM4Dec(KK,c)=01234567,将(OPEN=01,code=1234,R=01234567,t)发送给智能锁;The smart electronic key uses the built-in key KK to decrypt c to get R=SM4Dec(KK,c)=01234567, and sends (OPEN=01, code=1234, R=01234567, t) to the smart lock;

智能锁收到上述数据后,使用内置密钥LK计算After the smart lock receives the above data, it uses the built-in key LK to calculate

t'=SM3(LK,OPEN=01,code=1234,R=01234567)t'=SM3(LK, OPEN=01, code=1234, R=01234567)

验证t'=t是否成立。若验证通过,则启动微型电机进行开锁。Verify whether t'=t holds. If the verification is passed, the micro motor is started to unlock.

通过设备之间的工作流程不能看出,智能锁、智能电子钥匙和使用者都是灵活匹配的。数据管理中心掌握所有智能锁和智能电子钥匙的信息,特别是密钥信息。智能锁可以独立生产,智能电子钥匙也可以独立生产。如果行业用户相信设备生产厂商的内置密钥安全可靠,更新密钥不是必需的过程。密钥更新有许多成熟的技术,本发明不限制使用哪种密钥更新技术。It cannot be seen from the workflow between devices that smart locks, smart electronic keys and users are all flexibly matched. The data management center has information about all smart locks and smart electronic keys, especially key information. Smart locks can be produced independently, and smart electronic keys can also be produced independently. If industry users believe that the device manufacturer's built-in key is safe and reliable, updating the key is not a necessary process. There are many mature technologies for key update, and the present invention does not limit which key update technology is used.

智能锁的开启和关闭都有数据发送到数据管理中心,因此数据管理中心精确掌握智能锁的开启和关闭情况,包括何时何人使用哪个智能电子钥匙开启或关闭哪个智能锁,这样也就记录了工作人员开锁后的工作时长。如果需要对工作过程进行监督,则需要其它辅助措施,如视频监控。The opening and closing of the smart lock has data sent to the data management center, so the data management center can accurately grasp the opening and closing of the smart lock, including when and who uses which smart electronic key to open or close which smart lock, so that it can be recorded The working hours of the staff after unlocking. If supervision of the work process is required, other auxiliary measures, such as video surveillance, are required.

本发明中的一个智能电子钥匙可以用来开启任何智能锁,同一个智能锁可以用多个智能电子钥匙开启。智能锁与智能电子钥匙之间没有关联,能否开锁取决于数据管理中心的授权。这样,工作人员无论授权开多少个锁,都无须携带一串钥匙。智能钥匙的数量可以根据相关工作人员的数量来确定,而智能锁的数量则根据行业应用需求确定。One intelligent electronic key in the present invention can be used to open any intelligent lock, and the same intelligent lock can be opened with multiple intelligent electronic keys. There is no relationship between the smart lock and the smart electronic key, and whether the lock can be unlocked depends on the authorization of the data management center. In this way, no matter how many locks are authorized to open, the staff does not need to carry a bunch of keys. The number of smart keys can be determined according to the number of relevant staff, while the number of smart locks can be determined according to industry application requirements.

另外需要说明的是,本发明中的智能锁与智能电子钥匙之间的物理连接是许多实际应用场景可满足的,不是本发明的技术关键。在一些特殊应用中,智能锁与智能电子钥匙之间的通信连接可以通过其它短距离无线通信方式,在这种情况下,只需要将物理通信接口改为短距离无线通信接口即可。使用无线通信接口时可能需要更多的信息安全保护,这方面的安全保护可使用传统的安全通信技术,不是本发明的内容。In addition, it should be noted that the physical connection between the smart lock and the smart electronic key in the present invention can satisfy many practical application scenarios, and is not the technical key of the present invention. In some special applications, the communication connection between the smart lock and the smart electronic key can be through other short-distance wireless communication methods. In this case, it is only necessary to change the physical communication interface to a short-distance wireless communication interface. When using the wireless communication interface, more information security protection may be required, and the security protection in this aspect can use traditional security communication technology, which is not the content of the present invention.

本发明中工作人员的智能手机也可以是具有移动网络通信功能的其它移动设备,如i Pad或某种专用设备。这种名称不同功能相似的替换是显而易见的。本发明为叙述方便,假定工作人员使用的移动通信设备是智能手机,这种名称上的局限性不构成对本发明的技术限制。本发明中的工作人员,也是基于企业应用模式。在其它应用场景中,可能使用不同的称谓。The staff's smart phone in the present invention can also be other mobile devices with mobile network communication functions, such as i Pad or some special equipment. Such substitutions with different names and similar functions are obvious. In the present invention, for the convenience of description, it is assumed that the mobile communication device used by the staff is a smart phone, and this limitation on the name does not constitute a technical limitation to the present invention. The staff in the present invention is also based on the enterprise application pattern. In other application scenarios, different titles may be used.

本领域技术人员应该明白,上述本发明的各模块或各步骤可以用通用的计算机装置来实现,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。本发明不限制于任何特定的硬件和软件的结合。Those skilled in the art should understand that each module or each step of the present invention described above can be realized by a general-purpose computer device, optionally, they can be realized by a program code executable by the computing device, thereby, they can be stored in a memory The device is executed by a computing device, or they are made into individual integrated circuit modules, or multiple modules or steps among them are made into a single integrated circuit module for realization. The invention is not limited to any specific combination of hardware and software.

上述虽然结合附图对本发明的具体实施方式进行了描述,但并非对本发明保护范围的限制,所属领域技术人员应该明白,在本发明的技术方案的基础上,本领域技术人员不需要付出创造性劳动即可做出的各种修改或变形仍在本发明的保护范围以内。Although the specific implementation of the present invention has been described above in conjunction with the accompanying drawings, it does not limit the protection scope of the present invention. Those skilled in the art should understand that on the basis of the technical solution of the present invention, those skilled in the art do not need to pay creative work Various modifications or variations that can be made are still within the protection scope of the present invention.

Claims (10)

1. The utility model provides an intelligence lock management system, its characterized in that, includes intelligent lock, intelligent electronic key, intelligent terminal and data management center, wherein:
the intelligent lock is used for being in communication connection with the intelligent electronic key and sending the identity information LID of the intelligent lock to the intelligent electronic key; receiving a verification code, a random number R and third encryption information sent by the intelligent electronic key, and generating verification encryption information t based on a key LK corresponding to the verification code, the random number R and intelligent lock identity information LID Comparing t And t in the third encrypted information, if the two are the same, then the unlocking action is executed;
the intelligent electronic key is used for being in communication connection with the intelligent lock, acquiring identity information LID of the intelligent lock, encrypting the identity information LID of the intelligent lock, the identity information KID of the intelligent electronic key and the unlocking request to form first encryption information, and sending the first encryption information to the intelligent terminal; the intelligent lock is also used for receiving the verification code and the third encrypted information sent by the intelligent terminal, decrypting the third encrypted information to obtain a random number R, and sending the verification code, the random number R and the third encrypted information to the intelligent lock;
the intelligent terminal is used for receiving first encryption information sent by the intelligent electronic key, encrypting the identity information UID of the staff and the first encryption information to form second encryption information, and sending the second encryption information to the data management center; the intelligent electronic key is also used for receiving the verification code and the third encryption information sent by the data management center and sending the verification code and the third encryption information to the intelligent electronic key;
the data management center is used for receiving second encryption information sent by the intelligent terminal, generating a verification code and a random number R, and sending the verification code to the intelligent terminal; and obtaining an intelligent electronic key ciphertext c and an intelligent lock data integrity tag t based on the verification code and the random number R, obtaining third encryption information based on c and t, and sending the third encryption information to the intelligent terminal.
2. The intelligent lock management system according to claim 1, wherein the data management center encrypts the random number R with a key KK corresponding to KID to obtain a ciphertext c; and editing an unlocking instruction OPEN, and encrypting a verification code, a random number R, and a key LK corresponding to the unlocking instruction OPEN and the LID to obtain a data integrity label t.
3. The system for managing a smart lock according to claim 1, wherein the data management center is further configured to determine whether the staff member in the received second encryption information holds the smart electronic key KID and determine whether the smart electronic key KID has an authority to unlock the smart lock LID based on a database of correspondence relationships between the staff member, the smart electronic key, and the smart lock.
4. The intelligent lock management system of claim 1,
the intelligent electronic key is also used for sending a lock closing instruction to the intelligent lock;
the intelligent lock is also used for receiving a lock closing instruction sent by the intelligent electronic key and executing lock closing operation;
or,
the intelligent lock is also used for detecting a lock closing state or an unlock state, and after the lock is successfully unlocked and the lock is successfully closed, the unlocking success information, the lock closing success information and the intelligent lock identity information LID are sent to the intelligent electronic key;
the intelligent electronic key is also used for receiving unlocking success information, locking success information and intelligent lock identity information LID sent by the intelligent lock, and sending the intelligent electronic key identity information KID, the unlocking success information, the locking success information and the intelligent lock identity information LID to the intelligent terminal;
the intelligent terminal is also used for receiving intelligent electronic key identity information KID, unlocking success information, locking success information and intelligent lock identity information LID which are sent by the intelligent electronic key, and sending staff identity information UID, the intelligent electronic key identity information KID, the unlocking success information, the locking success information and the intelligent lock identity information LID to the data management center;
the data management center is further used for receiving the staff identity information UID, the intelligent electronic key identity information KID, the unlocking success information, the locking success information and the intelligent lock identity information LID, and storing the current time T of the data management center, the staff identity information UID, the intelligent electronic key identity information KID, the unlocking success information, the locking success information and the intelligent lock identity information LID.
5. The intelligent lock management system according to claim 1, wherein the intelligent lock comprises:
the storage module is used for storing key data, including an identity identifier LID of the lock, a data encryption key LK shared between the lock and the data management center, and unlocking and locking record data;
the communication module is used for communicating with an intelligent electronic key connected with the intelligent lock, receiving an unlocking instruction, a locking instruction, a verification code, a random number R and third encryption information sent by the intelligent electronic key, and sending the unlocking instruction, the locking instruction, the verification code, the random number R and the third encryption information to the computing module;
a computing module for receiving the unlocking instruction, the verification code, the random number R and the third encryption information sent by the communication module, acquiring the data encryption key LK in the storage module and executing the data integrity protection algorithm MAC, and generating the verification encryption information t based on the verification code, the random number R and the key LK Comparing t And t in the third encrypted information, if the two are the same, sending an unlocking instruction to the mechanical control module; the mechanical control module is also used for receiving a locking instruction sent by the communication module and sending the locking instruction to the mechanical control module;
and the mechanical control module is used for receiving the unlocking instruction and the locking instruction sent by the computing module and executing unlocking operation and locking operation based on the unlocking instruction and the locking instruction.
6. The intelligent lock management system of claim 5,
the calculation module is also used for acquiring unlocking success information and locking success information of the mechanical control module and sending the unlocking success information and the locking success information to the communication module;
the communication module is also used for receiving the unlocking success information and the locking success information sent by the computing module and sending the unlocking success information, the locking success information and the identification LID of the intelligent lock to the intelligent electronic key.
7. The smart lock management system of claim 1 wherein said smart electronic key comprises:
the storage module is used for storing key data, including an intelligent electronic Key Identity (KID) and a built-in key KK of a key;
the intelligent terminal communication module is used for receiving the first encryption information sent by the calculation module, sending the first encryption information to the intelligent terminal, receiving the verification code and the third encryption information sent by the intelligent terminal, and sending the verification code and the third encryption information to the calculation module;
the computing module is used for realizing data decryption, receiving the verification code and the third encrypted information sent to the intelligent terminal communication module, decrypting the third encrypted information to obtain a random number R, and sending an unlocking instruction, a locking instruction, the verification code, the random number R and the third encrypted information to the locking communication module; the intelligent terminal communication module is also used for encrypting data, receiving the identity identifier LID of the intelligent lock sent by the lock communication module, acquiring the identity identifier KID of the intelligent electronic key of the storage module, encrypting the identity information LID of the intelligent lock, the identity information KID of the intelligent electronic key and the unlocking request to form first encryption information, and sending the first encryption information to the intelligent terminal communication module; receiving unlocking success information, locking success information and an identity identifier LID of the intelligent lock which are sent by the opposite-lock communication module, and sending the information to the opposite-intelligent-terminal communication module;
the lock pairing communication module is used for acquiring an unlocking instruction, a locking instruction, a verification code, a random number R and third encryption information sent by the calculation module, and sending the unlocking instruction, the locking instruction, the verification code, the random number R and the third encryption information to the intelligent lock; and receiving unlocking success information, locking success information and an intelligent lock identity identifier LID which are sent by the intelligent lock and sending the information to the computing module.
Or,
the intelligent electronic key further comprises:
the power supply module is used for supplying power to the intelligent electronic key;
a power output module for providing a power supply for the smart lock;
and the signal display module is used for displaying the current processing result through different photoelectric signals.
8. A use method of an intelligent lock management system is characterized in that: the method comprises an unlocking method, wherein the unlocking method comprises the following steps:
the intelligent electronic key acquires intelligent lock identity information LID, encrypts the identity information LID of the intelligent lock, the intelligent electronic key identity information KID and the unlocking request to form first encryption information and sends the first encryption information to the intelligent terminal;
the intelligent terminal receives first encrypted information sent by the intelligent electronic key, encrypts the identity information UID of the staff and the first encrypted information to form second encrypted information, and sends the second encrypted information to the data management center;
the data management center receives second encrypted information sent by the intelligent terminal, generates a verification code and a random number R, and sends the verification code to the intelligent terminal; obtaining an intelligent electronic key ciphertext c and an intelligent lock data integrity tag t based on the verification code and the random number R, obtaining third encryption information based on c and t, and sending the third encryption information to the intelligent terminal;
the intelligent terminal receives the verification code and the third encryption information sent by the data management center and sends the verification code and the third encryption information to the intelligent electronic key;
the intelligent electronic key receives the verification code and the third encrypted information sent by the intelligent terminal, decrypts the third encrypted information to obtain a random number R, and sends the verification code, the random number R and the third encrypted information to the intelligent lock;
the intelligent lock receives the verification code, the random number R and the third encryption information sent by the intelligent electronic key based onA verification code, a random number R and a key LK corresponding to the intelligent lock identity information LID are verified to generate verification encryption information t Comparing t And t in the third encrypted information, if the two are the same, then the unlocking action is executed.
9. The method of using an intelligent lock management system according to claim 8, further comprising the steps of:
after the intelligent lock is successfully unlocked, the unlocking success information intelligent lock identity information LID is sent to the intelligent electronic key;
the intelligent electronic key receives unlocking success information and intelligent lock identity information LID sent by the intelligent lock, and sends the intelligent electronic key identity information KID, the unlocking success information and the intelligent lock identity information LID to the intelligent terminal;
the intelligent terminal receives intelligent electronic key identity information KID, unlocking success information and intelligent lock identity information LID which are sent by an intelligent electronic key, and sends staff identity information UID, the intelligent electronic key identity information KID, the unlocking success information and the intelligent lock identity information LID to a data management center;
and the data management center receives the identity information UID of the staff, the identity information KID of the intelligent electronic key, the unlocking success information and the identity information LID of the intelligent lock, and stores the current time T of the data management center, the identity information UID of the staff, the identity information KID of the intelligent electronic key, the unlocking success information and the identity information LID of the intelligent lock.
10. The method for using the intelligent lock management system according to claim 9, further comprising a locking method, wherein the locking method comprises the following steps:
the intelligent electronic key sends a lock closing instruction to the intelligent lock;
the intelligent lock receives a locking instruction sent by the intelligent electronic key and executes locking operation;
after the lock is closed, the intelligent lock detects the lock closing state, and sends lock closing success information and intelligent lock identity information LID to the intelligent electronic key;
the intelligent electronic key receives the locking success information and the intelligent lock identity information LID sent by the intelligent lock, and sends the intelligent electronic key identity information KID, the locking success information and the intelligent lock identity information LID to the intelligent terminal;
the intelligent terminal receives intelligent electronic key identity information KID, lock closing success information and intelligent lock identity information LID which are sent by an intelligent electronic key, and sends staff identity information UID, the intelligent electronic key identity information KID, the lock opening success information, the lock closing success information and the intelligent lock identity information LID to a data management center;
the data management center receives the identity information UID of the staff, the identity information KID of the intelligent electronic key, the successful locking information and the identity information LID of the intelligent lock, and stores the current time T of the data management center, the identity information UID of the staff, the identity information KID of the intelligent electronic key, the successful locking information and the identity information LID of the intelligent lock;
or,
the working personnel close the intelligent lock through external force, so that a lock latch in the intelligent lock is restored to the original position;
the intelligent lock detects the locking state, and sends the locking success information and the intelligent lock identity information LID to the intelligent electronic key.
CN202211474155.XA 2022-11-22 2022-11-22 A kind of intelligent lock management system and using method Pending CN115822384A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211474155.XA CN115822384A (en) 2022-11-22 2022-11-22 A kind of intelligent lock management system and using method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211474155.XA CN115822384A (en) 2022-11-22 2022-11-22 A kind of intelligent lock management system and using method

Publications (1)

Publication Number Publication Date
CN115822384A true CN115822384A (en) 2023-03-21

Family

ID=85530643

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211474155.XA Pending CN115822384A (en) 2022-11-22 2022-11-22 A kind of intelligent lock management system and using method

Country Status (1)

Country Link
CN (1) CN115822384A (en)

Similar Documents

Publication Publication Date Title
CN109272606B (en) Intelligent lock supervision equipment and method based on block chain and storage medium
CN104282062B (en) Locking and unlocking method based on safe and intelligent lock system
CN103793960B (en) Method for mobile key service
CN105184935B (en) It is a kind of can wechat share the blue-tooth intelligence lock system of password
CN106603484A (en) Virtual key method and apparatus using the same, background system, and user terminal
CN104282061B (en) Unlocking method for safety intelligent lock system
CN109155096A (en) Delivering for package and the automatic storage cabinet system and method got
CN202003425U (en) Central management system for monitoring intelligent lock
CN104299300B (en) The unblanking and close locking method of safety intelligent lock system based on NFC
CN105261096A (en) Network smart lock system
CN111311840B (en) A logistics lockbox, logistics management system and method
CN104123769B (en) The unblanking of a kind of safety intelligent lock, close lock control method
CN104364793A (en) Security mode for mobile communications devices
CN104123768A (en) Safety intelligent lock system and unlocking and locking control method
CN109191616A (en) intelligent lock system
CN104583049B (en) The local operation of the part of railroad track facility
CN104282060B (en) A kind of method for unlocking of safety intelligent lock system
CN109300201A (en) A kind of intelligent and safe lock and its encryption system and encryption method
CN104464048A (en) Electronic coded lock unlocking method and electronic coded lock unlocking device
CN105279831A (en) Method for controlling locking based on mobile equipment audio coding
CN112530053B (en) Intelligent lock control method, system, lock device, server and storage medium
CN104282059A (en) Bluetooth-based safety intelligent lock system with video monitoring function and unlocking and locking methods
CN114401087A (en) Passive lock identity authentication and key agreement system based on state cryptographic algorithm
CN114299645A (en) Encryption communication method for padlock of Internet of things
CN109584421A (en) A kind of intelligent door lock authentication administrative system based on domestic safety chip

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