Background
In recent years, with the improvement of the technical level of face recognition, the face recognition technology is widely applied to security protection of enterprises and residences as a mode of biological feature recognition technology; airport and railway station identity authentication; financial payment, etc. With further maturity of the technology and improvement of social acceptance, the face recognition technology is applied to more fields. The face recognition terminal is a terminal device for identity verification by using a face recognition technology, the working mode of the face recognition terminal is that a face photo of a person with authority is downloaded into the terminal device, when a terminal camera detects a face, real-time snapshot data information is compared with face photo information of the person with authority in a face base through a face algorithm, and if the comparison is successful, identity verification is passed.
The traditional face authority downloading adopts a mode that a system directly downloads all face photos with authority to a terminal, and after receiving the photos, terminal equipment extracts corresponding face characteristic values and stores the face characteristic values into a face bottom library of the terminal for identification and comparison. Because the data of the photos is large, and the face terminals need to process the characteristic values within a certain time, when a plurality of face terminals need to download a large number of rights, for example, more than 2000 persons are downloaded simultaneously by 50 terminal devices, or the rights are not balanced, for example, the number of persons downloaded by a part of terminal devices is less than 100 persons, the number of persons downloaded by a part of terminal devices is more than 5000 persons, and the time of 1 hour may be required for completing downloading of all the rights, which seriously affects the use of users.
Disclosure of Invention
The invention aims to solve the technical problem of providing a method for quickly authorizing the face authority, aiming at the defects of the prior art.
The technical scheme adopted by the invention for solving the technical problems is as follows: a quick authorization method for face authority is constructed, and the method comprises the following steps:
s1, searching an idle face recognition terminal in a system;
s2, downloading the person face picture with the authority into the idle face recognition terminal for characteristic value extraction, receiving the characteristic value and storing the characteristic value into a database;
and S3, downloading the characteristic values of the face photos of the persons with the authority in the database to the corresponding face recognition terminal according to the preset authority records.
Preferably, in the method for quickly authorizing a face authority of the present invention, the step S1 includes:
s1-1, recording a face recognition terminal used in the registration system;
and S1-2, analyzing the idle face recognition terminal according to the historical operating data of the used face recognition terminal.
Preferably, in the method for quickly authorizing the face authority of the present invention,
the step S1-1 further includes:
classifying the used face recognition terminals according to algorithm versions;
the step S1-2 of analyzing an idle face recognition terminal includes:
and analyzing the idle face recognition terminal in the face recognition terminals with the same algorithm.
Preferably, in the method for quickly authorizing a face authority of the present invention, the step S2 of downloading the picture of the face of the person with authority to the idle face recognition terminal for feature value extraction includes:
and S2-1, distributing a corresponding number of people face photos with authority to the idle face recognition terminal according to the idle degree to extract the characteristic value.
Preferably, in the method for quickly authorizing a face authority of the present invention, the step S1-2 includes:
and searching the normally online used face recognition terminal, and estimating the service bearing capacity in the next preset time period according to the historical service bearing capacity and the current service bearing capacity to obtain the idle face recognition terminal.
Preferably, in the method for quickly authorizing a face authority of the present invention, the step S2-1 includes:
calculating the characteristic value extraction quantity of the face recognition terminal in the preset time period according to the estimated service carrying capacity in the next preset time period;
distributing a corresponding number of people face photos with authority and extracting characteristic value instructions to an idle face recognition terminal according to the characteristic value extraction number;
and receiving the characteristic value extracted from the face photo by the face recognition terminal according to the characteristic value extracting instruction, and storing the characteristic value in the database.
Preferably, in the method for quickly authorizing a face permission of the present invention, the step of performing service carrying capacity estimation in a next preset time period according to a historical service carrying capacity and a current service carrying capacity includes:
searching a historical record, and counting historical identification traffic of the face identification terminal in the same historical preset time period;
obtaining a historical service bearing capacity score F1 of the face recognition terminal according to the historical recognition service capacity comparison service bearing capacity score calculation table;
counting the recognition service volume of the face recognition terminal in a previous preset time period, and obtaining a current service bearing capacity score F2 of the face recognition terminal by referring to a service bearing capacity score calculation table;
predicting the service bearing capacity value F in the next preset time period according to the historical service bearing capacity value F1 and the current service bearing capacity value F2;
the service bearing capacity value calculation table is a corresponding table for identifying service capacity and service bearing capacity.
Preferably, in the method for quickly authorizing a face authority of the present invention, the step of counting the historical recognition traffic of the face recognition terminal in the same preset time period as the history includes:
respectively counting historical identification traffic of the face identification terminal in the same preset time period according to the mode of day, week and month; wherein the content of the first and second substances,
the average daily record number D1 is the number R1 of traffic records in a preset time period of the historical record in daily units;
the average weekly record number D2 is the number R2 of traffic records in a preset time period with the historical record in the week unit/statistical days;
the average monthly record number D3 is the number R3 of passing records in the preset time period of the historical records in the unit of months/statistical days;
the historical identification traffic D is the daily average record count D1, the dynamic adjustment factor P1+ the weekly average record count D2, the dynamic adjustment factor P2+ the monthly average record count D3, and the dynamic adjustment factor P3.
Preferably, in the method for quickly authorizing a face permission of the present invention, the step of predicting a service carrying capacity score F in a next preset time period according to the historical service carrying capacity score F1 and the current service carrying capacity score F2 includes:
and the service bearing capacity score F in the next preset time period is equal to (historical service bearing capacity score F1+ current service bearing capacity score F2)/2.
Preferably, in the method for quickly authorizing a face authority of the present invention, the step of calculating the number of extracted feature values of the face recognition terminal in a preset time period according to the estimated service carrying capacity in the next preset time period includes:
the method comprises the steps that the feature value extraction quantity of the face recognition terminals in a preset time period is equal to the highest value of the feature quantity extracted by each face recognition terminal in the set preset time period, and the service bearing capacity value F in the next preset time period is dynamically distributed.
Preferably, in the method for quickly authorizing a face authority according to the present invention, before the step S2, the method further includes:
inputting the face photo of the person into the database;
and caching the face photos of the persons with the authority into a data cache pool.
Preferably, in the method for quickly authorizing a face authority according to the present invention, before the step S3, the method further includes:
and carrying out authorization operation on the used face recognition terminal, distributing personnel permission to the corresponding face recognition terminal, and generating a corresponding permission record.
Preferably, in the method for quickly authorizing a face authority of the present invention, the step S3 includes:
encrypting and protecting the characteristic value data of the face photo of the person with the authority;
and downloading the encrypted characteristic value data to a corresponding face recognition terminal according to the authority record, and verifying the integrity of the data.
By implementing the invention, the following beneficial effects are achieved:
the invention searches the idle face recognition terminal in the system; downloading the person face photos with the authority into an idle face recognition terminal for characteristic value extraction, receiving the characteristic values and storing the characteristic values into a database; according to the preset authority record, the characteristic values of the face photos of the persons with the authority in the database are downloaded to the corresponding face recognition terminals, so that the task of extracting the characteristic values is divided into a plurality of face recognition terminals to be executed simultaneously, compared with the independent execution of a single face recognition terminal, the working efficiency is greatly improved, the terminal can directly use the photo characteristic values which are already extracted, the repeated work that the characteristic values of the same photo need to be extracted again on each terminal is avoided, and the face authority downloading speed is greatly improved.
Detailed Description
For a more clear understanding of the technical features, objects and effects of the present invention, embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
As shown in fig. 1, the invention constructs a method for quickly authorizing a face authority, comprising the following steps:
s1, searching an idle face recognition terminal in a system;
s2, downloading the face picture of the person with the authority into an idle face recognition terminal for characteristic value extraction, receiving the characteristic value and storing the characteristic value into a database;
and S3, downloading the characteristic values of the face photos of the persons with the authority in the database to the corresponding face recognition terminal according to the preset authority records. For example, the person who works in the office area is a person who has the authority to enter the office area, and the person who works in the factory is a person who does not have the authority to enter the office area.
In some embodiments, step S3 is preceded by: and carrying out authorization operation on the used face recognition terminal, distributing personnel permission to the corresponding face recognition terminal, and generating a corresponding permission record in a database. In this step, the preset authority record means that a person having authority to enter the financial room corresponds to the face recognition terminal of the financial room.
In some embodiments, step S1 is preceded by: and inputting all the people face photos with the authority into a database, and caching the people face photos with the authority into a data cache pool. The data in the data cache pool can be updated in real time according to face authorization, namely, when the persons with the authority are added, the system can input new face photos of the persons with the authority and cache the photos into the data cache pool. Step S2 also includes: and downloading the face photos of the persons with the authority in the data cache pool to an idle face recognition terminal for characteristic value extraction. In other embodiments, whether the person face photos with the authority which are not extracted still exist in the data cache pool can be judged in real time, if yes, the person face photos with the authority in the data cache pool are continuously downloaded to an idle face recognition terminal for feature value extraction.
In some embodiments, step S1 specifically includes:
step S1-1, inputting a face recognition terminal used in a registration system;
and step S1-2, analyzing the idle face recognition terminal according to the historical operating data of the used face recognition terminal.
In some embodiments, step S1-1 further includes: and classifying the used face recognition terminal according to the algorithm version. Because the algorithm versions of the face recognition terminals of different manufacturers are different and the extracted characteristic values are also different, the face recognition terminals are classified according to the algorithm versions, and when the characteristic values are extracted subsequently, the characteristic values can be extracted according to the requirements of the algorithm versions. Therefore, the step S1-2 of analyzing an idle face recognition terminal further includes: and intelligently analyzing idle face recognition terminals in the face recognition terminals with the same algorithm.
In some embodiments, the downloading the picture of the human face with the authority to the idle face recognition terminal for feature value extraction in step S2 includes:
and step S2-1, according to the idle degree of each idle face recognition terminal, distributing a corresponding number of person face photos with authority to the idle face recognition terminal for feature value extraction. For example, if there are 10 persons with authority, the first and second face recognition terminals that are idle are found, but the idle degree of the first face recognition terminal is higher than that of the second face recognition terminal, then 7 persons with authority are assigned to the first face recognition terminal, and 3 persons with authority are assigned to the second face recognition terminal, so as to respectively extract the characteristic values, and then the characteristic values returned by the idle first and second face recognition terminals are received and stored in the database.
In some embodiments, step S1-2 further includes: and searching for the normally online used face recognition terminal, for example, searching for the normally online used face recognition terminal of the same algorithm within one minute, and performing service bearing capacity estimation within the next preset time period according to the historical service bearing capacity and the current service bearing capacity to obtain an idle face recognition terminal.
Therefore, step S2-1 also further includes:
calculating the characteristic value extraction quantity of the face recognition terminal in the preset time period according to the estimated service bearing capacity in the next preset time period; wherein the preset time period is 1 minute. In other embodiments, it may be 2 minutes or 3 minutes.
According to the number of extracted feature values, distributing a corresponding number of face photos of persons with authority and extracting feature value instructions to an idle face recognition terminal;
and receiving the characteristic value extracted from the face photo by the face recognition terminal according to the characteristic value extracting instruction, and storing the characteristic value in a database.
The embodiment is used as the core of the invention, the service bearing capacity of the equipment is analyzed and predicted through the historical operating data of the face recognition terminal equipment, the next minute service processing capacity is judged, and the extraction quantity of the characteristic values is adjusted and calculated.
In some embodiments, the step of performing service bearer estimation in a next preset time period according to the historical service bearer and the current service bearer includes:
searching a historical record, and counting historical identification traffic of the face identification terminal in the same historical preset time period; wherein the preset time period is 1 minute. In other embodiments, it may be 2 minutes or 3 minutes.
Comparing a service bearing capacity score calculation table shown in table 1 according to historical identification service capacity to obtain a historical service bearing capacity score F1 of the face identification terminal;
counting the recognition service volume of the face recognition terminal in the previous preset time period, and obtaining the current service bearing capacity score F2 of the face recognition terminal by referring to the service bearing capacity score calculation table shown in the table 1;
predicting the service bearing capacity value F in the next preset time period according to the historical service bearing capacity value F1 and the current service bearing capacity value F2;
the service carrying capacity score calculation table is a correspondence table for identifying service capacity and service carrying capacity, and is shown in table 1:
TABLE 1
Identifying traffic
|
0-5
|
6-15
|
16-35
|
36-50
|
51-60
|
61-70
|
71-80
|
81-90
|
91-100
|
>100
|
Traffic carrying capacity
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10 |
In some embodiments, the step of counting historical recognition traffic of the face recognition terminal in the same preset time period of the history comprises:
respectively counting historical identification traffic of the face identification terminal in the same preset time period according to the mode of day, week and month; wherein the content of the first and second substances,
the average daily record number D1 is the number R1 of traffic records in a preset time period of the historical record in daily units; for example, when the current time is 8 months, 21 points, 15 points and 01 points, the device runs for two days, the number of passage records of 15 points and 01 points is 8 yesterday, and the number of passage records of 15 points and 01 points is 12 last day, the average daily record number D1 is (8+12)/2 is 10;
the average weekly record number D2 is the number R2 of traffic records in a preset time period with the historical record in the week unit/statistical days; for example, if the current time is tuesday 15: 01, the device has been operated for two weeks, the number of passage records for last tuesday 15: 01 is 8, and the number of passage records for last tuesday 15: 01 is 12, the week average record number D2 is (8+12)/2 is 10;
the average monthly record number D3 is the number R3 of passing records in the preset time period of the historical records in the unit of months/statistical days; for example, when the current time is 8 months, 21 points and 15 points for 01 minutes, the equipment runs for two months, the number of the passage records of the previous month, 21 points and 15 points for 01 minutes is 8, and the number of the passage records of the previous month, 21 points and 15 points for 01 minutes is 12, the average daily record number D1 is (8+12)/2 is 10;
the historical identification traffic D is the daily average record count D1, the dynamic adjustment factor P1+ the weekly average record count D2, the dynamic adjustment factor P2+ the monthly average record count D3, and the dynamic adjustment factor P3. The dynamic adjustment factor is obtained by analyzing historical data by the system through a rule of an exponential smoothing method. And comparing the historical identification service D serving as basic data with a service bearing capacity score table to obtain a historical service bearing capacity score F1. For example, the historical identification traffic is 0-5, the historical service carrying capacity score is 1, the historical identification traffic exceeds 100, and the historical service carrying capacity score is 10.
In some embodiments, the step of predicting the service bearing capacity score F in the next preset time period according to the historical service bearing capacity score F1 and the current service bearing capacity score F2 includes:
and the service bearing capacity score F in the next preset time period is equal to (historical service bearing capacity score F1+ current service bearing capacity score F2)/2.
In some embodiments, the step of calculating the number of extracted feature values of the face recognition terminal in the preset time period according to the estimated service carrying capacity in the next preset time period includes:
and extracting the highest value of the characteristic quantity-dynamic distribution factor of the service bearing capacity value F in the next preset time period by each face recognition terminal in the preset time period. The dynamic allocation factor is actually an empirical value, for example, the value is determined according to the number of devices and the number of users, the total number of devices in the system is the number of users, and then a recommended value is obtained, namely the number of users is divided by the number of devices, and the larger the value is, the larger the dynamic allocation factor is.
In some embodiments, the characteristic value data may also be integrity-protected using a hash algorithm, and step S3 includes:
encrypting and protecting the characteristic value data of the face photo of the person with the authority;
and downloading the encrypted characteristic value data to a corresponding face recognition terminal according to the authority record, and verifying the integrity of the data.
Specifically, a face recognition terminal requests a data encryption key; the upper software returns the encrypted key K ciphertext data, and the face recognition terminal decrypts the encrypted key K to obtain a data encrypted key K; the upper software uses the key K to encrypt and protect the face characteristic value data; and after the face recognition terminal receives the face characteristic value data, the data integrity is checked by using the key K. And the face recognition terminal stores the face characteristic value data after the data integrity authentication is successful.
By implementing the invention, the following beneficial effects are achieved:
the invention searches the idle face recognition terminal in the system; downloading the person face photos with the authority into an idle face recognition terminal for characteristic value extraction, receiving the characteristic values and storing the characteristic values into a database; according to the preset authority record, the characteristic values of the face photos of the persons with the authority in the database are downloaded to the corresponding face recognition terminals, so that the task of extracting the characteristic values is divided into a plurality of face recognition terminals to be executed simultaneously, compared with the independent execution of a single face recognition terminal, the working efficiency is greatly improved, the terminal can directly use the photo characteristic values which are already extracted, the repeated work that the characteristic values of the same photo need to be extracted again on each terminal is avoided, and the face authority downloading speed is greatly improved.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the scope of the invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the invention without departing from its scope. Therefore, it is intended that the invention not be limited to the particular embodiment disclosed, but that the invention will include all embodiments falling within the scope of the appended claims.