Data processing method, detection method and device
By generating and analyzing the time-frequency distribution data of sample signals, determining their energy levels, and training a liveness detection model, the problem of insufficient signal features in existing technologies is solved, thereby improving the accuracy and efficiency of liveness detection.
Patent Information
- Application Number
- CN202410591375.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-13
- Publication Date
- 2025-11-14
AI Technical Summary
Existing liveness detection methods rely on a limited number of signal features detected through acoustic signals, resulting in low detection accuracy and difficulty in effectively resisting attacks from photographs and electronic screens.
By generating and analyzing the time-frequency distribution data of sample signals, their energy levels are determined, and a pre-trained liveness attack detection model is used for detection, thereby improving the signal feature dimensions and the accuracy of the model.
By using a dual-dimensional description of time-frequency distribution data and the classification of energy levels, the accuracy and efficiency of the liveness attack detection model are improved, enabling better identification of live targets and attack objects.
Smart Images

Figure CN120949205A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a data processing method, detection method and apparatus. Background Technology
[0002] Liveness detection is a method used to verify real physiological characteristics. By verifying whether a user is alive, it can effectively resist attacks from photos, electronic screens, and other means, help users identify illegal activities, and protect users' interests.
[0003] In related technologies, acoustic signals can be used to achieve liveness detection and prevent various attacks. Specifically, acoustic signals are emitted towards the target object, and the signal characteristics of the reflected acoustic signals are detected to achieve attack detection. However, this detection method has limited signal characteristics, leading to low detection accuracy. Summary of the Invention
[0004] This disclosure provides a data processing method, a detection method, and an apparatus.
[0005] Firstly, this disclosure provides a data processing method, including:
[0006] Generate time-frequency distribution data of a first sample signal reflected by a sample detection object; wherein, the time-frequency distribution data includes: the energy values of multiple specified frequency components of the first sample signal at multiple specified time points;
[0007] A preset calculation is performed on the energy value to obtain the calculation result of the time-frequency distribution data;
[0008] The energy level of the first sample signal is determined based on the matching results between the calculation results and multiple energy level ranges;
[0009] Based on the first annotation result of the sample detection object and the energy level of the first sample signal, determine the second annotation result of the first sample signal;
[0010] The first sample signal and the second annotation result are used to train the liveness attack detection model.
[0011] Secondly, this disclosure provides a method for detecting liveness attacks, including:
[0012] Generate time-frequency distribution data of the first target signal reflected by the target detection object;
[0013] The prediction results of the time-frequency distribution data are obtained by using a pre-trained liveness attack detection model;
[0014] Based on the prediction results, determine whether the target detection object is an attack target.
[0015] Thirdly, this disclosure provides a data processing apparatus, including:
[0016] The generation module is adapted to generate time-frequency distribution data of a first sample signal reflected by a sample detection object; wherein the time-frequency distribution data includes: the energy values of multiple specified frequency components of the first sample signal at multiple specified time points;
[0017] The calculation module is adapted to perform preset calculations on the energy value to obtain the calculation results of the time-frequency distribution data;
[0018] The level determination module is adapted to determine the energy level of the first sample signal based on the matching results between the calculation results and multiple energy level intervals;
[0019] The annotation module is adapted to determine a second annotation result of the first sample signal based on a first annotation result of the sample detection object and the energy level of the first sample signal;
[0020] The first sample signal and the second annotation result are used to train the liveness attack detection model.
[0021] Fourthly, this disclosure provides a liveness attack detection device, comprising:
[0022] The generation module is adapted to generate time-frequency distribution data of the first target signal reflected by the target detection object;
[0023] The acquisition module is adapted to acquire the prediction results of the time-frequency distribution data through a pre-trained liveness attack detection model;
[0024] The determination module is adapted to determine whether the target detection object is an attack target based on the prediction result.
[0025] Fifthly, this disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the methods described above.
[0026] In a sixth aspect, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described method.
[0027] In a seventh aspect, this disclosure provides a computer program product including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the method described above.
[0028] The training method, detection method, and apparatus for the detection model provided in this disclosure can generate time-frequency distribution data of a first sample signal reflected by a sample detection object. Based on the energy values of multiple specified frequency components of the first sample signal at multiple specified time points contained in the time-frequency distribution data, the energy level of the first sample signal is determined, and then a labeling result of the first sample signal is generated based on the energy level. Therefore, on the one hand, the time-frequency distribution data is used to characterize the energy values of multiple specified frequency components of the first sample signal at multiple specified time points, thus describing signal characteristics from both the time and frequency domains. This provides a more comprehensive feature dimension and improves the accuracy of the subsequently trained liveness detection model. On the other hand, by dividing the data into multiple energy level intervals, the liveness detection model can learn fine-grained sample features, thereby training a fine-grained liveness detection model and improving the accuracy of the attack detection model. Since the signal characteristics of different energy values differ greatly, if multiple signals with large energy values are mixed together for learning without dividing them into energy levels, it will be detrimental to the model learning accurate feature information. This application makes it easier for the model to learn the common features among a group of signals with energy values in the same energy level range by dividing them into energy levels, thereby improving the efficiency and accuracy of model learning, and thus improving the detection accuracy of the liveness attack detection model.
[0029] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0030] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the embodiments of the present disclosure to explain the disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the detailed description of exemplary embodiments with reference to the accompanying drawings, in which:
[0031] Figure 1 A flowchart of a data processing method provided in an embodiment of this disclosure;
[0032] Figure 2 A flowchart illustrating a liveness attack detection method provided in an embodiment of this disclosure is shown.
[0033] Figure 3A flowchart illustrating the training method of an attack detection model in an example is shown.
[0034] Figure 4 The frequency domain characteristics of the received signal are shown.
[0035] Figure 5 The time-frequency diagram of the first sample signal is shown;
[0036] Figure 6 The time-frequency diagram is shown after the center frequency of the first sample signal is masked.
[0037] Figure 7 A block diagram of a data processing apparatus provided in an embodiment of this disclosure;
[0038] Figure 8 A block diagram of a liveness attack detection device provided in an embodiment of this disclosure;
[0039] Figure 9 This is a block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0040] To enable those skilled in the art to better understand the technical solutions of this disclosure, exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0041] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.
[0042] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.
[0043] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Words such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.
[0044] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.
[0045] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information in this technical solution comply with relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution follows relevant national laws and regulations (e.g., the "Information Security Technology - Personal Information Security Specification"). For example, appropriate measures are taken for personal information access control; restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; and explicit identity targeting is eliminated when using personal information to avoid precisely identifying specific individuals.
[0046] In related technologies, acoustic signals can be used to achieve liveness detection and prevent various attacks. Specifically, acoustic signals are emitted towards the target object, and the signal characteristics of the reflected acoustic signals are detected to achieve attack detection. However, the above detection method has limited signal characteristics, resulting in poor detection performance and difficulty in achieving accurate detection. To address this problem, this application proposes a data processing method, detection method, and apparatus. This method uses time-frequency distribution data to characterize the energy values of multiple specified frequency components of a first sample signal at multiple specified time points, thereby describing signal characteristics from both time and frequency domains, making the feature dimensions more comprehensive and thus improving accuracy. Furthermore, by dividing the signal into multiple energy level intervals, this method enables the model to learn fine-grained sample features, thereby training a fine-grained attack detection model and improving the accuracy of the attack detection model.
[0047] The training of the attack detection model and the attack detection method according to embodiments of this disclosure can be executed by electronic devices such as terminal devices or servers. The terminal device can be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. The server can be a standalone physical server, a server cluster composed of multiple physical servers, or a cloud server capable of cloud computing. This method can be implemented by a processor calling computer-readable program instructions stored in memory.
[0048] Figure 1This is a flowchart illustrating a data processing method provided in an embodiment of this disclosure. This data processing method can be used to train a liveness attack detection model, which can be used to detect attacks where electronic devices impersonate living objects for authentication. (Refer to...) Figure 1 The method includes:
[0049] Step S110: Generate time-frequency distribution data of the first sample signal reflected by the sample detection object; wherein, the time-frequency distribution data includes: the energy values of multiple specified frequency components of the first sample signal at multiple specified time points.
[0050] The sample detection object refers to the object that needs to be verified for identity. For example, in a non-attack scenario, the sample detection object can be a live object, such as a real biometric feature like a face, fingerprint, or iris. In an attack scenario, the sample detection object can be an electronic screen such as a mobile phone or computer, used to forge biometric features.
[0051] In this embodiment, to improve the accuracy of detection, an acoustic wave signal is emitted toward the sample detection object. This acoustic wave signal is reflected by the sample detection object to obtain a first sample signal. Therefore, the first sample signal is the signal obtained after the initially emitted acoustic wave signal reaches the surface of the sample detection object and is reflected; it is a reflected acoustic wave signal.
[0052] In this step, to facilitate subsequent feature analysis, it is necessary to extract the signal features of the first sample signal, thereby obtaining time-frequency distribution data. This time-frequency distribution data includes the energy values of multiple specified frequency components of the first sample signal at multiple specified time points. Therefore, time-frequency distribution data is used to describe the characteristics of the signal from both the time and frequency domains. Specifically, the time-frequency distribution data contains multiple energy values, each corresponding to a specified time point and a specified frequency component. In other words, the time-frequency distribution data can be represented by a two-dimensional array, where the first and second indices of the two-dimensional array represent the corresponding specified time point and specified frequency component, respectively, and the element values in the two-dimensional array represent the specific numerical values of the energy values corresponding to the first and second indices.
[0053] Step S120: Perform a preset calculation on the energy value to obtain the calculation result of the time-frequency distribution data. In an optional implementation, the calculation result of the time-frequency distribution data can be determined in the following way: First, based on the signal transmission frequency of the first sample signal, select the target frequency component related to the Doppler frequency shift from multiple specified frequency components.
[0054] Doppler shift refers to the phenomenon where, when there is relative motion between a wave source (such as a sound source or light source) and an observer, the frequency of the wave received by the observer differs from the frequency emitted by the wave source. Therefore, the sample detection object can be guided to move (e.g., guiding a user's face up or down, left or right), causing a frequency shift in the received first sample signal, making it different from the original emitted sound wave signal's frequency. In other words, due to the Doppler shift, the received first sample signal contains more frequency components, including not only the frequency with the same emission frequency but also several other frequency components. Correspondingly, the target frequency component related to Doppler shift refers to the frequency component different from the emission frequency generated by the motion of the sample detection object. Specifically, the target frequency component can be multiple frequency components; several frequency components adjacent to the signal emission frequency can be selected as the target frequency components.
[0055] In practical implementation, the frequency sub-range corresponding to the frequency shift region can be determined based on the frequency distribution range of the time-frequency distribution data. The frequency shift region is generated by the Doppler frequency shift caused by the motion of the sample detection object, thus all frequency components located within the frequency sub-range corresponding to the frequency shift region can be taken as target frequency components.
[0056] Then, target energy values are selected from multiple energy values corresponding to multiple specified time points for the target frequency component. For ease of analysis, several target energy values need to be selected from the multiple energy values. Specifically, the multiple energy values corresponding to multiple specified time points for the target frequency component can be sorted in descending order, and the top-ranked energy values are selected as target energy values (e.g., selecting a preset proportion of the top-ranked energy values). Here, the multiple energy values corresponding to multiple specified time points for the target frequency component refer to the multiple energy values whose specified frequency component corresponds to the second subscript and matches the target frequency component.
[0057] Finally, preset calculations are performed on the target energy values to obtain the results of the time-frequency distribution data. These preset calculations can be various operations, such as averaging, finding the maximum value, or calculating the variance; in short, any operation that can characterize the distribution of energy values is acceptable. For example, the average of several selected target energy values can be used as the result of the time-frequency distribution data calculation.
[0058] The above calculation process aims to select several frequency components (i.e. target frequency components) from multiple specified frequency components within the Doppler shift correlation range. The target frequency components are generated by the motion of the sample detection object, and the magnitude of the energy value within the target frequency component is used to characterize whether the motion amplitude of the sample detection object is sufficient.
[0059] Step S130: Determine the energy level of the first sample signal based on the matching results between the calculation results and multiple energy level ranges.
[0060] The process involves pre-dividing multiple energy level intervals using various threshold values. The calculated results are then matched against these intervals to determine the energy level of the first sample signal. Since the energy level of the first sample signal is determined based on the matching results between the calculated time-frequency distribution data and the multiple energy level intervals, the energy level of the first sample signal reflects the magnitude of the signal's energy. For example, a higher energy level indicates a greater signal energy, while a lower energy level indicates a smaller signal energy.
[0061] Step S140: Determine the second annotation result of the first sample signal based on the first annotation result of the sample detection object and the energy level of the first sample signal; wherein, the first sample signal and the second annotation result are used to train the liveness attack detection model.
[0062] The first annotation result of the sample detection object is the annotation result of other dimensions unrelated to the energy level. For example, the first annotation result can be a positive or negative annotation result determined according to the object category of the sample detection object. Accordingly, based on the first annotation result of the sample detection object and the energy level of the first sample signal, a second annotation result of the first sample signal can be determined. The second annotation result includes at least: a level annotation result determined according to the energy level of the first sample signal.
[0063] Therefore, this embodiment can generate a second annotation result by combining the energy level with the first annotation result in the conventional annotation method, and then train the liveness attack detection model based on the second annotation result. The second annotation result of the first sample signal is also called a training label, used to annotate the first sample signal. In this embodiment, the second annotation result may include positive and negative annotation results to characterize the object category of the sample detection object. Positive and negative annotation results are used to characterize whether the sample detection object is a positive or negative sample object. Positive sample objects include various liveness objects, and negative sample objects include various electronic screens, etc.
[0064] Furthermore, the second annotation result includes a level annotation result determined based on the energy level of the first sample signal. This level annotation result is used to characterize the energy level of the first sample signal. For example, if five energy levels are pre-defined, the level annotation result is used to characterize which of the five energy levels the first sample signal specifically belongs to.
[0065] Adding gradation labels makes the labels more granular, which helps the model learn finer-grained classification features.
[0066] The liveness detection model can be obtained by training the model using the labeled first sample signal. This liveness detection model can be implemented using various neural network models or other machine learning models.
[0067] The training method for the attack detection model provided in this disclosure can generate time-frequency distribution data of a first sample signal reflected by a sample detection object. Based on the energy values of multiple specified frequency components of the first sample signal at multiple specified time points contained in the time-frequency distribution data, the energy level of the first sample signal is determined, and then a labeling result of the first sample signal is generated based on the energy level. Therefore, on the one hand, the time-frequency distribution data is used to characterize the energy values of multiple specified frequency components of the first sample signal at multiple specified time points, thus describing signal characteristics from both time and frequency domains. This provides a more comprehensive feature dimension and improves the accuracy of the subsequently trained liveness detection model. On the other hand, by dividing the data into multiple energy level intervals, the liveness detection model can learn fine-grained sample features, thereby training a fine-grained liveness detection model and improving the accuracy of the attack detection model. Since the signal characteristics of different energy values differ greatly, if multiple signals with large energy values are mixed together for learning without dividing them into energy levels, it will be detrimental to the model learning accurate feature information. This application makes it easier for the model to learn the common features among a group of signals with energy values in the same energy level range by dividing them into energy levels, thereby improving the efficiency and accuracy of model learning, and thus improving the detection accuracy of the liveness attack detection model.
[0068] Those skilled in the art can also make various modifications and variations to the above embodiments:
[0069] In some possible implementations, the inventors discovered that in certain scenarios, if the detected object's movement amplitude is too small during the detection process—for example, when asking the detected object to nod or shake its head—the movement amplitude is too small, resulting in a clearly substandard action, which will affect the accuracy of the detection results. Therefore, to improve the accuracy of sample data and avoid low-quality samples affecting model accuracy, in the above method, the first sample signal is determined to be valid if the calculation result is greater than a first threshold. The first threshold is determined based on a level division threshold used to divide multiple energy level intervals. Specifically, N-1 energy level intervals can be defined by N level division thresholds arranged in ascending order, and correspondingly, the first threshold can be set as the minimum value among the N level division thresholds.
[0070] In practice, it can be determined whether the result of the time-frequency distribution data calculation is greater than the first threshold (also called the first preset effective threshold). If not, the first sample signal is determined to be an invalid signal and discarded. Since the result of the time-frequency distribution data calculation is determined based on multiple energy values of the target frequency component in the frequency shift region, it can characterize the magnitude of the frequency shift: the larger the result of the time-frequency distribution data calculation, the larger the frequency shift magnitude; the smaller the result of the time-frequency distribution data calculation, the smaller the frequency shift magnitude. Therefore, by reasonably setting the first threshold, sample signals with poor quality due to excessively small frequency shift magnitudes can be filtered out, thereby improving the quality of the sample signals. The first threshold can be determined based on the minimum value among multiple level-division thresholds. For example, the first preset effective threshold can be a value equal to or less than this minimum value. Thus, by setting the first threshold, signals with excessively small motion amplitudes can be filtered out. These signals are detected when the sample object does not move significantly during the detection process, resulting in poor performance. Therefore, the first threshold can filter out low-quality signals caused by insufficient movement amplitude of the detected object such as a face. Such low-quality signals may be caused by insufficient movement amplitude of the face when it should make a nodding or shaking motion. The reason is that if the movement amplitude is insufficient, the number and energy of the frequency components generated by the Doppler frequency shift will be insufficient.
[0071] In some possible implementations, to determine a suitable transmission frequency, before generating the time-frequency distribution data of the first sample signal reflected by the sample detection object, the following operations are performed: a first frequency-modulated continuous wave is transmitted to the sample detection object, and a second frequency-modulated continuous wave is obtained after reflection by the sample detection object; the signal transmission frequency is determined based on the second frequency-modulated continuous wave; a transmission signal with a transmission frequency equal to the transmission frequency of the second frequency-modulated continuous wave is transmitted to the sample detection object, and this transmitted signal is reflected by the sample detection object to obtain the aforementioned first sample signal. Specifically, when determining the signal transmission frequency based on the second frequency-modulated continuous wave, the frequency component with the highest energy value contained in the second frequency-modulated continuous wave can be determined first, and the signal transmission frequency can be determined based on this frequency component with the highest energy value. For example, the signal transmission frequency can be directly determined as the frequency value corresponding to the frequency component with the highest energy value. Therefore, by pre-transmitting a frequency-modulated continuous wave with a frequency varying within a certain range, the optimal transmission frequency can be determined based on the energy values of each frequency component in the reflected signal, thereby improving signal detection efficiency. Thus, by selecting the transmission frequency, the optimal frequency effect of the transmitted acoustic signal can be ensured.
[0072] In some possible implementations, to avoid affecting model training accuracy due to excessively low signal strength or poor signal transmission quality, the signal strength of the transmitted signal can be pre-judged to eliminate signals with excessively low strength. Accordingly, the above method further performs the following operations: obtaining the energy value of a first frequency component contained in the first sample signal reflected by the sample detection object, where the first frequency component corresponds to the signal transmission frequency; determining the first sample signal as valid if the energy value of the first frequency component is greater than a second threshold. For example, the first frequency component can be a frequency component with the same frequency value as the signal transmission frequency. In specific implementation, it can be determined whether the energy value corresponding to the signal transmission frequency is greater than the second threshold (also called the second preset valid threshold); if not, the first sample signal is determined to be an invalid signal and discarded; wherein, the second threshold can be greater than the first threshold mentioned above. The energy value of the signal transmission frequency is usually the energy value of the center frequency. If the energy value of the center frequency is too low, it indicates that the transmitted signal strength is poor and the signal quality is low; eliminating it helps improve the model training effect. Therefore, it can be seen that filtering out inferior signals with insufficient transmission frequency based on the energy value of the transmission frequency can improve the processing effect.
[0073] In some possible implementations, the sample detection objects include: a live sample as a positive sample and an electronic screen as a negative sample; the second sample signal is an ultrasonic signal.
[0074] In addition, another embodiment of this application provides a method for detecting liveness attacks. Figure 2 A flowchart illustrating this liveness attack detection method is shown, as follows: Figure 2 As shown, the specific steps include:
[0075] Step S210: Generate time-frequency distribution data of the first target signal reflected by the target detection object.
[0076] The target detection object is the object whose liveness is to be verified. It can be a real, living object or a virtual object created by an electronic screen (such as a facial image captured or recorded by a mobile phone). Accordingly, during the detection process, a sound wave signal is emitted toward the target detection object, and the sound wave signal is reflected by the target detection object to obtain the first target signal.
[0077] The time-frequency distribution data of the first target signal is used to characterize the energy values of multiple specified frequency components of the first target signal at multiple specified time points. The data content and generation method of the time-frequency distribution data of the first target signal are similar to those of the time-frequency distribution data of the first sample signal.
[0078] Step S220: Obtain the prediction results of time-frequency distribution data through the pre-trained liveness attack detection model.
[0079] Step S230: Determine whether the target detection object is an attack target based on the prediction result.
[0080] Among them, the liveness attack detection model can be used to... Figure 1 The data processing methods in the training were obtained.
[0081] In one optional implementation, the time-frequency distribution data of the first target signal includes the energy values of multiple specified frequency components of the first target signal at multiple specified time points. Accordingly, step S220 is specifically implemented as follows: Pre-defined calculations are performed on the energy values of the multiple specified frequency components of the first target signal at the multiple specified time points to obtain the calculation results of the time-frequency distribution data of the first target signal. Based on the matching results between the calculation results of the time-frequency distribution data of the first target signal and multiple energy level intervals, the energy level of the first target signal is determined. Based on the energy level of the first target signal, the prediction result of the time-frequency distribution data of the first target signal is determined using a liveness detection model.
[0082] The method for determining the energy level of the first target signal can be similar to the method for determining the energy level of the first sample signal. For example, based on the signal transmission frequency of the first target signal, target frequency components related to Doppler shift can be selected from multiple specified frequency components of the first target signal; target energy values can be selected from multiple energy values corresponding to multiple specified time points of the target frequency components; and preset calculations can be performed on the target energy values to obtain the calculation results of the time-frequency distribution data. Specific details can be found in the description of the corresponding part in the previous embodiment, and will not be repeated here.
[0083] In particular, because the liveness attack detection model learns the signal characteristics of sample signals at various energy levels during training, it possesses more granular classification capabilities. Consequently, based on the energy level of the first target signal, it can determine a prediction result that more closely matches the energy level of the first target signal, thus helping to improve the accuracy of the prediction results.
[0084] In one optional implementation, when there are k energy level intervals, the liveness attack detection model can further include k interval detection sub-models, each corresponding to one of the k energy level intervals. Therefore, the liveness attack detection model specifically includes multiple interval detection sub-models that correspond one-to-one with the multiple energy level intervals, and each interval detection sub-model is primarily trained based on the first sample signal of the corresponding energy level. For example, assuming there are 3 energy levels, the first interval detection sub-module is primarily trained based on multiple first sample signals with the second annotation result being the first energy level, the second interval detection sub-module is primarily trained based on multiple first sample signals with the second annotation result being the second energy level, and the third interval detection sub-module is primarily trained based on multiple first sample signals with the second annotation result being the third energy level.
[0085] Accordingly, the prediction results of the time-frequency distribution data of the first target signal include: k predicted probabilities output by k interval detection sub-models; where each predicted probability characterizes the prediction result generated by the corresponding interval detection sub-model for the first target signal; and where k is a natural number. The predicted probabilities output by each interval detection sub-model can be implemented in the form of positive and negative probability pairs. For example, each positive and negative probability pair contains a data pair consisting of a positive probability value and a negative probability value. The positive probability value characterizes the probability that the target object is not an attack target, and the negative probability value characterizes the probability that the target object is an attack target.
[0086] Therefore, in the above method, multiple interval detection sub-models output multiple prediction probabilities. Since each interval detection sub-model is mainly trained on sample signals of different energy levels, it is more suitable for the corresponding energy level. Combining multiple prediction probabilities can more accurately determine the prediction result of the time-frequency distribution data of the first target signal. Specifically, when determining the prediction result of the time-frequency distribution data of the first target signal based on multiple prediction probabilities, various calculations such as averaging can be performed on the multiple prediction probabilities to obtain the final prediction result. This application does not limit the specific calculation method.
[0087] For example, in an optional implementation, the above calculation method can be a weighted calculation. Accordingly, step S220 can be implemented as follows: determine the k interval model weights corresponding to the k interval detection sub-models, and perform calculation processing (such as weighted calculation processing) on the k prediction probabilities according to the k interval model weights to obtain the prediction result of the time-frequency distribution data of the first target signal. Optionally, the interval model weight of the interval detection sub-model corresponding to the energy level of the first target signal is the largest. Therefore, in the above method, a corresponding interval model weight is set for each interval detection sub-model to adjust the proportion of the prediction probability of that interval detection sub-model in the final result.
[0088] Typically, because the interval detection sub-model corresponding to the energy level of the first target signal has fully learned the features of the sample signals at that energy level during training, the output of the interval detection sub-model corresponding to the energy level of the first target signal has the highest reliability. Therefore, setting the interval model weights of the interval detection sub-model corresponding to the energy level of the first target signal to the maximum weights helps to improve the detection accuracy.
[0089] Therefore, it can be seen that by using a pre-trained fine-grained attack detection model, multiple predicted probabilities (such as positive and negative probability pairs) can be output, each corresponding to a different energy level range, thereby improving the accuracy of the detection results.
[0090] To facilitate understanding, the following example illustrates the technical implementation details of the above embodiments in detail:
[0091] In one related technique, a 1ms-long FMCW (Frequency Modulated Continuous Wave) (frequency range 16K-22K) is emitted from a speaker every 50ms. Multiple signal segments of the facial echo are obtained through preprocessing of the received signal from the microphone. A time-frequency map is calculated for each segment, and then a convolutional network is used to extract features from the time-frequency map. However, in the implementation using a 50ms FMCW, the short transmission time of the FMCW results in too few features obtainable from the time-frequency map. Furthermore, the poor frequency stability of the frequency-modulated continuous wave leads to an inability to obtain a highly accurate time-frequency map, affecting detection accuracy.
[0092] To address the aforementioned issues, this example presents a sound signal detection method based on motion liveness detection, primarily focusing on the instability of the acquired mobile phone ultrasonic signals. This example proposes a signal stability detection method, a hierarchical training approach, and an improved model deployment scheme. Figure 3 The flowchart illustrating the training method of the attack detection model in this example is shown below. Figure 3 As shown, it includes the following steps:
[0093] Step S301: Determine the signal transmission frequency.
[0094] In practice, a first frequency-modulated continuous wave (FM-CVT) is emitted towards the sample detection object, and a second FM-CVT is acquired based on the reflection from the sample detection object. The frequency component with the highest energy value in the second FM-CVT is determined, and the signal transmission frequency is determined based on this highest energy frequency component. For example, a 1ms-long FM-CVT can be emitted by an electronic device such as a mobile phone, with a frequency range from 16kHz to 22kHz. An FFT transformation is performed on the acquired received signal to obtain its frequency domain characteristics. Based on these characteristics, the frequency component with the highest energy value is selected as the transmission frequency. For example, Figure 4 The diagram shows the frequency domain characteristics of the received signal, illustrating the energy values (specifically represented by amplitude) for each frequency component. The horizontal axis represents the frequency components, and the vertical axis represents the energy value (i.e., amplitude). Figure 4 The frequency component with the highest energy value is extracted as the transmission frequency. For example, 17200Hz can be selected as the transmission frequency.
[0095] Step S302: Transmit a transmission signal corresponding to the signal transmission frequency toward the sample detection object, and acquire the first sample signal reflected by the sample detection object.
[0096] Step S303: Obtain the energy value corresponding to the signal transmission frequency in the first sample signal; determine whether the energy value corresponding to the signal transmission frequency is greater than the second preset effective threshold.
[0097] Specifically, the energy value corresponding to the signal transmission frequency in the first sample signal can be the average energy value of the central region of the transmission frequency. For example, f represents the transmission frequency. When f = 17200Hz, the average energy value of the central region [f-8, f+8] of the transmission frequency can be used as the energy value corresponding to the signal transmission frequency. If this energy value is higher than the second preset effective threshold, it indicates that the signal strength of the transmitted signal meets the requirements, and subsequent operations continue. Conversely, if the energy value is not greater than the second preset effective threshold, it indicates that the signal strength of the transmitted signal does not meet the requirements (i.e., the signal strength is unqualified due to poor signal, meaning the transmission energy of this sample is insufficient). The first sample signal is determined to be an invalid signal and discarded, and the next sampling is performed.
[0098] This method can filter out signals with insufficient transmission energy. In the case of ultrasonic signals, due to their poor stability, insufficient transmission energy is prone to occur; this method can improve training accuracy.
[0099] Step S304: When the energy value of the signal transmission frequency is greater than the second preset effective threshold, generate time-frequency distribution data corresponding to the acquired first sample signal.
[0100] In this context, time-frequency distribution data is used to characterize the energy values of multiple specified frequency components of the first sample signal at multiple specified time points. For example, time-frequency distribution data can be characterized by a time-frequency plot, which can be viewed as a two-dimensional array. Figure 5 The time-frequency plot of the first sample signal is shown, as follows: Figure 5 As shown, in this time-frequency graph, the horizontal axis represents time points, the vertical axis represents frequency components, and the color value represents the energy value of the corresponding frequency component at the corresponding time point. For example, areas with higher energy are lighter in color, and areas with lower energy are darker in color. Figure 5 As shown, the energy values of frequency components near the transmission frequency of 17200Hz are relatively high. Furthermore, due to the Doppler shift, the first sample signal exhibits a frequency shift compared to the transmitted signal. Specifically, the transmitted signal, being a fixed-frequency signal, only has a 17200Hz frequency component and no other frequency components. However, due to the Doppler shift, the first sample signal contains more frequency components; for example, other frequency components near 17200Hz appear.
[0101] Step S305: Perform preset processing on the time-frequency distribution data of the first sample signal.
[0102] The preset processing can include various processing methods such as shielding center frequency processing and normalization processing, as long as they can improve the accuracy of the analysis.
[0103] In this step, the center frequency (usually the transmission frequency) of the time-frequency distribution data of the first sample signal is masked. Since the energy value of the center frequency is generally high and there is no frequency shift, its frequency components and energy values are relatively fixed and cannot reflect the individual characteristics of the current signal. Therefore, the center frequency is masked to obtain time-frequency distribution data after center frequency masking. This time-frequency distribution data only contains the energy value distribution data of the frequency components other than the center frequency. The differences between different signals are more pronounced in this part of the data, resulting in better discrimination and higher training value. Figure 6 The time-frequency diagram is shown after shielding the center frequency of the first sample signal. Figure 6 In the middle, the energy values in the center frequency region [f-8, f+8] were masked, corresponding to Figure 6 The pure black area in the middle.
[0104] In addition, Figure 6In order to make the color values of the remaining frequency components more distinctive, the energy values of the remaining frequency components were further normalized. Normalization refers to normalizing the range of energy values to the [0,1] interval. Figure 5 In the unnormalized time-frequency plot shown, the range of energy values is large due to the inclusion of a center frequency region with high energy values, resulting in lower representation accuracy after normalization. Figure 6 In the normalized time-frequency graph shown, the range of energy values is greatly reduced because the center frequency region with high energy values is filtered out, thus ensuring high accuracy of the representation after normalization.
[0105] Step S306: Obtain the calculation result of the time-frequency distribution data based on the processing result, and match the calculation result with multiple energy level intervals to determine the energy level of the first sample signal.
[0106] Specifically, the calculation result can be determined in the following way: based on the signal transmission frequency of the first sample signal, select the target frequency component related to Doppler frequency shift from multiple specified frequency components; select the target energy value from multiple energy values corresponding to multiple specified time points of the target frequency component; perform a preset operation on the target energy value to obtain the calculation result of the time-frequency distribution data. Specifically, based on the frequency distribution range of the time-frequency distribution data, determine the frequency sub-range corresponding to the frequency shift region in the frequency distribution range; wherein, the frequency shift region is generated by the Doppler frequency shift caused by the motion of the sample detection object; sort the multiple energy values corresponding to the frequency sub-range in descending order, and select the top-ranked energy values (i.e., target energy values); perform a preset operation on the selected energy values to obtain the calculation result of the time-frequency distribution data.
[0107] For example, the frequency shift regions can be located as [f+15, f+30] and [f-15, f-30]. The specific number and size of the frequency shift regions can be flexibly set based on experience. Correspondingly, multiple energy values (also called spectral energy values) of the corresponding frequency shift regions in the time-frequency graph are obtained, and these values are sorted in descending order. Then, the average value of the top 10% of the sorted energy values is selected and denoted as e. e is the preset calculation result.
[0108] Optionally, considering that signals with low energy values may be due to insufficient frequency shift amplitude or signal strength, it can be determined whether the preset calculation result e is greater than the first preset effective threshold. If not, the first sample signal is determined to be an invalid signal and discarded. The first preset effective threshold is determined based on the minimum value among multiple level-division thresholds. The first preset effective threshold is usually smaller than the second preset effective threshold. Although both thresholds are used to determine signal validity, their functions differ: the second preset effective threshold determines whether the overall energy intensity of the signal is sufficient, reflecting the stability of the transmitted signal quality. The first preset effective threshold determines whether the energy of the new frequency components generated after the Doppler frequency shift effect is sufficient, reflecting the number and intensity of the new frequency components generated after the Doppler frequency shift effect, corresponding to the amplitude of the detected object's movement. If the amplitude of the detected object's movement is too small, the number and intensity of the frequency components undergoing Doppler frequency shift may be low, resulting in poor signal discrimination. Therefore, to improve training accuracy, signals with e greater than the first preset effective threshold need to be selected for training.
[0109] In this step, the calculation result of the valid first sample signal is matched with multiple energy level intervals to determine the energy level of the first sample signal. For example, k-1 or k+1 level division thresholds can be preset to divide k energy level intervals, and then the energy level of the first sample signal can be determined based on the matching results.
[0110] Step S307: Generate the annotation result of the first sample signal, and train the liveness attack detection model based on the first sample signal and the annotation result of the first sample signal; wherein, the annotation result includes the level annotation result determined according to the energy level of the first sample signal.
[0111] For example, with k energy levels, the annotation results for each sample signal can include 2k possible cases. Specifically, if the sample signal is positive, the corresponding annotation results further include k results corresponding to each of the k energy level intervals. Similarly, if the sample signal is negative, the corresponding annotation results further include k results corresponding to each of the k energy level intervals.
[0112] Therefore, in this example, each sample signal corresponds to a time-frequency graph, and each time-frequency graph, after processing, yields a calculation result through a preset operation. Based on this result, the sample signal can be labeled as different energy levels. Specifically, multiple positive samples corresponding to faces are labeled as k different energy levels, and multiple negative samples corresponding to electronic screens are also labeled as k different energy levels. That is, all valid time-frequency graphs are classified according to the value of e, and divided into k levels based on the value of e.
[0113] For example, to facilitate the differentiation of positive and negative samples and energy levels using the same set of labeled data, the k energy levels corresponding to positive samples can be represented by k consecutive even numbers, and the k energy levels corresponding to negative samples can be represented by k consecutive odd numbers. For instance, the signals corresponding to positive face samples can be labeled as follows based on the value of e: 0, 2, ..., 2(k-1), and the signals corresponding to negative screen attack samples can be labeled as follows based on e: 1, 3, ..., 2k-1.
[0114] This example demonstrates the ability to train a fine-grained classification model using multi-label data. In this example, an ultrasonic signal is transmitted at a fixed frequency (e.g., f = 17200 Hz) via a mobile phone speaker. Then, a person makes head-nodding and head-shaking movements (simulated by the phone's actions in an attack scenario). Correspondingly, the ultrasonic signal echoed from the microphone is captured. A time-frequency plot is calculated for each captured audio signal. Each row in the time-frequency plot corresponds to the spectral energy value of a frequency; regions with higher energy indicate Doppler shifts caused by facial movements in those regions.
[0115] In summary, the training process mainly includes the following operations: First, acquiring the reflected sample signal. Then, calculating the time-frequency graph of the sample signal. Next, energy and frequency shift detection are performed on the time-frequency graph, specifically through a dual effective judgment using a first preset effective threshold and a second preset effective threshold to filter out inferior signals with insufficient transmission energy or insufficient frequency shift amplitude. Finally, for the effective sample signals, they are classified according to the frequency shift energy to obtain multiple classification data corresponding to different energy levels, which may include classification data 0, classification data 1, ..., classification data k, etc.
[0116] Additionally, in this example, attack detection can be performed in the following ways:
[0117] First, acquire the ultrasonic audio signal (i.e., the first target signal) and calculate the time-frequency diagram S of the signal.
[0118] Then, it is determined whether the average energy value of the corresponding transmission frequency center region [f-8, f+8] is greater than the second preset effective threshold. If so, subsequent processing continues. If not, it is determined that the transmission energy of this sample is insufficient, and resampling is performed.
[0119] Next, locate the frequency shift region as [f + 15, f + 30], take the vector values (i.e., energy values) in the corresponding frequency shift region of S, and sort them in descending order. Take the average value of the top 10% of the highest energy values and denote it as e. If e < threshold, discard the signal and re-collect it; otherwise, continue with subsequent processing. Here, threshold is the first preset valid threshold.
[0120] Finally, input the time-frequency diagram S into the pre-trained attack detection model and obtain the probability values corresponding to each classification label to determine the detection result based on the probability values.
[0121] Among them, the number of classification labels can be 2k. The attack detection model outputs 2k probability values respectively. The classification corresponding to the maximum probability value can be used as the detection result.
[0122] In specific implementation, preset operations can be performed on the k probability values corresponding to the positive samples to obtain the positive sample probability; preset operations can be performed on the k probability values corresponding to the negative samples to obtain the negative sample probability. Here, the preset operations can be various operations such as taking the maximum value operation, calculating the average value operation, summation operation, etc. This application does not limit this. For example, if the sum of the probability values corresponding to the even labels (corresponding to positive samples) is greater than a given threshold, it indicates a human face; if the sum of the probability values corresponding to the odd labels (corresponding to negative samples) is greater than a given threshold, it indicates an attack.
[0123] In a specific application scenario, in a face verification application, the procedures for transmitting and receiving acoustic signals can be integrated, and a large number of real human and 2D attack type audio files can be collected. Use the method in this example to preprocess the collected audio files, thereby training a convolutional network multi-classifier. During actual inference applications, for the collected audio signals, the same preprocessing method can be adopted, and it can be judged whether the currently collected signal is qualified based on the energy value of the center frequency of the time-frequency diagram and the energy threshold of the frequency shift. For qualified signals, use the trained classifier for classification, and judge whether it is a real human based on the label category.
[0124] In summary, through the energy detection of the frequency shift migration of the time-frequency diagram, this example can prevent unstable mobile phone ultrasonic signals from being collected and avoid misjudgment. By filtering unstable signals, the data quality of the training set can also be increased. In addition, due to the diverse attack forms, by grading the attack data, the classification accuracy of the model trained using the multi-label scheme is higher. For example, multiple interval detection sub-models (which can also be called interval detection sub-modules) can be trained separately within the live attack detection model (abbreviated as the attack detection model) to respectively predict the prediction results corresponding to multiple energy levels to improve the accuracy.
[0125] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.
[0126] In addition, this disclosure also provides an attack detection model training and attack detection device, electronic device, and computer-readable storage medium, all of which can be used to implement any of the attack detection models and attack detection methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the corresponding section of the method and will not be repeated here.
[0127] Figure 7 This is a block diagram of a data processing apparatus provided in an embodiment of the present disclosure.
[0128] Reference Figure 7 This disclosure provides a data processing apparatus 70, which includes:
[0129] The generation module 71 is adapted to generate time-frequency distribution data of a first sample signal reflected by a sample detection object; wherein the time-frequency distribution data includes: the energy values of multiple specified frequency components of the first sample signal at multiple specified time points;
[0130] The calculation module 72 is adapted to perform a preset calculation on the energy value to obtain the calculation result of the time-frequency distribution data;
[0131] The level determination module 73 is adapted to determine the energy level of the first sample signal based on the matching result between the calculation result and multiple energy level intervals;
[0132] The annotation module 74 is adapted to determine a second annotation result of the first sample signal based on the first annotation result of the sample detection object and the energy level of the first sample signal;
[0133] The first sample signal and the second annotation result are used to train the liveness attack detection model.
[0134] In one alternative implementation, the computation module is specifically adapted to:
[0135] Based on the signal transmission frequency of the first sample signal, target frequency components related to Doppler shift are selected from the plurality of specified frequency components;
[0136] Filter the target energy value from multiple energy values corresponding to multiple specified time points of the target frequency component;
[0137] A preset calculation is performed on the target energy value to obtain the calculation result of the time-frequency distribution data.
[0138] In one alternative implementation, the first sample signal is determined to be valid if the calculation result is greater than a first threshold; wherein the first threshold is determined based on a level division threshold used to divide the plurality of energy level intervals.
[0139] In one alternative implementation, the generation module is further configured to:
[0140] A first frequency-modulated continuous wave is emitted toward the sample detection object, and a second frequency-modulated continuous wave is obtained by reflection from the sample detection object.
[0141] The signal transmission frequency is determined based on the second frequency-modulated continuous wave;
[0142] For the sample detection object, a transmission signal with a transmission frequency equal to the signal transmission frequency is transmitted, and the first sample signal is obtained after the transmission signal is reflected by the sample detection object.
[0143] In one alternative implementation, the generation module is further configured to:
[0144] Obtain the energy value of a first frequency component contained in the first sample signal reflected by the sample detection object, wherein the first frequency component corresponds to the signal transmission frequency;
[0145] If the energy value of the first frequency component is determined to be greater than the second threshold, the first sample signal is determined to be valid.
[0146] In one optional implementation, the sample detection object includes: a live sample as a positive sample and an electronic screen sample as a negative sample; the first sample signal is an ultrasonic signal.
[0147] Figure 8 This is a block diagram of a liveness attack detection device provided in an embodiment of this disclosure.
[0148] Reference Figure 8 This disclosure provides a liveness attack detection device 80, comprising:
[0149] The generation module 81 is adapted to generate time-frequency distribution data of the first target signal reflected by the target detection object;
[0150] The acquisition module 82 is adapted to acquire the prediction results of the time-frequency distribution data through a pre-trained liveness attack detection model;
[0151] The determination module 83 is adapted to determine whether the target detection object is an attack object based on the prediction result.
[0152] In one optional implementation, the time-frequency distribution data includes: the energy values of multiple specified frequency components of the first target signal at multiple specified time points;
[0153] The acquisition module is specifically used to: perform a preset calculation on the energy value to obtain the calculation result of the time-frequency distribution data;
[0154] The determining module is specifically adapted to: determine the energy level of the first target signal based on the matching results between the calculation results and multiple energy level intervals; and determine the prediction result of the time-frequency distribution data based on the energy level of the first target signal through the liveness detection model.
[0155] In one optional implementation, when the number of energy level intervals is k, the liveness attack detection model further includes: k interval detection sub-models corresponding to the k energy level intervals respectively; the prediction result includes: k prediction probabilities output by the k interval detection sub-models; wherein each prediction probability is used to characterize the prediction result generated by the corresponding interval detection sub-model for the first target signal; wherein k is a natural number.
[0156] The determining module is specifically used for:
[0157] Determine the weights of k interval models corresponding to the k interval detection sub-models, and perform calculations on the k prediction probabilities based on the k interval model weights to obtain the prediction results of the time-frequency distribution data;
[0158] Among them, the interval model weight of the interval detection sub-model corresponding to the energy level of the first target signal is the largest.
[0159] The modules in the aforementioned data processing device and liveness detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0160] Figure 9 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.
[0161] Reference Figure 9This disclosure provides an electronic device, which includes: at least one processor 701; at least one memory 702; and one or more I / O interfaces 703 connected between the processor 701 and the memory 702; wherein the memory 702 stores one or more computer programs that can be executed by the at least one processor 701, and the one or more computer programs are executed by the at least one processor 701 to enable the at least one processor 701 to perform the above-described method.
[0162] The modules in the aforementioned electronic devices can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0163] This disclosure also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program implements the above-described method when executed by a processor / processor core. The computer-readable storage medium may be volatile or non-volatile.
[0164] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the above-described method.
[0165] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).
[0166] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0167] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0168] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0169] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0170] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0171] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0172] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0173] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0174] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.
Claims
1. A data processing method, characterized in that, include: Generate time-frequency distribution data of a first sample signal reflected by a sample detection object; wherein, the time-frequency distribution data includes: the energy values of multiple specified frequency components of the first sample signal at multiple specified time points; A preset calculation is performed on the energy value to obtain the calculation result of the time-frequency distribution data; The energy level of the first sample signal is determined based on the matching results between the calculation results and multiple energy level ranges; Based on the first annotation result of the sample detection object and the energy level of the first sample signal, determine the second annotation result of the first sample signal; The first sample signal and the second annotation result are used to train the liveness attack detection model.
2. The method according to claim 1, characterized in that, The calculation result of the time-frequency distribution data obtained by performing a preset calculation on the energy value includes: Based on the signal transmission frequency of the first sample signal, target frequency components related to Doppler shift are selected from the plurality of specified frequency components; Filter the target energy value from multiple energy values corresponding to multiple specified time points of the target frequency component; A preset calculation is performed on the target energy value to obtain the calculation result of the time-frequency distribution data.
3. The method according to claim 2, characterized in that, The method further includes: If the calculation result is greater than the first threshold, the first sample signal is determined to be valid; The first threshold is determined based on the level division threshold used to divide the plurality of energy level intervals.
4. The method according to any one of claims 1-3, characterized in that, Before generating the time-frequency distribution data of the first sample signal reflected by the sample detection object, the method further includes: A first frequency-modulated continuous wave is emitted toward the sample detection object, and a second frequency-modulated continuous wave is obtained by reflection from the sample detection object. The signal transmission frequency is determined based on the second frequency-modulated continuous wave; For the sample detection object, a transmission signal with a transmission frequency equal to the signal transmission frequency is transmitted, and the first sample signal is obtained after the transmission signal is reflected by the sample detection object.
5. The method according to claim 4, characterized in that, The method further includes: Obtain the energy value of a first frequency component contained in the first sample signal reflected by the sample detection object, wherein the first frequency component corresponds to the signal transmission frequency; If the energy value of the first frequency component is determined to be greater than the second threshold, the first sample signal is determined to be valid.
6. The method according to claim 4, characterized in that, The sample detection objects include: a live sample as a positive sample and an electronic screen sample as a negative sample; the first sample signal is an ultrasonic signal.
7. A method for detecting liveness attacks, characterized in that, include: Generate time-frequency distribution data of the first target signal reflected by the target detection object; The prediction results of the time-frequency distribution data are obtained by using a pre-trained liveness attack detection model; Based on the prediction results, determine whether the target detection object is an attack target.
8. The method according to claim 7, characterized in that, The time-frequency distribution data includes: the energy values of multiple specified frequency components of the first target signal at multiple specified time points; The prediction result of the time-frequency distribution data obtained by the pre-trained liveness attack detection model includes: A preset calculation is performed on the energy value to obtain the calculation result of the time-frequency distribution data; The energy level of the first target signal is determined based on the matching results between the calculation results and multiple energy level ranges; Based on the energy level of the first target signal, the prediction result of the time-frequency distribution data is determined by the liveness detection model.
9. The method according to claim 8, characterized in that, When the number of energy level intervals is k, the liveness detection model further includes: k interval detection sub-models corresponding to the k energy level intervals respectively; the prediction result includes: k prediction probabilities output by the k interval detection sub-models; wherein, each prediction probability is used to characterize the prediction result generated by the corresponding interval detection sub-model for the first target signal; wherein, k is a natural number; The step of determining the prediction result of the time-frequency distribution data based on the energy level of the first target signal using the liveness detection model includes: Determine the weights of k interval models corresponding to the k interval detection sub-models, and perform calculations on the k prediction probabilities based on the k interval model weights to obtain the prediction results of the time-frequency distribution data; Among them, the interval model weight of the interval detection sub-model corresponding to the energy level of the first target signal is the largest.
10. A data processing apparatus, characterized in that, include: The generation module is adapted to generate time-frequency distribution data of a first sample signal reflected by a sample detection object; wherein the time-frequency distribution data includes: the energy values of multiple specified frequency components of the first sample signal at multiple specified time points; The calculation module is adapted to perform preset calculations on the energy value to obtain the calculation results of the time-frequency distribution data; The level determination module is adapted to determine the energy level of the first sample signal based on the matching results between the calculation results and multiple energy level intervals; The annotation module is adapted to determine a second annotation result of the first sample signal based on a first annotation result of the sample detection object and the energy level of the first sample signal; The first sample signal and the second annotation result are used to train the liveness attack detection model.
11. A live attack detection device, characterized in that, include: The generation module is adapted to generate time-frequency distribution data of the first target signal reflected by the target detection object; The acquisition module is adapted to acquire the prediction results of the time-frequency distribution data through a pre-trained liveness attack detection model; The determination module is adapted to determine whether the target detection object is an attack target based on the prediction result.
12. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1-9.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when executed by a processor, implements the method as described in any one of claims 1-9.
14. A computer program product, characterized in that, Includes computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the method as described in any one of claims 1-9.