CN115205918A - Face image data updating method, device, equipment and storage medium - Google Patents
Face image data updating method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN115205918A CN115205918A CN202110395040.0A CN202110395040A CN115205918A CN 115205918 A CN115205918 A CN 115205918A CN 202110395040 A CN202110395040 A CN 202110395040A CN 115205918 A CN115205918 A CN 115205918A
- Authority
- CN
- China
- Prior art keywords
- image data
- face
- face image
- terminal
- resetting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/58—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Library & Information Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Collating Specific Patterns (AREA)
Abstract
The application relates to the technical field of face recognition, in particular to a method, a device, equipment and a storage medium for updating face image data. The method comprises the following steps: receiving first face image data; acquiring a first comparison result between first face image data and second face image data; responding to the first comparison result meeting the statistical updating condition, and updating the face recognition statistical information of the first user account; responding to the fact that the face recognition statistical information meets the image resetting condition, and sending an image resetting entrance to the first terminal; receiving third face image data sent by the first terminal based on the image resetting entrance; and updating the second face image data in the face template database based on the third face image data. According to the scheme, the background server can send the image reset entrance to the terminal so that the terminal can upload and update the face image data, the face recognition error caused by old base images in the face recognition process is avoided as much as possible, and the accuracy of face recognition is improved.
Description
Technical Field
The present application relates to the field of face recognition, and in particular, to a method, an apparatus, a device, and a storage medium for updating face image data.
Background
Face recognition is a biometric technology for identity recognition based on facial feature information of a person. The method comprises the following steps of collecting images or video streams containing human faces by using a camera or a camera, automatically detecting and tracking the human faces in the images, and further carrying out face recognition on the detected human faces.
In the related technology, when face recognition is currently implemented, a terminal device with an image acquisition component is required to acquire a face image, the face image is stored in a face template database, and when face recognition is required, the face image to be recognized is acquired through a terminal and is compared with the face image in the face template database to determine identity information of the face image to be recognized.
In the above technical solution, a face recognition error may occur due to a change (for example, a change in thickness) of a face of a user, which affects accuracy of the face recognition.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for updating face image data, which can improve the accuracy of face recognition, and the technical scheme is as follows:
in one aspect, a method for updating face image data is provided, where the method is performed by the backend server, and the backend server includes a face template database for face recognition, and the method includes:
receiving first face image data;
acquiring a first comparison result between the first face image data and the second face image data; the second face image data is the face image data with the highest similarity to the first face image data in the face template database;
updating the face recognition statistical information of the first user account in response to the first comparison result meeting a statistical updating condition; the first user account is a user account corresponding to the second face image data;
responding to the face recognition statistical information meeting an image resetting condition, and sending an image resetting entrance to a first terminal; the first terminal is a terminal for logging in the first user account;
receiving third face image data sent by the first terminal based on the image resetting entrance;
and updating the second face image data in the face template database based on the third face image data.
In another aspect, a method for updating facial image data is provided, where the method is performed by a first terminal, where the first terminal is a terminal logged with a first user account, and the method includes:
displaying an image resetting entrance; the image resetting entrance is sent by the background server when the face recognition statistical information responding to the first user account number meets the image resetting condition; the face identification statistical information is updated by the background server when first face image data is received and a first comparison result between the first face image data and second face image data meets a statistical updating condition; the second face image data is face image data corresponding to the first user account in a face template database, and the second face image data is face image data with the highest similarity to the first face image data in the face template database;
acquiring third face image data in response to receiving a specified operation on the image resetting entrance;
and sending the third face image data to the background server so that the background server can update the second face image data in the face template database based on the third face image data.
In another aspect, a device for updating face image data is provided, where the device is used in a background server, and the background server includes a face template database for face recognition, and the device includes:
the first image receiving module is used for receiving first face image data;
the first comparison result acquisition module is used for acquiring a first comparison result between the first face image data and the second face image data; the second face image data is the face image data with the highest similarity to the first face image data in the face template database;
the first information updating module is used for responding to the condition that the first comparison result meets the statistical updating condition and updating the face recognition statistical information of the first user account; the first user account is a user account corresponding to the second facial image data;
the first entrance sending module is used for responding to the situation that the face recognition statistical information meets the image resetting condition and sending an image resetting entrance to the first terminal; the first terminal is a terminal for logging in the first user account;
the second image receiving module is used for receiving third face image data sent by the first terminal based on the image resetting entrance;
and the image data updating module is used for updating the second face image data in the face template database based on the third face image data.
In one possible implementation manner, the first information updating module is further configured to,
and updating the counting times corresponding to the first user account in response to the first comparison result meeting the counting updating condition, wherein the counting times are used for indicating the times that the comparison result of the second face image data corresponding to the historical times meets the counting updating condition.
In one possible implementation manner, the first ingress sending module includes:
an account status setting unit, configured to set the first user account to a to-be-updated state in response to that the face recognition statistical information satisfies a data resetting condition;
and the first entrance sending unit is used for responding to the fact that the first user account is detected to be in a state to be updated at the appointed moment, and sending the image resetting entrance to the first terminal.
In one possible implementation, the image resetting condition includes at least one of:
in the previous comparison result corresponding to the second face image data, the number of times of continuously meeting the statistic updating condition reaches a first threshold value;
in the previous comparison result corresponding to the second face image data, the accumulated times meeting the statistic updating condition reach a second threshold value;
and in the calendar comparison results corresponding to the second face image data, the accumulated first time ratio value meeting the statistical updating condition reaches a third threshold value.
In one possible implementation, the statistical update condition includes at least one of a first condition and a second condition;
the first condition includes: the first comparison result indicates that the first facial image data does not match the second facial image data;
the second condition includes: the first comparison result indicates that the first facial image data matches the second facial image data, and a similarity between the first facial image data and the second facial image data is less than a first similarity threshold.
In a possible implementation manner, the first ingress sending module further includes:
the frequency ratio obtaining unit is used for responding to the face recognition statistical information meeting the image resetting condition, and obtaining a second frequency ratio between the frequency meeting the first condition and the frequency meeting the second condition in the comparison results of the second face image data corresponding to the times;
a second entry sending unit, configured to send the image resetting entry to the first terminal based on the second frequency ratio; the reminding strength of the first prompt message in the image resetting entrance is positively correlated with the second time ratio value; the prompt information is used for prompting the user to update the face image data.
In a possible implementation manner, the first facial image data is facial image data acquired by the second terminal based on a face recognition interface, and the apparatus further includes:
responding to the fact that the face recognition statistical information meets an image resetting condition and the face recognition interface is not closed in the second terminal, and sending second prompt information to the second terminal; the second prompt message is used for prompting that the image resetting entrance is viewed in the first terminal.
In another aspect, a face image data updating apparatus is provided, where the apparatus is used for a first terminal, and the first terminal is a terminal in which a first user account is logged, and the apparatus includes:
the reset entrance display module is used for displaying the image reset entrance; the image resetting entrance is sent by the background server when the face recognition statistical information responding to the first user account number meets the image resetting condition; the background server updates the face identification statistical information when receiving first face image data and a first comparison result between the first face image data and second face image data meets a statistical updating condition; the second face image data is face image data corresponding to the first user account in a face template database, and the second face image data is face image data with the highest similarity to the first face image data in the face template database;
the face image acquisition module is used for responding to the received appointed operation of the image resetting entrance and acquiring third face image data;
and the face image sending module is used for sending the third face image data to the background server so that the background server can update the second face image data in the face template database based on the third face image data.
In a possible implementation manner, the face image obtaining module includes:
the image component calling unit is used for calling an image acquisition component in the first terminal in response to receiving the specified operation of the image resetting entrance;
and the face image acquisition unit is used for acquiring the third face image data acquired by the image acquisition assembly.
In one possible implementation, the apparatus further includes:
the recognition interface display module is used for responding to the received face recognition operation and displaying a face recognition interface;
the first face image data acquisition module is used for calling an image acquisition assembly in the first terminal to acquire the first face image data;
the first face image data sending module is used for sending the first face image data to the background server;
and the face recognition result display module is used for displaying the face recognition result of the background server on the first face image data in the face recognition interface.
In one possible implementation, the apparatus further includes:
the prompt information display module is used for displaying second prompt information in the face recognition interface, and the second prompt information is used for prompting that the image resetting entrance is viewed in the first terminal; the second prompt message is sent by the background server when the face recognition statistical information responding to the first user account meets the image resetting condition.
In yet another aspect, a computer device is provided, which includes a processor and a memory, where at least one instruction, at least one program, a set of codes, or a set of instructions is stored in the memory, and the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the above-mentioned facial image data updating method.
In yet another aspect, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a set of codes, or a set of instructions is stored, and loaded and executed by a processor to implement the above-mentioned facial image data updating method.
In yet another aspect, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the face image data updating method.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
in the face recognition process, the background server maintains statistical information based on the face recognition record of the first user account, and when the background server detects that the face recognition record of the first user account meets the image resetting condition based on the statistical information, an image resetting entry can be sent to a terminal corresponding to the first user account, so that the terminal can upload new face image data and update the face data in the face template database, the face recognition error caused by old base images in the face recognition process is avoided as much as possible, and the face recognition accuracy is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
FIG. 1 illustrates a schematic diagram of a computer system provided by an exemplary embodiment of the present application.
Fig. 2 is a flowchart illustrating a method for updating face image data according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating a method for updating face image data according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating a method of updating facial image data according to an exemplary embodiment.
Fig. 5 is a schematic diagram illustrating the reminding strength of the reminder message according to the embodiment shown in fig. 4.
Fig. 6 is a schematic diagram illustrating a prompt message according to the embodiment shown in fig. 4.
Fig. 7 is a schematic diagram illustrating a prompt message according to the embodiment shown in fig. 4.
Fig. 8 is a schematic diagram illustrating an overall architecture of a face image data updating system according to the embodiment shown in fig. 4.
Fig. 9 is a schematic diagram illustrating a method for updating face image data according to an exemplary embodiment.
Fig. 10 is a block diagram showing a configuration of a face image data updating apparatus according to an exemplary embodiment.
Fig. 11 is a block diagram showing a configuration of a face image data updating apparatus according to an exemplary embodiment.
FIG. 12 is a block diagram illustrating a computer device according to an example embodiment.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
First, terms related to embodiments of the present application will be described.
1) Artificial Intelligence (AI)
Artificial intelligence is a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the implementation method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making.
The artificial intelligence technology is a comprehensive subject and relates to the field of extensive technology, namely the technology of a hardware level and the technology of a software level. The artificial intelligence base technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
2) Computer Vision technology (Computer Vision, CV)
Computer vision is a science for researching how to make a machine "see", and further, it means that a camera and a computer are used to replace human eyes to perform machine vision such as identification, tracking and measurement on a target, and further image processing is performed, so that the computer processing becomes an image more suitable for human eyes to observe or transmitted to an instrument to detect. As a scientific discipline, computer vision research-related theories and techniques attempt to build artificial intelligence systems that can capture information from images or multidimensional data. The computer vision technology generally includes technologies such as image processing, image recognition, image semantic understanding, image retrieval, OCR (optical character recognition), video processing, video semantic understanding, video content/behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, synchronous positioning, map construction, and the like, and also includes common biometric technologies such as face recognition, fingerprint recognition, and the like.
Referring to FIG. 1, a schematic diagram of a computer system provided by an exemplary embodiment of the present application is shown. The computer system 200 includes a terminal 110 and a server 120, wherein the terminal 110 and the server 120 perform data communication through a communication network, optionally, the communication network may be a wired network or a wireless network, and the communication network may be at least one of a local area network, a metropolitan area network, and a wide area network.
The terminal 110 has an application program with a face recognition function installed therein, where the application program may be a payment application program, a communication application program, another application program requiring identity verification, or an Artificial Intelligence (AI) application program requiring a face recognition function to be invoked, which is not limited in this embodiment of the present invention.
Optionally, the terminal 110 may have a data transmission interface for receiving the face image data with other computer device inputs.
Optionally, the terminal 110 may further include an image acquisition device, and the image acquisition device may be configured to directly acquire the facial image data, or the image acquisition device may be configured to acquire video data in a specified time period and acquire the facial image data according to the video data in the specified time period.
Optionally, the terminal 110 may be a mobile terminal such as a smart phone, a tablet computer, a laptop portable notebook computer, or the like, or a terminal such as a desktop computer, a projection computer, or the like, or an intelligent terminal having a data processing component and an image acquisition component, which is not limited in this embodiment of the application.
The server 120 may be implemented as one server, or may be implemented as a server cluster formed by a group of servers, which may be physical servers, or may be implemented as a cloud server. In one possible implementation, the server 120 is a backend server for applications in the terminal 110.
In a possible implementation manner of this embodiment, the terminal 110 obtains target face image data through the image acquisition component, and uploads the target face image data to the background server 120, and the background server 120 compares the target face image data with each face image data in the face template database to obtain identity information corresponding to the target face image data, and returns the identity information corresponding to the target face image data to the terminal 110, so as to implement a complete face recognition process.
Fig. 2 is a flowchart illustrating a method for updating face image data according to an exemplary embodiment. The method may be performed by a computer device, which may be the background server 120 in the embodiment shown in fig. 1 described above. As shown in fig. 2, the flow of the method for updating facial image data may include the following steps:
And step 205, receiving third facial image data sent by the first terminal based on the image resetting entrance.
And step 206, updating the second face image data in the face template database based on the third face image data.
To sum up, according to the scheme shown in the embodiment of the application, in the face recognition process, the background server maintains statistical information based on the face recognition record of the first user account, and when the background server detects that the face recognition record of the first user account meets the image resetting condition based on the statistical information, an image resetting entry can be sent to the terminal corresponding to the first user account, so that the terminal can upload new face image data and update the face data in the face template database, thereby avoiding the occurrence of face recognition errors caused by old base images in the face recognition process as much as possible, and improving the accuracy of face recognition.
Fig. 3 is a flowchart illustrating a method for updating face image data according to an exemplary embodiment. The method may be performed by a computer device, which may be the terminal 110 in the embodiment shown in fig. 1 described above. As shown in fig. 3, the flow of the method for updating facial image data may include the following steps:
The image resetting entrance is sent by the background server when the face recognition statistical information responding to the first user account meets the image resetting condition; the background server updates the face identification statistical information when receiving first face image data and a first comparison result between the first face image data and second face image data meets a statistical updating condition; the second face image data is face image data corresponding to the first user account in a face template database, and the second face image data is face image data with the highest similarity to the first face image data in the face template database.
To sum up, according to the scheme of the embodiment of the application, in the face recognition process, the background server maintains statistical information based on the face recognition record of the first user account, and when the background server detects that the face recognition record of the first user account meets the image resetting condition based on the statistical information, the background server can send an image resetting entry to the terminal corresponding to the first user account, so that the terminal can upload new face image data and update the face data in the face template database, thereby avoiding the occurrence of face recognition errors caused by old base pictures in the face recognition process as much as possible, and improving the accuracy of face recognition.
Fig. 4 is a flowchart illustrating a method of updating facial image data according to an exemplary embodiment. The method is performed by the server 120 and the terminal 110 in the embodiment shown in fig. 1. As shown in fig. 4, the flow of the method for updating facial image data may include the following steps:
In a possible implementation manner, the first face image data is face image data to be recognized, which is acquired by a second terminal corresponding to the background server.
After the second terminal corresponding to the background server acquires the face image data to be recognized of the target object, the face image data needs to be uploaded to the corresponding background server, so that the background server can perform face recognition on the face image data to be recognized, and returns a recognition result to the second terminal, so that the second terminal can perform a corresponding operation flow according to the recognition result.
In a possible implementation manner, the second terminal sends the first face image data to the background server, and correspondingly, the background server receives the first face image data sent by the second terminal.
The second terminal is a terminal device corresponding to the client that logs in the first user account, and after the background server receives the first face image data sent by the second terminal, the first face image data can be identified, and an identification result is directly returned to the second terminal through the client of the first user account.
In a possible implementation manner, the second terminal is a mobile terminal, a client application corresponding to the background server exists on the mobile terminal, and a login account of the client application is a first user account, at this time, when a user needs to perform face recognition to implement a certain function in the client application, the client application calls an image acquisition component (i.e., a camera device) in the mobile terminal to acquire to-be-recognized face image data (i.e., first face image data) of the user, and uploads the to-be-recognized face image data to the background server, and the background server performs face recognition on the uploaded to-be-recognized face image based on the face template database, obtains a face recognition result, and returns the face recognition result to the mobile terminal, so that the mobile terminal implements a certain function (e.g., a payment function) in the client application.
In a possible implementation manner, the second terminal is an Internet of Things (IoT) terminal, an application program (e.g., a payment application program) that needs to perform a face recognition function exists on the terminal of the Internet of Things, and when a user needs to perform face recognition to implement a certain function in the application program at this time, the application program calls an image acquisition component (i.e., a camera device) in the terminal of the Internet of Things to acquire to-be-recognized face image data (i.e., first face image data) of the user and uploads the to-be-recognized face image data to a background server, and the background server performs face recognition on the uploaded to-be-recognized face image based on a face template database to obtain a face recognition result and returns the face recognition result to the terminal of the Internet of Things, so that the terminal of the Internet of Things implements the certain function (e.g., the payment function) in the application program.
In one possible implementation manner, in response to receiving a first recognition operation, calling an image acquisition component in the second terminal to acquire first face image data; and sending the first face image data to the background server.
And the first identification operation is an operation executed by a user corresponding to the second terminal on the identification trigger control on the second terminal. When the identification trigger control is displayed on the client interface of the second terminal, a user can execute first identification operation on the identification trigger control, and the terminal calls the image acquisition assembly in the second terminal to acquire first face image data in response to receiving the first identification operation.
In one possible implementation manner, in response to receiving a first recognition operation, an image acquisition component in the second terminal is called to acquire at least two acquired images; determining the first face image data based on the corresponding acquisition scores of the at least two acquired images; the acquisition score is used to indicate the acquisition quality of the acquired image.
When a first recognition operation is received, the second terminal can acquire at least two collected images through an image collecting assembly in the second terminal, wherein the collected images are face images obtained by collecting face information of a user by the second terminal, and the second terminal selects the image with the highest quality from the collected images as first face image data to be uploaded to the background server according to the quality condition corresponding to the collected images in the collected images.
In a possible implementation manner, in response to receiving a first identification operation, calling an image acquisition component in the second terminal to acquire a first video clip; at least two captured images are acquired based on each video frame in the first video segment.
When the first identification operation is received, the second terminal can call an image acquisition component in the second terminal to obtain a first video clip, and then at least two acquired images acquired by the second terminal by acquiring the face information of the user are determined in each video frame in the first video clip.
In one possible implementation manner, the acquisition scores corresponding to the at least two acquired images are determined based on the image parameters corresponding to the at least two acquired images respectively.
The image parameters comprise at least one of face size, face angle, image contrast, image brightness and image definition.
When an image acquisition component in the second terminal is called, and at least two acquired images are acquired, the acquisition parameters of the acquired images can be determined according to at least one of the face size, the face angle, the image contrast, the image brightness and the image definition in each image, and the face image with the optimal comprehensive evaluation in each acquired image is selected as the first face image data through the acquisition parameters.
In a possible implementation manner, in response to receiving the first recognition operation, an image acquisition component in the second terminal is called to acquire a video picture in real time, in response to receiving a first video frame with a quality score larger than a quality threshold, the acquisition of the video picture is stopped, and an image corresponding to the first video frame is determined as the first face image data.
When a first video frame with the quality score larger than a quality threshold value is received, the first video frame meets the quality requirement of a picture which is uploaded to a server for face recognition, and the calling of the image acquisition assembly is stopped.
In one possible implementation, the first face image data includes at least one of RGB (Red Green Blue, three primary colors of Red, green, and Blue) image data, depth image data, and infrared image data.
The image acquisition component in the second terminal can comprise at least one of an RGB image acquisition component, a depth image acquisition component and an infrared image acquisition component; the first face image data can be obtained by calling at least one of the RGB image acquisition assembly, the depth image acquisition assembly and the infrared image acquisition assembly in the second terminal.
In one possible implementation, the waiting screen is displayed on the second terminal in response to the second terminal sending the first face image data to the background server.
That is, after the second terminal sends the first face image data to the backend server, the second terminal needs to receive a face recognition result of the backend server for the first face image data, and then can execute subsequent operations based on the face recognition result, and at this time, a waiting picture, such as "loading" or "recognition", may be displayed on a terminal interface of the second terminal to prompt a user that the second terminal and the corresponding backend server are executing corresponding face recognition operations.
The second face image data is the face image data with the highest similarity with the first face image data in the face template database.
In a possible implementation manner, feature extraction is performed on the first face image data to obtain first feature data corresponding to the first face image data; and determining the second face image data and a first user account corresponding to the second face image data in the face template database based on the first feature data.
In a possible implementation manner, the face template database further includes feature data corresponding to each of the face image data, so that, according to a similarity between the first face image data and the feature data corresponding to each of the face image data, the face image data in each of the face image data whose feature data is most similar to the first feature data is determined as the first face image data.
In one possible implementation manner, the feature data may be a feature vector corresponding to each of the face image data. In this case, the face image data closest to the first face image data may be determined based on the vector distance between the first face image data and the feature vector of each of the face image data, and may be determined as the second face image data.
In one possible implementation, the vector distance may be at least one of a euclidean distance and a cosine distance.
In one possible implementation manner, first feature data corresponding to first face image data is acquired; and determining the face image data corresponding to the feature data with the highest similarity of the first feature data as second face image data in response to the fact that the similarity of the first feature data and each feature data in the face template database is larger than a similarity threshold.
When face recognition needs to be performed on first face image data, a template face image corresponding to the first face image data needs to be found in a face template database, namely, a user corresponding to the first face image data needs to find a template face image uploaded in the face template database in advance, at this time, a background server can determine second face image data in the face template database and a first user account corresponding to the second face image data according to first feature data corresponding to the first face image data and feature data of each face image data in the face template database, so as to determine identity information of the first face image data.
In a possible implementation manner, in response to that the maximum value of the similarity between the first feature data and each feature data in the face template database is smaller than a similarity threshold, recognition error information is generated, and the recognition error information is returned to a terminal corresponding to the first face image data.
When the maximum value of the similarity between the first feature data and each feature data in the face template database is smaller than the similarity threshold value, it indicates that the face image data similar to the first face image data cannot be found in the face template database at this time, and the identity of the first face image data cannot be normally recognized at this time, so that recognition error information is generated and returned to a terminal corresponding to the first face image data.
In step 403, the background server updates the face recognition statistical information of the first user account in response to that the first comparison result satisfies the statistical update condition.
The face recognition statistical information is used for indicating a history information record of face recognition corresponding to the first user account.
For example, the face recognition statistical information may include a recognition failure record of face recognition corresponding to the first user account, or the face recognition statistical information may further include a danger recognition record of face recognition corresponding to the first user account. The identification failure record is used for indicating the background server to use a comparison failure record of a face template (namely, second face image data) corresponding to the first user account and the face image data uploaded to the background server; the danger identification record is used for indicating that the background server successfully compares the face template corresponding to the first user account with the face image data uploaded to the background server, and the comparison similarity is smaller than a safety threshold.
In a possible implementation manner, in response to that the first comparison result satisfies the statistical update condition, the statistical number corresponding to the first user account is updated, where the statistical number is used to indicate the number of times that the historical comparison result corresponding to the second facial image data satisfies the statistical update condition.
In one possible implementation, the statistical update condition includes at least one of a first condition and a second condition;
the first condition includes: the first comparison result indicates that the first facial image data does not match the second facial image data;
the second condition includes: the first comparison result indicates that the first facial image data is matched with the second facial image data, and the similarity between the first facial image data and the second facial image data is smaller than a first similarity threshold value.
In one possible implementation, the statistical number includes at least one of a failure statistical number and a risk statistical number;
when the statistics updating condition includes a first condition, that is, when the first comparison result indicates that the first facial image data is not matched with the second facial image data, it indicates that the face recognition result corresponding to the first user account is a failure, and at this time, the failure statistics number corresponding to the first user account is updated (i.e., incremented by one);
when the statistical update condition includes a second condition, that is, when the first comparison result indicates that the first facial image data matches the second facial image data, and the similarity between the first facial image data and the second facial image data is smaller than a first similarity threshold (i.e., a security threshold), at this time, although the first comparison result indicates that the first facial image data and the second facial image data belong to a match (e.g., the similarity is 95%), the similarity between the first facial image data and the second facial image data is smaller than the first similarity threshold (e.g., the similarity is 99%), at this time, the match between the first facial image data and the second facial image data belongs to an insecure match, so that the dangerous statistical number corresponding to the first user account is updated (i.e., increased by one).
In step 404, the background server sends an image resetting entry to the first terminal in response to the face recognition statistical information meeting the image resetting condition.
In a possible implementation manner, in response to that the face recognition statistical information corresponding to the first user account satisfies an image resetting condition, the background server sends an image resetting entry to the first terminal corresponding to the first user account based on the first user account.
In one possible implementation manner, in response to that the face recognition statistical information meets an image resetting condition, setting the first user account to be in a state to be updated; and sending the image resetting entry to the first terminal in response to detecting that the first user account is in a state to be updated at a specified moment.
When the face recognition statistical information meets the image resetting condition, the first user account can be set to be in a state to be updated, and when the background server detects each user account within a specified time and detects that the first user account is in the state to be updated, the image resetting entry can be sent to the first terminal based on the first user account.
In a possible implementation manner, the background server detects each user account stored in the background server according to a specified period, and sends an image reset entry to a terminal where the user account needing to update the face template data is located, so as to realize the timing update of the face template data of each user account.
In one possible implementation, the image resetting condition includes at least one of:
in the previous comparison result corresponding to the second face image data, the times of continuously meeting the statistic updating condition reach a first threshold value;
in the previous comparison result corresponding to the second face image data, the accumulated times meeting the statistic updating condition reach a second threshold value;
and accumulating the first time ratio value meeting the statistic updating condition to reach a third threshold value in the comparison results of the previous times corresponding to the second face image data.
When the number of times that the statistical update condition is continuously satisfied in the historical comparison results corresponding to the second facial image data, that is, the face recognition results corresponding to the first user account reaches a first threshold value, for example, when continuous 5-time continuous comparison failures exist in the historical comparison results corresponding to the second facial image data (the first threshold value is 4), it may be considered that the second facial image data may have a problem, and therefore it may be considered that the statistical number of times of face recognition of the first user account satisfies the image reset condition, the first user account is set to a state to be updated, and when the background server detects that the first user account is in the state to be updated, the image reset entry is sent to the first terminal.
When the number of times of accumulating meeting the statistical updating condition reaches a first threshold in the history comparison results corresponding to the second facial image data, that is, the face recognition results corresponding to the first user account, for example, there are 11 accumulated comparison failure records (that is, 11 times of meeting the statistical updating condition and updating the face recognition statistical information) in the history comparison results corresponding to the second human face image data, at this time, the second threshold is 10 times, which indicates that the number of times of accumulating meeting the statistical updating condition reaches the second threshold in the history comparison results corresponding to the second facial image data, at this time, it can be considered that the second facial image data has more errors, and the face template data of the first user account can be updated, so that the first user account is set to be in a to-be-updated state, and when the background server detects that the first user account is in the to-be-updated state, the image resetting entry is sent to the first terminal.
In a possible implementation manner, the first frequency ratio is a ratio of the number of times meeting the statistical update condition to the number of times of comparison corresponding to the second facial image data, in the previous comparison result corresponding to the second facial image data. For example, when the number of comparison times corresponding to the second face image data is 100, the number of times satisfying the statistical update condition is 5, and the first-time ratio value is 5%.
In one possible implementation manner, in response to that the second facial image data corresponding to the first user account is updated, the number of times of comparison corresponding to the second facial image data and the number of times that the statistical update condition is satisfied are set to zero.
In a possible implementation manner, in response to that the face recognition statistical information meets an image resetting condition, obtaining a second frequency ratio between the times meeting the first condition and the times meeting the second condition in the history comparison results corresponding to the second face image data; sending the image resetting entry to the first terminal based on the second time ratio; the reminding strength of the first prompt message in the image resetting entrance is positively correlated with the second time ratio value; the prompt information is used for prompting the user to update the face image data.
When the statistic updating condition comprises a first condition and a second condition, the times meeting the first condition are failure statistic times, and the times meeting the second condition are danger statistic times; determining the ratio of the failure statistics times to the danger statistics times as a second ratio value, and when the second ratio value is higher, indicating that the ratio of the failure statistics times in the statistics times is higher, namely the identification failure times are more, and at this moment, using first prompt information with heavier reminding strength; when the second-time ratio is lower, it is indicated that the ratio of the failure statistics times in the statistics times is lower, that is, the number of times of the recognition failure is smaller, but the number of times of the unsafe recognition (or danger recognition) is larger, at this time, although the normal face recognition can be realized, the accuracy of the face recognition is lower, the face data corresponding to the first user account in the face template database also needs to be updated, and therefore, the first prompt information with a lighter prompting strength can be adopted.
Please refer to fig. 5, which illustrates a prompt message prompting strength diagram according to an embodiment of the present application. As shown in fig. 5, when the second ratio is smaller, the prompting strength of the first prompt information is also smaller, for example, when the second ratio is smaller than the first threshold, the first prompt information is the prompt information with smaller prompting strength, as shown in part 501 in fig. 5, the prompt information of "face recognition has failure risk and needs to update face identity information" is displayed in the display interface of the terminal, so as to prompt the user that the face image data needs to be updated; when the second time ratio is larger, the prompting strength of the first prompting message is also larger, for example, when the second time ratio is larger than the first threshold, the first prompting message is a prompting message with larger prompting strength, as shown in part 502 in fig. 5, a display interface of the terminal displays that "face recognition has a great risk," please update the face identity information |)! "the first prompt message may be a text content, a text size (or bold) and a display color (e.g., red, not shown in the figure) to achieve a higher reminding strength.
In a possible implementation manner, the first face image data is face image data acquired by the second terminal based on a face recognition interface, and in response to that the face recognition statistical information meets an image resetting condition and the face recognition interface is not closed in the second terminal, second prompt information is sent to the second terminal; the second prompt message is used for prompting the first terminal to view the image resetting entrance.
The first face image data is face image data collected by the second terminal based on a face recognition interface, when the face recognition statistical information meets an image resetting condition and the face recognition interface is not closed in the second terminal, the background server sends second prompt information to the second terminal to prompt a user that the background server sends the image resetting entry to the first terminal, and the user can check the image resetting entry in the first terminal to complete resetting of the face image data corresponding to the first user account.
In step 405, the first terminal displays an image reset portal.
In one possible implementation manner, in response to receiving an image resetting entry sent by a background server, a push message of the image resetting entry is displayed in a notification bar of the terminal, and in response to receiving a trigger operation of the push message of the image resetting entry, the image resetting entry is displayed on a display interface of the first terminal.
In one possible implementation, a face recognition interface is presented in response to receiving a face recognition operation; calling an image acquisition component in the first terminal to acquire the first face image data; sending the first face image data to the background server; and displaying the face recognition result of the background server on the first face image data in the face recognition interface.
In step 406, the first terminal acquires third face image data in response to receiving the specified operation on the image resetting entrance.
In one possible implementation manner, in response to receiving a specified operation on the image resetting entry, calling an image acquisition component in the first terminal; and acquiring the third face image data acquired by the image acquisition component.
In a possible implementation manner, in response to receiving a specified operation on the image resetting entry, calling an image acquisition component in the first terminal to acquire at least two acquired images; and determining the third facial image data in the at least two acquired images based on the acquisition scores corresponding to the at least two acquired images respectively.
When receiving an appointed operation of the image resetting entrance, the first terminal can acquire at least two acquired images through an image acquisition assembly in the first terminal, wherein the acquired images are face images acquired by the first terminal through face information of the images, and the first terminal selects the image with the highest quality from the acquired images as first image data to upload to the background server according to the quality condition corresponding to each acquired image in the at least two acquired images.
In one possible implementation manner, in response to receiving a specified operation on the image resetting entry, an image acquisition component in the first terminal is called to acquire a second video clip; at least two captured images are acquired based on respective video frames in the second video segment.
When receiving the specified operation of the image resetting entrance, the first terminal can also call an image acquisition component in the first terminal to obtain a second video clip, and then determines at least two acquired images acquired by the first terminal by acquiring the face information of the user in each video frame in the second video clip.
In one possible implementation manner, the acquisition scores corresponding to the at least two acquired images are determined based on the image parameters corresponding to the at least two acquired images respectively.
The image parameters comprise at least one of face size, face angle, image contrast, image brightness and image definition.
When an image acquisition component in the first terminal is called, and at least two acquired images are acquired, the acquisition parameters of each acquired image can be determined according to at least one of the face size, the face angle, the image contrast, the image brightness and the image definition in each image, and the face image with the optimal comprehensive evaluation in each acquired image is selected as third face image data through the acquisition parameters.
In a possible implementation manner, in response to receiving a specified operation on the image resetting entry, an image acquisition component in the first terminal is called, a video picture is acquired in real time, in response to receiving a second video frame with a quality score larger than a quality threshold, the acquisition of the video picture is stopped, and an image corresponding to the second video frame is determined as the third facial image data.
When receiving an appointed operation on the image resetting entrance, the method can also directly call an image acquisition assembly in the first terminal to acquire a video image in real time, and performs quality analysis on the acquired video image frame in real time to acquire the quality score of each video image frame.
When the identity corresponding to the first user account needs to be verified in a subsequent face recognition process, face recognition operation can be performed on the basis of the updated second face image so as to correct the problem that the face data in the face template database is inaccurate due to too long time.
In step 408, the background server updates the second facial image data in the facial template database based on the third facial image data.
In a possible implementation manner, the background server deletes the second facial image data, and determines the third facial image data as the updated second facial image data.
In a possible implementation manner, after the third facial image data is sent to the background server, the background server compares the third facial image data with the second facial image data to obtain an update similarity, and in response to the update similarity being greater than a first update threshold, the background server deletes the second facial image data and determines the third facial image data as the updated second facial image data.
When the background server sends an image reset entry to the first terminal and receives third face image data uploaded by the first terminal and used for updating face template data corresponding to a first user account, a second face image corresponding to the first user account can be compared with the third face image data uploaded by a user through the first terminal, and as the face change condition of the same user is not large generally, when the difference between the second face image data stored in the face template database and the third face image data uploaded by the user through the first terminal is large, the risk that the user account is stolen exists, and the second face image data is refused to be updated according to the third face image data.
In a possible implementation manner, after the third facial image data is sent to a background server, the background server compares the third facial image data with the second facial image data to obtain an update similarity, and in response to the update similarity being smaller than a first update threshold, acquires age information corresponding to the second facial image data through an age prediction model; and determining the third facial image data as the updated second facial image data in response to that the age information corresponding to the second facial image data is smaller than an age threshold and the update similarity is larger than a second update threshold.
Since a user with a small age may have a large facial feature change in a short time, when the update similarity is smaller than the first update threshold after the third facial image data is compared with the second facial image data, the age information (for example, 14 years) corresponding to the second facial image data is determined according to the age prediction model, and when the age information corresponding to the second facial image data is smaller than the age threshold (for example, 16 years), it indicates that the user may have a possibility of facial feature change due to growth and development at this time, but the user after growth and development still should have a certain similarity to the facial features stored before growth and development, so the update similarity may be compared with a second update threshold smaller than the first update threshold, and when the update similarity is greater than the second update threshold, it indicates that the user is most likely to be the same person, and at this time, the third facial image is determined as the updated second facial image data.
The age prediction model may be a machine learning model trained based on different face images and age labeling information corresponding to each face image.
In a possible implementation manner, the third facial image data and the second facial image data are fused to obtain updated second facial image data.
In a possible implementation manner, the third facial image data and the second facial image data are subjected to weighted fusion based on a fusion weight to obtain updated second facial image data, and the fusion weight is used for indicating the proportion of the third facial image data in the weighted fusion process.
After the third facial image data and the second facial image data are subjected to weighted fusion, the updated second facial image data simultaneously contains the characteristics of the second facial image data uploaded by the user previously and also contains the characteristics of the third facial image data, so that the updated second facial image data obtained after fusion contains the facial characteristics of the user in different time periods, and a better recognition effect is achieved.
In a possible implementation manner, a first time difference between the second facial image data and the third facial image data is obtained, and the fusion weight is obtained based on the first time difference.
For example, when the first time difference is large, it indicates that the time between the uploaded third face image and the second face image data is long, and the credibility of the second face image data stored in the face template database is low, so that the fusion weight can be set to a large value, and the proportion of the third face image data in the image fusion process is increased.
In a possible implementation manner, second prompt information is shown in the face recognition interface, and the second prompt information is shown in the face recognition interface and used for prompting that the image resetting entrance is checked in the first terminal; the second prompt message is sent by the background server when the face recognition statistical information responding to the first user account number meets the image resetting condition.
When the first face image data is sent to the background server from the first terminal, the face recognition operation step is executed in the first terminal, a face recognition interface is displayed on a terminal interface of the first terminal, and second prompt information is displayed on the face recognition interface so as to prompt the user to check an image resetting entrance in the first terminal.
Please refer to fig. 6, which illustrates a schematic diagram of a prompt message according to an embodiment of the present application. As shown in fig. 6, after the first terminal sends the first face image data to the background server, a face recognition interface is displayed on the image display component of the first terminal at this time, and as shown in 610 in fig. 6, the background server may send second prompt information to the first terminal after responding that the face recognition statistical information of the first user account satisfies an image resetting condition. The user may click on the second prompt message, so that the user directly jumps to the client interface having the image resetting entry, as shown in part 620 of fig. 6, through the jump control corresponding to the second prompt message.
In another possible implementation manner, in response to that the first face image data is sent from the second terminal to the backend server, third prompt information is displayed in a face recognition interface in the second terminal, where the third prompt information is used to prompt the first terminal to view the image resetting entry.
That is, when the first face image data is sent from the second terminal to the backend server, the third prompt information may be presented in the face recognition interface of the second terminal, so that the user may determine from the third prompt information displayed on the second terminal that the backend server has sent the image reset entry to the first terminal.
Please refer to fig. 7, which illustrates a schematic diagram of a prompt message according to an embodiment of the present application. As shown in fig. 7, when the first face image data is transmitted from the second terminal 710 to the backend server 700, the backend server may transmit the third prompt message to the second terminal, and the backend server may transmit the image reset entry to the first terminal 720. At this time, when the user performs face recognition operation through the second terminal, it may be obtained that "face recognition has a failure risk" shown in the third prompt information, the face identity information should be updated on the first terminal, "and the update of the face image information corresponding to the first user account is implemented according to the image reset entry of the third prompt information in the client interface of the second terminal.
In one possible implementation manner, in response to that an image resetting entry is sent to the first terminal, and third facial image data sent by the first terminal based on the image resetting entry is not received within a first specified time, determining the first user account as an automatic updating state; and in response to the fact that the first user account is in an automatic updating state, when fourth face image data sent by the first terminal is received and meets an image updating condition, updating the second face image data in the face template database based on the fourth face image data.
When the server sends an image resetting entrance to the first terminal, and the server does not receive third facial image data sent by the first terminal based on the image resetting entrance within a first specified time, it indicates that the first user does not trigger the image resetting entrance within the first specified time, or the image resetting entrance is triggered but third facial image data is not successfully uploaded, and at this time, the server may determine the first user account to be in an automatic updating state, so as to update the facial data corresponding to the first user account according to the subsequently uploaded first user account, and avoid that the second facial image data corresponding to the first user account cannot be updated in time due to the fact that the user does not perform triggering operation on the image resetting entrance.
If the first user account is in an automatic updating state, the server receives fourth face image data sent by the first terminal, and when the fourth face image data meets an image updating condition, it indicates that the fourth face image data can be used for updating the second face image data, and at this time, the second face image data is updated directly according to the fourth face image data, so that automatic updating of a face template image (namely, second face image data) corresponding to the first user account is achieved.
In one possible implementation manner, the image update condition is that the similarity with the second face image data is greater than a third update threshold.
That is, when the similarity between the fourth face image data uploaded by the first terminal and the second face image data is greater than the third update threshold, the confidence of the fourth face image data is high, the difference between the fourth face image data and the second face image data is small, the security risk of updating the fourth face image data into new second face image data is small, and the second face image data can be updated according to the fourth face image data at the moment.
In a possible implementation manner, in response to that an image resetting entry is sent to the first terminal, and third facial image data sent by the first terminal based on the image resetting entry is not received within the first specified time, historical facial image data uploaded by the first terminal within the first specified time is acquired; and updating the second facial image data in the facial template database based on the historical facial image data uploaded by the first terminal within the first designated time.
When an image resetting entrance is sent to the first terminal and third facial image data sent by the first terminal based on the image resetting entrance is not received within the first specified time, the server can acquire historical facial image data uploaded by the first terminal from an interface except the image resetting entrance after the server sends the image resetting entrance to the first terminal, and the second facial image data is updated in a facial template database according to the historical facial image data.
In a possible implementation manner, the second facial image data is updated based on historical facial image data with the highest quality score in the historical facial image data uploaded by the first terminal in the first designated time.
In a possible implementation manner, the second facial image data is updated based on the historical facial image data with the highest similarity to the second facial image data in the historical facial image data uploaded by the first terminal within the first specified time.
When the server acquires the historical face image data uploaded by the first terminal within the first designated time, the server can respectively acquire the similarity between the historical face image data and the second face image data, and update the second face image data according to the historical face image data with the highest similarity.
In a possible implementation manner, in response to the fact that, in the historical face image data uploaded by the first terminal within the first specified time, there is historical face image data with a similarity higher than a third update threshold with respect to the second face image data, the second face image data is updated based on the historical face image data with the highest similarity with respect to the second face image data in the historical face image data.
When the server acquires that the similarity between the historical face image data uploaded by the first terminal within the first designated time and the second face image data is higher than a third updating threshold, it is indicated that the historical face image data uploaded by the first terminal within the first designated time is not suitable for updating the face data corresponding to the first user account; when historical facial image data with the similarity degree higher than a third updating threshold value with the second facial image data exists in the historical facial image data uploaded by the first terminal within a first designated time, which are acquired by the server, the historical facial image data suitable for updating the facial data corresponding to the first user account exists in the historical facial image data uploaded by the first terminal within the first designated time; and at the moment, in the historical facial image data uploaded by the first terminal in the first designated time, updating the second facial image data by using the historical facial image data of which the similarity with the second facial image data is higher than a third updating threshold value.
In a possible implementation manner, when an image resetting entry is sent to the first terminal and third facial image data sent by the first terminal through the image resetting entry is not received, in response to receiving fifth facial image data corresponding to the first user account, the image resetting entry is retransmitted to the first terminal, and the fifth facial image data is used for triggering a facial recognition service corresponding to the first user account.
When the server receives fifth face image data uploaded by the first terminal or the IOT device and recognizes that the fifth face image data is used for triggering the face recognition service corresponding to the first user account, it means that after the first terminal sends an image resetting entry, the user does not trigger the update process of the second face image data through the image resetting entry sent by the first terminal, but continues to realize the face recognition service corresponding to the first user account through the first terminal or the IOT device.
In one possible implementation, the first user account is determined to be in an automatically updated state in response to sending the image reset entry to the first terminal a first specified number of times.
When the server sends the image resetting entry to the first terminal for the first specified number of times, and at this time, when the first terminal receives the image resetting entry for the first specified number of times, the user still does not trigger the update process of the second facial image data through the image resetting entry, and at this time, in order to ensure the security and accuracy of the face recognition service of the first user account, the first user account may be determined to be in an automatic update state, so as to implement automatic update of the second facial image data corresponding to the first user account.
In another possible implementation manner, in response to sending the image resetting entry to the first terminal for a first specified number of times, the second face image data is updated in the face template database based on a first specified number of historical face image data recently received by the server.
When the server sends the image resetting entry to the first terminal for a first designated number of times, the server can update the second facial image data in the facial template database according to the recently received historical facial image data with the first designated number, so as to realize the automatic update of the second facial image data corresponding to the first user account.
In one possible implementation, in response to sending the image reset entry to the first terminal a first specified number of times, the second facial image data is updated based on historical facial image data recently received by the server.
In another possible implementation manner, in response to sending the image resetting entry to the first terminal for a first specified number of times, the second facial image data is updated based on the historical facial image data which is received by the server most recently and has similarity with the second facial image data greater than a third updating threshold.
In another possible implementation manner, in response to sending the image resetting entry to the first terminal for a first specified number of times, the second facial image data is updated based on the historical facial image data with the highest similarity to the second facial image data in the first specified number of historical facial image data received by the server most recently.
Please refer to fig. 8, which illustrates an overall architecture diagram of a face image data updating system according to an embodiment of the present application. As shown in fig. 8, the overall architecture of the facial image data updating system includes a user mobile phone terminal 820, an IoT facial terminal device 810, and a backend server 800.
In order to enhance the security of user face recognition, in a possible implementation manner in the embodiment of the present application, the IoT face terminal device 810 includes a 3D camera, and data output by the 3D camera is, in addition to the RGB map, related information such as a depth map.
The IoT face terminal device 810 comprises a face APP, and the core of the APP comprises a face recognition module and a user face-brushing payment state display module. The face recognition module mainly comprises a face acquisition part and a face optimization part. The face collection is used for calling a 3D camera to collect and obtain RGB image flow, depth image flow and infrared image flow. The face optimization part is used for comprehensively evaluating and selecting an optimal face picture according to coefficient indexes such as face size, face angle, image contrast, image brightness and definition and the like.
After the collection is successful, the IoT face terminal sends data to the rear end for identification through the network module, the APP front end interface enters a LOADING state, and the final result of the rear end inquiry payment is waited.
The IoT face terminal device 810 further includes a user face-brushing payment status display module, which is mainly used for displaying status information of the current user after face-brushing payment, such as successful payment and payment failure. When a certain strategy of the back end is met, the user is informed to push a reset entrance to the APP end of the mobile phone of the user in the subsequent process, and the user can reset the base map at the APP end (namely, upload the face image data).
In the IoT face backend server 800, its core modules include a face payment service, a basic account service, a timing service, a push service, a policy control service, and a face base map update service.
The face recognition service is used for receiving face data uploaded by the terminal, extracting features of the current image, comparing the features with features in the database, finding out feature data with the highest score, and comparing related face data with a face in a back-end database. And finally returning the related information of the account number or the payment code of the user in the payment system. When the user identification is abnormal, for example, the face comparison lasts for a time without passing, the back-end policy service is inquired, if the face comparison exceeds a threshold value preset by the policy service, the basic account service is called, and the face base map of the user marked in the basic account of the user needs to be updated.
The basic account system refers to that the user account can pull the relevant basic information of the user, including the face payment state information of the current user.
The timing service means that the back end periodically retrieves the basic information of the user, inquires the user information which is marked on the human face base map of the user and needs to be updated, retrieves the user and then calls the pushing service, and pushes the reset base map inlet to the mobile phone end of the user.
The push service means that the back end can realize the push function of the base map reset inlet through the APP and the long connecting channel of the back end.
The policy control service refers to adjusting, by the back end, threshold information of the control face comparison failure, such as 3 consecutive times or 5 intermittent failures, according to the actual situation (for example, when the number of times of updating the base map by the user is large within a specified time, the threshold of the control face comparison failure is adjusted).
The face bottom map updating service is used for receiving a bottom map updating request from a mobile phone end of a user and updating the face bottom map corresponding to the account.
The user mobile phone terminal 820 is provided with a first APP, and after the user logs in the first APP, the user mobile phone terminal is provided with account information of the user. The APP is internally provided with a face brushing payment reset message notification prompt and a face base map reset module.
The user mobile phone terminal 820 further has a face-brushing payment resetting message module, which is used for receiving a back-end pushed abnormal resetting entry of the user's face base map and can use a payment account to notify.
The user mobile phone terminal 820 is also provided with a face base map resetting module, after actively clicking, the user calls a mobile phone camera to perform face acquisition and optimization, then sends the optimized pictures to a back-end face base map updating service, and the face base map updating service updates the base map into a face library.
By the framework, the human face service back end can periodically retrieve the user information of which the human face pictures are unmatched based on a dynamic control strategy, and the human face base map resetting entry is pushed to the mobile phone end of the user, so that the problem related to the base map being too old is actively solved by the user, and the user experience is improved. Under the face payment scene, combine face payment business and account system of brushing, the unusual user information of back-end periodic scanning discernment to can reset entry propelling movement to the user end with the base map through the cell-phone end, the user can carry out the reacquisition and upload the base map at the cell-phone end and supply follow-up line to use face payment comparison under the line to use, can effectively solve the too old subscriber line of base map problem that can't use face payment.
To sum up, according to the scheme shown in the embodiment of the application, in the face recognition process, the background server maintains statistical information based on the face recognition record of the first user account, and when the background server detects that the face recognition record of the first user account meets the image resetting condition based on the statistical information, an image resetting entry can be sent to the terminal corresponding to the first user account, so that the terminal can upload new face image data and update the face data in the face template database, thereby avoiding the occurrence of face recognition errors caused by old base images in the face recognition process as much as possible, and improving the accuracy of face recognition.
Fig. 9 is a schematic diagram illustrating a method for updating face image data according to an exemplary embodiment. In this embodiment of the present application, the method for updating facial image data is executed by a first terminal, a second terminal, and a background server, and the method for updating facial image data may include the following steps:
s901, the second terminal sends the first face image data to the backend server. The method comprises the steps that a first user triggers a face recognition function on a second terminal, the second terminal calls an image acquisition assembly, first face image data corresponding to the first user are obtained, and the first face image data are uploaded to a rear-end server. And S902, the back-end server performs face recognition. And after receiving the first face image data uploaded by the second terminal, the back-end server determines second face image data most similar to the first face image data in a face template database in the back-end server, and determines a first user account corresponding to the second face image data. And comparing the first face image data with the second face image data, and updating the face identification statistical information corresponding to the first user account when the comparison result between the first face image data and the second face image data meets the statistical updating condition. And S903, the back-end server sends the image resetting entrance to the first terminal. And when the face recognition statistical information of the back-end server meets the image resetting condition, sending an image resetting entrance to the first terminal. And S904, the first terminal sends the third face image data to the back-end server. When the first terminal receives the image resetting entrance sent by the background server and receives that the first user triggers the image resetting entrance, the first terminal calls the image acquisition assembly to acquire third face image data corresponding to the first user and uploads the third face image data to the background server. And S905, the back-end server updates the second face image data. And the back-end server updates the second face image data according to the third face image data uploaded by the first terminal.
Fig. 10 is a block diagram showing the configuration of a face image data update apparatus according to an exemplary embodiment. The target area determining apparatus may implement all or part of the steps in the method provided by the embodiment shown in fig. 2 or fig. 4, and the facial image data updating apparatus includes:
a first image receiving module 1001, configured to receive first face image data;
a first comparison result obtaining module 1002, configured to obtain a first comparison result between the first face image data and the second face image data; the second face image data is the face image data with the highest similarity to the first face image data in the face template database;
a first information updating module 1003, configured to update the face recognition statistical information of the first user account in response to that the first comparison result meets a statistical updating condition; the first user account is a user account corresponding to the second face image data;
a first entry sending module 1004, configured to send an image resetting entry to the first terminal in response to that the face recognition statistical information satisfies an image resetting condition; the first terminal is a terminal for logging in the first user account;
a second image receiving module 1005, configured to receive third face image data sent by the first terminal based on the image resetting entry;
an image data updating module 1006, configured to update the second facial image data in the facial template database based on the third facial image data.
In a possible implementation manner, the first information updating module 1003 is further configured to,
and updating the counting times corresponding to the first user account in response to the first comparison result meeting the counting updating condition, wherein the counting times are used for indicating the times that the comparison result of the second face image data corresponding to the historical times meets the counting updating condition.
In a possible implementation manner, the first entry sending module 1004 includes:
the account state setting unit is used for setting the first user account to be in a state to be updated in response to the fact that the face recognition statistical information meets a data resetting condition;
and the first entrance sending unit is used for responding to the fact that the first user account is detected to be in a state to be updated at the appointed moment, and sending the image resetting entrance to the first terminal.
In one possible implementation, the image resetting condition includes at least one of:
in the previous comparison result corresponding to the second face image data, the number of times of continuously meeting the statistic updating condition reaches a first threshold value;
in the previous comparison result corresponding to the second face image data, the accumulated times meeting the statistic updating condition reach a second threshold value;
and in the calendar comparison results corresponding to the second face image data, the accumulated first time ratio value meeting the statistical updating condition reaches a third threshold value.
In one possible implementation, the statistical update condition includes at least one of a first condition and a second condition;
the first condition includes: the first comparison result indicates that the first facial image data does not match the second facial image data;
the second condition includes: the first comparison result indicates that the first facial image data matches the second facial image data, and a similarity between the first facial image data and the second facial image data is less than a first similarity threshold.
In a possible implementation manner, the first entry sending module 1004 further includes:
a number ratio obtaining unit, configured to obtain, in response to that the face identification statistical information satisfies an image resetting condition, a second number ratio between the number of times that satisfies the first condition and the number of times that satisfies the second condition in the history comparison results corresponding to the second face image data;
a second entry sending unit, configured to send the image resetting entry to the first terminal based on the second frequency ratio; the reminding strength of the first prompt message in the image resetting entrance is positively correlated with the second time ratio value; the prompt information is used for prompting the user to update the face image data.
In a possible implementation manner, the first facial image data is facial image data acquired by the second terminal based on a face recognition interface, and the apparatus further includes:
responding to the fact that the face recognition statistical information meets an image resetting condition and the face recognition interface is not closed in the second terminal, and sending second prompt information to the second terminal; the second prompt message is used for prompting the first terminal to view the image resetting entrance.
To sum up, according to the scheme shown in the embodiment of the application, in the face recognition process, the background server maintains statistical information based on the face recognition record of the first user account, and when the background server detects that the face recognition record of the first user account meets the image resetting condition based on the statistical information, an image resetting entry can be sent to the terminal corresponding to the first user account, so that the terminal can upload new face image data and update the face data in the face template database, thereby avoiding the occurrence of face recognition errors caused by old base images in the face recognition process as much as possible, and improving the accuracy of face recognition.
Fig. 11 is a block diagram showing the configuration of a face image data updating apparatus according to an exemplary embodiment. The facial image data updating apparatus may implement all or part of the steps in the method provided by the embodiment shown in fig. 3 or fig. 4, and the facial image data updating apparatus includes:
a reset portal presentation module 1101 for presenting an image reset portal; the image resetting entrance is sent by the background server when the face recognition statistical information responding to the first user account meets the image resetting condition; the face identification statistical information is updated by the background server when first face image data is received and a first comparison result between the first face image data and second face image data meets a statistical updating condition; the second face image data is face image data corresponding to the first user account in a face template database, and the second face image data is face image data with the highest similarity to the first face image data in the face template database;
a face image acquisition module 1102, configured to acquire third face image data in response to receiving a specified operation on the image resetting entry;
a face image sending module 1103, configured to send the third face image data to the backend server, so that the backend server updates the second face image data in the face template database based on the third face image data.
In a possible implementation manner, the face image obtaining module includes:
the image component calling unit is used for calling an image acquisition component in the first terminal in response to receiving the specified operation of the image resetting entrance;
and the face image acquisition unit is used for acquiring the third face image data acquired by the image acquisition assembly.
In one possible implementation, the apparatus further includes:
the recognition interface display module is used for responding to the received face recognition operation and displaying a face recognition interface;
the first face image data acquisition module is used for calling an image acquisition component in the first terminal to acquire the first face image data;
the first face image data sending module is used for sending the first face image data to the background server;
and the face recognition result display module is used for displaying the face recognition result of the background server on the first face image data in the face recognition interface.
In one possible implementation, the apparatus further includes:
the prompt information display module is used for displaying second prompt information in the face recognition interface, and the second prompt information is used for prompting that the image resetting entrance is viewed in the first terminal; the second prompt message is sent by the background server when the face recognition statistical information responding to the first user account meets the image resetting condition.
To sum up, according to the scheme shown in the embodiment of the application, in the face recognition process, the background server maintains statistical information based on the face recognition record of the first user account, and when the background server detects that the face recognition record of the first user account meets the image resetting condition based on the statistical information, an image resetting entry can be sent to the terminal corresponding to the first user account, so that the terminal can upload new face image data and update the face data in the face template database, thereby avoiding the occurrence of face recognition errors caused by old base images in the face recognition process as much as possible, and improving the accuracy of face recognition.
FIG. 12 is a block diagram illustrating a computer device according to an example embodiment. The computer device may be implemented as the model training device and/or the signal processing device in the various method embodiments described above. The computer apparatus 1200 includes a Central Processing Unit (CPU) 1201, a system Memory 1204 including a Random Access Memory (RAM) 1202 and a Read-Only Memory (ROM) 1203, and a system bus 1205 connecting the system Memory 1204 and the Central Processing Unit 1201. The computer device 1200 also includes a basic input/output system 1206, which facilitates transfer of information between various components within the computer, and a mass storage device 1207, which stores an operating system 1213, application programs 1214, and other program modules 1215.
The mass storage device 1207 is connected to the central processing unit 1201 through a mass storage controller (not shown) connected to the system bus 1205. The mass storage device 1207 and its associated computer-readable media provide non-volatile storage for the computer device 1200. That is, the mass storage device 1207 may include a computer-readable medium (not shown) such as a hard disk or Compact disk Read-Only Memory (CD-ROM) drive.
Without loss of generality, the computer readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, flash memory or other solid state storage technology, CD-ROM, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 1204 and mass storage device 1207 described above may be collectively referred to as memory.
The computer device 1200 may be connected to the internet or other network devices through a network interface unit 1211 connected to the system bus 1205.
The memory further includes one or more programs, the one or more programs are stored in the memory, and the central processing unit 1201 implements all or part of the steps of the method shown in fig. 2, fig. 3, or fig. 4 by executing the one or more programs.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as a memory comprising a computer program (instructions), executable by a processor of a computer device to perform the methods shown in the various embodiments of the present application is also provided. For example, the non-transitory computer readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product or computer program is also provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the methods shown in the various embodiments described above.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements that have been 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 application is limited only by the appended claims.
Claims (15)
1. A method for updating face image data, the method being performed by the backend server, the backend server containing a face template database for face recognition, the method comprising:
receiving first face image data;
acquiring a first comparison result between the first face image data and the second face image data; the second face image data is the face image data with the highest similarity to the first face image data in the face template database;
updating the face recognition statistical information of the first user account in response to the first comparison result meeting a statistical updating condition; the first user account is a user account corresponding to the second facial image data;
responding to the face recognition statistical information meeting an image resetting condition, and sending an image resetting entrance to a first terminal; the first terminal is a terminal for logging in the first user account;
receiving third face image data sent by the first terminal based on the image resetting entrance;
and updating the second face image data in the face template database based on the third face image data.
2. The method of claim 1, wherein the updating the face recognition statistical information of the first user account in response to the first comparison result satisfying a statistical update condition comprises:
and updating the counting times corresponding to the first user account in response to the first comparison result meeting the counting updating condition, wherein the counting times are used for indicating the times that the comparison result of the second face image data corresponding to the historical times meets the counting updating condition.
3. The method of claim 1, wherein sending an image reset entry to the first terminal in response to the face recognition statistics satisfying an image reset condition comprises:
setting the first user account to be in an updated state in response to the face recognition statistical information meeting a data resetting condition;
and sending the image resetting entry to the first terminal in response to the fact that the first user account is detected to be in a state to be updated at the specified moment.
4. A method according to any one of claims 1 to 3, wherein the image reset condition comprises at least one of:
in the previous comparison result corresponding to the second face image data, the number of times of continuously meeting the statistic updating condition reaches a first threshold value;
in the previous comparison result corresponding to the second face image data, the accumulated times meeting the statistic updating condition reach a second threshold value;
and in the historical comparison results corresponding to the second face image data, accumulating the first-time ratio value meeting the statistic updating condition to reach a third threshold value.
5. The method of claim 4, wherein the statistical update condition comprises at least one of a first condition and a second condition;
the first condition includes: the first comparison result indicates that the first facial image data does not match the second facial image data;
the second condition includes: the first comparison result indicates that the first facial image data matches the second facial image data, and a similarity between the first facial image data and the second facial image data is less than a first similarity threshold.
6. The method of claim 5, wherein sending an image reset entry to the first terminal in response to the face recognition statistics satisfying an image reset condition comprises:
responding to the face identification statistical information meeting an image resetting condition, and acquiring a second frequency ratio between the times meeting the first condition and the times meeting the second condition in the comparison results corresponding to the second face image data;
sending the image resetting entrance to the first terminal based on the second time ratio; the reminding strength of the first prompt message in the image resetting entrance is positively correlated with the second time ratio value; the prompt information is used for prompting the user to update the face image data.
7. The method according to claim 1, wherein the first face image data is face image data acquired by a second terminal based on a face recognition interface, and the method further comprises:
responding to the fact that the face recognition statistical information meets an image resetting condition and the face recognition interface is not closed in the second terminal, and sending second prompt information to the second terminal; the second prompt message is used for prompting the first terminal to view the image resetting entrance.
8. A method for updating face image data, the method being executed by a first terminal, the first terminal being a terminal logged with a first user account, the method comprising:
displaying an image resetting entrance; the image resetting entrance is sent by the background server when the face recognition statistical information responding to the first user account meets the image resetting condition; the background server updates the face identification statistical information when receiving first face image data and a first comparison result between the first face image data and second face image data meets a statistical updating condition; the second face image data is face image data corresponding to the first user account in a face template database, and the second face image data is face image data with the highest similarity to the first face image data in the face template database;
acquiring third face image data in response to receiving a specified operation on the image resetting entrance;
and sending the third face image data to the background server so that the background server can update the second face image data in the face template database based on the third face image data.
9. The method of claim 8, wherein the obtaining third face image data in response to receiving the specified operation on the image re-location entry comprises:
in response to receiving a specified operation on the image resetting entry, calling an image acquisition component in the first terminal;
and acquiring the third face image data acquired by the image acquisition component.
10. The method of claim 8, wherein prior to said presenting an image re-entry, said method further comprises:
displaying a face recognition interface in response to receiving the face recognition operation;
calling an image acquisition component in the first terminal to acquire the first face image data;
sending the first face image data to the background server;
and displaying the face recognition result of the background server on the first face image data in the face recognition interface.
11. The method of claim 10, further comprising:
displaying second prompt information in the face recognition interface, wherein the second prompt information is used for prompting that the image resetting entrance is checked in the first terminal; the second prompt message is sent by the background server when the face recognition statistical information responding to the first user account meets the image resetting condition.
12. A facial image data updating device is used for a background server, the background server comprises a facial template database used for facial recognition, and the device comprises:
the first image receiving module is used for receiving first face image data;
the first comparison result acquisition module is used for acquiring a first comparison result between the first face image data and the second face image data; the second face image data is the face image data with the highest similarity to the first face image data in the face template database;
the first information updating module is used for responding to the condition that the first comparison result meets the statistical updating condition and updating the face recognition statistical information of the first user account; the first user account is a user account corresponding to the second facial image data;
the first entrance sending module is used for responding to the situation that the face recognition statistical information meets the image resetting condition and sending an image resetting entrance to the first terminal; the first terminal is a terminal for logging in the first user account;
the second image receiving module is used for receiving third face image data sent by the first terminal based on the image resetting entrance;
and the image data updating module is used for updating the second face image data in the face template database based on the third face image data.
13. A facial image data updating device is used for a first terminal, wherein the first terminal is a terminal logged with a first user account, and the device comprises:
the reset entrance display module is used for displaying the image reset entrance; the image resetting entrance is sent by the background server when the face recognition statistical information responding to the first user account meets the image resetting condition; the background server updates the face identification statistical information when receiving first face image data and a first comparison result between the first face image data and second face image data meets a statistical updating condition; the second face image data is face image data corresponding to the first user account in a face template database, and the second face image data is face image data with the highest similarity to the first face image data in the face template database;
the face image acquisition module is used for responding to the received appointed operation of the image resetting entrance and acquiring third face image data;
and the face image sending module is used for sending the third face image data to the background server so that the background server can update the second face image data in the face template database based on the third face image data.
14. A computer device comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by the processor to implement the method of updating facial image data as claimed in any one of claims 1 to 11.
15. A computer-readable storage medium, having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method of updating facial image data according to any one of claims 1 to 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110395040.0A CN115205918A (en) | 2021-04-13 | 2021-04-13 | Face image data updating method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110395040.0A CN115205918A (en) | 2021-04-13 | 2021-04-13 | Face image data updating method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115205918A true CN115205918A (en) | 2022-10-18 |
Family
ID=83570552
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110395040.0A Pending CN115205918A (en) | 2021-04-13 | 2021-04-13 | Face image data updating method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115205918A (en) |
-
2021
- 2021-04-13 CN CN202110395040.0A patent/CN115205918A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111242097B (en) | Face recognition method and device, computer readable medium and electronic equipment | |
CN109993150B (en) | Method and device for identifying age | |
KR20200145827A (en) | Facial feature extraction model learning method, facial feature extraction method, apparatus, device, and storage medium | |
CN112580599B (en) | Video identification method, device and computer readable storage medium | |
CN110414376B (en) | Method for updating face recognition model, face recognition camera and server | |
CN111479129B (en) | Live cover determination method, device, server, medium and system | |
KR102187741B1 (en) | Metadata crowd sourcing system and method | |
US20220237917A1 (en) | Video comparison method and apparatus, computer device, and storage medium | |
CN110889314B (en) | Image processing method, device, electronic equipment, server and system | |
CN109902681B (en) | User group relation determining method, device, equipment and storage medium | |
CN112241689A (en) | Face recognition method and device, electronic equipment and computer readable storage medium | |
CN113642519A (en) | Face recognition system and face recognition method | |
CN112712051A (en) | Object tracking method and device, computer equipment and storage medium | |
JP2023543640A (en) | Liquor label identification method, liquor product information management method, and its apparatus, device, and storage medium | |
CN117749836A (en) | Internet of things terminal monitoring method and system based on artificial intelligence | |
CN113011254A (en) | Video data processing method, computer equipment and readable storage medium | |
KR20210145512A (en) | Attendance check and concentration analysis system using online education-based facial recognition, and method thereof | |
US20230116291A1 (en) | Image data processing method and apparatus, device, storage medium, and product | |
CN115205918A (en) | Face image data updating method, device, equipment and storage medium | |
CN110163043B (en) | Face detection method, device, storage medium and electronic device | |
CN113297417B (en) | Video pushing method, device, electronic equipment and storage medium | |
CN114745592A (en) | Bullet screen message display method, system, device and medium based on face recognition | |
CN115966030A (en) | Image processing method and device and intelligent terminal | |
CN113762156B (en) | Video data processing method, device and storage medium | |
CN114429669B (en) | Identity recognition method, identity recognition device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40075338 Country of ref document: HK |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |