Disclosure of Invention
The embodiment of the disclosure provides an unlocking method and device. The technical scheme is as follows:
according to a first aspect of an embodiment of the present disclosure, there is provided an unlocking method, including;
monitoring the failure times of the user continuous application unlocking failure;
when the failure times are larger than the preset times, generating first prompt information for prompting a user to input an unlocking password;
receiving an unlocking password input by a user;
and when the similarity of the unlocking password and the stored preset password reaches a preset ratio, unlocking the application.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the unlocking application does not need to use a complete unlocking password, only the unlocking password needs to be input according to memory, and if the similarity between the unlocking password and the preset password is large enough, unlocking can be carried out, so that the user can operate on the screen, and the user experience is improved.
In one embodiment, after the unlocking the application, the method further comprises:
generating second prompt information for prompting the user to change the password;
receiving a new unlocking password input by a user;
and replacing the preset password with the new unlocking password.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: and the forgotten unlocking password is changed into a new unlocking password known by the user in time, so that the user is prevented from inputting errors again.
In one embodiment, when the unlocking password is a character password, the unlocking the application when the similarity between the unlocking password and a stored preset password reaches a preset percentage includes:
acquiring each character in the character password;
comparing each character in the character password with the characters in the preset password in the corresponding sequence according to the character arrangement sequence of the character password;
when x characters in the character password are the same as the characters in the corresponding sequence in the preset password, judging whether the ratio of the number of the characters of the x and the character password is larger than a first preset ratio or not;
and when the ratio of the number of the characters of the x and the character password is larger than the first preset ratio, unlocking the application.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: and realizing the unlocking process under the condition of incomplete character passwords.
In one embodiment, when the unlocking password is a gesture password, the unlocking the application when the similarity between the unlocking password and the stored preset password reaches a preset percentage includes:
acquiring y passing gesture virtual keys in the gesture password and a passing sequence of the y gesture virtual keys; y is an integer greater than 1;
sequentially judging whether the y gesture virtual keys are the same as gesture virtual keys in the preset password according to the passing sequence;
when z virtual keys exist in the y gesture virtual keys and gesture virtual keys in the corresponding sequence in the preset password are the same, judging whether the ratio of the number of the z virtual keys to the number of the gesture virtual keys in the preset password is larger than a second preset ratio or not;
and when the ratio of the z to the number of the gesture virtual keys in the preset password is larger than a second preset ratio, unlocking the application.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: and realizing the unlocking process under the condition of incomplete gesture passwords.
In one embodiment, when the unlocking password includes a character password and a gesture password, when the similarity between the unlocking password and a stored preset password reaches a preset ratio, unlocking the application includes:
acquiring each character in the character password;
comparing each character in the character password with the characters in the preset password in the corresponding sequence according to the character arrangement sequence of the character password;
when x characters in the character password are the same as the characters in the corresponding sequence in the preset password, judging whether the ratio of the number of the characters of the x and the character password is larger than a first preset ratio or not;
acquiring y passing gesture virtual keys in the gesture password and a passing sequence of the y gesture virtual keys; y is an integer greater than 1;
sequentially judging whether the y gesture virtual keys are the same as gesture virtual keys in the preset password according to the passing sequence;
when z virtual keys exist in the y gesture virtual keys and gesture virtual keys in the corresponding sequence in the preset password are the same, judging whether the ratio of the number of the z virtual keys to the number of the gesture virtual keys in the preset password is larger than a second preset ratio or not;
and when the ratio of the number of the characters of the x and the character password is larger than a first preset ratio, and the ratio of the number of the gesture virtual keys in the z and the preset password is larger than a second preset ratio, unlocking the application.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: and the unlocking process under the conditions of incomplete character passwords and incomplete gesture passwords is realized.
In one embodiment, the generating first prompt information for prompting a user to input an unlocking password when the number of failures is greater than a preset number includes:
when the failure times are larger than the preset times, generating third prompt information for prompting the user to input the fingerprint password;
receiving fingerprint information input by a user;
judging whether the fingerprint information is matched with the stored preset fingerprint information or not;
and when the fingerprint information is matched with the preset fingerprint information, generating the first prompt information.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: and only under the condition that the fingerprint password is successfully verified, unlocking can be carried out through the incomplete character password and/or the gesture password.
According to a second aspect of an embodiment of the present disclosure, there is provided an unlocking apparatus including;
the monitoring module is used for monitoring the failure times of the user for continuous application unlocking failure;
the generating module is used for generating first prompt information for prompting a user to input an unlocking password when the failure times are larger than the preset times;
the receiving module is used for receiving an unlocking password input by a user;
and the unlocking module is used for unlocking the application when the similarity between the unlocking password and the stored preset password reaches a preset ratio.
In one embodiment, the apparatus further comprises:
the processing module is used for generating second prompt information for prompting the user to change the password;
the receiving module is further configured to: receiving a new unlocking password input by a user;
and the replacing module is used for replacing the preset password with the new unlocking password.
In one embodiment, when the unlocking password is a character password, the unlocking module includes:
the first obtaining sub-module is used for obtaining each character in the character password;
the first comparison sub-module is used for comparing each character in the character password with the characters in the corresponding sequence in the preset password in sequence according to the character arrangement sequence of the character password;
the first judgment sub-module is used for judging whether the ratio of the number of the x characters to the number of the characters of the character password is larger than a first preset ratio when the x characters in the character password are the same as the characters in the corresponding sequence in the preset password;
and the first unlocking submodule is used for unlocking the application when the ratio of the number of the characters of the x and the character password is larger than the first preset ratio.
In one embodiment, when the unlocking password is a gesture password, the unlocking module includes:
the second obtaining submodule is used for obtaining y passing gesture virtual keys in the gesture password and the passing sequence of the y passing gesture virtual keys; y is an integer greater than 1;
the second judgment submodule is used for sequentially judging whether the y gesture virtual keys are the same as gesture virtual keys in the preset password according to the passing sequence; the gesture recognition device is further used for judging whether the ratio of the number of the z virtual keys to the number of the gesture virtual keys in the preset password is larger than a second preset ratio or not when z virtual keys exist in the y gesture virtual keys and the gesture virtual keys in the corresponding sequence in the preset password are the same;
and the second unlocking submodule is used for unlocking the application when the ratio of the z to the number of the gesture virtual keys in the preset password is larger than a second preset ratio.
In one embodiment, when the unlocking password comprises a character password and a gesture password, the unlocking module comprises:
the third obtaining sub-module is used for obtaining each character in the character password; the gesture password processing device is also used for acquiring y passing gesture virtual keys in the gesture password and the passing sequence of the y gesture virtual keys; y is an integer greater than 1;
the second comparison submodule is used for comparing each character in the character password with the characters in the corresponding sequence in the preset password in sequence according to the character arrangement sequence of the character password;
a third judging submodule, configured to judge whether a ratio of x to the number of characters of the character password is greater than a first preset ratio when x characters in the character password are the same as characters in a corresponding sequence in the preset password;
the fourth judgment submodule is used for sequentially judging whether the y gesture virtual keys are the same as gesture virtual keys in the preset password according to the passing sequence; the gesture recognition device is further used for judging whether the ratio of the number of the z virtual keys to the number of the gesture virtual keys in the preset password is larger than a second preset ratio or not when z virtual keys exist in the y gesture virtual keys and the gesture virtual keys in the corresponding sequence in the preset password are the same;
and the third unlocking submodule is used for unlocking the application when the ratio of the number of the characters of the x and the character password is larger than a first preset ratio and the ratio of the number of the gesture virtual keys in the z and the preset password is larger than a second preset ratio.
In one embodiment, the generating module comprises:
the first generation submodule is used for generating third prompt information for prompting a user to input a fingerprint password when the failure times are larger than the preset times;
the receiving submodule is used for receiving fingerprint information input by a user;
the fifth judgment submodule is used for judging whether the fingerprint information is matched with the stored preset fingerprint information or not;
and the second generation submodule is used for generating the first prompt message when the fingerprint information is matched with the preset fingerprint information.
According to a third aspect of the embodiments of the present disclosure, there is provided an unlocking device including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
monitoring the failure times of the user continuous application unlocking failure;
when the failure times are larger than the preset times, generating first prompt information for prompting a user to input an unlocking password;
receiving an unlocking password input by a user;
and when the similarity of the unlocking password and the stored preset password reaches a preset ratio, unlocking the application.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Example one
Fig. 1 is a flowchart illustrating an unlocking method according to an exemplary embodiment, where the unlocking method is used in a decryption apparatus, the unlocking apparatus being applied to a terminal device, as shown in fig. 1, and the method includes the following steps S101 to S104:
in step S101, the number of failures of the user to continuously apply unlocking failures is monitored.
Here, the number of failures refers to the number of consecutive unlocking failures of the same application.
In this embodiment, there are various monitoring manners, for example, the number of times of continuously generating the prompt information for unlocking failure by the same application is detected, where the continuously generated prompt information for unlocking success without being prompted by the application is generated between the prompt information for unlocking failure; for example, an application unlocking condition is detected, and the number of times of application connection unlocking failure is obtained.
In step S102, when the number of failures is greater than the preset number, first prompt information for prompting the user to input an unlocked password is generated.
In step S103, an unlock password input by the user is received.
The unlocking password of the embodiment may include one or more of a fingerprint password, a gesture password, and a character password.
In step S104, when the similarity between the unlock password and the stored preset password reaches a preset duty ratio, the application is unlocked.
Here, the similarity is only the percentage of the same part of both the decryption password and the preset password to the whole of the preset password.
The unlocking application includes an application installed by a user on the unlocking device and an application of the system, such as a group purchase application installed by the user, a shopping application and the like, and the application of the system can be a screen lock.
In this embodiment, the similarity between the unlocking password and the stored preset password needs to be determined. The similarity here is a numerical value, and it is worth explaining that different decryption passwords are used, and the calculation method of the similarity is also different.
In this embodiment, the unlocking application does not need to use a complete unlocking password, and only needs to input the unlocking password according to the memory, and if the similarity between the unlocking password and the preset password is large enough, the unlocking can be performed, so that the user can operate on the screen, and the user experience is improved.
In one embodiment, after step S104, the method further comprises:
generating second prompt information for prompting the user to change the password; receiving a new unlocking password input by a user; and replacing the preset password with the new unlocking password.
Since the unlocking password set by the user before is forgotten, the user may not know the unlocking password in the next unlocking, and therefore, the user may need to change the password in order to facilitate the subsequent operation of the user.
In this embodiment, the unlocking password is different in form, and the corresponding unlocking manner is also different.
In one embodiment, when the unlocking password is a character password, step S104 includes:
acquiring each character in the character password; comparing characters in a corresponding sequence in a preset password in sequence according to the character arrangement sequence of the character password; when x characters in the character password are the same as the characters in the corresponding sequence in the preset password, judging whether the ratio of the number of the characters of the x and the character password is larger than a first preset ratio or not; and when the ratio of the x to the number of the characters of the character password is larger than a first preset ratio, unlocking the application.
Here, the ratio of x to the number of characters of the character code is the similarity described above.
For example, assuming that the preset password with 9 digits is 147258963, the unlock password input by the user is 147258369, and the device compares the preset password and the unlock password in sequence according to the order of the arranged characters, it can be seen that the last three digits are input incorrectly, and therefore, the first 6 digits are the same as the first 6 digits in the preset password, so that the accuracy of 66.7% determines whether 66.7% is greater than 50% of the first preset ratio, and the unlocking is performed because 66.7% is greater than 50%.
It should be noted that the unlocking password recorded by the user may be a wrong password, for example, the preset password is 147258369, and the user only remembers 725836, but does not remember which bits are, so that if i consecutive characters of the unlocking password are the same as any one of i consecutive characters in the preset password, both i and x can be regarded as the same characters as the corresponding sequence of characters in the preset password. Here, i needs to be greater than a first preset value, e.g., 3.
In one embodiment, when the unlocking password is a gesture password, step S104 includes:
acquiring the passing sequence of y gesture virtual keys and y gesture virtual keys passing through the gesture password; y is an integer greater than 1; sequentially judging whether the y gesture virtual keys are the same as gesture virtual keys in the corresponding sequence in the preset password or not according to the passing sequence; when z virtual keys exist in the y gesture virtual keys and gesture virtual keys in the corresponding sequence in the preset password are the same, judging whether the ratio of the number of the z virtual keys to the number of the gesture virtual keys in the preset password is larger than a second preset ratio or not; and when the ratio of z to y is larger than a second preset occupation ratio, unlocking the application.
For example, assuming that the preset password is shown in fig. 2-a, the password input by the user is shown in fig. 2-b, and an arrow indicates a passing sequence direction, it is determined whether the gesture virtual key passing through the first pass is the same as the gesture virtual key passing through the first pass in the preset password, each gesture virtual key is sequentially determined until all gesture virtual keys are determined, z is determined, and thus a ratio of z to the number of gesture virtual keys in the preset password is determined, and thus whether unlocking is performed is determined.
It should be noted that the unlocking password recorded by the user may be a misplaced password, for example, the user forgets which gesture virtual key the first passing gesture virtual key is, and the user can only draw a track from the second passing gesture virtual key in the memory, so that if the sequence of continuously passing through j virtual keys is the same as the sequence of the same virtual key in the preset password, it is determined that z + j virtual keys are the same as the gesture virtual key in the corresponding sequence in the preset password. Here, j needs to be greater than a second preset value, e.g., 3.
Further, the embodiment may further compare the trajectory of the gesture password input by the user with a preset trajectory, determine that the two are the same in length, determine whether a ratio of the length to the length of the preset trajectory is greater than a third preset proportion, and unlock the application when the ratio is greater than the third preset proportion.
In one embodiment, when the unlocking password includes a character password and a gesture password, step S104 includes:
acquiring each character in the character password; comparing characters in a corresponding sequence in a preset password in sequence according to the character arrangement sequence of the character password; when x characters in the character password are the same as the characters in the corresponding sequence in the preset password, judging whether the ratio of the number of the characters of the x and the character password is larger than a first preset ratio or not; acquiring the passing sequence of y gesture virtual keys and y gesture virtual keys passing through the gesture password; y is an integer greater than 1; sequentially judging whether the y gesture virtual keys are the same as gesture virtual keys in the corresponding sequence in the preset password or not according to the passing sequence; when z virtual keys exist in the y gesture virtual keys and gesture virtual keys in the corresponding sequence in the preset password are the same, judging whether the ratio of z to y is larger than a second preset ratio or not; and when the ratio of x to the number of the characters of the character password is larger than a first preset ratio and the ratio of z to y is larger than a second preset ratio, unlocking the application.
If the user is monitored to input the character password and/or the gesture password for n times continuously and the normal unlocking cannot be realized, entering a special password retrieving mode, requiring the user to input the character password and the gesture password in sequence, and if the matching degrees of the character password and the gesture password with the preset character password and the preset gesture password reach corresponding preset percentages, considering that the unlocking is successful and prompting the user to set a new password and/or a gesture password.
For the character password, the similarity is calculated by using the number of characters/the total number of characters with the same corresponding bit as the preset password, and a corresponding first preset ratio is set, and if the four-bit password is used, four thresholds of 25%, 50%, 75% and 100% can be set.
For the gesture password, the similarity is calculated by using the gesture virtual key number which is the same as the preset password to the total gesture virtual key number of the preset gesture password, the activation sequence of adjacent points is required to be the same, and a corresponding second preset occupation ratio is set according to the requirement.
In one embodiment, step S102 includes:
when the failure times are larger than the preset times, generating third prompt information for prompting the user to input the fingerprint password; receiving fingerprint information input by a user; judging whether the fingerprint information is matched with the stored preset fingerprint information or not; and when the fingerprint information is matched with the preset fingerprint information, generating first prompt information.
EXAMPLE III
Fig. 4 is a flowchart illustrating an unlocking method according to an exemplary embodiment, as shown in fig. 4, the unlocking method is used in an unlocking apparatus provided in a terminal device, the method includes the following steps S301-S310,
in step S301, the number of failures of the user to continuously apply unlocking failures is monitored.
Here, assuming that the application is a photographing application, each time the user opens the photographing application, the user needs to enter an interface for inputting a password first, needs to input an unlocking password, and if the user is correct, enters the photographing application, and if the user is wrong, prompts that the password is wrong, and continues to display the interface for inputting the password to wait for the user to input the password.
In step S302, when the number of failures is greater than the preset number, first prompt information for prompting the user to input an unlocked password is generated.
In step S303, an unlock password input by the user is received.
Here, the unlock password includes a character password and a gesture password.
In step S304, each character in the character password is acquired.
In step S305, characters in a corresponding sequence in the preset password are compared in sequence for each character in the character password according to the character arrangement sequence of the character password.
In step S306, when x characters in the character password are the same as the characters in the corresponding sequence in the preset password, it is determined whether the ratio of x to the number of characters in the character password is greater than a first preset ratio.
In step S307, y gesture virtual keys passing through in the gesture password and a passing order of the y gesture virtual keys are acquired.
Here, y is an integer greater than 1.
In step S308, it is sequentially determined whether the y gesture virtual keys are the same as the gesture virtual keys in the preset password according to the passing sequence.
In step S309, when z virtual keys exist in the y gesture virtual keys and the gesture virtual keys in the corresponding sequence in the preset password are the same, it is determined whether the ratio of z to y is greater than a second preset ratio.
In step S310, when the ratio of x to the number of characters of the character password is greater than a first preset ratio and the ratio of z to y is greater than a second preset ratio, the application is unlocked.
In this embodiment, when both the character password and the gesture password are incorrect, the user needs to verify both the two passwords at the same time, and the verification of the two passwords can further ensure that the operator is the user, thereby preventing the possibility of operation of other people and protecting the privacy of the user.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 5 is a block diagram illustrating an unlocking apparatus, which may be implemented as part or all of an electronic device through software, hardware, or a combination of both, according to an exemplary embodiment. As shown in fig. 5, the unlocking means includes:
the monitoring module 401 is configured to monitor the number of failure times of continuous application unlocking failure of the user;
a generating module 402, configured to generate first prompt information for prompting a user to input an unlocked password when the failure times are greater than preset times;
a receiving module 403, configured to receive an unlocking password input by a user;
an unlocking module 404, configured to unlock the application when a similarity between the unlocking password and a stored preset password reaches a preset percentage.
In this embodiment, the unlocking application does not need to use a complete unlocking password, and only needs to input the unlocking password according to the memory, and if the similarity between the unlocking password and the preset password is large enough, the unlocking can be performed, so that the user can operate on the screen, and the user experience is improved.
In one embodiment, as shown in fig. 6, the apparatus further comprises:
a processing module 405, configured to generate second prompt information for prompting a user to change a password;
the receiving module 403 is further configured to: receiving a new unlocking password input by a user;
a replacing module 406, configured to replace the preset password with the new unlock password.
In one embodiment, as shown in fig. 7, when the unlocking password is a character password, the unlocking module 404 includes:
a first obtaining sub-module 4041, configured to obtain each character in the character password;
the first comparison sub-module 4042 is configured to compare, according to the character arrangement order of the character password, each character in the character password with a corresponding order of characters in the preset password in sequence;
a first determining sub-module 4043, configured to determine whether a ratio of the number of characters of the character password to x characters is greater than a first preset ratio when x characters in the character password are the same as the characters in the preset password;
a first unlocking sub-module 4044, configured to unlock the application when the ratio of the number of characters of the character password to the number of characters of the x is greater than the first preset ratio.
In one embodiment, as shown in fig. 8, when the unlocking password is a gesture password, the unlocking module 404 includes:
a second obtaining sub-module 4045, configured to obtain y gesture virtual keys passing through in the gesture password and a passing order of the y gesture virtual keys; y is an integer greater than 1;
a second judging submodule 4046, configured to sequentially judge, according to the passing order, whether the y gesture virtual keys are the same as gesture virtual keys in the corresponding order in the preset password; the gesture recognition device is further used for judging whether the ratio of the number of the z virtual keys to the number of the gesture virtual keys in the preset password is larger than a second preset ratio or not when z virtual keys exist in the y gesture virtual keys and the gesture virtual keys in the corresponding sequence in the preset password are the same;
and the second unlocking submodule 4047 is configured to unlock the application when the ratio of the z to the number of the gesture virtual keys in the preset password is greater than a second preset ratio.
In one embodiment, as shown in fig. 9, when the unlocking password comprises a character password and a gesture password, the unlocking module 404 comprises:
a third obtaining sub-module 4041' for obtaining each character in the character password; the gesture password processing device is also used for acquiring y passing gesture virtual keys in the gesture password and the passing sequence of the y gesture virtual keys; y is an integer greater than 1;
the second comparing submodule 4042' is used for comparing each character in the character password with the characters in the preset password in the corresponding sequence according to the character arrangement sequence of the character password;
a third determining sub-module 4043' configured to determine whether a ratio of x characters to the number of characters of the character password is greater than a first preset ratio when x characters in the character password are the same as the characters in the preset password;
a fourth judging submodule 4044' configured to sequentially judge whether the y gesture virtual keys are the same as gesture virtual keys in the corresponding sequence in the preset password according to the passing sequence; the gesture recognition device is further used for judging whether the ratio of the number of the z virtual keys to the number of the gesture virtual keys in the preset password is larger than a second preset ratio or not when z virtual keys exist in the y gesture virtual keys and the gesture virtual keys in the corresponding sequence in the preset password are the same;
and the third unlocking submodule 4045' is used for unlocking the application when the ratio of the number of the characters of the x and the character password is larger than a first preset ratio and the ratio of the number of the gesture virtual keys in the z and the preset password is larger than a second preset ratio.
In one embodiment, as shown in fig. 10, the generating module 402 comprises:
the first generating sub-module 4021 is configured to generate third prompt information for prompting a user to input a fingerprint password when the number of failures is greater than a preset number;
the receiving sub-module 4022 is configured to receive fingerprint information input by a user;
a fifth judging sub-module 4023, configured to judge whether the fingerprint information matches stored preset fingerprint information;
the second generating sub-module 4024 is configured to generate the first prompt information when the fingerprint information matches the preset fingerprint information.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an unlocking device including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
monitoring the failure times of the user continuous application unlocking failure;
when the failure times are larger than the preset times, generating first prompt information for prompting a user to input an unlocking password;
receiving an unlocking password input by a user;
and when the similarity of the unlocking password and the stored preset password reaches a preset ratio, unlocking the application.
The processor may be further configured to:
after the unlocking the application, the method further comprises:
generating second prompt information for prompting the user to change the password;
receiving a new unlocking password input by a user;
and replacing the preset password with the new unlocking password.
When the unlocking password is a character password, and when the similarity between the unlocking password and the stored preset password reaches a preset ratio, unlocking the application comprises the following steps:
acquiring each character in the character password;
comparing each character in the character password with the characters in the preset password in the corresponding sequence according to the character arrangement sequence of the character password;
when x characters in the character password are the same as the characters in the corresponding sequence in the preset password, judging whether the ratio of the number of the characters of the x and the character password is larger than a first preset ratio or not;
and when the ratio of the number of the characters of the x and the character password is larger than the first preset ratio, unlocking the application.
When the unlocking password is a gesture password, and when the similarity between the unlocking password and the stored preset password reaches a preset ratio, unlocking the application comprises the following steps:
acquiring y passing gesture virtual keys in the gesture password and a passing sequence of the y gesture virtual keys; y is an integer greater than 1;
sequentially judging whether the y gesture virtual keys are the same as gesture virtual keys in the preset password according to the passing sequence;
when z virtual keys exist in the y gesture virtual keys and gesture virtual keys in the corresponding sequence in the preset password are the same, judging whether the ratio of the number of the z virtual keys to the number of the gesture virtual keys in the preset password is larger than a second preset ratio or not;
and when the ratio of the z to the number of the gesture virtual keys in the preset password is larger than a second preset ratio, unlocking the application.
When the unlocking password comprises a character password and a gesture password, and when the similarity of the unlocking password and the stored preset password reaches a preset ratio, unlocking the application comprises the following steps:
acquiring each character in the character password;
comparing each character in the character password with the characters in the preset password in the corresponding sequence according to the character arrangement sequence of the character password;
when x characters in the character password are the same as the characters in the corresponding sequence in the preset password, judging whether the ratio of the number of the characters of the x and the character password is larger than a first preset ratio or not;
acquiring y passing gesture virtual keys in the gesture password and a passing sequence of the y gesture virtual keys; y is an integer greater than 1;
sequentially judging whether the y gesture virtual keys are the same as gesture virtual keys in the preset password according to the passing sequence;
when z virtual keys exist in the y gesture virtual keys and gesture virtual keys in the corresponding sequence in the preset password are the same, judging whether the ratio of the number of the z virtual keys to the number of the gesture virtual keys in the preset password is larger than a second preset ratio or not;
and when the ratio of the number of the characters of the x and the character password is larger than a first preset ratio, and the ratio of the number of the gesture virtual keys in the z and the preset password is larger than a second preset ratio, unlocking the application.
When the failure times are greater than the preset times, generating first prompt information for prompting a user to input an unlocking password comprises the following steps:
when the failure times are larger than the preset times, generating third prompt information for prompting the user to input the fingerprint password;
receiving fingerprint information input by a user;
judging whether the fingerprint information is matched with the stored preset fingerprint information or not;
and when the fingerprint information is matched with the preset fingerprint information, generating the first prompt information.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 11 is a block diagram illustrating an apparatus for unlocking an apparatus, which is suitable for a terminal device, according to an exemplary embodiment. For example, the apparatus 1700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Apparatus 1700 may include one or more of the following components: processing component 1702, memory 1704, power component 1706, multimedia component 1708, audio component 1710, input/output (I/O) interface 1712, sensor component 1714, and communications component 1716.
The processing component 1702 generally controls the overall operation of the apparatus 1700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing component 1702 may include one or more processors 1720 to execute instructions to perform all or a portion of the steps of the above-described method. Further, processing component 1702 may include one or more modules that facilitate interaction between processing component 1702 and other components. For example, processing component 1702 may include a multimedia module to facilitate interaction between multimedia component 1708 and processing component 1702.
The memory 1704 is configured to store various types of data to support operations at the apparatus 1700. Examples of such data include instructions for any application or method operating on the apparatus 1700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1704 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 1706 provides power to the various components of the device 1700. The power components 1706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 1700.
The multimedia component 1708 includes a screen providing an output interface between the device 1700 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 1700 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
Audio component 1710 is configured to output and/or input audio signals. For example, audio component 1710 includes a Microphone (MIC) configured to receive external audio signals when apparatus 1700 is in an operating mode, such as a call mode, a record mode, and a voice recognition mode. The received audio signal may further be stored in the memory 1704 or transmitted via the communication component 1716. In some embodiments, audio component 1710 also includes a speaker for outputting audio signals.
The I/O interface 1712 provides an interface between the processing component 1702 and peripheral interface modules, such as a keyboard, click wheel, buttons, and the like. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 1714 includes one or more sensors for providing various aspects of state assessment for the apparatus 1700. For example, sensor assembly 1714 may detect an open/closed state of apparatus 1700, the relative positioning of components, such as a display and keypad of apparatus 1700, the change in position of apparatus 1700 or a component of apparatus 1700, the presence or absence of user contact with apparatus 1700, the orientation or acceleration/deceleration of apparatus 1700, and the change in temperature of apparatus 1700. The sensor assembly 1714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 1714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 1716 is configured to facilitate communications between the apparatus 1700 and other devices in a wired or wireless manner. The apparatus 1700 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1716 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1716 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 1700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 1704 comprising instructions, executable by the processor 1720 of the apparatus 1700 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of an apparatus 1700, enable the apparatus 1700 to perform the above-described unlocking method, the method comprising:
monitoring the failure times of the user continuous application unlocking failure;
when the failure times are larger than the preset times, generating first prompt information for prompting a user to input an unlocking password;
receiving an unlocking password input by a user;
and when the similarity of the unlocking password and the stored preset password reaches a preset ratio, unlocking the application.
After the unlocking the application, the method further comprises:
generating second prompt information for prompting the user to change the password;
receiving a new unlocking password input by a user;
and replacing the preset password with the new unlocking password.
When the unlocking password is a character password, and when the similarity between the unlocking password and the stored preset password reaches a preset ratio, unlocking the application comprises the following steps:
acquiring each character in the character password;
comparing each character in the character password with the characters in the preset password in the corresponding sequence according to the character arrangement sequence of the character password;
when x characters in the character password are the same as the characters in the corresponding sequence in the preset password, judging whether the ratio of the number of the characters of the x and the character password is larger than a first preset ratio or not;
and when the ratio of the number of the characters of the x and the character password is larger than the first preset ratio, unlocking the application.
When the unlocking password is a gesture password, and when the similarity between the unlocking password and the stored preset password reaches a preset ratio, unlocking the application comprises the following steps:
acquiring y passing gesture virtual keys in the gesture password and a passing sequence of the y gesture virtual keys; y is an integer greater than 1;
sequentially judging whether the y gesture virtual keys are the same as gesture virtual keys in the preset password according to the passing sequence;
when z virtual keys exist in the y gesture virtual keys and gesture virtual keys in the corresponding sequence in the preset password are the same, judging whether the ratio of the number of the z virtual keys to the number of the gesture virtual keys in the preset password is larger than a second preset ratio or not;
and when the ratio of the z to the number of the gesture virtual keys in the preset password is larger than a second preset ratio, unlocking the application.
When the unlocking password comprises a character password and a gesture password, and when the similarity of the unlocking password and the stored preset password reaches a preset ratio, unlocking the application comprises the following steps:
acquiring each character in the character password;
comparing each character in the character password with the characters in the preset password in the corresponding sequence according to the character arrangement sequence of the character password;
when x characters in the character password are the same as the characters in the corresponding sequence in the preset password, judging whether the ratio of the number of the characters of the x and the character password is larger than a first preset ratio or not;
acquiring y passing gesture virtual keys in the gesture password and a passing sequence of the y gesture virtual keys; y is an integer greater than 1;
sequentially judging whether the y gesture virtual keys are the same as gesture virtual keys in the preset password according to the passing sequence;
when z virtual keys exist in the y gesture virtual keys and gesture virtual keys in the corresponding sequence in the preset password are the same, judging whether the ratio of the number of the z virtual keys to the number of the gesture virtual keys in the preset password is larger than a second preset ratio or not;
and when the ratio of the number of the characters of the x and the character password is larger than a first preset ratio, and the ratio of the number of the gesture virtual keys in the z and the preset password is larger than a second preset ratio, unlocking the application.
When the failure times are greater than the preset times, generating first prompt information for prompting a user to input an unlocking password comprises the following steps:
when the failure times are larger than the preset times, generating third prompt information for prompting the user to input the fingerprint password;
receiving fingerprint information input by a user;
judging whether the fingerprint information is matched with the stored preset fingerprint information or not;
and when the fingerprint information is matched with the preset fingerprint information, generating the first prompt information.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.