Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides an identity authentication method and device.
The identity authentication device may be integrated in a terminal, as shown in fig. 1a, and may be installed in a door access machine in the form of a client, for example.
Specifically, when a user needs to perform identity authentication, when an access control machine where an identity authentication device is located detects an identity authentication request of the user, network environment information of the access control machine and a face image of the user are collected, then, the identity authentication device acquires an identity authentication mode and a reference data acquisition mode corresponding to the network environment information, reads data from a database of the access control machine as a reference data set according to the reference data acquisition mode, then, matches the data in the face image and the reference data set according to the corresponding authentication mode, and when a matching result meets a preset condition, determines that the identity authentication of the user passes, and controls the access control machine to allow the user to pass.
For example, when the user clicks a trigger key for authentication, such as clicking an "authentication" control key on the access control machine, the access control machine performs face recognition on the user based on an authentication request, so as to obtain a face image of the user, and the access control machine also obtains current network environment information. The access control machine determines a corresponding verification mode and a reference number acquisition mode through current network environment information, reads data from a database of the access control machine as a reference data set according to the reference data acquisition mode, then matches the face image with the data in the reference data set according to the corresponding verification mode, and determines that the identity verification of the user passes and controls the access control machine to allow the user to pass when a matching result meets a preset condition.
It should be noted that the database of the access control device is set in the access control device, so that when the user needs to perform authentication, and before the user initiates authentication, the database of the access control device stores an image of the user (i.e., a registration image), and the access control device can perform authentication on the user according to the registration image, thereby improving the face authentication efficiency. It should be noted that, because the environmental factors when the user enters the registration image are different from the environmental factors when the user performs the authentication, when the terminal is connected to the server via the network, the database of the access control device may be updated according to the network database (i.e., the database set in the server), so as to improve the validity of the authentication.
The following detailed description is given for each example, and it should be noted that the description order of the following examples is not intended to limit the priority order of the examples.
An identity verification method comprising: when an authentication request of a user is detected, acquiring network environment information of the access control machine and a face image of the user, acquiring an authentication mode and a reference data acquisition mode corresponding to the network environment information, reading data from a database of the access control machine as a reference data set according to the reference data acquisition mode, finally matching the data in the face image and the reference data set according to the authentication mode, if a matching result meets a preset condition, determining that the authentication of the user passes, and controlling the access control machine to allow the user to pass.
Referring to fig. 1b, fig. 1b is a schematic flow chart of an authentication method according to an embodiment of the present invention. The specific process of the identity authentication method may be as follows:
101. when an authentication request of a user is detected, network environment information of the access control machine and a face image of the user are collected.
For example, an authentication request sent by a user through triggering an authentication trigger key may be received, for example, the user may click or slide a trigger key such as "unlock" or "verify" to trigger the authentication request, and so on. Then, the current network environment information and the face image of the user are collected according to the identity authentication request. The network environment information may include a network connection mode and a network access type. The network connection mode may include an online mode and an offline mode, and the network access type may include data access and wireless access. The data access may include a local area network or a mobile network, and the wireless access may include wireless broadband. In addition, it should be noted that, due to noise, illumination or the device itself, the quality of the original image obtained is usually not very high, so that the image is preprocessed, so that the image is clearer, the image features are more obvious, and the image is convenient to further identify and analyze. The method for preprocessing the image comprises color space change and denoising. In this embodiment, the obtained original image is mainly subjected to color space change to obtain a face image.
It should be noted that, in order to improve the accuracy of the identity authentication, the living body detection may be performed on the human face, that is, in some embodiments, the step "acquire the network environment information and the human face image of the user when the identity authentication request of the user is detected" is further specifically included:
(11) and acquiring heat information of the face image.
(12) And performing living body detection on the user according to the heat information.
When the living body detection result indicates that the user is a living body,step 102 is executed.
102. And acquiring an identity verification mode and a reference data acquisition mode corresponding to the network environment information.
The corresponding authentication method may be obtained according to the network environment information, for example, the corresponding authentication method may be obtained according to the network connection mode. For another example, the corresponding authentication method may be obtained according to the security level of the actual scene and the current network state, that is, in some embodiments, the step "obtaining the authentication method and the reference data obtaining mode corresponding to the network environment information" may specifically include:
(21) and determining the current network state and the current security level according to the network environment information.
The current network state may be determined to be an online state or an offline state according to the network connection mode, and the current security level may be determined according to the network access type, for example, when the network access type is wireless access, the current security level may be determined to be a low level, and when the network access type is data access, the current security level may be determined to be a high level.
(22) And if the current network state is the online state, selecting an identity verification mode corresponding to the current security level from a preset verification mode set, and determining that the reference data acquisition mode is the network mode.
(23) And if the current network state is an off-line state, selecting an identity verification mode corresponding to the current security level from a preset verification mode set, and determining that the reference data acquisition mode is a local mode.
It should be noted that the current security level refers to the security level of the current scene, and the preset mode set may include a plurality of preset modes, for example, specifically, in a company, the access control level of a corporate financial office is higher than the access control level of a corporate gate, when a user needs to enter the corporate gate, it is assumed that the access control level of the corporate gate is low, if the current network state is an online state, an identity verification mode corresponding to the low level is selected from the preset verification modes, and it is determined that the reference data acquisition mode is a network mode; and if the current network state is an offline state, selecting an identity verification mode corresponding to a low level from preset verification modes, and determining that the reference data acquisition mode is a local mode.
103. And reading data from a database of the access control machine as a reference data set according to the reference data acquisition mode.
Taking a company as an example, if the database of the access control machine includes data of a plurality of access control machines, such as data of an access control machine in a financial office and data of an access control machine in a general office, then, the corresponding registration image can be screened according to the corresponding access control machine as a reference data set, and if the financial office obtains the registration image corresponding to the financial office, the registration image can be compared with the registration images of other offices.
Or, it can also be understood that the data in the database of the access control device is primarily screened, for example, if the current face image can be determined as a female, only a female registration image needs to be acquired for comparison, so that the calculation amount can be reduced.
The reference data acquisition mode can comprise a network mode and a local mode, and if the reference data acquisition mode is the network mode and the network database has data update, the database of the access control machine can be updated through the updated data, then the data is read from the updated database to be used as a reference data set, and the user is authenticated through the reference data set, so that the reliability of authentication can be improved; if the reference data obtaining mode is the local mode, reading data from the database of the access control machine as a reference data set, and performing authentication on the user through the reference data set obtained from the database of the access control machine, which may improve the efficiency of the authentication, that is, in some embodiments, the step "reading data from the database of the access control machine as the reference data set according to the reference data obtaining mode" may specifically include:
(31) if the reference data acquisition mode is a network mode, acquiring updated data through a current network when the updated data exist in a network database, updating the database of the access control machine according to the acquired updated data, and reading the data from the updated database as a reference data set;
(32) and if the reference data acquisition mode is the local mode, reading data from a database of the access control machine as a reference data set.
104. And matching the face image with the data in the reference data set according to an identity verification mode.
Matching the face image with the data in the reference data set according to an identity verification mode, and executing thestep 105 when the matching result of the face image and the data in the reference data set meets a preset condition; when the matching result of the face image and the data in the reference data set does not meet the preset condition, the terminal can generate the authentication failure information of the user and display corresponding prompt information of the authentication failure so that related personnel can know the information in time. The authentication means may be determined according to the current security level, and the data in the reference data set may include the registered image and the associated information.
For example, if the current security level is a low level, the similarity between the registered image in the reference data set and the face image of the user may be determined, and when the similarity between the registered image in the reference data set and the face image of the user is greater than a first preset threshold, it may be determined that a matching result between the face image and the data in the reference data set meets a preset condition, that is, in some embodiments, the step "matching the face image and the data in the reference data set according to an authentication manner" may specifically include:
(41) and calculating the similarity between the face image and the registered image in the reference data set.
(42) And if the similarity is greater than a first preset threshold, determining that the matching result of the face image and the data in the reference data set meets a preset condition.
Specifically, when an employee A of a company T needs to enter the company, the entrance guard machine scans the employee A and then calculates the similarity between the face image of the employee A and the registered image in the reference data set, and when the similarity is greater than a first preset threshold value, it is determined that the matching result of the data in the employee A and the registered image in the reference data set meets a preset condition.
For another example, if the current security level is a low level, the identity authentication may be performed on the user through the registered image and the associated information, when the similarity between the registered image in the reference data set and the face image of the user is greater than a second preset threshold, the identity information of the registered image whose similarity is greater than the second preset threshold is obtained, and when the associated information corresponding to the identity information is stored in the reference data set, it is determined that the matching result between the face image and the data in the reference data set satisfies the preset condition, that is, in some embodiments, the step "matching the face image and the data in the reference data set according to the identity authentication manner" may specifically include:
(51) and calculating the similarity between the face image and the registered image in the reference data set.
(52) And acquiring the identity information of the registered image with the similarity larger than a second preset threshold value.
(53) And if the reference data set stores the associated information corresponding to the identity information, determining that the matching result of the face image and the data in the reference data set meets the preset condition.
Specifically, when a visitor A needs to visit a company T, the entrance guard machine scans the visitor A, calculates the similarity between a face image of the visitor A and a registered image in a reference data set, and acquires identity information of the registered image with the similarity larger than a second preset threshold value, for example, the second preset threshold value is 85%, the identity information can be the visitor, if the reference data set stores associated information corresponding to the identity information, the matching result of the face image and the data in the reference data set meets a preset condition, for example, if the reference data set stores a mobile phone number of an inviter corresponding to the visitor, the matching result of the face image and the data in the reference data set meets the preset condition; for another example, if the reference data set stores a face image of an inviter corresponding to the visitor, it is determined that a matching result between the face image and data in the reference data set satisfies a preset condition.
In addition, the association information may be pre-established by the operation and maintenance personnel, or may be pre-established by the terminal, which is determined according to the actual situation. That is, the step of "obtaining the identity information of the registered image whose similarity is greater than the second preset threshold", may specifically include:
(61) and setting the identity information of each registered image in the database of the access control machine.
(62) Obtaining a registration image of an object associated with the identity information to obtain an associated object image
(63) And establishing an association relation between the identity information and the associated object image to obtain the associated information.
(64) And storing the associated information in a database of the access control machine.
It should be further noted that the associated object refers to an inviter having an association relationship with the user, the associated object image refers to a registered image of the inviter, for example, when there are a plurality of visitors needing to visit the T company, the door access control machine stores the identity information of the visitors into the corresponding registered images, then, the door access control machine obtains the registered image of the associated object with the identity information, for example, the door access control machine obtains the registered image of the inviter associated with the identity information of the visitor a, then, establishes an association relationship between the identity information of the visitor a and the registered image of the inviter, obtains the association information corresponding to the identity information of the visitor a, and finally, stores the association information in a database of the door access control machine.
For another example, if the current security level is a high level, it may be determined whether a face deflection angle of the face image is smaller than a preset angle through a feature point set of the face image, when the face deflection angle is smaller than the preset angle, a registered image matched with the feature point set is obtained in a reference data set according to the feature point set, and when a similarity between the face image and the registered image is greater than a third preset threshold, it is determined that a matching result of the data in the face image and the reference data set meets a preset condition.
Specifically, when an employee a of a company T needs to enter a place with a higher security level through an access control machine, such as a financial office, the access control machine scans the employee a, when it is determined that eyes of the employee a are directly looking at the access control machine, that is, when a face deflection angle of the employee a is smaller than a preset angle, a registration image matched with the feature point set can be obtained in the reference data set based on the feature point set of the face image, and when a similarity between the face image of the employee a and the registration image is larger than a third preset threshold value, it is determined that a matching result of the face image and data in the reference data set meets a preset condition.
It should be noted that the preset condition may be preset by the operation and maintenance staff, and when the matching result meets the preset condition,step 105 is executed; when the matching result does not meet the preset condition, the authentication failure information of the user can be generated, and the corresponding prompt information that the authentication fails is displayed, so that the relevant personnel can know in time.
In order to ensure the accuracy of the data of the database of the access control machine, the identity authentication method may further include:
receiving a data updating packet periodically issued by a network database, and updating the database of the access control machine according to the data updating packet; or monitoring the data in the network database according to a preset period, and updating the database of the access control machine according to the changed data when the monitored data is changed.
The preset period may be preset by an operation and maintenance person, for example, the preset period may be set to 30 minutes, 40 minutes, or 180 minutes, and the like, which is not described herein again specifically according to an actual situation.
105. And determining that the user passes the authentication, and controlling the access control machine to allow the user to pass.
When an identity authentication request of a user is detected, acquiring network environment information of the access control machine and a face image of the user, then acquiring an identity authentication mode and a reference data acquisition mode corresponding to the network environment information, reading data from a database of the access control machine as a reference data set according to the reference data acquisition mode, then matching the data in the face image and the reference data set according to the identity authentication mode, and if a matching result meets a preset condition, determining that the identity authentication of the user passes and controlling the access control machine to allow the user to pass. Compared with the existing face verification scheme, the face verification can be carried out according to the current network environment, when the connection between the server side and the client side is abnormal, data can be read from the database of the access control machine, the user is subjected to identity verification according to the data read from the database of the access control machine, the problems that the face verification time is long and the face verification fails cannot occur, and therefore the face verification efficiency and effectiveness can be improved.
The method described in the examples is further detailed below by way of example.
In this embodiment, the authentication apparatus is specifically integrated in a terminal as an example.
Referring to fig. 2a, an identity authentication method may specifically include the following processes:
201. when the access control machine detects an authentication request of a user, network environment information of the access control machine and a face image of the user are collected.
For example, the gate inhibition machine may receive an authentication request sent by a user by triggering an authentication trigger key, for example, the user may click or slide a trigger key such as "unlock" or "verify" to trigger the authentication request, and so on. Then, the access control machine can acquire the current network environment information and the face image of the user according to the authentication request. The network environment information may include a network connection mode and a network access type. The network connection mode may include an online mode and an offline mode, and the network access type may include data access and wireless access. The data access may include a local area network or a mobile network, and the wireless access may include wireless broadband. In addition, it should be noted that, due to noise, illumination or the device itself, the quality of the original image obtained is usually not very high, so that the image is preprocessed, so that the image is clearer, the image features are more obvious, and the image is convenient to further identify and analyze. The method for preprocessing the image by the access control machine comprises color space change and denoising. In this embodiment, the obtained original image is mainly subjected to color space change to obtain a face image.
202. The entrance guard machine obtains the heat information of the face image.
For example, the door access control device may acquire heat information of a face image of a user through a three-dimensional structured light technology. Specifically, the access control machine can carry out face image acquisition of a plurality of angles to user's face through infrared camera and infrared structured light projector, and then obtains the heat information of face image.
Here, after the structured light projects specific light information on the surface of the object, information such as the position and depth of the object can be calculated from the change of the light signal caused by the object, and a three-dimensional image of the object in the space projected by the structured light can be restored.
203. The door access machine judges whether the face in the face image is a living body or not according to the heat information, and if the face in the face image is the living body, the door access machine can executestep 204; if the face in the face image is not a living body, the access control machine may not invoke a verification mode corresponding to the network environment information, and optionally, the access control machine may generate corresponding non-living body prompt information and display the non-living body prompt information, so that the relevant person may learn in time.
For example, the door access control device may determine whether the live body value in the thermal information is equal to a preset live body value, determine that the face in the face image is a live body if the live body value is equal to the preset live body value, and determine that the face in the face image is a non-live body if the live body value is not equal to the preset live body value.
The preset live body value can be set according to the requirements of practical application, for example, the preset live body value can be set to 1, and at this time, if the live body value in the heat information detected by the access control machine is 1, the human face in the human face image can be determined to be the live body. For another example, the preset live body value may be 0.8, and then, when the live body value in the heat information detected by the door access controller is 0.6, it may be determined that the face in the face image is not a live body, and so on.
204. And the access control machine acquires an identity verification mode and a reference data acquisition mode corresponding to the network environment information.
It should be noted that the current security level refers to the security level of the current scene, and the preset mode set may include a plurality of preset modes, where the access control unit may obtain a corresponding verification mode according to the network environment information, for example, the access control unit may obtain a corresponding verification mode according to the network connection mode. For another example, the access control machine may further obtain a corresponding verification mode according to the security level of the actual scene and the current network state, for example, when the user needs to enter the company gate, if the access control level of the company gate is a low level and the current network state of the access control machine of the company gate is an online state, select an identity verification mode corresponding to the low level from a preset verification mode set, and determine that the reference data obtaining mode is the network mode; if the access control level of a company gate is high and the current network state of an access control machine of the company gate is an online state, selecting an identity verification mode corresponding to the high level from a preset verification mode set, and determining that a reference data acquisition mode is a network mode; for another example, if the access control level of the company gate is a low level and the current network state of the access control machine of the company gate is an offline state, selecting an identity verification mode corresponding to the low level from a preset verification mode set, and determining that the reference data acquisition mode is a local mode; if the access control level of the company gate is a high level and the current network state of the access control machine of the company gate is an offline state, selecting an identity verification mode corresponding to the high level from a preset verification mode set, and determining that the reference data acquisition mode is a local mode. After the access controller obtains the authentication mode and the reference data obtaining mode corresponding to the network environment information,step 205 is executed.
205. And the door access machine matches the face image with the data in the reference data set according to an identity verification mode.
The entrance guard machine matches the face image with the data in the reference data set according to the identity verification mode, and executesstep 206 when the matching result of the face image and the data in the reference data set meets the preset condition; when the matching result of the face image and the data in the reference data set does not meet the preset condition, the access control machine can generate the authentication non-passing information of the user and display the corresponding prompt information that the authentication is not passed so that related personnel can know the information in time.
The authentication mode may be determined according to the current security level, and the data in the reference data set may include a registration image and associated information.
For example, referring to fig. 2b, when an employee a of a company T needs to enter the company through an entrance guard of a gate, the security level of the entrance guard of the gate is low, the reference data acquisition mode of the entrance guard of the gate is a network mode, the entrance guard of the gate acquires updated data through a current network when it is determined that updated data exists in a network database, the database of the entrance guard of the gate is updated according to the acquired updated data, the data is read from the updated database as a reference data set, after the employee a issues an identity verification request to the entrance guard of the gate, the entrance guard of the gate acquires a face image of the employee a, the similarity between the face image of the employee a and a registration image in the reference data set is calculated, and when the similarity between the registration image in the reference data set and the face image of the user is greater than a preset threshold, the first preset threshold may be 80%, when the similarity between the registered image in the reference data set and the face image of the user is greater than 80%, it can be determined that the matching result of the employee a and the data in the reference data set meets the preset condition.
For another example, please continue to refer to fig. 2b, a visitor a needs to visit a company T, when the visitor a needs to enter the company through an entrance guard of a gate, the security level of the entrance guard of the gate is low, the reference data acquisition mode of the entrance guard is a network mode, the entrance guard acquires updated data through a current network when it is determined that updated data exists in a network database, the database of the entrance guard of the gate is updated according to the acquired updated data, the data is read from the updated database as a reference data set, after the visitor a initiates an identity verification request to the entrance guard of the gate, when the similarity between a registered image in the reference data set and a face image of a user is greater than a second preset threshold, the second preset threshold may be 85%, identity information of more than 85% of all registered images may be acquired, the identity information may be a visitor, if the reference data set stores the associated information corresponding to the identity information, determining that the matching result of the face image and the data in the reference data set meets a preset condition, for example, if the reference data set stores the mobile phone number of an inviter corresponding to a visitor, determining that the matching result of the face image and the data in the reference data set meets the preset condition; for another example, if the reference data set stores a face image of an inviter corresponding to the visitor, it is determined that a matching result between the face image and data in the reference data set satisfies a preset condition.
For another example, referring to fig. 2b, when employee a of company T needs to enter the financial room through the entrance guard, the security level of the entrance guard of the financial room is high, the reference data acquisition mode of the access control machine in the financial room is a network mode, when the access control machine in the financial room determines that updated data exists in a network database, the updated data is acquired through the current network, updating a database of the door access machine of the financial room according to the obtained updated data, reading the data from the updated database as a reference data set, enabling the door access machine to be based on the feature point set of the face image, and acquiring a registered image matched with the feature point set in the reference data set, and determining that the matching result of the face image and the data in the reference data set meets a preset condition when the similarity between the face image of the employee A and the registered image is greater than a third preset threshold value.
Optionally, in some embodiments, the reference data obtaining mode of the door access device is a local mode, please refer to fig. 2c, the door access device may read data from a database of the door access device as a reference data set, and in addition, when the reference data obtaining mode of the door access device is the local mode, the method for matching the face image with the data in the reference data set according to the authentication manner is similar to that in the previous embodiment, please refer to the previous embodiment, which is not described herein again.
In order to ensure the accuracy of the data of the database of the access control machine, the identity authentication method may further include:
the entrance guard machine can receive a data update package periodically issued by a network database, and the entrance guard machine updates the database of the entrance guard machine according to the data update package; or, the access control machine monitors the data in the network database according to a preset period, and when the access control machine monitors that the data changes, the access control machine updates the database of the access control machine according to the changed data.
The preset period may be preset by an operation and maintenance person, for example, the preset period may be set to 30 minutes, 40 minutes, or 180 minutes, and the like, which is not described herein again specifically according to an actual situation.
206. And the entrance guard machine determines that the user passes the authentication and allows the user to pass.
When the access control machine detects an authentication request of a user, network environment information and a face image of the user are collected, then the access control machine obtains an authentication mode and a reference data obtaining mode corresponding to the network environment information, the access control machine reads data from a database of the access control machine as a reference data set according to the reference data obtaining mode, then the access control machine matches the face image with the data in the reference data set according to the authentication mode, and if the matching result meets a preset condition, the access control machine determines that the authentication of the user passes and allows the user to pass. Compared with the existing face verification scheme, the face verification can be carried out according to the current network environment, when the connection between the server side and the client side is abnormal, data can be read from the database of the access control machine, the user is subjected to identity verification according to the data read from the database of the access control machine, the problems that the face verification time is long and the face verification fails cannot occur, and therefore the face verification efficiency and effectiveness can be improved.
In order to better implement the authentication method provided by the embodiment of the present invention, an embodiment of the present invention further provides an authentication device (referred to as an authentication device for short) based on the above. The meaning of the noun is the same as that in the authentication method, and specific implementation details can refer to the description in the method embodiment.
Referring to fig. 3a, fig. 3a is a schematic structural diagram of an identity verification apparatus according to an embodiment of the present invention, where the identity verification apparatus may include anacquisition module 301, anacquisition module 302, areading module 303, amatching module 304, and adetermination module 305, which may specifically be as follows:
theacquisition module 301 is configured to acquire network environment information of the access control device and a face image of a user.
For example, theacquisition module 301 may receive an authentication request sent by a user by triggering an authentication trigger key, for example, the user may click or slide a trigger key such as "unlock" or "verify" to trigger the authentication request, and so on. Then, the current network environment information and the face image of the user are collected according to the identity authentication request. The network environment information may include a network connection mode and a network access type. The network connection mode may include an online mode and an offline mode, and the network access type may include data access and wireless access. The data access may include a local area network or a mobile network, and the wireless access may include wireless broadband. In addition, it should be noted that, due to noise, illumination or the device itself, the quality of the original image obtained is usually not very high, so that the image is preprocessed, so that the image is clearer, the image features are more obvious, and the image is convenient to further identify and analyze. The method for preprocessing the image comprises color space change and denoising. In this embodiment, the obtained original image is mainly subjected to color space change to obtain a face image
An obtainingmodule 302, configured to obtain an authentication method and a reference data obtaining mode corresponding to the network environment information.
The corresponding authentication method may be obtained according to the network environment information, for example, the corresponding authentication method may be obtained according to the network connection mode. For another example, a corresponding verification mode may be obtained according to the security level of the actual scene and the current network state. In some embodiments, the obtainingmodule 302 may specifically include: the device comprises a determining unit, a first selecting unit and a second selecting unit. The determining unit is used for determining a current network state and a current security level according to network environment information, the first selecting unit is used for selecting an identity verification mode corresponding to the current security level from a preset verification mode set and determining that a reference data acquisition mode is a network mode, and the second selecting unit is used for selecting an identity verification mode corresponding to the current security level from the preset verification mode set and determining that the reference data acquisition mode is a local mode.
And thereading module 303 is configured to read data from a database of the door access controller as a reference data set according to the reference data obtaining mode.
The reference data acquisition mode can comprise a network mode and a local mode, and if the reference data acquisition mode is the network mode and the network database has data update, the database of the access control machine can be updated through the updated data, then the data is read from the updated database to be used as a reference data set, and the user is authenticated through the reference data set, so that the reliability of authentication can be improved; if the reference data acquisition mode is the local mode, reading data from a database of the access control machine as a reference data set, and performing identity verification on the user through the reference data set acquired from the database of the access control machine, so that the efficiency of the identity verification can be improved, that is, in some embodiments, the reading module 303 is specifically configured to, if the reference data acquisition mode is the network mode, acquire updated data through a current network when it is determined that updated data exists in the network database, update the database of the access control machine according to the acquired updated data, and read data from the updated database as the reference data set; and if the reference data acquisition mode is the local mode, reading data from a database of the access control machine as a reference data set.
And thematching module 304 is configured to match the face image with the data in the reference data set according to an identity authentication manner.
The authentication means may be determined according to the current security level, and the data in the reference data set may include the registered image and the associated information.
Optionally, in some embodiments of the present invention, the matching module may specifically be configured to: and calculating the similarity between the face image and the registered image in the reference data set, and if the similarity is greater than a first preset threshold, determining that the matching result of the face image and the data in the reference data set meets a preset condition.
Optionally, in some embodiments of the present invention, the matching module may be further specifically configured to: and calculating the similarity between the face image and the registered image in the reference data set, acquiring the identity information of the registered image with the similarity larger than a second preset threshold, and determining that the matching result of the face image and the data in the reference data set meets a preset condition if the reference data set stores the associated information corresponding to the identity information.
In addition, it should be noted that the associated information may be pre-established by the operation and maintenance personnel, or pre-established by the access control device, which is determined according to the actual situation. That is, optionally, in some embodiments of the present invention, please refer to fig. 3b, which further includes anassociation module 306, where the association module is specifically configured to: the method comprises the steps of setting identity information of each registration image in a database of the access control machine, obtaining the registration image of an object associated with the identity information, obtaining an associated object image, establishing an association relation between the identity information and the associated object image, obtaining association information, and storing the association information in the database of the access control machine.
Optionally, in some embodiments of the present invention, the matching module may be further specifically configured to: detecting a feature point set of a face image, acquiring a registered image matched with the feature point set in a reference data set when the feature point set determines that the face deflection angle of the face image is smaller than a preset angle threshold value, obtaining a target image set, calculating the similarity between the face image and the registered image in the target image set, and determining that the matching result of the face image and the data in the reference data set meets a preset condition if the similarity is larger than a third preset threshold value.
A determiningmodule 305, configured to determine that the user passes the authentication when the matching result obtained by thematching module 304 meets a preset condition, and control the access control device to allow the user to pass.
It should be noted that, in order to improve the accuracy of the identity verification, the living body detection may be performed on the human face, please refer to fig. 3c, and optionally, in some embodiments of the present invention, the present invention further includes a living body detection module 307, where the living body detection module may specifically be configured to: acquiring heat information of the face image, and carrying out living body detection on the user according to the heat information. The obtainingmodule 302 may further be configured to obtain an authentication manner and a reference data obtaining mode corresponding to the network environment information when the living body detection result indicates that the user is a living body.
In addition, it should be further noted that when the access controller is in network connection with the server, the database of the access controller on the access controller may be updated through the network database on the server, please refer to fig. 3d, and optionally, in some embodiments of the present invention, the access controller further includes anupdating module 308, and the updating module may be specifically configured to: receiving a data update package periodically issued by a network database, updating the database of the access control machine according to the data update package, or monitoring data in the network database according to a preset period, and updating the database of the access control machine according to changed data when the monitored data is changed.
According to the embodiment of the invention, when an identity authentication request of a user is detected, anacquisition module 301 acquires network environment information of an access control machine and a face image of the user, anacquisition module 302 acquires an identity authentication mode and a reference data acquisition mode corresponding to the network environment information, areading module 303 reads data from a database of the access control machine as a reference data set according to the reference data acquisition mode, amatching module 304 matches the data in the face image and the reference data set according to the identity authentication mode, and if a matching result meets a preset condition, a determiningmodule 305 determines that the identity authentication of the user passes and controls the access control machine to allow the user to pass. Compared with the existing face verification scheme, the face verification can be carried out according to the current network environment, when the connection between the server side and the client side is abnormal, data can be read from the database of the access control machine, the user is subjected to identity verification according to the data read from the database of the access control machine, the problems that the face verification time is long and the face verification fails cannot occur, and therefore the face verification efficiency and effectiveness can be improved.
Further, in order to facilitate understanding of the identity authentication method provided in the embodiment of the present invention, please refer to fig. 3e, taking the example that the identity authentication device is integrated in the access control machine, the user may record the image of the user in advance in a corresponding applet or mobile phone software to obtain a registration image, and upload the registration image to the network database on the server side. Subsequently, the database of the access control of the authentication device pulls the registration image stored in the network database. When a user enters an area with the access control machine, the access control machine can capture a face image of the user at first, meanwhile, the access control machine can detect the working state of the access control machine, such as whether the network is abnormal or not, whether data transmission is abnormal or not and the like, and the access control machine can detect whether data in a network database is changed or not according to a preset period under the condition of network connection, and if so, the database of the access control machine is updated through the changed data. And then, the access control machine also can carry out living body detection on the face image of the user, when the user is a living body, face matching is carried out, namely, whether the face image of the user stores a registered image in a database of the access control machine is judged, if yes, the identity recognition of the user is successful, and an area which the user can enter is determined based on the authority of the user.
Accordingly, an embodiment of the present invention further provides a terminal, as shown in fig. 4, the terminal may include Radio Frequency (RF)circuits 401, amemory 402 including one or more computer-readable storage media, aninput unit 403, adisplay unit 404, asensor 405, anaudio circuit 406, a Wireless Fidelity (WiFi)module 407, aprocessor 408 including one or more processing cores, and apower supply 409. Those skilled in the art will appreciate that the terminal configuration shown in fig. 4 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
theRF circuit 401 may be used for receiving and transmitting signals during a message transmission or communication process, and in particular, for receiving downlink information of a base station and then sending the received downlink information to the one ormore processors 408 for processing; in addition, data relating to uplink is transmitted to the base station. In general, theRF circuitry 401 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, theRF circuitry 401 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), and the like.
Thememory 402 may be used to store software programs and modules, and theprocessor 408 executes various functional applications and data processing by operating the software programs and modules stored in thememory 402. Thememory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal, etc. Further, thememory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, thememory 402 may also include a memory controller to provide theprocessor 408 and theinput unit 403 access to thememory 402.
Theinput unit 403 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in a particular embodiment, theinput unit 403 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to theprocessor 408, and can receive and execute commands from theprocessor 408. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. Theinput unit 403 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
Thedisplay unit 404 may be used to display information input by or provided to the user and various graphical user interfaces of the terminal, which may be made up of graphics, text, icons, video, and any combination thereof. TheDisplay unit 404 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to theprocessor 408 to determine the type of touch event, and then theprocessor 408 provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 4 the touch-sensitive surface and the display panel are shown as two separate components to implement input and output functions, in some embodiments the touch-sensitive surface may be integrated with the display panel to implement input and output functions.
The terminal may also include at least onesensor 405, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal, detailed description is omitted here.
Audio circuitry 406, a speaker, and a microphone may provide an audio interface between the user and the terminal. Theaudio circuit 406 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electric signal, which is received by theaudio circuit 406 and converted into audio data, which is then processed by the audiodata output processor 408, and then transmitted to, for example, another terminal via theRF circuit 401, or the audio data is output to thememory 402 for further processing. Theaudio circuitry 406 may also include an earbud jack to provide peripheral headset communication with the terminal.
WiFi belongs to short distance wireless transmission technology, and the terminal can help the user to send and receive e-mail, browse web page and access streaming media etc. throughWiFi module 407, it provides wireless broadband internet access for the user. Although fig. 4 shows theWiFi module 407, it is understood that it does not belong to the essential constitution of the terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
Theprocessor 408 is a control center of the terminal, connects various parts of the entire handset using various interfaces and lines, and performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in thememory 402 and calling data stored in thememory 402, thereby integrally monitoring the handset. Optionally,processor 408 may include one or more processing cores; preferably, theprocessor 408 may integrate an application processor, which handles primarily the operating system, user interface, applications, etc., and a modem processor, which handles primarily the wireless communications. It will be appreciated that the modem processor described above may not be integrated into theprocessor 408.
The terminal also includes a power source 409 (e.g., a battery) for powering the various components, which may preferably be logically coupled to theprocessor 408 via a power management system to manage charging, discharging, and power consumption via the power management system. Thepower supply 409 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the terminal may further include a camera, a bluetooth module, and the like, which will not be described herein. Specifically, in this embodiment, theprocessor 408 in the terminal loads the executable file corresponding to the process of one or more application programs into thememory 402 according to the following instructions, and theprocessor 408 runs the application programs stored in thememory 402, thereby implementing various functions:
when an identity authentication request of a user is detected, acquiring network environment information and a face image of the user, acquiring an identity authentication mode and a reference data acquisition mode corresponding to the network environment information, reading data from a database of the access control machine as a reference data set according to the reference data acquisition mode, matching the data in the face image and the reference data set according to the identity authentication mode, and determining that the identity authentication of the user passes if a matching result meets a preset condition.
When an identity authentication request of a user is detected, acquiring network environment information and a face image of the user, then acquiring an identity authentication mode and a reference data acquisition mode corresponding to the network environment information, reading data from a database of the access control machine as a reference data set according to the reference data acquisition mode, then matching the data in the face image and the reference data set according to the identity authentication mode, and if a matching result meets a preset condition, determining that the identity authentication of the user passes and controlling the access control machine to allow the user to pass. Compared with the existing face verification scheme, the face verification can be carried out according to the current network environment, when the connection between the server side and the client side is abnormal, data can be read from the database of the access control machine, the user is subjected to identity verification according to the data read from the database of the access control machine, the problems that the face verification time is long and the face verification fails cannot occur, and therefore the face verification efficiency and effectiveness can be improved.
Example V,
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present invention provides a storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any one of the authentication methods provided by the embodiments of the present invention. For example, the instructions may perform the steps of:
when an identity authentication request of a user is detected, acquiring network environment information and a face image of the user, acquiring an identity authentication mode and a reference data acquisition mode corresponding to the network environment information, reading data from a database of the access control machine as a reference data set according to the reference data acquisition mode, matching the data in the face image and the reference data set according to the identity authentication mode, and if a matching result meets a preset condition, determining that the identity authentication of the user passes and controlling the access control machine to allow the user to pass.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any of the authentication methods provided in the embodiments of the present invention, the beneficial effects that can be achieved by any of the authentication methods provided in the embodiments of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described again here.
The identity authentication method, the identity authentication device, the identity authentication terminal and the storage medium provided by the embodiments of the present invention are described in detail above, and a specific embodiment is applied in the description to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.