Face recognition method and device, electronic equipment and storage medium

CN114840328BActive Publication Date: 2026-09-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110047811.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-14
Publication Date
2026-09-08
Estimated Expiration
2041-01-14

AI Technical Summary

Technical Problem

目前,在大多数场景中,基于人脸识别的身份识别对设备有较强要求,不同配置或不同使用情况的终端设备上,可用于本地识别的内存容量不同,对应能支撑的本地人脸库规模可能千差万别,若终端需处理的人脸识别的任务数量超过本地人脸库的上限,则会使得终端的处理速度无法满足用户的需求,造成较差的用户体验

Benefits of technology

[0013] When this application receives a face recognition request triggered by a target terminal, it calls the memory information and complexity information of the target terminal. After the face recognition request carries the face data of the face to be recognized, it obtains the historical access information corresponding to the face data to be recognized. The historical access information is the access information generated during a historical period based on the verification of the face to be recognized using a face database, which includes multiple face datasets. Then, based on the memory information and historical access information, it selects a target face dataset from the multiple face datasets. Next, based on the memory usage and load information of the target face dataset, it generates a data loading strategy for the target terminal to load the target face dataset. Finally... The target face dataset and data loading strategy are sent to the target terminal so that the target terminal can recognize the face to be recognized according to the data loading strategy and the target face dataset. In this application's solution, the target face dataset and data loading strategy are sent to the target terminal according to the memory usage and load information of the target face dataset so that the target terminal can recognize the face to be recognized according to the data loading strategy and the target face dataset. During face recognition, the corresponding face data can be sent to the target terminal as needed, avoiding the number of face recognition tasks to be processed from exceeding the limit of the local face database. Therefore, the efficiency of face recognition is improved, thereby improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114840328B_ABST
    Figure CN114840328B_ABST
Patent Text Reader

Abstract

The application discloses a face recognition method and device, electronic equipment and storage medium, comprising: when receiving a face recognition request triggered by a target terminal, calling memory information and load information reported by the target terminal; obtaining historical access information corresponding to the to-be-recognized face data; selecting a target face data set from multiple face data sets based on the memory information and the historical access information; generating a data loading strategy when the target terminal loads the target face data set according to the memory occupation amount and the load information of the target face data set; and sending the target face data set and the data loading strategy to the target terminal, so that the target terminal recognizes the to-be-recognized face according to the data loading strategy and the target face data set. The scheme can improve the efficiency of face recognition, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically to a face recognition method, device, electronic device, and storage medium. Background Technology

[0002] Biometric identification technology refers to the technology that uses computers to identify individuals based on their inherent physiological or behavioral characteristics. Among biometric identification technologies, facial recognition is widely used for identity verification due to its convenience and speed. Currently, in most scenarios, facial recognition-based identity verification places high demands on the device. Different terminal devices with different configurations or usage conditions have different memory capacities available for local recognition, and the corresponding local face database sizes that can be supported may vary greatly. If the number of facial recognition tasks that the terminal needs to process exceeds the upper limit of the local face database, the terminal's processing speed will not be able to meet the user's needs, resulting in a poor user experience. Summary of the Invention

[0003] This application provides a face recognition method, apparatus, electronic device, and storage medium, which can improve the efficiency of face recognition and thus enhance the user experience.

[0004] This application provides a face recognition method, including: When a face recognition request triggered by a target terminal is received, the memory information and load information reported by the target terminal are invoked, and the face request to be recognized carries the face data of the face to be recognized. Obtain the historical access information corresponding to the face data to be identified. The historical access information is the access information generated during a historical period based on the face database to verify the face to be identified. The face database includes multiple face datasets. The target face dataset is selected from multiple face datasets based on the memory information and historical access information. Based on the memory usage and load information of the target face dataset, a data loading strategy is generated when the target terminal loads the target face dataset; The target face dataset and data loading strategy are sent to the target terminal so that the target terminal can load the target face dataset into its local storage according to the data loading strategy and recognize the face to be recognized based on the loaded target face dataset.

[0005] Accordingly, this application also provides a face recognition device, including: The calling module is used to call the memory information and load information of the target terminal when a face recognition request triggered by the target terminal is received. The face request to be recognized carries the face data of the face to be recognized. The acquisition module is used to acquire the historical access information corresponding to the face data to be identified. The historical access information is the access information generated by verifying the face to be identified based on the face database within a historical time period. The face database includes multiple face datasets. The selection module is used to select a target face dataset from multiple face datasets based on the memory information and historical access information; The generation module is used to generate a data loading strategy for the target terminal when loading the target face dataset based on the memory usage and load information of the target face dataset. The sending module is used to send the target face dataset and data loading strategy to the target terminal, so that the target terminal can load the target face dataset into its local storage according to the data loading strategy, and recognize the face to be recognized based on the loaded target face dataset.

[0006] Optionally, in some embodiments of this application, the selection module includes: The first generation unit is used to generate the free memory of the terminal based on the memory information; The first selection unit is used to select a face dataset from multiple face datasets that corresponds to the memory size of the free memory, so as to obtain a candidate face dataset; The second selection unit is used to select the target face dataset from the selected candidate face dataset based on the historical access information.

[0007] Optionally, in some embodiments of this application, the first generation unit includes: An extraction subunit is used to extract the available memory and minimum memory limit of the terminal from the memory information; A generation subunit is used to generate free memory for the terminal based on the difference between the available memory and the minimum memory limit.

[0008] Optionally, in some embodiments of this application, the generating subunit is specifically used for: Obtain the preset coefficients; Calculate the difference between the available memory and the minimum memory limit to obtain the reserved memory; The free memory of the terminal is obtained by multiplying the reserved memory by a preset coefficient.

[0009] Optionally, in some embodiments of this application, the first selection unit is specifically used for: Based on the historical access information, the access behavior information of the face to be identified accessing each face dataset within the historical time period is determined, and the access behavior information includes access time and access frequency; Based on the access time and access frequency, a preset algorithm is used to calculate the access weight corresponding to each candidate face dataset; The candidate face dataset with the highest access weight is identified as the target face dataset.

[0010] Optionally, in some embodiments of this application, the generation module includes: The extraction unit is used to extract the resource utilization rate of the target terminal and the number of face recognition services from the load information. The determining unit is used to determine the current available memory corresponding to the target terminal based on the resource occupancy rate and the number of services of the face recognition service; The second generation unit is used to generate a data loading strategy for the target terminal when loading the target face dataset, based on the currently available memory and the memory usage of the target face dataset.

[0011] Optionally, in some embodiments of this application, the second generating unit is specifically used for: Detect the memory difference between the currently available memory and the memory usage of the target face dataset; When it is detected that the current available memory is greater than the memory usage of the target face dataset, a first data loading strategy is generated. The first data loading strategy indicates that the data of the face database in the target terminal is retained, and the data of the target face dataset is loaded into the target terminal. When it is detected that the currently available memory is equal to the memory usage of the target face dataset, a second data loading strategy is generated. The second data loading strategy instructs the deletion of data from the face database in the target terminal and the loading of data from the target face dataset into the target terminal. When it is detected that the current available memory is less than the memory usage of the target face dataset, a third data loading strategy is generated. The third data loading strategy instructs the deletion of data from the face database in the target terminal and the segmented loading of the data from the target face dataset into the target terminal.

[0012] Optionally, in some embodiments of this application, the calling module is specifically used for: The system detects whether the target terminal's memory information is stored locally. If the target terminal's memory information is detected, the system detects the timestamp of the stored memory information. If the timestamp of the memory information meets a preset condition, the system retrieves the target terminal's memory information stored locally. If the timestamp of the memory information does not meet the preset condition, the system obtains the target terminal's memory information from the target terminal. The load information of the target terminal is obtained from the target terminal in real time.

[0013] When this application receives a face recognition request triggered by a target terminal, it calls the memory information and complexity information of the target terminal. After the face recognition request carries the face data of the face to be recognized, it obtains the historical access information corresponding to the face data to be recognized. The historical access information is the access information generated during a historical period based on the verification of the face to be recognized using a face database, which includes multiple face datasets. Then, based on the memory information and historical access information, it selects a target face dataset from the multiple face datasets. Next, based on the memory usage and load information of the target face dataset, it generates a data loading strategy for the target terminal to load the target face dataset. Finally... The target face dataset and data loading strategy are sent to the target terminal so that the target terminal can recognize the face to be recognized according to the data loading strategy and the target face dataset. In this application's solution, the target face dataset and data loading strategy are sent to the target terminal according to the memory usage and load information of the target face dataset so that the target terminal can recognize the face to be recognized according to the data loading strategy and the target face dataset. During face recognition, the corresponding face data can be sent to the target terminal as needed, avoiding the number of face recognition tasks to be processed from exceeding the limit of the local face database. Therefore, the efficiency of face recognition is improved, thereby improving the user experience. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in this application, the accompanying drawings used 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 those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1a This is a schematic diagram illustrating a scenario using the face recognition method provided in this application; Figure 1b This is a flowchart illustrating the face recognition method provided in this application; Figure 2a This is another flowchart illustrating the face recognition method provided in this application; Figure 2b This is a structural diagram of the facial recognition payment system provided in this application; Figure 3 This is a schematic diagram of the structure of the face recognition device provided in this application; Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation

[0016] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] This application provides a face recognition method, apparatus, electronic device, and storage medium.

[0018] Specifically, the facial recognition device can be integrated into a server. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can connect directly or indirectly to the terminal via wired or wireless communication methods. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these, and this application does not impose any restrictions.

[0019] For example, please see Figure 1a This application provides a face recognition system, which includes a server 10, a terminal 20a, and a terminal 20b. The face recognition device is integrated on the server 10. When both terminal a and terminal b need to perform a face recognition task, the server 10 receives face recognition requests triggered by terminal a and terminal b, and calls the memory and load information of terminal a and terminal b respectively. For ease of description, the following uses terminal a as an example for specific explanation. The server 10 obtains the historical access information corresponding to the face data to be recognized reported by terminal a. This historical access information is... The server 10 verifies the access information generated by the face to be identified based on the face database during a historical period. The face database includes multiple face datasets. Then, the server 10 selects the target face dataset from the multiple face datasets based on memory information and historical access information. Next, the server 10 generates a data loading strategy for the terminal 20a to load the target face dataset based on the memory usage and load information of the target face dataset. Finally, the server 10 sends the target face dataset and the data loading strategy to the terminal 20a so that the terminal 20a can identify the face to be identified according to the data loading strategy and the target face dataset.

[0020] The face recognition method provided in this application sends the target face dataset and data loading strategy to the terminal based on the memory usage of the target face dataset and the current load information of the terminal. This allows the terminal to load the target face dataset locally according to the data loading strategy and then recognize the face to be recognized based on the loaded target face dataset. In subsequent face recognition, this avoids the number of face recognition tasks being processed exceeding the limit of the local face database, thus improving the efficiency of face recognition and thereby enhancing the user experience.

[0021] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.

[0022] A face recognition method includes: when a face recognition request triggered by a target terminal is received, calling the memory information and load information of the target terminal, obtaining historical access information corresponding to the face data to be recognized, selecting a target face dataset from multiple face datasets based on the memory information and historical access information, generating a data loading strategy for the target terminal to load the target face dataset according to the memory usage and load information of the target face dataset, and sending the target face dataset and data loading strategy to the target terminal so that the target terminal can recognize the face to be recognized according to the data loading strategy and the target face dataset.

[0023] Please see Figure 1b , Figure 1b A flowchart illustrating the face recognition method provided in this application. The specific process of this face recognition method can be as follows: 101. When a face recognition request triggered by the target terminal is received, the memory information and load information of the target terminal are retrieved.

[0024] Wireless networks can connect directly or indirectly to terminals using wired or wireless communication methods. For example, they can receive facial recognition requests triggered by target terminals via a wireless network. A wireless network is a network that enables the interconnection of various communication devices without wiring. Wireless network technology covers a wide range, including global voice and data networks that allow users to establish long-distance wireless connections, as well as infrared and radio frequency technologies optimized for short-range wireless connections. Based on network coverage, wireless networks can be divided into Wireless Wide Area Networks (WWAN), Wireless Local Area Networks (WLAN), Wireless Metropolitan Area Networks (WMAN), and Wireless Personal Area Networks (WPAN).

[0025] Upon receiving a face recognition request triggered by the target terminal, the system can detect whether the target terminal's memory information is stored locally. If the system detects that the target terminal's memory information is stored locally, it retrieves the target terminal's memory information from the local storage and collects the target terminal's load information from the target terminal in real time. If the system detects that the target terminal's memory information is not stored locally, it collects the target terminal's memory information and load information from the target terminal in real time.

[0026] Furthermore, to ensure the validity of the obtained memory information, optionally, in some embodiments, the time difference between the timestamp of the memory information and the current time can be calculated by detecting the timestamp of the memory information. When the time difference is less than or equal to a preset value, the memory information of the target terminal stored locally is retrieved; if the time difference is greater than the preset value, the memory information of the target terminal is retrieved from the target terminal. That is, the step "retrieving the memory information and load information of the target terminal" may specifically include: Detect whether the target terminal's memory information is stored locally; if the target terminal's memory information is detected, then check the timestamp of the stored memory information; if the timestamp of the memory information meets a preset condition, then retrieve the target terminal's memory information stored locally; if the timestamp of the memory information does not meet the preset condition, then retrieve the target terminal's memory information from the target terminal, and... Get the load information of the target terminal in real time.

[0027] It should be noted that in this application, a face recognition request triggered by the target terminal can be received through a data transmission channel. This application does not limit the number and type of data transmission channels. The number of data transmission channels can be determined based on the number of communication channels that can be supported between the server and the data transmission channel. For example, it may include a WiFi channel, a 3G channel, a 4G channel, a 5G channel, or a wired channel.

[0028] 102. Obtain the historical access information corresponding to the face data to be identified.

[0029] The historical access information refers to the access information generated during a historical period based on the verification of the face to be identified using a face database. The face database includes multiple face datasets. Specifically, the historical period can include a first timestamp (e.g., time T1) and a second timestamp (e.g., time T2). Furthermore, there can be a certain time interval between the first and second timestamps; that is, the first and second timestamps can be used to distinguish the order in which face data accesses the face datasets in the preset face database. For example, time T2 can be the access time of the face dataset in the preset face database, and time T1 can be the last access time of the face dataset in the preset face database; that is, time T1 can be the access time preceding time T2. It should be understood that the time interval between time T1 and time T2 can include access periods during which the preset face database was not accessed.

[0030] In addition, it should be noted that the historical access information also records the number of times the face data to be identified accesses the face dataset in the preset face database. For example, the historical access information records that the face data to be identified accesses face dataset A in the preset face database 7 times, and the historical access information records that the face data to be identified accesses face dataset B in the preset face database 6 times. The specific number depends on the actual situation and will not be elaborated here.

[0031] 103. Select the target face dataset from multiple face datasets based on memory information and historical access information.

[0032] For example, specifically, a candidate face dataset corresponding to the memory information is selected from multiple face datasets. Then, based on historical access information, the target face dataset is determined from the selected candidate face datasets. That is, optionally, in some embodiments, the step "selecting the target face dataset from multiple face datasets based on memory information and historical access information" may specifically include: (21) Generate free memory for the terminal based on memory information; (22) Select the face dataset with the memory size corresponding to the free memory from multiple face datasets to obtain the candidate face dataset; (23) Select the target face dataset from the selected candidate face dataset based on historical access information.

[0033] The memory information records the usage of terminal memory, such as used memory and available memory. Memory is a major component of a computer system, used to store programs and data during process execution; it is also called executable memory. In a computer, memory space generally refers to the main memory space (physical address space) or the memory space allocated by the system for a user program. Address space represents the size of memory occupied by any computer entity. The source program, after being assembled or compiled, and then processed by the linker, forms the assembly modules of the program, which are converted into modules with relative addresses. These modules are addressed sequentially with 0 as the base address. Relative addresses are also called logical addresses or virtual addresses. The space composed of relative addresses in a program is called the logical address space. The relative address space is converted to the absolute address space through the address relocation mechanism; the absolute address space is also called the physical address space. Memory space generally refers to the main memory space (physical address space) or the memory space allocated by the system for a user program. The system allocates memory space for a user program using four methods: single contiguous allocation, fixed partition allocation, dynamic partition allocation, and dynamic relocation partition allocation.

[0034] Memory, also known as internal storage, is used to temporarily store data processed by the CPU, as well as data exchanged with external storage devices such as hard drives. As long as the computer is running, the CPU will load the data it needs to process into memory for computation. After the computation is complete, the CPU will then send the result back out. The operation of memory also determines the stable operation of the computer.

[0035] Available memory refers to the memory that the terminal is not currently using. In some embodiments, available memory can be used as free memory. That is, a face dataset with a memory size corresponding to the available memory is selected from multiple face datasets to obtain a candidate face dataset.

[0036] However, considering that other application processes also exist on the terminal, such as system application processes called when performing face recognition tasks, in some embodiments, the available memory and minimum memory limit of the terminal can be extracted from the memory information to obtain free memory. That is, optionally, in some embodiments, the step "generating free memory of the terminal based on memory information" may specifically include: (31) Extract the available memory and minimum memory limit of the terminal from the memory information; (32) Generate the terminal’s free memory based on the difference between available memory and minimum memory limit.

[0037] The minimum memory requirement refers to the memory occupied by the terminal during runtime, such as the memory occupied during startup and / or task execution, for example, the memory occupied by applications called during face recognition. In addition to face recognition, the memory occupied by other tasks that may be executed simultaneously with the face recognition task also needs to be considered. That is, to ensure that the terminal can execute other tasks while performing face recognition, in some embodiments, after calculating the difference between available memory and minimum memory requirement, this difference is multiplied by a preset coefficient, and the result is used as the terminal's free memory. Optionally, in some embodiments, the step "generating the terminal's free memory based on the difference between available memory and minimum memory requirement" may specifically include: (41) Obtain the preset coefficients; (42) Calculate the difference between available memory and minimum memory limit to obtain the reserved memory; (43) Calculate the product of the reserved memory and the preset coefficient to obtain the terminal's free memory.

[0038] The coefficient can be preset by the server or maintenance personnel. For example, the server can generate the coefficient based on the terminal's historical memory usage. In some embodiments, the terminal's historical memory usage can also be obtained, and the corresponding coefficient can be generated based on the obtained historical memory usage. A mapping relationship between the coefficient and the terminal can also be generated. When it is necessary to generate the terminal's free memory based on memory information, the corresponding preset coefficient can be obtained based on the mapping relationship.

[0039] In addition, the preset coefficient is any number between (0,1), and the specific selection is based on the actual situation. That is, free memory = (available memory - minimum memory limit) * preset coefficient. After obtaining the free memory, select the face dataset with the memory size corresponding to the free memory from multiple face datasets to obtain the candidate face dataset. Then, select the target face dataset from the selected candidate face dataset based on historical access information.

[0040] To improve the efficiency of face recognition, the frequency and time of access to various face datasets by the face to be recognized can be considered. The target face dataset can be selected from the selected candidate face datasets. Optionally, in some embodiments, the step "selecting the target face dataset from the selected candidate face datasets based on historical access information" may specifically include: (51) Based on historical access information, determine the access behavior information of the face to be identified accessing each face dataset within the historical time period; (52) Based on access time and access frequency, the access weight corresponding to each candidate face dataset is calculated using a preset algorithm; (53) The candidate face dataset with the highest access weight is identified as the target face dataset.

[0041] The access behavior information includes access time and access frequency. Here, we propose the Least Recently Used (LRU) algorithm, a commonly used page replacement algorithm that selects the least recently used page for replacement. This algorithm assigns an access field to each page to record the time *t* elapsed since the page was last accessed. When a page needs to be replaced, it selects the page with the largest *t* value, i.e., the least recently used page. The algorithm's core idea is that when a page fault occurs, the page with the longest unused time is replaced. From the perspective of program operation principles, the Least Recently Used algorithm is a relatively ideal page replacement algorithm. This algorithm fully utilizes the historical information of page calls in memory and accurately reflects local problems in the program.

[0042] This embodiment incorporates the LRU algorithm, assigning higher weights to candidate face data values ​​with high access frequency and / or recent access times. For example, if the current access time is T, the historical time period is t1 to t2, candidate face dataset A was accessed 3 times during the historical time period, and candidate face dataset B was accessed 6 times during the historical time period, then for ease of representation, we will use 'a' to represent the access frequency of candidate face dataset A during the historical time period, and similarly, 'b' to represent the access frequency of candidate face dataset B during the historical time period. It can be understood that access frequency 'a' is less than access frequency 'b', and the access time of candidate face dataset A during the historical time period is earlier than the access time of candidate face dataset B during the historical time period. Therefore, in this embodiment, candidate face dataset B can be assigned a weight of 0.7, and candidate face dataset A can be assigned a weight of 0.3. Of course, there are no restrictions on the assigned weights; this is merely an example for illustration.

[0043] For example, if candidate face dataset B was accessed before candidate face dataset A was accessed in the same historical time period, and their access frequencies are the same as described above, then the weights of the two datasets need to be determined according to the actual situation. If the scenario focuses more on access time, then candidate face dataset A should be given a higher weight than candidate face dataset B; if the scenario focuses more on access frequency, then candidate face dataset B should be given a higher weight than candidate face dataset A.

[0044] 104. Based on the memory usage and load information of the target face dataset, generate a data loading strategy when the target terminal loads the target face dataset.

[0045] Here, load refers to workload, and terminal load is a concept describing the workload of the terminal. Generally, terminal load involves processor, memory, disk, and network aspects. When the load is too high, the terminal's task processing speed will decrease, thereby reducing task processing efficiency. Therefore, in some embodiments, the terminal's resource utilization and the number of face recognition services can be considered. That is, the step "generate a data loading strategy for the target terminal to load the target face dataset based on the memory usage and load information of the target face dataset" can specifically include: (61) Extract the resource utilization rate of the target terminal and the number of face recognition services from the load information; (62) Determine the current available memory of the target terminal based on the resource utilization rate and the number of services for face recognition; (63) Generate a data loading strategy when the terminal loads the target face dataset based on the available memory and the memory usage of the target face dataset.

[0046] Because the terminal has a large number of resident memory programs (STR programs) and automatically loaded services, the available memory of the terminal is not equal to the memory recorded in the memory information. It is understandable that the estimated memory usage of the target face dataset may be greater than the currently available memory, preventing the terminal from loading the target face dataset locally in one go. Therefore, based on this situation, a data loading strategy can be generated when the terminal loads the target face dataset, according to the current available memory and the memory usage of the target face dataset. Optionally, in some embodiments, firstly, the memory difference between the current available memory and the memory usage of the target face dataset can be detected, and then a data loading strategy corresponding to the memory difference can be generated. The data loading strategy includes the following cases: Scenario 1: When it is detected that the current available memory is greater than the memory usage of the target face dataset, a first data loading strategy is generated. This first data loading strategy indicates that the data in the face database in the target terminal should be retained, and the data of the target face dataset should be loaded into the target terminal.

[0047] Scenario 2: When it is detected that the current available memory is equal to the memory usage of the target face dataset, a second data loading strategy is generated. The second data loading strategy instructs to delete the data in the face database in the target terminal and load the data of the target face dataset into the target terminal.

[0048] Scenario 3: When it is detected that the current available memory is less than the memory usage of the target face dataset, a third data loading strategy is generated. The third data loading strategy instructs the deletion of data from the face database in the terminal and the segmented loading of the target face dataset data into the target terminal.

[0049] 105. Send the target face dataset and data loading strategy to the target terminal so that the target terminal can identify the face to be identified according to the data loading strategy and the target face dataset.

[0050] Facial recognition is a biometric technology that identifies individuals based on their facial features. It involves using cameras or webcams to capture images or video streams containing faces, automatically detecting and tracking faces within the images, and then performing facial recognition on the detected faces. This technology is also commonly referred to as image recognition or face recognition.

[0051] A face recognition system mainly consists of four components: face image acquisition and detection, face image preprocessing, face image feature extraction, and matching and recognition. Specifically, due to various limitations and random interference, the acquired raw images often cannot be used directly and must undergo image preprocessing such as grayscale correction and noise filtering in the early stages of image processing. For face images, the preprocessing mainly includes lighting compensation, grayscale transformation, histogram equalization, normalization, geometric correction, filtering, and sharpening. The features usable by a face recognition system are typically categorized as visual features, pixel statistical features, face image transform coefficient features, and face image algebraic features. Face feature extraction targets specific features of the face. Face feature extraction, also known as face representation, is the process of modeling the features of the face. Facial feature extraction methods can be broadly categorized into two types: knowledge-based representation methods and algebraic or statistical learning-based representation methods. Knowledge-based methods primarily obtain feature data helpful for face classification by describing the shape of facial organs and the distances between them. These feature components typically include Euclidean distance, curvature, and angles between feature points. The face is composed of parts such as the eyes, nose, mouth, and chin. The geometric description of these parts and their structural relationships serves as important features for face recognition; these features are called geometric features. Knowledge-based face representation mainly includes geometric feature-based methods and template matching methods. The extracted facial image feature data is searched and matched against feature templates stored in a database. By setting a threshold, when the similarity exceeds this threshold, the matching result is output. Face recognition compares the features of the face to be identified with the obtained facial feature templates and determines the identity information of the face based on the degree of similarity. This process is further divided into two categories: confirmation, a one-to-one image comparison process, and identification, a one-to-many image matching comparison process.

[0052] Furthermore, the terminal can send the facial recognition results to a server or other devices to perform other tasks, such as facial recognition payment, facial recognition login, or facial recognition door opening, etc. There are no restrictions here, and the specifics depend on the actual situation.

[0053] The face recognition method provided in this application, upon receiving a face recognition request triggered by a target terminal, calls the target terminal's memory information and load information, then obtains the historical access information corresponding to the face data to be recognized, next selects a target face dataset from multiple face datasets based on the memory information and historical access information, then generates a data loading strategy for the target terminal to load the target face dataset according to the memory usage and load information of the target face dataset, and finally sends the target face dataset and data loading strategy to the target terminal so that the target terminal can recognize the face to be recognized according to the data loading strategy and the target face dataset. In this application's scheme, the target face dataset and data loading strategy are sent to the target terminal according to the memory usage and load information of the target face dataset so that the target terminal can recognize the face to be recognized according to the data loading strategy and the target face dataset. During face recognition, the corresponding face data can be sent to the target terminal as needed, avoiding the number of face recognition tasks to be processed from exceeding the limit of the local face database, thus improving the efficiency of face recognition and thereby improving the user experience.

[0054] The method described in the embodiments will be further described in detail below with examples.

[0055] In this embodiment, the face recognition device will be specifically integrated into the server as an example for illustration.

[0056] Please see Figure 2a A facial recognition method, the specific process of which can be described as follows: 201. When the server receives a face recognition request triggered by the target terminal, it retrieves the target terminal's memory information and load information.

[0057] The system can connect directly or indirectly to the terminal using wired or wireless communication methods. For example, it can receive face recognition requests triggered by the target terminal via a wireless network. After receiving the face recognition request, the server can check whether it has the target terminal's memory information stored locally. If the server detects that the target terminal's memory information is stored locally, it retrieves the target terminal's memory information from the local storage and collects the target terminal's load information in real time. If the server detects that the target terminal's memory information is not stored locally, it collects the target terminal's memory information and load information in real time.

[0058] 202. The server obtains the historical access information corresponding to the face data to be identified.

[0059] The historical access information refers to the access information generated during a historical period based on the verification of the face to be identified using a face database. The face database includes multiple face datasets. Specifically, the historical period can include a first timestamp (e.g., time T1) and a second timestamp (e.g., time T2). Furthermore, there can be a certain time interval between the first and second timestamps; that is, the first and second timestamps can be used to distinguish the order in which face data accesses the face datasets in the preset face database. For example, time T2 can be the access time of the face dataset in the preset face database, and time T1 can be the last access time of the face dataset in the preset face database; that is, time T1 can be the access time preceding time T2. It should be understood that the time interval between time T1 and time T2 can include access periods during which the preset face database was not accessed.

[0060] 203. The server selects the target face dataset from multiple face datasets based on memory information and historical access information.

[0061] For example, specifically, the server selects candidate face datasets corresponding to the memory information from multiple face datasets, and then determines the target face dataset from the selected candidate face datasets based on historical access information.

[0062] 204. The server generates a data loading strategy for the target terminal to load the target face dataset based on the memory usage and load information of the target face dataset.

[0063] For example, specifically, the server can determine the current available memory of the terminal based on the terminal's resource utilization rate and the number of face recognition services. Then, the server can generate a data loading strategy for the terminal to load the target face dataset based on the current available memory and the memory usage of the target face dataset.

[0064] Because the terminal has a large number of resident memory programs (STR Programs) and automatically loaded services, the current available memory of the terminal is not equal to the memory recorded in the memory information. It is understandable that the estimated memory usage of the target face dataset may be greater than the current available memory, which may prevent the terminal from loading the target face dataset locally in one go. Therefore, based on this situation, a data loading strategy can be generated when the target terminal loads the target face dataset according to the current available memory and the memory usage of the target face dataset.

[0065] 205. The server sends the target face dataset and data loading strategy to the target terminal so that the target terminal can identify the face to be identified according to the data loading strategy and the target face dataset.

[0066] To facilitate a further understanding of the facial recognition scheme in this application, the following explanation uses a facial recognition payment scenario as an example. Please refer to [link / reference]. Figure 2b The diagram shows a flowchart of a facial recognition payment system. This system includes a server 10, a facial recognition device 20, and a user 30. When user 30 needs to make a facial recognition payment through the device 20, the device 20 responds to the user 30's request (facial recognition request) by uploading its memory and load information to the server 10. This payment request carries facial data of the face to be recognized. After receiving the memory and load information from the device 20, the server 10 obtains the historical access information corresponding to the face data to be recognized. This historical access information is generated based on the verification of the face to be recognized using a face database. This face database includes multiple... The personal face dataset, for example, the historical access information can reflect whether user 30 used face recognition device 20 to make face recognition payments during a historical period, as well as the number of times and the time of face recognition payments during that period. Then, server 10 selects a target face dataset from multiple face datasets based on memory information and historical access information. Next, server 10 generates a data loading strategy for face recognition device 20 to load the target face dataset based on the memory usage and load information of the target face dataset. Finally, server 10 sends the target face dataset and the data loading strategy to face recognition device 20 so that face recognition device 20 can recognize the face to be recognized according to the data loading strategy and the target face dataset.

[0067] The facial recognition device 20 identifies the facial information of the user 30 and sends the recognition result to the server 10. The server 10 executes the facial recognition payment task based on the recognition result and sends the payment result to the facial recognition device 20. If the payment is successful, the facial recognition device 20 can display a "Payment Successful" message on its screen. Similarly, if the payment fails, the facial recognition device 20 can display a "Payment Failed" message on its screen, thus completing a facial recognition payment process.

[0068] After receiving the memory information and face data of the face to be recognized reported by the terminal, the server in this application obtains the historical access information corresponding to the face data to be recognized. Then, based on the memory information and historical access information, the server selects a target face dataset from multiple face datasets. Next, the server generates a data loading strategy for the terminal to load the target face dataset according to the memory usage of the target face dataset and the current load information of the terminal. Finally, the server sends the target face dataset and the data loading strategy to the terminal so that the terminal can load the target face dataset locally according to the data loading strategy and recognize the face to be recognized based on the loaded target face dataset. In this application's solution, the target face dataset and the data loading strategy are sent to the target terminal according to the memory usage and load information of the target face dataset so that the target terminal can recognize the face to be recognized according to the data loading strategy and the target face dataset. During face recognition, the corresponding face data can be sent to the target terminal as needed, avoiding the number of face recognition tasks to be processed from exceeding the limit of the local face database. Therefore, the efficiency of face recognition is improved, thereby improving the user experience.

[0069] To facilitate better implementation of the face recognition method of this application, this application also provides a face recognition device (hereinafter referred to as the recognition device) based on the above-described face recognition method. The meanings of the terms are the same as in the face recognition method described above, and specific implementation details can be found in the description of the method embodiments.

[0070] Please see Figure 3 , Figure 3 The schematic diagram of the face recognition device provided in this application shows that the distribution device may include a calling module 301, an acquisition module 302, a selection module 303, a generation module 304, and a sending module 305, as follows: Module 301 is used to call the memory information and load information of the target terminal when a face recognition request triggered by the target terminal is received.

[0071] The calling module 301 can be directly or indirectly connected to the terminal via wired or wireless communication. For example, the calling module 301 can receive a face recognition request triggered by the target terminal via a wireless network. After receiving the face recognition request, it can detect whether the target terminal's memory information is stored locally. If the target terminal's memory information is detected, it retrieves the target terminal's memory information locally and collects the target terminal's load information from the target terminal in real time. If the target terminal's memory information is not detected, it collects the target terminal's memory information and load information from the target terminal in real time. That is, optionally, in some embodiments, the calling module 301 can specifically be used to: detect whether the target terminal's memory information is stored locally; if the target terminal's memory information is detected, it detects the timestamp of the stored memory information; if the timestamp of the memory information meets a preset condition, it calls the locally stored target terminal's memory information; if the timestamp of the memory information does not meet the preset condition, it retrieves the target terminal's memory information from the target terminal and collects the target terminal's load information from the target terminal in real time.

[0072] The acquisition module 302 is used to acquire historical access information corresponding to the face data to be identified.

[0073] The historical access information refers to the access information generated during a historical period based on the verification of the face to be identified in the face database. The face database includes multiple face datasets. It can be understood that the historical period can specifically include: a first timestamp (such as time T1) and a second timestamp (such as time T2). Furthermore, there can be a certain time interval between the first timestamp and the second timestamp. That is, the first timestamp and the second timestamp can be used to distinguish the order in which face datasets in the preset face database are accessed for face data.

[0074] Selection module 303 is used to select a target face dataset from multiple face datasets based on memory information and historical access information.

[0075] For example, specifically, a candidate face dataset corresponding to the memory information is selected from multiple face datasets. Then, based on historical access information, the target face dataset is determined from the selected candidate face datasets. That is, optionally, in some embodiments, the selection module 303 may specifically include: The first generation unit is used to generate free memory for the terminal based on memory information; The first selection unit is used to select a face dataset from multiple face datasets that corresponds to the memory size of the free memory, and obtain a candidate face dataset. The second selection unit is used to select the target face dataset from the selected candidate face dataset based on historical access information.

[0076] Optionally, in some embodiments, the first generating unit may specifically include: An extraction subunit is used to extract the available memory and minimum memory limit of the terminal from the memory information; Generate a subunit to generate free memory for the terminal based on the difference between available memory and minimum memory limits.

[0077] Optionally, in some embodiments, the generating subunit may be specifically used to: obtain a preset coefficient, calculate the difference between available memory and minimum limited memory to obtain reserved memory, calculate the product of reserved memory and preset coefficient to obtain the terminal's free memory.

[0078] Optionally, in some embodiments, the first selection unit is specifically used to: determine the access behavior information of the face to be identified accessing each face dataset within a historical time period based on historical access information, the access behavior information including access time and access frequency; calculate the access weight corresponding to each candidate face dataset using a preset algorithm based on the access time and access frequency; and determine the candidate face dataset with the highest access weight as the target face dataset.

[0079] The generation module 304 is used to generate a data loading strategy when the target terminal loads the target face dataset based on the memory usage and load information of the target face dataset.

[0080] In this context, load refers to workload, and terminal load is a concept describing the workload of a terminal. Generally, terminal load involves aspects such as processor, memory, disk, and network. When the load is too high, the terminal's task processing speed will decrease, thereby reducing task processing efficiency.

[0081] Optionally, in some embodiments, the generation module 304 may specifically include: The extraction unit is used to extract the terminal's resource utilization rate and the number of face recognition services from the load information. The determining unit is used to determine the current available memory of the terminal based on the resource utilization rate and the number of services for face recognition. The second generation unit is used to generate a data loading strategy when the terminal loads the target face dataset, based on the currently available memory and the memory usage of the target face dataset.

[0082] Optionally, in some embodiments, the second generation unit may specifically be used to: detect the memory difference between the currently available memory and the memory usage of the target face dataset; generate a data loading strategy corresponding to the memory difference; when the currently available memory is detected to be greater than the memory usage of the target face dataset, generate a first data loading strategy, the first data loading strategy instructing the deletion of data from the face database in the terminal and loading the data of the target face dataset into the terminal; when the currently available memory is detected to be equal to the memory usage of the target face dataset, generate a second data loading strategy, the second data loading strategy instructing the retention of data from the face database in the terminal and loading the data of the target face dataset into the terminal; when the currently available memory is detected to be less than the memory usage of the target face dataset, generate a third data loading strategy, the third data loading strategy instructing the deletion of data from the face database in the terminal and loading the data of the target face dataset into the terminal in segments.

[0083] The sending module 305 is used to send the target face dataset and data loading strategy to the target terminal so that the terminal can recognize the face to be recognized based on the data loading and the target face dataset.

[0084] When the calling module 301 receives a face recognition request triggered by the target terminal, it calls the memory information and load information of the target terminal. The acquisition module 302 obtains the historical access information corresponding to the face data to be recognized. Then, the selection module 303 selects the target face dataset from multiple face datasets based on the memory information and historical access information. Next, the generation module 304 generates a data loading strategy for the target terminal to load the target face dataset based on the memory usage and load information of the target face dataset. Finally, the sending module 305 sends the target face dataset and the data loading strategy to the target terminal. In this application, the target terminal loads the target face dataset and the target face dataset locally according to the data loading strategy and the target face dataset for recognition. Based on the memory usage and load information of the target face dataset, the target terminal sends the target face dataset and data loading strategy to the target terminal. During face recognition, the corresponding face data can be sent to the target terminal as needed, avoiding exceeding the local face database's capacity for processing face recognition tasks. This improves the efficiency of face recognition and enhances the user experience.

[0085] In addition, this application also provides an electronic device, such as Figure 4 As shown, it illustrates the structural diagram of the electronic device involved in this application, specifically: The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 401 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, it performs various functions and processes data, thereby performing overall detection of the electronic device. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.

[0086] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0087] The electronic device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0088] The electronic device may also include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0089] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize various functions, as follows: When a face recognition request triggered by the target terminal is received, the memory information and load information of the target terminal are called to obtain the historical access information corresponding to the face data to be recognized. Based on the memory information and historical access information, the target face dataset is selected from multiple face datasets. According to the memory usage and load information of the target face dataset, a data loading strategy is generated for the target terminal to load the target face dataset. The target face dataset and the data loading strategy are sent to the target terminal so that the target terminal can recognize the face to be recognized according to the data loading strategy and the target face dataset.

[0090] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0091] The face recognition method provided in this application, upon receiving a face recognition request triggered by a target terminal, calls the target terminal's memory information and load information, then obtains the historical access information corresponding to the face data to be recognized, next selects a target face dataset from multiple face datasets based on the memory information and historical access information, then generates a data loading strategy for the target terminal to load the target face dataset according to the memory usage and load information of the target face dataset, and finally sends the target face dataset and data loading strategy to the target terminal so that the target terminal can recognize the face to be recognized according to the data loading strategy and the target face dataset. In this application's scheme, the target face dataset and data loading strategy are sent to the target terminal according to the memory usage and load information of the target face dataset so that the target terminal can recognize the face to be recognized according to the data loading strategy and the target face dataset. During face recognition, the corresponding face data can be sent to the target terminal as needed, avoiding the number of face recognition tasks to be processed from exceeding the limit of the local face database, thus improving the efficiency of face recognition and thereby improving the user experience.

[0092] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0093] To this end, this application provides a storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the face recognition methods provided in this application. For example, the instructions can execute the following steps: When a face recognition request triggered by the target terminal is received, the memory information and load information of the target terminal are called to obtain the historical access information corresponding to the face data to be recognized. Based on the memory information and historical access information, the target face dataset is selected from multiple face datasets. According to the memory usage and load information of the target face dataset, a data loading strategy is generated for the target terminal to load the target face dataset. The target face dataset and the data loading strategy are sent to the target terminal so that the target terminal can recognize the face to be recognized according to the data loading strategy and the target face dataset.

[0094] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0095] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0096] Since the instructions stored in the storage medium can execute the steps of any face recognition method provided in this application, the beneficial effects that any face recognition method provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0097] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.

[0098] The foregoing has provided a detailed description of a face recognition method, apparatus, electronic device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A face recognition method, characterized in that, include: When a face recognition request triggered by the target terminal is received, the memory information and load information of the target terminal are called. The face recognition request carries the face data to be recognized. The memory information records the memory usage of the target terminal. The load information indicates the workload of the target terminal. Obtain the historical access information corresponding to the face data to be identified. The historical access information is the access information generated by verifying the face to be identified based on the face database within a historical time period. The face database includes multiple face datasets. The historical access information is used to determine the access time and access frequency. Select the candidate face dataset corresponding to the memory information from the plurality of face datasets, and determine the target face dataset from the selected candidate face datasets based on the historical access information; Based on the memory usage and load information of the target face dataset, a data loading strategy is generated when the target terminal loads the target face dataset. The data loading strategy is used to indicate whether to retain or delete data in the face database of the target terminal, and to indicate whether to load or load data in the target face dataset in segments. The target face dataset and data loading strategy are sent to the target terminal so that the target terminal can identify the face to be identified according to the data loading strategy and the target face dataset.

2. The method according to claim 1, characterized in that, The step of selecting a candidate face dataset corresponding to the memory information from the plurality of face datasets, and determining the target face dataset from the selected candidate face datasets based on the historical access information, includes: Based on the memory information, generate the free memory of the terminal; Select a face dataset from multiple face datasets whose memory size corresponds to the free memory to obtain a candidate face dataset; The target face dataset is selected from the selected candidate face dataset based on the historical access information.

3. The method according to claim 2, characterized in that, The step of generating free memory for the terminal based on the memory information includes: Extract the available memory and minimum memory limit of the terminal from the memory information; The free memory of the terminal is generated based on the difference between the available memory and the minimum memory limit.

4. The method according to claim 3, characterized in that, The step of generating free memory for the terminal based on the difference between the available memory and the minimum memory limit includes: Obtain the preset coefficients; Calculate the difference between the available memory and the minimum memory limit to obtain the reserved memory; The free memory of the terminal is obtained by multiplying the reserved memory by a preset coefficient.

5. The method according to claim 2, characterized in that, The step of selecting the target face dataset from the selected candidate face dataset based on the historical access information includes: Based on the historical access information, the access behavior information of the face to be identified accessing each face dataset within the historical time period is determined, and the access behavior information includes access time and access frequency; Based on the access time and access frequency, a preset algorithm is used to calculate the access weight corresponding to each candidate face dataset; The candidate face dataset with the highest access weight is identified as the target face dataset.

6. The method according to any one of claims 1 to 5, characterized in that, The step of generating a data loading strategy for the terminal to load the target face dataset based on the memory usage and load information of the target face dataset includes: Extract the resource utilization rate of the target terminal and the number of face recognition services from the load information; Based on the resource utilization rate and the number of services for face recognition, determine the current available memory corresponding to the target terminal; Based on the currently available memory and the memory usage of the target face dataset, a data loading strategy is generated when the target terminal loads the target face dataset.

7. The method according to claim 6, characterized in that, The step of generating a data loading strategy for the target terminal to load the target face dataset based on the currently available memory and the memory usage of the target face dataset includes: Detect the memory difference between the currently available memory and the memory usage of the target face dataset; When it is detected that the current available memory is greater than the memory usage of the target face dataset, a first data loading strategy is generated. The first data loading strategy indicates that the data of the face database in the target terminal is retained, and the data of the target face dataset is loaded into the target terminal. When it is detected that the currently available memory is equal to the memory usage of the target face dataset, a second data loading strategy is generated. The second data loading strategy instructs the deletion of data from the face database in the target terminal and the loading of data from the target face dataset into the target terminal. When it is detected that the current available memory is less than the memory usage of the target face dataset, a third data loading strategy is generated. The third data loading strategy instructs the deletion of data from the face database in the target terminal and the segmented loading of the data from the target face dataset into the target terminal.

8. The method according to any one of claims 1 to 5, characterized in that, The process of accessing the target terminal's memory information and load information includes: The system detects whether the target terminal's memory information is stored locally. If the target terminal's memory information is detected, the system detects the timestamp of the stored memory information. If the timestamp of the memory information meets a preset condition, the system retrieves the target terminal's memory information stored locally. If the timestamp of the memory information does not meet the preset condition, the system obtains the target terminal's memory information from the target terminal. The load information of the target terminal is obtained from the target terminal in real time.

9. A face recognition device, characterized in that, include: The calling module is used to call the memory information and load information of the target terminal when a face recognition request triggered by the target terminal is received. The face recognition request carries the face data to be recognized. The memory information records the memory usage of the target terminal. The load information indicates the workload of the target terminal. The acquisition module is used to acquire the historical access information corresponding to the face data to be identified. The historical access information is the access information generated by verifying the face to be identified based on the face database within a historical time period. The face database includes multiple face datasets. The historical access information is used to determine the access time and access frequency. The selection module is used to select a candidate face dataset corresponding to the memory information from the plurality of face datasets, and to determine the target face dataset from the selected candidate face datasets based on the historical access information. The generation module is used to generate a data loading strategy when the target terminal loads the target face dataset based on the memory usage and load information of the target face dataset. The data loading strategy is used to indicate whether to retain or delete data in the face database in the target terminal, and to indicate whether to load or load data in the target face dataset in segments. The sending module is used to send the target face dataset and data loading strategy to the target terminal, so that the target terminal can load the target face dataset into its local storage according to the data loading strategy, and recognize the face to be recognized based on the loaded target face dataset.

10. The apparatus according to claim 9, characterized in that, The selection module includes: The first generation unit is used to generate the free memory of the terminal based on the memory information; The first selection unit is used to select a face dataset with a memory size corresponding to the free memory from multiple face datasets to obtain a candidate face dataset; The second selection unit is used to select the target face dataset from the selected candidate face dataset based on the historical access information.

11. The apparatus according to claim 10, characterized in that, The first generation unit includes: An extraction subunit is used to extract the available memory and minimum memory limit of the terminal from the memory information; A generation subunit is used to generate free memory for the terminal based on the difference between the available memory and the minimum memory limit.

12. The apparatus according to claim 11, characterized in that, The generating subunit is specifically used for: Obtain the preset coefficients; Calculate the difference between the available memory and the minimum memory limit to obtain the reserved memory; The free memory of the terminal is obtained by multiplying the reserved memory by a preset coefficient.

13. The apparatus according to claim 10, characterized in that, The first selection unit is specifically used for: Based on the historical access information, the access behavior information of the face to be identified accessing each face dataset within the historical time period is determined, and the access behavior information includes access time and access frequency; Based on the access time and access frequency, a preset algorithm is used to calculate the access weight corresponding to each candidate face dataset; The candidate face dataset with the highest access weight is identified as the target face dataset.

14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, When the processor executes the program, it implements the steps of the face recognition method as described in any one of claims 1-8.

15. A computer-readable storage medium, characterized in that, It stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the face recognition method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Face-scanning payment system

    CN110766413A

  • Method and device for constructing priority face recognition database based on reservation request

    CN111353617A