CN107358693A - A kind of smart lock and method for unlocking - Google Patents
A kind of smart lock and method for unlocking Download PDFInfo
- Publication number
- CN107358693A CN107358693A CN201710536758.0A CN201710536758A CN107358693A CN 107358693 A CN107358693 A CN 107358693A CN 201710536758 A CN201710536758 A CN 201710536758A CN 107358693 A CN107358693 A CN 107358693A
- Authority
- CN
- China
- Prior art keywords
- client
- embedded system
- lock
- certificate
- door lock
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 24
- 238000012795 verification Methods 0.000 claims abstract description 25
- 230000005540 biological transmission Effects 0.000 claims description 8
- 230000008602 contraction Effects 0.000 claims description 4
- 238000004891 communication Methods 0.000 abstract description 5
- 150000003839 salts Chemical class 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C9/00—Individual registration on entry or exit
- G07C9/00174—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
- G07C9/00309—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C9/00—Individual registration on entry or exit
- G07C9/00174—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
- G07C9/00571—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated by interacting with a central unit
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0823—Network architectures or network communication protocols for network security for authentication of entities using certificates
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/083—Network architectures or network communication protocols for network security for authentication of entities using passwords
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C9/00—Individual registration on entry or exit
- G07C9/00174—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
- G07C9/00309—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
- G07C2009/00412—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks the transmitted data signal being encrypted
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C2209/00—Indexing scheme relating to groups G07C9/00 - G07C9/38
- G07C2209/02—Access control comprising means for the enrolment of users
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/0442—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Lock And Its Accessories (AREA)
Abstract
本发明公开了一种智能锁及开锁方法,智能锁包括客户端、wifi模块、嵌入式系统、电动门锁装置、外部锁体,所述客户端通过wifi模块连接嵌入式系统,其用于与客户端之间完成身份验证;所述嵌入式系统与电动门锁装置连接,其用于发出开门、锁门信号至电动门锁装置;所述电动门锁装置与外部锁体连接,其用于与外部锁体连接完成解锁上锁门锁。本发明的优点在于:通过手机客户端与嵌入式系统进行通信连接,进而完成手机控制门锁的上锁和解锁,方便简单而且安全性高;同时在上锁和解锁时,通过摄像头拍摄门前的图像数据,可以作为远程查看,增加安全性能;通过增加客户端与嵌入式系统之间的加密验证方法,提高手机客户端控制门锁的安全性能,方便实用。
The invention discloses an intelligent lock and an unlocking method. The intelligent lock includes a client, a wifi module, an embedded system, an electric door lock device, and an external lock body. The client is connected to the embedded system through the wifi module, and is used for communicating with The identity verification is completed between the clients; the embedded system is connected with the electric door lock device, which is used to send the door opening and locking signals to the electric door lock device; the electric door lock device is connected with the external lock body, which is used for Connect with the external lock body to complete unlocking and locking the door lock. The advantages of the present invention are: through the communication connection between the mobile phone client and the embedded system, and then completing the locking and unlocking of the mobile phone control door lock, which is convenient and simple and has high safety; The image data can be used as a remote view to increase the security performance; by increasing the encryption verification method between the client and the embedded system, the security performance of the mobile client to control the door lock is improved, which is convenient and practical.
Description
技术领域technical field
本发明涉及智能锁领域,特别涉及一种通过手机客户端实现智能开锁的智能锁及其开锁方法。The invention relates to the field of intelligent locks, in particular to an intelligent lock and an unlocking method for realizing intelligent unlocking through a mobile phone client.
背景技术Background technique
门锁是每家每户安全的保障。随着技术的发展,越来越多的采用只能方式开启门锁,现有技术最常见的采用门禁卡片的形式,通过门禁卡片内置的芯片和门锁上的识别芯片来判断主人身份,当门锁识别芯片识别成功后,则通过电控装置解锁门锁,这种方式简单方便,智能化程度高,但是安全性不高,仅通过身份卡片识别,在身份卡片丢失后很容易被别人利用开启门锁。Door locks are the guarantee of the safety of every household. With the development of technology, more and more people use the only way to open the door lock. The most common form of the existing technology is the access control card. The identity of the owner is judged by the built-in chip of the access control card and the identification chip on the door lock. After the door lock identification chip is successfully identified, the door lock is unlocked through the electronic control device. This method is simple and convenient, and has a high degree of intelligence, but the security is not high. Only through the ID card identification, it is easy to be used by others after the ID card is lost. Unlock the door.
发明内容Contents of the invention
本发明的目的在于克服现有技术的不足,提供一种新型智能锁及开锁方法,通过手机客户端实现开锁的同时能够提高门锁的安全性能。The purpose of the present invention is to overcome the deficiencies of the prior art, and provide a novel intelligent lock and unlocking method, which can improve the safety performance of the door lock while realizing unlocking through the mobile phone client.
为了实现上述目的,本发明采用的技术方案为:一种智能锁,包括客户端、wifi模块、嵌入式系统、电动门锁装置、外部锁体,其中,所述的客户端通过wifi模块连接嵌入式系统,其用于与客户端之间完成身份验证;所述的嵌入式系统与电动门锁装置连接,其用于发出开门、锁门信号至电动门锁装置;所述的电动门锁装置与外部锁体连接,其用于与外部锁体连接完成解锁上锁门锁。In order to achieve the above object, the technical solution adopted by the present invention is: an intelligent lock, including a client, a wifi module, an embedded system, an electric door lock device, and an external lock body, wherein the client is connected and embedded through a wifi module Type system, which is used to complete identity verification with the client; the embedded system is connected with the electric door lock device, and it is used to send the door opening and locking signals to the electric door lock device; the electric door lock device It is connected with the external lock body, and it is used to connect with the external lock body to complete unlocking and locking the door lock.
所述的嵌入式系统包括嵌入式控制器、内部数据库、内部服务器、证书服务器。The embedded system includes an embedded controller, an internal database, an internal server and a certificate server.
所述的电动门锁装置包括步进电机驱动器、步进电机、齿轮、锁舌,所述的步进电机驱动器驱动步进电机转动,所述步进电机通过齿轮带动锁舌的伸缩,所述的锁舌与外部锁体配合完成解锁上锁。The electric door lock device includes a stepper motor driver, a stepper motor, a gear, and a deadbolt. The stepper motor driver drives the stepper motor to rotate, and the stepper motor drives the stretching and contraction of the deadbolt through the gear. The dead bolt cooperates with the external lock body to complete unlocking and locking.
所述的嵌入式控制器连接图像采集模块,所述的图像采集单元采集的图像送入到嵌入式控制器中,所述的嵌入式控制器通过无线传输单元将图像信息传递至网络服务器中。The embedded controller is connected to the image acquisition module, the image collected by the image acquisition unit is sent to the embedded controller, and the embedded controller transmits the image information to the network server through the wireless transmission unit.
一种智能锁开锁方法,包括如下步骤:A method for unlocking an intelligent lock, comprising the steps of:
S1、用户在客户端进行账户注册,在客户端输入注册码,经wifi模块传递至嵌入式系统的内部服务器中;在内部数据库中预先设定有注册码,该注册码与门锁一一对应,比较注册码,在注册码一致时,允许注册;嵌入式系统存储客户端输入端账户名和相对应的密码,同时证书服务器颁发证书,该证书包含用户的个人信息和相对应的公开密钥,并通过该密钥对个人信息进行签名,将证书发送至客户端中;S1. The user registers an account on the client, enters the registration code on the client, and transmits it to the internal server of the embedded system through the wifi module; a registration code is preset in the internal database, and the registration code corresponds to the door lock one by one , compare the registration codes, and when the registration codes are consistent, the registration is allowed; the embedded system stores the client input account name and the corresponding password, and the certificate server issues a certificate, which contains the user's personal information and the corresponding public key, And use the key to sign the personal information, and send the certificate to the client;
S2、客户端输入账户、密码登陆嵌入式系统;S2, the client enters the account and password to log in to the embedded system;
S3、嵌入式系统对账户、密码、证书进行验证,判断验证是否通过;S3. The embedded system verifies the account, password and certificate, and judges whether the verification is passed;
S4、若验证通过,嵌入式系统接收客户端发来的开闭锁控制信号,并根据客户端指令控制门锁解锁或上锁;若验证不通过,客户端提示登陆失败信息,并执行步骤S1。S4. If the verification is passed, the embedded system receives the lock opening and closing control signal sent by the client, and controls the unlocking or locking of the door lock according to the client's instructions; if the verification fails, the client prompts a login failure message and executes step S1.
在步骤S1中,嵌入式系统在内部数据库中存储的用户名对应的密码采用SHA256算法加密;在步骤S3中对账户密码进行验证时,对传来的密码先进行SHA256算法加密,然后再将账户名对应的存储在数据库中的加密后的密码进行对比,在对比成功后,判定密码验证成功。In step S1, the password corresponding to the user name stored in the internal database of the embedded system is encrypted using the SHA256 algorithm; The encrypted password stored in the database corresponding to the name is compared, and after the comparison is successful, it is determined that the password verification is successful.
在步骤S3中,证书验证方法为:证书服务器对传来的证书信息通过公开密钥对证书进行认证。In step S3, the method for verifying the certificate is as follows: the certificate server authenticates the certificate through the public key to the transmitted certificate information.
在账户、密码、证书均验证通过时,客户端才允许登陆嵌入式系统。Only when the account, password, and certificate are all verified, the client is allowed to log in to the embedded system.
在步骤S4中,在嵌入式系统发出解锁或上锁信号时,启动图像采集单元,采集门前图像信息,并传递至网络服务器中。In step S4, when the embedded system sends an unlocking or locking signal, the image acquisition unit is started to collect the image information in front of the door and transmit it to the network server.
在步骤S1中,通过注册码注册完成后,删除内部数据库中存储的注册码;在需注册多个账户时,成功登陆嵌入式系统的客户端发出生成注册码指令,嵌入式系统内部服务器生成新的注册码并存储在内部数据库中,同时反馈注册码信息至客户端,客户端根据新的注册码注册新账户。In step S1, after the registration with the registration code is completed, the registration code stored in the internal database is deleted; when multiple accounts need to be registered, the client that successfully logs in to the embedded system issues a command to generate a registration code, and the internal server of the embedded system generates a new account. The registration code is stored in the internal database, and the registration code information is fed back to the client, and the client registers a new account according to the new registration code.
本发明的优点在于:可以通过手机客户端与嵌入式系统进行通信连接,进而完成手机控制门锁的上锁和解锁,方便简单而且安全性高;同时在上锁和解锁时,均会通过摄像头拍摄门前的图像数据,可以作为远程查看,增加安全性能;通过增加客户端与嵌入式系统之间的加密验证方法,提高手机客户端控制门锁的安全性能,方便实用。The advantages of the present invention are: the mobile phone client can communicate with the embedded system, and then complete the mobile phone to control the locking and unlocking of the door lock, which is convenient and simple and has high safety; The image data taken in front of the door can be used as a remote view to increase security; by adding an encryption verification method between the client and the embedded system, the security performance of the mobile client to control the door lock is improved, which is convenient and practical.
附图说明Description of drawings
下面对本发明说明书各幅附图表达的内容及图中的标记作简要说明:The content expressed in each accompanying drawing of the description of the present invention and the marks in the figure are briefly described below:
图1为本发明智能锁的结构原理图;Fig. 1 is the structural principle diagram of intelligent lock of the present invention;
图2为本发明图像采集原理图;Fig. 2 is the principle diagram of image acquisition of the present invention;
图3为本发明开锁流程图。Fig. 3 is a flow chart of unlocking in the present invention.
具体实施方式detailed description
下面对照附图,通过对最优实施例的描述,对本发明的具体实施方式作进一步详细的说明。The specific implementation manner of the present invention will be described in further detail below by describing the best embodiment with reference to the accompanying drawings.
如图1所示,一种智能锁,包括客户端、wifi模块、嵌入式系统、电动门锁装置、外部锁体,wifi模块用于客户端与嵌入式系统之间的连接,嵌入式系统用于与客户端通信,并在客户端与嵌入式系统通信时进行身份验证,在完成验证通信后接收客户端的开锁上锁指令,并根据开锁上锁指令发出控制信号至电动门锁装置,电动门锁装置根据嵌入式系统发来的开锁闭锁信号与外部锁体配合完成上锁解锁。As shown in Figure 1, a smart lock includes a client, a wifi module, an embedded system, an electric door lock device, and an external lock body. The wifi module is used for the connection between the client and the embedded system, and the embedded system uses It communicates with the client, and performs identity verification when the client communicates with the embedded system. After completing the verification communication, it receives the unlock and lock command from the client, and sends a control signal to the electric door lock device and electric door according to the unlock and lock command. The lock device cooperates with the external lock body to complete the locking and unlocking according to the unlocking and locking signal sent by the embedded system.
嵌入式系统包括嵌入式控制器、内部数据库、内部服务器、内部证书服务器等,电动门锁装置包括步进电机驱动器、步进电机、齿轮、锁舌,步进电机控制器驱动连接步进电机,步进电机通过齿轮带动锁舌的伸缩,锁舌与外部锁体配合完成上锁解锁。外部锁体设有与锁舌向配合的锁舌孔,在锁舌伸入锁舌孔时,门锁上锁,反之解锁。步进电机控制器接收嵌入式系统中嵌入式控制器发来的开锁闭锁信号,从而控制步进电机的转动,步进电机通过齿轮等传动装置带动锁舌的伸缩,从而实现门锁的自动上锁解锁。The embedded system includes an embedded controller, an internal database, an internal server, an internal certificate server, etc., and the electric door lock device includes a stepper motor driver, a stepper motor, a gear, and a deadbolt, and the stepper motor controller drives and connects the stepper motor, The stepper motor drives the expansion and contraction of the lock tongue through the gear, and the lock tongue cooperates with the external lock body to complete the locking and unlocking. The outer lock body is provided with a deadbolt hole cooperating with the deadbolt. When the deadbolt extends into the deadbolt hole, the door lock is locked, otherwise it is unlocked. The stepping motor controller receives the unlocking and locking signal sent by the embedded controller in the embedded system, thereby controlling the rotation of the stepping motor, and the stepping motor drives the expansion and contraction of the lock tongue through transmission devices such as gears, thereby realizing the automatic locking of the door lock. The lock is unlocked.
如图2所示,嵌入式系统连接图像采集模块,图像采集模块连接嵌入式控制器,嵌入式控制器通过无线传输单元将图像信息传递至网络服务器中,移动终端可以与网络服务器连接获取拍照信息。图像采集模块设置在门前,用于在解锁或上锁时拍摄门前图像画面信息,可采用高清摄像头拍摄,拍摄的图像传递至嵌入式控制器进行模数转化后传递至网络服务器中,方便用于实时查看门锁的开锁、闭锁记录,查看上锁、解锁时的门前情况。无线传输单元为WIFI传输单元、3G传输单元或4G传输单元等通信元件,用于将数据传递至网络服务器。As shown in Figure 2, the embedded system is connected to the image acquisition module, the image acquisition module is connected to the embedded controller, and the embedded controller transmits the image information to the network server through the wireless transmission unit, and the mobile terminal can be connected to the network server to obtain photographing information . The image acquisition module is set in front of the door to take pictures of the image information in front of the door when it is unlocked or locked. It can be taken by a high-definition camera, and the captured images are transmitted to the embedded controller for analog-to-digital conversion and then transmitted to the network server, which is convenient It is used to check the unlocking and locking records of the door lock in real time, and check the situation in front of the door when it is locked and unlocked. The wireless transmission unit is a communication element such as a WIFI transmission unit, a 3G transmission unit or a 4G transmission unit, and is used to transmit data to the network server.
如图3所示,一种智能锁的开锁方法,包括如下步骤,As shown in Figure 3, an unlocking method of an intelligent lock comprises the following steps,
S1、用户在客户端进行账户注册,在客户端输入注册码,经wifi模块传递至嵌入式系统的内部服务器中;在内部数据库中预先设定有注册码,该注册码与门锁一一对应,比较注册码,在注册码一致时,允许注册;嵌入式系统存储客户端输入端账户名和相对应的密码,同时证书服务器颁发证书,该证书包含用户的个人信息和相对应的公开密钥,并通过该密钥对个人信息进行签名,将证书发送至客户端中;S1. The user registers an account on the client, enters the registration code on the client, and transmits it to the internal server of the embedded system through the wifi module; a registration code is preset in the internal database, and the registration code corresponds to the door lock one by one , compare the registration codes, and when the registration codes are consistent, the registration is allowed; the embedded system stores the client input account name and the corresponding password, and the certificate server issues a certificate, which contains the user's personal information and the corresponding public key, And use the key to sign the personal information, and send the certificate to the client;
S2、客户端输入账户、密码登陆嵌入式系统;S2. The client enters the account and password to log in to the embedded system;
S3、嵌入式系统对账户、密码、证书进行验证,判断验证是否通过;S3. The embedded system verifies the account, password and certificate, and judges whether the verification is passed;
S4、若验证通过,嵌入式系统接收客户端发来的开闭锁控制信号,并根据客户端指令控制门锁解锁或上锁;若验证不通过,客户端提示登陆失败信息,并执行步骤S1。S4. If the verification is passed, the embedded system receives the lock opening and closing control signal sent by the client, and controls the unlocking or locking of the door lock according to the client's instructions; if the verification fails, the client prompts a login failure message and executes step S1.
在步骤S1中,嵌入式系统在内部数据库中存储的用户名对应的密码采用SHA256算法加密;在步骤S3中对账户密码进行验证时,对传来的密码先进行SHA256算法加密,然后再将账户名对应的存储在数据库中的加密后的密码进行对比,在对比成功后,判定密码验证成功。In step S1, the password corresponding to the user name stored in the internal database of the embedded system is encrypted using the SHA256 algorithm; The encrypted password stored in the database corresponding to the name is compared, and after the comparison is successful, it is determined that the password verification is successful.
在步骤S3中,证书验证方法为:证书服务器对传来的证书信息通过公开密钥对证书进行认证。In step S3, the method for verifying the certificate is as follows: the certificate server authenticates the certificate through the public key to the transmitted certificate information.
在账户、密码、证书均验证通过时,客户端才允许登陆嵌入式系统。Only when the account, password, and certificate are all verified, the client is allowed to log in to the embedded system.
在步骤S4中,在嵌入式系统发出解锁或上锁信号时,启动图像采集单元,采集门前图像信息,并传递至网络服务器中。In step S4, when the embedded system sends an unlocking or locking signal, the image acquisition unit is started to collect the image information in front of the door and transmit it to the network server.
在步骤S1中,通过注册码注册完成后,删除内部数据库中存储的注册码;在需注册多个账户时,成功登陆嵌入式系统的客户端发出生成注册码指令,嵌入式系统内部服务器生成新的注册码并存储在内部数据库中,同时反馈注册码信息至客户端,客户端根据新的注册码注册新账户。In step S1, after the registration with the registration code is completed, the registration code stored in the internal database is deleted; when multiple accounts need to be registered, the client that successfully logs in to the embedded system issues a command to generate a registration code, and the internal server of the embedded system generates a new account. The registration code is stored in the internal database, and the registration code information is fed back to the client, and the client registers a new account according to the new registration code.
客户端由为安装有APP的手机,主要为用户提供友好的操作平台并作为连接门锁嵌入式系统内的服务器的接口。其操作项有注册、登陆、开锁、关锁、查看日志、生成注册码、退出和注销等,用户可根据自己的需求点击按钮向服务器传递相对应的指令,从而实现相应的功能。嵌入式系统基于RT5350开发板进行开发,开发板包括嵌入式控制器、内部服务器、内部数据库、内部证书服务器以及wifi模块,内部服务器主要提供连接手机客户端的接口,完成与手机之间的通信;内部数据库服务器存储已注册用户的用户名和密码并进行哈希SHA256算法加密,为之后的登陆做验证匹配;内部证书服务器为注册成功的用户颁发认证证书,确保登陆用户的安全性;自带的wifi模块作为网关实现了手机客户端与内部服务器之间的信息通信。在手机客户端通过wifi与嵌入式系统内部数据库连接后,嵌入式控制器从内部服务器获取相关的登陆账户密码后,进行验证,或者进行注册操作。The client is a mobile phone with APP installed, which mainly provides users with a friendly operating platform and serves as an interface to connect to the server in the door lock embedded system. Its operation items include registration, login, unlock, lock, view log, generate registration code, exit and logout, etc. Users can click the button to transmit corresponding instructions to the server according to their own needs, so as to realize the corresponding functions. The embedded system is developed based on the RT5350 development board. The development board includes an embedded controller, an internal server, an internal database, an internal certificate server, and a wifi module. The internal server mainly provides an interface to connect to the mobile phone client to complete the communication with the mobile phone; the internal The database server stores the user names and passwords of registered users and encrypts them with the hash SHA256 algorithm to verify and match subsequent logins; the internal certificate server issues authentication certificates for successfully registered users to ensure the security of logged-in users; the built-in wifi module As a gateway, it realizes the information communication between the mobile phone client and the internal server. After the mobile phone client is connected to the internal database of the embedded system through wifi, the embedded controller obtains the relevant login account password from the internal server, and performs verification or registration operation.
手机正常连接到WIFI模块后,首次注册用户需提供注册码,设置用户名密码后方能完成注册,注册码可为预先设置在内部数据库中的随机码如在门锁厂家生产时预设,门锁和注册码一一匹配,在接收到注册码匹配成功,则该用户成为Host用户,注册码使用一次即失效,此时嵌入式系统中嵌入式控制器删除存储的注册码。后续门锁使用者需通过Host用户用客户端登陆嵌入式系统,通过手机客户端的生成注册码指令来生成注册码,当Host用户登陆嵌入式系统后,嵌入式系统的控制器执行相关操作,生成注册码,在内部数据库中存储新生成的注册码,同时反馈新注册码至手机客户端,然后其他用户可凭注册码通过手机客户端按照注册流程注册并登录,从而实现多人登陆使用门锁,方便家庭内多个用户使用。After the mobile phone is connected to the WIFI module normally, the first registered user needs to provide a registration code, and the registration can only be completed after setting the user name and password. The registration code can be a random code preset in the internal database. One-to-one matching with the registration code, when the registration code is successfully matched, the user becomes a Host user, and the registration code becomes invalid after being used once. At this time, the embedded controller in the embedded system deletes the stored registration code. Subsequent door lock users need to log in to the embedded system through the host user client, and generate a registration code through the mobile phone client's generate registration code command. When the host user logs in to the embedded system, the controller of the embedded system performs related operations to generate Registration code, store the newly generated registration code in the internal database, and feed back the new registration code to the mobile client at the same time, and then other users can register and log in through the mobile client according to the registration process with the registration code, so as to realize multi-person login and use the door lock , It is convenient for multiple users in the family to use.
客户端主要实现用户注册、登陆以及操作指令。客户端手机搜索到门锁WIFI后,输入正确的账户密码进行验证连接。首次使用时需要获取门锁的注册码,完成注册,并通过服务器的验证,最终得到服务器颁发的证书,存储于手机中,拥有合法的用户名、密码及颁发的证书。用户登录APP时,会进行密码的验证过程。将用户输入的密码经过哈希运算得到的值和数据库中存储的psd值进行比较,确保门锁的安全性,psd值为在注册时用户提供的密码通过SHA256算法加密后的数值。密码验证通过后,手机发送所持有的证书,若证书合法,则登陆成功,进入后续的指令操作。手机客户端与服务器端通过wifi建立可靠连接,用户可向服务器发送开锁、关锁、生成注册码、退出、注销等操作,服务器收到指令后执行相应程序,完成用户请求。The client mainly implements user registration, login and operation instructions. After the client mobile phone searches for the door lock WIFI, enter the correct account password to verify the connection. When you use it for the first time, you need to obtain the registration code of the door lock, complete the registration, pass the verification of the server, and finally get the certificate issued by the server, store it in the mobile phone, and have a legal user name, password and issued certificate. When the user logs in to the APP, the password verification process will be carried out. Compare the hashed value of the password entered by the user with the psd value stored in the database to ensure the security of the door lock. The psd value is the value encrypted by the SHA256 algorithm of the password provided by the user during registration. After the password verification is passed, the mobile phone sends the certificate held by it. If the certificate is valid, the login is successful and the subsequent command operation is entered. The mobile phone client and the server end establish a reliable connection through wifi. The user can send operations such as unlocking, closing the lock, generating a registration code, exiting, and logging out to the server. After receiving the instruction, the server executes the corresponding program to complete the user's request.
本申请中智能锁开锁方法采用多种手段保证手机与嵌入式系统的认证登陆安全,从而保证了门锁的安全性,确保门锁使用者的可信性。一是输入信息与数据库信息比对:将已注册用户的用户名和密码将存储在门锁的内置数据库内,并采用哈希函数SHA256加密,加密函数形式为:psd=SHA256(SHA256(password)+salt),其中salt为每个注册用户产生的相对应的随机数。最终数据库内将以psd作为用户密码而非用户在手机客户端输入的明文密码,并且,数据库内也将存储相应的salt值。当用户需登录时,将其提供的明文密码进行SHA256(SHA256(password)+salt)运算,运算得出的值再与数据库内的psd值进行比对,如相同,则密码验证成功。二是证书颁发机制:注册成功的用户将收到来自门锁内部的证书服务器颁发的证书,此证书包含了用户的个人身份信息和其公开密钥,并且证书服务器用自己的私密密钥对这些信息进行了签名。当用户需要登录时,将证书和用户名、密码一并发送到服务器,嵌入式系统中的控制器用证书服务器的公开密钥对证书进行认证,认证通过后验证用户名密码,密码正确后方能登录。The smart lock unlocking method in this application adopts various means to ensure the authentication and login safety of the mobile phone and the embedded system, thereby ensuring the security of the door lock and the credibility of the door lock user. One is to compare the input information with the database information: the user name and password of the registered user will be stored in the built-in database of the door lock, and encrypted with the hash function SHA256. The encryption function form is: psd=SHA256(SHA256(password)+ salt), where salt is the corresponding random number generated by each registered user. In the end, the psd will be used as the user password in the database instead of the plaintext password entered by the user on the mobile client, and the corresponding salt value will also be stored in the database. When the user needs to log in, perform the SHA256 (SHA256(password)+salt) operation on the plaintext password provided by the user, and compare the calculated value with the psd value in the database. If they are the same, the password verification is successful. The second is the certificate issuance mechanism: users who have successfully registered will receive a certificate issued by the certificate server inside the door lock. This certificate contains the user's personal identity information and its public key, and the certificate server uses its own private key to verify these The information is signed. When the user needs to log in, the certificate, user name, and password are sent to the server together, and the controller in the embedded system uses the public key of the certificate server to authenticate the certificate. After the authentication is passed, the user name and password are verified, and the password can only be logged in. .
显然本发明具体实现并不受上述方式的限制,只要采用了本发明的方法构思和技术方案进行的各种非实质性的改进,均在本发明的保护范围之内。Apparently, the specific implementation of the present invention is not limited by the above methods, as long as various insubstantial improvements are made by adopting the method concept and technical solutions of the present invention, they all fall within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710536758.0A CN107358693A (en) | 2017-07-04 | 2017-07-04 | A kind of smart lock and method for unlocking |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710536758.0A CN107358693A (en) | 2017-07-04 | 2017-07-04 | A kind of smart lock and method for unlocking |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN107358693A true CN107358693A (en) | 2017-11-17 |
Family
ID=60292216
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710536758.0A Pending CN107358693A (en) | 2017-07-04 | 2017-07-04 | A kind of smart lock and method for unlocking |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107358693A (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109360316A (en) * | 2018-11-20 | 2019-02-19 | 上海古鳌电子科技股份有限公司 | A kind of intelligent lock system and working method |
| CN109859368A (en) * | 2019-03-19 | 2019-06-07 | 深圳市城市公共安全技术研究院有限公司 | Intelligent locking supervision system and method for limited space |
| CN112348997A (en) * | 2019-08-08 | 2021-02-09 | 云丁网络技术(北京)有限公司 | Intelligent door lock control method, device and system |
| CN113794735A (en) * | 2021-09-29 | 2021-12-14 | 北京雅丁信息技术有限公司 | Sensitive data security protection method under SAAS system scene |
| CN114299643A (en) * | 2021-12-24 | 2022-04-08 | 北京纬百科技有限公司 | Door lock management method and device, storage medium and electronic equipment |
| US11538298B2 (en) | 2019-08-06 | 2022-12-27 | Yunding Network Technology (Beijing) Co., Ltd. | Devices and methods for controlling smart lock |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020174344A1 (en) * | 2001-05-18 | 2002-11-21 | Imprivata, Inc. | System and method for authentication using biometrics |
| CN103295304A (en) * | 2013-06-26 | 2013-09-11 | 东北电力大学 | Community intelligent entrance guard control method as well as device thereof based on mobile phone 3G (third generation) network |
| CN103729925A (en) * | 2014-01-15 | 2014-04-16 | 黄晓刚 | Intelligent automatic door management system |
| CN104809777A (en) * | 2015-04-20 | 2015-07-29 | 北京立成通科技有限公司 | Household intelligent door lock control system and method based on Internet communication technology |
| CN105239826A (en) * | 2015-10-23 | 2016-01-13 | 四川云锁科技有限公司 | Universal type intelligent door lock and operation method thereof |
| CN105303656A (en) * | 2015-09-22 | 2016-02-03 | 广州盛华信息服务有限公司 | Intelligent access control system based on CA (certification authority) technical application identification |
| CN106340087A (en) * | 2015-07-16 | 2017-01-18 | 黄月平 | Intelligent switch lock system based on intelligent mobile terminal |
| CN106652129A (en) * | 2016-11-29 | 2017-05-10 | 宁波飞拓电器有限公司 | Door control system design method based on mobile phone APP (application) |
| CN206991404U (en) * | 2017-07-04 | 2018-02-09 | 安徽工程大学 | A kind of smart lock |
-
2017
- 2017-07-04 CN CN201710536758.0A patent/CN107358693A/en active Pending
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20020174344A1 (en) * | 2001-05-18 | 2002-11-21 | Imprivata, Inc. | System and method for authentication using biometrics |
| CN103295304A (en) * | 2013-06-26 | 2013-09-11 | 东北电力大学 | Community intelligent entrance guard control method as well as device thereof based on mobile phone 3G (third generation) network |
| CN103729925A (en) * | 2014-01-15 | 2014-04-16 | 黄晓刚 | Intelligent automatic door management system |
| CN104809777A (en) * | 2015-04-20 | 2015-07-29 | 北京立成通科技有限公司 | Household intelligent door lock control system and method based on Internet communication technology |
| CN106340087A (en) * | 2015-07-16 | 2017-01-18 | 黄月平 | Intelligent switch lock system based on intelligent mobile terminal |
| CN105303656A (en) * | 2015-09-22 | 2016-02-03 | 广州盛华信息服务有限公司 | Intelligent access control system based on CA (certification authority) technical application identification |
| CN105239826A (en) * | 2015-10-23 | 2016-01-13 | 四川云锁科技有限公司 | Universal type intelligent door lock and operation method thereof |
| CN106652129A (en) * | 2016-11-29 | 2017-05-10 | 宁波飞拓电器有限公司 | Door control system design method based on mobile phone APP (application) |
| CN206991404U (en) * | 2017-07-04 | 2018-02-09 | 安徽工程大学 | A kind of smart lock |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109360316A (en) * | 2018-11-20 | 2019-02-19 | 上海古鳌电子科技股份有限公司 | A kind of intelligent lock system and working method |
| CN109859368A (en) * | 2019-03-19 | 2019-06-07 | 深圳市城市公共安全技术研究院有限公司 | Intelligent locking supervision system and method for limited space |
| US11538298B2 (en) | 2019-08-06 | 2022-12-27 | Yunding Network Technology (Beijing) Co., Ltd. | Devices and methods for controlling smart lock |
| US11823510B2 (en) | 2019-08-06 | 2023-11-21 | Yunding Network Technology (Beijing) Co., Ltd. | Devices and methods for controlling smart lock |
| CN112348997A (en) * | 2019-08-08 | 2021-02-09 | 云丁网络技术(北京)有限公司 | Intelligent door lock control method, device and system |
| CN113794735A (en) * | 2021-09-29 | 2021-12-14 | 北京雅丁信息技术有限公司 | Sensitive data security protection method under SAAS system scene |
| CN113794735B (en) * | 2021-09-29 | 2023-05-30 | 北京雅丁信息技术有限公司 | Sensitive data security protection method in SAAS system scene |
| CN114299643A (en) * | 2021-12-24 | 2022-04-08 | 北京纬百科技有限公司 | Door lock management method and device, storage medium and electronic equipment |
| CN114299643B (en) * | 2021-12-24 | 2023-11-14 | 北京纬百科技有限公司 | Door lock management method and device, storage medium and electronic equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105069876B (en) | Intelligent access control method and system | |
| CN112214745B (en) | Authenticated external biometric reader and verification device | |
| TWI882965B (en) | Authentication of internet of things devices, including electronic locks | |
| CN107358693A (en) | A kind of smart lock and method for unlocking | |
| KR101242122B1 (en) | Method for remotely controlling doorlock apparatus using smart phone and the doorlock appratus | |
| US11632252B2 (en) | Two-factor authentication system | |
| US20110084799A1 (en) | Lock system including an electronic key and a passive lock | |
| CN108712389A (en) | A kind of intelligent lock system | |
| WO2018014322A1 (en) | Residential intelligent door lock system and control method thereof | |
| CN110570559A (en) | Electronic key sharing method in access control system based on mobile terminal | |
| CN110570560A (en) | access control system based on identity recognition | |
| GB2605476A (en) | Securely controlling an electronic lock | |
| CN106097490B (en) | A kind of intelligent lock, the door-locking system and method for unlocking being made of lockset | |
| US10387634B1 (en) | System and method for authenticating a person using biometric data | |
| JP7496513B2 (en) | Control system, information processing method, and information terminal | |
| US20240185657A1 (en) | Securely Controlling an Electronic Lock | |
| KR101407443B1 (en) | User authentication system and method using near field communication | |
| CN107978033A (en) | A kind of smart lock exchange method | |
| CN206991404U (en) | A kind of smart lock | |
| JP2016135972A (en) | Gate control system | |
| KR20160098901A (en) | User authentication server system and user authentication method using the same | |
| CN119028049A (en) | A composite verification method for intelligent door lock authorization password and composite intelligent door lock | |
| KR20170115770A (en) | Door lock control system via PC and Smart Phone using coded serial number by EEDE system. | |
| CN112419553A (en) | Unlocking method and device of intelligent door lock | |
| CN110648435A (en) | Access control management method based on identity recognition |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171117 |
|
| RJ01 | Rejection of invention patent application after publication |