CN114840328A - Face recognition method and device, electronic equipment and storage medium - Google Patents

Face recognition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114840328A
CN114840328A CN202110047811.7A CN202110047811A CN114840328A CN 114840328 A CN114840328 A CN 114840328A CN 202110047811 A CN202110047811 A CN 202110047811A CN 114840328 A CN114840328 A CN 114840328A
Authority
CN
China
Prior art keywords
memory
face
target
data set
face data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110047811.7A
Other languages
Chinese (zh)
Inventor
彭旭康
周俊
郭润增
王少鸣
王军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110047811.7A priority Critical patent/CN114840328A/en
Publication of CN114840328A publication Critical patent/CN114840328A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

Landscapes

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

Abstract

The application discloses a face recognition method, a face recognition device, an electronic device and a storage medium, wherein the face recognition method comprises the following steps: when a face recognition request triggered by a target terminal is received, calling memory information and load information reported by the target terminal; acquiring historical access information corresponding to the face data to be recognized; selecting a target face data set from a plurality of face data sets based on the memory information and 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 can identify the face to be identified according to the data loading strategy and the target face data set.

Description

Face recognition method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a face recognition method, a face recognition device, electronic equipment and a storage medium.
Background
Biometric identification technology is technology for identifying an individual by using physiological characteristics or behavioral characteristics inherent to a human body through a computer. In the biometric technology, face recognition is widely used in identity recognition because of its convenience and rapidity.
At present, in most scenes, identity recognition based on face recognition has strong requirements on equipment, and on terminal equipment with different configurations or different use conditions, the memory capacity for local recognition is different, the scale of a corresponding supportable local face library may vary greatly, and if the number of face recognition tasks to be processed by a terminal exceeds the upper limit of the local face library, the processing speed of the terminal cannot meet the requirements of a user, and poor user experience is caused.
Disclosure of Invention
The application provides a face recognition method, a face recognition device, an electronic device and a storage medium, which can improve the face recognition efficiency and improve the user experience.
The application provides a face recognition method, which comprises the following steps:
when a face recognition request triggered by a target terminal is received, calling memory information and load information reported by the target terminal, wherein the face request to be recognized carries face data of a face to be recognized;
acquiring historical access information corresponding to the face data to be recognized, wherein the historical access information is access information generated by checking the face to be recognized based on a face database in a historical period, and the face database comprises a plurality of face data sets;
selecting a target face data set from a plurality of face data sets based on the memory information and 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 can load the target face data set to the local according to the data loading strategy and identify the face to be identified according to the loaded target face data set.
Correspondingly, this application still provides a face identification device, includes:
the system comprises a calling module, a judging module and a judging module, wherein the calling module is used for calling the memory information and the load information of a target terminal when receiving a face identification request triggered by the target terminal, and the face to be identified request carries face data of a face to be identified;
the acquisition module is used for acquiring historical access information corresponding to the face data to be recognized, the historical access information is access information generated by checking the face to be recognized based on a face database in a historical period, and the face database comprises a plurality of face data sets;
a selection module for selecting a target face data set from a plurality of face data sets based on the memory information and the historical access information;
the generating module is used for 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 the sending module is used for sending the target face data set and the data loading strategy to the target terminal so that the target terminal can load the target face data set to the local according to the data loading strategy and identify the face to be identified according to the loaded target face data set.
Optionally, in some embodiments of the present application, the selecting module includes:
the first generating unit is used for generating an idle memory of the terminal according to the memory information;
the first selection unit is used for selecting a face data set with the memory scale corresponding to the free memory from a plurality of face data sets to obtain a candidate face data set;
a second selection unit for selecting a target face data set from the selected candidate face data sets based on the historical access information.
Optionally, in some embodiments of the present application, the first generating unit includes:
an extracting subunit, configured to extract an available memory and a minimum limit memory of the terminal from the memory information;
and the generating subunit is used for generating the idle memory of the terminal based on the difference value between the available memory and the lowest limit memory.
Optionally, in some embodiments of the present application, the generating subunit is specifically configured to:
acquiring a preset coefficient;
calculating the difference between the available memory and the minimum limit memory to obtain a reserved memory;
and calculating the product of the reserved memory and a preset coefficient to obtain the idle memory of the terminal.
Optionally, in some embodiments of the present application, the first selecting unit is specifically configured to:
according to the historical access information, determining access behavior information of each face data set accessed by the face to be recognized in a historical period, wherein the access behavior information comprises access time and access frequency;
based on the access time and the access frequency, calculating access weights corresponding to the candidate face data sets by adopting a preset algorithm;
and determining the candidate face data set with the highest access weight as a target face data set.
Optionally, in some embodiments of the present application, the generating module includes:
the extraction unit is used for extracting the resource occupancy rate of the target terminal and the service quantity of the face recognition service from the load information;
a determining unit, configured to determine, based on the resource occupancy rate and the number of services of the face recognition service, a current available memory corresponding to the target terminal;
and the second generating unit is used for generating a data loading strategy when the target terminal loads the target face data set according to the current available memory and the memory occupation amount of the target face data set.
Optionally, in some embodiments of the present application, the second generating unit is specifically configured to:
detecting a memory difference between the memory occupation amount of the current available memory and the memory occupation amount of the target face data set;
when the current available memory is detected to be larger than the memory occupation amount of a target face data set, generating a first data loading strategy, wherein the first data loading strategy indicates to reserve the data of a face database in the target terminal and loads the data of the target face data set into the target terminal;
when the current available memory is detected to be equal to the memory occupation amount of a target face data set, generating a second data loading strategy, wherein the second data loading strategy indicates to delete the data of the face database in the target terminal and load the data of the target face data set into the target terminal;
and when the current available memory is detected to be smaller than the memory occupation amount of the target face data set, generating a third data loading strategy, wherein the third data loading strategy indicates to delete the data of the face database in the target terminal and load the data of the target face data set into the target terminal in a sectional manner.
Optionally, in some embodiments of the present application, the invoking module is specifically configured to:
detecting whether the memory information of the target terminal is stored locally; when the memory information of the target terminal is locally stored, detecting a timestamp for storing the memory information; when the timestamp of the memory information meets a preset condition, calling the locally stored memory information of the target terminal; when the timestamp of the memory information does not meet the preset condition, acquiring the memory information of the target terminal from the target terminal, and;
and acquiring the load information of the target terminal from the target terminal in real time.
When a face recognition request triggered by a target terminal is received, memory information and complex information of the target terminal are called, after the face recognition request carries face data of a face to be recognized, historical access information corresponding to the face data to be recognized is obtained, the historical access information is access information generated by the face to be recognized based on a face database check in a historical time period, the face database comprises a plurality of face data sets, then a target face data set is selected from the plurality of face data sets based on the memory information and the historical access information, then a data loading strategy when the target terminal loads the target face data set is generated according to memory occupation amount and load information of the target face data set, and finally the target face data set and the data loading strategy are sent to the target terminal, according to the scheme of the application, the target face data set and the data loading strategy are sent to the target terminal according to the memory occupation amount and the load information of the target face data set, so that the target terminal can recognize the face to be recognized according to the data loading strategy and the target face data set, corresponding face data can be issued to the target terminal as required during face recognition, the phenomenon that the number of processed face recognition tasks exceeds the upper limit of a local face library is avoided, the face recognition efficiency is improved, and user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions in the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1a is a scene schematic diagram of a face recognition method provided in the present application;
fig. 1b is a schematic flow chart of a face recognition method provided in the present application;
fig. 2a is another schematic flow chart of a face recognition method provided in the present application;
FIG. 2b is a schematic diagram of a face-brushing payment system provided herein;
fig. 3 is a schematic structural diagram of a face recognition apparatus provided in the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
The technical solutions in the present application will be described clearly and completely with reference to the accompanying drawings in the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The application provides a face recognition method, a face recognition device, electronic equipment and a storage medium.
The face recognition device can be specifically integrated in a server, the server can be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and the face recognition device can also be a cloud server for providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN (content delivery network), big data and artificial intelligence platforms and the like. The server may be directly or indirectly connected to the terminal through a wired or wireless communication manner, and the terminal may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, or the like, but is not limited thereto, and the present application is not limited thereto.
For example, referring to fig. 1a, the present application provides a face recognition system, which includes a server 10, a terminal 20a and a terminal 20b, where the face recognition device is integrated on the server 10, when both the terminal a and the terminal b need to execute a face recognition task, and the server 10 receives a face recognition request triggered by the terminal a and a face recognition request triggered by the terminal b, and calls memory information and load information of the terminal a and memory information and load information of the terminal b, for convenience of description, the terminal a is taken as an example to specifically describe below, the server 10 obtains historical access information corresponding to face data to be recognized reported by the terminal a, where the historical access information is access information generated by verifying the face to be recognized based on a face database in a historical period, and the face database includes a plurality of face data sets, then, the server 10 selects a target face data set from the plurality of face data sets based on the memory information and the historical access information, then, the server 10 generates a data loading strategy when the terminal 20a loads the target face data set according to the memory occupation amount and the load information of the target face data set, and finally, the server 10 sends the target face data set and the data loading strategy to the terminal 20a so that the terminal 20a can recognize faces to be recognized according to the data loading strategy and the target face data set.
According to the face recognition method, the target face data set and the data loading strategy are sent to the terminal according to the memory occupation amount of the target face data set and the current load information of the terminal, so that the terminal can load the target face data set to the local according to the data loading strategy and recognize the face to be recognized according to the loaded target face data set, and during subsequent face recognition, the number of processed face recognition tasks is prevented from exceeding the upper limit of a local face library, so that the face recognition efficiency is improved, and the user experience is improved.
The following are detailed below. It should be noted that the description sequence of the following embodiments is not intended to limit the priority sequence of the embodiments.
A face recognition method, comprising: when a face recognition request triggered by a target terminal is received, calling memory information and load information of the target terminal to obtain historical access information corresponding to face data to be recognized, selecting a target face data set from a plurality of 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 memory occupation and 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 can recognize faces to be recognized according to the data loading strategy and the target face data set.
Referring to fig. 1b, fig. 1b is a schematic flow chart of a face recognition method provided in the present application. The specific flow of the face recognition method can be as follows:
101. and when a face recognition request triggered by the target terminal is received, calling the memory information and the load information of the target terminal.
The terminal may be directly or indirectly connected by a wired or wireless communication manner, for example, a face recognition request triggered by a target terminal may be received through a wireless network, which is a network that can interconnect various communication devices without wiring. Wireless networking technologies cover a wide range of technologies, including both global voice and data networks that allow users to establish long-range wireless connections, and infrared and radio frequency technologies optimized for short-range wireless connections. Wireless networks can be classified into Wireless Wide Area networks (wwans), Wireless Local Area Networks (WLANs), Wireless Metropolitan Area Networks (WMANs), and Wireless Personal Area Networks (WPANs) according to Network coverage.
After a face recognition request triggered by a target terminal is received, whether the memory information of the target terminal is locally stored or not can be detected, when the memory information of the target terminal is locally stored, the memory information of the target terminal is locally acquired, and the load information of the target terminal is collected from the target terminal in real time; and when detecting that the memory information of the target terminal is not stored locally, acquiring the memory information and the load information of the target terminal from the target terminal in real time.
Further, in order to obtain validity of the memory information, optionally, in some embodiments, a time difference between the time stamp and the current time may be calculated by detecting a time stamp of the memory information, and when the time difference is smaller than or equal to a preset value, the memory information of the target terminal stored locally is called; if the time difference is greater than the preset value, obtaining the memory information of the target terminal from the target terminal, that is, the step "calling the memory information and the load information of the target terminal" may specifically include:
detecting whether the memory information of the target terminal is stored locally; when the memory information of the target terminal is detected to be locally stored, detecting a timestamp for storing the memory information; when the timestamp of the memory information meets a preset condition, calling the locally stored memory information of the target terminal; when the timestamp of the memory information does not meet the preset condition, acquiring the memory information of the target terminal from the target terminal, and;
and acquiring the load information of the target terminal from the target terminal in real time.
It should be noted that, in the present application, the face recognition request triggered by the target terminal may be received through a data transmission channel, where the number and type of the data transmission channels are not limited in the present application, and the number of the data transmission channels may be determined according to the number of communication channels that can be supported between the server, for example, the data transmission channels may include a WiFi channel, a third Generation mobile communication technology (3G) channel, a 4G (4G) channel, a fifth Generation mobile communication technology (5G) channel, or a wired channel.
102. And acquiring historical access information corresponding to the face data to be recognized.
The historical access information is access information generated by checking a face to be recognized based on a face database in a historical period, the face database comprises a plurality of face data sets, and it can be understood that the historical period specifically comprises: a first timestamp (e.g., time T1) and a second timestamp (e.g., time T2); moreover, a certain time interval may exist between the first time stamp and the second time stamp, that is, the first time stamp and the second time stamp may be used to distinguish the order of the face data set in the preset face database for the face data access. For example, the time T2 may be an access time when the face data to be recognized accesses the face data set in the preset face database, and the time T1 may be an access time when the face data to be recognized last accesses the face data set in the preset face database, that is, the time T1 here may be an access time immediately before the time T2. It should be understood that an access time interval without accessing the preset face database may be included between the time T1 and the time T2.
In addition, it should be noted that the historical access information further records the access times of the face data to be recognized to the face data set in the preset face database, for example, the historical access information records the access times of the face data to be recognized to the face data set a in the preset face database as 7 times, and the historical access information records the access times of the face data to be recognized to the face data set B in the preset face database as 6 times, which is determined according to actual conditions and is not described herein again.
103. A target face data set is selected from the plurality of face data sets based on the memory information and the historical access information.
For example, specifically, selecting a candidate face data set corresponding to the memory information from the plurality of face data sets, and then determining a target face data set from the selected candidate face data sets based on the historical access information, that is, optionally, in some embodiments, the step "selecting the target face data set from the plurality of face data sets based on the memory information and the historical access information" may specifically include:
(21) generating an idle memory of the terminal according to the memory information;
(22) selecting a face data set with a memory scale corresponding to the idle memory from a plurality of face data sets to obtain a candidate face data set;
(23) a target face data set is selected from the selected candidate face data sets based on the historical access information.
The memory information records the usage of the terminal memory, such as used memory and available memory, and the memory is a main component in the computer system and is used for storing programs and data during process running, which is also called executable memory. In a computer, memory space generally refers to main memory space (physical address space) or memory space allocated by a system for a user program. The address space (address space) represents the size of the memory occupied by any one computer entity. The source program is assembled or compiled and then processed into an assembly module of the program by a link editing program, and the assembly module is converted into a module for addressing relative addresses, and the module is addressed in the sequence with 0 as a base address. Relative addresses are also referred to as logical addresses or virtual addresses, and the space in a program that is made up of relative addresses is called a logical address space. The relative address space is converted to an absolute address space, also called the physical address space, by an address relocation mechanism. 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 method for allocating the memory space for the user program by the system has four modes of single continuous allocation, fixed partition allocation, dynamic partition allocation and dynamic relocation partition allocation.
A Memory (Memory) is also called an internal Memory and is used to temporarily store operation data in a CPU and data exchanged with an external Memory such as a hard disk. As long as the computer is in operation, the CPU transfers data to be operated to the memory for operation, and after the operation is finished, the CPU transmits the result, and the operation of the memory also determines the stable operation of the computer.
The available memory refers to a memory that is not currently used by the terminal, and in some embodiments, the available memory may be used as an idle memory, that is, a face data set with a memory size corresponding to the available memory is selected from a plurality of face data sets to obtain a candidate face data set.
However, considering that the terminal also has other application processes, for example, a system application process called when performing a face recognition task, and the like, in some embodiments, the available memory and the minimum limit memory of the terminal may also be extracted from the memory information to obtain a free memory, that is, optionally, in some embodiments, the step "generating the free memory of the terminal according to the memory information" may specifically include:
(31) extracting the available memory and the minimum limit memory of the terminal from the memory information;
(32) and generating the idle memory of the terminal based on the difference between the available memory and the minimum limit memory.
Wherein, the minimum limit memory refers to the memory occupied by the terminal when operating, such as the memory occupied by the application invoked when starting and/or executing the task, for example, the memory occupied by the application invoked when executing the face recognition task, besides executing the face recognition task, it also needs to consider the memory occupied by the task that may be executed while executing the face task, that is, in order to ensure that the terminal can perform another task while performing the face task, therefore, in some embodiments, after calculating the difference between the available memory and the minimum limit memory, the difference is multiplied by a preset coefficient, and the result is used as the free memory of the terminal, that is, optionally, in some embodiments, the step "generating a free memory of the terminal based on a difference between the available memory and the minimum limit memory" may specifically include:
(41) acquiring a preset coefficient;
(42) calculating a difference value between the available memory and the minimum limit memory to obtain a reserved memory;
(43) and calculating the product of the reserved memory and the preset coefficient to obtain the idle memory of the terminal.
The coefficient may be preset by the server or an operation and maintenance worker, for example, the server may generate the coefficient according to a history memory usage condition of the terminal, that is, in some embodiments, the history memory usage condition of the terminal may also be obtained, a coefficient corresponding to the terminal is generated according to the obtained history memory usage condition, and a mapping relationship between the coefficient and the terminal is generated, and when an idle memory of the terminal is generated according to memory information, a corresponding preset coefficient may be obtained according to the mapping relationship.
In addition, the preset coefficient is any number between the intervals (0,1), and is specifically selected according to the actual situation, that is, the free memory (available memory — minimum limit memory) is a preset coefficient, after the free memory is obtained, the face data sets with the memory size corresponding to the free memory are selected from the face data sets, so as to obtain candidate face data sets, and then, the target face data set is selected from the selected candidate face data sets based on the historical access information.
In order to speed up the efficiency of face recognition, the frequency and time of accessing each face data set by the face to be recognized may be considered, and a target face data set is selected from the selected candidate face data set, that is, optionally, in some embodiments, the step "selecting the target face data set from the selected candidate face data set based on the historical access information" may specifically include:
(51) according to the historical access information, determining access behavior information of the face to be recognized accessing each face data set in a historical time period;
(52) based on the access time and the access frequency, calculating access weights corresponding to the candidate face data sets by adopting a preset algorithm;
(53) and determining the candidate face data set with the highest access weight as a target face data set.
Here, the access behavior information includes access time and access frequency, and an algorithm Least Recently Used (LRU) algorithm needs to be proposed, where the LRU algorithm is a commonly Used page replacement algorithm and selects a page that is not Used most Recently to be eliminated. The algorithm assigns each page an access field for recording the time t elapsed since the page was last accessed, and when a page needs to be eliminated, selects the page with the largest t value in the existing pages, i.e. the least recently used page, to eliminate. The idea of the algorithm is that when the interruption of missing page occurs, the page with the longest unused time is selected for replacement. From the principle of program operation, the least recently used algorithm is a page replacement algorithm which is relatively close to the ideal, and the algorithm not only makes full use of the historical information of page calling in the memory, but also correctly reflects the local problems of the program.
In this embodiment, in combination with the idea of the LRU algorithm, a higher weight is given to candidate face data values with high access frequency and/or short access time, for example, the current access time is T, the history time period is T1 to T2, the number of times that the candidate face data set a is accessed in the history time period is 3, the number of times that the candidate face data set a is accessed in the history time period is 6, for convenience of representation, hereinafter, the access frequency of the candidate face data set a in the history time period is represented by a, and similarly, the access frequency of the candidate face data set B in the history time period is represented by B, it is understood that the access frequency a is less than the access frequency B, and the time that the candidate face data set a is accessed in the history time period is before the candidate face data set B is accessed in the history time period, so in this embodiment, the weight of the candidate face data set B may be given by 0.7, the weight of the candidate face data set B may be given to 0.3, but the given weight is not limited to this, and is only for illustration.
For another example, when the time when the candidate face data set B is accessed in the historical time period is before the time when the candidate face data set a is accessed in the historical time period, the access frequencies corresponding to the candidate face data set B and the candidate face data set a are the same as described above, then the weights corresponding to the candidate face data set B and the candidate face data set B under different scenes need to be determined according to actual conditions, and if the scene is concerned about more about the access time, then the weight given to the candidate face data set a is higher than the weight given to the candidate face data set B; if the scene is more concerned about access frequency, then the weight assigned to candidate face data set B is higher than the weight assigned to candidate face data set a.
104. And 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.
The load is the workload, and the load of the terminal is a concept describing the workload of the terminal. Generally speaking, a terminal load relates to the aspects of a processor, a memory, a disk, a network, and the like, and when the load is too high, the speed of the terminal processing a task is reduced, so that the task processing efficiency is reduced, and therefore, in some embodiments, the resource occupancy rate of the terminal and the service quantity of a face recognition service may be considered, that is, the step "generating a data loading policy when the target terminal loads the target face data set according to the memory occupancy amount and the load information of the target face data set" may specifically include:
(61) extracting the resource occupancy rate of the target terminal and the service quantity of the face recognition service from the load information;
(62) determining a current available memory corresponding to the target terminal based on the resource occupancy rate and the service quantity of the face recognition service;
(63) and generating a data loading strategy when the terminal loads the target face data set according to the current available memory and the memory occupation amount of the target face data set.
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 will be appreciated that the estimated memory footprint of the target face data set may be greater than the currently available memory, the terminal cannot load the target face data set locally at one time, and therefore, based on this situation, a data loading strategy when the terminal loads the target face data set can be generated according to the current available memory and the memory occupation amount of the target face data set, that is, optionally, in some embodiments, first, a memory difference between the currently available memory and the memory footprint of the target face data set may be detected, then, generating a data loading strategy corresponding to the memory difference, wherein the data loading strategy comprises the following conditions:
the first condition is as follows: and when the current available memory is detected to be larger than the memory occupation amount of the target face data set, generating a first data loading strategy, wherein the first data loading strategy indicates to reserve the data of the face database in the target terminal and loads the data of the target face data set into the target terminal.
Case two: and when the current available memory is detected to be equal to the memory occupation amount of the target face data set, generating a second data loading strategy, wherein the second data loading strategy indicates to delete the data of the face database in the target terminal and load the data of the target face data set into the target terminal.
Case three: and when the current available memory is detected to be smaller than the memory occupation amount of the target face data set, generating a third data loading strategy, wherein the third data loading strategy indicates to delete the data of the face database in the terminal and loads the data of the target face data set into the target terminal in a sectional manner.
105. And sending the target face data set and the data loading strategy to a target terminal so that the target terminal can identify the face to be identified according to the data loading strategy and the target face data set.
Face recognition is a biometric technology for identifying an identity based on facial feature information of a person. A series of related technologies, also commonly referred to as face recognition or face recognition, collect an image or video stream containing a human face with a camera or a video camera, automatically detect and track the human face in the image, and then perform face recognition on the detected human face.
The face recognition system mainly comprises four components, which are respectively: the method comprises the steps of face image acquisition and detection, face image preprocessing, face image feature extraction, matching and identification. Specifically, since the acquired original image is often not directly usable due to the limitation of various conditions and random interference, it must be subjected to image preprocessing such as gradation correction and noise filtering at an early stage of image processing. For the face image, the preprocessing process mainly comprises the steps of light compensation, gray level transformation, histogram equalization, normalization, geometric correction, filtering, sharpening and the like of the face image; features that can be used by a face recognition system are generally classified into visual features, pixel statistical features, face image transform coefficient features, face image algebraic features, and the like. The face feature extraction is performed on some features of the face. Face feature extraction, also known as face characterization, is a process of feature modeling for a face. The methods for extracting human face features are classified into two main categories: one is a knowledge-based characterization method; the other is a characterization method based on algebraic features or statistical learning; the knowledge-based characterization method mainly obtains feature data which is helpful for face classification according to shape description of face organs and distance characteristics between the face organs, and feature components of the feature data generally comprise Euclidean distance, curvature, angle and the like between feature points. The human face is composed of parts such as eyes, nose, mouth, and chin, and geometric description of the parts and their structural relationship can be used as important features for recognizing the human face, and these features are called geometric features. The knowledge-based face characterization mainly comprises a geometric feature-based method and a template matching method. And searching and matching the extracted feature data of the face image with a feature template stored in a database, and outputting a result obtained by matching when the similarity exceeds a threshold value by setting the threshold value. The face recognition is to compare the face features to be recognized with the obtained face feature template, and judge the identity information of the face according to the similarity degree. This process is divided into two categories: one is confirmation, which is a process of performing one-to-one image comparison, and the other is recognition, which is a process of performing one-to-many image matching comparison.
Further, the terminal may send the face recognition result to a server or other devices to perform other tasks, such as a face-brushing payment task, a face-brushing login task, or a face-brushing door-opening task, which is not limited herein and is specifically determined according to actual conditions.
The face recognition method comprises the steps of calling memory information and load information of a target terminal when a face recognition request triggered by the target terminal is received, then obtaining historical access information corresponding to face data to be recognized, then selecting a target face data set from a plurality of face data sets based on the memory information and the historical access information, then 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, finally sending the target face data set and the data loading strategy to the target terminal so that the target terminal can recognize faces to be recognized according to the data loading strategy and the target face data set, and sending the target face data set and the data loading strategy to the target terminal according to the memory occupation amount and the load information of the target face data set in the scheme of the face recognition method, the target terminal can conveniently identify the face to be identified according to the data loading strategy and the target face data set, and when the face is identified, the corresponding face data can be issued to the target terminal as required, so that the situation that the number of the processed face identification tasks exceeds the upper limit of a local face library is avoided, the face identification efficiency is improved, and the user experience is improved.
The method according to the examples is further described in detail below by way of example.
In this embodiment, the face recognition apparatus is specifically integrated in a server as an example.
Referring to fig. 2a, a specific process of a face recognition method may be as follows:
201. and when receiving a face recognition request triggered by the target terminal, the server calls the memory information and the load information of the target terminal.
The server can detect whether the memory information of the target terminal is locally stored or not after receiving the face recognition request triggered by the target terminal, and when detecting that the memory information of the target terminal is locally stored, the server locally acquires the memory information of the target terminal and acquires the load information of the target terminal from the target terminal in real time; and when detecting that the memory information of the target terminal is not stored locally, the server acquires the memory information and the load information of the target terminal from the target terminal in real time.
202. The server acquires historical access information corresponding to the face data to be recognized.
The historical access information is access information generated by checking a face to be recognized based on a face database in a historical period, the face database comprises a plurality of face data sets, and it can be understood that the historical period specifically comprises: a first timestamp (e.g., time T1) and a second timestamp (e.g., time T2); moreover, a certain time interval may exist between the first time stamp and the second time stamp here, that is, the first time stamp and the second time stamp here may be used to distinguish the order of accessing the face data set in the preset face database for the face data. For example, the time T2 may be an access time when the face data to be recognized accesses the face data set in the preset face database, and the time T1 may be an access time when the face data to be recognized last accesses the face data set in the preset face database, that is, the time T1 here may be an access time immediately before the time T2. It should be understood that an access time interval without accessing the preset face database may be included between the time T1 and the time T2. .
203. The server selects a target face dataset from the plurality of face datasets based on the memory information and the historical access information.
For example, specifically, the server selects candidate face data sets corresponding to the memory information from the plurality of face data sets, and then determines a target face data set from the selected candidate face data sets based on the history access information.
204. And the server generates 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.
For example, specifically, the server may determine a current available memory corresponding to the terminal according to the resource occupancy rate of the terminal and the service quantity of the face recognition service, and then, the server generates a data loading policy when the terminal loads the target face data set according to the current available memory and the memory occupancy rate of the target face data set.
Because the terminal has a large number of resident memory Programs (STR Programs) and automatic loading services, the current available memory of the terminal is not equal to the memory recorded in the memory information, and it can be understood that the estimated memory occupation amount of the target face data set may be larger than the current available memory, so that the terminal cannot load the target face data set to the local at one time.
205. And the server sends the target face data set and the 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 data set.
In order to further understand the face recognition scheme of the present application, a description is given below by taking a face brushing payment scenario as an example, and please refer to fig. 2b, which is a flowchart of a face brushing payment system as shown in the figure, where the face brushing payment system includes a server 10, a face brushing device 20, and a user 30, when the user 30 needs to perform face brushing payment through the face brushing device 20, the face brushing device 20 responds to a face brushing payment request (a face recognition request) of the user 30, and uploads memory information and load information of the face brushing device 20 to the server 10, where the face brushing payment request carries face data of a face to be recognized, and after receiving the memory information and the load information reported by the face brushing device 20, the server 10 obtains historical access information corresponding to the face data to be recognized, where the historical access information is access information generated by checking the face to be recognized based on a face database, the face database includes a plurality of face data sets, for example, the historical access information may reflect whether the user 30 performs face brushing payment by the face brushing device 20 in a historical time period, and the number of times of face brushing payment and the time of face brushing payment in the historical time period, then the server 10 selects a target face data set from the plurality of face data sets based on the memory information and the historical access information, then the server 10 generates a data loading policy when the face brushing device 20 loads the target face data set according to the memory occupation amount and the load information of the target face data set, and finally the server 10 sends the target face data set and the data loading policy to the face brushing device 20, so that the face brushing device 20 identifies a face to be identified according to the data loading policy and the target face data set.
The face brushing device 20 recognizes face information of the user 30 and sends the recognition result to the server 10, the server 10 executes a face brushing payment task according to the recognition result and sends the payment result to the face brushing device 20, and if the payment is successful, the face brushing device 20 can display prompt information of 'payment success' on a screen of the face brushing device 20; similarly, if the payment fails, the face brushing device 20 may display a prompt message of "payment failure" on the screen of the face brushing device 20, thereby completing a face brushing payment process.
The server acquires historical access information corresponding to the face data to be recognized after receiving the memory information reported by the terminal and the face data of the face to be recognized, then selects a target face data set from a plurality of face data sets based on the memory information and the historical access information, then generates a data loading strategy when the terminal loads the target face data set according to the memory occupation amount of the target face data set and the current load information of the terminal, finally, the server sends the target face data set and the data loading strategy to the terminal so that the terminal loads the target face data set to the local according to the data loading strategy and recognizes the face to be recognized according to the loaded target face data set, and in the scheme, according to the memory occupation amount and the load information of the target face data set, the target face data set and the data loading strategy are sent to the target terminal, so that the target terminal can recognize faces to be recognized according to the data loading strategy and the target face data set, corresponding face data can be issued to the target terminal as required during face recognition, the number of face recognition tasks is prevented from exceeding the upper limit of a local face library, face recognition efficiency is improved, and user experience is improved.
In order to better implement the face recognition method of the present application, the present application further provides a face recognition device (recognition device for short) based on the above. The meaning of the noun is the same as that in the above-mentioned face recognition method, and the specific implementation details can refer to the description in the method embodiment.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a face recognition apparatus provided in the present application, where the distribution apparatus may include a calling module 301, an obtaining module 302, a selecting module 303, a generating module 304, and a sending module 305, and specifically the following modules may be included:
the calling module 301 is configured to call memory information and load information of the target terminal when a face recognition request triggered by the target terminal is received.
The calling module 301 may be directly or indirectly connected to the terminal in a wired or wireless communication manner, for example, the calling module 301 may receive a face recognition request triggered by a target terminal through a wireless network, and after receiving the face recognition request triggered by the target terminal, may detect whether the memory information of the target terminal is stored locally, and when detecting that the memory information of the target terminal is stored locally, obtain the memory information of the target terminal from the local, and acquire the load information of the target terminal from the target terminal in real time; when detecting that the memory information of the target terminal is not stored locally, acquiring the memory information and the load information of the target terminal from the target terminal in real time, that is, optionally, in some embodiments, the invoking module 301 may be specifically configured to: detecting whether the memory information of the target terminal is stored locally; when the memory information of the target terminal is detected to be locally stored, detecting a timestamp for storing the memory information; when the timestamp of the memory information meets a preset condition, calling the locally stored memory information of the target terminal; and when the timestamp of the memory information does not meet the preset condition, acquiring the memory information of the target terminal from the target terminal, and acquiring the load information of the target terminal from the target terminal in real time.
The obtaining module 302 is configured to obtain historical access information corresponding to the face data to be recognized.
The historical access information is access information generated by checking a face to be recognized based on a face database in a historical period, the face database comprises a plurality of face data sets, and it can be understood that the historical period specifically comprises: a first timestamp (e.g., time T1) and a second timestamp (e.g., time T2); moreover, a certain time interval may exist between the first time stamp and the second time stamp, that is, the first time stamp and the second time stamp may be used to distinguish the order of the face data set in the preset face database for the face data access.
A selecting module 303, configured to select a target face data set from the plurality of face data sets based on the memory information and the historical access information.
For example, specifically, a candidate face data set corresponding to the memory information is selected from a plurality of face data sets, and then, based on the historical access information, a target face data set is determined in the selected candidate face data set, that is, optionally, in some embodiments, the selecting module 303 may specifically include:
the first generating unit is used for generating an idle memory of the terminal according to the memory information;
the first selection unit is used for selecting a face data set with a memory scale corresponding to the idle memory from a plurality of face data sets to obtain a candidate face data set;
a second selection unit for selecting a target face data set from the selected candidate face data sets based on the historical access information.
Optionally, in some embodiments, the first generating unit may specifically include:
the extracting subunit is used for extracting the available memory and the minimum limit memory of the terminal from the memory information;
and the generating subunit is used for generating the idle memory of the terminal based on the difference value between the available memory and the minimum limit memory.
Optionally, in some embodiments, the generating subunit may specifically be configured to: and obtaining a preset coefficient, calculating a difference value between the available memory and the lowest limit memory to obtain a reserved memory, and calculating a product of the reserved memory and the preset coefficient to obtain an idle memory of the terminal.
Optionally, in some embodiments, the first selecting unit is specifically configured to: according to historical access information, determining access behavior information of each face data set accessed by the face to be recognized in a historical period, wherein the access behavior information comprises access time and access frequency; based on the access time and the access frequency, calculating access weights corresponding to the candidate face data sets by adopting a preset algorithm; and determining the candidate face data set with the highest access weight as a target face data set.
The generating module 304 is configured to generate a data loading policy when the target terminal loads the target face data set according to the memory occupancy amount and the load information of the target face data set.
The load is the workload, and the load of the terminal is a concept describing the workload of the terminal. Generally, the load of the terminal relates to processor, memory, disk and network, and when the load is too high, the speed of the terminal processing task is reduced, thereby reducing the efficiency of task processing.
Optionally, in some embodiments, the generating module 304 may specifically include:
the extraction unit is used for extracting the resource occupancy rate of the terminal and the service quantity of the face recognition service from the load information;
the determining unit is used for determining the current available memory corresponding to the terminal based on the resource occupancy rate and the service quantity of the face recognition service;
and the second generating unit is used for generating a data loading strategy when the terminal loads the target face data set according to the current available memory and the memory occupation amount of the target face data set.
Optionally, in some embodiments, the second generating unit may specifically be configured to: detecting a memory difference between the current available memory and the memory occupation amount of the target face data set; generating a data loading strategy corresponding to the memory difference; when the current available memory is detected to be larger than the memory occupation amount of the target face data set, generating a first data loading strategy, wherein the first data loading strategy indicates to delete the data of the face database in the terminal and load the data of the target face data set into the terminal; when the current available memory is detected to be equal to the memory occupation amount of the target face data set, generating a second data loading strategy, wherein the second data loading strategy indicates to reserve the data of a face database in the terminal and loads the data of the target face data set into the terminal; and when the current available memory is detected to be smaller than the memory occupation amount of the target face data set, generating a third data loading strategy, wherein the third data loading strategy indicates to delete the data of the face database in the terminal and load the data of the target face data set into the terminal in a sectional manner.
The sending module 305 is configured to send the target face data set and the data loading policy to a target terminal, so that the terminal identifies a face to be identified according to the data loading and the target face data set.
When receiving a face recognition request triggered by a target terminal, a calling module 301 of the application calls memory information and load information of the target terminal, an obtaining module 302 obtains historical access information corresponding to face data to be recognized, then a selecting module 303 selects a target face data set from a plurality of face data sets based on the memory information and the historical access information, then a generating module 304 generates 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 finally a sending module 305 sends the target face data set and the data loading strategy to the target terminal so that the target terminal can recognize a local face to be recognized according to the data loading strategy and the target face data set, and in the scheme of the application, according to the memory occupation amount and the load information of the target face data set, the target face data set and the data loading strategy are sent to the target terminal, so that the target terminal can recognize faces to be recognized according to the data loading strategy and the target face data set, corresponding face data can be issued to the target terminal as required during face recognition, the number of processed face recognition tasks is prevented from exceeding the upper limit of a local face library, face recognition efficiency is improved, and user experience is improved.
In addition, the present application also provides an electronic device, as shown in fig. 4, which shows a schematic structural diagram of the electronic device related to the present application, specifically:
the electronic device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 4 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the whole electronic device by various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating 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, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic 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 access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 through a power management system, so that functions of managing charging, discharging, and power consumption are realized through the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may further include an input unit 404, and the input unit 404 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application program stored in the memory 402, thereby implementing various functions as follows:
when a face recognition request triggered by a target terminal is received, calling memory information and load information of the target terminal to obtain historical access information corresponding to face data to be recognized, selecting a target face data set from a plurality of 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 memory occupation and 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 can recognize faces to be recognized according to the data loading strategy and the target face data set.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
The method for recognizing the human face comprises the steps of calling memory information and load information of a target terminal when a human face recognition request triggered by the target terminal is received, then obtaining historical access information corresponding to human face data to be recognized, then selecting a target human face data set from a plurality of human face data sets based on the memory information and the historical access information, then generating a data loading strategy when the target terminal loads the target human face data set according to the memory occupation amount and the load information of the target human face data set, finally sending the target human face data set and the data loading strategy to the target terminal so that the target terminal can recognize the human face to be recognized according to the data loading strategy and the target human face data set, and sending the target human face data set and the data loading strategy to the target terminal according to the memory occupation amount and the load information of the target human face data set in the scheme of the application, the target terminal can conveniently identify the face to be identified according to the data loading strategy and the target face data set, and when the face is identified, the corresponding face data can be issued to the target terminal as required, so that the situation that the number of the processed face identification tasks exceeds the upper limit of a local face library is avoided, the face identification efficiency is improved, and the user experience is improved.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a storage medium having stored therein a plurality of instructions, which can be loaded by a processor to perform the steps of any of the face recognition methods provided by the present application. For example, the instructions may perform the steps of:
when a face recognition request triggered by a target terminal is received, calling memory information and load information of the target terminal to obtain historical access information corresponding to face data to be recognized, selecting a target face data set from a plurality of 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 memory occupation and 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 can recognize faces to be recognized according to the data loading strategy and the target face data set.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any one of the face recognition methods provided by the present application, the beneficial effects that can be achieved by any one of the face recognition methods provided by the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations described above.
The face recognition method, the face recognition device, the electronic device, and the storage medium provided by the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed, and in summary, the content of the present specification should not be construed as limiting the present invention.

Claims (15)

1. A face recognition method, comprising:
when a face recognition request triggered by a target terminal is received, calling memory information and load information of the target terminal, wherein the face recognition request carries face data of a face to be recognized;
acquiring historical access information corresponding to the face data to be recognized, wherein the historical access information is access information generated by checking the face to be recognized based on a face database in a historical period, and the face database comprises a plurality of face data sets;
selecting a target face data set from a plurality of face data sets based on the memory information and 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 can identify the face to be identified according to the data loading strategy and the target face data set.
2. The method of claim 1, wherein selecting a target face data set from a plurality of face data sets based on the memory information and historical access information comprises:
generating an idle memory of the terminal according to the memory information;
selecting a face data set with a memory scale corresponding to the free memory from a plurality of face data sets to obtain a candidate face data set;
a target face data set is selected from the selected candidate face data sets based on the historical access information.
3. The method according to claim 2, wherein the generating the free memory of the terminal according to the memory information comprises:
extracting the available memory and the minimum limit memory of the terminal from the memory information;
and generating the idle memory of the terminal based on the difference between the available memory and the minimum limit memory.
4. The method of claim 3, wherein the generating the free memory of the terminal based on the difference between the available memory and the minimum limit memory comprises:
acquiring a preset coefficient;
calculating the difference between the available memory and the minimum limit memory to obtain a reserved memory;
and calculating the product of the reserved memory and a preset coefficient to obtain the idle memory of the terminal.
5. The method of claim 2, wherein selecting a target face data set from the selected candidate face data sets based on the historical access information comprises:
according to the historical access information, determining access behavior information of each face data set accessed by the face to be recognized in a historical period, wherein the access behavior information comprises access time and access frequency;
based on the access time and the access frequency, calculating access weights corresponding to the candidate face data sets by adopting a preset algorithm;
and determining the candidate face data set with the highest access weight as a target face data set.
6. The method according to any one of claims 1 to 5, wherein the generating a data loading policy when the terminal loads the target face data set according to the memory occupancy and the load information of the target face data set comprises:
extracting the resource occupancy rate of the target terminal and the service quantity of the face recognition service from the load information;
determining a current available memory corresponding to the target terminal based on the resource occupancy rate and the service quantity of the face recognition service;
and generating a data loading strategy when the target terminal loads the target face data set according to the current available memory and the memory occupation amount of the target face data set.
7. The method according to claim 6, wherein the generating a data loading policy when the target terminal loads the target face data set according to the current available memory and the memory occupation amount of the target face data set comprises:
detecting a memory difference between the memory occupation amount of the current available memory and the memory occupation amount of the target face data set;
when the current available memory is detected to be larger than the memory occupation amount of a target face data set, generating a first data loading strategy, wherein the first data loading strategy indicates to reserve the data of a face database in the target terminal and loads the data of the target face data set into the target terminal;
when the current available memory is detected to be equal to the memory occupation amount of a target face data set, generating a second data loading strategy, wherein the second data loading strategy indicates to delete the data of the face database in the target terminal and load the data of the target face data set into the target terminal;
and when the current available memory is detected to be smaller than the memory occupation amount of the target face data set, generating a third data loading strategy, wherein the third data loading strategy indicates to delete the data of the face database in the target terminal and load the data of the target face data set into the target terminal in a sectional manner.
8. The method according to any one of claims 1 to 5, wherein the invoking the memory information and the load information of the target terminal comprises:
detecting whether the memory information of the target terminal is stored locally; when the memory information of the target terminal is detected to be locally stored, detecting a timestamp for storing the memory information; when the timestamp of the memory information meets a preset condition, calling the locally stored memory information of the target terminal; when the timestamp of the memory information does not meet the preset condition, acquiring the memory information of the target terminal from the target terminal, and;
and acquiring the load information of the target terminal from the target terminal in real time.
9. A face recognition apparatus, comprising:
the system comprises a calling module, a judging module and a judging module, wherein the calling module is used for calling the memory information and the load information of a target terminal when receiving a face identification request triggered by the target terminal, and the face to be identified request carries face data of a face to be identified;
the acquisition module is used for acquiring historical access information corresponding to the face data to be recognized, the historical access information is access information generated by checking the face to be recognized based on a face database in a historical period, and the face database comprises a plurality of face data sets;
a selection module for selecting a target face data set from a plurality of face data sets based on the memory information and the historical access information;
the generating module is used for 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 the sending module is used for sending the target face data set and the data loading strategy to the target terminal so that the target terminal can load the target face data set to the local according to the data loading strategy and identify the face to be identified according to the loaded target face data set.
10. The apparatus of claim 9, wherein the selection module comprises:
the first generating unit is used for generating an idle memory of the terminal according to the memory information;
the first selection unit is used for selecting a face data set with the memory scale corresponding to the free memory from a plurality of face data sets to obtain a candidate face data set;
a second selection unit for selecting a target face data set from the selected candidate face data sets based on the historical access information.
11. The apparatus of claim 10, wherein the first generating unit comprises:
an extracting subunit, configured to extract, from the memory information, an available memory and a minimum limit memory of the terminal;
and the generating subunit is used for generating the idle memory of the terminal based on the difference value between the available memory and the lowest limit memory.
12. The apparatus according to claim 11, wherein the generating subunit is specifically configured to:
acquiring a preset coefficient;
calculating the difference between the available memory and the minimum limit memory to obtain a reserved memory;
and calculating the product of the reserved memory and a preset coefficient to obtain the idle memory of the terminal.
13. The apparatus according to claim 10, wherein the first selecting unit is specifically configured to:
according to the historical access information, determining access behavior information of each face data set accessed by the face to be recognized in a historical period, wherein the access behavior information comprises access time and access frequency;
based on the access time and the access frequency, calculating access weights corresponding to the candidate face data sets by adopting a preset algorithm;
and determining the candidate face data set with the highest access weight as a target face data set.
14. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the face recognition method according to any of claims 1-8 are implemented when the program is executed by the processor.
15. A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, carries out the steps of the face recognition method according to any one of claims 1 to 8.
CN202110047811.7A 2021-01-14 2021-01-14 Face recognition method and device, electronic equipment and storage medium Pending CN114840328A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110047811.7A CN114840328A (en) 2021-01-14 2021-01-14 Face recognition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110047811.7A CN114840328A (en) 2021-01-14 2021-01-14 Face recognition method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114840328A true CN114840328A (en) 2022-08-02

Family

ID=82561182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110047811.7A Pending CN114840328A (en) 2021-01-14 2021-01-14 Face recognition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114840328A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117726925A (en) * 2024-02-07 2024-03-19 广州思涵信息科技有限公司 Face recognition resource scheduling method, device and equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117726925A (en) * 2024-02-07 2024-03-19 广州思涵信息科技有限公司 Face recognition resource scheduling method, device and equipment
CN117726925B (en) * 2024-02-07 2024-06-04 广州思涵信息科技有限公司 Face recognition resource scheduling method, device and equipment

Similar Documents

Publication Publication Date Title
CN107403173B (en) Face recognition system and method
CN109165093B (en) System and method for flexibly distributing computing node cluster
CN114416352A (en) Computing resource allocation method and device, electronic equipment and storage medium
CN106570087A (en) Distributed face recognition system
CN110673860A (en) Intelligent cloud data center construction and operation deployment system and method
CN112052759A (en) Living body detection method and device
CN114840328A (en) Face recognition method and device, electronic equipment and storage medium
CN108111390A (en) Contact management method, equipment and storage medium
CN110796591A (en) GPU card using method and related equipment
WO2021175010A1 (en) User gender identification method and apparatus, electronic device, and storage medium
CN114020416A (en) Large-page memory dynamic management method and device and computer equipment
CN113886086A (en) Cloud platform computing resource allocation method, system, terminal and storage medium
CN112149139B (en) Authority management method and device
US20240296315A1 (en) Artificial intelligence prompt processing and storage system
CN114267440B (en) Medical order information processing method and device and computer readable storage medium
CN115375453A (en) System resource allocation method and device
CN113904940A (en) Resource adjusting method and device, electronic equipment and computer readable storage medium
CN113867817B (en) Data processing method and device, electronic equipment and storage medium
CN116107761B (en) Performance tuning method, system, electronic device and readable storage medium
CN117251219B (en) Multi-system switching method and device based on scene recognition and PC host
CN116303110B (en) Memory garbage recycling method and electronic equipment
US20210232950A1 (en) Information processing system and method for controlling information processing system
CN113409051B (en) Risk identification method and device for target service
CN117376612A (en) Resource allocation method and device, electronic equipment and storage medium
CN117668107A (en) Data interaction method, device, equipment, storage medium and product for model training

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination