A kind of method and system that long-distance user's authentication is realized based on camera
Technical field
It is more particularly to a kind of to be realized based on terminal device camera the present invention relates to the technical field of computer authentication
The method and system of long-distance user's authentication.
Background technology
With internet popularize and technology development, many business in some industries (such as security, bank, insurance)
Handle and also gradually directly can remotely be handled on internet or RTU (such as VTM, mobile phone etc.), it is most universal at present
Be Web bank, Mobile banking etc..Some other traditional business is also on internet or RTU is gradually moved to, such as
Security are opened an account, bank opens card etc..These business are all to need " client itself hold my perfect instrument " to be handled according to the rules.
If handled in a traditional way in the cabinet face of outlet, need client itself to hold my perfect instrument and handled to cabinet face,
By cabinet face staff's on-site verification client identity.If these business are moved on internet or RTU, visitor is allowed
Family is remotely handled, then the subject matter faced is the checking of client identity, i.e., how to determine it is that " client itself holds me effectively
Certificate " is being handled.
Way the more commonly used at present is the image and facial image for allowing client to clap identity card positive and negative respectively, is then passed to
Background audit personnel carry out manual examination and verification., can also be by identity card identification reading instrument by the letter in identity card chip if conditions permit
Breath is read out, and facilitates background audit personnel further to audit identity card surface information and the uniformity of information in chip.It is above-mentioned to do
There is certain defect in method:(1) the identity card positive and negative image and facial image of client, can be by client oneself or others divide
Not independent shooting, background audit personnel can not just confirm whether client itself is shot due to that can not see floor, also
And upload;(2) when client shoots identity card positive and negative image and facial image, due to reasons such as shooting environmental, misoperations
Often cause to shoot not to be apparent from, after upload, if background audit personnel can not see, client can be allowed to re-shoot
And upload, the time of business handling is substantially prolongs, can also allow client to think that comparison is loaded down with trivial details, customer experience is bad;(3) it is most of
Occasion can not use identity card identification reading instrument, and client can only shoot identity card and facial image, therefore background audit by camera
Personnel can not obtain the information in customer's identity card chip, also can not just judge ID Card Image surface information and information in chip
It is whether consistent, so cause background audit personnel can not differentiate the true and false of customer's identity card.
The content of the invention
The shortcoming that first of the present invention aims to overcome that prior art is taken the photograph with deficiency there is provided one kind based on terminal device
The method for realizing long-distance user's authentication as head.
Taken the photograph it is another object of the present invention to overcome the shortcoming of prior art with deficiency there is provided one kind based on terminal device
The system for realizing long-distance user's authentication as head.
First purpose of the present invention is achieved through the following technical solutions:
A kind of method that long-distance user's authentication is realized based on terminal device camera, is comprised the following steps:
S1, the camera for opening remote upload user and local verification user's device therefor, in the video pictures of camera
In generate N number of rectangle frame at random, and random number is carried out from 1 to N to rectangle frame successively, wherein the rectangle frame is used for corresponding table
Show the regional area in video pictures, N is the natural number more than or equal to 3;
S2, from checking action database select essential 3 checkings to act and carry out random number successively, wherein described
Random number is not reproducible and less than or equal to N, the operating instruction that then prompting local verification user acts according to checking successively
Successively specify numbering rectangle frame in complete checking action, while in the rectangle frame target image carry out automatic detection and
Collection is captured, wherein the essential checking action of 3 in the checking action database is by local verification user's face head respectively
As being filled into the X rectangle frame in video pictures, by local verification user's China second-generation identity card filling of groove front to video pictures
In the Y rectangle frame in, the Z rectangle frame being filled into local verification user's China second-generation identity card reverse side in video pictures
In, 1≤X, Y, Z≤N;
S3, the automatic OCR of surface information is carried out to the China second-generation identity card direct picture and China second-generation identity card verso images known
Not, local verification user identity card surface information is obtained, the Ministry of Public Security for then obtaining user by identity card surface information networks
Essential information and human face photo are verified, checking whether identical by comparing identity card surface information and online checking essential information
Whether user identity card is effective identity card;
S4, using Automatic face recognition technology, by the human face photo on the China second-generation identity card direct picture surface, camera
The live facial image of the local verification user of candid photograph and Ministry of Public Security's online checking human face photo are compared mutually two-by-two, are verified
Whether local verification user is;
S5, remote upload user comprehensively audit checking information, manually to China second-generation identity card positive and negative surface information, networking core
Look into information comparing result and face authentication result is audited, judge whether local verification subscriber authentication passes through.
It is preferred that, also comprise the following steps:
S6, the remote upload user by local verification user's checking operation realtime video transmission to backstage so that long-range to examine
The verification operation of core user energy real time inspection local verification user.
It is preferred that, also comprise the following steps:
S7, by local verification user's checking operation video record preserve to remote storage server so that remote upload use
Family can retrieve for examination local verification user's checking operation video at any time.
It is preferred that, automatic detection is carried out to target image in rectangle frame in the step S2 and the detailed process of collection is captured
For:
S201, detect whether target image to be captured is filled into specified rectangle frame, that is, target image to be captured whether and refer to
Fixed rectangle frame overlapping area reaches certain limit;
If the overlapping area of S202, testing result is not reaching to certain limit, it will be prompted to local verification user and do again
Go out checking action, if the overlapping area of testing result reaches certain limit, into next step;
If S203, image to be detected are facial images, treat and capture the index that the picture quality of target is judged
Including brightness of image, image blur, sidelight, backlight, uniform illumination degree, human face posture, expression, in the image of target to be captured
After quality progress judge is qualified, candid photograph collection is carried out to target image, it is right if image to be detected is China second-generation identity card image
The index that the picture quality of target to be captured is judged includes brightness of image, image blur, sidelight, backlight, uniform illumination
Degree, after the picture quality progress judge for capturing target is qualified, candid photograph collection is carried out to target image.
It is preferred that, the step S4 is specifically divided into:
S401, the sheet for calculating the human face photo for obtaining the China second-generation identity card direct picture surface and camera candid photograph respectively
The first Similarity value, the human face photo on the China second-generation identity card direct picture surface between the live facial image of ground checking user
The live people of local verification user that the second Similarity value, the camera between Ministry of Public Security's online checking human face photo are captured
Third phase between face image and Ministry of Public Security's online checking human face photo is like angle value;
S402, first, second, third described Similarity value and default decision threshold be compared respectively, if
Comparative result is all higher than default decision threshold, then makes the checking conclusion for being local verification user.
It is preferred that, the default decision threshold can be preset as three arbitrary judgment thresholds, to obtain higher test
Demonstrate,prove reliability.
It is preferred that, the mode for generating N number of rectangle frame in the step S1 at random in video pictures can be drawn in video
All rectangle frames are drawn in face simultaneously or the checking sequence of movement in the step S2 draws corresponding square successively
Shape frame.
It is preferred that, the checking action of action database is verified in the step S2 also includes following optional action:Will be local
Filled out in the P rectangle frames that the driver's license of checking user is filled into video pictures or by the property ownership certificate of local verification user
It is charged in the Q rectangle frames in video pictures, 1≤P, Q≤N.
Another object of the present invention is achieved through the following technical solutions:
A kind of system that long-distance user's authentication is realized based on terminal device camera, including following devices:
Authentication apparatus for initializing, the device is used to open remote upload user and local verification user's device therefor
Camera, generates N number of rectangle frame, and rectangle frame is compiled at random from 1 to N successively at random in the video pictures of camera
Number, wherein the regional area that the rectangle frame is used in correspondence expression video pictures, N is the natural number more than or equal to 3;
Target image captures harvester, and the device is used to select 3 essential checkings dynamic from checking action database
Make and carry out random number successively, wherein the random number is not reproducible and less than or equal to N, then prompting is locally tested successively
The operating instruction that card user acts according to checking completes checking action in the rectangle frame for specifying numbering successively, while to rectangle frame
Middle target image carries out automatic detection and captured to gather, wherein the essential checking action point of 3 in the checking action database
It is not local verification user's face head portrait to be filled into the X rectangle frame in video pictures, by the generation of local verification user two
It is filled into the Y rectangle frame of the identity card filling of groove front into video pictures, by local verification user's China second-generation identity card reverse side
In the Z rectangle frame in video pictures, 1≤X, Y, Z≤N;
Image OCR identifying devices, the device is used for the China second-generation identity card direct picture and China second-generation identity card reverse side figure
As carrying out the automatic OCR identifications of surface information, local verification user identity card surface information is obtained, is then believed by identity card surface
Breath obtains the Ministry of Public Security's online checking essential information and human face photo of user, by comparing identity card surface information and online checking
Whether essential information is identical, and whether checking user identity card is effective identity card;
Face authentication means, the device is used to utilize Automatic face recognition technology, by China second-generation identity card front
The live facial image of local verification user and Ministry of Public Security's online checking face that the human face photo of imaging surface, camera are captured
Photo is compared mutually two-by-two, verifies whether to be local verification user;
Authentication comprehensive descision device, the device comprehensively audits checking information for remote upload user, manually to two
Generation ID positive and negative surface information, online checking information comparing result and face authentication result are audited, and judge this
Whether ground checking subscriber authentication passes through.
It is preferred that, also including following devices:
Real-time video transmission device, the device is used to local verification user's checking operating realtime video transmission to backstage
Remote upload user so that the verification operation of remote upload user energy real time inspection local verification user;
Video recording device, the device, which is used to preserve local verification user's checking operation video record to long-range storage, to be taken
Business device so that remote upload user can retrieve for examination local verification user's checking operation video at any time.
It is preferred that, the target image captures harvester and specifically includes following modules:
Image and rectangle frame registration detection module, the module are specified for detecting whether target image to be captured is filled into
Whether rectangle frame, that is, target image to be captured reaches certain limit with the rectangle frame overlapping area specified;
Main control device, if the overlapping area that the module is used for testing result is not reaching to certain limit, will be prompted to
Local verification user makes checking action again, if the overlapping area of testing result reaches certain limit, into next step;
Image quality assessment and candid photograph acquisition module, if the module is facial image for image to be detected, are treated
Capture the index judged of picture quality of target including brightness of image, image blur, sidelight, backlight, uniform illumination degree,
Human face posture, expression, after the picture quality progress judge for capturing target is qualified, carry out candid photograph collection, such as to target image
Image really to be detected is China second-generation identity card image, treat capture target the index judged of picture quality it is bright including image
Degree, image blur, sidelight, backlight, uniform illumination degree, wait capture target picture quality carry out judge it is qualified after, to mesh
Logo image carries out candid photograph collection.
It is preferred that, the face authentication means specifically include following modules:
Similarity calculation module, the module is used for, calculates the people for obtaining the China second-generation identity card direct picture surface respectively
The first Similarity value, the China second-generation identity card between the live facial image of local verification user that face photo and camera are captured
The second Similarity value, the camera between the human face photo and Ministry of Public Security's online checking human face photo on direct picture surface are grabbed
Third phase between the live facial image of the local verification user of bat and Ministry of Public Security's online checking human face photo is like angle value;
Decision threshold comparison module, the module respectively judges first, second, third described Similarity value with default
Threshold values is compared, if comparative result is all higher than default decision threshold, is made and is testing for local verification user
Conclusion is demonstrate,proved, wherein the default decision threshold can be preset as three arbitrary judgment thresholds, can with the checking for obtaining higher
By property.
The present invention has the following advantages and effect relative to prior art:
1st, the method and system that the present invention is provided, can capture identity card direct picture and client's facial image simultaneously
Arrive, and due to can also be recorded when shooting by shooting process and be uploaded to background audit personnel in real time simultaneously, therefore, it is possible to
Effectively take precautions against others and usurp the risk that customer's identity card image and head portrait are cheated.
2nd, the method and system requirement client that the present invention is provided in shooting process, coordinates prompting to act at random, can
Effectively take precautions against by prerecording the risk that the modes such as video are cheated.
3rd, the method and system that the present invention is provided demonstrate,proves surface information, and acquisition of information public security accordingly by automatic identification identity
Portion's online checking essential information and human face photo, believe substantially finally by identity card surface essential information is compared with online checking
Breath, determines identity card validity, while passing through face recognition technology, checking shooting facial image, identity card surface face
The uniformity of image and online checking facial image, it is ensured that be that client itself holds personal identification papers's transacting business, it is effectively anti-
Other people risks for cheating of model.
4th, the method and system that the present invention is provided is capable of the identity card surface image and user's face figure of automatic decision shooting
The quality of picture, finds image off quality in time so that user ensures the picture quality that user uploads in transacting business
It is qualified, it is to avoid allow the user subsequently to shoot and upload again image, so as to improve Consumer's Experience, also improves business handling
Efficiency.
5th, the method and system that the present invention is provided can effectively solve to utilize remote terminal by the measure of above-mentioned several respects
Camera realizes the high efficiency and integrity problem of long-distance user's authentication so that some traditional businesses of some industries are moved to
Handle and be possibly realized on internet and terminal device, be conducive to improving industry operating efficiency, lift industry production power.
Brief description of the drawings
Fig. 1 is a kind of method flow diagram that long-distance user's authentication is realized based on terminal device camera of the present invention;
Fig. 2 is the method flow signal for realizing long-distance user's authentication in the present embodiment one based on terminal device camera
Figure;
Fig. 3 is that the system for realizing long-distance user's authentication based on terminal device camera in the present embodiment two constitutes frame
Figure.
Embodiment
To make the objects, technical solutions and advantages of the present invention clearer, clear and definite, develop simultaneously embodiment pair referring to the drawings
The present invention is further described.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and without
It is of the invention in limiting.
Embodiment one
Fig. 2 is a kind of method flow that long-distance user's authentication is realized based on terminal device camera proposed by the present invention
Schematic diagram.In conjunction with Fig. 2, to a kind of side that long-distance user's authentication is realized based on terminal device camera proposed by the present invention
Method is illustrated.
The a kind of of the proposition of the present embodiment one realizes that the method for long-distance user's authentication includes based on terminal device camera
Following steps:
Step 100:Open camera;
Open the camera of remote validation user's device therefor, such as mobile phone camera.Described camera can be various
Conventional camera, the shooting of camera, mobile phone that such as USB camera, notebook computer are carried is first-class.
Step 101:Random generation prompt action series;
Better action is pre-designed, is included but is not limited to:It is required that head is filled into video pictures by remote validation user
In designated area, require remote validation user by designated area of the China second-generation identity card filling of groove front into video pictures, require
Designated area that China second-generation identity card reverse side is filled into video pictures by remote validation user, require that remote validation user will drive
Demonstrate,prove designated area of the filling of groove front into video pictures, require that driver's license reverse side is filled into video pictures by remote validation user
Designated area, require the designated area that property ownership certificate is placed into video pictures by remote validation user.Then according to actual need
Will, random generation needs remote validation user to coordinate the action done, and identity card positive and negative is such as filled into video pictures into one
In the rectangle frame generated at random, and in the rectangle frame that generates at random of one that the number of people is filled into video pictures.
Wherein, the particular number of rectangle frame can be set according to actual requirement, and the position of rectangle frame can be randomly generated, big I
Set or be randomly provided according to actual conditions.Several rectangle frames can be drawn simultaneously, or draw successively according to certain step one or
Multiple rectangle frames.
Step 102:Real-time video is transmitted to background audit personnel;
Operate realtime video transmission to the background audit personnel (i.e. remote validation user) of distal end local verification user, make
Obtaining background audit personnel can see that user operates video in real time.Real-time video can be transmitted by conventional transmission network, for example
Cable broadband, WIFI, 3G, 4G etc..
Step 103:Recorded video;
The real-time video that local verification user is operated is recorded, and supports various conventional forms, such as MP4, AVI,
FLV etc..The video of recording can make color video or achromaticity video.The resolution ratio of video can be according to actual feelings
Condition is set.The video file of recording is stored in by support is locally or remotely stored server;Support to enter the video file of recording
Row is checked.
Step 104:Prompting user acts;
Prompting local verification user does the action that step 101 is generated, and such as prompting user first fills identity card positive and negative
In a rectangle frame into video pictures;Then in the rectangle frame number of people being filled into video pictures again.Action
Prompting can be by various effective manners, such as being pointed out by text prompt, voice message, animation.
Step 105:Detect target image to be captured in real time;
During local verification user acts, real time automatic detection simultaneously captures target image, and such as identity card is positive and negative
Face image and facial image etc..
Step 106:Target image size to be captured, position and quality assessment;
Judge whether target image to be captured is filled into specified rectangle frame, that is, target image to be captured whether and the square specified
Shape frame overlapping area reaches certain limit.Certain limit is not reaching to, local verification user is will be prompted to and acts again.
If the size and location of target image to be captured has met set condition, next step will be treated and capture target
Picture quality is judged.To facial image, the index of judge includes but is not limited to brightness of image, image blur, sidelight, the back of the body
Light, uneven illumination are even, human face posture, expression etc., judge and qualified are just captured.To identity card positive and negative image, judge
It is even etc. that index includes but is not limited to brightness of image, image blur, sidelight, backlight, uneven illumination, judges and qualified is just grabbed
Clap.
Step 107:Target image to be captured is obtained;
Size, position and the qualified target image of quality assessment are captured, object region to be captured is intercepted.
Step 108:Identity card positive and negative image OCR is recognized;
The automatic OCR identifications of surface information are carried out to identity card direct picture and identity card verso images, user identity is obtained
Demonstrate,prove surface information;Then the Ministry of Public Security's online checking essential information and human face photo of user is obtained by identity card surface information.
Whether identical by comparing identity card surface information and online checking essential information, whether checking user identity card is effective identity
Card.
Wherein, OCR (optical character identification, Optical Character Recognition), be by image procossing and
The meaning that optical character is identified mode identification technology, is a weight in automatic identification technology research and application field
Will aspect.It is a kind of software engineering that can be entered into word automatic identification in computer, is and supporting main of scanner
Software, belongs to non-keyboard input category, it is necessary to which image input device is mainly scanner is engaged.
Step 109:Face authentication;
Using Automatic face recognition technology, by the face on identity card direct picture surface, the live face figure of the user captured
Picture and Ministry of Public Security's online checking human face photo are compared mutually, and whether verify them is same person.Specifically, identity card is calculated
The face on direct picture surface, the live facial image of the user captured and Ministry of Public Security's online checking human face photo are between any two
Similarity, obtains 3 Similarity values, respectively between the live facial image of the face on identity card direct picture surface and user
Similarity 2 and identity card front elevation between similarity 1, the live facial image of user and Ministry of Public Security's online checking human face photo
Similarity 3 between image surface facial image and Ministry of Public Security's online checking human face photo.If 3 similarities are both greater than default
Threshold value, then it is assumed that above-mentioned 3 human face photos belong to a people.Above-mentioned 3 similarities can be compared from different threshold values respectively
Compared with to obtain higher reliability.
Step 110:Judge whether authentication passes through;
The last comprehensive real-time video of background audit personnel checks that result, the video recorded check result, identity card positive and negative
Surface information and online checking information comparing result and face authentication result, judge that client identity verifies whether to pass through, are
It is no to possess legitimacy.
Embodiment two
Fig. 3 is a kind of system composition that long-distance user's authentication is realized based on terminal device camera proposed by the present invention
Block diagram.In conjunction with Fig. 3, to a kind of system that long-distance user's authentication is realized based on terminal device camera proposed by the present invention
It is illustrated.
It is proposed by the present invention a kind of to realize that the system of long-distance user's authentication includes based on terminal device camera:
Subsystem 200:Video capture subsystem
Video is operated by calling camera to shoot user.Camera can be various conventional cameras, and such as USB takes the photograph
The shooting of the camera, mobile phone that carry as head, notebook computer is first-class.
Subsystem 201:Real-time video checks subsystem
It can allow the operation video of examination personnel real time inspection user.Real-time video supports that conventional transmission network is passed
It is defeated, such as cable broadband, WIFI, 3G, 4G.
Subsystem 202:User's execution action generation subsystem
System is pre-designed better action, includes but is not limited to:It is required that head is filled into video pictures by user
Designated area, require user by designated area of the China second-generation identity card filling of groove front into video pictures, require user by two generation bodies
Part card reverse side is filled into the designated area in video pictures.Other any effective actions can be added thereto.According to reality
Need, system produces the action sequence that user needs to perform.According to the action sequence of generation, finished in video pictures corresponding
Rectangle frame, and point out user to perform corresponding actions.Identity card positive and negative and user's head are for example filled into specified rectangle respectively
In frame.The particular number of rectangle frame can be configured according to the action sequence of generation, and the position of rectangle frame can be randomly generated, size
It can set or be randomly provided according to actual conditions.Several rectangle frames can be drawn simultaneously, or draw according to certain step one successively
Or multiple rectangle frames.Prompting mode can be pointed out by word, voice or animation.
Subsystem 203:Video record subsystem
The video of user's operating process is recorded, various conventional forms are supported, such as MP4, AVI, FLV.Record
The video of system can make color video or achromaticity video.The resolution ratio of video can be set according to actual conditions.Branch
Hold the video file of recording being stored in and server is locally or remotely stored;Support to check the video file of recording.
Subsystem 204:User performs motion detection subsystem
Detection user whether acted according to user's execution generate subsystem 202 prompting perform some or certain it is several dynamic
Make, and testing result is fed back into user's execution action generation subsystem.If detect user performs some according to prompting
Or certain several action, then the default corresponding photo of capturing system, for example, detect user and head be filled into specified rectangular area,
The corresponding facial image of user;Detect user and identity card positive and negative is filled into specified rectangular area, then capture corresponding body
Part card positive and negative image.
Subsystem 205:OCR recognition subsystems
By OCR (optical character identification) technology, user is performed into the China second-generation identity card that motion detection subsystem 204 is shot
Surface information is identified in positive and negative image, and acquisition of information Ministry of Public Security online checking essential information and human face photo accordingly,
And human face photo is passed into face alignment subsystem 206.By comparing identity card surface information and online checking essential information
Whether identical, whether checking user identity card is effective identity card.
Subsystem 206:Face alignment subsystem
User is performed into user's human face photo that motion detection subsystem 204 photographs, in China second-generation identity card direct picture
Ministry of Public Security's online checking human face photo that facial image and OCR recognition subsystems 205 are obtained is compared two-by-two, according to two-by-two
The threshold value for comparing obtained Similarity value and systemic presupposition is compared, to judge whether above-mentioned 3 facial images belong to same
It is personal.
Last synthesis real-time video checks subsystem 201, video record subsystem 203, OCR recognition subsystems 205, face
The result of subsystem 206 is compared, very can reliably judge whether subscriber authentication passes through, if possess legitimacy.
It is worth noting that, in said system embodiment, each included device and unit are simply according to function logic
Divided, but be not limited to above-mentioned division, as long as corresponding function can be realized;In addition, each device and list
The specific name of member is also only to facilitate mutually distinguish, the protection domain being not intended to limit the invention.
Above-described embodiment is preferably embodiment, but embodiments of the present invention are not by above-described embodiment of the invention
Limitation, other any Spirit Essences without departing from the present invention and the change made under principle, modification, replacement, combine, simplification,
Equivalent substitute mode is should be, is included within protection scope of the present invention.