Voice verification method and system, computer equipment and storage medium
By emitting sound waves with changes in preset rules at the voice verification terminal and removing specific audio signals in the voice data, extracting and matching voiceprint features solves the problem of traditional voice verification being easily attacked by recording playback, and improves the security of voice verification.
Patent Information
- Application Number
- CN202011551178.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-24
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-12-24
AI Technical Summary
Traditional voice verification methods are prone to recording and playback attacks, resulting in insufficient security. It is difficult for existing technologies to effectively defend against recording and playback attacks.
By emitting sound waves containing changes in preset rules from the voice verification terminal to the external environment, collecting voice data and removing the audio signals corresponding to the sound wave emission time according to the preset rules, extracting voiceprint features for matching to ensure the authenticity of the voiceprint features. This prevents recording and playback attacks.
It effectively improves the security of voice verification, prevents criminals from successfully verifying through recording and playback attacks, and enhances the security of voice verification.
Smart Images

Figure CN112735426B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to speech recognition technology, and in particular to a speech verification method, a speech verification system, a computer device, and a computer-readable storage medium. Background Art
[0002] Recording playback is a common way to attack voiceprint recognition systems. One scenario of recording playback is: when a user is performing voice verification, a third party illegally records the user's voice / voiceprint information obtained from the recording, and then uses the user's voice / voiceprint information obtained from the recording to make the voice verification pass (for example, criminals hide a micro-eavesdropping device on an ATM machine). Summary of the invention
[0003] Based on this, it is necessary to provide a highly secure voice verification method and system, computer equipment and storage medium to address the problem that traditional voice verification methods are easily cracked by recording and playback.
[0004] A voice verification method, the method comprising: a voice verification terminal emitting sound waves to an external environment, the sound waves comprising a first audio signal that changes according to a preset rule, the preset rule making the first audio signal different at different times; collecting first voice data by a first collector in a state where the sound waves are emitted, the first collector being installed at a position capable of receiving and collecting the sound waves; if the first voice data comprises a first audio signal corresponding to the moment when the first voice data is collected, then the first audio signal is reversely eliminated at the position where the first audio signal is detected in the first voice data to obtain second voice data; extracting voiceprint features of the second voice data; if the voiceprint features match the preset voiceprint features, the voice verification is passed.
[0005] In one of the embodiments, in the step of the voice verification terminal emitting sound waves to the external environment, the sound waves also include a second audio signal, the second audio signal is located at the head of a special audio signal, and the special audio signal includes the second audio signal and a first audio signal following the second audio signal in the time domain; the method also includes: detecting whether the first voice data has and only has a single second audio signal, and if so, the step of removing the first audio signal in the first voice data also includes removing the second audio signal; otherwise the voice verification fails.
[0006] In one embodiment, the step of detecting whether the first voice data has and only has a single second audio signal includes: performing Fourier transform on the first voice data, and detecting whether the first voice data has a second audio signal that meets preset conditions in the frequency spectrum.
[0007] In one embodiment, the step of detecting whether there is a second audio signal that meets preset conditions in the first voice data in the spectrum includes: scanning the spectrum column by column, and when a signal whose signal mode, duration and frequency range meet the preset conditions is scanned, the scanned signal is identified as the second audio signal and used as the starting point of the special audio signal.
[0008] In one of the embodiments, the first audio signal is a signal sequence related to the emission moment of the sound wave.
[0009] In one of the embodiments, the first audio signal includes a plurality of sub-signals spaced apart from each other in the time domain, each sub-signal contains a portion of time information, and the time information of each sub-signal is combined to form the complete emission time.
[0010] In one of the embodiments, the time interval between adjacent second audio signals is a constant value.
[0011] In one of the embodiments, the first audio signal further includes information corresponding to a device identification code of the voice verification terminal.
[0012] In one of the embodiments, if the first voice data contains a first audio signal corresponding to the moment when the first voice data was collected, the step of reversely eliminating the first audio signal at the position where the first audio signal is detected in the first voice data includes: obtaining the first audio signal corresponding to the moment when the first voice data is collected according to the preset rule; determining whether the first voice data contains the first audio signal corresponding to the moment when the first voice data is collected, and if so, reversely eliminating the first audio signal at the position where the first audio signal is detected in the first voice data, otherwise the voice verification fails.
[0013] In one of the embodiments, a voiceprint registration step is further included, and the voiceprint registration step includes: obtaining registration voice data; extracting voiceprint features from the registration voice data as the preset voiceprint features.
[0014] In one embodiment, the step of obtaining the registration voice data includes: the registration terminal transmits the sound wave to the external environment; when the registration terminal transmits the sound wave, the registration voice data is collected by a second collector, and the second collector is installed in a position capable of receiving and collecting the sound wave emitted by the registration terminal; the step of extracting voiceprint features from the registration voice data as the preset voiceprint features includes: if the registration voice data contains a first audio signal corresponding to the moment when the registration voice data is collected, then removing the first audio signal in the registration voice data to obtain third voice data; extracting the voiceprint features of the third voice data as the preset voiceprint features.
[0015] In one of the embodiments, the step of obtaining the registration voice data includes: performing identity authentication, and collecting the voice password entered by the user if the identity authentication passes.
[0016] In one of the embodiments, the registration voice data contains at least 8 syllables and the signal-to-noise ratio is greater than 5dB.
[0017] A voice verification system comprises: a voice verification terminal, comprising a sound wave transmitting device, for transmitting sound waves to an external environment, wherein the sound waves include a first audio signal that changes according to a preset rule, and the preset rule makes the first audio signal different at different times; a collector, installed at a position capable of receiving and collecting the sound waves, for collecting voice data; a voice collection control module, for controlling the collector to collect the first voice data under the state of the sound wave emission; a silencing module, for reversely eliminating the first audio signal at a position where the first audio signal is detected in the first voice data when the first audio signal corresponding to the moment of collecting the first voice data is included in the first voice data, so as to obtain second voice data; a voiceprint extraction module, for extracting voiceprint features of the second voice data; and a matching module, for passing the voice verification when the voiceprint features match the preset voiceprint features.
[0018] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the voice verification method described in any of the above embodiments when executing the computer program.
[0019] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the voice verification method described in any of the above embodiments.
[0020] A computer program product includes a computer program, wherein when the computer program is executed by a processor, the steps of the voice verification method described in any of the above embodiments are implemented.
[0021] The method also includes the step of inferring the time of recording based on the time information contained in the other group of first audio data when it is detected that the first voice data contains two groups of the second audio signals, and one group of the first voice data corresponds to the first audio signal corresponding to the moment when the first voice data is collected, thereby tracing the recording / eavesdropping.
[0022] The above-mentioned voice verification method and system, computer equipment and storage medium, when collecting the user's first voice data during the voice verification process, emit a first audio signal, and the first audio signal is different at different times, and in the subsequent steps, the first audio signal is detected and removed according to the collection time of the first voice data and the preset rules, and voiceprint verification is performed based on the voice data after removal. In the case where criminals make illegal recordings near the voice verification terminal, since the recording will contain the first audio signal at the time of recording, the voiceprint feature is contaminated, and therefore the verification cannot be passed when the voiceprint feature is matched, thereby successfully defending against recording playback attacks and improving the security of voice verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A diagram of an application environment of a voice verification method in an embodiment;
[0024] Figure 2 A flowchart of a voice verification method in one embodiment;
[0025] Figure 3 A flow chart of a voice verification method according to another embodiment;
[0026] Figure 4 is an internal structure diagram of a computer device in one embodiment;
[0027] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0030] It should be noted that when an element is referred to as "fixed to" another element, it can be directly on another element or there can also be a centered element. When an element is considered to be "connected" to another element, it can be directly connected to another element or there may be a centered element at the same time. The terms "vertical", "horizontal", "upper", "lower", "left", "right" and similar expressions used herein are only for illustrative purposes. When an element or layer is referred to as "on...", "adjacent to...", "connected to" or "coupled to" other elements or layers, it can be directly on other elements or layers, adjacent to, connected to or coupled to other elements or layers, or there can be an intermediate element or layer. On the contrary, when an element is referred to as "directly on...", "directly adjacent to...", "directly connected to" or "directly coupled to" other elements or layers, there is no intermediate element or layer. It should be understood that although the terms first, second, third, first, second, third, etc. can be used to describe various elements, components, regions, layers and / or parts, these elements, components, regions, layers and / or parts should not be limited by these terms. These terms are only used to distinguish one element, component, region, layer or part from another element, component, region, layer or part. Therefore, without departing from the teachings of the present invention, the first element, component, region, layer or part discussed below may be represented as a second element, component, region, layer or part.
[0031] When the terms "comprise" and / or "include" are used in this specification, they indicate the presence of the features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof. The singular forms "a", "an" and "said / the" are also intended to include the plural forms, unless the context clearly indicates otherwise.
[0032] There are two main traditional methods for defending against recording playback attacks:
[0033] First, from the application point of view, each time the user is required to read out the text content displayed in plain text and changing over time, such as dynamic random numbers, a paragraph of text, etc. This method has a poor user experience and requires a display screen to display the plain text content. In addition, users cannot set their own fixed voice passwords like setting regular passwords. If a fixed voice password is set, it is impossible to prevent someone from stealing the user's voice during a certain verification for subsequent playback attacks (such as a miniature eavesdropping device hidden by criminals on the ATM machine).
[0034] Second, from a technical perspective, machine learning methods are used to determine whether the received voice is emitted by a real person or a device, but the current level of technology makes it difficult to distinguish the sounds played by high-fidelity recording and playback devices.
[0035] The voice verification method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The terminal 102 can be used as a voice verification terminal, and some steps of the voice verification method provided in the present application can be executed on the terminal 102 or on the server 104. Among them, the terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablet computers, portable wearable devices, and automatic teller machines (ATMs), and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0036] In one embodiment of the present application, Figure 2 As shown, a voice verification method is provided, which is applied to Figure 1 Taking the terminal 102 in the example as an example, the method includes the following steps:
[0037] S210, the voice verification terminal transmits sound waves to the external environment.
[0038] The sound wave includes a first audio signal that changes according to a preset rule, and the first audio signal is different at different times by setting a suitable rule, for example, the first audio signal changes over time. In one embodiment of the present application, the sound wave is emitted by a speaker installed in the voice verification terminal; in other embodiments, other devices known in the art that can form sound waves can also be used to emit sound waves containing the first audio signal, such as other devices that can convert electrical signals into sound waves.
[0039] S220, collecting first voice data through a first collector in a state of transmitting sound waves.
[0040] In one embodiment of the present application, the voice verification terminal maintains a state of emitting sound waves, prompts the user to perform voice verification, and collects the user's voice. The first collector is installed at a position where it can receive and collect the sound waves emitted by the speaker. It can be understood that in order to ensure that the first collector can actually collect the sound waves emitted by the speaker, the first collector can be installed close to the speaker on the voice verification terminal. In one embodiment of the present application, the first collector is a microphone; in other embodiments, the first collector can also use other devices known in the art that can convert sound waves into electrical signals.
[0041] S230, detecting whether the first voice data includes a first audio signal, if so, proceeding to step S240.
[0042] If the first voice data collected by the first collector contains a first audio signal corresponding to the moment of the first voice data collection, then enter step S240. Since the collection time of the first voice data is known, the first audio signal corresponding to the moment can be known through the aforementioned preset rules, and then it is determined whether the first voice data contains the signal. It can be understood that the first voice data should actually contain the first audio signal corresponding to the moment of the sound wave emission, but since the first collector is installed close to the speaker, it can be approximately considered that the collection time of the first voice data is the same as the moment of the sound wave emission. In other embodiments, the collection time of the first voice data can also be corrected to make it close to the moment of the sound wave emission. For example, the time required for the sound wave from emission to reception can be calculated based on the distance between the speaker that emits the sound wave and the first collector that collects the sound wave, and the time of the sound wave emission plus the time is the collection time of the first voice data. In one embodiment of the present application, step S230 is executed on the server; in other embodiments, step S230 can also be executed on the voice verification terminal.
[0043] S240: remove the first audio signal from the first voice data to obtain second voice data.
[0044] According to the acquisition time of the first voice data and the aforementioned preset rules, the corresponding first audio signal is obtained, and the position of the first audio signal is detected in the first voice data for reverse elimination. The known first audio signal can be used to directly perform echo elimination, and the first audio signal can be erased from the first voice data without affecting the voiceprint recognition in the subsequent steps. Specifically, the position of the first audio signal can be detected in the first voice data, and a signal with the opposite phase and the same amplitude as the first audio signal can be superimposed to eliminate the first audio signal in the first voice data. In one embodiment of the present application, after determining the position of the first audio signal, the average energy of the position is subtracted from the spectrum to eliminate its influence and obtain the second voice data. In one embodiment of the present application, step S240 is executed on the server; in other embodiments, step S240 can also be executed on the voice verification terminal.
[0045] S250: Extract voiceprint features of the second voice data.
[0046] Among them, voiceprint features refer to the sound wave spectrum that carries speech information displayed by electroacoustic instruments. Each person's voiceprint features are related to their respective vocal organs. If the vocal organs are inconsistent, the sound wave spectrum obtained by analysis will also be inconsistent. Therefore, the voiceprint features can be used to distinguish the speaker.
[0047] Specifically, the voiceprint features of the voice password data can be extracted through a voiceprint feature extraction algorithm. Common voiceprint feature extraction algorithms include but are not limited to Mel-Frequency Cepstral Coefficients (MFCCs), Perceptual Linear Prediction Coefficients (PLP), Deep Features (DeepFeature), Power Normalized Cepstral Coefficents (PNCC) or Power Normalized Perceptual Linear Prediction (PNPLP), etc.
[0048] In one embodiment of the present application, step S250 is executed on the server; in other embodiments, step S250 may also be executed on the voice verification terminal.
[0049] S260: Determine whether the voiceprint feature matches the preset voiceprint feature.
[0050] If the voiceprint feature matches the preset voiceprint feature, the voice verification is passed. In one embodiment of the present application, the extracted voiceprint feature is matched with the pre-extracted voiceprint feature, and matching refers to calculating the similarity between the two voiceprint features. If the similarity between the two meets the preset threshold, the voice verification is passed. In one embodiment of the present application, the preset voiceprint feature is obtained by processing the user voice collected during voiceprint registration.
[0051] In one embodiment of the present application, step S260 is performed on the server; in other embodiments, step S260 can also be performed on the voice verification terminal. It can be understood that the above embodiment describes the voice verification method based on the terminal-server system; in other embodiments, steps S210 to S260 of the above embodiment can also be all performed in the voice verification terminal.
[0052] The above-mentioned voice verification method, when collecting the user's first voice data during the voice verification process, emits a first audio signal, and the first audio signal is different at different times, and in the subsequent steps, the first audio signal is detected and removed according to the collection time of the first voice data and the preset rules, and the voiceprint verification is performed according to the voice data after removal. In the case where criminals make illegal recordings near the voice verification terminal, since the recording will contain the first audio signal at the time of recording, the voiceprint feature is contaminated, and therefore the verification cannot be passed when the voiceprint feature is matched, thereby successfully defending against recording playback attacks and improving the security of voice verification.
[0053] In one of the embodiments of the present application, the special audio signal contained in the sound wave emitted in step S210 includes a second audio signal in addition to the aforementioned first audio signal. The second audio signal is located at the head of the special audio signal, and the first audio signal follows the second audio signal in the time domain. Accordingly, step S230 also needs to detect whether the first voice data has and only has a single second audio signal. If so, the second audio signal needs to be removed in step S240; if there is no second audio signal in the first voice data, or there are two groups (or more) of second audio signals, the voice verification fails. It can be understood that in the case where criminals make illegal recordings near the voice verification terminal, two groups of second audio signals will be detected when using the recording playback for voice verification, thereby determining that it is a recorded playback voice and failing the verification. Setting the second audio signal at the head of the special audio signal can indicate the position of the first audio signal in the same special audio signal, which is convenient for identifying the first audio signal.
[0054] In one embodiment of the present application, the second audio signal is a header that conforms to a certain rule, which is known to our party but unknown to the attacker, and sounds like a noise to the human ear. The first audio signal is the information we want to embed, which changes over time, for example, it can be the current time information. In one embodiment of the present application, different voice verification terminals have different device IDs, and the first audio signal also includes the device ID information of the current voice verification terminal.
[0055] In one of the embodiments of the present application, it is first necessary to detect the position of the head of the regular signal (the second audio signal): the waveform of the first voice data is Fourier transformed to obtain a spectrum. The x-axis of the spectrum is time, and the y-axis is frequency. The head of the special audio signal is represented in the spectrum as a specific figure somewhere on the spectrum, such as a bright oblique line, a bright curve that conforms to a certain function f(x, y) ("bright" means that the energy of the frequency is concentrated at this moment). Scan the spectrum column by column, and when a bright oblique line / bright curve whose duration conforms to the preset special audio signal mode is scanned, and the frequency interval where the oblique line / curve is located conforms to the range where the preset special audio signal may exist, the starting point of the special audio signal is found. Next, starting from the starting point, continue to search for the first audio signal along the time axis. A simple case is that the first audio signal is composed of only a group of signals of a specific frequency, and the specific frequency is the information we want to decode, thereby decoding the information contained in the signal (such as time information), and comparing the information with the acquisition time of the first voice data to determine whether the first voice data contains the first audio signal corresponding to the time when the first voice data is collected. Furthermore, in the case where two groups of second audio signals are detected in the first voice data, and the first voice data corresponding to one group is the first audio signal corresponding to the moment when the first voice data was collected, the time of recording can be inferred based on the time information contained in the other group of decoded first audio data, thereby tracing the recording / eavesdropping.
[0056] In one of the embodiments of the present application, the first audio signal is a signal sequence related to the emission moment of the sound wave.
[0057] In one embodiment of the present application, the first audio signal includes a plurality of sub-signals spaced from each other in the time domain, each sub-signal contains a portion of time information, and the time information of each sub-signal is combined to form the complete emission time. The composition of the first audio signal is described below by a specific embodiment: Assuming that the current time is 11:04 on Thursday, September 10, 2020, a signal with a frequency that changes every 20ms can be emitted, and the frequencies are 2020, 900, 1000, 1100, and 400Hz, respectively. In other embodiments, the frequency can also be other values, as long as the regularity is related to time. Further, in order to prevent the regularity from being discovered by others, the frequencies of the above-mentioned sub-signals need to be further transformed and encrypted to emit noise that looks random but has time information embedded inside (i.e., the first audio signal). The second audio signal can be set at the head of a group of sub-signals of the first audio signal, that is, after the second audio signal appears, the aforementioned frequency signals of 2020, 900, 1000, 1100, and 400Hz appear in sequence. In one embodiment, the time interval between adjacent second audio signals is a fixed value. In this way, when it is detected that the time interval between two adjacent second audio signals is not the fixed value, it can be determined that there are more than two groups of second audio signals.
[0058] Figure 3 is a flow chart of a voice verification method in another embodiment, comprising the following steps:
[0059] S302, obtaining registration voice data.
[0060] In one embodiment of the present application, the registration terminal prompts the user to register his / her identity and enter a voice password. The password can be set by the user, and the user reads out the voice password he / she wants to set to complete the setting. The voice password content can be in any language, or even a meaningless voice, as long as the voice length and quality meet the requirements. For the embodiment in which the user sets the voice password by himself / herself, in the subsequent voice verification step, the display screen may not be required to display the dynamic random numbers, random text, etc. that the user needs to read out, thereby saving the cost of configuring the display screen.
[0061] In one embodiment of the present application, the registered speech data is required to contain at least 8 syllables and have a signal-to-noise ratio greater than 5 dB.
[0062] In one embodiment of the present application, the registration terminal and the voice verification terminal may be the same terminal, that is, the user may perform registration and voice verification on the same terminal; in other embodiments, the registration terminal and the voice verification terminal may also be different terminals.
[0063] In one embodiment of the present application, step S302 includes:
[0064] The registration terminal transmits sound waves to the external environment. Similar to step S210, the sound waves emitted by the registration terminal also include a first audio signal that changes according to a preset rule. The first audio signal is different at different times by setting appropriate rules, for example, the first audio signal changes over time. In one embodiment of the present application, the sound wave is emitted by a speaker installed in the registration terminal; in other embodiments, other devices known in the art that can form sound waves can also be used to emit sound waves containing the first audio signal, such as other devices that can convert electrical signals into sound waves.
[0065] In one embodiment of the present application, the special audio signal contained in the sound wave emitted in step S302 includes a second audio signal in addition to the aforementioned first audio signal. The second audio signal is located at the head of the special audio signal, and the first audio signal follows the second audio signal in the time domain.
[0066] In one embodiment of the present application, the second audio signal is a header that conforms to a certain rule, which is known to our party but unknown to the attacker, and sounds like a noise to the human ear. The first audio signal is the information we want to embed, which changes over time, for example, it can be the current time information. In one embodiment of the present application, different voice verification terminals have different device IDs, and the first audio signal also includes the device ID information of the current voice verification terminal.
[0067] In one of the embodiments of the present application, the first audio signal is a signal sequence related to the emission moment of the sound wave.
[0068] In one embodiment of the present application, the first audio signal includes a plurality of sub-signals spaced from each other in the time domain, each sub-signal contains a portion of time information, and the time information of each sub-signal is combined to form the complete emission time. The composition of the first audio signal is described below by a specific embodiment: Assuming that the current time is 11:04 on Thursday, September 10, 2020, a signal with a frequency that changes every 20ms can be emitted, and the frequencies are 2020, 900, 1000, 1100, and 400Hz, respectively. In other embodiments, the frequency can also be other values, as long as the regularity is related to time. Further, in order to prevent the regularity from being discovered by others, the frequencies of the above-mentioned sub-signals need to be further transformed and encrypted to emit noise that looks random but has time information embedded inside (i.e., the first audio signal). The second audio signal can be set at the head of a group of sub-signals of the first audio signal, that is, after the second audio signal appears, the aforementioned frequency signals of 2020, 900, 1000, 1100, and 400Hz appear in sequence. In one embodiment, the time interval between adjacent second audio signals is a fixed value. In this way, when it is detected that the time interval between two adjacent second audio signals is not the fixed value, it can be determined that there are more than two groups of second audio signals.
[0069] Step S302 also includes: when the registration terminal transmits the sound wave, collecting the registration voice data through the second collector, the second collector is installed at a position capable of receiving and collecting the sound wave transmitted by the registration terminal.
[0070] In one embodiment of the present application, the second collector is installed at a position where it can receive and collect the sound waves emitted by the speaker. It is understandable that in order to ensure that the second collector can actually collect the sound waves emitted by the speaker, the second collector can be installed close to the speaker on the registration terminal. In one embodiment of the present application, the second collector is a microphone; in other embodiments, the second collector can also use other devices known in the art that can convert sound waves into electrical signals.
[0071] The above embodiment can prevent criminals from recording a voice password without the first audio signal near the registration terminal and using it for recording and playback attacks by adding the first audio signal to the collected registration voice data during registration.
[0072] In one embodiment of the present application, step S302 further includes the step of identity authentication when acquiring the registration voice data, and collecting the voice password entered by the user when the identity authentication passes. In this embodiment, the registration terminal does not transmit the sound wave containing the first audio signal to the external environment in step S302.
[0073] S304: extracting voiceprint features from the registered voice data as preset voiceprint features.
[0074] Correspondingly, for the embodiment of maintaining the registration terminal emitting the sound wave when acquiring the registration voice data, step S304 also needs to detect whether the registration voice data contains the first audio signal and / or the second audio signal corresponding to the moment when the registration voice data was collected. If contained, the first audio signal and the second audio signal detected in the registration voice data are completely removed to obtain the third voice data, and then the voiceprint features of the third voice data are extracted as the preset voiceprint features.
[0075] S310, the voice verification terminal emits sound waves to the external environment.
[0076] Steps S302 and S304 are steps in the user registration stage. After the user completes the registration, the voice verification stage begins from step S310. Similar to step S210, the sound wave emitted by the voice verification terminal includes a first audio signal that changes according to a preset rule, and the first audio signal is different at different times by setting appropriate rules, for example, the first audio signal changes over time. In one embodiment of the present application, the sound wave is emitted by a speaker installed in the voice verification terminal; in other embodiments, other devices known in the art that can form sound waves can also be used to emit sound waves containing the first audio signal, such as other devices that can convert electrical signals into sound waves.
[0077] In one embodiment of the present application, the special audio signal contained in the sound wave emitted in step S302 includes a second audio signal in addition to the aforementioned first audio signal. The second audio signal is located at the head of the special audio signal, and the first audio signal follows the second audio signal in the time domain.
[0078] In one embodiment of the present application, the second audio signal is a header that conforms to a certain rule, which is known to our party but unknown to the attacker, and sounds like a noise to the human ear. The first audio signal is the information we want to embed, which changes over time, for example, it can be the current time information. In one embodiment of the present application, different voice verification terminals have different device IDs, and the first audio signal also includes the device ID information of the current voice verification terminal.
[0079] In one of the embodiments of the present application, the first audio signal is a signal sequence related to the emission moment of the sound wave.
[0080] In one embodiment of the present application, the first audio signal includes a plurality of sub-signals spaced from each other in the time domain, each sub-signal contains a portion of time information, and the time information of each sub-signal is combined to form the complete emission time. The composition of the first audio signal is described below by a specific embodiment: Assuming that the current time is 11:04 on Thursday, September 10, 2020, a signal with a frequency that changes every 20ms can be emitted, and the frequencies are 2020, 900, 1000, 1100, and 400Hz, respectively. In other embodiments, the frequency can also be other values, as long as the regularity is related to time. Further, in order to prevent the regularity from being discovered by others, the frequencies of the above-mentioned sub-signals need to be further transformed and encrypted to emit noise that looks random but has time information embedded inside (i.e., the first audio signal). The second audio signal can be set at the head of a group of sub-signals of the first audio signal, that is, after the second audio signal appears, the aforementioned frequency signals of 2020, 900, 1000, 1100, and 400Hz appear in sequence. In one embodiment, the time interval between adjacent second audio signals is a fixed value. In this way, when it is detected that the time interval between two adjacent second audio signals is not the fixed value, it can be determined that there are more than two groups of second audio signals.
[0081] S320, collecting first voice data through a first collector in a state of transmitting sound waves.
[0082] In one embodiment of the present application, the voice verification terminal maintains a state of emitting sound waves, prompts the user to perform voice verification, and collects the user's voice. The first collector is installed at a position where it can receive and collect the sound waves emitted by the speaker. It can be understood that in order to ensure that the first collector can actually collect the sound waves emitted by the speaker, the first collector can be installed close to the speaker on the voice verification terminal. In one embodiment of the present application, the first collector is a microphone; in other embodiments, the first collector can also use other devices known in the art that can convert sound waves into electrical signals.
[0083] S330, detecting whether there is and only a single second audio signal in the first voice data, if so, proceeding to step S340, otherwise, the voice verification is rejected.
[0084] If there is no second audio signal in the first voice data, or there are two (or more) sets of second audio signals, the voice verification fails.
[0085] In one of the embodiments of the present application, it is first necessary to detect the position of the head of the regular signal (the second audio signal): the waveform of the first voice data is Fourier transformed to obtain a spectrum. The x-axis of the spectrum is time, and the y-axis is frequency. The head of the special audio signal is represented in the spectrum as a specific figure somewhere on the spectrum, such as a bright oblique line, a bright curve that conforms to a certain function f(x, y) ("bright" means that the energy of the frequency is concentrated at this moment). Scan the spectrum column by column, and when a bright oblique line / bright curve whose duration conforms to the preset special audio signal mode is scanned, and the frequency interval where the oblique line / curve is located conforms to the range where the preset special audio signal may exist, the starting point of the special audio signal is found. Next, starting from the starting point, continue to search for the first audio signal along the time axis. A simple case is that the first audio signal is composed of only a group of signals of a specific frequency, and the specific frequency is the information we want to decode, thereby decoding the information contained in the signal (such as time information), and comparing the information with the acquisition time of the first voice data to determine whether the first voice data contains the first audio signal corresponding to the time when the first voice data is collected. Furthermore, in the case where two groups of second audio signals are detected in the first voice data, and the first voice data corresponding to one group is the first audio signal corresponding to the moment when the first voice data was collected, the time of recording can be inferred based on the time information contained in the other group of decoded first audio data, thereby tracing the recording / eavesdropping.
[0086] In one of the embodiments of the present application, the first audio signal is a signal sequence related to the emission moment of the sound wave.
[0087] In one embodiment of the present application, the first audio signal includes a plurality of sub-signals spaced from each other in the time domain, each sub-signal contains a portion of time information, and the time information of each sub-signal is combined to form the complete emission time. The composition of the first audio signal is described below by a specific embodiment: Assuming that the current time is 11:04 on Thursday, September 10, 2020, a signal with a frequency that changes every 20ms can be emitted, and the frequencies are 2020, 900, 1000, 1100, and 400Hz, respectively. In other embodiments, the frequency can also be other values, as long as the regularity is related to time. Further, in order to prevent the regularity from being discovered by others, the frequencies of the above-mentioned sub-signals need to be further transformed and encrypted to emit noise that looks random but has time information embedded inside (i.e., the first audio signal). The second audio signal can be set at the head of a group of sub-signals of the first audio signal, that is, after the second audio signal appears, the aforementioned frequency signals of 2020, 900, 1000, 1100, and 400Hz appear in sequence. In one embodiment, the time interval between adjacent second audio signals is a fixed value. In this way, when it is detected that the time interval between two adjacent second audio signals is not the fixed value, it can be determined that there are more than two groups of second audio signals.
[0088] S340: Remove the first and second audio signals from the first voice data to obtain second voice data.
[0089] In one embodiment of the present application, after the positions of the first audio signal and the second audio signal are determined, the average energy of these positions is subtracted from the spectrum to eliminate their influence and obtain the second speech data.
[0090] S350: Extract voiceprint features of the second voice data.
[0091] S360: Determine whether the voiceprint feature matches a preset voiceprint feature.
[0092] If the voiceprint feature matches the preset voiceprint feature obtained in step S304, the voice verification is passed. In one embodiment of the present application, the extracted voiceprint feature is matched with the pre-extracted voiceprint feature, and matching refers to calculating the similarity between the two voiceprint features. If the similarity between the two meets the preset threshold, the voice verification is passed.
[0093] It should be understood that although Figure 2-Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-Figure 3At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0094] The present application accordingly provides a voice verification system, comprising:
[0095] The voice verification terminal comprises a sound wave transmitting device for transmitting sound waves to the external environment, wherein the sound waves comprise a first audio signal that changes according to a preset rule, wherein the preset rule makes the first audio signal different at different times.
[0096] The collector is installed at a position where the sound waves can be received and collected, and is used to collect voice data.
[0097] The voice collection control module is used to control the collector to collect the first voice data under the state of the sound wave emission.
[0098] The silencing module is used to remove the first audio signal from the first voice data to obtain the second voice data when the first voice data contains the first audio signal corresponding to the time when the first voice data is collected.
[0099] A voiceprint extraction module is used to extract the voiceprint features of the second voice data.
[0100] The matching module is used to pass the voice verification when the voiceprint feature matches the preset voiceprint feature.
[0101] In one embodiment of the present application, the sound wave further includes a second audio signal, the second audio signal is located at the head of the special audio signal, and the special audio signal includes the second audio signal and a first audio signal following the second audio signal in the time domain. The silencing module is also used to detect whether the first voice data has and only has a single second audio signal, and if so, remove the second audio signal in the first voice data; otherwise, output a signal indicating that the voice verification has failed.
[0102] In one embodiment of the present application, the step of the mute module detecting whether the first voice data has and only has a single second audio signal is by performing Fourier transform on the first voice data to detect whether the first voice data has a second audio signal that meets preset conditions in the frequency spectrum.
[0103] In one embodiment of the present application, the first audio signal is a signal sequence related to the emission time of the sound wave.
[0104] In one embodiment of the present application, the silencing module is used to obtain the first audio signal corresponding to the moment when the first voice data is collected according to the preset rule, and determine whether the first voice data contains the first audio signal corresponding to the moment when the first voice data is collected. If so, remove the first audio signal in the first voice data, otherwise output a signal indicating that the voice verification fails.
[0105] For the specific definition of the voice verification system, please refer to the definition of the voice verification method above, which will not be repeated here. Each module in the above voice verification system can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0106] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store voice verification data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a voice verification method is implemented.
[0107] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a voice verification method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0108] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0109] The present application also provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the voice verification method as described in any of the above embodiments are implemented.
[0110] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the voice verification method as described in any of the aforementioned embodiments are implemented.
[0111] The present application also provides a computer program product, including a computer program, which implements the steps of the voice verification method described in any of the above embodiments when executed by a processor.
[0112] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0113] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0114] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A voice verification method, characterized in that: The method comprises: The voice verification terminal transmits a sound wave to the external environment, wherein the sound wave includes a first audio signal that changes according to a preset rule, wherein the preset rule makes the first audio signal different at different times; the sound wave also includes a second audio signal, wherein the second audio signal is located at the head of a special audio signal, and the special audio signal includes the second audio signal and a first audio signal that follows the second audio signal in the time domain; Collecting first voice data by a first collector in a state where the sound wave is emitted, wherein the first collector is installed at a position capable of receiving and collecting the sound wave; If the first voice data includes a first audio signal corresponding to the time when the first voice data is collected, the first audio signal is reversely eliminated at the position where the first audio signal is detected in the first voice data to obtain second voice data; Extracting a voiceprint feature of the second voice data; If the voiceprint feature matches the preset voiceprint feature, the voice verification is passed; The method also includes: detecting whether the first voice data has and only has a single second audio signal, and if so, the step of reversely eliminating the first audio signal at the position where the first audio signal is detected in the first voice data also includes removing the second audio signal; otherwise, the voice verification fails.
2. The voice verification method according to claim 1, characterized in that: The step of detecting whether the first voice data has and has only a single second audio signal comprises: performing Fourier transform on the first voice data, and detecting whether the first voice data has a second audio signal that meets a preset condition in the frequency spectrum.
3. The voice verification method according to claim 2, characterized in that: The first audio signal is a signal sequence related to the emission time of the sound wave.
4. The voice verification method according to claim 3, characterized in that: The first audio signal includes a plurality of sub-signals spaced apart from each other in the time domain, each sub-signal contains a portion of time information, and the time information of each sub-signal is combined together to form the complete emission time.
5. The voice verification method according to claim 1, characterized in that: If the first voice data includes a first audio signal corresponding to the time when the first voice data is collected, the step of detecting the position of the first audio signal in the first voice data and reversely eliminating the first audio signal includes: Obtaining a first audio signal corresponding to the moment when the first voice data is collected according to the preset rule; Determine whether the first voice data contains the first audio signal corresponding to the moment when the first voice data was collected. If so, reversely eliminate the first audio signal at the position where the first audio signal is detected in the first voice data. Otherwise, the voice verification fails.
6. The voice verification method according to claim 1, characterized in that: The voiceprint registration step is also included, and the voiceprint registration step includes: Get the registered voice data; A voiceprint feature is extracted from the registered voice data as the preset voiceprint feature.
7. A voice verification system, characterized in that: include: A voice verification terminal, comprising a sound wave emitting device, for emitting sound waves to an external environment, wherein the sound waves include a first audio signal that changes according to a preset rule, wherein the preset rule makes the first audio signal different at different times; the sound waves also include a second audio signal, wherein the second audio signal is located at the head of a special audio signal, and the special audio signal includes the second audio signal and a first audio signal that follows the second audio signal in the time domain; A collector, installed at a position capable of receiving and collecting the sound waves, for collecting voice data; A voice collection control module, used for controlling the collector to collect the first voice data in the state of the sound wave emission; a silencing module, configured to, when the first voice data contains a first audio signal corresponding to the moment when the first voice data is collected, reversely eliminate the first audio signal at the position where the first audio signal is detected in the first voice data to obtain second voice data; and further configured to detect whether the first voice data has and has only a single second audio signal, and if so, remove the second audio signal in the first voice data; otherwise, output a signal indicating that the voice verification has failed; A voiceprint extraction module, used to extract the voiceprint features of the second voice data; The matching module is used to pass the voice verification when the voiceprint feature matches the preset voiceprint feature.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the voice verification method according to any one of claims 1 to 6 are implemented.
