Disclosure of Invention
Based on the defects of the prior art, the invention provides a method and a device for controlling a security gate based on voiceprint recognition, so as to provide a control scheme capable of recognizing a high-risk scene and automatically controlling the security gate of a vault in the high-risk scene.
The invention provides a method for controlling a safety door based on voiceprint recognition, which comprises the following steps:
after a user inputs an opening password of a safety door of a bank vault, voice information of the user is collected;
extracting voiceprint features of the voice information;
processing the voiceprint characteristics by using a risk prediction network to obtain the estimated risk level of the voiceprint characteristics; the risk prediction network is a back propagation neural network obtained by utilizing a sample data set in advance; each sample data of the sample data set comprises a voiceprint feature and an actual risk level corresponding to the voiceprint feature;
if the estimated risk level of the voiceprint characteristics is low risk, and the opening password input by the user passes password verification, controlling the security door of the bank vault to be opened;
and if the estimated risk level of the voiceprint characteristics is high risk, controlling the safety door of the bank vault to be closed.
Optionally, after the user inputs an opening password of a security door of a bank vault and before voice information of the user is collected, the method further includes:
after a user inputs an opening password of a safety door of a bank vault, outputting first prompt information; the first prompt message is used for prompting a user to provide voice information matched with the first prompt message;
wherein, the voice information of the user is collected, including:
and voice information which is provided by the user and matched with the first prompt information is collected.
Optionally, if the estimated risk level of the voiceprint features is low risk, and the opening password input by the user passes through password verification, the security door of the bank vault is controlled to be opened, including:
if the estimated risk level of the voiceprint features is low risk, comparing the opening password input by the user with a preset standard password of the bank vault;
and if the opening password input by the user is consistent with the standard password of the bank vault, determining that the opening password input by the user passes password verification, and controlling the security door of the bank vault to be opened.
Optionally, the method for training the risk prediction network includes:
acquiring an initial prediction network; wherein the parameters of the initial prediction network are determined using a genetic algorithm;
aiming at each sample data of the sample data set, processing the voiceprint characteristics of the sample data by using the initial prediction network to obtain the estimated risk level of the sample data;
calculating a loss function of the initial prediction network according to the estimated risk level of each sample data and the actual risk level of the sample data;
if the loss function of the initial prediction network does not meet the convergence condition, updating the parameters of the initial prediction network, returning to execute each sample data of the sample data set, and processing the voiceprint characteristics of the sample data by using the initial prediction network to obtain the estimated risk level of the sample data;
and if the loss function of the initial prediction network meets the convergence condition, determining the initial prediction network as a risk prediction network.
Optionally, if the estimated risk level of the voiceprint feature is a high risk, controlling the security door of the bank vault to be closed, further comprising:
sending an authorization request to an authorization terminal and receiving response information of the authorization terminal;
if the security door of the bank vault is authorized to be opened by the response information of the authorization terminal, and the opening password input by the user passes the password verification, the security door of the bank vault is controlled to be opened;
and if the response information of the authorization terminal authorizes the closing of the security door of the bank vault, controlling the closing of the security door of the bank vault.
The second aspect of the present invention provides a voiceprint recognition-based control device for a security gate, comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring voice information of a user after the user inputs an opening password of a safety door of a bank vault;
an extraction unit, configured to extract a voiceprint feature of the voice information;
the prediction unit is used for processing the voiceprint characteristics by utilizing a risk prediction network to obtain the estimated risk level of the voiceprint characteristics; the risk prediction network is a back propagation neural network obtained by utilizing a sample data set in advance; each sample data of the sample data set comprises a voiceprint feature and an actual risk level corresponding to the voiceprint feature;
the control unit is used for controlling the security door of the bank vault to be opened if the estimated risk level of the voiceprint characteristics is low risk and the opening password input by the user passes the password verification;
and the control unit is used for controlling the safety door of the bank vault to be closed if the estimated risk level of the voiceprint characteristics is high risk.
Optionally, the method further includes:
the prompting unit is used for outputting first prompting information after a user inputs an opening password of a safety door of a bank vault; the first prompt message is used for prompting a user to provide voice information matched with the first prompt message;
when the acquisition unit acquires the voice information of the user, the acquisition unit is specifically used for:
and voice information which is provided by the user and matched with the first prompt information is collected.
Optionally, if the estimated risk level of the voiceprint feature is low risk, and the opening password input by the user passes through password verification, when the security door of the bank vault is controlled to be opened, the control unit is specifically configured to:
if the estimated risk level of the voiceprint features is low risk, comparing the opening password input by the user with a preset standard password of the bank vault;
and if the opening password input by the user is consistent with the standard password of the bank vault, determining that the opening password input by the user passes password verification, and controlling the security door of the bank vault to be opened.
Optionally, the control device further includes a training unit, and the training unit is configured to:
acquiring an initial prediction network; wherein the parameters of the initial prediction network are determined using a genetic algorithm;
aiming at each sample data of the sample data set, processing the voiceprint characteristics of the sample data by using the initial prediction network to obtain the estimated risk level of the sample data;
calculating a loss function of the initial prediction network according to the estimated risk level of each sample data and the actual risk level of the sample data;
if the loss function of the initial prediction network does not meet the convergence condition, updating the parameters of the initial prediction network, returning to execute each sample data of the sample data set, and processing the voiceprint characteristics of the sample data by using the initial prediction network to obtain the estimated risk level of the sample data;
and if the loss function of the initial prediction network meets the convergence condition, determining the initial prediction network as a risk prediction network.
Optionally, the control device further includes: the communication unit is used for sending an authorization request to an authorization terminal and receiving response information of the authorization terminal;
wherein the control unit is further configured to:
if the security door of the bank vault is authorized to be opened by the response information of the authorization terminal, and the opening password input by the user passes the password verification, the security door of the bank vault is controlled to be opened;
and if the response information of the authorization terminal authorizes the closing of the security door of the bank vault, controlling the closing of the security door of the bank vault.
The application provides a voiceprint recognition-based security gate control method and a voiceprint recognition-based security gate control device, wherein after a user inputs an opening password, voice information of the user is collected, and voiceprint features in the voice information are extracted; processing the voiceprint characteristics by using a risk prediction network to obtain the estimated risk level of the voiceprint characteristics; if the estimated risk level of the voiceprint characteristics is low risk and the opening password input by the user passes the password verification, controlling the security door of the bank vault to be opened; and if the estimated risk level of the voiceprint characteristics is high risk, controlling the safety door of the bank vault to be closed. According to the scheme, the voice print characteristics of the vault passwords input by the users are processed by the pre-constructed risk prediction network, the risk level of the scenario of the vault passwords input by the users is predicted, and the opening or closing of the safe door of the vault is controlled based on the prediction result, so that property loss caused by the opening of the vault door in a high-risk scenario is effectively avoided.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
When a person speaks, the voiceprint characteristics of the voice can reflect the emotional state of the speaker, such as happiness, fear, fright and the like. Therefore, a neural network for recognizing the voiceprint features can be constructed for determining the current emotional state of the speaker according to the voiceprint features in the voice. Furthermore, the emotional state of a person in a dangerous scene (for example, a scene such as being kidnapped or being coerced) can show frightening and fear different from that in a safe scene, and the voiceprint features of voice in the corresponding dangerous scene can be obviously different from those in the safe scene, so that an initial neural network is trained by using a large amount of sample data to obtain a risk prediction network, and the risk prediction network can predict whether a user (in the application, the user refers to a manager of a bank vault) is currently in the dangerous scene or the safe scene according to the voiceprint features of voice currently sent by the user, so that the control of the security gate of the vault is realized according to the prediction result.
In summary, an embodiment of the present application provides a method for controlling a security gate based on voiceprint recognition, please refer to fig. 1, where the method includes the following steps:
s101, after a user inputs an opening password of a security door of a bank vault, voice information of the user is collected.
Optionally, after the user wakes up the password input interface of the security gate and starts to input the opening password of the security gate, the control system of the vault may output the first prompt information in the form of voice playing, screen display and the like, so as to prompt the user to provide voice information matched with the first prompt information.
For example, a first prompt message as shown below may be presented on the screen:
"please say the following text: 'please open the safety door'
By outputting the first prompt information, the user can be instructed to send out the voice of 'please open the safety door' after inputting the password, and then the control system can collect the voice of 'please open the safety door' provided by the user, so as to execute the subsequent steps.
And S102, extracting the voiceprint characteristics of the voice information.
A speech signal can be described by a plurality of characteristic parameters, including but not limited to fundamental frequency, energy, speech rate, formant frequency, duration of single syllable, pause time between syllables, linear prediction coefficient, Mel cepstrum coefficient, for the currently collected speech information of a user, the values of the above-mentioned characteristic parameters of the speech information are spliced into a vector, and the vector is the voiceprint characteristic of the currently collected speech information.
And S103, processing the voiceprint characteristics by using the risk prediction network to obtain the estimated risk level of the voiceprint characteristics.
The risk prediction network is a back propagation neural network obtained by utilizing a sample data set in advance; each sample data of the sample data set comprises a voiceprint characteristic and an actual risk level corresponding to the voiceprint characteristic.
One voiceprint feature corresponds to a password entry process, and one voiceprint feature corresponds to a risk level, which can be understood as:
in the password input process corresponding to the expressive feature, the probability that the user (i.e. the administrator of the bank vault) inputting the password is in a dangerous scene (for example, a scene in which a violent criminal incident occurs and the administrator is forced to open the vault is a dangerous scene) is high.
In this embodiment, the risk level is divided into two levels, i.e., a high risk level and a low risk level, if the risk level corresponding to a certain voiceprint feature is a high risk, the system considers that the user is in a dangerous scene during the password input process corresponding to the voiceprint feature, and if the risk level corresponding to the certain voiceprint feature is a low risk, the system considers that the user is in a safe scene during the password input process corresponding to the voiceprint feature.
In step S103, if the estimated risk level of the voiceprint feature is low risk, it indicates that the user currently inputting the password is in a security scene, and step S104 is executed. If the estimated risk level of the voiceprint feature is high risk, it indicates that the user currently inputting the password is in a dangerous scene, and step S105 is executed.
And estimating the risk level, namely, after the voiceprint features are processed by using the risk prediction network, the risk level is obtained by the risk prediction network prediction, and the probability that the user is in a dangerous scene in the password input process corresponding to the voiceprint features. And the actual risk level of the voiceprint features represents whether the scene corresponding to the voiceprint features is a dangerous scene when the password input process actually occurs.
Sample data may be obtained by:
the method comprises the steps of simulating a plurality of dangerous scenes in a bank, and then recording voiceprint characteristics of a plurality of password input processes executed by a vault administrator under the dangerous scenes, wherein the voiceprint characteristics collected under the simulated dangerous scenes correspond to actual risk levels which are high risks.
On the other hand, voiceprint characteristics of a plurality of password input processes executed under normal conditions are collected, and the actual risk level corresponding to the voiceprint characteristics is low risk.
Through the method, a plurality of voiceprint features with known actual risk levels can be obtained, and the voiceprint features and the corresponding actual risk levels form sample data for training a risk prediction network.
And S104, after the opening password input by the user passes the password verification, controlling the safety door of the bank vault to be opened.
It can be understood that after the administrator who inputs the open password is predicted to be in the security scene, the open password input by the administrator needs to be verified. Thereby confirming the identity of the administrator.
Therefore, step S104 specifically includes the following two actions:
comparing the opening password input by the user with the standard password of the vault, and if the opening password input by the user is consistent with the preset standard password, determining that the opening password input by the user passes the password verification; otherwise, if the opening password input by the user is inconsistent with the preset standard password, the opening password input by the user is considered to not pass the password verification.
And after the opening password input by the user is confirmed to pass the password verification, controlling the security door of the bank vault to be opened.
Optionally, if it is determined that the unlock password input by the user does not pass the password verification, an error prompt message may be output to prompt the user to input the unlock password again.
And S105, controlling the safety door of the bank vault to be closed.
Optionally, after step S105 is executed, the control system of the vault may further execute the following method to request authorization from a remote authorization terminal:
and sending an authorization request to an authorization terminal, and receiving response information of the authorization terminal.
Optionally, the authorization terminal receives the authorization request, and a user of the authorization terminal may establish a video connection with the control system of the vault, and obtain the real-time video stream from the control system of the vault, so as to know a scene where an administrator of the vault is located, and determine whether to authorize closing or opening the security gate of the bank vault.
If the security of the scene where the administrator of the vault is located is found through the video, the authorization terminal can send first response information to a control system of the vault, and the first response information is used for authorizing the opening of a security door of the bank vault.
If the scene danger of the scene where the administrator of the vault is located is found through the video, the authorization terminal can send second response information to the control system of the vault, and the second response information is used for authorizing closing of the security door of the bank vault.
And if the control system of the vault receives the first response information and the password input by the user passes the password verification, controlling the security door of the bank vault to be opened.
And if the control system of the vault receives the second response information, controlling the safety door of the bank vault to be closed.
The application provides a voiceprint recognition-based control method for a safety door, which comprises the steps of collecting voice information of a user after the user inputs an opening password, and extracting voiceprint features in the voice information; processing the voiceprint characteristics by using a risk prediction network to obtain the estimated risk level of the voiceprint characteristics; if the estimated risk level of the voiceprint characteristics is low risk and the opening password input by the user passes the password verification, controlling the security door of the bank vault to be opened; and if the estimated risk level of the voiceprint characteristics is high risk, controlling the safety door of the bank vault to be closed. According to the scheme, the voice print characteristics of the vault passwords input by the users are processed by the pre-constructed risk prediction network, the risk level of the scenario of the vault passwords input by the users is predicted, and the opening or closing of the safe door of the vault is controlled based on the prediction result, so that property loss caused by the opening of the vault door in a high-risk scenario is effectively avoided.
An embodiment of the present application further provides a method for training a risk prediction network, please refer to fig. 2, where the method includes the following steps:
s201, obtaining an initial prediction network.
Wherein the parameters of the initial prediction network are determined using a genetic algorithm.
Specifically, the method for determining the parameters of the initial prediction network by using the genetic algorithm comprises the following steps:
according to the initially predicted architecture, a plurality of parameter vectors are randomly generated, and a set of the parameter vectors is called a parameter vector set.
Here, random means that the values of the elements included in each parameter vector are determined randomly. On the other hand, the dimensions of each parameter vector are the same, equal to the number of parameters that need to be determined in the initial prediction network. The number of parameters of the initial predicted network is determined by the architecture of the network. In terms of network architecture, any existing neural network architecture can be directly determined as the architecture of the initial prediction network in the embodiment.
In addition, for any parameter vector, each element included in the parameter vector corresponds to one parameter in the initial prediction network, in other words, for the initial prediction network with the determined architecture, for each given parameter vector, the prediction network corresponding to the parameter vector can be obtained by substituting the parameter corresponding to each element of the parameter vector into the parameter in the initial prediction network.
In this embodiment, the fitness of the parameter vector is a loss function obtained after the prediction network corresponding to the parameter vector is used to process the sample data, so that the lower the fitness, the better the parameter vector, and the higher the fitness, the worse the parameter vector.
And randomly crossing and mutating each parameter vector in the parameter vector set by taking the fitness of the parameter vector as the probability to obtain the parameter vector set after iteration. Wherein, the lower the fitness, the higher the probability of the parameter vector crossing and mutation.
After the iteration is finished, judging whether the current iteration number is greater than or equal to a pre-specified number threshold, if the current iteration number is less than the pre-specified number threshold, returning to the step of determining the fitness of each parameter vector in the parameter vector set, namely entering the next iteration, and so on until the current iteration number is greater than or equal to the pre-specified number threshold.
And after the current iteration times are greater than or equal to a pre-specified time threshold value, determining the parameter vector with the lowest fitness in the current parameter vector set as an initial parameter vector, wherein the value of each element in the initial parameter vector is the corresponding parameter in the initial prediction network.
S202, aiming at each sample data of the sample data set, the initial prediction network is utilized to process the voiceprint characteristics of the sample data, and the estimated risk level of the sample data is obtained.
S203, calculating a loss function of the initial prediction network according to the estimated risk level of each sample data and the actual risk level of the sample data.
The loss function of the initial prediction network is a function value determined by the number of samples with prediction errors. Specifically, for any sample data, if the estimated risk level obtained after the initial prediction network processes the voiceprint feature of the sample data is inconsistent with the actual risk level of the sample data, the sample data is a sample with a wrong prediction.
After all sample data of the sample data set are processed by the initial prediction network, the proportion of the samples with wrong prediction is determined, and then the loss function of the initial prediction network can be calculated according to the proportion.
And S204, judging whether the loss function of the initial prediction network meets a convergence condition.
Optionally, the loss function of the initial prediction network may be compared with a preset threshold, and if the loss function of the initial prediction network is greater than the threshold, the convergence condition is not satisfied, and step S205 is executed.
If the loss function of the initial prediction network is less than or equal to the threshold, the convergence condition is satisfied, and step S206 is executed.
And S205, updating the parameters of the initial prediction network.
Optionally, a gradient descent algorithm may be used to calculate a loss function of the initial prediction network to obtain an updated value of a parameter of the initial prediction network, and then the updated value of the parameter is used to update the parameter of the initial prediction network.
After the update of step S205 is completed, the process returns to step S202.
And S206, determining the initial prediction network as a risk prediction network, and outputting the risk prediction network.
The embodiment of the present application further provides a control device for a security gate based on voiceprint recognition, please refer to fig. 3, the device includes the following units:
the collectingunit 301 is configured to collect voice information of a user after the user inputs an opening password of a security gate of a bank vault.
An extractingunit 302, configured to extract a voiceprint feature of the voice information.
And the prediction unit 303 is configured to process the voiceprint features by using the risk prediction network to obtain an estimated risk level of the voiceprint features.
The risk prediction network is a back propagation neural network obtained by utilizing a sample data set in advance; each sample data of the sample data set comprises a voiceprint characteristic and an actual risk level corresponding to the voiceprint characteristic.
A control unit 304 for:
if the estimated risk level of the voiceprint characteristics is low risk and the opening password input by the user passes the password verification, controlling the security door of the bank vault to be opened;
and if the estimated risk level of the voiceprint characteristics is high risk, controlling the safety door of the bank vault to be closed.
Optionally, the control device provided in this embodiment further includes:
the prompting unit 305 is used for outputting first prompting information after a user inputs an opening password of a security door of a bank vault; the first prompt message is used for prompting the user to provide voice information matched with the first prompt message.
Wherein, when the collectingunit 301 collects the voice information of the user, it is specifically configured to:
and collecting voice information which is provided by the user and matched with the first prompt information.
When the control unit 304 controls the security door of the bank vault to be opened, the control unit is specifically configured to:
if the estimated risk level of the voiceprint characteristics is low risk, comparing the opening password input by the user with a preset standard password of a bank vault;
and if the opening password input by the user is consistent with the standard password of the bank vault, determining that the opening password input by the user passes the password verification, and controlling the security door of the bank vault to open.
Optionally, the control device further comprises atraining unit 306, configured to:
generating a parameter vector set consisting of a plurality of parameter vectors according to the architecture of the initial back propagation neural network; the dimension of the parameter vector set is equal to the number of parameters in the initial back propagation neural network, and each element of the parameter vector corresponds to one parameter of the initial back propagation neural network;
optimizing the parameter vector set by using a genetic algorithm to obtain a target parameter vector;
assigning each element of the target parameter vector to a parameter in the initial back propagation neural network corresponding to the element to obtain an initial prediction network;
aiming at each sample data of the sample data set, processing the voiceprint characteristics of the sample data by using an initial prediction network to obtain the estimated risk level of the sample data;
calculating a loss function of the initial prediction network according to the estimated risk level of each sample data and the actual risk level of the sample data;
if the loss function of the initial prediction network does not meet the convergence condition, updating the parameters of the initial prediction network, returning to execute each sample data aiming at the sample data set, and processing the voiceprint characteristics of the sample data by using the initial prediction network to obtain the estimated risk level of the sample data;
and if the loss function of the initial prediction network meets the convergence condition, determining the initial prediction network as a risk prediction network.
Optionally, the control device further includes: acommunication unit 307, configured to send an authorization request to an authorized terminal, and receive response information of the authorized terminal.
Wherein the control unit 304 is further configured to:
if the response information of the authorization terminal authorizes the opening of the security door of the bank vault, and the opening password input by the user passes the password verification, the security door of the bank vault is controlled to be opened;
and if the response information of the authorization terminal authorizes the closing of the safety door of the bank vault, controlling the closing of the safety door of the bank vault.
For the control device provided in this embodiment, specific working principles thereof may refer to corresponding steps in the control method provided in other embodiments of the present application, and are not described herein again.
The application provides a voiceprint recognition-based control device of a safety door, wherein anacquisition unit 301 acquires voice information of a user after the user inputs an opening password, and anextraction unit 302 extracts voiceprint features in the voice information; the prediction unit 303 processes the voiceprint features by using a risk prediction network to obtain the estimated risk level of the voiceprint features; if the estimated risk level of the voiceprint features is low risk and the opening password input by the user passes the password verification, the control unit 304 controls the security door of the bank vault to be opened; if the estimated risk level of the voiceprint feature is high risk, the control unit 304 controls the security door of the bank vault to be closed. According to the scheme, the voice print characteristics of the vault passwords input by the users are processed by the pre-constructed risk prediction network, the risk level of the scenario of the vault passwords input by the users is predicted, and the opening or closing of the safe door of the vault is controlled based on the prediction result, so that property loss caused by the opening of the vault door in a high-risk scenario is effectively avoided.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
It should be noted that the terms "first", "second", and the like in the present invention are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
Those skilled in the art can make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.