Summary of the invention
In view of above-mentioned the deficiencies in the prior art, the object of the present invention is to provide a kind of control method for door lock and system, be intended to solve current automobile starting mode relies on that key causes easy stolen problem.
Technical scheme of the present invention is as follows:
A control method for door lock method, wherein, said method comprising the steps of:
A, mobile terminal gather facial image data, these facial image data are carried out to feature extraction and form face characteristic data, and be sent to server;
B, described server receive described face characteristic data, and itself and the feature templates setting in advance are compared, if comparison is consistent, to mobile terminal, send identification by instruction;
C, mobile terminal receive the connection circuit instruction that this identification generates dynamic encryption after by instruction, and this connection circuit instruction is sent on antitheft door for controlling the door lock control circuit board of electronic lock;
D, described door lock control circuit board connect circuit instruction to this dynamic encryption and shake hands and check, if check by, control and connect electronic lock, electronic lock is unlocked.
Described control method for door lock method, wherein, also comprises before described steps A:
In server, arrange and preserve the file for the feature templates of face characteristic comparison, the file size of described feature templates is 48-200 byte.
Described control method for door lock, wherein, receives people's face data enter instruction of user, and acquisition for mobile terminal people face is view data first, and these data are sent to server, by server according to this people's face first view data forms feature templates preservation.
Described control method for door lock, wherein, described mobile terminal is sent to described door lock control circuit board by short distance communication by the instruction of described connection circuit, and described short distance communication comprises NFC near-field communication, bluetooth communication or infrared signal communication.
Described control method for door lock, wherein, when described door lock control circuit board to this dynamic encryption connect circuit instruction check not by time, give the alarm.
Described control method for door lock, wherein, compares when inconsistent when described face characteristic data and described feature templates, and server sends authentication failed information to described mobile terminal, and points out user again to carry out collection and the checking of people's face data.
Described control method for door lock, wherein, when authentication failed number of times surpasses preset value, server sends lock instruction to mobile terminal, mobile terminal, according to this lock instruction and the communication of described door lock control circuit board, is controlled electronic lock by described door lock control circuit board and is entered locking state.
Described control method for door lock, wherein, described door lock control circuit board is by Control electronic lock, and wherein, described relay adopts grand relay J QC-3FF-12VDC-1ZS.
Described control method for door lock, wherein, described mobile terminal is by camera collection facial image data.
A system with control method for door lock as above, wherein, described system comprises:
Mobile terminal, for gathering facial image data, carries out feature extraction to these facial image data and forms face characteristic data, and be sent to server; Or the identification sending for reception server generates the connection circuit instruction of dynamic encryption after by instruction, and this connection circuit instruction is sent to door lock control circuit board;
Server, the face characteristic data that send for mobile terminal receive, and itself and the feature templates setting in advance are compared, according to comparison result, to mobile terminal, whether send identification by instruction;
Door lock control circuit board, shakes hands and checks for the instruction sending according to described mobile terminal, if check by, control the connection of electronic lock, electronic lock is unlocked.
Beneficial effect: the invention provides a kind of control method for door lock and system, it utilizes mobile terminal and cloud server to realize face recognition technology, and organically combine by it and to the control of the electronic lock of antitheft door, realized Intelligent unlocking function cheaply, utilize cloud server to carry out recognition of face simultaneously, also alleviated the workload of mobile terminal, and further guaranteed the security of data, this system has been avoided common door lock and has been swiped the card and lock the problem being easily replicated with magnetic card, has improved anti-theft security grade at home.
Embodiment
The invention provides a kind of control method for door lock and system, for making object of the present invention, technical scheme and effect clearer, clear and definite, below the present invention is described in more detail.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
As shown in Figure 2, it is the basic comprising of door lock control system of the present invention, it utilizes the communication of 200 of mobile terminal 100 and servers to realize recognition of face checking, and utilizes again afterwards communication between mobile terminal and antitheft door 301 to realize the unlatching of the electronic lock on antitheft door.The concrete grammar of its realization as described in Figure 1,
A kind of control method for door lock provided by the invention, wherein, said method comprising the steps of:
S100, mobile terminal gather facial image data, these facial image data are carried out to feature extraction and form face characteristic data, and be sent to server.
Wherein, described mobile terminal is by camera collection facial image data.In described mobile terminal, special applications app can be set, after starting this app, start the camera of mobile terminal, the general front-facing camera that starts, and on mobile terminal screen, be shown as picture content, and make the facial image data that user inputs can complete and accurate, camera obtains after the video flowing of people's face, extract relevant face characteristic, and gather this characteristic and send to server by communication interface.
S200, described server receive described face characteristic data, and itself and the feature templates setting in advance are compared, if comparison is consistent, to mobile terminal, send identification by instruction.
Before described step S100, also comprise: in server, arrange and preserve the file for the feature templates of face characteristic comparison, the file size of described feature templates is 48-200 byte.In server, set up feature templates database, in database, preserve a plurality of users' feature templates file.
In addition, mobile terminal can receive people's face data enter instruction of user, obtain people's face view data first, and these data be sent to server, by server according to this people's face first view data form feature templates and preserve.Be that user is by mobile terminal and utilize facial image to register, the relevant people face view data of user after registration is sent to server and forms feature templates file and save, when user enables recognition of face startup vehicle functions of the present invention again, just need to carry out recognition of face checking.On described server, be provided with the communication interface with mobile terminal communication, can realize the transmission of data and the transmission of instruction.
When described face characteristic data and described feature templates, compare when inconsistent, server sends authentication failed information to described mobile terminal, and points out user again to carry out collection and the checking of people's face data.When authentication failed number of times surpasses preset value, server sends lock instruction to mobile terminal, and mobile terminal, according to this lock instruction and the communication of described door lock control circuit board, is controlled the locking state of electronic lock in disconnecting by described door lock control circuit board.For example the preset value of people's face checking is set to 3 times, if 3 times all by the comparison of server, think that current to hold the user that mobile terminal verifies be disabled user, server can send lock instruction to mobile terminal, and can periodically repeatedly send this lock instruction, prevent that the situation that does not receive lock instruction that poor signal or disabled user's turning-off mobile terminal cause from occurring.Mobile terminal receives the door lock control circuit board with antitheft door that can give tacit consent to after lock instruction and carries out communication, the instruction of the locking electronic lock that transmission mobile terminal sends, and door lock control circuit board receives after this lock instruction, the off-state of locking electronic lock.Certainly, for avoiding owing to gathering environment such as light etc., the facial image data that gather being exerted an influence, and the checking after impact, acquisition phase in facial image data, mobile terminal judges ambient light and acquisition state simultaneously, for example by camera, judge whether current environment light meets acquisition condition, if do not met, can open flashlamp and throw light on; Whether the people's face position that judges user by electrical distance sensor is suitable, preset the appropriate distance section that people's face is positioned at mobile terminal, if hypotelorism or excessively far away shows corresponding information on screen, prompting user adjusts the distance between people's face and camera; Whether the acquisition state that detects mobile terminal by weight sensor is stable, and whether mobile terminal shakes too severity, prevents the error due to the unstable image data causing of acquisition state.
In specific implementation process, with comparing of feature templates be by each face characteristic data of the user of institute respectively with corresponding template in corresponding information compare, detect qualified rates of fitting and whether reach requirement, then the comparison result of comprehensive each face characteristic data, draw a similarity, if similarity is higher than default similarity threshold, server produces by instruction.
S300, mobile terminal receive the connection circuit instruction that this identification generates dynamic encryption after by instruction, and this connection circuit instruction is sent on antitheft door for controlling the door lock control circuit board of electronic lock.
Wherein, described mobile terminal is sent to described door lock control circuit board by short distance communication by the instruction of described connection circuit, and described short distance communication comprises NFC near-field communication, bluetooth communication or infrared signal communication.Utilize Near Field Communication technology to make mobile terminal realize the function of automobile key, can only can in the scope of near-field communication, could carry out the present invention program at mobile terminal and corresponding vehicle.
When described door lock control circuit board to this dynamic encryption connect circuit instruction check not by time, give the alarm.
S400, described door lock control circuit board connect circuit instruction to this dynamic encryption and shake hands and check, if check by, control and connect electronic lock, electronic lock is unlocked.
As shown in Figure 3, mobile terminal comprise processor 110 and be connected with described processor 110 for obtaining the camera 120 of facial image, for wireless communication module 130, the first near-field communication module 140 with cloud server communication connection; As shown in Figure 4, on door lock control circuit board 300, be provided with successively connect carry out second near-field communication module 310, single-chip microcomputer 320 of near-field communication with described the first near-field communication module 140 and for disconnecting or connect the relay 330 of electronic lock.
Described mobile terminal can be any equipment with long distance wireless communication function and short-range wireless communication module, such as mobile phone, panel computer etc., and the wireless communication module of mobile terminal is the communication interface to server by mobile communication signal transmitting and receiving information.
In preferred embodiment, described processor 120 is processor more than dominant frequency 1GHz.Guarantee that like this processor can smooth and easyly complete man face image acquiring process.Wherein mobile terminal can be any a smart mobile phone with near-field communication module and camera or panel computer, the rich P508 mobile phone of prestige that preferably mobile terminal adopts prestige enrichment group to produce.Processor produces dynamic encryption instruction, and it is the unlatching to electronic lock for control gate lock control circuit plate.
Camera 110 on mobile terminal of the present invention gathers people's face provides video flowing to transfer to processor 120 to process, processor 120 completes feature extraction and information exchange after extraction is crossed to wireless communication module 130 is sent to server, server carries out recognition of face, if recognition of face is passed through, server sends and is verified information to mobile terminal (specifically can realize by the short message mode of specific format), the processor of mobile terminal produces the instruction of the connection circuit of a dynamic encryption, by the first near-field communication module, send out, the second near-field communication module of described door lock control circuit board receives after instruction, the single-chip microcomputer that passes to door lock control circuit board is shaken hands and checks, check by the rear control signal engage relay again that passes through.By relay, connect electronic lock, thereby make the normal unlatching burglar-proof door of user.In another embodiment, after described the first near-field communication module and the second near-field communication module establish a communications link.On mobile terminal, need unique pairing code of preserving in the single-chip microcomputer of input gate lock control circuit plate, after successful matching, the work of single-chip microcomputer starting relay.
In preferred embodiment, described the second near-field communication module and single-chip microcomputer can adopt the CC2540 chip of Texas Instruments, the CC2540 chip of Texas Instruments belongs to low-power consumption RF IC, its have outstanding long-distance link gain (up to+97 dB) and with the good compossibility of other 2.4 GHz device, it also has good interoperability/compatibility in addition, and this chip meets the monotype (CC2540) and double mode device (BlueLink 7.0 bluetooths/FM single-chip solution of 4.0 editions standards of Bluetooth specification, WiLink 7.0 WLAN/GPS/ bluetooth/FM single-chip solutions and WiLink 6.0 WLAN/ bluetooth/FM single-chip solutions), can realize comprehensive link test and exploitation.
In preferred embodiment, described relay adopts grand relay J QC-3FF-12VDC-1ZS.Described single-chip microcomputer connects relay by driving circuit, and described single-chip microcomputer is worked by driving circuit pilot relay.
Concrete, the second near-field communication module in described door lock control circuit board receives after the instruction of connection electronic lock of the dynamic encryption that mobile terminal sends by the first near-field communication module, given single-chip microcomputer, after single-chip microcomputer deciphering and confirmation, by driving circuit pilot relay, connected electronic lock.
In specific embodiment, door lock control circuit board receives the instruction meeting of mobile terminal and processes by internal circuit, restoring data, and send unlocking signal by circuit.Because this signal is fainter, so can carry out by signal amplification circuit.Signal amplification circuit amplifies after receiving unlocking signal, by driving circuit, drives relay to work, and connects the circuit that opens the door of electronic lock after relay work, and state unlocks.
As shown in Figure 5, utilize native system to realize the roughly process that vehicle launch unblanks to be: when user needs opening car door and lights a fire, utilize camera (be specially and use front-facing camera) the collection people face on mobile terminal 100 to provide video flowing to transfer to its processor to process, processor completes feature extraction and information exchange after extraction is crossed to wireless communication module is sent to server 200, the communication interface of server receives after this signal, this information of server by utilizing completes recognition of face, server end sends signal of communication according to recognition result to mobile terminal, the wireless communication module of mobile terminal receives after this signal of communication, processor is changed signal of communication, according to this signal of communication, produce corresponding near-field-communication signal afterwards, near-field-communication signal is sent to the second near-field communication module 310 by the first near-field communication module, when this near-field-communication signal is unlocking signal, the single-chip microcomputer of described door lock control circuit board 300 is shaken hands and checks this unlocking signal, check by the rear control signal engage relay 330 again that passes through.By relay 330, connect electric locking, concrete, control signal makes triode Q conducting by input end P0_0, produces control signal and enters relay 330 through CH1.Relay produces control signal and controls electronic lock unlatching.
The present invention also provides a kind of system with control method for door lock as above, and wherein, described system comprises:
Mobile terminal, for gathering facial image data, carries out feature extraction to these facial image data and forms face characteristic data, and be sent to server; Or the identification sending for reception server generates the connection circuit instruction of dynamic encryption after by instruction, this connection circuit instruction is sent to door lock control circuit board, specifically as described in step S100 and S300.
Server, the face characteristic data that send for mobile terminal receive, and itself and the feature templates setting in advance are compared, according to comparison result, to mobile terminal, send identification whether by instruction, specifically as described in step S200.
Door lock control circuit board, shakes hands and checks for the instruction sending according to described mobile terminal, if check by, control the connection of electronic lock, specifically as described in step S400.
The invention provides a kind of control method for door lock and system, it utilizes mobile terminal and cloud server to realize face recognition technology, and organically combine by it and to the control of the electronic lock of antitheft door, realized Intelligent unlocking function cheaply, utilize cloud server to carry out recognition of face simultaneously, also alleviated the workload of mobile terminal, and further guaranteed the security of data, this system has been avoided common door lock and has been swiped the card and lock the problem being easily replicated with magnetic card, has improved anti-theft security grade at home.
Should be understood that, application of the present invention is not limited to above-mentioned giving an example, and for those of ordinary skills, can be improved according to the above description or convert, and all these improvement and conversion all should belong to the protection domain of claims of the present invention.