CN-115098846-B - Unlocking method, electronic device, storage medium and computer program product
Abstract
The embodiment of the application provides an unlocking method, electronic equipment, a storage medium and a computer program product. The method comprises the steps of obtaining a current unlocking image corresponding to a current unlocking operation, obtaining at least one previous unlocking image corresponding to at least one previous unlocking operation before the current unlocking operation, searching for a previous unlocking image with a first similarity greater than a first similarity threshold value from the at least one previous unlocking image, and determining whether to unlock or not based on previous unlocking results respectively corresponding to the searched multiple previous unlocking images or based on previous unlocking results respectively corresponding to the current comparison result and the searched one or more previous unlocking images, wherein the current comparison result is obtained by comparing the current unlocking image with a bottom library image in a target bottom library. The method is beneficial to improving the accuracy of biological feature identification, and further is beneficial to improving the success rate of unlocking.
Inventors
- ZHAO BORUI
- SONG RENJIE
Assignees
- 北京迈格威科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20220426
Claims (18)
- 1. An unlocking method, comprising: acquiring a current unlocking image corresponding to a current unlocking operation; acquiring at least one previous unlocking image corresponding to at least one previous unlocking operation before the current unlocking operation; searching a previous unlocking image with the first similarity larger than a first similarity threshold value between the previous unlocking image and the current unlocking image from the at least one previous unlocking image; when the number of the previous unlocking images is multiple, determining whether to unlock or not based on the previous unlocking results corresponding to the searched multiple previous unlocking images; or determining whether to unlock based on the current comparison result and the previous unlocking result corresponding to each of the one or more searched previous unlocking images; The current comparison result is obtained by comparing the current unlocking image with the base images in the target base, the unlocking result of the previous unlocking image is used for determining a current unlocking threshold, the current unlocking threshold is a judging threshold for judging the comparison result of the current unlocking image and the base images, or the previous unlocking result comprises a previous comparison result, each of the current comparison result and the previous comparison result comprises a second similarity between the corresponding unlocking image and each of the one or more base images in the target base, and the second similarity obtained by carrying out weighted average on the one or more previous unlocking images and the second similarity corresponding to each of the current unlocking images is used for determining whether unlocking is carried out.
- 2. The method of claim 1, wherein the current comparison result comprises a second similarity between the current unlock image and each of the one or more base images in the target base, The determining whether to unlock based on the current comparison result and the previous unlocking result corresponding to each of the one or more searched previous unlocking images comprises: Determining a current unlocking threshold based on previous unlocking results corresponding to the one or more searched previous unlocking images respectively; If the second similarity greater than the current unlocking threshold exists in the current comparison result, determining that the unlocking is successful; and if the second similarity larger than the current unlocking threshold value does not exist in the current comparison result, determining that the unlocking fails.
- 3. The method of claim 2, wherein the determining the current unlock threshold based on the respective previous unlock results of the one or more previous unlock images comprises: determining auxiliary unlocking information based on previous unlocking results corresponding to the one or more searched previous unlocking images respectively; and determining the current unlocking threshold value based on the auxiliary unlocking information.
- 4. The method of claim 3, wherein the determining the current unlock threshold based on the auxiliary unlock information comprises: In case the auxiliary unlocking information indicates not to unlock, the initial unlocking threshold is adjusted up to obtain the current unlocking threshold, and/or, And under the condition that the auxiliary unlocking information indicates unlocking, the initial unlocking threshold value is lowered to obtain the current unlocking threshold value.
- 5. The method of claim 3 or 4, wherein the determining auxiliary unlocking information based on the respective previous unlocking results of the one or more previous unlocking images comprises: and if the first preset number or the first preset proportion of previous unlocking results exist in the previous unlocking results corresponding to the one or more searched previous unlocking images, determining the auxiliary unlocking information as unlocking, otherwise, determining the auxiliary unlocking information as unlocking.
- 6. The method of claim 3 or 4, wherein the previous unlock results include a second similarity between a corresponding previous unlock image and a base image in the target base, the determining auxiliary unlock information based on the respective corresponding previous unlock results of the one or more found previous unlock images includes: performing weighted average on the second similarity corresponding to each of the one or more searched previous unlocking images to obtain a first average similarity; and if the first average similarity is larger than a second similarity threshold, determining the auxiliary unlocking information as unlocking, otherwise, determining the auxiliary unlocking information as not unlocking.
- 7. The method of claim 6, wherein, at the weighted averaging, for any of the one or more previously unlocked images found, a second similarity corresponding to the previously unlocked image is weighted more heavily the closer the execution time of the previously unlocked operation corresponding to the previously unlocked image is to the execution time of the current unlocked operation.
- 8. The method of claim 1, wherein determining whether to unlock based on the current comparison result and the previous unlock result corresponding to each of the one or more previous unlock images comprises: Performing weighted average on the second similarity corresponding to each of the one or more searched previous unlocking images and the current unlocking image to obtain second average similarity; comparing the second average degree with a current unlocking threshold; If the second average degree is larger than the current unlocking threshold value, determining that the unlocking is successful; And if the second average degree is not greater than the current unlocking threshold value, determining that the unlocking fails.
- 9. The method of claim 8, wherein the weighted average is the weighted maximum of the second similarity corresponding to the current unlock image, and the weighted maximum of the second similarity corresponding to the previous unlock image is the closer the execution time of the previous unlock operation corresponding to the previous unlock image is to the execution time of the current unlock operation for any one of the one or more previous unlock images.
- 10. The method of any one of claims 1 to 4, wherein the current comparison result includes a second similarity between the current unlock image and each of one or more of the base images in the target base, After said searching for a previous unlock image from said at least one previous unlock image having a first similarity to said current unlock image greater than a first similarity threshold, said method further comprises: in the case that one or more previous unlock images are not found, determining a current unlock threshold as an initial unlock threshold; If the second similarity greater than the current unlocking threshold exists in the current comparison result, determining that the unlocking is successful; and if the second similarity larger than the current unlocking threshold value does not exist in the current comparison result, determining that the unlocking fails.
- 11. The method of claim 1, wherein the determining whether to unlock based on the found previous unlock results for each of the plurality of previous unlock images comprises one of: if the previous unlocking results corresponding to the searched multiple previous unlocking images are successful in unlocking, determining that the unlocking is successful, otherwise, determining that the unlocking is failed; If the previous unlocking results corresponding to the second preset number or the second preset proportion of the previous unlocking images exist in the plurality of searched previous unlocking images, the unlocking success is determined, otherwise, the unlocking failure is determined; if the previous unlocking results corresponding to the continuous previous unlocking images with the third preset number or the third preset proportion exist in the searched multiple previous unlocking images, the unlocking success is determined, otherwise, the unlocking failure is determined; if the previous unlocking results corresponding to the searched multiple previous unlocking images are successful in unlocking, and the searched multiple previous unlocking images are the previous unlocking images acquired in a first preset period before the current moment, determining that the unlocking is successful, otherwise, determining that the unlocking is failed; If the previous unlocking results corresponding to the fourth preset number or the fourth preset proportion of previous unlocking images exist in the searched multiple previous unlocking images, the previous unlocking results are unlocking success, and the fourth preset number or the fourth preset proportion of previous unlocking images are previous unlocking images acquired in a second preset period before the current moment, the successful unlocking is determined, and otherwise, the unlocking failure is determined; and if the previous unlocking results corresponding to the fifth preset number or the fifth preset proportion of continuous previous unlocking images exist in the searched multiple previous unlocking images, the previous unlocking results are successful unlocking, and the fifth preset number or the fifth preset proportion of continuous previous unlocking images are previous unlocking images acquired in a third preset period before the current moment, the successful unlocking is determined, and otherwise, the unlocking failure is determined.
- 12. The method of any of claims 1 to 4, 7 to 9, 11, wherein after the acquiring the current unlock image corresponding to the current unlock operation, the method further comprises: Selecting representative images from a plurality of previous image sets or a plurality of bottom libraries which are in one-to-one correspondence with a plurality of different target objects respectively so as to obtain representative image sets which are respectively corresponding to the plurality of different target objects; Comparing the current unlocking image with each representative image set to determine a third similarity between the current unlocking image and each representative image set; Selecting a previous image set and a bottom library corresponding to the representative image set with the maximum third similarity; Determining an image of the selected set of previous images as the at least one previously unlocked image; And determining the selected bottom library as the target bottom library.
- 13. The method of any of claims 1 to 4, 7 to 9, 11, wherein the at least one previously unlocked image is stored in a storage unit, the number of previously unlocked images stored in the storage unit being fixed.
- 14. The method of claim 13, wherein the method further comprises: Determining an image quality of a previously unlocked image stored in the storage unit; Deleting a target previous unlocking image and a corresponding previous unlocking result from the storage unit, and storing the current unlocking image and the current unlocking result corresponding to the current unlocking image in the storage unit, wherein the target previous unlocking image is the image with the lowest image quality in the previous unlocking images stored in the storage unit.
- 15. The method of any of claims 1 to 4, 7 to 9, 11, 14, wherein the at least one previous unlock image is a previous unlock image acquired within a fourth preset period of time prior to the current time.
- 16. An electronic device comprising a processor and a memory, wherein the memory has stored therein computer program instructions which, when executed by the processor, are adapted to carry out the unlocking method of any one of claims 1 to 15.
- 17. A storage medium having stored thereon program instructions, which when run are adapted to perform the unlocking method according to any of claims 1 to 15.
- 18. A computer program product comprising a computer program, characterized in that the computer program is operative when running for performing the unlocking method according to any one of claims 1 to 15.
Description
Unlocking method, electronic device, storage medium and computer program product Technical Field The present application relates to the field of image processing technology, and more particularly, to an unlocking method, an electronic device, a storage medium, and a computer program product. Background Currently, many electronic devices are protected by various unlocking techniques for security, and a user needs to pass through identification verification before unlocking the electronic device. The prior unlocking technology comprises various unlocking technologies based on biological characteristics, such as face unlocking, fingerprint unlocking and the like. Existing unlocking techniques have some limitations in use. For example, due to the limitation of the collection area or collection performance of the biological features such as the face or the fingerprint, the accuracy of the identification of the biological features is low, so that the success rate of unlocking is also reduced. Disclosure of Invention The present application has been made in view of the above-described problems. The application provides an unlocking method, electronic equipment, a storage medium and a computer program product. According to one aspect of the application, an unlocking method comprises the steps of obtaining a current unlocking image corresponding to a current unlocking operation, obtaining at least one previous unlocking image corresponding to at least one previous unlocking operation before the current unlocking operation, searching for a previous unlocking image with a first similarity greater than a first similarity threshold value from the at least one previous unlocking image, and determining whether to unlock or not based on previous unlocking results respectively corresponding to the searched multiple previous unlocking images or based on previous unlocking results respectively corresponding to the current comparison result and the searched one or more previous unlocking images, wherein the current comparison result is obtained by comparing the current unlocking image with a base image in a target base. The method comprises the steps of determining whether to unlock the object, wherein the current comparison result comprises a second similarity between a current unlocking image and each of one or more base images in the object base, determining whether to unlock the object or not based on previous unlocking results respectively corresponding to the current comparison result and the one or more found previous unlocking images, determining a current unlocking threshold based on previous unlocking results respectively corresponding to the one or more found previous unlocking images, determining that the object is successful if the second similarity greater than the current unlocking threshold exists in the current comparison result, and determining that the object is not unlocked if the second similarity greater than the current unlocking threshold does not exist in the current comparison result. The method for determining the current unlocking threshold value based on the previous unlocking results corresponding to the one or more previous unlocking images comprises the steps of determining auxiliary unlocking information based on the previous unlocking results corresponding to the one or more previous unlocking images, and determining the current unlocking threshold value based on the auxiliary unlocking information. Illustratively, determining the current unlocking threshold based on the auxiliary unlocking information includes, in the event that the auxiliary unlocking information indicates no unlocking, raising the initial unlocking threshold to obtain the current unlocking threshold, and/or, in the event that the auxiliary unlocking information indicates unlocking, lowering the initial unlocking threshold to obtain the current unlocking threshold. Illustratively, determining the auxiliary unlocking information based on the respective previous unlocking results of the one or more found previous unlocking images includes determining the auxiliary unlocking information as unlocked if there is a first preset number or a first preset proportion of previous unlocking results in the respective previous unlocking results of the one or more found previous unlocking images as successful unlocking, and otherwise determining the auxiliary unlocking information as not unlocked. The previous unlocking results comprise second similarities between corresponding previous unlocking images and base images in the target base, and the determining of the auxiliary unlocking information comprises weighting and averaging the second similarities corresponding to the one or more previous unlocking images to obtain first average similarities, determining the auxiliary unlocking information as unlocking if the first average similarities are larger than a second similarity threshold value, and determining the auxiliary unlocking inform