WO2023173664A1 - 人脸识别方法、装置、电子设备、存储介质、计算机程序及程序产品 - Google Patents

人脸识别方法、装置、电子设备、存储介质、计算机程序及程序产品 Download PDF

Info

Publication number
WO2023173664A1
WO2023173664A1 PCT/CN2022/111132 CN2022111132W WO2023173664A1 WO 2023173664 A1 WO2023173664 A1 WO 2023173664A1 CN 2022111132 W CN2022111132 W CN 2022111132W WO 2023173664 A1 WO2023173664 A1 WO 2023173664A1
Authority
WO
WIPO (PCT)
Prior art keywords
face information
face
target
sub
base
Prior art date
Application number
PCT/CN2022/111132
Other languages
English (en)
French (fr)
Inventor
程前
Original Assignee
上海商汤智能科技有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Publication of WO2023173664A1 publication Critical patent/WO2023173664A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content

Definitions

  • the present disclosure relates to the technical field of face recognition, and in particular, to a face recognition method, device, electronic device, storage medium, computer program and program product.
  • Face recognition is a biometric technology that performs identity recognition based on a person's facial feature information. Face recognition requires relatively complex verification and accurate identification of the object to be identified through face comparison in a large object library. information.
  • face information is generally collected at the front end, and then the collected face information is sent to the backend server.
  • the backend server performs face search and comparison in a tens of millions of object libraries. ;
  • the front-end needs to perform face recognition, it needs to send corresponding face recognition requests to the back-end server, which leads to the occupation of too many network transmission resources; and, the back-end server receives multiple face recognition messages sent by the front-end at the same time In the case of a request, it will cause a delay in response to the face recognition request and reduce the efficiency of face recognition.
  • Embodiments of the present disclosure provide a face recognition method, device, electronic equipment, storage medium computer program and program product, which can reduce the occupation of network resources during the face recognition process and improve the efficiency of face recognition.
  • the technical solutions of the embodiments of the present disclosure are as follows:
  • Embodiments of the present disclosure provide a face recognition method, including:
  • the face information to be recognized is compared with the face information in the locally stored target face information sub-database to obtain the face recognition result of the object to be recognized;
  • the target face information sub-database is The face information sub-library associated with the face recognition time node; the number of face information items contained in the target face information sub-library is smaller than the number of face information items contained in the full face information database.
  • different face recognition time nodes correspond to different face information sub-library, that is, face recognition is performed in the face information sub-library corresponding to the face recognition time node, so that on the one hand, it can be realized Compare face information locally in a small library, reduce the amount of face information required for comparison, narrow the range of face information comparison, thereby improving the efficiency of face recognition; on the other hand, it can reduce the burden on the face recognition front-end to the person.
  • the number of face recognition requests on the face recognition backend saves network resources.
  • the method before comparing the face information to be recognized with the face information in the locally stored target face information sub-base, the method further includes:
  • the locally stored historical face information sub-base is updated to obtain the target face information sub-base.
  • the target face information sub-database corresponding to the face recognition time node is the recently updated face information sub-database, so that the target face information sub-database can be continuously updated with time changes, consistent with actual face recognition. Adapt to the scene, thereby improving the efficiency of face recognition.
  • the face recognition history information is the number of successful recognitions corresponding to each piece of face information in the historical face information sub-database
  • the method of updating the locally stored historical face information sub-base based on the face recognition history information before the face recognition time node to obtain the target face information sub-base includes:
  • the face information to be deleted is determined; in the historical face information sub-database, the identification number corresponding to the face information to be deleted is The number of successes is less than the preset number;
  • the face information to be deleted is deleted from the historical face information sub-base to obtain the target face information sub-base.
  • the number of successful recognitions is less than the preset number, it can be understood that the number of times the actual object corresponding to the face information appears is less than the preset number, that is, face recognition of the actual object is not frequent, and it can be Delete it from the historical face information sub-database to reduce the information storage pressure on the face recognition front-end and improve the data processing efficiency of the face recognition front-end.
  • the face information to be added is added to the historical face information sub-base to obtain the target face information sub-base.
  • the preset face information corresponding to the object to be recognized that has been successfully compared but has not yet been added to the historical face information sub-base can be added to the historical face information sub-base; in order to facilitate the When the subject to be recognized is subjected to face recognition again later, there is no need to obtain preset face information from the face recognition backend. Face information can be compared directly based on the locally stored face information font library, thereby improving face recognition. efficiency.
  • the locally stored historical face information sub-base is updated based on the face recognition historical information before the face recognition time node to obtain the target face information sub-base, include:
  • the historical face information sub-base is updated based on the update interval to obtain the target face information sub-base.
  • the corresponding update interval can be determined based on the number of items for storing face information, so that the update interval for the target face information sub-base matches the number of items for which face information is not stored, that is, the target face
  • the update frequency of the information sub-base matches the face recognition situation in the actual scene, improves the adaptability of the target face information sub-base to the actual face recognition situation and the flexibility of the update of the face information sub-base, thereby improving the performance of the face information sub-base.
  • the efficiency of face recognition is the efficiency of face recognition.
  • each fixed time node has a corresponding preset face information sub-library, which realizes face recognition at different time points; based on the current face recognition time node, the current face recognition time node can be determined
  • the corresponding preset face information sub-base performs face recognition based on the preset face information sub-base, thereby improving face recognition efficiency.
  • the preset face information sub-base corresponding to the target time node is determined as the target face information sub-base.
  • the corresponding target face information sub-base is determined based on the preset time node closest to the face recognition time node, so that the determined target face information sub-base matches the actual face recognition time node.
  • the corresponding target face information sub-database can be determined based on time information, and the efficiency and convenience of determining the face information sub-database can be improved.
  • the method further includes:
  • the face recognition result indicates that there is no target face information matching the face information to be recognized in the target face information sub-base
  • from the plurality of preset face information sub-bases Determine the associated face information sub-base of the target face information sub-base; the difference between the preset time node corresponding to the target face information sub-base and the preset time node of the associated face information sub-base Less than or equal to the second preset threshold;
  • the face information to be recognized is compared with the face information in the associated face information sub-database to obtain a face recognition result for the object to be recognized.
  • the method further includes:
  • Resource transfer processing is performed based on the target account.
  • the face recognition method is applied to the resource transfer scenario.
  • the face recognition method provided by this embodiment can improve the face recognition efficiency, applying it to the resource transfer scenario can improve the efficiency of resource transfer. efficiency, and reduce the consumption of network resources caused by sending face recognition requests to the face recognition backend during the resource transfer process; on the other hand, resource transfer can only be carried out through face recognition, thus improving resources Transfer security.
  • the method further includes:
  • the face recognition request includes the face information to be recognized and additional information corresponding to the object to be recognized; the additional information is used to instruct the face recognition backend to perform information processing in the full face information library. Screen to obtain candidate face information;
  • face information comparison can be requested from the face recognition back-end, in which additional information can be used to compare the face information.
  • the full database of face information is used for information screening to further narrow the range of face comparisons and improve the efficiency of face recognition.
  • embodiments of the present disclosure also provide a face recognition device, including:
  • the face information acquisition part to be recognized is configured to acquire the face information to be recognized of the object to be recognized at the face recognition time node;
  • the face recognition part is configured to compare the face information to be recognized with the face information in the locally stored target face information sub-database to obtain the face recognition result of the object to be recognized;
  • the target face information sub-base is the face information sub-base associated with the face recognition time node; the number of face information items contained in the target face information sub-base is smaller than the number of faces included in the full face information base. The number of items of face information.
  • the device further includes:
  • the first update part is configured to update the locally stored historical face information sub-database based on the face recognition history information before the face recognition time node to obtain the target face information sub-base.
  • the face recognition history information is the number of successful recognitions corresponding to each piece of face information in the historical face information sub-database; the first update part includes:
  • the face information to be deleted determining part is configured to determine the face information to be deleted based on the number of successful recognitions corresponding to each piece of face information in the historical face information sub-base; in the historical face information sub-base , the number of successful recognitions corresponding to the face information to be deleted is less than the preset number;
  • the deletion part is configured to delete the face information to be deleted from the historical face information sub-base to obtain the target face information sub-base.
  • the first update part includes:
  • the added face information determination part is configured to determine the face information to be added; the face information to be added is successfully recognized before the face recognition time node and is not included in the historical face information sub-base. face information;
  • the adding part is configured to add the face information to be added to the historical face information sub-base to obtain the target face information sub-base.
  • the first update part includes:
  • the unstored face information acquisition part is configured to acquire the unstored face information within the target time period before the face recognition time node; the unstored face information means that the recognition is successful within the target time period, And the face information is not included in the historical face information sub-database;
  • the update interval determination part is configured to determine the update interval for the historical face information sub-database based on the number of items of unstored face information
  • the second update part is configured to update the historical face information sub-base based on the update interval to obtain the target face information sub-base.
  • the device further includes:
  • the face recognition part includes:
  • the first determining part is configured to determine the target face information sub-base corresponding to the face recognition time node from the plurality of preset face information sub-bases;
  • the target time node determination part is configured to determine the target time node from each of the preset time nodes; the difference between the target time node and the face recognition time node is less than or equal to the first preset threshold;
  • the device further includes:
  • the associated face information sub-base determination part is configured to: when the face recognition result indicates that there is no target face information matching the to-be-recognized face information in the target face information sub-base, Determine the associated face information sub-base of the target face information sub-base from the plurality of preset face information sub-bases; the preset time node corresponding to the target face information sub-base is the same as the associated person The difference between the preset time nodes of the face information sub-base is less than or equal to the second preset threshold;
  • the second comparison part is configured to compare the face information to be recognized with the face information in the associated face information sub-database to obtain a face recognition result for the object to be recognized.
  • the device further includes:
  • the target account determination part is configured to determine the target account corresponding to the face information to be recognized in the case where the face recognition result representation matches the target face information corresponding to the face information to be recognized in the target face information sub-library.
  • the target account associated with the target face information
  • the resource transfer part is configured to perform resource transfer processing based on the target account.
  • the device further includes:
  • the candidate face information determination part is configured to determine the face recognition result when the face recognition result indicates that there is no target face information matching the face information to be recognized in the target face information sub-library.
  • the backend sends a face recognition request; the face recognition request includes the face information to be recognized and additional information corresponding to the object to be recognized; the additional information is used to instruct the face recognition backend to Screen information from the full face information database to obtain candidate face information;
  • the information receiving part is configured to receive the face information comparison result of the face information to be recognized and the candidate face information by the face recognition backend.
  • an electronic device including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement A method as described in any of the above.
  • a computer-readable storage medium is also provided.
  • the electronic device can execute any of the above embodiments of the present disclosure. described method.
  • a computer program including a computer readable code.
  • the computer program product includes a computer program or instructions. When the computer program or instructions are run on an electronic device, the The electronic device performs any of the above methods in the embodiments of the present disclosure.
  • a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the above methods according to the embodiments of the present disclosure.
  • FIG. 1 is a schematic diagram of an application environment according to an exemplary embodiment.
  • Figure 2 is a flow chart of a face recognition method according to an exemplary embodiment.
  • Figure 4 is a flow chart of a method for adding face information according to an exemplary embodiment.
  • Figure 5 is a flow chart of a method for updating a historical face information sub-database according to an exemplary embodiment.
  • Figure 6 is a flow chart of a face information comparison method according to an exemplary embodiment.
  • Figure 9 is a flow chart of a resource transfer method according to an exemplary embodiment.
  • Figure 10 is a flow chart of another face recognition method according to an exemplary embodiment.
  • FIG. 12 is a block diagram of an electronic device for face recognition according to an exemplary embodiment.
  • the face recognition front-end 100 can be used to collect the face information of the object to be recognized to obtain the face information to be recognized; and then compare the face information to be recognized with the locally stored preset face information to obtain the face recognition result;
  • the face recognition backend 200 can be used to store and manage all face recognition information.
  • the preset face information cached locally in the face recognition frontend 100 can be obtained from the face before the face recognition frontend 100 performs face recognition.
  • the face recognition backend 200 obtains and stores it locally.
  • FIG 2 is a flow chart of a face recognition method according to an exemplary embodiment. As shown in Figure 2, this method can be used in electronic devices such as terminals, servers, edge computing nodes, etc. Here, it can be used in Figure 1 In the face recognition front-end, the method can include:
  • the face recognition time node may be the time node required for face recognition of the object to be recognized, that is, the face recognition time node may be determined based on the recognition requirements of the object to be recognized. For example, if the object to be recognized performs a face recognition operation at time node A, then the corresponding face recognition time node can be determined as time node A, so that the face information of the object to be recognized can be collected at time node A, and we get The face information to be recognized is the face information of the object to be recognized.
  • the face recognition time node may be a preset face recognition time period, or may be a preset face recognition time. In this way, the face information of the subject to be recognized can be collected within the preset face recognition time period or at the preset face recognition time, and the face information to be recognized of the subject to be recognized can be obtained.
  • the target face information sub-database is the face information sub-base associated with the face recognition time node; the number of face information items contained in the target face information sub-base is smaller than the number of face information items contained in the full face information base.
  • different face recognition time nodes correspond to different face information sub-library, that is, face recognition is performed in the face information sub-library corresponding to the face recognition time node; on the one hand, it can be realized locally Compare face information in a small database to reduce the amount of face information required for comparison and narrow the comparison range of face information, thereby improving the efficiency of face recognition; on the other hand, it can reduce the time required for face recognition from the front end to the face. Identify the number of face recognition requests on the backend and save network resources.
  • the target face information sub-base there may be one target face information sub-base corresponding to the face recognition time node, and the target face information sub-base may be continuously updated as time changes, so different faces
  • the recognition time nodes can correspond to different target face information sub-databases; and, in actual face recognition scenarios, the objects to be recognized that need to be recognized are constantly changing, and the locally stored face information sub-databases can also be
  • the face information is updated so that it can adapt to changing face recognition scenarios; therefore, before comparing the face information to be recognized with the face information in the locally stored target face information sub-library,
  • the method also includes:
  • the face recognition history information may be the number of successful recognitions corresponding to each item of face information in the historical face information sub-database.
  • the face information to be recognized of the subject to be recognized can be compared with various face information in the historical face information sub-database.
  • the historical face information sub-database The number of successful recognitions corresponding to each piece of facial information in can represent the number of successful face recognitions for the actual objects corresponding to each piece of facial information.
  • Figure 3 shows a method for deleting face information. The method may include:
  • the number of successful face recognitions corresponding to each piece of face information in the historical face information sub-database can be determined.
  • the first face information with a greater number of successful face recognitions corresponds to an actual object that has undergone face recognition more times, that is, the first face information is used more times.
  • the second face information with fewer successful face recognition times the corresponding actual object has been face recognized less often, that is, the second face information is used less frequently; based on this, the number of successful recognitions can be less than
  • the face information for a preset number of times is determined as the face information to be deleted, and the face information to be deleted is deleted from the historical face information sub-database, thereby updating the historical face information sub-database and obtaining the target face information. sub-library.
  • the number of successful recognitions is less than the preset number, it can be understood that the number of times the actual object corresponding to the face information appears is less than the preset number, that is, face recognition of the actual object is not frequent, and it can be Delete it from the historical face information sub-database to reduce the information storage pressure on the face recognition front-end and improve the data processing efficiency of the face recognition front-end.
  • the preset face information corresponding to some objects to be recognized may not be stored in the local historical face information sub-database. This part of the objects to be recognized may need to be subjected to face recognition in the future, and accordingly the preset face information corresponding to this part of the objects to be recognized needs to be used.
  • Figure 4 shows a method of adding face information. The method may include:
  • the face information to be added may be face information that is not stored in the local historical face information sub-database and the corresponding actual subject's face recognition is successful.
  • the number of successful recognitions corresponding to each item of facial information to be added can also be determined, so that the number of successful recognitions to be added can be greater than the preset number of successful recognitions.
  • the face information is added to the historical face information sub-database to obtain the target face information sub-database.
  • the preset face information corresponding to the object to be recognized that has been successfully compared but has not yet been added to the historical face information sub-base can be added to the historical face information sub-base to facilitate the identification.
  • Face information can be compared directly based on the locally stored face information font library, thereby improving face recognition. efficiency.
  • the update interval for the locally stored face information sub-database may be determined based on the actual situation of face recognition.
  • Figure 5 shows a method for updating the historical face information sub-database. The method may include:
  • the unstored face information may be the face information that is not stored in the local historical face information sub-database and the corresponding actual object's face recognition is successful within the target time period.
  • the length of the target time period can be a preset time period, so that the update interval for subsequent updates to the face information sub-database can be determined based on the number of items that do not store face information in each target time period.
  • the number of items that do not store face information within the target time period is relatively large. For example, if the number of items that store face information within the target time period is greater than the preset number of items, it means that the locally stored items
  • the current face information sub-database cannot meet the requirements for face recognition of this part of the objects to be recognized, so it is necessary to shorten the update interval of the historical face information sub-database.
  • the updated face information sub-database can be updated.
  • the face information sub-database can adapt as quickly as possible to scenes with a large number of unstored face information items; the number of unstored face information items within the target time period is small, for example, the target time period is the number of stored face information items.
  • the number of items is less than or equal to the preset number, it means that the locally stored current face information sub-database can meet the face recognition requirements for most of the objects to be recognized, thereby extending the update interval for the historical face information sub-database.
  • the number of preset items can be set as needed, and is not limited in this embodiment of the disclosure.
  • the corresponding update interval can be determined based on the number of items for storing face information, so that the update interval for the target face information sub-base matches the number of items for which face information is not stored, that is, the target face
  • the update frequency of the information sub-base matches the face recognition situation in the actual scene, improves the adaptability of the target face information sub-base to the actual face recognition situation and the flexibility of the update of the face information sub-base, thereby improving the performance of the face information sub-base.
  • the efficiency of face recognition is the efficiency of face recognition.
  • each preset face information sub-base may correspond to a different preset time node, so that the time node can be recognized based on the face.
  • Figure 6 shows a face information comparison method. The method may include:
  • multiple preset face information sub-databases corresponding to each preset time node can be uniformly obtained from the face recognition backend at the preset time point.
  • the updated default face information sub-database can be obtained and replace the original default face information sub-database.
  • the preset face information sub-base For each preset time node, there can be a corresponding preset face information sub-base, that is, the preset face information sub-base has time characteristics and can be applied to scenarios that require time for face recognition.
  • the preset face information sub-library corresponding to each preset time node can be stored in the face recognition front end in advance, so that when face recognition is required, it can be directly based on the target corresponding to the face recognition time node.
  • the face information sub-library performs face information comparison.
  • each fixed time node has a corresponding preset face information sub-library, which realizes face recognition at different time points; based on the current face recognition time node, the current face recognition time node can be determined
  • the corresponding preset face information sub-base performs face recognition based on the preset face information sub-base, thereby improving face recognition efficiency.
  • the corresponding target time node can be determined first, and then the target face information sub-base is determined based on the target time node.
  • Figure 7 shows a method for determining a target face information sub-base. The method may include:
  • the face recognition time node can be compared with each preset time node, and the preset time node whose difference with the face recognition time node is less than or equal to the first preset threshold is determined as the target.
  • Time node; wherein, the target time node can be a time node before the face recognition time node, or it can be a time node after the face recognition time node.
  • the target face information sub-base corresponding to the target time node can be determined based on the corresponding relationship between the preset time node and the preset face information sub-base.
  • the corresponding target face information sub-base is determined based on the preset time node closest to the face recognition time node, so that the determined target face information sub-base matches the actual face recognition time node.
  • the corresponding target face information sub-database can be determined based on time information, and the efficiency and convenience of determining the face information sub-database can be improved.
  • the preset face information corresponding to other preset time nodes can be Face information comparison is performed in the sub-database; please refer to Figure 8, which shows another face information comparison method, which may include:
  • the face recognition result indicates that there is no target face information matching the face information to be recognized in the target face information sub-database
  • select from the plurality of preset face information The associated face information sub-base of the target face information sub-base is determined in the sub-base; the preset time node corresponding to the target face information sub-base is the same as the preset time node of the associated face information sub-base. The difference is less than or equal to the second preset threshold.
  • the associated face information sub-base can be one or more preset face information sub-bases associated with the target face information sub-base among multiple preset face information sub-bases; in this way, the face information to be recognized can be Compare it with the face information in the associated face information sub-database to obtain the face recognition result.
  • the associated face information sub-base may be determined based on the difference between the preset time nodes corresponding to each preset face information sub-base and the target face information sub-base.
  • the matching priorities of the multiple associated face information sub-databases can be determined, that is, the face information to be recognized is matched with the corresponding ones in order of matching priority from high to low.
  • the face information in the priority associated face information sub-database is matched; if the target face information is matched, subsequent face information matching operations will no longer be performed.
  • the matching priority of the associated face information sub-base can be determined based on the difference between the preset time nodes corresponding to the preset face information sub-base and the target face information sub-base; the greater the time node difference, the associated face information The lower the matching priority of the sub-database; the smaller the time node difference, the higher the matching priority of the associated face information sub-database.
  • the face recognition method provided in this embodiment can also be applied to resource transfer scenarios.
  • the method may include:
  • resource transfer operations need to be performed based on the face recognition results; among them, face recognition can be used as the object identity verification for resource transfer.
  • face recognition can be used as the object identity verification for resource transfer.
  • the identification of the object to be identified is completed.
  • Object authentication In the resource transfer system, the association between the human face information and the target account can be stored, so that the associated target account can be determined based on the successfully matched target face information. In this way, the resource transfer operation can be performed based on the target account of the object to be identified. .
  • the face recognition method is applied to the resource transfer scenario.
  • the face recognition method provided by this embodiment can improve the face recognition efficiency, applying it to the resource transfer scenario can improve the efficiency of resource transfer. efficiency, and reduce the consumption of network resources caused by sending face recognition requests to the face recognition backend during the resource transfer process; on the other hand, resource transfer can only be carried out when face recognition is passed, thus improving the efficiency of resource transfer. safety.
  • the face recognition operation can be implemented based on the face recognition back-end; please refer to Figure 10. It shows another face recognition method, which may include:
  • S1020 Receive the face information comparison results of the face information to be recognized and the candidate face information by the face recognition backend.
  • the additional information may be relevant information reserved when the object to be identified registers in the face recognition system.
  • it may be the preset digits in the ID number, the preset digits in the mobile phone number, etc. information.
  • face information comparison can be requested from the face recognition back-end, in which additional information can be used to compare the face information.
  • the full database of face information is used for information screening to further narrow the range of face comparisons and improve the efficiency of face recognition.
  • the face recognition method in the embodiment of the present disclosure can be applied to scenarios such as smart retail or station ticket checking.
  • Figure 11 is a face recognition device according to an exemplary embodiment, including:
  • the face information acquisition part 1110 to be recognized is configured to acquire the face information to be recognized of the object to be recognized at the face recognition time node;
  • the face recognition part 1120 is configured to compare the face information to be recognized with the face information in the locally stored target face information sub-database to obtain the face recognition result of the object to be recognized;
  • the target face information sub-base is a face information sub-base associated with the face recognition time node; the number of face information items contained in the target face information sub-base is less than the number of face information items contained in the full face information base. The number of face information items.
  • the device further includes:
  • the first update part is configured to update the locally stored historical face information sub-database based on the face recognition history information before the face recognition time node to obtain the target face information sub-base.
  • the face recognition history information is the number of successful recognitions corresponding to each piece of face information in the historical face information sub-database; the first update part includes:
  • the face information to be deleted determining part is configured to determine the face information to be deleted based on the number of successful recognitions corresponding to each piece of face information in the historical face information sub-base; in the historical face information sub-base, The number of successful recognitions corresponding to the face information to be deleted is less than the preset number;
  • the deletion part is used to delete the face information to be deleted from the historical face information sub-base to obtain the target face information sub-base.
  • the first update part includes:
  • the added face information determination part is configured to determine the face information to be added; the face information to be added is successfully recognized before the face recognition time node and is not included in the historical face information sub-base. face information;
  • the adding part is configured to add the face information to be added to the historical face information sub-base to obtain the target face information sub-base.
  • the first update part includes:
  • the unstored face information acquisition part is configured to acquire the unstored face information within the target time period before the face recognition time node; the unstored face information means that the recognition is successful within the target time period, And the face information is not included in the historical face information sub-database;
  • the update interval determination part is configured to determine the update interval for the historical face information sub-database based on the number of items of unstored face information
  • the second update part is configured to update the historical face information sub-base based on the update interval to obtain the target face information sub-base.
  • the device further includes:
  • the preset face information sub-base acquisition part is configured to acquire multiple preset face information sub-bases corresponding to each preset time node, and store the multiple preset face information sub-bases locally;
  • the face recognition part 1120 includes:
  • the first determining part is configured to determine the target face information sub-base corresponding to the face recognition time node from the plurality of preset face information sub-bases;
  • the first comparison part is configured to compare the face information to be recognized with the face information in the target face information sub-base to obtain a face recognition result for the object to be recognized.
  • the first determining part includes:
  • the target time node determination part is configured to determine the target time node from each of the preset time nodes; the difference between the target time node and the face recognition time node is less than or equal to the first preset threshold;
  • the second determination part is used to determine the preset face information sub-base corresponding to the target time node as the target face information sub-base.
  • the device further includes:
  • the associated face information sub-base determination part is configured to: when the face recognition result indicates that there is no target face information matching the to-be-recognized face information in the target face information sub-base, Determine the associated face information sub-base of the target face information sub-base from the plurality of preset face information sub-bases; the preset time node corresponding to the target face information sub-base is the same as the associated person The difference between the preset time nodes of the face information sub-base is less than or equal to the second preset threshold;
  • the second comparison part is configured to compare the face information to be recognized with the face information in the associated face information sub-database to obtain a face recognition result for the object to be recognized.
  • the device further includes:
  • the target account determination part is configured to determine the target account corresponding to the face information to be recognized in the case where the face recognition result representation matches the target face information corresponding to the face information to be recognized in the target face information sub-library.
  • the target account associated with the target face information
  • the resource transfer part is configured to perform resource transfer processing based on the target account.
  • the device further includes:
  • the candidate face information determination part is configured to identify the person in the case where the face recognition result represents that there is no target face information matching the face information to be recognized in the target face information sub-library.
  • the face recognition backend sends a face recognition request; the face recognition request includes the face information to be recognized and additional information corresponding to the object to be recognized; the additional information is used to indicate that after the face recognition
  • the terminal performs information screening in the full face information database to obtain candidate face information;
  • the information receiving part is configured to receive the face information comparison result of the face information to be recognized and the candidate face information by the face recognition backend.
  • part may be part of a circuit, part of a processor, part of a program or software, etc., of course, it may also be a unit, it may be a module or it may be non-modular.
  • FIG. 12 is a block diagram of an electronic device for face recognition according to an exemplary embodiment.
  • the electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. 12 .
  • the electronic device includes a processor, memory, network interface, display screen and input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities.
  • the memory of the electronic device includes non-volatile storage media and internal memory.
  • the non-volatile storage medium stores operating systems and computer programs. This internal memory provides an environment for the execution of operating systems and computer programs in non-volatile storage media.
  • the network interface of the electronic device is used to communicate with an external terminal through a network connection.
  • the computer program implements a face recognition method when executed by the processor.
  • the display screen of the electronic device may be a liquid crystal display or an electronic ink display.
  • the input device of the electronic device may be a touch layer covered on the display screen, or may be a button, trackball or touch pad provided on the housing of the electronic device. , it can also be an external keyboard, trackpad or mouse, etc.
  • FIG. 12 is only a block diagram of a partial structure related to the disclosed solution, and does not constitute a limitation on the electronic equipment to which the disclosed solution is applied.
  • Specific electronic devices can May include more or fewer parts than shown, or combine certain parts, or have a different arrangement of parts.
  • an electronic device including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement implementations as described in the present disclosure. Face recognition method in the example.
  • a storage medium is also provided, which when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the face recognition method in the embodiment of the present disclosure.
  • a computer program product containing instructions is also provided, which when run on a computer causes the computer to execute the face recognition method in the embodiment of the present disclosure.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Synchlink DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain Synchlink DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM
  • the face recognition front end can perform face recognition in the face information sub-repository corresponding to the face recognition time node.
  • Recognition in this way, on the one hand, it is possible to compare small databases of face information locally, reduce the amount of face information that needs to be compared, narrow the range of face information comparison, and improve the efficiency of face recognition; on the other hand, It can reduce the number of face recognition requests from the face recognition front-end to the face recognition back-end and save network resources.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Image Analysis (AREA)
  • Collating Specific Patterns (AREA)

Abstract

本公开关于一种人脸识别方法、装置、电子设备、存储介质、计算机程序及程序产品,所述方法包括:在人脸识别时间节点,获取待识别对象的待识别人脸信息;将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果;所述目标人脸信息子库为与所述人脸识别时间节点关联的人脸信息子库;所述目标人脸信息子库中包含的人脸信息的项数小于人脸信息全量库中包含的人脸信息的项数。本公开能够减少人脸识别过程中对网络资源的占用,以及提高人脸识别效率。

Description

人脸识别方法、装置、电子设备、存储介质、计算机程序及程序产品
相关申请的交叉引用
本公开实施例基于申请号为202210277436.X、申请日为2022年3月18日、申请名称为“人脸识别方法、装置、电子设备及存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。
技术领域
本公开涉及人脸识别技术领域,尤其涉及一种人脸识别方法、装置、电子设备、存储介质、计算机程序及程序产品。
背景技术
人脸识别是基于人的脸部特征信息进行身份识别的一种生物识别技术,人脸识别需要经过比较复杂的验证,在基数庞大的对象库中通过人脸比对,准确找到待识别对象的信息。
现有技术中在进行人脸识别时,一般是在前端进行人脸信息采集,然后将采集的人脸信息发送至后台服务器,通过后台服务器在千万级对象库中进行人脸搜索与比对;在前端需要进行人脸识别的情况下,均需要向后台服务器发送相应的人脸识别请求,从而导致过多网络传输资源的占用;并且,在后台服务器同时接收到前端发送的多个人脸识别请求的情况下,会造成人脸识别请求的响应延迟,降低人脸识别效率。
发明内容
本公开实施例提供一种人脸识别方法、装置、电子设备、存储介质计算机程序及程序产品,可以减少人脸识别过程中对网络资源的占用,以及提高人脸识别效率。本公开实施例的技术方案如下:
本公开实施例提供一种人脸识别方法,包括:
在人脸识别时间节点,获取待识别对象的待识别人脸信息;
将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果;所述目标人脸信息子库为与所述人脸识别时间节点关联的人脸信息子库;所述目标人脸信息子库中包含的人脸信息的项数小于人脸信息全量库中包含的人脸信息的项数。
上述技术方案中,在不同的人脸识别时间节点,对应不同的人脸信息子库,即在与人脸识别时间节点对应的人脸信息子库中进行人脸识别,从而一方面能够实现在本地进行小库的人脸信息比对,减小所需比对的人脸信息的数量,缩小人脸信息比对范围,从而提高人脸识别效率;另一方面能够减轻人脸识别前端到人脸识别后端的人脸识别请求次数,节省网络资源。
在一个可选的实施例中,所述将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对之前,所述方法还包括:
基于所述人脸识别时间节点之前的人脸识别历史信息,对本地存储的历史人脸信息子库进行更新,得到所述目标人脸信息子库。
上述技术方案中,与人脸识别时间节点对应的目标人脸信息子库为最近更新过的人脸信息子库,使得目标人脸信息子库能够随着时间变化不断更新,与实际人脸识别场景相适配,进而提高人脸识别效率。
在一个可选的实施例中,所述人脸识别历史信息为与所述历史人脸信息子库中各项人脸信息对应的识别成功的次数;
所述基于所述人脸识别时间节点之前的人脸识别历史信息,对本地存储的历史人脸信息子库进行更新,得到所述目标人脸信息子库,包括:
基于所述历史人脸信息子库中各项人脸信息对应的识别成功的次数,确定待删除人脸信息;在所述历史人脸信息子库中,所述待删除人脸信息对应的识别成功的次数小于预设次数;
从所述历史人脸信息子库中删除所述待删除人脸信息,得到所述目标人脸信息子库。
上述技术方案中,识别成功的次数小于预设次数可以理解为该项人脸信息所对应的实际对象所出现的次数小于预设次数,即对该实际对象进行人脸识别不频繁,可将其从历史人脸信息子库中删除,以减轻人脸识别前端的信息存储压力,提升人脸识别前端的数据处理效率。
在一个可选的实施例中,所述基于所述人脸识别时间节点之前的人脸识别历史信息,对本地存储的历史人脸信息子库进行更新,得到所述目标人脸信息子库,包括:
确定待添加人脸信息;所述待添加人脸信息为在所述人脸识别时间节点之前识别成功,且不包含在所述历史人脸信息子库中的人脸信息;
将所述待添加人脸信息添加到所述历史人脸信息子库中,得到所述目标人脸信息子库。
上述技术方案中,已经被比对成功但还没有添加到历史人脸信息子库中的待识别对象对应的预设人脸信息,可将其添加到历史人脸信息子库中;以便于该待识别对象后续再次进行人脸识别的情况下,不需要从人脸识别后端获取预设人脸信息,可直接基于本地存储的人脸信息字库进行人脸信息比对,从而提高人脸识别效率。
在一个可选的实施例中,所述基于所述人脸识别时间节点之前的人脸识别历史信息,对本地存储的历史人脸信息子库进行更新,得到所述目标人脸信息子库,包括:
获取所述人脸识别时间节点之前的目标时间段内的未存储人脸信息;所述未存储人脸信息为在所述目标时间段内识别成功,且不包含在所述历史人脸信息子库中的人脸信息;
基于所述未存储人脸信息的项数,确定对所述历史人脸信息子库的更新间隔;
基于所述更新间隔对所述历史人脸信息子库进行更新,得到所述目标人 脸信息子库。
上述技术方案中,可根据为存储人脸信息的项数确定相应的更新间隔,从而使得对目标人脸信息子库的更新间隔与未存储人脸信息的项数相适配,即目标人脸信息子库的更新频率与实际场景中的人脸识别情况相匹配,提高目标人脸信息子库与实际人脸识别情况的适配性以及人脸信息子库更新的灵活性,进而能够提高人脸识别的效率。
在一个可选的实施例中,所述将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果之前,所述方法还包括:
获取与各个预设时间节点对应的多个预设人脸信息子库,将所述多个预设人脸信息子库存储在本地;
所述将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果,包括:
从所述多个预设人脸信息子库中,确定与所述人脸识别时间节点对应的目标人脸信息子库;
将所述待识别人脸信息与所述目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果。
上述技术方案中,每个固定时间节点均有对应的预设人脸信息子库,即实现了分时间点进行人脸识别;可基于当前人脸识别时间节点,确定与当前人脸识别时间节点对应的预设人脸信息子库,基于预设人脸信息子库进行人脸识别,从而提高人脸识别效率。
在一个可选的实施例中,所述从所述多个预设人脸信息子库中,确定与所述人脸识别时间节点对应的目标人脸信息子库,包括:
从所述各个预设时间节点中确定出目标时间节点;所述目标时间节点与所述人脸识别时间节点的差值小于或者等于第一预设阈值;
将所述目标时间节点对应的预设人脸信息子库确定为所述目标人脸信息子库。
上述技术方案中,基于与人脸识别时间节点最近的预设时间节点,确定相应的目标人脸信息子库,使得确定出的目标人脸信息子库与实际人脸识别时间节点相适配,从而可实现基于时间信息确定对应的目标人脸信息子库,提高人脸信息子库确定的效率以及便利性。
在一个可选的实施例中,所述方法还包括:
在所述人脸识别结果表征所述目标人脸信息子库中不存在与所述待识别人脸信息相匹配的目标人脸信息的情况下,从所述多个预设人脸信息子库中确定所述目标人脸信息子库的关联人脸信息子库;所述目标人脸信息子库对应的预设时间节点,与所述关联人脸信息子库的预设时间节点的差值小于或者等于第二预设阈值;
将所述待识别人脸信息与所述关联人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果。
上述技术方案中,在目标人脸信息子库中没有匹配成功的情况下,可在关联人脸信息子库中进一步进行人脸信息匹配,而无需向人脸识别后端发送人脸识别请求,可在人脸识别前端进行再次人脸识别,从而可充分利用人脸识别前端存储的预设人脸信息子库,提高人脸识别效率,降低网络资源消耗。
在一个可选的实施例中,所述方法还包括:
在所述人脸识别结果表征在所述目标人脸信息子库中匹配到与所述待识别人脸信息对应的目标人脸信息的情况下,确定与所述目标人脸信息关联的目标账户;
基于所述目标账户进行资源转移处理。
上述技术方案中,将人脸识别方法应用于资源转移场景,一方面,由于通过本实施例提供的人脸识别方法能够提高人脸识别效率,将其应用于资源转移场景,能够提高资源转移的效率,以及降低资源转移过程中向人脸识别后端发送人脸识别请求所带来的网络资源消耗;另一方面,在通过人脸识别的情况下,才可进行资源转移,从而提高了资源转移的安全性。
在一个可选的实施例中,所述方法还包括:
在所述人脸识别结果表征所述目标人脸信息子库中不存在与所述待识别人脸信息相匹配的目标人脸信息的情况下,向人脸识别后端发送人脸识别请求;所述人脸识别请求包括所述待识别人脸信息,以及与所述待识别对象对应的附加信息;所述附加信息用于指示所述人脸识别后端在人脸信息全量库中进行信息筛选,得到候选人脸信息;
接收所述人脸识别后端对所述待识别人脸信息以及所述候选人脸信息的人脸信息比对结果。
上述技术方案中,在人脸识别前端存储的预设人脸信息子库中不存在目标人脸信息的情况下,可向人脸识别后端请求人脸信息比对,其中可通过附加信息对人脸信息全量库进行信息筛选,以进一步缩小人脸比对范围,提高人脸识别效率。
另一方面,本公开实施例还提供一种人脸识别装置,包括:
待识别人脸信息获取部分,被配置为在人脸识别时间节点,获取待识别对象的待识别人脸信息;
人脸识别部分,被配置为将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果;所述目标人脸信息子库为与所述人脸识别时间节点关联的人脸信息子库;所述目标人脸信息子库中包含的人脸信息的项数小于人脸信息全量库中包含的人脸信息的项数。
在一个可选的实施例中,所述装置还包括:
第一更新部分,被配置为基于所述人脸识别时间节点之前的人脸识别历史信息,对本地存储的历史人脸信息子库进行更新,得到所述目标人脸信息子库。
在一个可选的实施例中,所述人脸识别历史信息为与所述历史人脸信息 子库中各项人脸信息对应的识别成功的次数;所述第一更新部分包括:
待删除人脸信息确定部分,被配置为基于所述历史人脸信息子库中各项人脸信息对应的识别成功的次数,确定待删除人脸信息;在所述历史人脸信息子库中,所述待删除人脸信息对应的识别成功的次数小于预设次数;
删除部分,被配置为从所述历史人脸信息子库中删除所述待删除人脸信息,得到所述目标人脸信息子库。
在一个可选的实施例中,所述第一更新部分包括:
添加人脸信息确定部分,被配置为确定待添加人脸信息;所述待添加人脸信息为在所述人脸识别时间节点之前识别成功,且不包含在所述历史人脸信息子库中的人脸信息;
添加部分,被配置为将所述待添加人脸信息添加到所述历史人脸信息子库中,得到所述目标人脸信息子库。
在一个可选的实施例中,所述第一更新部分包括:
未存储人脸信息获取部分,被配置为获取所述人脸识别时间节点之前的目标时间段内的未存储人脸信息;所述未存储人脸信息为在所述目标时间段内识别成功,且不包含在所述历史人脸信息子库中的人脸信息;
更新间隔确定部分,被配置为基于所述未存储人脸信息的项数,确定对所述历史人脸信息子库的更新间隔;
第二更新部分,被配置为基于所述更新间隔对所述历史人脸信息子库进行更新,得到所述目标人脸信息子库。
在一个可选的实施例中,所述装置还包括:
预设人脸信息子库获取部分,被配置为获取与各个预设时间节点对应的多个预设人脸信息子库,将所述多个预设人脸信息子库存储在本地;
所述人脸识别部分包括:
第一确定部分,被配置为从所述多个预设人脸信息子库中,确定与所述人脸识别时间节点对应的目标人脸信息子库;
第一比对部分,被配置为将所述待识别人脸信息与所述目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果。
在一个可选的实施例中,所述第一确定部分包括:
目标时间节点确定部分,被配置为从所述各个预设时间节点中确定出目标时间节点;所述目标时间节点与所述人脸识别时间节点的差值小于或者等于第一预设阈值;
第二确定部分,被配置为将所述目标时间节点对应的预设人脸信息子库确定为所述目标人脸信息子库。
在一个可选的实施例中,所述装置还包括:
关联人脸信息子库确定部分,被配置为在所述人脸识别结果表征所述目标人脸信息子库中不存在与所述待识别人脸信息相匹配的目标人脸信息的情况下,从所述多个预设人脸信息子库中确定所述目标人脸信息子库的关联人脸信息子库;所述目标人脸信息子库对应的预设时间节点,与所述关联人脸 信息子库的预设时间节点的差值小于或者等于第二预设阈值;
第二比对部分,被配置为将所述待识别人脸信息与所述关联人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果。
在一个可选的实施例中,所述装置还包括:
目标账户确定部分,被配置为在所述人脸识别结果表征在所述目标人脸信息子库中匹配到与所述待识别人脸信息对应的目标人脸信息的情况下,确定与所述目标人脸信息关联的目标账户;
资源转移部分,被配置为基于所述目标账户进行资源转移处理。
在一个可选的实施例中,所述装置还包括:
候选人脸信息确定部分,被配置为在所述人脸识别结果表征所述目标人脸信息子库中不存在与所述待识别人脸信息相匹配的目标人脸信息时,向人脸识别后端发送人脸识别请求;所述人脸识别请求包括所述待识别人脸信息,以及与所述待识别对象对应的附加信息;所述附加信息用于指示所述人脸识别后端在人脸信息全量库中进行信息筛选,得到候选人脸信息;
信息接收部分,被配置为接收所述人脸识别后端对所述待识别人脸信息以及所述候选人脸信息的人脸信息比对结果。
另一方面,根据本公开实施例还提供一种电子设备,包括:处理器;用于存储所述处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令,以实现如上述任一项所述的方法。
另一方面,根据本公开实施例还提供一种计算机可读存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行本公开实施例上述任一所述方法。
另一方面,根据本公开实施例还提供一种计算机程序,包括计算机可读代码,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在电子设备上运行的情况下,所述电子设备执行本公开实施例上述任一所述方法。
另一方面,根据本公开实施例还提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行本公开实施例的上述任一所述方法。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理,并不构成对本公开的不当限定。
图1是根据一示例性实施例示出的应用环境的示意图。
图2是根据一示例性实施例示出的一种人脸识别方法流程图。
图3是根据一示例性实施例示出的一种人脸信息的删除方法流程图。
图4是根据一示例性实施例示出的一种人脸信息的添加方法流程图。
图5是根据一示例性实施例示出的一种历史人脸信息子库的更新方法流程图。
图6是根据一示例性实施例示出的一种人脸信息比对方法流程图。
图7是根据一示例性实施例示出的一种目标人脸信息子库的确定方法流程图。
图8是根据一示例性实施例示出的另一种人脸信息比对方法流程图。
图9是根据一示例性实施例示出的一种资源转移方法流程图。
图10是根据一示例性实施例示出的另一种人脸识别方法流程图。
图11是根据一示例性实施例示出的一种人脸识别装置示意图。
图12是根据一示例性实施例示出的一种用于人脸识别的电子设备的框图。
具体实施方式
为了使本领域普通人员更好地理解本公开的技术方案,下面将结合附图,对本公开实施例中的技术方案进行清楚、完整地描述。
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
为了更好地理解本公开实施例提供的人脸识别方法,下面先对相关技术中采用的人脸识别方案进行说明。
在智能销售场景中,通常采用电子支付手段,如刷脸支付。由于支付属于个人所有的资源转移的过程,具有严谨性。在人脸识别过程中,需要经过比较复杂的验证,在基数庞大的人脸库中进行人脸比对,准确地确定出待支付的用户信息;因此,通常由支付终端进行人脸采集,再由云端通过千万级人脸比对库进行人脸比对,完成支付。由于云端的人脸库非常庞大,导致人脸比对效率低。并且,随着支付终端数量的不断增加,在云端同时收到多个支付终端的人脸识别请求的情况下,容易导致云端支付效率低。
请参阅图1,图1是根据一示例性实施例示出的一种应用环境的示意图,如图1所示,该应用环境可以包括人脸识别前端100和人脸识别后端200。
人脸识别前端100可用于对待识别对象的人脸信息进行采集,得到待识别人脸信息;然后将待识别人脸信息与本地存储的预设人脸信息进行比对,得到人脸识别结果;人脸识别后端200可用于对全量人脸识别信息进行存储以及管理,其中人脸识别前端100本地缓存储的预设人脸信息可以为在人脸识别前端100进行人脸识别之前,从人脸识别后端200获取并存储到本地的。
在本公开的一些实施例中,人脸识别前端100可以为具备人脸信息采集以及人脸识别功能的设备,可以包括但不限于智能手机、台式计算机、平板 电脑、笔记本电脑、智能音箱、数字助理、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、智能可穿戴设备等类型的电子设备。可选的,电子设备上运行的操作系统可以包括但不限于安卓系统、IOS系统、linux、windows等。
人脸识别后端200可以是独立服务器,也可以是多个服务器构成的服务器集群或者分布式系统。
此外,需要说明的是,图1所示的仅仅是本公开提供的一种应用环境,在实际应用中,还可以包括其他应用环境,例如人脸识别也可在人脸识别后端200进行。
本公开实施例中,上述人脸识别前端100以及人脸识别后端200可以通过有线或无线通信方式进行直接或间接地连接,本公开实施例在此不做限制。
图2是根据一示例性实施例示出的一种人脸识别方法的流程图,如图2所示,该方法可用于终端、服务器、边缘计算节点等电子设备中,这里,可以用于图1中的人脸识别前端,该方法可以包括:
S210.在人脸识别时间节点,获取待识别对象的待识别人脸信息。
在本公开实施例中,人脸识别时间节点可以为待识别对象所需进行人脸识别的时间节点,即人脸识别时间节点的确定可基于待识别对象的识别需求所确定。示例性的,待识别对象在时间节点A进行人脸识别操作,那么相应的人脸识别时间节点即可被确定为时间节点A,从而可在时间节点A对待识别对象进行人脸信息采集,得到待识别对象的待识别人脸信息。
在本公开实施例中,人脸识别时间节点可以为预设人脸识别时间段,或者可以为预设人脸识别时刻。如此,可在预设人脸识别时间段内,或者在预设人脸识别时刻对待识别对象进行人脸信息采集,得到待识别对象的待识别人脸信息。
S220.将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果;所述目标人脸信息子库为与所述人脸识别时间节点关联的人脸信息子库;所述目标人脸信息子库中包含的人脸信息的项数小于人脸信息全量库中包含的人脸信息的项数。
在本公开实施例中,在获取到待识别对象的待识别人脸信息后,可立即将待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对;为了适应在特定时间节点进行人脸识别的场景,也可在获取到待识别对象的待识别人脸信息后的预设比对时间节点,将待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对;对于比对的时机,可以根据需要设置,本公开实施例不作限制。
其中,目标人脸信息子库可以为与人脸识别时间节点关联的人脸信息子库。其中,不同的人脸识别时间节点可能对应不同的人脸信息子库;目标人脸信息子库中包含的人脸信息的项数小于人脸信息全量库中包含的人脸信息的项数;如此,人脸识别前端在将待识别人脸信息与目标人脸信息子库中的人脸信息进行比对的情况下,可以减少比对的人脸信息的项数。
上述技术方案中,在不同的人脸识别时间节点,对应不同的人脸信息子库,即在与人脸识别时间节点对应的人脸信息子库中进行人脸识别;一方面能够实现在本地进行小库的人脸信息比对,减小所需比对的人脸信息的数量,缩小人脸信息比对范围,从而提高人脸识别效率;另一方面能够减轻人脸识别前端到人脸识别后端的人脸识别请求次数,节省网络资源。
在本公开的一些实施例中,与人脸识别时间节点对应的目标人脸信息子库可以为一个,且该目标人脸信息子库可随着时间变化进行不断的更新,所以不同的人脸识别时间节点可对应不同的目标人脸信息子库;并且,在实际人脸识别场景中,需要进行人脸识别的待识别对象在不断变化,也可对本地存储的人脸信息子库中的人脸信息进行更新,以使其能够适应不断变化的人脸识别场景;因此,在将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对之前,所述方法还包括:
S211.基于所述人脸识别时间节点之前的人脸识别历史信息,对本地存储的历史人脸信息子库进行更新,得到所述目标人脸信息子库。
在本公开实施例中,人脸识别历史信息可用于表征已识别对象的人脸识别结果信息,通过人脸识别历史信息可确定人脸识别时间节点之前的人脸识别情况,从而可根据人脸识别情况更新本地存储的人脸信息子库,使得人脸信息子库与人脸识别实际情况相匹配。
上述技术方案中,与人脸识别时间节点对应的目标人脸信息子库为最近更新过的人脸信息子库,使得目标人脸信息子库能够随着时间变化不断更新,与实际人脸识别场景相适配,进而提高人脸识别效率。
在本公开的一些实施例中,人脸识别历史信息可以为与所述历史人脸信息子库中各项人脸信息对应的识别成功的次数。在一些实施例中,在人脸识别过程中,可将待识别对象的待识别人脸信息与历史人脸信息子库中的各项人脸信息进行比对,如此,历史人脸信息子库中各项人脸信息对应的识别成功的次数可以表示各项人脸信息所对应的实际对象进行人脸识别成功的次数。请参阅图3,其示出了一种人脸信息的删除方法,该方法可包括:
S310.基于所述历史人脸信息子库中各项人脸信息对应的识别成功的次数,确定待删除人脸信息;在所述历史人脸信息子库中所述待删除人脸信息对应的识别成功的次数小于预设次数。
S320.从所述历史人脸信息子库中删除所述待删除人脸信息,得到所述目标人脸信息子库。
在本公开实施例中,基于人脸识别历史信息,可确定历史人脸信息子库中各项人脸信息所对应的人脸识别成功的次数。其中,人脸识别成功次数多的第一人脸信息,其对应的实际对象进行人脸识别的次数较多,即用到第一人脸信息的次数较多。人脸识别成功次数少的第二人脸信息,其对应的实际对象进行人脸识别的次数较少,即用到第二人脸信息的次数较少;基于此,可将识别成功的次数小于预设次数的人脸信息确定为待删除人脸信息,将待删除人脸信息从历史人脸信息子库中删除,从而实现了对历史人脸信息子库 的更新,得到了目标人脸信息子库。
上述技术方案中,识别成功的次数小于预设次数可以理解为该项人脸信息所对应的实际对象所出现的次数小于预设次数,即对该实际对象进行人脸识别不频繁,可将其从历史人脸信息子库中删除,以减轻人脸识别前端的信息存储压力,提升人脸识别前端的数据处理效率。
在一个可选实施例中,在人脸识别时间节点之前所进行的人脸识别过程中,部分待识别对象对应的预设人脸信息可能并没有存储在本地的历史人脸信息子库中,而该部分待识别对象可能后续还需进行人脸识别,相应还需用到该部分待识别对象对应的预设人脸信息。请参阅图4,其示出了一种人脸信息的添加方法,该方法可包括:
S410.确定待添加人脸信息;所述待添加人脸信息为在所述人脸识别时间节点之前识别成功,且不包含在所述历史人脸信息子库中的人脸信息。
S420.将所述待添加人脸信息添加到所述历史人脸信息子库中,得到所述目标人脸信息子库。
在本公开实施例中,待添加人脸信息可以为没有被存储在本地历史人脸信息子库中,且对应的实际对象人脸识别成功的人脸信息。
在本公开实施例中,为了控制待添加人脸信息的数量,还可确定各项待添加人脸信息对应的识别成功的次数,从而可将识别成功的次数大于预设识别成功次数的待添加人脸信息添加到历史人脸信息子库中,得到目标人脸信息子库。
上述技术方案中,已经被比对成功但还没有添加到历史人脸信息子库中的待识别对象对应的预设人脸信息,可将其添加到历史人脸信息子库中,以便于该待识别对象后续再次进行人脸识别的情况下,不需要从人脸识别后端获取预设人脸信息,可直接基于本地存储的人脸信息字库进行人脸信息比对,从而提高人脸识别效率。
在一个可选的实施例中,对本地存储的人脸信息子库的更新间隔可根据人脸识别的实际情况来确定。请参阅图5,其示出了一种历史人脸信息子库的更新方法,该方法可包括:
S510.获取所述人脸识别时间节点之前的目标时间段内的未存储人脸信息;所述未存储人脸信息为在所述目标时间段内识别成功,且不包含在所述历史人脸信息子库中的人脸信息。
S520.基于所述未存储人脸信息的项数,确定对所述历史人脸信息子库的更新间隔。
S530.基于所述更新间隔对所述历史人脸信息子库进行更新,得到所述目标人脸信息子库。
在本公开实施例中,未存储人脸信息可以为没有被存储在本地历史人脸信息子库中,且对应的实际对象在目标时间段内人脸识别成功的人脸信息。目标时间段的时长可以为预设时长,从而可根据每个目标时间段内未存储人脸信息的项数,确定后续对人脸信息子库进行更新的更新间隔。
在本公开实施例中,在目标时间段内未存储人脸信息的项数较多,例如,目标时间段内为存储人脸信息的项数大于预设项数的情况下,说明本地存储的当前人脸信息子库不能满足对该部分待识别对象进行人脸识别的要求,从而需要缩短对历史人脸信息子库的更新间隔,通过频繁更新历史人脸信息子库,使得更新后的人脸信息子库能够尽快适配未存储人脸信息项数较多的场景;在目标时间段内未存储人脸信息的项数较少,例如,目标时间段内为存储人脸信息的项数小于或者等于预设项数的情况下,说明本地存储的当前人脸信息子库能够满足对大部分待识别对象的人脸识别要求,从而可延长对历史人脸信息子库的更新间隔。其中,预设项数可以根据需要设置,本公开实施例不作限制。
上述技术方案中,可根据为存储人脸信息的项数确定相应的更新间隔,从而使得对目标人脸信息子库的更新间隔与未存储人脸信息的项数相适配,即目标人脸信息子库的更新频率与实际场景中的人脸识别情况相匹配,提高目标人脸信息子库与实际人脸识别情况的适配性以及人脸信息子库更新的灵活性,进而能够提高人脸识别的效率。
在本公开的一些实施例中,本地存储的预设人脸信息子库可以为多个,每个预设人脸信息子库可对应不同的预设时间节点,从而可根据人脸识别时间节点,确定与当前人脸识别时间节点对应的目标人脸信息子库。请参阅图6,其示出了一种人脸信息比对方法,该方法可包括:
S610.获取与各个预设时间节点对应的多个预设人脸信息子库,将所述多个预设人脸信息子库存储在本地。
S620.从所述多个预设人脸信息子库中,确定与所述人脸识别时间节点对应的目标人脸信息子库。
S630.将所述待识别人脸信息与所述目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果。
在本公开实施例中,对各预设时间节点对应的多个预设人脸信息子库,可在预设时间点从人脸识别后端进行统一获取,在其中的一个或者多个预设人脸信息子库存在更新的情况下,可获取更新后的预设人脸信息子库并替换原预设人脸信息子库。
对于每个预设时间节点,均可有相应的预设人脸信息子库,即预设人脸信息子库具有时间特性,能够适用于对人脸识别有时间要求的场景中。这里,可预先将与各预设时间节点对应的预设人脸信息子库存储到人脸识别前端,从而在需要进行人脸识别的情况下,可直接基于与人脸识别时间节点对应的目标人脸信息子库进行人脸信息比对。
上述技术方案中,每个固定时间节点均有对应的预设人脸信息子库,即实现了分时间点进行人脸识别;可基于当前人脸识别时间节点,确定与当前人脸识别时间节点对应的预设人脸信息子库,基于预设人脸信息子库进行人脸识别,从而提高人脸识别效率。
在本公开实施例中,可首先确定相应的目标时间节点,再根据目标时间 节点确定目标人脸信息子库。请参阅图7,其示出了一种目标人脸信息子库的确定方法,该方法可以包括:
S710.从所述各个预设时间节点中确定出目标时间节点;所述目标时间节点与所述人脸识别时间节点的差值小于或者等于第一预设阈值。
S720.将所述目标时间节点对应的预设人脸信息子库确定为所述目标人脸信息子库。
在本公开实施例中,可将人脸识别时间节点与各预设时间节点进行比较,将与人脸识别时间节点的差值小于或者等于第一预设阈值的预设时间节点,确定为目标时间节点;其中,目标时间节点可以为人脸识别时间节点之前的时间节点,也可以为人脸识别时间节点之后的时间节点。
在确定了目标时间节点之后,可基于预设时间节点与预设人脸信息子库的对应关系,确定与目标时间节点对应的目标人脸信息子库。
上述技术方案中,基于与人脸识别时间节点最近的预设时间节点,确定相应的目标人脸信息子库,使得确定出的目标人脸信息子库与实际人脸识别时间节点相适配,从而可实现基于时间信息确定对应的目标人脸信息子库,提高人脸信息子库确定的效率以及便利性。
在一个可选的实施例中,在目标人脸信息子库中没有匹配到与待识别人脸信息对应的目标人脸信息的情况下,可在其他预设时间节点对应的预设人脸信息子库中进行人脸信息比对;请参阅图8,其示出了另一种人脸信息比对方法,该方法可包括:
S810.在所述人脸识别结果表征所述目标人脸信息子库中不存在与所述待识别人脸信息相匹配的目标人脸信息的情况下,从所述多个预设人脸信息子库中确定所述目标人脸信息子库的关联人脸信息子库;所述目标人脸信息子库对应的预设时间节点,与所述关联人脸信息子库的预设时间节点的差值小于或者等于第二预设阈值。
S820.将所述待识别人脸信息与所述关联人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果。
在目标人脸信息子库中没有匹配到目标人脸信息的情况下,可在关联人脸信息子库中进行人脸信息比对。关联人脸信息子库可以为多个预设人脸信息子库中,与目标人脸信息子库相关联的一个或者多个预设人脸信息子库;如此,可将待识别人脸信息与关联人脸信息子库中的人脸信息进行比对,得到人脸识别结果。关联人脸信息子库可以基于各预设人脸信息子库与目标人脸信息子库所对应的预设时间节点的差值进行确定。
在关联人脸信息子库为多个情况下,可确定多个关联人脸信息子库的匹配优先级,即可按照匹配优先级由高到低的顺序,将待识别人脸信息与相应匹配优先级的关联人脸信息子库中的人脸信息进行匹配;在匹配到目标人脸信息的情况下,将不再执行后续人脸信息匹配操作。
关联人脸信息子库的匹配优先级可基于预设人脸信息子库与目标人脸信息子库所对应的预设时间节点的差值进行确定;时间节点差值越大的关联人 脸信息子库的匹配优先级越低;时间节点差值越小的关联人脸信息子库的匹配优先级越高。
上述技术方案中,在目标人脸信息子库中没有匹配成功时,可在关联人脸信息子库中进一步进行人脸信息匹配,而无需向人脸识别后端发送人脸识别请求;也就是说,可在人脸识别前端进行再次人脸识别,从而可充分利用人脸识别前端存储的预设人脸信息子库,提高人脸识别效率,降低网络资源消耗。
示例性的,对于本实施例提供的人脸识别方法还可应用于资源转移场景,请参阅图9,其示出了一种资源转移方法,该方法可包括:
S910.在所述人脸识别结果表征在所述目标人脸信息子库中匹配到与所述待识别人脸信息对应的目标人脸信息的情况下,确定与所述目标人脸信息关联的目标账户。
S920.基于所述目标账户进行资源转移处理。
在资源转移场景中,需要基于人脸识别结果进行相应的资源转移操作;其中,人脸识别可作为资源转移的对象身份验证,在待识别对象通过人脸识别的情况下,完成对待识别对象的对象身份验证。在资源转移系统中,可存储有人脸信息与目标账户的关联关系,从而可基于匹配成功的目标人脸信息,确定相关联的目标账户,如此,可基于待识别对象的目标账户进行资源转移操作。
上述技术方案中,将人脸识别方法应用于资源转移场景,一方面,由于通过本实施例提供的人脸识别方法能够提高人脸识别效率,将其应用于资源转移场景,能够提高资源转移的效率,以及降低资源转移过程中向人脸识别后端发送人脸识别请求所带来的网络资源消耗;另一方面,在通过人脸识别时,才可进行资源转移,从而提高了资源转移的安全性。
在一个可选的实施例中,通过人脸识别前端存储的预设人脸信息子库不能完成人脸识别的情况下,可基于人脸识别后端实现人脸识别操作;请参阅图10,其示出了另一种人脸识别方法,该方法可包括:
S1010.在所述人脸识别结果表征所述目标人脸信息子库中不存在与所述待识别人脸信息相匹配的目标人脸信息的情况下,向人脸识别后端发送人脸识别请求;所述人脸识别请求包括所述待识别人脸信息,以及与所述待识别对象对应的附加信息;所述附加信息用于指示所述人脸识别后端在人脸信息全量库中进行信息筛选,得到候选人脸信息。
S1020.接收所述人脸识别后端对所述待识别人脸信息以及所述候选人脸信息的人脸信息比对结果。
本公开实施例中,附加信息可以为待识别对象在人脸识别系统注册时所预留的相关信息,例如,可以为身份证号中预设数位的数字、手机号中预设数位的数字等信息。
上述技术方案中,在人脸识别前端存储的预设人脸信息子库中不存在目标人脸信息的情况下,可向人脸识别后端请求人脸信息比对,其中可通过附 加信息对人脸信息全量库进行信息筛选,以进一步缩小人脸比对范围,提高人脸识别效率。
本公开实施例中的人脸识别方法可应用于智能零售或者车站检票等场景中。
图11是根据一示例性实施例示出的一种人脸识别装置,包括:
待识别人脸信息获取部分1110,被配置为在人脸识别时间节点,获取待识别对象的待识别人脸信息;
人脸识别部分1120,被配置为将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果;所述目标人脸信息子库为与所述人脸识别时间节点关联的人脸信息子库;所述目标人脸信息子库中包含的人脸信息的项数小于人脸信息全量库中包含的人脸信息的项数。
在一个可选的实施例中,所述装置还包括:
第一更新部分,被配置为基于所述人脸识别时间节点之前的人脸识别历史信息,对本地存储的历史人脸信息子库进行更新,得到所述目标人脸信息子库。
在一个可选的实施例中,所述人脸识别历史信息为与所述历史人脸信息子库中各项人脸信息对应的识别成功的次数;所述第一更新部分包括:
待删除人脸信息确定部分,被配置为基于所述历史人脸信息子库中各项人脸信息对应的识别成功的次数,确定待删除人脸信息;在所述历史人脸信息子,所述待删除人脸信息对应的识别成功的次数小于预设次数;
删除部分,用于从所述历史人脸信息子库中删除所述待删除人脸信息,得到所述目标人脸信息子库。
在一个可选的实施例中,所述第一更新部分包括:
添加人脸信息确定部分,被配置为确定待添加人脸信息;所述待添加人脸信息为在所述人脸识别时间节点之前识别成功,且不包含在所述历史人脸信息子库中的人脸信息;
添加部分,被配置为将所述待添加人脸信息添加到所述历史人脸信息子库中,得到所述目标人脸信息子库。
在一个可选的实施例中,所述第一更新部分包括:
未存储人脸信息获取部分,被配置为获取所述人脸识别时间节点之前的目标时间段内的未存储人脸信息;所述未存储人脸信息为在所述目标时间段内识别成功,且不包含在所述历史人脸信息子库中的人脸信息;
更新间隔确定部分,被配置为基于所述未存储人脸信息的项数,确定对所述历史人脸信息子库的更新间隔;
第二更新部分,被配置为基于所述更新间隔对所述历史人脸信息子库进行更新,得到所述目标人脸信息子库。
在一个可选的实施例中,所述装置还包括:
预设人脸信息子库获取部分,被配置为获取与各个预设时间节点对应的 多个预设人脸信息子库,将所述多个预设人脸信息子库存储在本地;
所述人脸识别部分1120包括:
第一确定部分,被配置为从所述多个预设人脸信息子库中,确定与所述人脸识别时间节点对应的目标人脸信息子库;
第一比对部分,被配置为将所述待识别人脸信息与所述目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果。
在一个可选的实施例中,所述第一确定部分包括:
目标时间节点确定部分,被配置为从所述各个预设时间节点中确定出目标时间节点;所述目标时间节点与所述人脸识别时间节点的差值小于或者等于第一预设阈值;
第二确定部分,用于将所述目标时间节点对应的预设人脸信息子库确定为所述目标人脸信息子库。
在一个可选的实施例中,所述装置还包括:
关联人脸信息子库确定部分,被配置为在所述人脸识别结果表征所述目标人脸信息子库中不存在与所述待识别人脸信息相匹配的目标人脸信息的情况下,从所述多个预设人脸信息子库中确定所述目标人脸信息子库的关联人脸信息子库;所述目标人脸信息子库对应的预设时间节点,与所述关联人脸信息子库的预设时间节点的差值小于或者等于第二预设阈值;
第二比对部分,被配置为将所述待识别人脸信息与所述关联人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果。
在一个可选的实施例中,所述装置还包括:
目标账户确定部分,被配置为在所述人脸识别结果表征在所述目标人脸信息子库中匹配到与所述待识别人脸信息对应的目标人脸信息的情况下,确定与所述目标人脸信息关联的目标账户;
资源转移部分,被配置为基于所述目标账户进行资源转移处理。
在一个可选的实施例中,所述装置还包括:
候选人脸信息确定部分,被配置为在所述人脸识别结果表征所述目标人脸信息子库中不存在与所述待识别人脸信息相匹配的目标人脸信息的情况下,向人脸识别后端发送人脸识别请求;所述人脸识别请求包括所述待识别人脸信息,以及与所述待识别对象对应的附加信息;所述附加信息用于指示所述人脸识别后端在人脸信息全量库中进行信息筛选,得到候选人脸信息;
信息接收部分,被配置为接收所述人脸识别后端对所述待识别人脸信息以及所述候选人脸信息的人脸信息比对结果。
在本公开实施例以及其他的实施例中,“部分”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是单元,还可以是模块也可以是非模块化的。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
图12是根据一示例性实施例示出的一种用于人脸识别的电子设备的框图, 该电子设备可以是终端,其内部结构图可以如图12所示。该电子设备包括通过系统总线连接的处理器、存储器、网络接口、显示屏和输入装置。其中,该电子设备的处理器用于提供计算和控制能力。该电子设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该电子设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种人脸识别方法。该电子设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该电子设备的输入装置可以是显示屏上覆盖的触摸层,也可以是电子设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。
本领域技术人员可以理解,图12中示出的结构,仅仅是与本公开方案相关的部分结构的框图,并不构成对本公开方案所应用于其上的电子设备的限定,具体的电子设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在示例性实施例中,还提供了一种电子设备,包括:处理器;用于存储该处理器可执行指令的存储器;其中,该处理器被配置为执行该指令,以实现如本公开实施例中的人脸识别方法。
在示例性实施例中,还提供了一种存储介质,当该存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行本公开实施例中的人脸识别方法。
在示例性实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行本公开实施例中的人脸识别方法。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,该计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被 视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。
工业实用性
本公开实施例中,在不同的人脸识别时间节点,对应本地存储的不同的人脸信息子库,人脸识别前端可以在与人脸识别时间节点对应的人脸信息子库中进行人脸识别;如此,一方面能够实现在本地进行小库的人脸信息比对,减小所需比对的人脸信息的数量,缩小人脸信息比对范围,提高人脸识别效率;另一方面能够减轻人脸识别前端到人脸识别后端的人脸识别请求次数,节省网络资源。

Claims (24)

  1. 一种人脸识别方法,包括:
    在人脸识别时间节点,获取待识别对象的待识别人脸信息;
    将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果;所述目标人脸信息子库为与所述人脸识别时间节点关联的人脸信息子库;所述目标人脸信息子库中包含的人脸信息的项数小于人脸信息全量库中包含的人脸信息的项数。
  2. 根据权利要求1所述的方法,其中,所述将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对之前,所述方法还包括:
    基于所述人脸识别时间节点之前的人脸识别历史信息,对本地存储的历史人脸信息子库进行更新,得到所述目标人脸信息子库。
  3. 根据权利要求1或2所述的方法,其中,所述人脸识别历史信息为与所述历史人脸信息子库中各项人脸信息对应的识别成功的次数;
    所述基于所述人脸识别时间节点之前的人脸识别历史信息,对本地存储的历史人脸信息子库进行更新,得到所述目标人脸信息子库,包括:
    基于所述历史人脸信息子库中各项人脸信息对应的识别成功的次数,确定待删除人脸信息;在所述历史人脸信息子库中,所述待删除人脸信息对应的识别成功的次数小于预设次数;
    从所述历史人脸信息子库中删除所述待删除人脸信息,得到所述目标人脸信息子库。
  4. 根据权利要求1至3任一项所述的方法,其中,所述基于所述人脸识别时间节点之前的人脸识别历史信息,对本地存储的历史人脸信息子库进行更新,得到所述目标人脸信息子库,包括:
    确定待添加人脸信息;所述待添加人脸信息为在所述人脸识别时间节点之前识别成功,且不包含在所述历史人脸信息子库中的人脸信息;
    将所述待添加人脸信息添加到所述历史人脸信息子库中,得到所述目标人脸信息子库。
  5. 根据权利要求1至4任一项所述的方法,其中,所述基于所述人脸识别时间节点之前的人脸识别历史信息,对本地存储的历史人脸信息子库进行更新,得到所述目标人脸信息子库,包括:
    获取所述人脸识别时间节点之前的目标时间段内的未存储人脸信息;所述未存储人脸信息为在所述目标时间段内识别成功,且不包含在所述历史人脸信息子库中的人脸信息;
    基于所述未存储人脸信息的项数,确定对所述历史人脸信息子库的更新间隔;
    基于所述更新间隔对所述历史人脸信息子库进行更新,得到所述目标人脸信息子库。
  6. 根据权利要求1所述的方法,其中,所述将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果之前,所述方法还包括:
    获取与各个预设时间节点对应的多个预设人脸信息子库,将所述多个预设人脸信息子库存储在本地;
    所述将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果,包括:
    从所述多个预设人脸信息子库中,确定与所述人脸识别时间节点对应的目标人脸信息子库;
    将所述待识别人脸信息与所述目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果。
  7. 根据权利要求1或6所述的方法,其中,所述从所述多个预设人脸信息子库中,确定与所述人脸识别时间节点对应的目标人脸信息子库,包括:
    从所述各个预设时间节点中确定出目标时间节点;所述目标时间节点与所述人脸识别时间节点的差值小于或者等于第一预设阈值;
    将所述目标时间节点对应的预设人脸信息子库确定为所述目标人脸信息子库。
  8. 根据权利要求6或7所述的方法,其中,所述方法还包括:
    在所述人脸识别结果表征所述目标人脸信息子库中不存在与所述待识别人脸信息相匹配的目标人脸信息的情况下,从所述多个预设人脸信息子库中确定所述目标人脸信息子库的关联人脸信息子库;所述目标人脸信息子库对应的预设时间节点,与所述关联人脸信息子库的预设时间节点的差值小于或者等于第二预设阈值;
    将所述待识别人脸信息与所述关联人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果。
  9. 根据权利要求1至8任一项所述的方法,其中,所述方法还包括:
    在所述人脸识别结果表征在所述目标人脸信息子库中匹配到与所述待识别人脸信息对应的目标人脸信息的情况下,确定与所述目标人脸信息关联的目标账户;
    基于所述目标账户进行资源转移处理。
  10. 根据权利要求1至8任一项所述的方法,其中,所述方法还包括:
    在所述人脸识别结果表征所述目标人脸信息子库中不存在与所述待识别人脸信息相匹配的目标人脸信息的情况下,向人脸识别后端发送人脸识别请求;所述人脸识别请求包括所述待识别人脸信息,以及与所述待识别对象对应的附加信息;所述附加信息用于指示所述人脸识别后端在人脸信息全量库中进行信息筛选,得到候选人脸信息;
    接收所述人脸识别后端对所述待识别人脸信息以及所述候选人脸信息的人脸信息比对结果。
  11. 一种人脸识别装置,包括:
    待识别人脸信息获取部分,被配置为在人脸识别时间节点,获取待识别对象的待识别人脸信息;
    人脸识别部分,被配置为将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果;所述目标人脸信息子库为与所述人脸识别时间节点关联的人脸信息子库;所述目标人脸信息子库中包含的人脸信息的项数小于人脸信息全量库中包含的人脸信息的项数。
  12. 根据权利要求11所述的装置,其中,所述装置还包括:第一更新部分;所述将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对之前,所述第一更新部分,被配置为基于所述人脸识别时间节点之前的人脸识别历史信息,对本地存储的历史人脸信息子库进行更新,得到所述目标人脸信息子库。
  13. 根据权利要求11或12所述的装置,其中,所述人脸识别历史信息为与所述历史人脸信息子库中各项人脸信息对应的识别成功的次数;所述第一更新部分包括:
    待删除人脸信息确定部分,被配置为基于所述历史人脸信息子库中各项人脸信息对应的识别成功的次数,确定待删除人脸信息;在所述历史人脸信息子,所述待删除人脸信息对应的识别成功的次数小于预设次数;
    删除部分,被配置为从所述历史人脸信息子库中删除所述待删除人脸信息,得到所述目标人脸信息子库。
  14. 根据权利要求11至13任一项所述装置,其中,所述第一更新部分包括:
    添加人脸信息确定部分,被配置为确定待添加人脸信息;所述待添加人脸信息为在所述人脸识别时间节点之前识别成功,且不包含在所述历史人脸信息子库中的人脸信息;
    添加部分,被配置为将所述待添加人脸信息添加到所述历史人脸信息子库中,得到所述目标人脸信息子库。
  15. 根据权利要求11至14任一项所述的装置,其中,所述装置包括:
    未存储人脸信息获取部分,被配置为获取所述人脸识别时间节点之前的目标时间段内的未存储人脸信息;所述未存储人脸信息为在所述目标时间段内识别成功,且不包含在所述历史人脸信息子库中的人脸信息;
    更新间隔确定部分,被配置为基于所述未存储人脸信息的项数,确定对所述历史人脸信息子库的更新间隔;
    第二更新部分,被配置为基于所述更新间隔对所述历史人脸信息子库进行更新,得到所述目标人脸信息子库。
  16. 根据权利要求11所述的装置,其中,所述装置还包括:预设人脸信息子库获取部分;所述将所述待识别人脸信息与本地存储的目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果之前,所述预设人脸信息子库获取部分,被配置为获取与各个预设时间节点对应的多 个预设人脸信息子库,将所述多个预设人脸信息子库存储在本地;
    所述人脸识别部分包括:
    第一确定部分,被配置为从所述多个预设人脸信息子库中,确定与所述人脸识别时间节点对应的目标人脸信息子库;
    第一比对部分,被配置为将所述待识别人脸信息与所述目标人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果。
  17. 根据权利要求11或16所述的装置,其中,所述第一确定部分包括:
    目标时间节点确定部分,被配置为从所述各个预设时间节点中确定出目标时间节点;所述目标时间节点与所述人脸识别时间节点的差值小于或者等于第一预设阈值;
    第二确定部分,被配置为将所述目标时间节点对应的预设人脸信息子库确定为所述目标人脸信息子库。
  18. 根据权利要求16或17所述的装置,其中,所述装置还包括:
    关联人脸信息子库确定部分,被配置为在所述人脸识别结果表征所述目标人脸信息子库中不存在与所述待识别人脸信息相匹配的目标人脸信息的情况下,从所述多个预设人脸信息子库中确定所述目标人脸信息子库的关联人脸信息子库;所述目标人脸信息子库对应的预设时间节点,与所述关联人脸信息子库的预设时间节点的差值小于或者等于第二预设阈值;
    第二比对部分,被配置为将所述待识别人脸信息与所述关联人脸信息子库中的人脸信息进行比对,得到对所述待识别对象的人脸识别结果。
  19. 根据权利要求11至18任一项所述的装置,其中,所述装置还包括:
    目标账户确定部分,被配置为在所述人脸识别结果表征在所述目标人脸信息子库中匹配到与所述待识别人脸信息对应的目标人脸信息的情况下,确定与所述目标人脸信息关联的目标账户;
    资源转移部分,被配置为基于所述目标账户进行资源转移处理。
  20. 根据权利要求11至18任一项所述的装置,其中,所述装置还包括:
    候选人脸信息确定部分,被配置为在所述人脸识别结果表征所述目标人脸信息子库中不存在与所述待识别人脸信息相匹配的目标人脸信息的情况下,向人脸识别后端发送人脸识别请求;所述人脸识别请求包括所述待识别人脸信息,以及与所述待识别对象对应的附加信息;所述附加信息用于指示所述人脸识别后端在人脸信息全量库中进行信息筛选,得到候选人脸信息;
    信息接收部分,被配置为接收所述人脸识别后端对所述待识别人脸信息以及所述候选人脸信息的人脸信息比对结果。
  21. 一种电子设备,包括:
    处理器;
    用于存储所述处理器可执行指令的存储器;
    其中,所述处理器被配置为执行所述指令,以实现如权利要求1至10中任一项所述的人脸识别方法。
  22. 一种计算机可读存储介质,当所述存储介质中的指令由电子设备的 处理器执行时,使得人脸识别设备能够执行如权利要求1至10中任一项所述的人脸识别方法。
  23. 一种计算机程序,包括计算机可读代码,所述计算机程序产品包括计算机程序或指令,在所述计算机程序或指令在电子设备上运行的情况下,所述电子设备执行权利要求1至10任一项所述的人脸识别方法。
  24. 一种计算机程序产品,包括计算机可读代码,存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序被计算机读取并执行时,实现执行权利要求1至10任一项所述的人脸识别方法。
PCT/CN2022/111132 2022-03-18 2022-08-09 人脸识别方法、装置、电子设备、存储介质、计算机程序及程序产品 WO2023173664A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210277436.X 2022-03-18
CN202210277436.XA CN114648798A (zh) 2022-03-18 2022-03-18 人脸识别方法、装置、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2023173664A1 true WO2023173664A1 (zh) 2023-09-21

Family

ID=81994741

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/111132 WO2023173664A1 (zh) 2022-03-18 2022-08-09 人脸识别方法、装置、电子设备、存储介质、计算机程序及程序产品

Country Status (2)

Country Link
CN (1) CN114648798A (zh)
WO (1) WO2023173664A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117726925A (zh) * 2024-02-07 2024-03-19 广州思涵信息科技有限公司 人脸识别的资源调度方法、装置及设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114648798A (zh) * 2022-03-18 2022-06-21 成都商汤科技有限公司 人脸识别方法、装置、电子设备及存储介质
CN114860750B (zh) * 2022-07-11 2022-09-20 中海银河科技(北京)有限公司 数据同步方法、装置、电子设备和计算机可读介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109064613A (zh) * 2018-09-18 2018-12-21 广州佳都数据服务有限公司 人脸识别方法及装置
US20210192191A1 (en) * 2019-04-30 2021-06-24 China Unionpay Co., Ltd. Method for deploying a face sample library and method and apparatus for business processing based on face recognition
CN113255536A (zh) * 2021-06-01 2021-08-13 浙江宇视科技有限公司 一种人脸比对的方法、装置和存储介质
CN113326810A (zh) * 2021-06-30 2021-08-31 商汤国际私人有限公司 人脸识别方法、系统、装置、电子设备及存储介质
CN114648798A (zh) * 2022-03-18 2022-06-21 成都商汤科技有限公司 人脸识别方法、装置、电子设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109064613A (zh) * 2018-09-18 2018-12-21 广州佳都数据服务有限公司 人脸识别方法及装置
US20210192191A1 (en) * 2019-04-30 2021-06-24 China Unionpay Co., Ltd. Method for deploying a face sample library and method and apparatus for business processing based on face recognition
CN113255536A (zh) * 2021-06-01 2021-08-13 浙江宇视科技有限公司 一种人脸比对的方法、装置和存储介质
CN113326810A (zh) * 2021-06-30 2021-08-31 商汤国际私人有限公司 人脸识别方法、系统、装置、电子设备及存储介质
CN114648798A (zh) * 2022-03-18 2022-06-21 成都商汤科技有限公司 人脸识别方法、装置、电子设备及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117726925A (zh) * 2024-02-07 2024-03-19 广州思涵信息科技有限公司 人脸识别的资源调度方法、装置及设备

Also Published As

Publication number Publication date
CN114648798A (zh) 2022-06-21

Similar Documents

Publication Publication Date Title
WO2023173664A1 (zh) 人脸识别方法、装置、电子设备、存储介质、计算机程序及程序产品
US11526799B2 (en) Identification and application of hyperparameters for machine learning
US11310559B2 (en) Method and apparatus for recommending video
CN109361628B (zh) 报文组装方法、装置、计算机设备和存储介质
US20200259895A1 (en) Maintenance of a persistent master identifier for clusters of user identifiers across a plurality of devices
US11586687B2 (en) Apparatus, method and computer program for cloud scraping using pre-scraped big data
JP2018508892A (ja) 装置指紋をインターネット装置に割り当てるための方法及び機器
US11018860B2 (en) Highly available and reliable secret distribution infrastructure
CN112423281B (zh) 无线模组升级方法、装置、计算机设备和存储介质
US20230008170A1 (en) Methods and systems for verifying an identity of a user through contextual knowledge-based authentication
CN110633413A (zh) 标签推荐方法、装置、计算机设备和存储介质
CN111737564A (zh) 一种信息查询方法、装置、设备及介质
CN111324786A (zh) 咨询问题信息的处理方法和装置
US20230030729A1 (en) Method and apparatus for displaying page
CN115840964A (zh) 数据处理方法、装置、电子设备及计算机存储介质
CN110677506B (zh) 网络访问方法、装置、计算机设备及存储介质
CN114691617A (zh) 一种智能终端数据压缩防冗余交互方法、装置及相关组件
WO2023173661A1 (zh) 人脸识别方法及装置、电子设备、存储介质、计算机程序、计算机程序产品
US20240095498A1 (en) Systems using hash keys to preserve privacy across multiple tasks
US20210334597A1 (en) Confident peak-aware response time estimation by exploiting telemetry data from different system configurations
CN109785867B (zh) 双录流程配置方法、装置、计算机设备和存储介质
CN115756821A (zh) 在线任务处理模型训练、任务处理方法及装置
WO2020134990A1 (zh) 产品信息的查询方法、装置、计算机设备及存储介质
CN112256654A (zh) 一种文档共享方法及装置
CN111753203A (zh) 一种卡号推荐方法、装置、设备和介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22931686

Country of ref document: EP

Kind code of ref document: A1