Method and device for determining unlocking mode, storage medium and terminal
Technical Field
The present invention relates to the field of terminal technologies, and in particular, to a method and an apparatus for determining an unlocking manner, a storage medium, and a terminal.
Background
With the development of terminal technology, terminals such as smart phones have more and more functions. Many of the functions of the terminal are closely related to the personal privacy of the user. Such as payment applications, social applications, personal health data, etc. in the terminal. Therefore, in order to ensure privacy security of the user, the security of the terminal is receiving more and more attention.
In order to improve the use security of the terminal, user authentication is required when a user enters a terminal interface. For example, when a user enters a terminal interface, the terminal requires the user to input a fingerprint and perform identification verification on the fingerprint. However, the legal user (i.e. the owner) of the terminal may also fail to perform the authentication, and the terminal may continue to perform the authentication for many times. At this time, the authentication function of the terminal takes time, which causes inconvenience to the user, thereby causing a reduction in convenience of the terminal.
Disclosure of Invention
The embodiment of the invention provides a method, a device, a storage medium and a terminal for determining an unlocking mode, which can improve the convenience of the terminal.
The embodiment of the invention provides a method for determining an unlocking mode, which comprises the following steps:
acquiring a first parameter value and a second parameter value in the environmental parameters;
calculating an environment parameter weight according to the first parameter value and the second parameter value;
judging whether the environment parameter weight is in a preset range or not;
and if the environment parameter weight is in the preset range, determining the current unlocking mode according to the parameter types of the first parameter and the second parameter.
An embodiment of the present invention further provides a device for determining an unlocking manner, including:
the acquisition module is used for acquiring a first parameter value and a second parameter value in the environment parameters;
the calculation module is used for calculating an environment parameter weight according to the first parameter value and the second parameter value;
the judging module is used for judging whether the environment parameter weight is in a preset range or not;
and the determining module is used for determining the current unlocking mode according to the parameter types of the first parameter and the second parameter when the environment parameter weight is in the preset range.
The embodiment of the invention also provides a storage medium, wherein a plurality of instructions are stored in the storage medium, and the instructions are suitable for being loaded by a processor to execute the method for determining the unlocking mode.
The embodiment of the invention also provides a terminal, which comprises a processor and a memory, wherein the memory is stored with a plurality of instructions, and the processor loads the instructions to execute the method for determining the unlocking mode.
According to the method for determining the unlocking mode, provided by the embodiment of the invention, a first parameter value and a second parameter value in an environment parameter are obtained; calculating an environment parameter weight according to the first parameter value and the second parameter value; judging whether the environment parameter weight is in a preset range or not; and when the environment parameter weight is in the preset range, determining the current unlocking mode according to the parameter types of the first parameter and the second parameter. According to the scheme, when the calculated environment parameter weight is within the preset range, the terminal determines the current unlocking mode of the terminal according to the parameter types of the first parameter and the second parameter, so that the influence of the environment parameter on the unlocking accuracy can be reduced, the unlocking success rate of the terminal can be improved, and the convenience of the terminal can be further improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a state diagram of a terminal lock screen interface.
Fig. 2 is a flowchart illustrating a method for determining an unlocking manner according to an embodiment of the present invention.
Fig. 3 is another flowchart illustrating a method for determining an unlocking manner according to an embodiment of the present invention.
Fig. 4 is a schematic flowchart of a method for determining an unlocking manner according to an embodiment of the present invention.
Fig. 5 is a schematic view of an application scenario of the method for determining an unlocking manner according to the embodiment of the present invention.
Fig. 6 is a schematic view of another application scenario of the method for determining an unlocking manner according to the embodiment of the present invention.
Fig. 7 is a schematic view of another application scenario of the method for determining an unlocking manner according to the embodiment of the present invention.
Fig. 8 is a schematic structural diagram of a device for determining an unlocking manner according to an embodiment of the present invention.
Fig. 9 is another schematic structural diagram of the device for determining an unlocking manner according to the embodiment of the present invention.
Fig. 10 is a schematic structural diagram of a device for determining an unlocking manner according to an embodiment of the present invention.
Fig. 11 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Fig. 12 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, belong to the scope of protection of the present invention.
The terms "first," "second," "third," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the objects so described are interchangeable under appropriate circumstances. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, or apparatus, terminal, system comprising a list of steps is not necessarily limited to those steps or modules or elements expressly listed, and may include other steps or modules or elements not expressly listed, or inherent to such process, method, apparatus, terminal, or system.
Referring to fig. 1, fig. 1 is a schematic view illustrating a state of a terminal screen locking interface. When a user enters a terminal system, the terminal firstly displays a screen locking interface. The terminal is provided with a fingerprint identification module used for collecting fingerprint information of a user. And when the fingerprint information input by the user is matched with the fingerprint information prestored in the terminal, the user identity authentication is passed. At this time, the terminal unlocks and enters an unlocked interface. The interface entered after the terminal is unlocked can be a main interface (namely a desktop of the terminal) of the terminal or an application program interface.
The embodiment of the invention provides a method for determining an unlocking mode, which can be applied to a terminal. The terminal can be a smart phone, a tablet computer and other devices. As shown in fig. 2, the method for determining the unlocking manner may include the following steps:
s110, a first parameter value and a second parameter value in the environment parameter are obtained.
The terminal has a plurality of unlocking modes. For example, the terminal may include fingerprint unlocking, iris unlocking, voiceprint unlocking, and other unlocking modes.
In the fingerprint unlocking mode, the terminal collects fingerprint information of a user. And when the fingerprint information is matched with the preset fingerprint information, unlocking the terminal. The preset fingerprint information may be fingerprint information of an owner (i.e., an owner of the terminal) that is acquired by the terminal in advance.
In the iris unlocking mode, the terminal acquires iris information of a user. And when the iris information is matched with the preset iris information, unlocking the terminal. The preset iris information may be the iris information of the owner, which is acquired by the terminal in advance.
In the voiceprint unlocking mode, the terminal collects voiceprint information of the user. And when the voiceprint information is matched with the preset voiceprint information, the terminal unlocks. The preset voiceprint information can be the voiceprint information of the owner, which is collected by the terminal in advance.
When a user triggers an unlocking operation of the terminal, for example, the terminal lights up a screen, the terminal may acquire a first parameter value and a second parameter value in the environment parameter. The first parameter and the second parameter may be parameters that affect the terminal unlocking accuracy.
In some embodiments, the environmental parameters may include parameters such as ambient temperature, fine particulate matter concentration (PM2.5), ambient light intensity, ambient noise, and distance between the terminal and the user. The terminal can acquire the plurality of environmental parameters in real time and sequentially acquire two parameters from the acquired plurality of environmental parameters for processing.
For fingerprint unlocking, when the ambient temperature is too high, the user's hand may sweat, thereby affecting the accuracy of fingerprint identification. When fine particles concentration was too high, the user finger can be infected with fine particles to also can influence fingerprint identification's accuracy. Thus, the first and second parameters may be temperature and fine particle concentration.
For iris unlocking, when the ambient light intensity is insufficient, for example, at night, inaccurate acquisition may occur when a camera in the terminal acquires iris information of a user. When the distance between the terminal and the user is too far, the camera collects iris information of the user, and the collection is inaccurate. Thus, the first and second parameters may be the ambient light intensity and the distance between the terminal and the user.
For voiceprint unlocking, when the environmental noise is too large, the sound of the user and the environmental noise are mixed together, and the condition of inaccurate acquisition exists when the terminal acquires the voiceprint information of the user. When the distance between the terminal and the user is too far, the sound emitted by the user is weakened when reaching the terminal, so that the accuracy of acquiring the voiceprint information of the user by the terminal is influenced. Thus, the first and second parameters may be ambient noise and the distance between the terminal and the user.
S120, calculating the environment parameter weight according to the first parameter value and the second parameter value.
After the terminal obtains the first parameter value and the second parameter value, the terminal calculates an environment parameter weight according to the first parameter value and the second parameter value based on a preset algorithm. The environment parameter weight may be a numerical value. The environment parameter weight is used for determining the current unlocking mode of the terminal.
S130, judging whether the environment parameter weight is in a preset range.
The preset range may be a numerical range preset for the environment parameter weight. The preset range may be stored in the terminal in advance. And after the terminal calculates the environment parameter weight, comparing the environment parameter weight with the numerical end point of the preset range to judge whether the environment parameter weight is in the preset range.
And S140, when the environmental parameter weight is in the preset range, determining the current unlocking mode according to the parameter types of the first parameter and the second parameter.
And when the terminal judges that the environmental parameter weight is in the preset range, determining the current unlocking mode according to the parameter types of the first parameter and the second parameter. After the terminal determines the current unlocking mode, the terminal can acquire the authentication information of the user according to the current unlocking mode so as to authenticate the user identity. The parameter types may be ambient temperature, fine particle concentration, ambient light intensity, ambient noise, and distance between the terminal and the user.
When the terminal determines that the environmental parameter weight is not within the preset range, the terminal may terminate the process or resume execution of the process.
In some embodiments, as shown in fig. 3, the step S120 of calculating the environment parameter weight according to the first parameter value and the second parameter value includes the following steps:
s121, carrying out normalization processing on the first parameter value to obtain a first normalization parameter value;
s122, normalizing the second parameter value to obtain a second normalized parameter value;
s123, calculating the environment parameter weight according to the first normalization parameter value and the second normalization parameter value.
The normalization is a simplified calculation mode, that is, a dimensional expression is transformed into a dimensionless expression and becomes a scalar. After the terminal obtains the first parameter value and the second parameter value, the terminal may perform normalization processing on the first parameter value and the second parameter value respectively to obtain a first normalization parameter value and a second normalization parameter value respectively.
And then, the terminal calculates the environment parameter weight according to the first normalization parameter value and the second normalization parameter value.
In some embodiments, in step S121, when performing normalization on the first parameter value to obtain a first normalized parameter value, the terminal may perform normalization on the first parameter value according to the following formula:
wherein, W1Is a first normalized parameter value, P is a first parameter value, P0Is a first preset parameter value. The first preset parameter value may be one preset in the terminal. The value of the first preset parameter value may be different for different parameter types.
For example, when the first parameter is ambient temperatureAt the time of measuring, the first preset parameter value P0May be 25 degrees centigrade (c, hereinafter abbreviated as degree). For example, if the first parameter value P is 30 ℃, W can be calculated1=1.2。
In some embodiments, in step S122, when performing normalization processing on the second parameter value to obtain a second normalized parameter value, the terminal may perform normalization processing on the second parameter value according to the following formula:
wherein, W2Is a second normalized parameter value, Q is a second parameter value, Q0Is a second preset parameter value. The second preset parameter value may be one preset in the terminal. The value of the second preset parameter value may be different for different parameter types.
For example, when the second parameter is the fine particle concentration, the second preset parameter value Q0May be 50 micrograms per cubic meter (μ g/m)3). For example, the second parameter value Q is 100 μ g/m3Then W can be calculated2=2。
In some embodiments, as shown in fig. 4, the step S123 of calculating the environment parameter weight value according to the first normalized parameter value and the second normalized parameter value includes the following steps:
s1231, acquiring a first weight value corresponding to the first normalization parameter value and a second weight value corresponding to the second normalization parameter value;
and S1232, calculating the environment parameter weight according to the first normalization parameter value, the first weight value, the second normalization parameter value and the second weight value.
The terminal may pre-store a correspondence between the parameter type and the weight value of the parameter type. After obtaining the first normalization parameter value and the second normalization parameter value, the terminal may obtain a first weight value corresponding to the first normalization parameter value and a second weight value corresponding to the second normalization parameter value according to the first normalization parameter value, the parameter type of the second normalization parameter value, and the corresponding relationship.
For example, the correspondence may be a correspondence as shown in table 1.
TABLE 1
After the terminal obtains the first weight value and the second weight value, the environment parameter weight value can be calculated according to the first normalization parameter value, the first weight value, the second normalization parameter value and the second weight value.
The terminal can acquire a plurality of information when the terminal is successfully unlocked for a plurality of times. For example, an unlocking mode adopted when the terminal is unlocked and real-time environment parameters influencing the unlocking mode are collected. And a plurality of pieces of collected information are learned to continuously adjust the weight values corresponding to various types of environment parameters, so that the environment parameter weight values calculated through the obtained weight values are more consistent with the actual environment condition, and the success rate of the terminal in unlocking is further improved.
In some embodiments, in step S1232, the terminal may calculate the environment parameter weight according to the first normalized parameter value, the first weight value, the second normalized parameter value, and the second weight value, and according to the following formula:
W=W1×R1+W2×R2
wherein, W is the weight of the environmental parameter, W1Is a first normalized parameter value, R1Is a first weight value, W2Is a second normalized parameter value, R2Is the second weight value.
For example, if the first parameter is the ambient temperature and the second parameter is the fine particle concentration, the first weight value R may be obtained1Is 0.6, the second weight value R2Is 0.4. For example, the first normalized parameter value W11.2, the second normalized parameter value W2When the value of W is 2, 1.2 × 0.6+2 × 0.4 is 1.52.
In some embodiments, as shown in fig. 3, before the step S110 of obtaining the first parameter value and the second parameter value in the environment parameter, the method for determining the unlocking manner may further include the following steps:
s150, setting a mapping relation between the parameter type and the unlocking mode;
step S140, when the environmental parameter weight is in the preset range, determining a current unlocking mode according to the parameter types of the first parameter and the second parameter, including the following steps:
and S141, when the environmental parameter weight is in the preset range, determining a current unlocking mode according to the parameter types of the first parameter and the second parameter and the mapping relation.
The terminal can preset the mapping relation between the parameter type and the unlocking mode. The user may also modify the mapping. And the terminal receives and stores the mapping relation between the parameter type input by the user and the unlocking mode.
For example, the mapping may be a mapping as shown in table 2.
TABLE 2
When the terminal judges that the environmental parameter weight is in the preset range, the terminal can determine the current unlocking mode according to the parameter types of the first parameter and the second parameter and the mapping relation.
For example, the preset range is (0.5, 2). And when the environment parameter weight calculated by the terminal is within the preset range, the terminal determines the current unlocking mode according to the parameter types of the first parameter and the second parameter and the mapping relation. After the current unlocking mode is determined, the terminal can start the corresponding unlocking mode so as to acquire the authentication information of the user and authenticate the user identity.
For example, when the first parameter and the second parameter are the ambient temperature and the fine particle concentration, respectively, the terminal may determine that the current unlocking manner is fingerprint unlocking. Subsequently, the terminal enters a fingerprint unlocking interface, as shown in fig. 5. At this moment, the terminal passes through fingerprint module collection user's fingerprint information to gathering discerns.
When the first parameter and the second parameter are the ambient light intensity and the distance between the terminal and the user, the terminal may determine that the current unlocking manner is iris unlocking. Subsequently, the terminal enters an iris unlock interface, as shown in fig. 6. At this time, the terminal collects the iris information of the user through the iris camera and identifies the collected iris information.
When the first parameter and the second parameter are the environmental noise and the distance between the terminal and the user, respectively, the terminal may determine that the current unlocking mode is voiceprint unlocking. The terminal then enters the voiceprint unlock interface as shown in figure 7. At this time, the terminal collects voiceprint information of the user through the microphone and identifies the voiceprint information.
In particular, the present invention is not limited by the execution sequence of the steps, and some steps may be performed in other sequences or simultaneously without conflict.
As can be seen from the above, the method for determining an unlocking manner provided in the embodiment of the present invention obtains a first parameter value and a second parameter value in an environmental parameter; calculating an environment parameter weight according to the first parameter value and the second parameter value; judging whether the environment parameter weight is in a preset range or not; and when the environment parameter weight is in the preset range, determining the current unlocking mode according to the parameter types of the first parameter and the second parameter. According to the scheme, when the calculated environment parameter weight is within the preset range, the terminal determines the current unlocking mode of the terminal according to the parameter types of the first parameter and the second parameter, so that the influence of the environment parameter on the unlocking accuracy can be reduced, the unlocking success rate of the terminal can be improved, and the convenience of the terminal can be further improved.
The embodiment of the invention also provides a device for determining the unlocking mode, which can be integrated in a terminal, wherein the terminal can be a smart phone, a tablet computer and other equipment.
As shown in fig. 8, the apparatus 200 for determining an unlocking manner may include: the device comprises an acquisition module 201, a calculation module 202, a judgment module 203 and a determination module 204.
The obtaining module 201 is configured to obtain a first parameter value and a second parameter value in the environment parameter.
The terminal has a plurality of unlocking modes. For example, the terminal may include fingerprint unlocking, iris unlocking, voiceprint unlocking, and other unlocking modes.
In the fingerprint unlocking mode, the terminal collects fingerprint information of a user. And when the fingerprint information is matched with the preset fingerprint information, unlocking the terminal. The preset fingerprint information may be fingerprint information of an owner (i.e., an owner of the terminal) that is acquired by the terminal in advance.
In the iris unlocking mode, the terminal acquires iris information of a user. And when the iris information is matched with the preset iris information, unlocking the terminal. The preset iris information may be the iris information of the owner, which is acquired by the terminal in advance.
In the voiceprint unlocking mode, the terminal collects voiceprint information of the user. And when the voiceprint information is matched with the preset voiceprint information, the terminal unlocks. The preset voiceprint information can be the voiceprint information of the owner, which is collected by the terminal in advance.
When a user triggers an unlocking operation of the terminal, for example, the terminal lights up a screen, the obtaining module 201 may obtain a first parameter value and a second parameter value in the environment parameter. The first parameter and the second parameter may be parameters that affect the terminal unlocking accuracy.
In some embodiments, the environmental parameters may include parameters such as ambient temperature, fine particulate matter concentration (PM2.5), ambient light intensity, ambient noise, and distance between the terminal and the user. The terminal may acquire the plurality of environmental parameters in real time, and the acquiring module 201 sequentially acquires two parameters from the acquired plurality of environmental parameters for processing.
For fingerprint unlocking, when the ambient temperature is too high, the user's hand may sweat, thereby affecting the accuracy of fingerprint identification. When fine particles concentration was too high, the user finger can be infected with fine particles to also can influence fingerprint identification's accuracy. Thus, the first and second parameters may be temperature and fine particle concentration.
For iris unlocking, when the ambient light intensity is insufficient, for example, at night, inaccurate acquisition may occur when a camera in the terminal acquires iris information of a user. When the distance between the terminal and the user is too far, the camera collects iris information of the user, and the collection is inaccurate. Thus, the first and second parameters may be the ambient light intensity and the distance between the terminal and the user.
For voiceprint unlocking, when the environmental noise is too large, the sound of the user and the environmental noise are mixed together, and the condition of inaccurate acquisition exists when the terminal acquires the voiceprint information of the user. When the distance between the terminal and the user is too far, the sound emitted by the user is weakened when reaching the terminal, so that the accuracy of acquiring the voiceprint information of the user by the terminal is influenced. Thus, the first and second parameters may be ambient noise and the distance between the terminal and the user.
The calculating module 202 is configured to calculate an environment parameter weight according to the first parameter value and the second parameter value.
After the obtaining module 201 obtains the first parameter value and the second parameter value, the calculating module 202 calculates the environmental parameter weight according to the first parameter value and the second parameter value based on a preset algorithm. The environment parameter weight may be a numerical value. The environment parameter weight is used for determining the current unlocking mode of the terminal.
The judging module 203 is configured to judge whether the environment parameter weight is within a preset range.
The preset range may be a numerical range preset for the environment parameter weight. The preset range may be stored in the terminal in advance. After the calculation module 202 calculates the environmental parameter weight, the judgment module 203 compares the environmental parameter weight with the numerical end of the preset range to judge whether the environmental parameter weight is within the preset range.
The determining module 204 is configured to determine, when the environment parameter weight is within the preset range, a current unlocking manner according to the parameter types of the first parameter and the second parameter.
When the determining module 203 determines that the environmental parameter weight is within the preset range, the determining module 204 determines the current unlocking mode according to the parameter types of the first parameter and the second parameter. After the determining module 204 determines the current unlocking mode, the terminal may acquire the authentication information of the user according to the current unlocking mode to authenticate the user identity. The parameter types may be ambient temperature, fine particle concentration, ambient light intensity, ambient noise, and distance between the terminal and the user.
When the determining module 203 determines that the environment parameter weight is not within the preset range, the terminal may terminate the process or resume the execution of the process.
In some embodiments, as shown in fig. 9, the calculation module 202 includes: a first processing sub-module 2021, a second processing sub-module 2022, and a calculation sub-module 2023.
The first processing sub-module 2021 is configured to perform normalization processing on the first parameter value to obtain a first normalized parameter value;
the second processing sub-module 2022 is configured to perform normalization processing on the second parameter value to obtain a second normalized parameter value;
the calculating sub-module 2023 is configured to calculate an environment parameter weight according to the first normalized parameter value and the second normalized parameter value.
The normalization is a simplified calculation mode, that is, a dimensional expression is transformed into a dimensionless expression and becomes a scalar. After the obtaining module 201 obtains the first parameter value and the second parameter value, the first processing sub-module 2021 and the second processing sub-module 2022 may respectively perform normalization processing on the first parameter value and the second parameter value to obtain a first normalization parameter value and a second normalization parameter value, respectively.
Subsequently, the calculation sub-module 2023 calculates an environment parameter weight value according to the first normalized parameter value and the second normalized parameter value.
In some embodiments, the first processing sub-module 2021 normalizes the first parameter value according to the following formula:
wherein, W1Is a first normalized parameter value, P is a first parameter value, P0Is a first preset parameter value. The first preset parameter value may be one preset in the terminal. The value of the first preset parameter value may be different for different parameter types.
For example, when the first parameter is the ambient temperature, the first preset parameter value P0May be 25 degrees centigrade (c, hereinafter abbreviated as degree). For example, if the first parameter value P is 30 ℃, W can be calculated1=1.2。
In some embodiments, the second processing sub-module 2022 normalizes the second parameter value according to the following formula:
wherein, W2Is a second normalized parameter value, Q is a second parameter value, Q0Is a second preset parameter value. The second preset parameter value may be one preset in the terminal. The value of the second preset parameter value may be different for different parameter types.
For example, when the second parameter is the fine particle concentration, the second preset parameter value Q0May be 50 micrograms per cubic meter (μ g/m)3). For example, the second parameter value Q is 100 μ g/m3Then W can be calculated2=2。
In some embodiments, the calculation sub-module 2023 is configured to perform the following steps:
acquiring a first weight value corresponding to the first normalization parameter value and a second weight value corresponding to the second normalization parameter value;
and calculating the environment parameter weight according to the first normalization parameter value, the first weight value, the second normalization parameter value and the second weight value.
The terminal may pre-store a correspondence between the parameter type and the weight value of the parameter type. After the first processing sub-module 2021 and the second processing sub-module 2022 obtain the first normalization parameter value and the second normalization parameter value, respectively, the calculating sub-module 2023 may obtain a first weight value corresponding to the first normalization parameter value and a second weight value corresponding to the second normalization parameter value according to the parameter type of the first normalization parameter value and the second normalization parameter value and the corresponding relationship.
For example, the correspondence may be a correspondence as shown in table 3.
TABLE 3
After the calculating sub-module 2023 obtains the first weight value and the second weight value, the environment parameter weight value can be calculated according to the first normalization parameter value, the first weight value, the second normalization parameter value, and the second weight value.
The terminal can acquire a plurality of information when the terminal is successfully unlocked for a plurality of times. For example, an unlocking mode adopted when the terminal is unlocked and real-time environment parameters influencing the unlocking mode are collected. And a plurality of pieces of collected information are learned to continuously adjust the weight values corresponding to various types of environment parameters, so that the environment parameter weight values calculated through the obtained weight values are more consistent with the actual environment condition, and the success rate of the terminal in unlocking is further improved.
In some embodiments, the calculation sub-module 2023 calculates the environment parameter weights according to the following formula:
W=W1×R1+W2×R2
wherein, W is the weight of the environmental parameter, W1Is a first normalized parameter value, R1Is a first weight value, W2Is a second normalized parameter value, R2Is the second weight value.
For example, the first parameter is ambient temperature, secondIf the second parameter is the concentration of the fine particles, the first weighted value R can be obtained1Is 0.6, the second weight value R2Is 0.4. For example, the first normalized parameter value W11.2, the second normalized parameter value W2When the value of W is 2, 1.2 × 0.6+2 × 0.4 is 1.52.
In some embodiments, as shown in fig. 10, the apparatus 200 for determining an unlocking manner further includes: a setup module 205.
A setting module 205, configured to set a mapping relationship between a parameter type and an unlocking manner;
the determining module 204 is configured to determine, when the environment parameter weight is within the preset range, a current unlocking manner according to the parameter types of the first parameter and the second parameter and the mapping relationship.
The terminal can preset the mapping relation between the parameter type and the unlocking mode. The user may also modify the mapping. The setting module 205 receives and stores the mapping relationship between the parameter type and the unlocking mode input by the user.
For example, the mapping may be a mapping as shown in table 4.
TABLE 4
When the determining module 203 determines that the environmental parameter weight is within the preset range, the determining module 204 may determine the current unlocking manner according to the parameter types of the first parameter and the second parameter and the mapping relationship.
For example, the preset range is (0.5, 2). When the environmental parameter weight calculated by the calculating module 202 is within the preset range, the determining module 204 determines the current unlocking mode according to the parameter types of the first parameter and the second parameter and the mapping relationship. After the current unlocking mode is determined, the terminal can start the corresponding unlocking mode so as to acquire the authentication information of the user and authenticate the user identity.
For example, the determination module 204 may determine that the current unlocking manner is fingerprint unlocking when the first parameter and the second parameter are the ambient temperature and the fine particulate matter concentration, respectively. And then, the terminal enters a fingerprint unlocking interface. At this moment, the terminal passes through fingerprint module collection user's fingerprint information to gathering discerns.
When the first parameter and the second parameter are the ambient light intensity and the distance between the terminal and the user, respectively, the determining module 204 may determine that the current unlocking manner is iris unlocking. Subsequently, the terminal enters an iris unlock interface. At this time, the terminal collects the iris information of the user through the iris camera and identifies the collected iris information.
When the first parameter and the second parameter are the environmental noise and the distance between the terminal and the user, respectively, the determining module 204 may determine that the current unlocking manner is voiceprint unlocking. The terminal then enters a voiceprint unlock interface. At this time, the terminal collects voiceprint information of the user through the microphone and identifies the voiceprint information.
In specific implementation, the modules may be implemented as independent entities, or may be combined arbitrarily and implemented as one or several entities.
As can be seen from the above, in the apparatus 200 for determining an unlocking manner provided in the embodiment of the present invention, the obtaining module 201 obtains the first parameter value and the second parameter value in the environment parameter; the calculation module 202 calculates an environment parameter weight according to the first parameter value and the second parameter value; the judging module 203 judges whether the environmental parameter weight is in a preset range; when the environmental parameter weight is within the preset range, the determining module 204 determines the current unlocking mode according to the parameter types of the first parameter and the second parameter. According to the scheme, when the calculated environment parameter weight is within the preset range, the terminal determines the current unlocking mode of the terminal according to the parameter types of the first parameter and the second parameter, so that the influence of the environment parameter on the unlocking accuracy can be reduced, the unlocking success rate of the terminal can be improved, and the convenience of the terminal can be further improved.
The embodiment of the invention also provides the terminal. The terminal can be a smart phone, a tablet computer and other devices. As shown in fig. 11, the terminal 300 includes a processor 301 and a memory 302. The processor 301 is electrically connected to the memory 302.
The processor 301 is a control center of the terminal 300, connects various parts of the entire terminal using various interfaces and lines, performs various functions of the terminal and processes data by running or loading an application program stored in the memory 302, and calling data stored in the memory 302, thereby performing overall monitoring of the terminal.
In this embodiment, the processor 301 in the terminal 300 loads instructions corresponding to processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 runs the application programs stored in the memory 302, thereby implementing various functions:
acquiring a first parameter value and a second parameter value in the environmental parameters;
calculating an environment parameter weight according to the first parameter value and the second parameter value;
judging whether the environment parameter weight is in a preset range or not;
and if the environment parameter weight is in the preset range, determining the current unlocking mode according to the parameter types of the first parameter and the second parameter.
In some embodiments, when calculating the environment parameter weight according to the first parameter value and the second parameter value, the processor 301 performs the following steps:
normalizing the first parameter value to obtain a first normalized parameter value;
normalizing the second parameter value to obtain a second normalized parameter value;
and calculating an environment parameter weight according to the first normalization parameter value and the second normalization parameter value.
In some embodiments, processor 301 calculates the first normalized parameter value according to the following formula:
wherein, W1Is a first normalized parameter value, P is a first parameter value, P0Is a first preset parameter value.
In some embodiments, when calculating the environment parameter weight according to the first normalized parameter value and the second normalized parameter value, processor 301 performs the following steps:
acquiring a first weight value corresponding to the first normalization parameter value and a second weight value corresponding to the second normalization parameter value;
and calculating an environment parameter weight according to the first normalization parameter value, the first weight value, the second normalization parameter value and the second weight value.
In some embodiments, processor 301 calculates the environment parameter weight according to the following formula:
W=W1×R1+W2×R2
wherein, W is the weight of the environmental parameter, W1Is a first normalized parameter value, R1Is a first weight value, W2Is a second normalized parameter value, R2Is the second weight value.
In some embodiments, before obtaining the first parameter value and the second parameter value of the environment parameter, the processor 301 further performs the following steps:
setting a mapping relation between the parameter type and the unlocking mode;
if the environmental parameter weight is within the preset range, when the current unlocking mode is determined according to the parameter types of the first parameter and the second parameter, the processor 301 executes the following steps:
and if the environment parameter weight is in the preset range, determining the current unlocking mode according to the parameter types of the first parameter and the second parameter and the mapping relation.
The memory 302 may be used to store applications and data. The memory 302 stores applications containing instructions that are executable in the processor. The application programs may constitute various functional modules. The processor 301 executes various functional applications and data processing by running an application program stored in the memory 302.
In some embodiments, as shown in fig. 12, the terminal 300 further includes: fingerprint module 303, display screen 304, microphone 305, input unit 306, camera 307, sensor 308 and power 309. The processor 301 is electrically connected to the fingerprint module 303, the display screen 304, the microphone 305, the input unit 306, the camera 307, the sensor 308, and the power source 309, respectively.
Fingerprint module 303 is used for gathering user's fingerprint information to discern user's identity.
The display screen 304 may be used to display information entered by or provided to the user as well as various graphical user interfaces of the terminal, which may be comprised of images, text, icons, video, and any combination thereof.
The microphone 305 is used to collect sound signals. In some embodiments, microphone 305 may be used to collect voiceprint information for the user.
The input unit 306 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. The input unit 306 may include a fingerprint recognition module.
The camera 307 is used for acquiring an external image signal. In some embodiments, camera 307 is an iris camera and may be used to collect iris information of the user.
The sensor 308 is used to collect external environmental information. In some embodiments, the sensors 308 may include various sensors such as an ambient light sensor, a temperature sensor, a fine particle concentration sensor, a distance sensor, and the like.
The power supply 309 is used to power the various components of the terminal 300. In some embodiments, the power source 309 may be logically coupled to the processor 301 through a power management system, such that functions to manage charging, discharging, and power consumption management are performed through the power management system.
Although not shown in fig. 12, the terminal 300 may further include a radio frequency module, a bluetooth module, etc., which are not described in detail herein.
Therefore, the embodiment of the invention provides a terminal, which acquires a first parameter value and a second parameter value in an environmental parameter; calculating an environment parameter weight according to the first parameter value and the second parameter value; judging whether the environment parameter weight is in a preset range or not; and when the environment parameter weight is in the preset range, determining the current unlocking mode according to the parameter types of the first parameter and the second parameter. According to the scheme, when the calculated environment parameter weight is within the preset range, the terminal determines the current unlocking mode of the terminal according to the parameter types of the first parameter and the second parameter, so that the influence of the environment parameter on the unlocking accuracy can be reduced, the unlocking success rate of the terminal can be improved, and the convenience of the terminal can be further improved.
The embodiment of the present invention further provides a storage medium, where a plurality of instructions are stored in the storage medium, and the instructions are suitable for being loaded by a processor to execute the method for determining an unlocking manner according to any of the above embodiments.
It should be noted that, those skilled in the art can understand that all or part of the steps in the methods of the above embodiments can be implemented by hardware related to instructions of a program, and the program can be stored in a computer readable storage medium, which can include but is not limited to: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The method, the apparatus, the storage medium, and the terminal for determining an unlocking manner provided in the embodiments of the present invention are described in detail above, and a specific example is applied in the present disclosure to explain the principle and the embodiments 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.