Disclosure of Invention
The invention aims to provide an access control method based on voice recognition and face recognition, which is used for solving the problem of poor safety of the control mode of the existing access control system based on voice recognition.
In order to solve the problems, the invention adopts the following technical scheme:
an entrance guard control method based on voice recognition and face recognition comprises the following steps:
the method comprises the steps that an access control device obtains a voice signal of a recognized person and a face image of the recognized person;
the entrance guard equipment sends the voice signal and the face image to a background server;
the background server performs voiceprint recognition on the voice signal to obtain a target voiceprint;
the background server stores an identity database, inputs the target voiceprint into the identity database and obtains target identity information corresponding to the target voiceprint; the identity database comprises at least two different voiceprints and identity information corresponding to the voiceprints;
a face image database is stored in the background server, and the background server inputs the target identity information into the face image database to obtain a target face image corresponding to the target identity information; the face image database comprises at least two different identity information and face images corresponding to the identity information;
the background server compares the face image of the identified person with the target face image to obtain whether the face image of the identified person is matched with the target face image;
if the face image of the identified person is matched with the target face image, the background server sends an entrance guard opening instruction to the entrance guard equipment;
the entrance guard equipment is controlled by the entrance guard opening instruction to be opened.
Optionally, the access control method based on voice recognition and face recognition further includes:
if the background server inputs the target voiceprint into the identity database and target identity information corresponding to the target voiceprint is not obtained, the background server sends the face image of the identified person to the owner terminal equipment according to a preset communication address of the owner terminal equipment;
correspondingly, if the background server receives the entrance guard opening instruction sent by the owner terminal equipment, the entrance guard opening instruction is sent to the entrance guard equipment.
Optionally, the facial images of the identified persons comprise continuously acquired continuous shooting facial images of at least two identified persons;
before the background server compares the face image of the identified person with the target face image, the access control method based on voice recognition and face recognition further comprises the following steps:
acquiring first matching degrees between every two continuously shot face images of the identified person, and if each first matching degree is greater than or equal to a first preset matching degree threshold value, executing the step of comparing the face image of the identified person with the target face image by the background server;
correspondingly, the step of comparing the face image of the identified person with the target face image by the background server to obtain whether the face image of the identified person is matched with the target face image includes:
the background server sequentially compares the continuously shot face image of each identified person with the target face image to respectively obtain corresponding second matching degrees;
judging whether the face image of the identified person is matched with the target face image or not according to the size relation between each second matching degree and a second preset matching degree threshold value;
correspondingly, if the face image of the identified person is matched with the target face image, the background server sends an entrance guard opening instruction to the entrance guard device, and the entrance guard opening instruction comprises the following steps:
and if all the second matching degrees are greater than or equal to the second preset matching degree threshold value, the background server sends the entrance guard opening instruction to the entrance guard equipment.
Optionally, the comparing, by the background server, the continuously shot face image of each identified person with the target face image in sequence to obtain corresponding second matching degrees, respectively, includes:
marking feature coordinates of each key feature in the continuously shot face image of each identified person and the target face image based on a preset face key feature list;
calculating a characteristic distance value between the characteristic coordinates of each key characteristic of the continuous shooting face image and the characteristic coordinates of each corresponding key characteristic in the target face image for the continuous shooting face image of any identified person; calculating to obtain a target average value of the characteristic distance values; obtaining a second matching degree corresponding to the target average value according to a corresponding relation between a preset average value and the second matching degree; the preset corresponding relation between the average value and the second matching degree comprises at least two average value intervals and the second matching degree corresponding to each average value interval, and the average value intervals and the second matching degrees are in an anti-correlation relation.
The invention has the beneficial effects that: the access control equipment and the background server jointly realize the control of the access control, wherein the access control equipment is only used for collecting the voice signal of the identified person and the face image of the identified person, the access control equipment sends the voice signal and the face image of the identified person to the background server, the background server processes the received data information and finally outputs a corresponding access control instruction to the access control equipment, so that the control strategy and the data related to the control strategy in the background server cannot be lost even if the access control equipment fails, and the control strategy and the data related to the control strategy in the background server do not need to be modified even if the access control equipment is replaced, thereby improving the control reliability and the safety, and as the access control equipment does not have the control strategy and the data related to the control strategy, even if an illegal person operates the access control equipment randomly, the control strategy and the data related to the control strategy cannot be modified, so that the access control cannot be opened in a data tampering mode, and the access control safety is improved; the background server carries out voiceprint recognition on the voice signal to obtain a target voiceprint, finally obtains a prestored face image according to the target voiceprint, the identity database and the face image database, and compared with an existing control mode, the access control system has the advantages that the control reliability and the safety are increased by carrying out a series of comparison processing according to the fact that the prestored face image is matched with two face images or not through comparing the prestored face image and the actually acquired face image.
Detailed Description
The embodiment provides an access control method based on voice recognition and face recognition, which is implemented by access control equipment and a background server.
The access control method provided by the embodiment is not only applicable to a unique application scene, and can be applied to a house door, and also can be applied to a factory door or an office door in an enterprise. The present embodiment takes a home door as an example. The access control equipment is conventional home door access control. Because voice signals and face images need to be acquired, the access control device needs to be provided with voice acquisition devices and image acquisition devices, wherein the voice acquisition devices take microphones as examples, and the image acquisition devices take cameras as examples. Microphone and camera setting are at home door, and set up the position and use convenient collection as the standard, set up the average height that highly can equal ordinary people, for example 1.7 m.
As shown in fig. 1, the access control device is connected with the background server in a wired communication manner or in a wireless communication manner. If the access control equipment is in wireless communication connection with the background server, the access control equipment needs to be provided with a power supply, a processor and a wireless communication module, and the power supply supplies power to the wireless communication module, the processor, the microphone and the camera. As a specific embodiment, an electrical box may be specially provided at the inner side of the home door, and the power supply, the processor and the wireless communication module are provided in the electrical box.
The setting position of the background server is determined by the application scenario, if the application is in a home, the background server may be set somewhere in the home, for example: a multimedia line concentrator; if the method is applied to enterprises, the background server can be arranged in a background monitoring center of the enterprises. Of course, the backend server may also be a cloud server.
Because entrance guard's equipment sets up in family department, and backend server sets up somewhere at the family, so, entrance guard's equipment and backend server set up in different positions.
As shown in fig. 2, the access control method based on voice recognition and face recognition provided in this embodiment includes the following steps:
the entrance guard equipment obtains the speech signal of the identified person and the face image of the identified person:
when a person who needs to enter the home is standing at the home, the person is an identified person. The recognized person needs to send out a certain voice signal, in order to obtain the voiceprint of the voice signal (i.e. to identify the identity), the voice signal may be a specific sentence, and each recognized person speaks the same voice signal when performing identity recognition, for example: the sentence "please identify identity".
The identified person speaks 'please identify the identity', a microphone of the access control equipment acquires a voice signal, and a camera acquires a face image of the identified person.
The access control equipment sends the voice signal and the face image to a background server:
and the access control equipment sends the acquired voice signal and the acquired face image of the identified person to the background server in a wired communication mode or a wireless communication mode.
The background server performs voiceprint recognition on the voice signal to obtain a target voiceprint:
and after receiving the voice signal and the face image of the identified person, the background server performs voiceprint identification on the voice signal to obtain a target voiceprint of the identified person. Since the voiceprint recognition is performed on the voice signal to obtain the voiceprint characteristics, which belongs to the conventional technology, the prior art has a mature application, for example, the method for recognizing the voiceprint is provided in the chinese patent with the publication number of CN107610708B, and the description of this embodiment is omitted.
The background server stores an identity database, inputs the target voiceprint into the identity database and obtains target identity information corresponding to the target voiceprint; wherein, the identity database comprises at least two different voiceprints and identity information corresponding to each voiceprint:
the background server is provided with a storage module, an identity database is stored in the storage module, and the identity database comprises at least two different voiceprints and identity information corresponding to the voiceprints. The number of voiceprints in the identity database is set according to actual needs, for example, the number of voiceprints is the number of family members, and each voiceprint in the identity database is the voiceprint of a family member. The identity information corresponding to each voiceprint may be name information of each family member, or may be identity code information, where each identity code information corresponds to one family member, such as 001 and 002. It should be understood that each voiceprint in the identity database and the corresponding identity information are all previously entered into the background server, and each voiceprint in the identity database and the corresponding identity information can be adjusted according to actual needs.
And the background server inputs the acquired target voiceprint into an identity database, and compares the acquired target voiceprint with each voiceprint in the identity database to find identity information corresponding to the target voiceprint, wherein the identity information is the target identity information.
Further, the background server stores a communication address, which is a preset communication address of the owner terminal device (such as a smart phone), and the background server can communicate with the owner terminal device through the communication address. Correspondingly, the access control method further comprises the following processes: if the background server inputs the target voiceprint into the identity database and target identity information corresponding to the target voiceprint is not obtained, namely the identified person is not a family member and belongs to an alien person, the background server sends the collected face image of the identified person to the owner terminal equipment according to a preset communication address of the owner terminal equipment, the owner autonomously determines whether the identified person enters the house or not, and the owner sends a corresponding control instruction to the background server through the owner terminal equipment. Correspondingly, if the background server receives the entrance guard opening instruction sent by the owner terminal equipment, the background server sends the entrance guard opening instruction to the entrance guard equipment to control entrance guard opening.
A face image database is stored in the background server, and the background server inputs the target identity information into the face image database to obtain a target face image corresponding to the target identity information; the face image database comprises at least two different identity information and face images corresponding to the identity information:
the storage module of the background server also stores a face image database, and the face image database comprises at least two different identity information and face images corresponding to the identity information. The number of the identity information may be equal to the number of the family members, that is, each identity information is the identity information of each family member, and accordingly, the face image corresponding to each identity information is the face image of each family member. Each facial image is collected in advance, and in order to improve the recognition reliability, each facial image in the facial image database is a front facial image, such as: a picture of the face in a one inch photograph or a two inch photograph of each family member.
And the background server inputs the obtained target identity information into a face image database, and the target face image corresponding to the target identity information is found by comparing the target identity information with each identity information in the face image database.
The background server compares the face image of the identified person with the target face image to obtain whether the face image of the identified person is matched with the target face image:
the background server compares the actually acquired face image of the identified person with the target face image acquired from the face image database, and judges whether the actually acquired face image of the identified person is matched with the target face image acquired from the face image database, wherein matching means that the two face images are the same face image, and mismatching means that the two face images are not the same face image. Specifically, the method comprises the following steps: and obtaining the matching degree, namely the similarity, of the two face images through comparison, judging that the two face images are matched if the matching degree is greater than or equal to a correlation threshold, and judging that the two face images are not matched if the matching degree is less than the correlation threshold.
As a specific embodiment, in order to improve the recognition reliability, the camera continuously photographs the face images of the recognized person, that is, the face images of the recognized person acquired by the camera include continuously photographed face images of at least two recognized persons, and the specific number is set according to actual needs.
Then, before the background server compares the face image of the identified person with the target face image, the access control method further includes the following steps: acquiring a first matching degree between every two continuous shooting face images (the calculation process of the first matching degree can adopt a calculation process of a second matching degree given below and can also adopt other calculation processes in the prior art), and then obtaining a total first matching degree for n continuous shooting face images, and if each first matching degree is greater than or equal to a first preset matching degree threshold value, namely, no large difference exists between any two continuous shooting face images, the acquired continuous shooting face images are face images of the same person, and then executing the subsequent step of comparing the face images of the identified person with the target face images by a background server.
Correspondingly, the background server compares the actually collected face image of the identified person with the target face image obtained from the face image database to obtain whether the two face images are matched, specifically:
(1) and the background server compares each continuously shot face image with the target face image in sequence to respectively obtain corresponding second matching degrees. The background server compares the first continuous shooting face image with the target face image to obtain a second matching degree, then compares the second continuous shooting face image with the target face image to obtain a second matching degree, then compares the third continuous shooting face image with the target face image to obtain a second matching degree, and so on, compares the last continuous shooting face image with the target face image to obtain a second matching degree.
Wherein, for the background server comparing the continuous shooting face image of each identified person with the target face image in sequence to obtain corresponding second matching degrees respectively, a specific implementation process is given as follows, including:
i) and marking the feature coordinates of each key feature in each continuous shooting face image and the target face image based on a preset face key feature list. The face key feature list may include: the four human face features of the eyes, the ears, the mouth and the nose can also comprise eyebrows, forehead and the like, and the specifically contained human face features can be correspondingly configured according to actual needs, such as different control strictness degrees required. The background server marks each key feature in each continuous shooting face image and the target face image according to a preset face key feature list, and obtains corresponding feature coordinates according to the coordinates of each key feature in the images;
ii) calculating a characteristic distance value between the characteristic coordinate of each key characteristic of the continuous shooting face image and the characteristic coordinate of each corresponding key characteristic in the target face image for the continuous shooting face image of any identified person, wherein the characteristic distance value of the two characteristic coordinates can be calculated through coordinate distance calculation formulas such as a Euclidean distance calculation formula; calculating to obtain an average value of the characteristic distance values according to the obtained characteristic distance values, wherein the average value is a target average value; a corresponding relationship between the average value and the second matching degree is preset, where the corresponding relationship includes at least two average value intervals and the second matching degree corresponding to each average value interval, and the average value interval and the second matching degree are in an inverse correlation relationship, that is, a lower average value interval indicates that the distance between each key feature in the two images is smaller, indicating that the two images are more similar, and a corresponding second matching degree is higher, for example: the corresponding relationship includes two average value intervals, which are [ x1, x2], (x 2, x3], where the second matching degree corresponding to [ x1, x2] is y1, (x 2, x 3) corresponds to y2, x1 < x2 < x3, y1 > y2., and the specific value of the average value interval and the specific value of the second matching degree are set according to actual requirements.
(2) And judging whether the face image of the identified person which is actually acquired is matched with the target face image obtained by the face image database or not according to the size relation between each second matching degree and a second preset matching degree threshold value, wherein if all the second matching degrees are greater than or equal to the second preset matching degree threshold value, the two face images are judged to be matched, and otherwise, if at least one second matching degree is smaller than the second preset matching degree threshold value, the two face images are judged to be not matched.
The above-mentioned concrete image matching process that has given, the implementation of this process can increase discernment strict degree, and then can promote entrance guard's control's security.
If the face image of the identified person is matched with the target face image, the background server sends an entrance guard opening instruction to the entrance guard equipment:
and if the face image of the identified person is matched with the target face image, namely all the second matching degrees are greater than or equal to a second preset matching degree threshold value, the background server sends an entrance guard opening instruction to the entrance guard equipment.
The entrance guard equipment is in open under the control of entrance guard opening instruction:
the entrance guard equipment receives entrance guard's opening instruction, and under this entrance guard's control command's control, entrance guard's equipment is opened, and the family door is opened.
The above-mentioned embodiments are merely illustrative of the technical solutions of the present invention in a specific embodiment, and any equivalent substitutions and modifications or partial substitutions of the present invention without departing from the spirit and scope of the present invention should be covered by the claims of the present invention.