A method, device and readable medium for smooth upgrading of face recognition algorithm

By establishing a fixed unique relationship and dynamic correspondence relationship of the face recognition algorithm in the face recognition system, the smooth upgrade of the face recognition algorithm is achieved, the service interruption problem caused by incompatibility of the previous and subsequent algorithm versions is solved, and data security and upgrade speed are improved.

CN115098125BActive Publication Date: 2025-03-25RECONOVA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210621093.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-02
Publication Date
2025-03-25
Estimated Expiration
2042-06-02

AI Technical Summary

Technical Problem

In the face recognition system, the incompatibility of the front and rear face recognition algorithm versions leads to the need to re-extract face feature values ​​from massive face photos, resulting in too long service interruption, which may cause economic losses, and data migration involves privacy and security issues.

Method used

By establishing a fixed unique relationship and dynamic correspondence between at least two face recognition algorithms and their unique identifiers and reference identifiers, smooth upgrade of the face recognition algorithm is achieved. The specific steps include using the first algorithm to perform face recognition in the face recognition system, using the second algorithm to fill the feature values ​​in the face database, and dynamically modifying the reference identifier to apply a new algorithm.

Benefits of technology

It realizes the upgrade of the incompatible algorithm version of the face recognition system without interrupting service, protects the private data of facial information, improves data security and upgrade speed, and has the ability to quickly roll back to the old version.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115098125B_ABST
    Figure CN115098125B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and readable medium for smoothly upgrading a face recognition algorithm. By respectively establishing a fixed unique relationship between at least two face recognition algorithms and their unique identifiers and a dynamic corresponding relationship between them and their reference identifiers, the reference identifiers of the face recognition algorithms uniquely identified as a first algorithm and a second algorithm are the first identifier and the second identifier respectively; at least two face recognition algorithms are respectively used to perform face registration, and face records are constructed and stored in a face database; in the process of applying the face recognition algorithm corresponding to the first identifier to perform face recognition in the face recognition system, the face recognition algorithm corresponding to the second algorithm is used to fill the face feature value corresponding to the second algorithm in the face record of the face database; the reference identifier corresponding to the face recognition algorithm corresponding to the second algorithm is dynamically modified to the first identifier, and applied to the face recognition system for face recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of face recognition, and in particular to a method, device and readable medium for smoothly upgrading a face recognition algorithm. Background Art

[0002] In recent years, face recognition technology has been applied to various fields. As face recognition technology continues to deepen in the field of application, the face data on the face recognition platform is also increasing. Some large face recognition platforms may store tens of millions, hundreds of millions, or even more face data. In order to meet the face recognition accuracy, the face recognition algorithm is also constantly upgraded. During the face algorithm upgrade process, the face feature values ​​used by the previous and next face recognition algorithm versions are incompatible. When this happens, it is necessary to re-extract the face feature values ​​of the existing massive face photos. Re-extracting massive face feature value data is a long process. For example, it takes 25ms for a GPU to extract a face feature, and it takes about 70 hours to re-extract 10 million face features.

[0003] The current face algorithm upgrade method usually adopts an offline upgrade method. The offline upgrade method requires the face recognition platform to stop providing face registration services to the outside world, and then re-extract features from the face images already on the face platform. After the feature extraction is completed, the face registration function is restored. This offline method is feasible when there are fewer face images stored in the platform, but after storing a large number of face images, this time is very long. Long-term service interruption may not be allowed by the business scenario and may cause economic losses. An improved solution is a combination of offline and online methods. That is, a snapshot of the face data on the face platform is exported at a certain point in time, and then the face platform continues to provide services to the outside world. The exported face data snapshot is loaded onto other offline face platforms to extract face feature values. After upgrading the feature values ​​of all face images on the snapshot, the online platform stops providing services to the outside world, updates the feature values ​​of the snapshot face images, and then upgrades the face recognition algorithm version, and extracts new face feature data from the face image data after the snapshot. This solution greatly shortens the time of face platform service interruption by upgrading the face features of the snapshot offline, but it is still necessary to stop the face platform service to upgrade the registration or deletion of face feature data after the snapshot. The disadvantage of this solution is that it requires data to be migrated to an offline environment for upgrading. However, facial images and facial feature data are sensitive data, and migration will involve privacy and security issues. Summary of the invention

[0004] In view of the technical problems mentioned above, the purpose of the embodiments of the present application is to propose a method, device and readable medium for smoothly upgrading a face recognition algorithm to solve the technical problems mentioned in the above background technology section.

[0005] In a first aspect, an embodiment of the present application provides a method for smoothly upgrading a face recognition algorithm, comprising the following steps:

[0006] S1, respectively establishing a fixed unique relationship between at least two face recognition algorithms and their unique identifiers and a dynamic corresponding relationship between their reference identifiers, wherein the reference identifiers of the face recognition algorithms whose unique identifiers are the first algorithm and the second algorithm are the first identifier and the second identifier, respectively;

[0007] S2, using at least two face recognition algorithms to perform face registration, constructing face records including unique identifiers and face feature values ​​corresponding to the face recognition algorithms, and storing them in a face database;

[0008] S3, in the process of performing face recognition in the face recognition system using the face recognition algorithm corresponding to the first identifier, using the face recognition algorithm corresponding to the second algorithm to fill in the face feature value corresponding to the second algorithm in the face record of the face database;

[0009] S4, dynamically modifying the reference identifier corresponding to the face recognition algorithm corresponding to the second algorithm to the first identifier, and applying the face recognition algorithm corresponding to the first identifier to perform face recognition in the face recognition system.

[0010] Preferably, the at least two face recognition algorithms include a first face recognition algorithm and a second face recognition algorithm, and step S1 specifically includes:

[0011] A first corresponding relationship is established between the first face recognition algorithm and the second face recognition algorithm and their unique identifiers and reference identifiers respectively. In the first corresponding relationship, the unique identifier of the first face recognition algorithm is the first algorithm, and its reference identifier is the first identifier; the unique identifier of the second face recognition algorithm is the second algorithm, and its reference identifier is the second identifier.

[0012] Preferably, the face record includes a unique identifier, face information, a face image, and a face feature value corresponding to the face recognition algorithm corresponding to the unique identifier. When the face recognition algorithm is running in the face recognition system, the face record is filled with the face feature values ​​corresponding to the face recognition algorithm.

[0013] Preferably, step S3 specifically includes:

[0014] In the process of performing face recognition in the face recognition system using the first face recognition algorithm corresponding to the first identifier, determining a face record in the face database whose face feature value corresponding to the second algorithm is empty;

[0015] The second face recognition algorithm corresponding to the second algorithm is used to extract the face feature values ​​of the face images in the face records whose face feature values ​​corresponding to the second algorithm are empty, and fill them in the face records.

[0016] Preferably, step S4 further includes: modifying the reference identifier of the first face recognition algorithm corresponding to the first algorithm to another identifier to establish a second corresponding relationship.

[0017] Preferably, after step S4, the method further includes:

[0018] When the face recognition algorithm corresponding to the first identifier cannot be run, the second corresponding relationship is modified to the first corresponding relationship, and the face recognition algorithm corresponding to the first identifier is used to perform face recognition;

[0019] When the face recognition algorithm corresponding to the first identifier is successfully run, the face recognition algorithm corresponding to the first algorithm is uninstalled, and the face feature value corresponding to the first algorithm in the face record is deleted.

[0020] Preferably, multiple face recognition algorithms have a unified face recognition algorithm interface, are deployed and loaded on the same face recognition system, and use a unified face recognition service.

[0021] In a second aspect, an embodiment of the present application provides a device for smoothly upgrading a face recognition algorithm, comprising:

[0022] A relationship establishment module is configured to respectively establish a fixed unique relationship between at least two face recognition algorithms and their unique identifiers and a dynamic corresponding relationship between their reference identifiers, wherein the reference identifiers of the face recognition algorithms whose unique identifiers are the first algorithm and the second algorithm are the first identifier and the second identifier respectively;

[0023] A face registration module is configured to use at least two face recognition algorithms to perform face registration, construct a face record including a unique identifier and a face feature value corresponding to the face recognition algorithm corresponding to the unique identifier, and store the record in a face database;

[0024] a feature filling module configured to fill in the face feature values ​​corresponding to the second algorithm in the face record of the face database with the face recognition algorithm corresponding to the second algorithm during the process of performing face recognition in the face recognition system using the face recognition algorithm corresponding to the first identifier;

[0025] The upgrade module is configured to dynamically modify the reference identifier corresponding to the face recognition algorithm corresponding to the second algorithm to the first identifier, establish a second corresponding relationship, and apply the face recognition algorithm corresponding to the first identifier to perform face recognition in the face recognition system.

[0026] In a third aspect, an embodiment of the present application provides an electronic device comprising one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement a method as described in any implementation manner in the first aspect.

[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] (1) The present invention can upgrade incompatible face recognition algorithm versions of a face recognition system with a face database of massive data without interrupting service, and will not cause economic losses due to service interruption.

[0030] (2) The present invention better protects privacy data such as facial information through online upgrades, and realizes online upgrades of face recognition algorithms, with high data security, good performance, and fast upgrade speed.

[0031] (3) The present invention fully utilizes the dynamic scaling capabilities of the cloud-native architecture to fully utilize computing resources; when there are defects in the new algorithm or the upgrade fails, it can quickly roll back to the version before the upgrade without affecting normal services. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 is an exemplary device architecture diagram to which an embodiment of the present application may be applied;

[0034] Figure 2 A schematic diagram of a flow chart of a method for smoothly upgrading a face recognition algorithm according to an embodiment of the present invention;

[0035] Figure 3 A schematic diagram of a face recognition system of a face recognition algorithm smooth upgrade method according to an embodiment of the present invention;

[0036] Figure 4 A schematic diagram of a device for smoothly upgrading a face recognition algorithm according to an embodiment of the present invention;

[0037] Figure 5It is a schematic diagram of the structure of a computer device suitable for implementing the electronic device of the embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] Figure 1 An exemplary device architecture 100 is shown to which the method for smoothly upgrading a face recognition algorithm or the device for smoothly upgrading a face recognition algorithm according to an embodiment of the present application can be applied.

[0040] like Figure 1 As shown, the device architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0041] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various applications, such as data processing applications, file processing applications, etc., can be installed on terminal devices 101, 102, 103.

[0042] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or they can be implemented as a single software or software module. No specific limitation is made here.

[0043] The server 105 may be a server that provides various services, such as a background data processing server that processes files or data uploaded by the terminal devices 101, 102, and 103. The background data processing server may process the acquired files or data and generate processing results.

[0044] It should be noted that the face recognition algorithm smooth upgrade method provided in the embodiment of the present application can be executed by the server 105, or by the terminal devices 101, 102, 103. Accordingly, the face recognition algorithm smooth upgrade device can be set in the server 105, or in the terminal devices 101, 102, 103.

[0045] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided as required. In the case where the processed data does not need to be obtained remotely, the above device architecture may not include a network, but only a server or a terminal device.

[0046] Figure 2 A method for smoothly upgrading a face recognition algorithm provided by an embodiment of the present application is shown, comprising the following steps:

[0047] S1, respectively establish a fixed unique relationship between at least two face recognition algorithms and their unique identifiers and a dynamic corresponding relationship between them and their referential identifiers, wherein the referential identifiers of the face recognition algorithms whose unique identifiers are the first algorithm and the second algorithm are the first identifier and the second identifier respectively.

[0048] In a specific embodiment, the at least two face recognition algorithms include a first face recognition algorithm and a second face recognition algorithm, and step S1 specifically includes:

[0049] A first corresponding relationship is established between the first face recognition algorithm and the second face recognition algorithm and their unique identifiers and reference identifiers respectively. In the first corresponding relationship, the unique identifier of the first face recognition algorithm is the first algorithm, and its reference identifier is the first identifier; the unique identifier of the second face recognition algorithm is the second algorithm, and its reference identifier is the second identifier.

[0050] Specifically, the embodiments of the present application are based on a face recognition system, which provides face registration, 1:N face matching and other service functions. Among them, face registration is to use a face recognition algorithm in the face recognition system to extract face feature values ​​from face images submitted by the application system / face recognition device, and store the face information and face photos, face feature values, and the unique identifier of the face recognition algorithm corresponding to the face feature values ​​as face records in the face database. A face record can contain face feature values ​​of multiple different face recognition algorithms. 1:N face matching is to extract face feature values ​​of face images submitted by the application system / face recognition device through a face recognition algorithm in the face recognition system, compare them with the face feature values ​​stored in the face database, calculate the similarity value, and return the face information whose similarity value exceeds the comparison threshold.

[0051] refer to Figure 3,The face recognition system defines a unified face recognition algorithm interface and a unified face recognition service interface.

[0052] The unified face recognition algorithm interface includes interfaces such as face detection, face feature extraction, and face feature comparison. The face recognition system loads and runs different face recognition algorithms that are adapted to the unified face recognition algorithm interface. The face recognition system assigns a unique identifier and a reference identifier to each loaded face recognition algorithm.

[0053] The unified face recognition service includes interfaces such as face registration, face update, face deletion, and 1:N face recognition. Application systems / face recognition devices use face recognition services through the unified face recognition service interface. Application systems / face recognition devices can use the corresponding face recognition algorithm to provide face recognition services by specifying a reference identifier.

[0054] Among them, the unique identifier is a fixed and unique identifier of the face recognition algorithm on the face recognition system. When registering a face, the unique identifier is used to record the face feature value. Therefore, when the face recognition algorithm is loaded in the face recognition system, the unique identifier is determined and cannot be changed. The reference identifier is the identifier that the face recognition algorithm dynamically corresponds to on the face recognition system. One reference identifier corresponds to one face recognition algorithm, and one face recognition algorithm can correspond to multiple reference identifiers. The reference identifier of the face recognition algorithm can be dynamically modified at runtime. The application system / face recognition device refers to a third-party application system or face recognition device that uses the face recognition service provided by the face recognition system to implement the face recognition function.

[0055] Specifically, the first face recognition algorithm is loaded in the face recognition system as the current version of the face recognition algorithm, the unique identifier of the first face recognition algorithm is the first algorithm X1.0, and the reference identifier is the first identifier X. The second face recognition algorithm is used as the new version of the face recognition algorithm, the new version of the face recognition algorithm implements the unified face recognition algorithm interface, the second face recognition algorithm is deployed and loaded on the face recognition system, and the unique identifier of the second face recognition algorithm is defined as the second algorithm X2.0, and the reference identifier is the second identifier XA2.0.

[0056] S2, using at least two face recognition algorithms to perform face registration respectively, constructing face records respectively including unique identifiers and face feature values ​​corresponding to the face recognition algorithms corresponding to them, and storing them in a face database.

[0057] In a specific embodiment, the face record includes a unique identifier, face information, a face image, and a face feature value corresponding to the face recognition algorithm corresponding to the unique identifier. When the face recognition algorithm is running in the face recognition system, the face record is filled with the face feature value corresponding to the face recognition algorithm.

[0058] Specifically, the application system / face recognition device uses a unified face recognition service to register a face. When registering a face, a face record is constructed with face information, face image, and the first algorithm X1.0 and the second algorithm X2.0 as the face feature values ​​corresponding to the field names, and saved in the face database. After the face feature values ​​are extracted using the first face recognition algorithm corresponding to the first algorithm X1.0 and the second face recognition algorithm X2.0 corresponding to the second algorithm X2.0 in the face recognition system, the face record has the face feature values ​​corresponding to the two face recognition algorithms. When the face recognition algorithm is running in the face recognition system, the face record is filled with the face feature values ​​corresponding to the face recognition algorithm. When the face recognition algorithm is not running in the face recognition system, the face feature values ​​corresponding to the face recognition algorithm in the face record are empty.

[0059] S3, in the process of performing face recognition in the face recognition system using the face recognition algorithm corresponding to the first identifier, using the face recognition algorithm corresponding to the second algorithm to fill in the face feature values ​​corresponding to the second algorithm in the face records of the face database.

[0060] In a specific embodiment, step S3 specifically includes:

[0061] In the process of performing face recognition in the face recognition system using the first face recognition algorithm corresponding to the first identifier, determining a face record in the face database whose face feature value corresponding to the second algorithm is empty;

[0062] The second face recognition algorithm corresponding to the second algorithm is used to extract the face feature values ​​of the face images in the face records whose face feature values ​​corresponding to the second algorithm are empty, and fill them in the face records.

[0063] Specifically, the application system / face recognition device uses the face recognition algorithm corresponding to the first identifier X to perform a 1:N face recognition operation, and the first identifier X corresponds to the first face recognition algorithm uniquely identified as the first algorithm X1.0. In the face recognition system, the first face recognition algorithm uniquely identified as the first algorithm X1.0 is used to extract face feature values, and the face feature values ​​corresponding to the first algorithm X1.0 field in the face database are compared 1:N to calculate similarity values, and then face information and face images whose similarity values ​​meet the threshold are returned to the application system / face recognition device. There are face feature values ​​corresponding to the first algorithm X1.0 field in the face database, but these face feature values ​​cannot correspond to the second algorithm X2.0 field. Since the second face recognition algorithm corresponding to the second algorithm X2.0 has never been used in the face recognition system, the face feature values ​​corresponding to the second algorithm X2.0 field in the face record in the face database are empty. When the second face recognition algorithm corresponding to the second algorithm X2.0 field is to be used for face recognition, the face record in the face database is filled with the face feature value corresponding to the second algorithm X2.0 field, so as to achieve the filling of the face feature value corresponding to the second algorithm X2.0 field in the face record in the face database while performing a 1:N face recognition operation using the face recognition algorithm corresponding to the first identifier X, without causing a pause in the face recognition process, and achieving a smooth upgrade of the face recognition algorithm.

[0064] Specifically, the face recognition system fills the face feature values ​​of the second face recognition algorithm corresponding to the second algorithm X2.0. First, all face records in the face database whose face feature values ​​corresponding to the second algorithm X2.0 are empty are obtained, and then the face recognition system uses the second face recognition algorithm corresponding to the second algorithm X2.0 to extract face feature values ​​from the face images in the face records, and stores them in the face feature values ​​corresponding to the second algorithm X2.0 in the face records, so as to complete the filling of the face feature values ​​corresponding to the second face recognition algorithm corresponding to the second algorithm X2.0.

[0065] S4, dynamically modifying the reference identifier corresponding to the face recognition algorithm corresponding to the second algorithm to the first identifier, and applying the face recognition algorithm corresponding to the first identifier to perform face recognition in the face recognition system.

[0066] In a specific embodiment, step S4 specifically includes: modifying the reference identifier of the second face recognition algorithm corresponding to the second algorithm to the first identifier, and modifying the reference identifier of the first face recognition algorithm corresponding to the first algorithm to other identifiers, and establishing a second corresponding relationship.

[0067] Specifically, in the second corresponding relationship, the reference identifier of the second face recognition algorithm is the second identifier, and the reference identifier of the first face recognition algorithm is the other identifier. When the facial feature value filling corresponding to the second face recognition algorithm corresponding to the second algorithm X2.0 is completed, the reference identifier of the first face recognition algorithm corresponding to the first algorithm X1.0 is changed to XA1.0, and the reference identifier of the second face recognition algorithm corresponding to the first algorithm X2.0 is changed to the first identifier X, and the face recognition algorithm upgrade is completed. The application system / face recognition device uses the face recognition algorithm with the reference identifier of the first identifier X to perform a 1:N face recognition operation. After the reference identifier is modified, the reference identifier is the second face recognition algorithm corresponding to the second algorithm X2.0, and the face recognition system uses the second face recognition algorithm corresponding to the second algorithm X2.0 to extract face feature values, and performs a 1:N comparison with the face feature values ​​corresponding to the second algorithm X2.0 in the face database, calculates the similarity value, and then returns the face information and face image whose similarity value meets the threshold to the application system / face recognition device, thereby completing a smooth upgrade from the first face recognition algorithm corresponding to the first algorithm X1.0 to the second face recognition algorithm corresponding to the second algorithm X2.0.

[0068] In a specific embodiment, step S4 further includes:

[0069] When the face recognition algorithm corresponding to the first identifier cannot be run, the second corresponding relationship is modified to the first corresponding relationship, and the face recognition algorithm corresponding to the first identifier is used to perform face recognition;

[0070] When the face recognition algorithm corresponding to the first identifier is successfully run, the face recognition algorithm corresponding to the first algorithm is uninstalled, and the face feature value corresponding to the first algorithm in the face record is deleted.

[0071] In a specific embodiment, multiple face recognition algorithms have a unified face recognition algorithm interface, are deployed and loaded on the same face recognition system, and use a unified face recognition service.

[0072] Specifically, if the second face recognition algorithm corresponding to the second algorithm X2.0 encounters a problem during operation and needs to fall back to the first face recognition algorithm corresponding to the first algorithm X1.0, the algorithm version can be rolled back by changing the reference identifier of the second face recognition algorithm corresponding to the second algorithm X2.0 to the second identifier XA2.0, and changing the reference identifier of the first face recognition algorithm corresponding to the first algorithm X1.0 to the first identifier X. If the face recognition algorithm is upgraded successfully, the face recognition system uninstalls the first face recognition algorithm corresponding to the first algorithm X1.0, cleans up the face feature values ​​in the second database, and deletes the face feature values ​​corresponding to the first algorithm X1.0 in all face records. The present invention can support version upgrades of incompatible face recognition algorithms for massive face data features.

[0073] Further references Figure 4 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a device for smoothly upgrading a face recognition algorithm. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0074] The embodiment of the present application provides a device for smoothly upgrading a face recognition algorithm, comprising:

[0075] A relationship establishing module 1 is configured to respectively establish a fixed unique relationship between at least two face recognition algorithms and their unique identifiers and a dynamic corresponding relationship between their reference identifiers, wherein the reference identifiers of the face recognition algorithms whose unique identifiers are the first algorithm and the second algorithm are the first identifier and the second identifier respectively;

[0076] The face registration module 2 is configured to use at least two face recognition algorithms to perform face registration, construct a face record including a unique identifier and a face feature value corresponding to the face recognition algorithm corresponding to the unique identifier, and store the record in the face database;

[0077] The feature filling module 3 is configured to fill the face feature value corresponding to the second algorithm in the face record of the face database with the face recognition algorithm corresponding to the second algorithm during the process of performing face recognition in the face recognition system using the face recognition algorithm corresponding to the first identifier;

[0078] The upgrade module 4 is configured to dynamically modify the reference identifier corresponding to the face recognition algorithm corresponding to the second algorithm to the first identifier, and apply the face recognition algorithm corresponding to the first identifier to perform face recognition in the face recognition system.

[0079] The technical solution of the present application is further explained below through specific embodiments.

[0080] Example

[0081] In this embodiment, the face recognition system can be a WEB system with a B / S architecture implemented in a language such as Java, which provides a unified face recognition service interface. The unified face recognition service interface can be a RESTFul service or a client SDK. The face recognition system dynamically loads the face recognition algorithm package and uses the face recognition algorithm function through the unified face recognition algorithm interface. In this embodiment, java can be used to define the interface jar package, and different face recognition algorithms or different face recognition algorithm versions implement the interface in the jar package. The face recognition system dynamically loads and initializes the face recognition algorithm object according to the system configuration class name through the reflection mechanism of java. The face recognition system can be a process instance that loads all face recognition algorithms; or it can be a process instance that only loads one face recognition algorithm. Multiple process instances that load different face recognition algorithms constitute the face recognition algorithm cluster. In a cloud environment, the scalability of cloud computing can be used to provide independent computing resources for the new version of the algorithm process instance when the algorithm is upgraded. After the algorithm upgrade is completed, the computing resources used by the old version of the algorithm process instance are recovered. The isolation of computing resources ensures that the new version of the face recognition algorithm will not affect the services provided by the old version of the face algorithm when executing the face feature value filling service.

[0082] The embodiment of the present application provides a method for smoothly upgrading a face recognition algorithm, comprising the following steps:

[0083] 1. The new version of the face recognition algorithm implements a unified face recognition algorithm interface and is compiled into a jar package.

[0084] 2. Upload the jar package of the face recognition algorithm through the face recognition system management interface, fill in the unique identifier of the face recognition algorithm, load the face algorithm class name and other information, and upgrade the face recognition algorithm version.

[0085] 3. The face recognition algorithm platform can rely on cloud platform technology to deploy application instances for the new version of the face recognition algorithm. Cloud platform technology can include cloud native technologies such as kubernetes and docker.

[0086] 4. The new version of the face recognition algorithm deployment instance uses the Java reflection mechanism to load the new version of the face recognition algorithm using the configured algorithm class name, and uses the configured version number to define the unique identifier X2.0 and reference identifier XA2.0 of the new version of the face recognition algorithm.

[0087] 5. The application system / face recognition device uses a unified face recognition service to register faces. The face recognition system routes the requests to the current version algorithm cluster and the new version algorithm cluster to extract facial feature values. Based on the service governance function in the cloud-native architecture, it can dynamically discover application instances of the face recognition algorithm.

[0088] 6. The face recognition system uses the unique identifier of the face recognition algorithm as a field to store face feature values ​​and face information, and saves face images as face records in the face database. The face database can choose hbase, cassandra, nosql and other databases. The characteristics of nosql data column storage can dynamically expand the storage field to store the face feature values ​​of the new version of the face recognition algorithm.

[0089] 7. The application system / face recognition device uses RESTFul service or client SDK to perform 1:N face recognition operations.

[0090] 8. The face recognition system routes the 1:N face recognition request to the face recognition algorithm cluster whose reference identifier is the first identifier X. At this time, the first identifier X corresponds to the current version of the face recognition algorithm

[0091] 9. The face recognition system starts the new version face recognition algorithm feature value filling service, queries all face records in the face database whose face feature values ​​of the new version face recognition algorithm are empty, uses the new version face recognition algorithm to extract face feature values ​​from the face images in the face records, and adds X2.0 as the field name to the face records, and stores them in the face database. Distributed tasks can be used to divide face records into different regional segments and assign them to application instances that have deployed the upgraded face recognition algorithm for face feature extraction.

[0092] 10. When the facial feature value filling service corresponding to the new version of the face recognition algorithm is executed, the face recognition system will change the reference identifier of the current face recognition algorithm from X to XA1.0, and change the reference identifier of the new version of the face recognition algorithm to X, completing the face recognition algorithm upgrade.

[0093] 11. The application system / face recognition device uses RESTFul service or client SDK to perform 1:N face recognition operations.

[0094] 12. The face recognition system routes the 1:N face recognition request to the face recognition algorithm cluster with reference identifier X. At this time, the reference identifier X corresponds to the new version of the face recognition algorithm.

[0095] 13. After the face recognition algorithm is successfully upgraded, uninstall the old version of the face recognition algorithm through the system management page. Start the face feature cleaning service and delete the face feature values ​​corresponding to the old version of the face recognition algorithm in all face records.

[0096] Reference below Figure 5 , which shows an electronic device (eg Figure 1A schematic diagram of the structure of a computer device 500 (a server or terminal device as shown). Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0097] like Figure 5 As shown, the computer device 500 includes a central processing unit (CPU) 501 and a graphics processing unit (GPU) 502, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 503 or the program loaded from the storage part 509 to the random access memory (RAM) 504. In the RAM 504, various programs and data required for the operation of the device 500 are also stored. The CPU 501, GPU 502, ROM 503 and RAM 504 are connected to each other through a bus 505. An input / output (I / O) interface 506 is also connected to the bus 505.

[0098] The following components are connected to the I / O interface 506: an input section 507 including a keyboard, a mouse, etc.; an output section 508 including a display such as a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 509 including a hard disk, etc.; and a communication section 510 including a network interface card such as a LAN card, a modem, etc. The communication section 510 performs communication processing via a network such as the Internet. A drive 511 can also be connected to the I / O interface 506 as needed. A removable medium 512, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 511 as needed, so that a computer program read therefrom is installed into the storage section 509 as needed.

[0099] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 510, and / or installed from a removable medium 512. When the computer program is executed by a central processing unit (CPU) 501 and a graphics processing unit (GPU) 502, the above-mentioned functions defined in the method of the present application are executed.

[0100] It should be noted that the computer-readable medium described in the present application may be a computer-readable signal medium or a computer-readable medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, device or component, or any combination of the above. More specific examples of computer-readable media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution device, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable medium that can send, propagate or transmit a program for use by or in conjunction with an instruction execution device, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0101] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0102] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the device, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based device that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0103] The modules involved in the embodiments described in this application may be implemented by software or hardware, and the modules described may also be set in a processor.

[0104] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or it may exist independently and not be assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the electronic device, the electronic device: respectively establishes a fixed unique relationship between at least two face recognition algorithms and their unique identifiers and a dynamic corresponding relationship between their reference identifiers, wherein the reference identifiers of the face recognition algorithms uniquely identified as the first algorithm and the second algorithm are the first identifier and the second identifier respectively; respectively uses at least two face recognition algorithms to perform face registration, constructs face records respectively containing unique identifiers and face feature values ​​corresponding to the face recognition algorithms corresponding to the corresponding face recognition algorithms, and stores them in a face database; in the process of applying the face recognition algorithm corresponding to the first identifier to perform face recognition in the face recognition system, the face recognition algorithm corresponding to the second algorithm is used to fill the face feature values ​​corresponding to the second algorithm in the face record of the face database; dynamically modifies the reference identifier corresponding to the face recognition algorithm corresponding to the second algorithm to the first identifier, and applies the face recognition algorithm corresponding to the first identifier to perform face recognition in the face recognition system.

[0105] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A method for smoothly upgrading a face recognition algorithm, characterized in that: The following steps are involved: S1, respectively establishing a fixed unique relationship between at least two face recognition algorithms and their unique identifiers and a dynamic corresponding relationship between them and their reference identifiers, wherein the unique identifier is a fixed and unique identifier of the face recognition algorithm on the face recognition system, and the reference identifier is an identifier dynamically corresponding to the face recognition algorithm on the face recognition system, which can be dynamically modified at runtime, wherein the reference identifiers of the face recognition algorithms whose unique identifiers are the first algorithm and the second algorithm are the first identifier and the second identifier, respectively; S2, using at least two face recognition algorithms to perform face registration, constructing face records including unique identifiers and face feature values ​​extracted by the corresponding face recognition algorithms, and storing them in a face database; S3, in the process of performing face recognition in the face recognition system by using the face recognition algorithm corresponding to the first identifier, using the face recognition algorithm corresponding to the second algorithm to fill in the face feature value corresponding to the second algorithm in the face record of the face database; S4, dynamically modifying the reference identifier corresponding to the face recognition algorithm corresponding to the second algorithm to the first identifier, and applying the face recognition algorithm corresponding to the first identifier to perform face recognition in the face recognition system.

2. The method for smoothly upgrading the face recognition algorithm according to claim 1, characterized in that: The at least two face recognition algorithms include a first face recognition algorithm and a second face recognition algorithm, and the step S1 specifically includes: A first correspondence is established between the first face recognition algorithm and the second face recognition algorithm and their unique identifiers and reference identifiers respectively. In the first correspondence, the unique identifier of the first face recognition algorithm is the first algorithm, and its reference identifier is the first identifier; the unique identifier of the second face recognition algorithm is the second algorithm, and its reference identifier is the second identifier.

3. The method for smoothly upgrading the face recognition algorithm according to claim 1, characterized in that: The face record includes a unique identifier, face information, a face image, and a face feature value corresponding to the face recognition algorithm corresponding to the unique identifier; when the face recognition algorithm is running in the face recognition system, the face record is filled with the face feature value corresponding to the face recognition algorithm.

4. The method for smoothly upgrading the face recognition algorithm according to claim 3, characterized in that: The step S3 specifically includes: In the process of performing face recognition in a face recognition system using the first face recognition algorithm corresponding to the first identifier, determining a face record in the face database whose face feature value corresponding to the second algorithm is empty; The second face recognition algorithm corresponding to the second algorithm is used to extract the face feature values ​​of the face images in the face record whose face feature values ​​corresponding to the second algorithm are empty, and fill them in the face record.

5. The method for smoothly upgrading the face recognition algorithm according to claim 2, characterized in that: The step S4 also includes: modifying the reference identifier of the first face recognition algorithm corresponding to the first algorithm to another identifier to establish a second corresponding relationship.

6. The method for smoothly upgrading the face recognition algorithm according to claim 5, characterized in that: After step S4, the following steps are also included: When the face recognition algorithm corresponding to the first identifier cannot be run, modifying the second corresponding relationship to the first corresponding relationship, and using the face recognition algorithm corresponding to the first identifier to perform face recognition; When the face recognition algorithm corresponding to the first identifier runs successfully, the face recognition algorithm corresponding to the first algorithm is uninstalled, and the face feature value corresponding to the first algorithm in the face record is deleted.

7. The method for smoothly upgrading a face recognition algorithm according to any one of claims 1 to 6, characterized in that: The at least two face recognition algorithms have a unified face recognition algorithm interface, are deployed and loaded on the same face recognition system, and use a unified face recognition service.

8. A face recognition algorithm smooth upgrade device, characterized in that: include: A relationship establishment module is configured to respectively establish a fixed unique relationship between at least two face recognition algorithms and their unique identifiers and a dynamic corresponding relationship between them and their reference identifiers, wherein the unique identifier is a fixed and unique identifier of the face recognition algorithm on the face recognition system, and the reference identifier is an identifier dynamically corresponding to the face recognition algorithm on the face recognition system, which can be dynamically modified at runtime, wherein the reference identifiers of the face recognition algorithms whose unique identifiers are the first algorithm and the second algorithm are the first identifier and the second identifier respectively; A face registration module is configured to perform face registration using at least two face recognition algorithms respectively, obtain face records respectively including unique identifiers and face feature values ​​extracted by the corresponding face recognition algorithms, and store them in a face database; a feature filling module configured to fill in the face feature values ​​corresponding to the second algorithm in the face record of the face database with the face recognition algorithm corresponding to the second algorithm during the process of performing face recognition in the face recognition system using the face recognition algorithm corresponding to the first identifier; The upgrade module is configured to dynamically modify the reference identifier corresponding to the face recognition algorithm corresponding to the second algorithm to the first identifier, and apply the face recognition algorithm corresponding to the first identifier to perform face recognition in the face recognition system.

9. An electronic device, comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Face image processing method and device and storage medium

    CN110059652A

  • Picture recognition method and device and picture comparison method and device

    CN110569765A