A method and system for accelerating face detection and recognition of terminal equipment

The distributed acceleration service bus distributes face recognition tasks to multiple terminals for parallel processing, which solves the problem of long face recognition processing time in the existing technology, realizes the acceleration of face registration and retrieval, and reduces the cost and complexity. Server load.

CN114419717BActive Publication Date: 2024-09-06RINGSLINK XIAMEN NETWORK COMM TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210098166.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-27
Publication Date
2024-09-06
Estimated Expiration
2042-01-27

Smart Images

  • Figure CN114419717B
    Figure CN114419717B
Patent Text Reader

Abstract

The present invention discloses a method and system for accelerating face detection and recognition of terminal equipment, and relates to the field of face recognition technology, which includes connecting several face recognition terminals to a main server and a distributed acceleration business logic microserver through a distributed acceleration service bus; the main server determines whether to start the distributed acceleration mechanism according to a preset strategy; the main server issues a batch of face recognition tasks; the distributed acceleration business logic microserver divides the batch of face recognition tasks into at least two parts, and distributes them to several designated face recognition terminals; after the task is completed, it is uploaded to the server via the distributed acceleration service bus. The distributed face recognition and registration acceleration mechanism provided by the present invention can effectively reduce the total face registration time in the registration scenario, and the more devices there are, the shorter the registration time; in the retrieval scenario, idle devices can be used for retrieval acceleration, and the retrieval speed can be improved in collaboration with the main server, reducing the requirements for the main server.
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 technology, and more specifically to a face detection and recognition acceleration method and system for a terminal device. Background Art

[0002] Existing face recognition devices will face the situation of batch processing face recognition tasks, and will have the defect of too long processing time. Taking the existing face recognition registration as an example, its process usually includes: downloading photos, face detection, face recognition, data storage, etc. In the LAN scenario, the pure CPU operation process takes between 1S and 2S; face recognition is to extract the feature value of the face through the neural network algorithm. Taking the device equipped with a quad-core Cortex-A17 1.8G ARM CPU as an example, it takes more than 250ms to recognize a face. If 10,000 faces are sent in batches at one time, it will take up to 5 hours. Summary of the invention

[0003] The present invention provides a method and system for accelerating face detection and recognition of a terminal device, aiming to solve the above-mentioned problems existing in the prior art.

[0004] The present invention adopts the following technical solution:

[0005] A method for accelerating face detection and recognition of a terminal device comprises the following steps:

[0006] (1) Connect several face recognition terminals to the main server through the network, and connect the main server and the distributed acceleration business logic micro server through the distributed acceleration service bus;

[0007] (2) After receiving the batch of face recognition tasks, the main server determines whether to start the distributed acceleration mechanism according to the preset strategy;

[0008] (3) After the distributed acceleration mechanism is started, the main server sends the batch of face recognition tasks to the distributed acceleration service bus; the distributed acceleration business logic micro server divides the batch of face recognition tasks into at least two parts and distributes them to several designated face recognition terminals;

[0009] (4) The face recognition terminals complete their respective received face recognition tasks and upload the results to the server via the distributed acceleration service bus.

[0010] Furthermore, after the main server is started, the running status of the distributed acceleration business logic micro server is queried through the distributed acceleration service bus.

[0011] Furthermore, the preset strategy is: if the estimated time required for the main server to complete the batch face recognition task exceeds a preset time threshold, the distributed acceleration mechanism is started.

[0012] Furthermore, the face recognition task is to extract face feature values ​​from photos used for user face recognition registration, or to retrieve photos from videos and extract face feature values ​​from them.

[0013] Furthermore, the face recognition task is to retrieve photos from the video and extract facial feature values ​​from them. Before step (2), the main server calls the face detection algorithm to select the face range in the video to form several face image files containing only one face; in step (2), the main server sends the addresses of multiple face image files to the acceleration server bus, and the distributed acceleration business logic server distributes them to the designated face recognition terminal according to the load situation.

[0014] Furthermore, in step (4), the face recognition terminal extracts face feature values ​​from the corresponding face image file.

[0015] Furthermore, after the facial feature values ​​are extracted, the facial recognition terminal searches and compares the facial feature values.

[0016] A face detection and recognition acceleration system for terminal equipment comprises a plurality of face recognition terminals, a main server and a distributed acceleration business logic microserver which are interconnected through a distributed acceleration service bus; the main server is used to receive, process and delegate face recognition tasks, and is also used to set a preset strategy, and start a distributed acceleration mechanism according to the preset strategy; the distributed acceleration business logic microserver is used to divide the batch face recognition tasks issued by the main server into at least two parts, and distribute them to a plurality of designated face recognition terminals; the face recognition terminal is used to receive and process the face recognition terminal, and upload the result to the main server via the distributed acceleration service bus.

[0017] From the above description of the structure of the present invention, it can be seen that the present invention has the following advantages:

[0018] First, the distributed face recognition and registration acceleration mechanism provided by the present invention can effectively reduce the total face registration time in the registration scenario. The more devices there are, the shorter the registration time. In the retrieval scenario, idle devices can be used to accelerate the retrieval, and the retrieval speed can be improved in collaboration with the main server, reducing the requirements for the main server.

[0019] Secondly, the distributed face recognition and registration acceleration mechanism provided by the present invention reduces the purchase cost investment of the main server while keeping the number of devices unchanged, reduces the overall cost of the project, creates bidding advantages for enterprises, and reduces costs for users. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is a structural diagram of the face detection and recognition acceleration system of the terminal device in the present invention. DETAILED DESCRIPTION

[0021] The specific embodiments of the present invention will be described below with reference to the accompanying drawings.

[0022] like Figure 1 As shown, a face detection and recognition acceleration system for terminal devices includes a plurality of face recognition terminals 1, a distributed acceleration service bus 2, a main server 3 and a distributed acceleration business logic micro server 4. The plurality of face recognition terminals 1 are connected to the main server 3 through network communication, and the face recognition terminals 1, the main server 3 and the distributed acceleration business logic micro server 4 are connected to each other through the distributed acceleration service bus 2.

[0023] The main server 3 can be a cloud virtual host or a local physical host, and is mainly used to receive, process, delegate and store face recognition tasks, and is responsible for the basic logic of face recognition services, such as sending registration information, sending face feature extraction information, etc. In addition, the main server 3 is also used to set preset strategies and start the distributed acceleration mechanism according to the preset strategies.

[0024] The distributed acceleration business logic microserver 4 is an independent system component, which can be on the same physical component as the main server 3, or on a different physical host from the main server 3, so as to facilitate horizontal expansion. The distributed acceleration business logic microserver 4 is mainly used to divide the batch face recognition tasks issued by the main server 3 into at least two parts, and distribute them to several designated face recognition terminals 1. Specifically, it is responsible for managing the face recognition terminals 1 that have been registered on the distributed acceleration service bus 2, and is responsible for sending the distributed task of face feature value extraction information to the face recognition terminal 1, receiving the results from the face recognition terminal device 1, and feeding back to the main server 3 through the bus message.

[0025] The face recognition terminal 1 is connected to the server through the network and registers the terminal information to the distributed acceleration service bus 2. It is used to receive and process the face recognition terminal 1, and upload the result to the main server 3 via the distributed acceleration service bus 2. If the system turns on the distributed acceleration function, the distributed acceleration terminal information is sent to the distributed acceleration service bus 2 and the feature value extraction service is subscribed.

[0026] A method for accelerating face detection and recognition of a terminal device comprises the following steps:

[0027] (1) Connect several face recognition terminals 1 to the main server 3 through the network, and connect the main server 3 and the distributed acceleration business logic micro server 4 through the distributed acceleration service bus 2.

[0028] (2) After receiving the batch face recognition tasks, the main server 3 determines whether to start the distributed acceleration mechanism according to the preset strategy. Preferably, after the main server 3 is started, the running status of the distributed acceleration business logic micro server 4 is queried through the distributed acceleration service bus 2.

[0029] (3) After the distributed acceleration mechanism is started, the main server 3 sends the batch of face recognition tasks to the distributed acceleration service bus 2; the distributed acceleration business logic micro server 4 divides the batch of face recognition tasks into at least two parts and distributes them to several designated face recognition terminals 1.

[0030] (4) The face recognition terminals 1 complete the face recognition tasks they receive and upload the results to the server via the distributed acceleration service bus 2.

[0031] Preferably, the preset strategy is: if the estimated time required for the main server 3 to complete the batch face recognition task exceeds the preset time threshold, the distributed acceleration mechanism is started. For example, if the estimated time required for the main server 3 to complete the batch face recognition task exceeds the preset time threshold of 10 minutes, the distributed acceleration mechanism is started.

[0032] Embodiment 1

[0033] Take extracting facial recognition features from batch photos for batch facial recognition registration as an example

[0034] A method for accelerating face detection and recognition of a terminal device comprises the following steps:

[0035] (1) Connect several face recognition terminals 1 to the main server 3 through the network, register the terminal information to the distributed acceleration service bus 2, and connect the main server 3 and the distributed acceleration business logic micro server 4 through the distributed acceleration service bus 2. When the system starts the distributed acceleration mechanism, the terminal information is sent to the bus and the characteristic face feature extraction service is subscribed.

[0036] (2) After the main server 3 is started, the running status of the distributed acceleration business logic micro server 4 is queried through the distributed acceleration service bus 2.

[0037] (3) When the main server 3 receives a batch of user photos for face recognition registration, it estimates the time required to complete the batch task. If the time exceeds the preset time threshold, the distributed acceleration mechanism is activated.

[0038] (4) After the distributed acceleration mechanism is started, the main server 3 sends a batch of face recognition tasks to the distributed acceleration service bus 2. The face recognition task mainly includes registration information and face feature extraction information.

[0039] (5) The distributed acceleration business logic microserver 4 queries the working status of each face recognition terminal 1 through the distributed acceleration service bus 2.

[0040] (6) The distributed acceleration business logic microserver 4 divides the batch face recognition tasks into at least two parts and distributes them to a number of designated face recognition terminals 1 that are in idle state, thereby constructing a distributed acceleration task and sending it to the distributed acceleration service bus 2.

[0041] (7) Several designated face recognition terminals 1 receive the face recognition information from the distributed acceleration service bus 2, process their respective face recognition tasks, and then upload the results to the server via the distributed acceleration service bus 2.

[0042] Embodiment 2

[0043] Take local image retrieval as an example

[0044] A method for accelerating face detection and recognition of a terminal device comprises the following steps:

[0045] (1) After receiving the search request, the face recognition terminal 1 sends the request to the distributed acceleration service bus 2.

[0046] (2) According to the working status of other face recognition terminals in the system, the distributed acceleration service bus 2 dispatches the search request to the idle face recognition terminal, and the idle face recognition terminal executes the search request locally and feeds back the execution result to the bus.

[0047] Embodiment 3

[0048] Take retrieving pictures from videos as an example

[0049] In the face registration scenario, extracting the facial feature value of a picture only requires one face recognition terminal 1 to execute, and then the facial feature value is aggregated on the bus and distributed to the required devices to achieve the purpose of acceleration.

[0050] The retrieval scenario is relatively complex, especially when retrieving images from videos. The computing resources consumed are very huge. A single device has a bottleneck in decoding and a bottleneck in extracting feature values. The former depends on the configuration of the PC or device, while the latter can be accelerated by the method provided by the present invention. We introduce a balanced algorithm, which is specifically implemented as follows:

[0051] A method for accelerating face detection and recognition of a terminal device comprises the following steps:

[0052] (1) Connect several face recognition terminals 1 to the main server 3 through the network, register the terminal information to the distributed acceleration service bus 2, and connect the main server 3 and the distributed acceleration business logic micro server 4 through the distributed acceleration service bus 2. When the system starts the distributed acceleration mechanism, the terminal information is sent to the bus and the characteristic face feature extraction service is subscribed.

[0053] (2) Before the video is stored in the database of the main server 3, the main server calls the face detection algorithm to select the face range in the video, form a number of face image files containing only one face, and store them in the main server 3. The face detection algorithm adopts the existing detection algorithm, which is a direct application of the existing technology and will not be described in detail here.

[0054] (3) The main server 3 queries the running status of the distributed acceleration business logic micro server 4 through the distributed acceleration service bus 2.

[0055] (4) The main server 3 estimates the time required to complete the batch task. If the time exceeds the preset time threshold, the distributed acceleration mechanism is activated. The main server 3 only sends the addresses of the above-mentioned multiple face image files to the distributed acceleration service bus 2, so that other devices can access and use the face image files. Only transmitting the addresses of the face image files can reduce the transmission bandwidth usage and improve the speed of face detection and recognition.

[0056] (5) The distributed acceleration business logic microserver 4 queries the working status of each face recognition terminal 1 through the distributed acceleration service bus 2, allocates tasks according to the working status of the face recognition terminal, and sends them to the designated face recognition terminal 1. For example, the distributed acceleration business logic microserver 4 divides multiple face image files into at least two parts, and distributes them to several face recognition terminals 1 with idle working status, thereby constructing a distributed acceleration task and sending it to the distributed acceleration service bus 2.

[0057] (6) Each designated face recognition terminal 1 extracts face feature values ​​from the face image file according to the address of the face image file, and then uploads the result to the server via the distributed acceleration service bus 2. In addition, after the face feature values ​​are extracted, the face recognition terminal can also search and compare the face feature values ​​if necessary.

[0058] The above is only a specific implementation of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial changes to the present invention using this concept shall be deemed as an infringement of the protection scope of the present invention.

Claims

1. A method for accelerating face detection and recognition of a terminal device, characterized in that: The following steps are involved: (1) Connect several face recognition terminals to the main server through the network, and connect the main server and the distributed acceleration business logic micro server through the distributed acceleration service bus; (2) If the face recognition task received by the main server is to extract face recognition features from batch photos to perform batch face recognition registration, the main server determines whether to start the distributed acceleration mechanism according to the preset strategy; if the distributed acceleration mechanism is started, execute step (4); (3) If the face recognition task received by the main server is to retrieve images in a video; before the video is stored in the database of the main server, the main server calls the face detection algorithm to select the face range in the video, form a number of face image files containing only one face, and store them in the main server; the main server determines whether to start the distributed acceleration mechanism according to the preset strategy; If the distributed acceleration mechanism is enabled, execute step (4); (4) When the system starts the distributed acceleration mechanism, it sends the terminal information to the bus and subscribes to the characteristic face feature extraction service; After the distributed acceleration mechanism is started, the main server sends the address of the face image file to the distributed acceleration service bus; (5) The distributed acceleration business logic microserver queries the working status of each face recognition terminal through the distributed acceleration service bus; (6) The distributed acceleration service logic microserver divides the address of the face image file into at least two parts and distributes them to a number of designated face recognition terminals in an idle state; (7) The face recognition terminals complete their respective received face recognition tasks and upload the results to the server via the distributed acceleration service bus; (8) If the face recognition task received by the face recognition terminal is a local image retrieval task, after receiving the retrieval request, the face recognition terminal sends a request to the distributed acceleration service bus; (9) According to the working status of other face recognition terminals in the system, the distributed acceleration service bus dispatches the search request to the idle face recognition terminal, and the idle face recognition terminal executes the search request locally and feeds back the execution result to the bus.

2. The face detection and recognition acceleration method of a terminal device according to claim 1, characterized in that: After the main server is started, the running status of the distributed acceleration business logic micro server is queried through the distributed acceleration service bus.

3. The face detection and recognition acceleration method of a terminal device according to claim 1, characterized in that: The preset strategy is: if the estimated time required for the main server to complete the batch of face recognition tasks exceeds a preset time threshold, the distributed acceleration mechanism is started.

4. The face detection and recognition acceleration method of a terminal device according to claim 1, characterized in that: In step (7), the face recognition terminal extracts face feature values ​​from the corresponding face image file.

5. The method for accelerating face detection and recognition of a terminal device according to claim 4, characterized in that: After the facial feature values ​​are extracted, the facial recognition terminal searches and compares the facial feature values.

6. A face detection and recognition acceleration system for a terminal device, characterized in that: The face detection and recognition acceleration system of the terminal device is used to execute the face detection and recognition acceleration method of the terminal device according to claim 1, including a plurality of face recognition terminals, a main server and a distributed acceleration business logic micro server that are interconnected through a distributed acceleration service bus; The main server is used to receive, process and delegate face recognition tasks, and is also used to set a preset strategy and start the distributed acceleration mechanism according to the preset strategy; the distributed acceleration business logic micro server is used to divide the batch face recognition tasks issued by the main server into at least two parts, and distribute them to a number of designated face recognition terminals; The face recognition terminal is used to receive and process the face recognition terminal, and upload the result to the main server via the distributed acceleration service bus.