A kind of mobile Internet virtual key authoring system and hardware gate lock control method thereofTechnical field
The present invention relates to a kind of mobile Internet virtual key authoring system and hardware gate lock control method thereof, belong to electronics intelligenceTechnical field can be controlled by door lock.
Background technology
Traditional intelligence door lock typically by fingerprint, RF IC card etc. as cipher input equipment, by lock internal circuit passwordControl lock core motor action after verification, reach the purpose opened the door.The shortcoming of this door lock is, the duplication of its key is with passingPassing and need the aspectant operation of both sides, remotely management and house commission lease for rental house are very inconvenient.Existing marketOn bluetooth lock, be substantially based on symmetric cryptosystem, major part AES encryption method come to communication data encryption,This AES method is used in the control of door lock, and safety can not get ensureing.
Summary of the invention
It is an object of the invention to provide a kind of mobile Internet virtual key authoring system and hardware gate lock control method thereof,Preferably to improve door lock security control effect.
To achieve these goals, technical scheme is as follows.
A kind of mobile Internet virtual key authoring system, it is characterised in that: include the Intelligent door with bluetooth communicationLock, the main smart mobile phone with bluetooth communication, the objective smart mobile phone with bluetooth communication and with all intelligenceThe server that mobile phone is linked by wireless Internet, all smart mobile phones are provided with can be with the software client of server communicationEnd, the step utilizing the hardware gate lock control method of above-mentioned mobile Internet virtual key authoring system is as follows:
(1) each smart lock with bluetooth communication is owned by a pair RSA public and private key, and wherein private key is solidificated in lockIn internal memorizer, PKI is then printed upon with Quick Response Code form and locks on the key board together packed, having of smart lockPerson logs in software client, Connection Service device and the scanning Quick Response Code containing smart lock public key information, clothes by main smart mobile phoneThe unique identities ID of main smart mobile phone assert by business device according to registration scenarios, generates host key, has the intelligence of host keyMobile phone is then main smart mobile phone, and main smart mobile phone can send authorization key by wireless Internet to server and ask;
(2) server receives the authorization key request of main smart mobile phone, after identity ID of main smart mobile phone is verified,Generate authorization key, pass to visitor's smart mobile phone;
(3) after visitor's smart mobile phone obtains authorization key by Connection Service device, by bluetooth and intelligent door lock communication;
(4) after intelligent door lock obtains the key that client intelligent mobile communication comes, being decrypted, comparison, comparison is by then openingLock, comparison is not by then unblanking.
Further, intelligent door lock has a radio-frequency module storing its key, main smart mobile phone, client intelligent mobile phoneCommunicated with lock by radio-frequency module, compare and pass through.
Further, intelligent door lock is without linking the Internet, with the Internet physical isolation.
Further, when smart mobile phone does unlocking operation, it is not necessary to connect the Internet, it is only necessary to have host key or authorize closeKey.
Further, server produces authorized key, carries out the transmission between smart mobile phone by mobile Internet.
Further, the private cipher key on smart lock is not stored on the Internet, and is stored in lock body;It is publicly-ownedForm with key board by locking owner's keeping, is loaded in the main smart mobile phone that lock owner has by key.
Further, server is automatically generated and the authorization key of intelligent door lock comparison by encoding software.
Further, Intelligent lock body needs authorization key comparison software is installed.
This beneficial effect of the invention is: present system and method can arbitrarily arrange effective duration, thus completely avoidNetwork cracks the probability that hardware replicates, and considerably increases the safety of mobile interchange virtual network key remote authorization.
Accompanying drawing explanation
System global structure schematic diagram in Fig. 1, the embodiment of the present invention.
The generation schematic flow sheet of the lock master key in Fig. 2, the embodiment of the present invention.
Client key warrant distributing schematic flow sheet in Fig. 3, the embodiment of the present invention.
The encryption and decryption principle schematic of the present invention in Fig. 4, the embodiment of the present invention.
The mobile phone that describes in Fig. 5, the embodiment of the present invention locks, with blue-tooth intelligence, the schematic flow sheet that communication is unblanked.
The message processing flow schematic diagram that display blue-tooth intelligence lock communication in Fig. 6, the embodiment of the present invention returns.
Detailed description of the invention
With embodiment, the detailed description of the invention of the present invention is described below in conjunction with the accompanying drawings, in order to be better understood from thisBright.
Embodiment
As it is shown in figure 1, this mobile Internet virtual key authoring system is by blue-tooth intelligence door lock, with APP softwareMobile phone, server form, and blue-tooth intelligence door lock includes bluetooth BLE module, clock module, encryption/decryption module, central authoritiesControl module (MCU), motor drive module, driving motor and lock body machinery executable portion, server is responsible for user and is recognizedCard, mandate, user profile, lock and the storage of key information and management, mobile phone sends order by special APP to lockAnd reception return information, carry out communication with server simultaneously;Blue-tooth intelligence interlocking receives the instruction of APP, simultaneously by instructionRequirement is unblanked or completes other functions, and the bluetooth BLE module in lock is responsible for and mobile communication, and clock module provides preciselyDate, the time, encryption/decryption module is responsible for the encryption and decryption of data, and motor drive module is responsible for driving motor positive and inverse, electricityMachine is responsible for driving gate lock actuator, completes the switching function of door lock, and MCU is the control coordination organization of whole lock body,It is responsible for the process of various command informations.This system is in addition to can realizing Bluetooth control door lock action, it is also possible to be concurrently accessedThe functional modules such as fingerprint in the market, RF IC card, central control module receives these module by signal, drives electricityMachine, makes lockset have multiple unlocking function.
As in figure 2 it is shown, lock is main by scanning every Quick Response Code (containing the RSA PKI of unblanking of this lock) being equipped with when locking out factoryAcquisition is unblanked PKI, by server authentication mandate, generates the lock master key of permanent effect duration, obtains simultaneously and divide to clientSend out the authority of key.As it is shown on figure 3, lock main acquisition authorized user ID, obtain and be authorized to effect duration, then obtainAfter server mandate, generating authorized user's unblocking key file and authorization unlocking Quick Response Code, unblocking key file and mandate are openedLock Quick Response Code is uploaded to server, server be distributed to authorized user, it is also possible to main directly by authorization unlocking two dimension by lockCode division issues authorized user.Authorization unlocking key file and authorization unlocking Quick Response Code have function, can be by awardingPower user is used for unblanking.
Encryption and decryption and communication process of unblanking are as follows:
Ciphering process.Present invention employs the AES of uniqueness, use symmetric cryptography AES and asymmetric encryption RSATwo kinds of encryption methods are encrypted simultaneously, greatly strengthen the safety of lock.As shown in Figure 4, mobile phone is joined by every lock of scanningThe Quick Response Code put obtains RSA PKI, and RSA private key is then preset at when lock produces in the nonvolatile storage of lock internal circuit.When mobile phone and lock communication, lock produces interim AES key, and the RSA PKI that this AES key and mobile phone obtain is the most splitLock instruction encryption, produces ciphertext of unblanking.Meanwhile, this AES key is also used for secret mobile phone together with locking interior RSA private keyThe unblocking key sent.Communication encryption process of every time unblanking completes, regardless of whether success, this AES temporary key is allCan lose efficacy, it is ensured that the AES of encryption and decryption is the most different every time.
The lock communication of mobile phone A PP, blue-tooth intelligence is unblanked flow process.As it is shown in figure 5, APP sends instructions to lock, interlocking receivesProduce interim AES key after instruction, send AES key to mobile phone A PP, mobile phone A PP use this AES key andWhat scanning Quick Response Code obtained unblank, and the instruction of RSA PKI dual lock is encrypted, and produces and unblanks ciphertext, sends ciphertext of unblankingLocking to blue-tooth intelligence, bluetooth lock decodes ciphertext by interim AES key and the RSA private key being preset in lock, is openedLock instruction, resolves instruction of unblanking, it may be judged whether be authorized user, if be black list user, if in user validityIn, finally the user meeting requirement of unblanking is performed unlocking action, return status information, to not meeting requirement of unblanking simultaneouslyUser instruction also return to information to mobile phone A PP.
Lock returns status information and processes.Such as Fig. 6, when mobile phone and bluetooth lock communication, receive the status information that bluetooth lock returns,If now mobile phone is connected to the Internet, lock information is to server the most up, if now mobile phone does not network, then and mobile phoneReservation information is local at mobile phone, when surfing Internet with cell phone, then uploads onto the server.
It is above the preferred embodiment of the present invention, it is noted that for those skilled in the art,Under the premise without departing from the principles of the invention, it is also possible to make some improvements and modifications, these improvements and modifications are also considered as thisThe protection domain of invention.