Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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.
Fig. 1 is a schematic flowchart of an application login method according to an embodiment of the present invention, as shown in fig. 1, the method includes:
101. current facial feature information of a user is obtained.
Optionally, an implementation scenario of this embodiment may be that, when a user logs in a certain application for the first time, the user selects to use an account corresponding to the current facial feature information of the user to log in the application, or another implementation scenario of this embodiment may be that, after the user has logged in the application using a certain account, whether an account corresponding to the current facial feature information of the user changes is detected in real time, and if so, the account corresponding to the current facial feature of the user is switched from the currently logged-in account. The account corresponding to the facial feature information specifically represents an account corresponding to a facial feature template matched with the facial feature information.
Correspondingly, in the previous implementation scenario of this embodiment, 101 may specifically include: and acquiring the current facial feature information of the user according to the login request of the user. In the latter implementation scenario of this embodiment, 101 may specifically include: and acquiring the current facial feature information of the user in real time.
Wherein the facial feature information may include: location information and/or shape information of facial features of the user. It should be noted that the facial features may be a single facial feature or a combination of multiple facial features. For example, if the facial feature is a single facial feature, such as an eye, the facial feature information may include position information and/or shape information of the eye; as another example, if the facial feature is a combination of a plurality of facial features, such as a combination of an eye and a mouth, the facial feature information may include position information and/or shape information of the eye and position information and/or shape information of the mouth. The present embodiment is not limited thereto.
Optionally, two implementation scenarios exist before 101, where one implementation scenario is that a user initially establishes a facial feature template and an association relationship between the facial feature template and each account used by the user to log in an application program, that is, in this implementation scenario, if there is no facial feature template matching the current facial feature information, there is no corresponding account corresponding to the current facial feature information. Another implementation scenario is that the user updates the previously established facial feature template and the association relationship between the facial feature template and each account used by the user to log in the application program.
According to the two implementation scenarios described above, in the former implementation scenario, before 101, the method may further include:
acquiring current facial feature information of a user, and storing the current facial feature information as a facial feature template to be associated;
and acquiring an account used by the user for logging in the application program, and associating the account with the facial feature template to be associated.
In the latter implementation scenario, before 101, the method may further include:
acquiring current facial feature information of a user;
if the face feature template matched with the current face feature information of the user does not exist in the currently stored face feature templates, storing the current face feature information as a face feature template to be associated;
and acquiring an account used by the user for logging in the application program, and associating the account with the facial feature template to be associated.
Further, in any of the two implementation scenarios, the acquiring current facial feature information of the user may specifically include: and acquiring the current facial feature information of the user according to a setting instruction of the user.
102. And searching a facial feature template matched with the current facial feature information from a plurality of pre-stored facial feature templates, wherein each facial feature template comprises facial feature information of the user in different states.
Optionally, according to the two implementation scenarios of the foregoing embodiment, in the latter implementation scenario of this embodiment, 102 may specifically include: detecting whether an account used by the user for logging in the application program currently corresponds to a facial feature template matched with the current facial feature information of the user in real time, if not, searching the facial feature template matched with the current facial feature information in a plurality of pre-stored facial feature templates, wherein each facial feature template comprises the facial feature information of the user in different states.
Specifically, in the implementation process of 102, it needs to detect whether the facial feature information matches with the facial feature template, and this process may be implemented by a general face recognition technology, for example, by a region feature analysis algorithm. Therefore, in an implementation manner of this embodiment, 102 may specifically include:
according to a regional feature analysis algorithm, performing feature analysis by using the plurality of facial feature templates and the current facial feature information to obtain a plurality of corresponding similarity values;
and acquiring the maximum value of the plurality of similar values, and if the maximum value is larger than a threshold value, taking the facial feature template corresponding to the maximum value as the facial feature template matched with the current facial feature information.
The threshold may be a preset value. Optionally, after obtaining the maximum value of the plurality of similar values, the method may further include:
if the maximum value is not larger than the threshold value, storing the current facial feature information as a facial feature template to be associated;
and acquiring an account used by the user for logging in the application program, and associating the account with the facial feature template to be associated.
103. And acquiring an account corresponding to the facial feature template matched with the current facial feature information according to the association relationship between each pre-stored facial feature template and each account used by the user for logging in the application program, and logging in the application program by using the account.
Optionally, according to the two implementation scenarios of this embodiment, in the latter implementation scenario of this embodiment, the logging in the application program with the account in 103 specifically indicates that an account corresponding to a facial feature template matching the current facial feature of the user is switched from a currently logged account. Specifically, the specific process of performing account switching is similar to a general account switching method, and this embodiment is not described herein again.
In addition, in practical applications, after the facial feature template matching the current facial feature information is found, the account corresponding to the facial feature template matching the current facial feature information may not be obtained. Accordingly, the method may further include:
if the account corresponding to the facial feature template matched with the current facial feature information does not exist in the currently stored accounts, taking the facial feature template matched with the current facial feature information as a facial feature template to be associated;
and acquiring an account used by the user for logging in the application program, and associating the account with the facial feature template to be associated.
Specifically, in any implementation manner of this embodiment, the obtaining an account used by the user to log in the application program and associating the account with the facial feature template to be associated may include:
generating an account used by the user for logging in the application program according to the facial feature template to be associated, and associating the account with the facial feature template to be associated; or,
and taking any account number which is stored currently as an account number used by the user for logging in the application program, and associating the account number with the facial feature template to be associated.
In the implementation scenario of the above step, if there is no account associated with a certain facial feature template in currently stored accounts, a new account is created and associated with the facial feature template, or a currently stored account is associated with the facial feature template.
Correspondingly, each facial feature template and each account number have a relationship that each facial feature template corresponds to a unique account number and each account number corresponds to one or more facial feature templates.
According to the application program login method provided by the embodiment, the application program is conveniently and quickly logged in by acquiring the current facial feature information of the user, searching the facial feature template matched with the current facial feature information, further acquiring the account corresponding to the facial feature template matched with the current facial feature information, and logging in the application program by using the account.
Fig. 2 is a schematic structural diagram of an application login apparatus according to a second embodiment of the present invention, as shown in fig. 2, the apparatus includes:
an obtainingmodule 21, configured to obtain current facial feature information of a user;
a searchingmodule 22, configured to search a facial feature template matching the current facial feature information from a plurality of pre-stored facial feature templates, where each facial feature template includes facial feature information of the user in different states;
and theprocessing module 23 is configured to obtain an account corresponding to the facial feature template matched with the current facial feature information according to the association relationship between each pre-stored facial feature template and each account used by the user to log in the application program, and log in the application program with the account.
The searchingmodule 22 may specifically include:
the calculation unit is used for performing feature analysis by using the plurality of facial feature templates and the current facial feature information according to a regional feature analysis algorithm to obtain a plurality of corresponding similarity values;
a comparison unit configured to acquire a maximum value of the plurality of similar values;
and the first judging unit is used for taking the face feature template corresponding to the maximum value as the face feature template matched with the current face feature information if the maximum value is larger than a threshold value.
Optionally, the searching module may further include:
a second determination unit, configured to store the current facial feature information as a facial feature template to be associated if the maximum value is not greater than the threshold;
correspondingly, the device further comprises:
and the association module is used for acquiring an account used by the user for logging in the application program and associating the account with the facial feature template to be associated.
Optionally, in an implementation manner of this embodiment, the obtaining module is further configured to obtain current facial feature information of a user, and store the current facial feature information as a facial feature template to be associated;
correspondingly, the device further comprises:
and the association module is used for acquiring an account used by the user for logging in the application program and associating the account with the facial feature template to be associated.
According to the application program login device provided by the embodiment, the application program is conveniently and quickly logged in by acquiring the current facial feature information of a user, searching the facial feature template matched with the current facial feature information, further acquiring the account corresponding to the facial feature template matched with the current facial feature information, and logging in the application program through the account.
It should be noted that, the application program login apparatus provided in the foregoing embodiment may implement the steps of the application program login method provided in the embodiment of the present invention, and specific implementation methods are not described herein again.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.