CN109992687A - Searching method, device, electronic equipment and the readable storage medium storing program for executing of human face data - Google Patents
Searching method, device, electronic equipment and the readable storage medium storing program for executing of human face data Download PDFInfo
- Publication number
- CN109992687A CN109992687A CN201910285920.5A CN201910285920A CN109992687A CN 109992687 A CN109992687 A CN 109992687A CN 201910285920 A CN201910285920 A CN 201910285920A CN 109992687 A CN109992687 A CN 109992687A
- Authority
- CN
- China
- Prior art keywords
- human face
- data
- face data
- word bank
- maximum value
- 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.)
- Granted
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Image Analysis (AREA)
Abstract
This application provides a kind of searching method of human face data, device, electronic equipment and computer readable storage mediums, are related to data processing field.This method comprises: when receiving human face data to be searched, preset face database stochastic averagina is divided into M parts, obtain M the first word bank of part, then it is directed to every a first word bank, it filters out with the highest N number of human face data of human face data similarity to be searched as the second word bank, the second word bank of M part is generated, then from M the second word bank of part, is selected with the highest T human face data of human face data similarity to be searched as search result;Wherein, M, N, T are positive integer.In this way, by the way that data acquisition system is grouped as multiple word banks, then the mode that multiple word bank merging rows are screened, can not only guarantee and traditional searching method accuracy rate having the same, and compared to traditional searching method, reduces resource consumption, improves search efficiency.
Description
Technical field
This application involves technical field of data processing, specifically, this application involves a kind of searching method of human face data,
Device, electronic equipment and computer readable storage medium.
Background technique
Present society is the society of a high speed development, and science and technology is flourishing, information flow, and the exchange between people is increasingly
Closely, life is also more and more convenient, and big data is exactly the product of this cyberage.
Nowadays many industries begin to use big data, such as public security organ that can use when recognition of face
Big data scans for.The population nearly 1,400,000,000 of China, public security organ need to search for one in 1,000,000,000 or more face database
People.Existing method is to extract the feature feature of 512 one byte of dimension to each face database first, calculates people to be measured
The L2 distance of feature in face feature and database, theoretically, for L2 apart from smaller, the face to be measured is more similar to database face,
But in order to avoid extraction it is inaccurate a possibility that and in order to avoid accidentally know generation, public security system generally require to one to
Face is surveyed, 1024 immediate faces are then filtered out from face database, are manually screened again one time by public security officer.
Existing method specifically: calculated one by one on GPU all feature of entire database with it is to be compared
The L2 distance of feature caches preceding 1024 L2 distances first, as soon as after hereafter often calculating a L2 distance, with caching
The maximum value of 1024 L2 distances is compared, if the L2 distance newly calculated is less than this maximum one in 1024, that
It needs to be inserted into this 1024, then deletes that maximum L2 distance from this 1024 the insides.Thus may be used
To remain that this 1024 are current calculated all inner the smallest 1024 L2 distances.
But the disadvantages of this method are as follows: to safeguard the list of one 1024 length always, and be calculated every time under worst case
After one new L2 result, will the top1024 list to caching search the operation of maximum value, not only process is complicated, and
And very time-consuming (time complexity is at least log (N)), resource is not enough, and screening knot can not be returned within the time less than 1s
Fruit, efficiency are lower.
Summary of the invention
This application provides a kind of searching method of human face data, device, electronic equipment and computer readable storage medium,
It can solve in existing face recognition process, the problem that process is complicated, time-consuming, efficiency is lower.The technical solution is as follows:
In a first aspect, a kind of searching method of human face data is provided, this method comprises:
When receiving human face data to be searched, preset face database stochastic averagina is divided into M parts, obtains M parts
First word bank;
For every a first word bank, filter out and the highest N number of face number of the human face data similarity to be searched
According to as the second word bank, the second word bank of M part is generated;
From M the second word bank of part, selects and make with the highest T human face data of the human face data similarity to be searched
For search result;Wherein, M, N, T are positive integer.
Preferably, described to be directed to every a first word bank, it filters out and the human face data similarity highest to be searched
N number of human face data as the second word bank, the step of generating the second word bank of M part, comprising:
Pick out N number of human face data at random from every a first word bank, calculate N number of human face data with it is described to be searched
Human face data N number of L2 distance, generate the first data list;
Filter out the first maximum value of first data list;
First maximum value is stored into preset maximum value variable, and by the corresponding address of first maximum value
It stores into preset index variables.
Preferably, described to be directed to every a first word bank, it filters out and the human face data similarity highest to be searched
N number of human face data as the second word bank, the step of generating the second word bank of M part, further includes:
Step A, it is directed to every a first word bank, any human face data in addition to N number of human face data is picked out, calculates it
With the L2 distance of the human face data to be searched, and by the maximum value of the L2 distance being calculated and first data list
It is compared;
If step B, the described data are less than the maximum value, the data are replaced into the maximum value, generate the second number
According to list;
Step C, the second maximum value of second data list is filtered out;
Step D, using the first maximum value in second maximum value replacement maximum value variable, and most using described second
It is worth corresponding address greatly, replaces the corresponding address of the first maximum value in preset index variables;
Step E, using second data list as the first data list;
Step A~step E is repeated, until all human face datas in the first word bank of M part complete screening.
Preferably, described to be directed to every a first word bank, it filters out and the human face data similarity highest to be searched
N number of human face data as the second word bank, the step of generating the second word bank of M part, specifically:
Based on preset on-site programmable gate array FPGA, by each part the first word bank average out at K part;Wherein, often
A part corresponds to a set of preset comparator;
The first word bank of each part in each part is sequentially input into corresponding comparator using time-sharing multiplex mechanism, is screened
Out with the highest top n human face data of human face data similarity to be searched as the second word bank;
Each second word bank in K part is merged, M the second word bank of part is obtained;Wherein, the FPGA is provided with M
RAM, each RAM are provided with the data list that capacity is N, and M is the integral multiple of K.
Preferably, described from M the second word bank of part, it selects and the highest T of human face data similarity to be searched
The step of a human face data is as search result, comprising:
The second word bank of described M part is stored to memory, and M*N human face data is arranged based on the size of similarity
Sequence, the ordered series of numbers after being sorted;
The highest T human face data of similarity is selected as search result from data column.
Second aspect provides a kind of device of the search of human face data, which includes:
Division module, for when receiving human face data to be searched, preset face database stochastic averagina to be divided
At M parts, M the first word bank of part is obtained;
First screening module filters out similar to the human face data to be searched for being directed to every a first word bank
Highest N number of human face data is spent as the second word bank, generates the second word bank of M part;
Second screening module, for selecting with the human face data similarity to be searched most from M the second word bank of part
T high human face data is as search result;Wherein, M, T are positive integer.
Preferably, first screening module includes:
Data list generates submodule, picks out N number of human face data at random from every a first word bank, calculates N number of
N number of L2 distance of human face data and the human face data to be searched generates the first data list;Wherein, N is positive integer;
Maximum value screens submodule, for filtering out the first maximum value of first data list;
Sub-module stored, for storing first maximum value into preset maximum value variable, and by described first
The corresponding address of maximum value is stored into preset index variables.
Preferably, first screening module further include:
First Comparative sub-module picks out any people in addition to N number of human face data for being directed to every a first word bank
Face data calculate the L2 distance of itself and the human face data to be searched, and the L2 distance being calculated and described first are counted
It is compared according to the maximum value of list;
Submodule is replaced, if being less than the maximum value for the data, the data are replaced into the maximum value, it is raw
At the second data list;
Second Comparative sub-module, for filtering out the second maximum value of second data list;
The replacement submodule is also used to using the first maximum value in second maximum value replacement maximum value variable,
And using the corresponding address of second maximum value, the corresponding address of the first maximum value in preset index variables is replaced;
Submodule is updated, for using second data list as the first data list;
First Comparative sub-module, the second Comparative sub-module, updates submodule and repeats replacement submodule, until M part the
All human face datas in one word bank complete screening.
Preferably, first screening module further include:
Submodule is called, for calling preset on-site programmable gate array FPGA, by each the first word bank of part average out at K
A part;Wherein, each part corresponds to a set of preset comparator;
Input submodule using time-sharing multiplex mechanism, is sequentially input pair for by the first word bank of each part in each part
The comparator answered is filtered out with the highest top n human face data of human face data similarity to be searched as the second word bank;
Merge submodule, for merging each second word bank in K part, obtains M the second word bank of part;Wherein, institute
It states FPGA and is provided with M RAM, each RAM is provided with the data list that capacity is N, and M is the integral multiple of K.
Preferably, second screening module includes:
Sorting sub-module, for storing the second word bank of described M part to memory, and based on the size of similarity to M*N
Human face data is ranked up, the ordered series of numbers after being sorted;
Submodule is selected, for selecting the highest T human face data of similarity from data column as search knot
Fruit.
The third aspect provides a kind of electronic equipment, which includes:
Processor, memory and bus;
The bus, for connecting the processor and the memory;
The memory, for storing operational order;
The processor, for by calling the operational order, executable instruction to execute processor such as the application
The corresponding operation of the searching method of human face data shown in first aspect.
Fourth aspect provides a kind of computer readable storage medium, calculating is stored on computer readable storage medium
Machine program, the program realize the searching method of human face data shown in the application first aspect when being executed by processor.
Technical solution provided by the present application has the benefit that
When receiving human face data to be searched, preset face database stochastic averagina is divided into M parts, obtains M parts
Then first word bank is directed to every a first word bank, filters out and the highest N number of face number of human face data similarity to be searched
According to as the second word bank, the second word bank of M part is generated, then from M the second word bank of part, select similar to human face data to be searched
Highest T human face data is spent as search result;Wherein, M, N, T are positive integer.In this way, by the way that data acquisition system is grouped as
Multiple word banks, then the mode that multiple word bank merging rows are screened, can not only guarantee having the same with traditional searching method
Accuracy rate, and compared to traditional searching method, reduce resource consumption, improve search efficiency.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, institute in being described below to the embodiment of the present application
Attached drawing to be used is needed to be briefly described.
Fig. 1 is a kind of flow diagram of the searching method for human face data that the application one embodiment provides;
Fig. 2 is a kind of structural schematic diagram of the searcher for human face data that the another embodiment of the application provides;
Fig. 3 is a kind of structural schematic diagram of the electronic equipment of the search for human face data that the another embodiment of the application provides.
Specific embodiment
Embodiments herein is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, and is only used for explaining the application, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one
It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in the description of the present application
Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition
Other one or more features, integer, step, operation, element, component and/or their group.It should be understood that when we claim member
Part is " connected " or when " coupled " to another element, it can be directly connected or coupled to other elements, or there may also be
Intermediary element.In addition, " connection " used herein or " coupling " may include being wirelessly connected or wirelessly coupling.It is used herein to arrange
Diction "and/or" includes one or more associated wholes for listing item or any cell and all combinations.
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with attached drawing to the application embodiment party
Formula is described in further detail.
Searching method, device, electronic equipment and the computer readable storage medium of human face data provided by the present application, it is intended to
Solve the technical problem as above of the prior art.
How the technical solution of the application and the technical solution of the application are solved with specifically embodiment below above-mentioned
Technical problem is described in detail.These specific embodiments can be combined with each other below, for the same or similar concept
Or process may repeat no more in certain embodiments.Below in conjunction with attached drawing, embodiments herein is described.
A kind of searching method of human face data is provided in one embodiment, as shown in Figure 1, this method comprises:
Preset face database stochastic averagina is divided into M when receiving human face data to be searched by step S101
Part, obtain M the first word bank of part;
Wherein, face database may include 1,000,000,000 or more human face datas.In embodiments of the present invention, it can set in advance
On-site programmable gate array FPGA is set, which is provided with M RAM (Random Access Memory, random access memory
Device), so, the quantity of RAM is identical in the quantity and FPGA that face database is divided, that is to say, that FPGA is provided with
How many a RAM, how many part just be divided by face database stochastic averagina.
Step S102 is filtered out and the highest N of human face data similarity to be searched for every a first word bank
A human face data generates the second word bank of M part as the second word bank;
In practical applications, public security organ be human face data to be searched is matched with face database, so, it is real
It is not directly to be screened to the human face data in face database, but first extract 512 for each human face data on border
Tie up the face characteristic an of byte and the face characteristic of human face data to be searched, then calculate face characteristic to be searched with
The L2 distance of each face characteristic in face database, then screened that (for L2 apart from smaller, this is to be searched to all L2 distances
Face is more similar to the face in face database), a certain number of L2 are obtained apart from minimum value, finally by these minimum values pair
The human face data answered is screened as target data.
So in embodiments of the present invention, for every a first word bank, first extracting the feature of wherein each human face data
Value, then calculates the L2 distance of face characteristic and each face characteristic to be searched, then screens to all L2 distances, obtains
To the top n L2 distance for meeting preset rules, finally each L2 is screened apart from corresponding human face data as the second son
Library, and so on, it is completed until M the first word bank of part screens, generates the second word bank of M part.
For example, the first word bank includes 100,000,000 human face datas, every human face data and human face data to be searched are calculated separately out
L2 distance after, 100,000,000 L2 distances are arranged according to sequence from small to large, choose top n, such as 128, L2 is apart from right
The human face data answered generates the second word bank.
It is described to be directed to every a first word bank in a kind of preferred embodiment of the present invention, filter out with it is described to be searched
The highest N number of human face data of human face data similarity is as the second word bank, the step of generating the second word bank of M part, comprising:
Pick out N number of human face data at random from every a first word bank, calculate N number of human face data with it is described to be searched
Human face data N number of L2 distance, generate the first data list;
Filter out the first maximum value of first data list;
First maximum value is stored into preset maximum value variable, and by the corresponding address of first maximum value
It stores into preset index variables.
Specifically, preset FPGA is provided with M RAM, each RAM is provided with the data list that capacity is N, i.e., each
RAM can store N number of L2 distance value, be additionally provided with a maximum value variable and an index variables, maximum value variable record should
The maximum value of L2 distance in RAM, index variables record the corresponding address of maximum value of L2 distance in the RAM;Wherein, data list
For unordered list.
After obtaining M the first word bank of part, for every a first word bank, N number of human face data can be picked out at random, is counted respectively
Calculate the L2 distance value (namely N number of L2 distance) of this N number of human face data Yu human face data to be searched, and by all L2 distances
Value storage generates the first data list into RAM, then filters out the maximum value in L2 distance value, and preset maximum is arrived in storage
It is worth in variable, and by the storage of the address of the maximum value into preset index variables.
It is described to be directed to every a first word bank in a kind of preferred embodiment of the present invention, filter out with it is described to be searched
The highest N number of human face data of human face data similarity is as the second word bank, the step of generating the second word bank of M part, further includes:
Step A, it is directed to every a first word bank, any human face data in addition to N number of human face data is picked out, calculates it
With the L2 distance of the human face data to be searched, and by the maximum value of the L2 distance being calculated and first data list
It is compared;
If step B, the described data are less than the maximum value, the data are replaced into the maximum value, generate the second number
According to list;
Step C, the second maximum value of second data list is filtered out;
Step D, using the first maximum value in second maximum value replacement maximum value variable, and most using described second
It is worth corresponding address greatly, replaces the corresponding address of the first maximum value in preset index variables;
Step E, using second data list as the first data list;
Step A~step E is repeated, until all human face datas in the first word bank of M part complete screening.
Specifically, being directed to every a first word bank, after generating the first data list, continuation is selected from the first word bank appoints
One data (in addition to the corresponding N number of data of the first data list), calculate its L2 distance value with data to be searched, if the L2
Distance value is smaller than the maximum value in the first data list, then the L2 distance value is replaced the maximum value in the first data list, raw
At the second data list, the maximum value of the second data list is then screened again, and after filtering out maximum value, new maximum value is deposited
It stores up into preset maximum value variable, meanwhile, the address of new maximum value is stored into preset index variables.
It is described to be directed to every a first word bank in a kind of preferred embodiment of the present invention, filter out with it is described to be searched
The highest N number of human face data of human face data similarity is as the second word bank, the step of generating the second word bank of M part, specifically:
Based on preset on-site programmable gate array FPGA, by each part the first word bank average out at K part;Wherein, often
A part corresponds to a set of preset comparator;
The first word bank of each part in each part is sequentially input into corresponding comparator using time-sharing multiplex mechanism, is screened
Out with the highest top n human face data of human face data similarity to be searched as the second word bank;
Each second word bank in K part is merged, M the second word bank of part is obtained;Wherein, the FPGA is provided with M
RAM, each RAM are provided with the data list that capacity is N, and M is the integral multiple of K.
For convenience of understanding, simple example is illustrated.For example, the first data list is { 1,4,7 }, deposited in maximum value variable
It stores up " 7 ", " 2 " are stored in index variables, and (" 1 " corresponding address is " 0 ", and " 4 " corresponding address is " 1 ", and " 7 " corresponding address is
" 2 "), it is small than maximum value " 7 " when new data " 3 " of coming in, just use " 3 " replacement " 7 ", generation the second data list 1,4,
3 }, screen again at this time, learn that maximum value is that " 4 " therefore store " 4 " into maximum value variable, by " 4 " corresponding address
" 1 " is stored into index variables.
The rest may be inferred, until all data in the first word bank complete screening, obtains the second word bank of N number of data, until M
The first word bank of part is fully completed screening, obtains M the second word bank of part.
In embodiments of the present invention, when executing step C, data screening can be carried out using comparator.Specifically, setting
A set of comparator, including 128+64+32+16+8+4+2 comparator are set, while M the first word banks being ranked up: 1,2,3 ...
M.Wherein, two or more data item are compared, to determine whether they are equal, or determine the size relation between them
And put in order and be known as comparing, the circuit or device that can be realized this comparing function are known as comparator.Comparator is by one
Circuit of the analog voltage signal compared with a reference voltage.The two-way input of comparator is analog signal, and output is then two
Binary signal 0 or 1, when the difference of input voltage increases or reduces and sign symbol is constant, output is kept constant.
Within the 1st clock cycle, when have another one new L2 apart from when, in 128 in the first one's share of expenses for a joint undertaking library most
Big value is compared;In the 2nd clock cycle, compared two-by-two using 64 comparators parallel, 128 numbers compare two-by-two
64 bigger numbers come out;64 numbers are compared using 32 comparators two-by-two in the 3rd clock cycle, then parallel, are obtained
32 bigger numbers come out.And so on, show that the new maximum value in the first one's share of expenses for a joint undertaking library is come in the 8th clock cycle.If new
L2 distance be less than current maximum, then new L2 distance is written in the index variables in the first one's share of expenses for a joint undertaking library.
Meanwhile within the 2nd clock cycle, a new L2 distance is inputted in the second one's share of expenses for a joint undertaking library, in the second one's share of expenses for a joint undertaking library
128 in maximum value be compared;The 3rd period, can be compared two-by-two using 64 comparators parallel, 128
Number show that 64 bigger numbers come;64 numbers are compared two-by-two using 32 comparators in the 4th clock cycle, then parallel
Compared with, obtain 32 bigger numbers come.And so on, the 9th clock cycle show that the new maximum value in the second one's share of expenses for a joint undertaking library is come.If
New L2 distance is less than current maximum, then is written to new L2 distance in the index variables in the second one's share of expenses for a joint undertaking library.
In this way, more parts of the first a set of comparators of word bank time-sharing multiplex, every set stream can be made by way of establishing assembly line
Waterline multiplexing comparator can save 7 times of comparator resource, to improve the efficiency of data processing.It further, can be with
Assembly line is covered by establishing K, M the first subdata of part time-sharing multiplex can be made to cover comparator, for example, 16 part of first word bank timesharing more
Two sets of (K=2) comparators are multiplexed, a set of comparator handles 8 part of first word bank or four sets of (K=4) comparators, a set of comparison
Device handles 4 part of first word bank, can further improve the efficiency of data processing in this way.
Step S103 is selected a with the highest T of human face data similarity to be searched from M the second word bank of part
Human face data is as search result;Wherein, M, N, T are positive integer.
It is described from M the second word bank of part in a kind of preferred embodiment of the present invention, it selects and the face to be searched
The step of highest T human face data of data similarity is as search result, comprising:
The second word bank of described M part is stored to memory, and M*N human face data is arranged based on the size of similarity
Sequence, the ordered series of numbers after being sorted;
The highest T human face data of similarity is selected as search result from data column.
Specifically, the second word bank that M parts of capacity are N is merged, M*N human face data is obtained, because at this time
Data volume is very small, it is possible to be screened without using comparator, filter out target data using application program
, specifically: L2 distance value corresponding to M*N human face data according to arranging from small to large, filter out before T L2 away from
From value, using the corresponding human face data of T L2 distance value as target data.Wherein, target data is similar to data to be searched
Spend highest data, that is to say, that T face is highest with human face similarity degree to be searched.
In embodiments of the present invention, when receiving human face data to be searched, preset face database is put down at random
M parts are divided into, M the first word bank of part is obtained, every a first word bank is then directed to, filters out similar to human face data to be searched
Spend highest N number of human face data as the second word bank, generate the second word bank of M part, then from M the second word bank of part, select and to
The highest T human face data of the human face data similarity of search is as search result;Wherein, M, N, T are positive integer.In this way, logical
Cross and data acquisition system be grouped as multiple word banks, then the mode that multiple word bank merging rows are screened, can not only guarantee with it is traditional
Searching method accuracy rate having the same, and compared to traditional searching method, reduce resource consumption, improve search effect
Rate.
Fig. 2 is a kind of structural schematic diagram of the searcher for human face data that the another embodiment of the application provides, such as Fig. 2 institute
Show, the device of the present embodiment may include:
Division module 201, for when receiving human face data to be searched, by preset face database stochastic averagina
It is divided into M parts, obtains M the first word bank of part;
First screening module 202 filters out and the human face data phase to be searched for being directed to every a first word bank
Like highest N number of human face data is spent as the second word bank, the second word bank of M part is generated;
Second screening module 203, for selecting similar to the human face data to be searched from M the second word bank of part
Highest T human face data is spent as search result;Wherein, M, T are positive integer.
In a kind of preferred embodiment of the present invention, first screening module includes:
Data list generates submodule, picks out N number of human face data at random from every a first word bank, calculates N number of
N number of L2 distance of human face data and the human face data to be searched generates the first data list;Wherein, N is positive integer;
Maximum value screens submodule, for filtering out the first maximum value of first data list;
Sub-module stored, for storing first maximum value into preset maximum value variable, and by described first
The corresponding address of maximum value is stored into preset index variables.
In a kind of preferred embodiment of the present invention, first screening module further include:
First Comparative sub-module picks out any people in addition to N number of human face data for being directed to every a first word bank
Face data calculate the L2 distance of itself and the human face data to be searched, and the L2 distance being calculated and described first are counted
It is compared according to the maximum value of list;
Submodule is replaced, if being less than the maximum value for the data, the data are replaced into the maximum value, it is raw
At the second data list;
Second Comparative sub-module, for filtering out the second maximum value of second data list;
The replacement submodule is also used to using the first maximum value in second maximum value replacement maximum value variable,
And using the corresponding address of second maximum value, the corresponding address of the first maximum value in preset index variables is replaced;
Submodule is updated, for using second data list as the first data list;
First Comparative sub-module, the second Comparative sub-module, updates submodule and repeats replacement submodule, until M part the
All human face datas in one word bank complete screening.
In a kind of preferred embodiment of the present invention, first screening module further include:
Submodule is called, for calling preset on-site programmable gate array FPGA, by each the first word bank of part average out at K
A part;Wherein, each part corresponds to a set of preset comparator;
Input submodule using time-sharing multiplex mechanism, is sequentially input pair for by the first word bank of each part in each part
The comparator answered is filtered out with the highest top n human face data of human face data similarity to be searched as the second word bank;
Merge submodule, for merging each second word bank in K part, obtains M the second word bank of part;Wherein, institute
It states FPGA and is provided with M RAM, each RAM is provided with the data list that capacity is N, and M is the integral multiple of K.
In a kind of preferred embodiment of the present invention, second screening module includes:
Sorting sub-module, for storing the second word bank of described M part to memory, and based on the size of similarity to M*N
Human face data is ranked up, the ordered series of numbers after being sorted;
Submodule is selected, for selecting the highest T human face data of similarity from data column as search knot
Fruit.
Human face data shown in the application one embodiment can be performed in the searcher of the human face data of the present embodiment
Searching method, realization principle is similar, and details are not described herein again.
A kind of electronic equipment is provided in the another embodiment of the application, which includes: memory and processor;
At least one program, is stored in memory, and when for being executed by processor, can realize compared with prior art: when receiving
When human face data to be searched, preset face database stochastic averagina is divided into M parts, M the first word bank of part is obtained, is then directed to
Every a first word bank is filtered out with the highest N number of human face data of human face data similarity to be searched as the second word bank, raw
At M the second word bank of part, then from M the second word bank of part, select and the highest T face number of human face data similarity to be searched
According to as search result;Wherein, M, N, T are positive integer.In this way, by the way that data acquisition system is grouped as multiple word banks, then will be multiple
Word bank merging rows screening mode, can not only guarantee with traditional searching method accuracy rate having the same, but also compared to
Traditional searching method reduces resource consumption, improves search efficiency.
A kind of electronic equipment is provided in one alternate embodiment, as shown in figure 3, electronic equipment shown in Fig. 3 3000
It include: processor 3001 and memory 3003.Wherein, processor 3001 is connected with memory 3003, such as passes through 3002 phase of bus
Even.Optionally, electronic equipment 3000 can also include transceiver 3004.It should be noted that transceiver 3004 in practical application
It is not limited to one, the structure of the electronic equipment 3000 does not constitute the restriction to the embodiment of the present application.
Processor 3001 can be CPU, general processor, DSP, ASIC, FPGA or other programmable logic device, crystalline substance
Body pipe logical device, hardware component or any combination thereof.It, which may be implemented or executes, combines described by present disclosure
Various illustrative logic blocks, module and circuit.Processor 3001 is also possible to realize the combination of computing function, such as wraps
It is combined containing one or more microprocessors, DSP and the combination of microprocessor etc..
Bus 3002 may include an access, and information is transmitted between said modules.Bus 3002 can be pci bus or
Eisa bus etc..Bus 3002 can be divided into address bus, data/address bus, control bus etc..Only to be used in Fig. 3 convenient for indicating
One thick line indicates, it is not intended that an only bus or a type of bus.
Memory 3003 can be ROM or can store the other kinds of static storage device of static information and instruction, RAM
Or the other kinds of dynamic memory of information and instruction can be stored, it is also possible to EEPROM, CD-ROM or other CDs
Storage, optical disc storage (including compression optical disc, laser disc, optical disc, Digital Versatile Disc, Blu-ray Disc etc.), magnetic disk storage medium
Or other magnetic storage apparatus or can be used in carry or store have instruction or data structure form desired program generation
Code and can by any other medium of computer access, but not limited to this.
Memory 3003 is used to store the application code for executing application scheme, and is held by processor 3001 to control
Row.Processor 3001 is for executing the application code stored in memory 3003, to realize aforementioned either method embodiment
Shown in content.
Wherein, electronic equipment includes but is not limited to: mobile phone, laptop, digit broadcasting receiver, PDA are (personal
Digital assistants), PAD (tablet computer), PMP (portable media player), car-mounted terminal (such as vehicle mounted guidance terminal) etc.
Deng mobile terminal and such as number TV, desktop computer etc. fixed terminal.
The another embodiment of the application provides a kind of computer readable storage medium, on the computer readable storage medium
It is stored with computer program, when run on a computer, computer is executed corresponding in preceding method embodiment
Content.Compared with prior art, when receiving human face data to be searched, preset face database stochastic averagina is divided into
M parts, M the first word bank of part is obtained, every a first word bank is then directed to, filters out and human face data similarity highest to be searched
N number of human face data generate the second word bank of M part as the second word bank, then from M the second word bank of part, select with it is to be searched
The highest T human face data of human face data similarity is as search result;Wherein, M, N, T are positive integer.In this way, by that will count
It is grouped as multiple word banks, then the mode that multiple word bank merging rows are screened according to set, can not only be guaranteed and traditional searcher
Method accuracy rate having the same, and compared to traditional searching method, reduce resource consumption, improve search efficiency.
It should be understood that although each step in the flow chart of attached drawing is successively shown according to the instruction of arrow,
These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps
Execution there is no stringent sequences to limit, can execute in the other order.Moreover, at least one in the flow chart of attached drawing
Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps
Completion is executed, but can be executed at different times, execution sequence, which is also not necessarily, successively to be carried out, but can be with other
At least part of the sub-step or stage of step or other steps executes in turn or alternately.
The above is only some embodiments of the invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (10)
1. a kind of searching method of human face data characterized by comprising
When receiving human face data to be searched, preset face database stochastic averagina is divided into M parts, obtains M part first
Word bank;
For every a first word bank, filters out and make with the highest N number of human face data of the human face data similarity to be searched
For the second word bank, the second word bank of M part is generated;
From M the second word bank of part, selects to be used as with the highest T human face data of the human face data similarity to be searched and search
Hitch fruit;Wherein, M, N, T are positive integer.
2. the searching method of human face data according to claim 1, which is characterized in that described for every a first son
Library is filtered out with the highest N number of human face data of human face data similarity to be searched as the second word bank, generates M part the
The step of two word banks, comprising:
N number of human face data is picked out at random from every a first word bank, calculates N number of human face data and the people to be searched
N number of L2 distance of face data generates the first data list;
Filter out the first maximum value of first data list;
First maximum value is stored into preset maximum value variable, and the corresponding address of first maximum value is stored
To in preset index variables.
3. the searching method of human face data according to claim 2, which is characterized in that described for every a first son
Library is filtered out with the highest N number of human face data of human face data similarity to be searched as the second word bank, generates M part the
The step of two word banks, further includes:
Step A, it is directed to every a first word bank, any human face data in addition to N number of human face data is picked out, calculates itself and institute
The L2 distance of human face data to be searched is stated, and the L2 distance being calculated and the maximum value of first data list are carried out
Compare;
If step B, the described data are less than the maximum value, the data are replaced into the maximum value, generate the second data column
Table;
Step C, the second maximum value of second data list is filtered out;
Step D, using the first maximum value in second maximum value replacement maximum value variable, and second maximum value is used
The corresponding address of the first maximum value in preset index variables is replaced in corresponding address;
Step E, using second data list as the first data list;
Step A~step E is repeated, until all human face datas in the first word bank of M part complete screening.
4. the searching method of human face data according to claim 1, which is characterized in that described for every a first son
Library is filtered out with the highest N number of human face data of human face data similarity to be searched as the second word bank, generates M part the
The step of two word banks, specifically:
Based on preset on-site programmable gate array FPGA, by each part the first word bank average out at K part;Wherein, each portion
Divide corresponding a set of preset comparator;
The first word bank of each part in each part is sequentially input into corresponding comparator using time-sharing multiplex mechanism, filter out with
The highest top n human face data of human face data similarity to be searched is as the second word bank;
Each second word bank in K part is merged, M the second word bank of part is obtained;Wherein, the FPGA is provided with M RAM,
Each RAM is provided with the data list that capacity is N, and M is the integral multiple of K.
5. the searching method of human face data according to claim 1, which is characterized in that described from M the second word bank of part, choosing
The step of selecting out with the highest T human face data of human face data similarity to be searched as search result, comprising:
The second word bank of described M part is stored to memory, and M*N human face data is ranked up based on the size of similarity, is obtained
Ordered series of numbers after to sequence;
The highest T human face data of similarity is selected as search result from data column.
6. a kind of searcher of human face data characterized by comprising
Division module, for when receiving human face data to be searched, preset face database stochastic averagina to be divided into M
Part, obtain M the first word bank of part;
First screening module is filtered out with the human face data similarity to be searched most for being directed to every a first word bank
High N number of human face data generates the second word bank of M part as the second word bank;
Second screening module, for selecting highest with the human face data similarity to be searched from M the second word bank of part
T human face data is as search result;Wherein, M, T are positive integer.
7. the searcher of human face data according to claim 6, which is characterized in that first screening module includes:
Data list generates submodule, picks out N number of human face data at random from every a first word bank, calculates N number of face
N number of L2 distance of data and the human face data to be searched generates the first data list;Wherein, N is positive integer;
Maximum value screens submodule, for filtering out the first maximum value of first data list;
Sub-module stored, for storing first maximum value into preset maximum value variable, and it is maximum by described first
It is worth corresponding address to store into preset index variables.
8. the searcher of human face data according to claim 7, which is characterized in that first screening module is also wrapped
It includes:
First Comparative sub-module picks out any face number in addition to N number of human face data for being directed to every a first word bank
According to calculating the L2 distance of itself and the human face data to be searched, and the L2 distance being calculated and first data are arranged
The maximum value of table is compared;
Submodule is replaced, if being less than the maximum value for the data, the data are replaced into the maximum value, generates the
Two data lists;
Second Comparative sub-module, for filtering out the second maximum value of second data list;
The replacement submodule is also used to using the first maximum value in second maximum value replacement maximum value variable, and adopts
With the corresponding address of second maximum value, the corresponding address of the first maximum value in preset index variables is replaced;
Submodule is updated, for using second data list as the first data list;
First Comparative sub-module, replacement submodule, the second Comparative sub-module, update submodule repeat, until the first son of M part
All human face datas in library complete screening.
9. a kind of electronic equipment, characterized in that it comprises:
Processor, memory and bus;
The bus, for connecting the processor and the memory;
The memory, for storing operational order;
The processor, for executing face described in any one of the claims 1-5 by calling the operational order
The searching method of data.
10. a kind of computer readable storage medium, which is characterized in that the computer storage medium refers to for storing computer
It enables, when run on a computer, computer is allowed to execute face described in any one of the claims 1 to 5
The searching method of data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910285920.5A CN109992687B (en) | 2019-04-10 | 2019-04-10 | Face data searching method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910285920.5A CN109992687B (en) | 2019-04-10 | 2019-04-10 | Face data searching method and device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109992687A true CN109992687A (en) | 2019-07-09 |
CN109992687B CN109992687B (en) | 2021-05-25 |
Family
ID=67133057
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910285920.5A Active CN109992687B (en) | 2019-04-10 | 2019-04-10 | Face data searching method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109992687B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113326714A (en) * | 2020-02-28 | 2021-08-31 | 杭州海康威视数字技术股份有限公司 | Target comparison method and device, electronic equipment and readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110170749A1 (en) * | 2006-09-29 | 2011-07-14 | Pittsburgh Pattern Recognition, Inc. | Video retrieval system for human face content |
CN105373626A (en) * | 2015-12-09 | 2016-03-02 | 深圳融合永道科技有限公司 | Distributed face recognition track search system and method |
CN105608464A (en) * | 2015-12-15 | 2016-05-25 | 重庆凯泽科技有限公司 | Face recognition mobile terminal solving system and solving method |
CN106529515A (en) * | 2016-12-26 | 2017-03-22 | 浙江宇视科技有限公司 | Facial feature library management method and system |
CN107291706A (en) * | 2016-03-30 | 2017-10-24 | 杭州海康威视数字技术股份有限公司 | A kind of picture retrieval method and device |
CN109426781A (en) * | 2017-08-29 | 2019-03-05 | 阿里巴巴集团控股有限公司 | Construction method, face identification method, device and the equipment of face recognition database |
-
2019
- 2019-04-10 CN CN201910285920.5A patent/CN109992687B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110170749A1 (en) * | 2006-09-29 | 2011-07-14 | Pittsburgh Pattern Recognition, Inc. | Video retrieval system for human face content |
CN105373626A (en) * | 2015-12-09 | 2016-03-02 | 深圳融合永道科技有限公司 | Distributed face recognition track search system and method |
CN105608464A (en) * | 2015-12-15 | 2016-05-25 | 重庆凯泽科技有限公司 | Face recognition mobile terminal solving system and solving method |
CN107291706A (en) * | 2016-03-30 | 2017-10-24 | 杭州海康威视数字技术股份有限公司 | A kind of picture retrieval method and device |
CN106529515A (en) * | 2016-12-26 | 2017-03-22 | 浙江宇视科技有限公司 | Facial feature library management method and system |
CN109426781A (en) * | 2017-08-29 | 2019-03-05 | 阿里巴巴集团控股有限公司 | Construction method, face identification method, device and the equipment of face recognition database |
Non-Patent Citations (1)
Title |
---|
张诗嘉: "基于大规模数据库的人脸识别研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113326714A (en) * | 2020-02-28 | 2021-08-31 | 杭州海康威视数字技术股份有限公司 | Target comparison method and device, electronic equipment and readable storage medium |
CN113326714B (en) * | 2020-02-28 | 2024-03-22 | 杭州海康威视数字技术股份有限公司 | Target comparison method, target comparison device, electronic equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109992687B (en) | 2021-05-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102156751B (en) | Method and device for extracting video fingerprint | |
CN101685388B (en) | Method and device for executing comparison operation | |
CN102779190B (en) | Rapid detection method for hot issues of timing sequence massive network news | |
CN103150362B (en) | A kind of video searching method and system | |
CN102893265A (en) | Managing storage of individually accessible data units | |
US7698312B2 (en) | Performing recursive database operations | |
CN105159987B (en) | A kind of storage of data, lookup method and device | |
CN104142946A (en) | Method and system for aggregating and searching service objects of same type | |
CN110334159A (en) | Information query method and device based on relation map | |
CN102193995B (en) | Method and device for establishing multimedia data index and retrieval | |
CN108604249A (en) | Generate the database of index information archiving method and device, archive comprising index information database searching method and device | |
CN108062378B (en) | The Connection inquiring method and system of more time serieses under a kind of storage of column | |
CN109992687A (en) | Searching method, device, electronic equipment and the readable storage medium storing program for executing of human face data | |
CN104699701A (en) | Parallel nearest node computing method and distributed system based on sensitive hashing | |
CN104284189B (en) | A kind of improved BWT data compression methods and its system for implementing hardware | |
CN110222286A (en) | Information acquisition method, device, terminal and computer readable storage medium | |
CN107391613B (en) | Industrial safety subject multi-document automatic disambiguation method and device | |
CN109241058A (en) | A kind of method and apparatus from key-value pair to B+ tree batch that being inserted into | |
CN111858703B (en) | Method and device for counting performance test data of benchmark SQL | |
CN110765100B (en) | Label generation method and device, computer readable storage medium and server | |
CN113010382A (en) | Buried point data calculation method and device, storage medium and electronic equipment | |
Wandelt et al. | Column-wise compression of open relational data | |
CN110515963A (en) | Collect method, apparatus, electronic equipment and the readable storage medium storing program for executing of statistical information | |
CN109684293A (en) | Mixed file storage method and device | |
CN117194080B (en) | Message processing method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |