Liveness detection method and apparatus, device and storage medium
By acquiring the ultrasonic echo signal during the movement of the object relative to the detection device, and combining it with signal processing and video detection data, the problem of inaccuracy in existing liveness detection methods is solved, achieving higher detection accuracy and cost-effectiveness.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2025-11-03
- Publication Date
- 2026-06-18
AI Technical Summary
Existing liveness detection methods suffer from inaccurate detection, especially those based on visual multimodal and mouth-opening ultrasonic face liveness detection, which are difficult to accurately identify when faced with hardware attacks and are also costly.
By acquiring ultrasonic echo signals during the movement of the object relative to the detection device, liveness detection is performed using ultrasonic detection data, including signal processing and time-frequency plotting. Combined with video detection data, the accuracy of detection is improved.
It effectively suppresses environmental noise and dynamic interference, expands the Doppler frequency shift sensing range, improves the accuracy of liveness detection, and reduces detection costs.
Smart Images

Figure CN2025132203_18062026_PF_FP_ABST
Abstract
Description
Liveness detection methods, devices, equipment and storage media Technical Field
[0001] This application claims priority to Chinese Patent Application No. 2024118551426, filed on December 13, 2024, entitled "Method, Apparatus, Device and Storage Medium for Live Detection", the entire contents of which are incorporated herein by reference.
[0002] Technical Field
[0003] This application relates to the field of computer technology, and in particular to a method, apparatus, device and storage medium for detecting liveness. Background Technology
[0004] Liveness detection plays a crucial role in ensuring security. Facial identity verification is widely used in various fields, such as remote identity verification in banks, facial payment, remote authentication for online drivers, and access control systems. Facial liveness detection is a critical step in facial identity authentication and is directly related to the security of identity verification.
[0005] Current liveness detection methods mainly include visual multimodal liveness detection methods and mouth-opening ultrasound-based facial liveness detection methods. However, current liveness detection methods suffer from inaccurate detection. Summary of the Invention
[0006] This application provides a method, apparatus, device, and storage medium for liveness detection, which can improve the accuracy of liveness detection.
[0007] In a first aspect, this application provides a method for detecting liveness, comprising:
[0008] Acquire liveness detection data, which includes ultrasonic detection data. The ultrasonic detection data is the ultrasonic echo signal of the emitted ultrasonic signal. The ultrasonic echo signal contains the echo signal formed by the ultrasonic signal detected by the detection device and reflected after being projected onto the detection object during the movement of the detection object relative to the detection device.
[0009] Based on the ultrasonic detection data, the liveness detection result of the object being detected is determined.
[0010] Secondly, this application provides a liveness detection device, comprising:
[0011] The acquisition unit is used to acquire liveness detection data, which includes ultrasonic detection data. The ultrasonic detection data is the ultrasonic echo signal of the emitted ultrasonic signal. The ultrasonic echo signal includes the echo signal formed by the ultrasonic signal detected by the detection device and reflected after being projected onto the detection object during the movement of the detection object relative to the detection device.
[0012] The liveness detection unit is used to determine the liveness detection result of the object being detected based on the ultrasonic detection data.
[0013] In some embodiments, the movement of the detection object relative to the detection device includes: the detection object moving towards the detection device and then moving away from the detection device, or the detection object moving away from the detection device and then moving towards the detection device.
[0014] In some embodiments, the liveness detection unit is specifically used to perform signal processing on the ultrasonic detection data to obtain a first time-frequency diagram corresponding to the ultrasonic detection data; and to determine the liveness detection result of the detection object based on the first time-frequency diagram.
[0015] In some embodiments, the liveness detection unit is specifically used to determine the time-frequency information corresponding to the detection object in the first time-frequency diagram to obtain a second time-frequency diagram; and to determine the liveness detection result of the detection object based on the second time-frequency diagram.
[0016] In some embodiments, the ultrasonic echo signal further includes an echo signal formed by the ultrasonic signal detected by the detection device being projected onto a non-detection object and then reflected; the liveness detection unit is specifically used to perform coherent detection processing on the ultrasonic detection data to obtain a mixed ultrasonic echo signal, the mixed ultrasonic signal including echo signals from multiple reflection paths, the multiple reflection paths including the reflection path formed by the detection object during its movement relative to the detection device, and the reflection path formed by the non-detection object; based on the mixed ultrasonic echo signal, the first time-frequency diagram is obtained.
[0017] In some embodiments, the liveness detection unit is specifically configured to acquire a spatial enhancement vector including N+1 enhancement elements, where N is a positive integer, and the N+1 enhancement elements are obtained based on N+1 different propagation delays; enhance the hybrid ultrasonic echo signal using the N+1 enhancement elements to obtain N+1 enhanced ultrasonic echo signals; select the enhanced ultrasonic echo signal with the highest energy from the N+1 enhanced ultrasonic echo signals; and plot a time-frequency diagram based on the enhanced ultrasonic echo signal with the highest energy to obtain the first time-frequency diagram.
[0018] In some embodiments, the liveness detection unit is specifically used to multiply each of the N+1 enhancement elements with the hybrid ultrasonic echo signal to obtain the enhanced hybrid ultrasonic echo signal.
[0019] In some embodiments, the liveness detection unit is specifically used to filter the DC component in the enhanced ultrasonic echo signal with the highest energy to obtain a filtered ultrasonic echo signal; convert the filtered ultrasonic echo signal from the time domain space to the frequency domain space to obtain the frequency domain characteristics of the filtered ultrasonic echo signal; and draw a time-frequency diagram based on the time domain characteristics and frequency domain characteristics of the filtered ultrasonic echo signal to obtain the first time-frequency diagram.
[0020] In some embodiments, the liveness detection data further includes video detection data, which is video data of the detected object collected during the process of guiding the detected object to move relative to the detection device. The liveness detection unit is specifically used to determine the size change data of the detected object based on the video detection data; and to determine the time-frequency information corresponding to the detected object in the first time-frequency diagram based on the size change data of the detected object, so as to obtain the second time-frequency diagram.
[0021] In some embodiments, the liveness detection unit is specifically used to determine the transition times of the two processes in the size change data of the detected object, namely, the process of the detected object changing from large to small and from small to large; based on the transition times, the first time-frequency diagram is divided into a first region and a second region, wherein the first region is the region corresponding to the process of the detected object moving away from the detection device in the first time-frequency diagram, and the second region is the region corresponding to the process of the detected object moving closer to the detection device in the first time-frequency diagram; based on the frequency change characteristics of the ultrasonic echo signals received when the detected object moves away from and moves closer to the detection device, the time-frequency signal corresponding to the detected object is determined from the time-frequency signals included in the first region and the second region to obtain a second time-frequency diagram.
[0022] In some embodiments, the ultrasonic detection data includes reflected signals of M emitted subcarrier signals. The reflected signals include echo signals formed by the reflection of the M subcarrier signals detected by the detection device after they are projected onto the detection object during the movement of the detection object relative to the detection device. The M subcarrier signals are signals obtained by modulating the ultrasonic signal onto M subcarriers. The first time-frequency diagram corresponding to the ultrasonic detection data includes P first time-frequency diagrams, where M is a positive integer and P is a positive integer greater than or equal to M. A liveness detection unit is specifically used for detecting the... The reflected signal of each of the M subcarrier signals is processed to obtain a first time-frequency map corresponding to each subcarrier signal; based on the first time-frequency map corresponding to each subcarrier signal, P first time-frequency maps are obtained; based on the size change data of the detected object, the time-frequency information corresponding to the detected object in the time-frequency information included in each of the P first time-frequency maps is determined to obtain P second time-frequency maps, and the P first video maps correspond one-to-one with the P second time-frequency maps; based on the P second time-frequency maps, the liveness detection result of the detected object is determined.
[0023] In some embodiments, the liveness detection unit is specifically used to perform liveness detection on the P second time-frequency maps respectively using a liveness detection model to obtain liveness detection results corresponding to the P second time-frequency maps respectively; and to determine the liveness detection result of the detection object based on the liveness detection results corresponding to the P second time-frequency maps respectively.
[0024] In some embodiments, the liveness detection unit is specifically used to perform liveness detection on the detection object based on the video detection data to obtain a visual liveness detection result; and to obtain a liveness detection result of the detection object based on the liveness detection results corresponding to the P second time-frequency maps and the visual liveness detection result.
[0025] In some embodiments, the liveness detection unit is specifically used to detect whether the liveness detection data meets the ultrasonic liveness detection conditions; if the liveness detection data meets the ultrasonic liveness detection conditions, then the liveness detection result of the detection object is determined based on the ultrasonic liveness detection data.
[0026] In some embodiments, the liveness detection unit is specifically used to detect whether there is a frequency component in the liveness detection data; if there is a frequency component in the liveness detection data, then a spectrum diagram corresponding to the ultrasonic detection data is plotted; the main lobe width of the spectrum diagram is determined; if the main lobe width is greater than or equal to a preset width, then the liveness detection data is determined to meet the ultrasonic liveness detection conditions; if the main lobe width is less than the preset width, then the liveness detection data is determined not to meet the ultrasonic liveness detection conditions.
[0027] In some embodiments, the ultrasonic signal is emitted by the detection device.
[0028] In some embodiments, the detection device includes a earpiece, and the ultrasonic signal is emitted by the detection device through the earpiece.
[0029] In some embodiments, the detection device includes a microphone through which the ultrasonic echo is received.
[0030] In some embodiments, the liveness detection unit is further configured to perform liveness detection on the detection object based on the video detection data if it is determined that the liveness detection data does not meet the conditions for ultrasonic liveness detection.
[0031] Thirdly, this application provides a method for detecting liveness, including:
[0032] The detection equipment emits ultrasonic signals;
[0033] The detection device receives the ultrasonic echo signal of the ultrasonic signal, and the ultrasonic echo signal includes the echo signal formed by the ultrasonic signal detected by the detection device being projected onto the detection object and reflected during the movement of the detection object relative to the detection device.
[0034] The detection device determines the liveness detection result of the object based on the ultrasonic echo signal.
[0035] In some embodiments, the detection device displays or plays guidance information to instruct the object to be detected to move relative to the detection device.
[0036] In some embodiments, the detection device determines the liveness detection result of the detection object based on the ultrasonic echo signal, including: the detection device performs signal processing on the ultrasonic echo signal to obtain a first time-frequency diagram corresponding to the ultrasonic echo signal; the detection device determines the liveness detection result of the detection object based on the first time-frequency diagram.
[0037] In some embodiments, the detection device determines the liveness detection result of the detection object based on the first time-frequency map, including: the detection device determines the time-frequency information corresponding to the detection object in the first time-frequency map to obtain a second time-frequency map; the detection device determines the liveness detection result of the detection object based on the second time-frequency map.
[0038] In some embodiments, the ultrasonic echo signal further includes an echo signal formed by the ultrasonic signal detected by the detection device being projected onto a non-detection object and then reflected; the detection device performs signal processing on the ultrasonic echo signal to obtain a first time-frequency diagram corresponding to the ultrasonic echo signal, including: the detection device performs coherent detection processing on the ultrasonic echo signal to obtain a mixed ultrasonic echo signal, the mixed ultrasonic signal including echo signals with multiple reflection paths, the multiple reflection paths including reflection paths formed by the detection object during its movement relative to the detection device, and reflection paths formed by the non-detection object; the detection device obtains the first time-frequency diagram based on the mixed ultrasonic echo signal.
[0039] In some embodiments, the detection device obtains the first time-frequency diagram based on the hybrid ultrasonic echo signal, comprising: the detection device acquiring a spatial enhancement vector including N+1 enhancement elements, where N is a positive integer, and the N+1 enhancement elements are obtained based on N+1 different propagation delays; enhancing the hybrid ultrasonic echo signal using the N+1 enhancement elements to obtain N+1 enhanced ultrasonic echo signals; selecting the enhanced ultrasonic echo signal with the highest energy from the N+1 enhanced ultrasonic echo signals; and plotting a time-frequency diagram based on the enhanced ultrasonic echo signal with the highest energy to obtain the first time-frequency diagram.
[0040] In some embodiments, the detection device enhances the hybrid ultrasonic echo signal using each of the N+1 enhancement elements to obtain an enhanced hybrid ultrasonic echo signal, including: the detection device multiplies each of the N+1 enhancement elements with the hybrid ultrasonic echo signal to obtain the enhanced hybrid ultrasonic echo signal.
[0041] In some embodiments, the detection device plots a time-frequency diagram based on the enhanced ultrasonic echo signal with the highest energy to obtain the first time-frequency diagram, including: the detection device filtering the DC component in the enhanced ultrasonic echo signal with the highest energy to obtain a filtered ultrasonic echo signal; the detection device converting the filtered ultrasonic echo signal from the time domain space to the frequency domain space to obtain the frequency domain characteristics of the filtered ultrasonic echo signal; and the detection device plotting a time-frequency diagram based on the time domain characteristics and frequency domain characteristics of the filtered ultrasonic echo signal to obtain the first time-frequency diagram.
[0042] In some embodiments, the liveness detection data further includes video detection data, which is video data of the detection object collected during the process of guiding the detection object to move relative to the detection device; the detection device determines the time-frequency information corresponding to the detection object in the first time-frequency map to obtain a second time-frequency map, including: the detection device determining the size change data of the detection object based on the video detection data; the detection device determining the time-frequency information corresponding to the detection object in the first time-frequency map based on the size change data of the detection object to obtain a second time-frequency map.
[0043] In some embodiments, the detection device determines the time-frequency information corresponding to the detection object in the time-frequency information included in the first time-frequency map based on the size change data of the detection object, so as to obtain a second time-frequency map. This includes: the detection device determining the transition time of the two processes of the detection object changing from large to small and from small to large in the size change data of the detection object; the detection device dividing the first time-frequency map into a first region and a second region based on the transition time, wherein the first region is the region corresponding to the process of the detection object moving away from the detection device in the first time-frequency map, and the second region is the region corresponding to the process of the detection object moving towards the detection device in the first time-frequency map; and the detection device determining the time-frequency signal corresponding to the detection object from the time-frequency signals included in the first region and the second region based on the frequency change characteristics of the ultrasonic echo signals received when the detection object moves away from and towards the detection device, thereby obtaining the second time-frequency map.
[0044] In some embodiments, the ultrasonic detection data includes reflected signals of M emitted subcarrier signals. The reflected signals include echo signals formed by the reflection of the M subcarrier signals detected by the detection device after they are projected onto the detection object during the movement of the detection object relative to the detection device. The M subcarrier signals are signals obtained by modulating the ultrasonic signal onto M subcarriers. The first time-frequency diagram corresponding to the ultrasonic echo signal includes P first time-frequency diagrams, where M is a positive integer and P is a positive integer greater than or equal to M. The detection device performs signal processing on the ultrasonic echo signal to obtain the first time-frequency diagram corresponding to the ultrasonic echo signal, including: the detection device performs signal processing on the reflected signal of each of the M subcarrier signals to obtain each subcarrier signal's reflected signal. The detection device obtains P first time-frequency maps based on the first time-frequency map corresponding to each subcarrier signal; the detection device determines the time-frequency information corresponding to the detection object in the time-frequency information included in the first time-frequency map based on the size change data of the detection object, so as to obtain a second time-frequency map, including: the detection device determines the time-frequency information corresponding to the detection object in the time-frequency information included in each of the P first time-frequency maps based on the size change data of the detection object, so as to obtain P second time-frequency maps, wherein the P first video maps correspond one-to-one with the P second time-frequency maps; the detection device determines the liveness detection result of the detection object based on the second time-frequency map, including: the detection device determines the liveness detection result of the detection object based on the P second time-frequency maps.
[0045] In some embodiments, the detection device determines the liveness detection result of the detection object based on the P second time-frequency maps, including: the detection device performs liveness detection on the P second time-frequency maps respectively through a liveness detection model to obtain the liveness detection result corresponding to the P second time-frequency maps respectively; the detection device determines the liveness detection result of the detection object based on the liveness detection result corresponding to the P second time-frequency maps respectively.
[0046] In some embodiments, the detection device determines the liveness detection result of the detection object based on the liveness detection results corresponding to the P second time-frequency maps, including: the detection device performs liveness detection on the detection object based on the video detection data to obtain a visual liveness detection result; the detection device obtains the liveness detection result of the detection object based on the liveness detection results corresponding to the P second time-frequency maps and the visual liveness detection result.
[0047] In some embodiments, the detection device detects whether the liveness detection data meets the ultrasonic liveness detection conditions; if the liveness detection data meets the ultrasonic liveness detection conditions, the detection device determines the liveness detection result of the detection object based on the ultrasonic echo signal.
[0048] In some embodiments, the detection device detects whether the liveness detection data meets the ultrasonic liveness detection conditions, including: the detection device detects whether there is a frequency component in the liveness detection data; if there is a frequency component in the liveness detection data, the detection device plots a spectrum corresponding to the ultrasonic echo signal; the detection device determines the main lobe width of the spectrum; if the main lobe width is greater than or equal to a preset width, the detection device determines that the liveness detection data meets the ultrasonic liveness detection conditions; if the main lobe width is less than the preset width, the detection device determines that the liveness detection data does not meet the ultrasonic liveness detection conditions.
[0049] In some embodiments, the detection device includes a earpiece, and the ultrasonic signal is emitted by the detection device through the earpiece.
[0050] In some embodiments, the detection device includes a microphone through which the ultrasonic echo is received.
[0051] In some embodiments, if it is determined that the liveness detection data does not meet the ultrasonic liveness detection conditions, the method further includes: the detection device performing liveness detection on the detection object based on the video detection data.
[0052] Fourthly, this application provides a detection device, including a microphone, an earpiece, and a processor, comprising:
[0053] The testing equipment emits ultrasonic signals through a listening device;
[0054] The detection device receives the ultrasonic echo signal of the ultrasonic signal through the microphone. The ultrasonic echo signal includes the echo signal formed by the ultrasonic signal received by the microphone being projected onto the detection object and reflected during the movement of the detection object relative to the detection device.
[0055] The detection device determines the liveness detection result of the object based on the ultrasonic echo signal through the processor.
[0056] In some embodiments, the detection device may also play guidance information through the speaker, or the detection device may also display guidance information through a display screen, the guidance information being used to indicate that the object to be detected is moving relative to the detection device.
[0057] In some embodiments, the detection device performs signal processing on the ultrasonic echo signal through the processor to obtain a first time-frequency diagram corresponding to the ultrasonic echo signal, and determines the liveness detection result of the detection object based on the first time-frequency diagram.
[0058] In some embodiments, the detection device determines the time-frequency information corresponding to the detection object in the first time-frequency map through the processor to obtain a second time-frequency map; and determines the liveness detection result of the detection object based on the second time-frequency map.
[0059] In some embodiments, the ultrasonic echo signal further includes an echo signal formed by the ultrasonic signal received by the microphone being projected onto a non-detection object and then reflected; the detection device performs coherent detection processing on the ultrasonic echo signal through the processor to obtain a mixed ultrasonic echo signal, the mixed ultrasonic signal including echo signals with multiple reflection paths, including reflection paths formed by the detection object during its movement relative to the detection device, and reflection paths formed by the non-detection object; and the first time-frequency diagram is obtained based on the mixed ultrasonic echo signal.
[0060] In some embodiments, the detection device acquires a spatial enhancement vector comprising N+1 enhancement elements, where N is a positive integer, and the N+1 enhancement elements are obtained based on N+1 different propagation delays; the hybrid ultrasonic echo signal is enhanced using the N+1 enhancement elements to obtain N+1 enhanced ultrasonic echo signals; the enhanced ultrasonic echo signal with the highest energy is selected from the N+1 enhanced ultrasonic echo signals; a time-frequency diagram is plotted based on the enhanced ultrasonic echo signal with the highest energy to obtain the first time-frequency diagram.
[0061] In some embodiments, the detection device uses the processor to multiply each of the N+1 enhancement elements with the hybrid ultrasonic echo signal to obtain the enhanced hybrid ultrasonic echo signal.
[0062] In some embodiments, the detection device filters the DC component in the enhanced ultrasonic echo signal with the highest energy using the processor to obtain a filtered ultrasonic echo signal; and converts the filtered ultrasonic echo signal from the time domain to the frequency domain to obtain the frequency domain characteristics of the filtered ultrasonic echo signal; then, based on the time domain characteristics and frequency domain characteristics of the filtered ultrasonic echo signal, a time-frequency diagram is plotted to obtain the first time-frequency diagram.
[0063] In some embodiments, the liveness detection data further includes video detection data, which is video data of the detection object collected during the process of guiding the detection object to move relative to the detection device; the detection device determines the size change data of the detection object based on the video detection data through the processor; and determines the time-frequency information corresponding to the detection object in the first time-frequency map based on the size change data of the detection object, so as to obtain the second time-frequency map.
[0064] In some embodiments, the detection device uses the processor to determine the transition times of the two processes in the size change data of the detected object, namely, the process of the detected object changing from large to small and from small to large; and divides the first time-frequency diagram into a first region and a second region based on the transition times. The first region is the region corresponding to the process of the detected object moving away from the detection device in the first time-frequency diagram, and the second region is the region corresponding to the process of the detected object moving closer to the detection device in the first time-frequency diagram. Then, based on the frequency change characteristics of the ultrasonic echo signals received when the detected object moves away from and moves closer to the detection device, the time-frequency signal corresponding to the detected object is determined from the time-frequency signals included in the first region and the second region to obtain the second time-frequency diagram.
[0065] In some embodiments, the ultrasonic detection data includes reflected signals of M emitted subcarrier signals. The reflected signals include echo signals formed by the reflection of the M subcarrier signals received by the microphone after being projected onto the object during its movement relative to the detection device. The M subcarrier signals are obtained by modulating the ultrasonic signal onto the M subcarriers. The first time-frequency diagram corresponding to the ultrasonic echo signal includes P first time-frequency diagrams, where M is a positive integer and P is a positive integer greater than or equal to M. The detection device processes the M signals through the processor. The reflected signal of each subcarrier signal in the subcarrier signal is processed to obtain a first time-frequency map corresponding to each subcarrier signal; and based on the first time-frequency map corresponding to each subcarrier signal, P first time-frequency maps are obtained; then, based on the size change data of the detected object, the time-frequency information corresponding to the detected object in the time-frequency information included in each of the P first time-frequency maps is determined to obtain P second time-frequency maps, and the P first video maps correspond one-to-one with the P second time-frequency maps; finally, based on the P second time-frequency maps, the liveness detection result of the detected object is determined.
[0066] In some embodiments, the processor performs liveness detection on the P second time-frequency maps respectively using a liveness detection model to obtain liveness detection results corresponding to the P second time-frequency maps respectively; and determines the liveness detection result of the detection object based on the liveness detection results corresponding to the P second time-frequency maps respectively.
[0067] In some embodiments, the detection device uses the processor to perform liveness detection on the detection object based on the video detection data to obtain a visual liveness detection result; and based on the liveness detection results corresponding to the P second time-frequency maps respectively, and the visual liveness detection result, obtains the liveness detection result of the detection object.
[0068] In some embodiments, the detection device uses the processor to detect whether the liveness detection data meets the ultrasonic liveness detection conditions; if the liveness detection data meets the ultrasonic liveness detection conditions, the detection device uses the processor to determine the liveness detection result of the detection object based on the ultrasonic echo signal.
[0069] In some embodiments, the detection device uses the processor to detect whether there is a frequency component in the liveness detection data; if there is a frequency component in the liveness detection data, the detection device uses the processor to draw a spectrum diagram corresponding to the ultrasonic echo signal; and determines the main lobe width of the spectrum diagram; if the main lobe width is greater than or equal to a preset width, the detection device uses the processor to determine that the liveness detection data meets the ultrasonic liveness detection conditions; if the main lobe width is less than the preset width, the detection device determines that the liveness detection data does not meet the ultrasonic liveness detection conditions.
[0070] In some embodiments, if it is determined that the liveness detection data does not meet the ultrasonic liveness detection conditions, the detection device performs liveness detection on the detection object based on the video detection data through the processor.
[0071] Fifthly, this application provides an electronic device including a processor and a memory. The memory is used to store a computer program, and the processor is used to invoke and run the computer program stored in the memory to perform the methods described in the first or third aspect above.
[0072] In a seventh aspect, a chip is provided for implementing the methods of various implementations of the first aspect described above. Specifically, the chip includes a processor for retrieving and running a computer program from a memory, causing a device equipped with the chip to perform the methods of the first or third aspect described above.
[0073] Eighthly, a computer-readable storage medium is provided for storing a computer program that causes a computer to perform the methods described in the first or third aspect.
[0074] Ninthly, a computer program product is provided, including computer program instructions that cause a computer to perform the methods of the first or third aspect described above.
[0075] In a tenth aspect, a computer program is provided that, when run on a computer, causes the computer to perform the methods described in the first or third aspect.
[0076] In summary, this application acquires liveness detection data, including ultrasonic detection data, which consists of the echo signals of emitted ultrasonic signals. These echo signals contain the echo signals formed by the reflection of ultrasonic signals detected by the detection device as the object moves relative to it. Based on this ultrasonic detection data, the liveness detection result of the object is determined. Therefore, this application's embodiment emits ultrasonic signals and receives their echo signals as the object moves relative to the detection device. This uses the movement between the object and the detection device as the basic action, and the large amplitude of this basic action expands the sensing range of Doppler frequency shift. The reflected ultrasonic signals carry rich phase information, effectively suppressing the influence of environmental noise, dynamic interference, and other external factors. This allows the acquired ultrasonic detection data to accurately reflect the frequency change characteristics of the ultrasonic echo signals during the object's movement relative to the detection device, thereby improving the accuracy of liveness detection. Attached Figure Description
[0077] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0078] Figure 1 is a schematic diagram of the implementation environment of a liveness detection method provided in an embodiment of this application;
[0079] Figure 2 is a schematic flowchart of a liveness detection method provided in an embodiment of this application;
[0080] Figure 3 is a schematic diagram of an application scenario;
[0081] Figures 4A and 4B are schematic diagrams illustrating guidance information when moving away from and then closer to the detection equipment.
[0082] Figures 5A and 5B are schematic diagrams illustrating guidance information when moving closer to and then away from the detection equipment.
[0083] Figure 6 is a schematic diagram of a first time-frequency diagram according to an embodiment of this application;
[0084] Figure 7 is a schematic diagram of the size change of the detection object involved in an embodiment of this application;
[0085] Figure 8 is a schematic diagram of dividing the first time-frequency diagram into a first region and a second region;
[0086] Figure 9 is a schematic diagram of a second time-frequency diagram according to an embodiment of this application;
[0087] Figure 10 is a schematic diagram of performing liveness detection on the second time-frequency map using a liveness detection model;
[0088] Figure 11 is a schematic diagram of multiple first time-frequency diagrams and multiple second time-frequency diagrams;
[0089] Figure 12 is a schematic diagram of liveness detection of multiple second time-frequency maps using a liveness detection model;
[0090] Figure 13 is a schematic flowchart of a liveness detection method provided in an embodiment of this application;
[0091] Figure 14 is a schematic diagram comparing the frequency response of a multipath channel with that of a single-path channel.
[0092] Figure 15A is a schematic diagram of the spectrum received by the detection device containing the noise reduction module;
[0093] Figure 15B is a schematic diagram of the spectrum received by the detection device without a noise reduction module;
[0094] Figure 16 is a schematic flowchart of a liveness detection method provided in an embodiment of this application;
[0095] Figure 17 is a schematic block diagram of a liveness detection device provided in an embodiment of this application;
[0096] Figure 18 is a schematic flowchart of a liveness detection method provided in an embodiment of this application;
[0097] Figure 19 is a schematic diagram of a scenario according to an embodiment of this application;
[0098] Figure 20 is a schematic diagram of a detection device provided in an embodiment of this application;
[0099] Figure 21 is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0100] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0101] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. In embodiments of the invention, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices. In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0102] The liveness detection method provided in this application can be applied to various fields such as identity authentication, mobile payment, and access control. It can reduce the detection cost of liveness detection and improve the accuracy of liveness detection.
[0103] With the increasing security requirements of various products, liveness detection plays a crucial role in ensuring security. Facial identity verification has been widely applied in many fields, such as remote identity verification in banks, facial payment, remote authentication for online drivers, and access control systems. Facial liveness detection is a key step in facial identity authentication and is directly related to the security of identity verification. Although facial liveness detection methods based on RGB (red, green, and blue) cameras are relatively mature, they still face challenges in dealing with attacks such as hardware injection attacks. Currently, the industry often uses multimodal data to improve the security level of liveness detection. Common multimodal liveness detection solutions mainly include visual multimodal liveness detection methods and mouth-opening ultrasound facial liveness detection methods. Among them, visual multimodal liveness detection methods often use different measurement methods for the same frame, such as RGB information, depth information, and infrared information, and comprehensively utilize these different modal data for liveness detection. Compared with RGB single-modal liveness detection, depth images and infrared images can provide complementary information to RGB images, thus visual multimodal liveness detection methods also show a certain competitiveness. However, in terms of practical application, depth and infrared imaging place high demands on hardware. For the foreseeable future, ordinary smartphones are unlikely to provide the necessary hardware support. Therefore, existing visual multimodal liveness detection methods have extremely limited application scenarios and are difficult to widely adopt. The ultrasonic face liveness detection method based on mouth opening introduces ultrasonic modal data, utilizing the Doppler frequency shift caused by the mouth opening action, combined with the time-frequency map of RGB video and ultrasonic reflection signals for liveness detection. This method uses mouth opening as the basic action that triggers the Doppler frequency shift. From the perspective of relative movement with the signal source, the amplitude of the action is small, and the phase information carried by the reflected ultrasonic signal is limited. A side effect of this is that the resulting time-frequency map is easily affected by noise and small-amplitude interference from surrounding movements, limiting the fineness of the time-frequency map's frequency resolution, thus leading to inaccurate liveness detection. Therefore, current liveness detection methods suffer from high detection costs and inaccurate detection.
[0104] To address the aforementioned technical problems, this application proposes a novel liveness detection method. This method acquires liveness detection data, including ultrasonic detection data, which consists of the echo signals of emitted ultrasonic signals. These echo signals contain the echo signals formed by the reflection of ultrasonic signals detected by the detection device as the object moves relative to it. Based on this ultrasonic detection data, the liveness detection result of the object is determined. In this application, ultrasonic signals are emitted and their echo signals are received during the movement of the object relative to the detection device. This uses the movement between the object and the device as the basic action, and the large amplitude of this basic action expands the sensing range of Doppler frequency shift. The reflected ultrasonic signals carry rich phase information, effectively suppressing the influence of environmental noise, dynamic interference, and other external factors. This allows the acquired ultrasonic detection data to accurately reflect the frequency change characteristics of the ultrasonic echo signals during the movement of the object relative to the detection device, thereby improving the accuracy of liveness detection.
[0105] The implementation environment of the liveness detection method provided in the embodiments of this application is described below.
[0106] Figure 1 is a schematic diagram of the implementation environment of a liveness detection method provided in an embodiment of this application. As shown in Figure 1, the implementation environment includes a detection device 101 and a server 102.
[0107] The detection device 101 is connected to the server 102 via wired or wireless means.
[0108] In some embodiments, the detection device 101 is equipped with a client for a liveness detection system, and the server 102 can be understood as the server or backend of the liveness detection system.
[0109] The detection device 101 in this embodiment can be understood as a detection device that has the function of emitting ultrasonic waves and receiving ultrasonic wave echoes. For example, when the detection device 101 is a mobile phone, ultrasonic waves can be emitted through the phone's earpiece and the reflected ultrasonic wave echoes can be received through the phone's microphone. Optionally, the detection device 101 in this embodiment also has a camera that can record video. The detection device 101 in this embodiment also has a display screen or a speaker, which can display guidance information and liveness detection results to the detection object through the display screen, or play guidance information and liveness detection results to the detection object through the speaker.
[0110] In some embodiments, when the liveness detection method of this application is executed by server 102, as shown in FIG1, the detection device 101 displays guidance information to the detection object through a display screen or plays guidance information through a speaker. This guidance information is used to guide the detection object to move relative to the detection device 101, for example, prompting the detection object to move away from the detection device 101 before moving closer to it. During the movement of the detection object relative to the detection device 101 based on the prompts displayed by the detection device 101, the detection device 101 emits ultrasonic signals outward through a receiver. These emitted ultrasonic signals are emitted when they encounter an obstacle (e.g., the detection object), and the detection device 101 receives the reflected ultrasonic echo signals through a microphone. In this application embodiment, the ultrasonic echo signals received by the microphone are recorded as ultrasonic detection data. After obtaining the liveness detection data, i.e., the ultrasonic detection data, the detection device 101 sends the liveness detection data to server 102. Server 102 determines the liveness detection result of the detection object based on the ultrasonic detection data. Therefore, the embodiments of this application guide the object to be detected to move relative to the detection device, and send ultrasonic signals to the object during this movement, and receive the ultrasonic echo signals reflected by the object. By using the movement between the object and the detection device as the basic action, and considering the large amplitude of this basic action, the sensing range of Doppler frequency shift is expanded. The reflected ultrasonic signals carry rich phase information, which can effectively suppress the influence of external factors such as environmental noise and dynamic interference. This allows the collected ultrasonic detection data to accurately reflect the frequency change characteristics of the ultrasonic echo signals during the movement of the object relative to the detection device. Consequently, when performing liveness detection based on this ultrasonic detection data, the accuracy of liveness detection can be improved.
[0111] In some embodiments, the liveness detection method of this application may also be performed by the detection device 101.
[0112] In some embodiments, the detection device 101 described above can be a terminal device, including but not limited to: desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle systems, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Terminal devices are often equipped with a display device, which can also be a monitor, display screen, touchscreen, etc., and the touchscreen can also be a touch screen, touch panel, etc.
[0113] In some embodiments, the server 102 described above can be one or more servers. When there are multiple servers, at least two servers are used to provide different services, and / or at least two servers are used to provide the same service, such as providing the same service in a load-balanced manner. This application embodiment does not limit this. The server described above can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server can also be a node in a blockchain.
[0114] It should be noted that the implementation environment of this application embodiment includes, but is not limited to, the one shown in Figure 1.
[0115] The technical solutions of the embodiments of this application will be described in detail below through some examples. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0116] Figure 2 is a schematic flowchart of a liveness detection method provided in an embodiment of this application. The execution entity of this embodiment can be a device with liveness detection function, such as a liveness detection device. This liveness detection device can be the server 102 or detection device 101 shown in Figure 1, or it can be a system composed of the server 102 or detection device 101 shown in Figure 1. For ease of description, the following embodiments use an electronic device as an example to illustrate the method of this embodiment.
[0117] As shown in Figure 2, the liveness detection method of this application embodiment includes:
[0118] S101, Electronic equipment acquires liveness detection data.
[0119] Among them, the liveness detection data includes ultrasonic detection data, which is the ultrasonic echo signal of the emitted ultrasonic signal. The ultrasonic echo signal contains the echo signal formed by the ultrasonic signal detected by the detection device being projected onto the detection object and reflected during the movement of the detection object relative to the detection device.
[0120] It should be noted that the data used in the embodiments of this application and the process of obtaining this data comply with the relevant laws and regulations.
[0121] This application does not limit the specific type of the detection object. The detection object in this application can be a local area of a living creature, such as the face (e.g., a human face) or hands. Optionally, the detection object can also be the entire area of a living creature, such as the entire body of the living creature.
[0122] This application does not limit the specific type of detection device used for liveness detection, as long as it includes an earpiece, microphone, and camera. For example, the detection device can be a smartphone, a computer with a camera and voice input function, a tablet, or other smart device.
[0123] Since current detection devices for liveness detection (such as smartphones) typically have voice call functionality, including an earpiece and a microphone, this embodiment of the application transmits ultrasonic signals through the earpiece of the detection device and receives ultrasonic echo signals through the microphone of the detection device. This eliminates the need for specific specialized hardware, thereby reducing the equipment cost of liveness detection and promoting the widespread adoption and use of the liveness detection method proposed in this embodiment.
[0124] Furthermore, in this embodiment, the movement between the object being detected and the detection device is taken as the basic action, which expands the sensing range of Doppler frequency shift and can effectively suppress the influence of external factors such as environmental noise and dynamic interference, resulting in a higher frequency resolution of the obtained time-frequency map, which can greatly improve the accuracy of liveness detection.
[0125] The following description, with reference to Figure 3, introduces the liveness detection scenario of an embodiment of this application.
[0126] For example, as shown in Figure 3, during liveness detection, the detection device sends guidance information to the target object, which guides the target object to move relative to the detection device. During this process, the detection device's earpiece sends ultrasonic signals, and the detection device's microphone receives the ultrasonic echo signals.
[0127] In this embodiment, the movement of the detection object relative to the detection device mainly includes the movement of the detection object relative to the detection device in terms of distance. This can be the detection object moving away from the detection device and then moving closer to it, or the detection object moving closer to the detection device and then moving away from it. In other words, the movement of the detection object relative to the detection device includes: the detection object moving towards the detection device and then moving away from it, or the detection object moving away from the detection device and then moving closer to it.
[0128] In this embodiment of the application, the specific methods by which the detection device sends guidance information to the detection object include at least one of voice, image display, etc.
[0129] In one example, assuming the guidance information in this embodiment is to move away from the detection device and then move closer to it, the detection interface of the detection device is shown in Figures 4A and 4B, including a detection frame and guidance information. The detection frame is used to guide the detection object to maintain the image of the detection object captured by the detection device within the detection frame during its movement. As shown in Figure 4A, the guidance information displayed or played by the detection device is "Please move slowly away from the detection device." The detection object moves slowly away from the detection device according to this guidance information. During this process, the earpiece of the detection device sends an ultrasonic signal. When the ultrasonic signal sent by the earpiece encounters the detection object, it is reflected to form an ultrasonic echo signal, which is received by the microphone of the detection device. At the same time, the detection device determines whether a first preset condition has been met. This embodiment does not specifically limit the first preset condition. In one example, the first preset condition is that the display time or playback time of the current guidance information reaches a first preset time. In one example, the first preset condition is that the time the detection object moves backward meets a second preset time. In one example, the first preset condition is that the distance the detection object moves backward meets a first preset distance. The second preset time may be different from or equal to the first preset time; this embodiment does not impose any limitation on this. When the detection device detects that the first preset condition is met, as shown in Figure 4B, the guidance information displayed or played on the detection interface of the detection device changes to "Please move slowly towards the detection device." The object being detected moves slowly towards the detection device according to this guidance information. During this process, the earpiece of the detection device sends an ultrasonic signal. When the ultrasonic signal sent by the earpiece encounters the object being detected, it is reflected to form an ultrasonic echo signal, which is received by the microphone of the detection device.
[0130] In one example, assuming the guidance information in this embodiment is to first approach the detection device and then move away from it, the detection interface of the detection device is shown in Figures 5A and 5B. The detection interface includes a detection frame and guidance information. As shown in Figure 5A, the guidance information displayed or played by the detection device is "Please move slowly towards the detection device." The detection object moves slowly towards the detection device according to this guidance information. During this process, the earpiece of the detection device sends an ultrasonic signal. When the ultrasonic signal sent by the earpiece encounters the detection object, it is reflected to form an ultrasonic echo signal, which is received by the microphone of the detection device. At the same time, the detection device determines whether a second preset condition has been met. This embodiment does not specifically limit the second preset condition. In one example, the second preset condition is that the display time or playback time of the current guidance information reaches a third preset time. In one example, the second preset condition is that the time the detection object moves forward meets a fourth preset time. In one example, the second preset condition is that the distance the detection object moves forward meets a second preset distance. The fourth preset time can be the same as or different from the third preset time, and the third preset time can be the same as or different from the first preset time mentioned above. This application embodiment does not impose any restrictions on this. When the detection device detects that the second preset condition is met, as shown in Figure 5B, the guidance information displayed or played on the detection interface of the detection device changes to "Please move slowly away from the detection device". The object to be detected moves slowly away from the detection device according to the guidance information. During this process, the earpiece of the detection device sends an ultrasonic signal. When the ultrasonic signal sent by the earpiece encounters the object to be detected, it is reflected to form an ultrasonic echo signal. The microphone of the detection device receives the ultrasonic echo signal.
[0131] As can be seen from the above, in this embodiment of the application, the object to be detected moves relative to the detection device (e.g., moves near or far) according to the guidance information of the detection device. During the movement, the detection device sends an ultrasonic signal through the earpiece. The sent ultrasonic signal is reflected after encountering the object to be detected, forming an ultrasonic echo. The detection device receives the ultrasonic echo through the microphone and obtains ultrasonic detection data.
[0132] In some embodiments, if the electronic device used for liveness detection in this application is the aforementioned detection device, the detection device uses the detected ultrasonic detection data as liveness detection data and performs subsequent liveness detection processes.
[0133] In some embodiments, if the electronic device used for liveness detection in this application is not the aforementioned detection device, then the detection device sends the detected ultrasonic detection data as liveness detection data to the electronic device, so that the electronic device executes the liveness detection process of this application.
[0134] S102. The electronic device determines the liveness detection result of the object being detected based on the ultrasonic detection data.
[0135] As described above, in this embodiment, ultrasonic waves are sent to the object being detected while it moves relative to the detection device, and the echo signals of these ultrasonic waves are received to obtain ultrasonic detection data. When the object moves relative to the detection device, a Doppler frequency shift occurs. This causes the frequency of the ultrasonic echo signal received by the detection device to increase when the object is closer to the detection device (i.e., the signal source), and to decrease when the object is farther away from the detection device (i.e., the signal source). Based on this, the electronic device can use the detected ultrasonic detection data to check whether the object has moved relative to the detection device, thereby obtaining a liveness detection result for the object.
[0136] This application does not limit the specific method by which the electronic device determines the liveness detection result of the object based on the ultrasonic detection data of the object.
[0137] In some embodiments, this application can train a liveness detection model that can predict whether the target object is alive based on the input ultrasonic detection data of the target object. Thus, the electronic device can input the ultrasonic detection data of the target object obtained above into the detection model for liveness detection, and obtain the liveness detection result of the target object output by the detection model.
[0138] In some embodiments, S102 above includes the following steps S102-A and S102-B:
[0139] S102-A: The electronic device performs signal processing on the ultrasonic detection data to obtain the first time-frequency diagram corresponding to the ultrasonic detection data;
[0140] S102-B: The electronic device determines the liveness detection result of the target object based on the first time-frequency diagram.
[0141] In this implementation, after the electronic device obtains ultrasonic detection data, it performs signal processing on the ultrasonic detection data to obtain a first time-frequency diagram corresponding to the ultrasonic detection data. Then, based on this first time-frequency diagram, it determines whether the frequency of the ultrasonic echo signal received by the detection device has changed, and whether the pattern of change matches the relative movement between the detection object and the detection device, in order to determine whether the detection object is a real living body.
[0142] The following describes the specific process by which electronic devices process ultrasonic detection data to obtain the first time-frequency diagram corresponding to the ultrasonic detection data.
[0143] In the first scenario, the ultrasonic detection data of the object acquired by the electronic device is typically a time-domain signal. As mentioned above, the frequency of the ultrasonic echo signal received by the detection device changes as the object moves relative to the detection device. Therefore, in this implementation, the electronic device can convert the acquired ultrasonic detection data from the time domain to the frequency domain to obtain the frequency domain characteristics of the ultrasonic detection data. Based on these frequency and time domain characteristics, the electronic device can then plot the corresponding time-frequency diagram of the ultrasonic detection data, denoted as the first time-frequency diagram.
[0144] In the second scenario, the ultrasonic echo signal in this embodiment includes not only the echo signal formed by the ultrasonic signal being reflected from the object being detected as it moves relative to the detection device, but also the echo signal formed by the ultrasonic signal detected by the detection device being projected onto a non-detection object and then reflected. The non-detection object can be understood as any object other than the object being detected. For example, if the object being detected is a face, the non-detection object may include the body torso, surrounding objects (such as background objects like stools), etc.
[0145] In other words, in this embodiment of the application, when the detection device sends an ultrasonic signal, it modulates the ultrasonic signal to a carrier frequency of f. c The ultrasonic echo signal is transmitted on a carrier signal. When the transmitted carrier signal encounters an obstacle, it is reflected to form an ultrasonic echo signal. These obstacles include the object being detected (e.g., a human face) and non-objects being detected (e.g., a torso, a stool, or other background objects). Due to the influence of the object being detected and the non-objects being detected, the ultrasonic echo signal received by the detection device has multiple reflection paths. Assuming there are M reflection paths, the ultrasonic echo signal r(t) received by the detection device can be described by the following formula (1):
[0146] Where i represents the i-th reflection path, and 2Ai(t) represents the amplitude of the ultrasonic signal in the i-th reflection path. This indicates the phase shift caused by propagation delay. This indicates the phase shift caused by system delay.
[0147] In other words, the ultrasonic detection data received by the detection device in this embodiment is r(t). Next, the electronic device performs signal processing on the ultrasonic detection data to obtain a first time-frequency diagram corresponding to the ultrasonic detection data.
[0148] In this second case, the embodiments of this application do not limit the specific method for determining the first time-frequency diagram corresponding to the ultrasonic detection data.
[0149] In one possible implementation, the ultrasonic detection data r(t) is demodulated to obtain a signal with carrier frequency f. c The baseband signal (i.e., the ultrasonic signal) is demodulated and converted from the time domain to the frequency domain to obtain the frequency domain characteristics of the ultrasonic signal. Based on the frequency and time domain characteristics of the ultrasonic signal, the first time-frequency diagram corresponding to the ultrasonic detection data is obtained.
[0150] In another possible implementation, S102-A above includes the following steps S102-A1 and S102-A2:
[0151] S102-A1. The electronic device performs coherent detection processing on ultrasonic detection data (e.g., r(t)) to obtain a mixed ultrasonic echo signal. The mixed ultrasonic signal contains echo signals with multiple reflection paths, including reflection paths formed by the object being detected during its movement relative to the detection device, and reflection paths formed by non-objects being detected.
[0152] S102-A2, the electronic equipment obtains the first time-frequency diagram based on the hybrid ultrasonic echo signal.
[0153] The ultrasonic detection data in this embodiment includes reflected signals from multiple reflection paths. Specifically, the detection device modulates an ultrasonic signal onto a carrier signal for transmission. This carrier signal is reflected through multiple reflection paths (e.g., reflection paths formed by a face, reflection paths formed by the body, etc.), forming reflected signals from multiple reflection paths. These reflected signals are received by the microphone of the detection device and recorded as ultrasonic detection data. The electronic device demodulates this ultrasonic detection data, that is, demodulates the reflected signals to obtain a mixed ultrasonic echo signal. For example, the electronic device can demodulate the mixed ultrasonic echo signal from the received ultrasonic detection data through coherent wave detection processing.
[0154] In one exemplary embodiment, the electronic device performs coherent detection processing on ultrasonic detection data (e.g., r(t)) to obtain a mixed ultrasonic echo signal. Specifically, the electronic device first demodulates the carrier frequency f from the ultrasonic detection data signal. c The baseband signal contains the in-phase component I(t) and the quadrature component Q(t). The process of demodulating the in-phase component I(t) and the quadrature component Q(t) is shown in formulas (2) to (4).
[0155] The electronic device extracts the phase information in r(t) using the sine and cosine functions according to the following formula (2):
[0156] Where I′(t) represents the phase information of the received ultrasonic detection data.
[0157] Low-pass filtering is applied to I′(t) to remove the high-frequency components, yielding the in-phase component I(t). For example, the in-phase component I(t) is shown in equation (3):
[0158] The in-phase component I(t) is processed to obtain the quadrature component Q(t). For example, the quadrature component Q(t) is shown in formula (4):
[0159] The electronic device demodulates the carrier frequency f from the ultrasonic detection data signal. c After the in-phase component I(t) and quadrature component Q(t) of the baseband signal, the sum of the in-phase component I(t) and the quadrature component Q(t) is determined as the mixed ultrasonic echo signal x(t) with multiple reflection paths, that is, x(t) = I(t) + Q(t).
[0160] Next, the electronic device executes the above-described S102-A2 to determine the first time-frequency diagram based on the hybrid ultrasonic echo signal x(t).
[0161] The embodiments of this application do not limit the specific method by which the electronic device determines the first time-frequency diagram based on the hybrid ultrasonic echo signal x(t).
[0162] In some embodiments, the hybrid ultrasonic echo signal x(t) obtained by the above-mentioned electronic device is a time-domain signal. The electronic device can convert the hybrid ultrasonic echo signal from the time-domain space to the frequency-domain space to obtain the frequency-domain characteristics of the hybrid ultrasonic echo signal, and then draw a first time-frequency diagram based on the time-domain characteristics and frequency-domain characteristics of the hybrid ultrasonic echo signal.
[0163] In some embodiments, the electronic device may also invoke a trained time-frequency plotting model to plot a first time-frequency plot. This time-frequency plotting model can plot the time-frequency plot corresponding to the input mixed ultrasonic signal, denoted as the first time-frequency plot.
[0164] In some embodiments, the electronic device obtains a first time-frequency diagram based on the mixed ultrasonic echo signals by signal enhancement. Specifically, the electronic device determines the ultrasonic echo signal of the reflection path corresponding to the detection object from the mixed ultrasonic echo signals x(t) of the multiple reflection paths through the following steps S102-A21 to S102-A24:
[0165] S102-A21. The electronic device acquires a spatial enhancement vector including N+1 enhancement elements, where N is a positive integer and the N+1 enhancement elements are obtained based on N+1 different propagation delays;
[0166] S102-A22: The electronic device enhances the mixed ultrasonic echo signal using N+1 enhancement elements to obtain N+1 enhanced ultrasonic echo signals.
[0167] S102-A23. The electronic device selects the enhanced ultrasonic echo signal with the highest energy from N+1 enhanced ultrasonic echo signals.
[0168] S102-A24. The electronic device plots a time-frequency diagram based on the enhanced ultrasonic echo signal with the highest energy, and obtains the first time-frequency diagram.
[0169] As described above, the ultrasonic signal in this application embodiment may contain reflected signals from multiple reflection paths. This application mainly detects the object being detected. As the subject being detected, the object reflects the strongest ultrasonic signal. Therefore, the electronic device enhances the mixed ultrasonic echo signal x(t) through a spatial enhancement vector. This spatial enhancement vector includes N+1 enhancement elements, which are obtained based on N+1 different propagation delays. By selecting the signal with the highest energy from the enhanced signal, the propagation time of the reflected signal from the object being detected can be located, thereby extracting only the signal with this propagation delay and reducing interference from signals from other reflection paths. In other words, since the reflected signal of the object being detected is the strongest, when the hybrid ultrasonic echo signal x(t) is enhanced by a spatial enhancement vector including N+1 enhancement elements, it is equivalent to enhancing the echo signal of the object's reflection path, which weakens the echo signals of other reflection paths to a certain extent. Therefore, selecting the enhanced ultrasonic echo signal with the highest energy from the N+1 enhanced ultrasonic echo signals can better reflect the echo signal corresponding to the object being detected, reducing interference from signals from other reflection paths. This makes the first time-frequency diagram generated based on the enhanced ultrasonic echo signal with the highest energy more accurately reflect the frequency change characteristics of the ultrasonic echo signal reflected by the object being detected during its movement relative to the detection device, thereby improving the liveness detection results of the object being detected.
[0170] For example, the spatial enhancement vector A(τ) can be expressed as shown in formula (5):
[0171] Among them, f c It is the carrier frequency. c represents the possible propagation delay (where c is the speed of sound), and n is the number of possible propagation delays.
[0172] Next, the electronic device uses the N+1 enhancement elements included in the aforementioned spatial enhancement vector A(τ) to enhance the hybrid ultrasonic echo signal respectively, thereby obtaining the enhanced hybrid ultrasonic echo signal, wherein the enhanced hybrid ultrasonic echo signal includes N+1 enhanced ultrasonic echo signals.
[0173] In this application embodiment, each of the N+1 enhancement elements is used in the electronic device to enhance the hybrid ultrasonic echo signal, and the specific method of obtaining the enhanced hybrid ultrasonic echo signal is not limited.
[0174] In one possible implementation, the electronic device adds each of the N+1 enhancement elements included in the aforementioned spatial enhancement vector A(τ) to the hybrid ultrasonic echo signal to obtain the enhanced hybrid ultrasonic echo signal.
[0175] In one possible implementation, the electronic device multiplies each of the N+1 enhancement elements with the hybrid ultrasonic echo signal to obtain the enhanced hybrid ultrasonic echo signal.
[0176] For example, the electronic device determines the enhanced hybrid ultrasonic echo signal according to the following formula (6):
[0177] Next, the electronic device selects the enhanced ultrasonic echo signal with the highest energy from the N+1 enhanced ultrasonic echo signals included in the enhanced hybrid ultrasonic echo signal. For example, the electronic device determines the energy value of each of these N+1 enhanced ultrasonic echo signals. Then, based on the energy values corresponding to the N+1 enhanced ultrasonic echo signals, it selects the enhanced ultrasonic echo signal with the highest energy value from these N+1 enhanced ultrasonic echo signals. For example, the factor corresponding to the signal with the highest energy in y(t,τ). In the middle, τ i This is the propagation delay between the object being detected and the detection device, therefore, it is selected from y(t,τ).
[0178] Next, the electronic device executes the steps S102-A24 above, and draws a time-frequency diagram based on the enhanced ultrasonic echo signal with the highest energy to obtain the first time-frequency diagram.
[0179] In this application embodiment, the electronic device is plotted using a time-frequency diagram based on the enhanced ultrasonic echo signal with the highest energy. The specific method for obtaining the first time-frequency diagram is not limited.
[0180] In some embodiments, the enhanced ultrasonic echo signal with the highest energy is a time-domain signal. The electronic device converts this time-domain signal into a frequency-domain signal to obtain the frequency-time relationship of the enhanced ultrasonic echo signal with the highest energy. Thus, the electronic device can plot a time-frequency diagram based on the time-domain and frequency-domain characteristics of the enhanced ultrasonic echo signal with the highest energy, and this time-frequency diagram is denoted as the first time-frequency diagram.
[0181] In some embodiments, S102-A24 above includes the following steps S102-A24-a to S102-A24-c:
[0182] S102-A24-a: Electronic equipment filters the DC component in the enhanced ultrasonic echo signal with the highest energy to obtain the filtered ultrasonic echo signal.
[0183] S102-A24-b: The electronic device converts the filtered ultrasonic echo signal from the time domain to the frequency domain to obtain the frequency domain characteristics of the filtered ultrasonic echo signal.
[0184] S102-A24-c: The electronic device plots a time-frequency diagram based on the time-domain and frequency-domain characteristics of the filtered ultrasonic echo signal to obtain the first time-frequency diagram.
[0185] In this embodiment, the signal received by the detection device is not a completely cosine signal. The signals within the detection device are primarily electrical signals, and the received signal generally contains a DC component, i.e., the actual received signal R(t) = r(t) + B, where B is the DC component. Therefore, it is necessary to filter the DC component in the enhanced ultrasonic echo signal with the highest energy to obtain the filtered ultrasonic echo signal. For example, the electronic device uses a null filter to remove the signal component with a frequency of 0 from the enhanced ultrasonic echo signal with the highest energy, ensuring that the acquired frequency domain characteristics are generated only by the Doppler frequency shift.
[0186] Next, the electronic device transforms the filtered ultrasonic echo signal from the time domain to the frequency domain, obtaining the frequency domain characteristics of the filtered ultrasonic echo signal. Then, based on the time and frequency domain characteristics of the filtered ultrasonic echo signal, a time-frequency diagram is plotted to obtain the first time-frequency diagram. For example, the electronic device performs a short-time Fourier transform on the filtered ultrasonic echo signal, which can link the signal's frequency and time domain characteristics, as shown in Figure 6, ultimately obtaining a time-frequency diagram with time on the horizontal axis and frequency on the vertical axis, denoted as the first time-frequency diagram.
[0187] In this embodiment of the application, after the electronic device determines the first time-frequency map based on the above steps, it executes the above steps S102-B to determine the liveness detection result of the detection object according to the first time-frequency map.
[0188] This application does not limit the specific method by which an electronic device determines the liveness detection result of a detection object based on a first time-frequency graph.
[0189] In some embodiments, this application trains a liveness detection model that can predict liveness detection results based on an input time-frequency image. Thus, the electronic device can input the determined first time-frequency image into the liveness detection model to perform liveness detection and obtain the liveness detection result of the detected object.
[0190] In some embodiments, S102-B above includes the following steps:
[0191] S102-B1, The electronic device determines the time-frequency information corresponding to the detected object in the first time-frequency diagram and obtains the second time-frequency diagram;
[0192] S102-B2, The electronic device determines the liveness detection result of the detection object based on the second time-frequency diagram.
[0193] In this implementation, the first time-frequency diagram determined above may include not only the time-frequency information of the reflected ultrasonic echo signal from the detected object, but also other interference information, such as the time-frequency information of ultrasonic echo signals reflected by other reflection paths. Therefore, in this embodiment, the electronic device needs to determine the time-frequency information corresponding to the detected object in the first time-frequency diagram.
[0194] In this embodiment, when the object being detected moves, a relative movement occurs between the object and the detection device. At this time, due to the Doppler frequency shift, the carrier frequency of the ultrasonic signal received by the detection device changes. Specifically, the carrier frequency increases when the object moves closer to the detection device and decreases when the object moves further away. This section primarily introduces the basic principle of Doppler frequency shift used in motion-based ultrasonic liveness detection. Taking a single-carrier signal as an example, let the transmitted signal s(t) = cos(ωt) c t), w c The carrier frequency is expressed in rad / s. The reflected signal received by the microphone of the detection device. c is the propagation speed of ultrasound in the medium, which is generally considered to be a constant. The distance between the inspection equipment and the object being inspected is ρ(t), which is a function that changes with time. A Taylor expansion of ρ(t) is shown in equation (7):
[0195] Where ρ0 represents the instantaneous distance between the detected object and the information source (i.e., the detection device), ρ1 represents the instantaneous velocity of the target object relative to the detection device, ρ2 represents the instantaneous acceleration of the target object relative to the detection device, and O(t) 2 Let represent the second-order infinitesimal of ρ(t). It is evident that, since ρ(t) is a time-dependent quantity, when the target object generates velocity relative to the detection device, the frequency of the signal received by the detection device will no longer be w.c Specifically, when the target object approaches the detection device, the frequency of r(t) is w. c +|ρ1|+ρ2(t); When the target object moves away from the detection device, the frequency of r(t) is w. c -|ρ1|+ρ2(t), where ρ2(t) is a directional vector representing the acceleration of the target object relative to the detection device at time t. In the application scenario of this embodiment, its influence can be ignored. Therefore, the movement of a living body can generate a Doppler frequency shift, while attacks such as photo re-enactment attacks and injection attacks do not have corresponding time-domain and frequency-domain characteristics. Thus, ultrasound can be used to assist in liveness detection in objects such as faces.
[0196] Based on this, in this embodiment of the application, the electronic device can determine the time-frequency information corresponding to the detected object from the first time-frequency diagram based on the frequency changes of the time-frequency signal in the first time-frequency diagram and the movement direction of the detected object relative to the detection device. For example, during the time interval t1 to t2, if the guidance information sent by the detection device to the detected object is to slowly move away from the detection device, the electronic device will determine the time-frequency information of the detected object during the time interval t1 to t2 as the time-frequency information of the detected object during the time interval t1 to t2. During the time interval t2 to t3, if the guidance information sent by the detection device to the detected object is to slowly move towards the detection device, the electronic device will determine the time-frequency information of the detected object during the time interval t2 to t3 as the time-frequency information of the detected object during the time interval t2 to t3. Thus, the electronic device can determine the time-frequency information corresponding to the detected object from the first time-frequency diagram.
[0197] In some embodiments, the liveness detection data of this application embodiment further includes video detection data, which is video data of the detection object collected during the process of guiding the detection object to move relative to the detection device.
[0198] For example, as shown in Figure 3, during liveness detection, the detection device sends guidance information to the target object, which guides the object to move relative to the detection device. During this process, the detection device's camera records video, while its earpiece sends ultrasonic signals, and its microphone receives the ultrasonic echo signals.
[0199] In one example, assuming the guidance information in this embodiment of the application is to move away from the detection device and then move closer to it, the detection interface of the detection device is shown in Figures 4A and 4B. The detection interface includes a detection frame and guidance information. The detection frame is used to guide the object being detected to remain within the detection frame during its movement. As shown in Figure 4A, the guidance information displayed or played by the detection device is "Please move slowly away from the detection device." The object being detected moves slowly away from the detection device according to this guidance information. During this process, the camera of the detection device records a video of the object slowly moving backward. Simultaneously, during this process, the earpiece of the detection device sends an ultrasonic signal. When the ultrasonic signal sent by the earpiece encounters the object being detected, it is reflected to form an ultrasonic echo signal, which is received by the microphone of the detection device. When the detection equipment detects that a preset condition has been met—for example, when the display or playback time of the message "Please move slowly away from the detection equipment" reaches a preset time, or when the object moves backward for a preset time, or when the distance moved backward meets a preset distance—as shown in Figure 4B, the guidance information displayed or played on the detection interface changes to "Please move slowly towards the detection equipment." Following this guidance, the object slowly moves towards the detection equipment. During this process, the detection equipment's camera records video of the object's slow forward movement. Simultaneously, the detection equipment's earpiece sends an ultrasonic signal. When this ultrasonic signal encounters the object, it is reflected, forming an ultrasonic echo signal, which is received by the detection equipment's microphone.
[0200] In one example, assuming the guidance information in this embodiment of the application is to move closer to the detection device and then away from it, the detection interface of the detection device is shown in Figures 5A and 5B. The detection interface includes a detection frame and guidance information. As shown in Figure 5A, the guidance information displayed or played by the detection device is "Please move slowly towards the detection device." The object being detected moves slowly towards the detection device according to this guidance information. During this process, the camera of the detection device records a video of the object moving slowly forward. Simultaneously, during this process, the earpiece of the detection device sends an ultrasonic signal. When the ultrasonic signal sent by the earpiece encounters the object being detected, it is reflected to form an ultrasonic echo signal, which is received by the microphone of the detection device. When the detection equipment detects that a preset condition has been met—for example, when the display or playback time of the message "Please move slowly towards the detection equipment" reaches a preset time, or when the object moves forward for a preset time, or when the distance moved forward meets a preset distance—as shown in Figure 5B, the guidance information displayed or played on the detection interface changes to "Please move slowly away from the detection equipment." Following this guidance, the object moves slowly away from the detection equipment. During this process, the detection equipment's camera records video of the object slowly moving backward. Simultaneously, the detection equipment's earpiece sends an ultrasonic signal. When the ultrasonic signal encounters the object, it is reflected, forming an ultrasonic echo signal, which is received by the detection equipment's microphone.
[0201] As described above, in this embodiment, the object to be detected moves relative to the detection device according to the guidance information provided by the detection device. During this movement, the detection device sends an ultrasonic signal through a receiver. This ultrasonic signal is reflected upon encountering the object, forming an ultrasonic echo. The detection device receives this ultrasonic echo through a microphone to obtain ultrasonic detection data. Simultaneously, as the object moves relative to the detection device according to the guidance information, the detection device captures video data of the object's movement using a camera to obtain video detection data.
[0202] Based on this, the above S102-B1 includes the following steps S102-B11 and S102-B12:
[0203] S102-B11. Determine the size change data of the detected object based on video detection data;
[0204] S102-B12. Based on the size change data of the detected object, determine the time-frequency information corresponding to the detected object in the first time-frequency map to obtain the second time-frequency map.
[0205] In this embodiment, the liveness detection data acquired by the electronic device from the detection device includes not only ultrasonic detection data but also video detection data. In this embodiment, as the object being detected moves relative to the detection device, the size of the object being detected changes. For example, when the object is close to the detection device, the size of the object being detected is larger; when the object is far from the detection device, the size of the object being detected is smaller. Thus, the electronic device can process this video detection data to determine the size change data of the object being detected as it moves relative to the detection device.
[0206] For example, an electronic device performs keypoint recognition on each frame of video detection data to identify the size of the object to be detected in each frame. Then, based on the size of the object in each frame of the video detection data, the electronic device obtains data on the size change of the object as it moves relative to the detection device.
[0207] In one example, if the object being detected moves away from the detection device and then moves closer to it according to the guidance information, the data showing the change in the size of the object being detected by the detection device is shown in Figure 7. As the object moves away from the detection device, the size of the object detected by the detection device gradually decreases, and as the object moves closer to the detection device, the size of the object detected by the detection device gradually increases.
[0208] Based on the above steps, the electronic device determines the first time-frequency diagram corresponding to the ultrasonic detection data, as well as the size change data of the detection object collected by the detection device during the movement of the detection object relative to the detection device. Thus, the electronic device can determine the time-frequency information corresponding to the detection object in the first time-frequency diagram based on the size change data of the detection object, obtaining a second time-frequency diagram. In other words, the second time-frequency diagram only includes the time-frequency information corresponding to the detection object, enabling accurate detection of the detection object when performing liveness detection based on this second time-frequency diagram.
[0209] The following describes the specific process by which an electronic device determines the time-frequency information corresponding to the detected object in the second time-frequency graph based on the size change data of the detected object.
[0210] As described above, as the object moves away from the detection device, the size of the object gradually decreases, and the frequency of the ultrasonic echo signal reflected by the object gradually weakens. Conversely, as the object moves closer to the detection device, the size of the object gradually increases, and the frequency of the ultrasonic echo signal reflected by the object gradually strengthens. Based on this, the electronic device can determine the time-frequency information corresponding to the object in the first time-frequency diagram based on the object size change data, thus obtaining the second time-frequency diagram.
[0211] This application embodiment does not limit the specific method by which the electronic device determines the time-frequency information corresponding to the detected object in the first time-frequency graph based on the size change data of the detected object, and obtains the second time-frequency graph.
[0212] In some embodiments, the electronic device obtains the size change of the detected object within a time period [a1, a2] from the size change data of the detected object. If the size of the detected object gradually decreases within this time period [a1, a2], it indicates that the detected object is gradually moving away from the detection device during this time period. Correspondingly, the frequency of the ultrasonic echo signal reflected by the detected object collected by the detection device gradually decreases during this time period. Therefore, the electronic device determines the time-frequency signal with a gradually decreasing frequency within this time period in the first time-frequency diagram as the time-frequency signal corresponding to the detected object. In this way, the electronic device can filter the time-frequency information in different time periods in the first time-frequency diagram based on the size change data of the detected object, and finally obtain the time-frequency information corresponding to the detected object in the first time-frequency diagram, thereby obtaining the second time-frequency diagram.
[0213] In some embodiments, S102-B12 includes the following steps S102-B12-a to S102-B12-c:
[0214] S102-B12-a, Electronic equipment determines the transition time between the two processes of the detected object changing from large to small and from small to large in the data on the size change of the detected object;
[0215] S102-B12-b: The electronic device segments the first time-frequency map based on the turning point time to determine the first region and the second region in the first time-frequency map. The first region is the region corresponding to the process of the detected object moving away from the detection device in the first time-frequency map, and the second region is the region corresponding to the process of the detected object moving closer to the detection device in the first time-frequency map.
[0216] S102-B12-c: The electronic device determines the time-frequency signal corresponding to the detected object from the time-frequency signals included in the first and second regions based on the frequency change characteristics of the ultrasonic echo signal received when the detected object moves away from and near the detected object, and obtains a second time-frequency diagram.
[0217] In this embodiment, the electronic device determines the transition times between the two processes of the detected object changing from large to small and from small to large based on the size change data of the detected object. For example, in the process of the detected object first moving away from the detection device and then moving closer to it, the size change data of the detected object is shown in Figure 7. At approximately time t = 40 seconds, the size of the detected object changes from gradually decreasing to gradually increasing. Therefore, this time t = 40 seconds is determined as the transition time between the two processes of the detected object changing from large to small and from small to large. Next, based on this transition time, the electronic device segments the first time-frequency graph into a first region and a second region. The first region corresponds to the process of the detected object moving away from the detection device in the first time-frequency graph, and the second region corresponds to the process of the detected object moving closer to the detection device in the first time-frequency graph.
[0218] For example, during the process of the detected object first moving away from the detection device and then moving closer to it, the electronic device obtains a first time-frequency diagram based on the above steps, as shown in Figure 8. At time t = 40s, the electronic device divides this first time-frequency diagram into two parts, denoted as the first region and the second region, respectively. The first region is the left half of Figure 8, and the second region is the right half of Figure 8. The first region corresponds to the process of the detected object moving away from the detection device in the first time-frequency diagram, and the second region corresponds to the process of the detected object moving closer to the detection device in the first time-frequency diagram.
[0219] As shown in Figure 8, the first region of this embodiment includes two parts of time-frequency information. The frequency of the upper part of the time-frequency information gradually decreases with time, while the frequency of the lower part gradually increases with time. Since the frequency of the ultrasonic echo signal reflected by the object gradually decreases as the object moves away from the detection device, it can be determined that the time-frequency signal in the upper part of the first region, whose frequency gradually decreases with time, is the time-frequency signal corresponding to the object. Therefore, the time-frequency signal in the lower part of the first region, whose frequency gradually decreases with time, is deleted or blocked. Similarly, as shown in Figure 8, the second region of this embodiment includes two parts of time-frequency information. The frequency of the upper part of the time-frequency information gradually increases with time, while the frequency of the lower part gradually decreases with time. Since the frequency of the ultrasonic echo signal reflected by the object gradually increases as the object moves closer to the detection device, it can be determined that the time-frequency signal in the lower part of the second region, whose frequency gradually increases with time, is the time-frequency signal corresponding to the object. Therefore, the time-frequency signal in the upper part of the second region, whose frequency gradually increases with time, is deleted or blocked. The final result is the second time-frequency diagram shown in Figure 9.
[0220] After determining the second time-frequency diagram corresponding to the detection object based on the above steps, the electronic device executes the above steps S102-B2 to determine the liveness detection result of the detection object based on the second time-frequency diagram.
[0221] This application does not limit the specific method by which the electronic device determines the liveness detection result of the detection object based on the second time-frequency diagram.
[0222] In some embodiments, the electronic device analyzes the second time-frequency graph. If the frequency change of the time-frequency information included in the second time-frequency graph is consistent with the frequency change caused by the movement of the detected object relative to the detection device, the detected object can be determined to be a living body. If the frequency change of the time-frequency information included in the second time-frequency graph is inconsistent with the frequency change caused by the movement of the detected object relative to the detection device, the detected object can be determined to be a non-living body.
[0223] In some embodiments, as shown in FIG10, the electronic device performs liveness detection on the second time-frequency map using a liveness detection model to obtain a liveness detection result corresponding to the second time-frequency map. Then, based on the liveness detection result corresponding to the second time-frequency map, a liveness detection result for the detected object is obtained.
[0224] The liveness detection model in this embodiment is a trained liveness detection model. During the training process, time-frequency maps corresponding to different objects are input into the liveness detection model, which predicts the liveness detection results corresponding to each time-frequency map of different objects. For each object, the electronic device compares the liveness detection result predicted by the model with the object's label data (i.e., whether the object is live), determines the model loss, and then adjusts the parameters of the liveness detection model based on the model loss. After multiple rounds of training, a trained liveness detection model is obtained. Then, the electronic device inputs the second time-frequency map corresponding to the detected object obtained above into the trained liveness detection model to perform liveness detection, obtains the detection result of whether the detected object is live as predicted by the liveness detection model, and records the detection result as the liveness detection result corresponding to the second time-frequency map.
[0225] Next, the electronic device determines the liveness detection result of the target object based on the liveness detection result corresponding to the second time-frequency map.
[0226] This application does not limit the specific method by which an electronic device determines the liveness detection result of a detection object based on the liveness detection result corresponding to the second time-frequency map.
[0227] In some embodiments, the electronic device determines the liveness detection result corresponding to the second time-frequency map as the liveness detection result of the detected object.
[0228] In some embodiments, the electronic device performs visual liveness detection based on the video detection data, and then obtains the liveness detection result of the detected object based on the liveness detection result corresponding to the second time-frequency map and the visual liveness detection result.
[0229] In some embodiments, the ultrasonic detection data includes reflected signals of the emitted M subcarrier signals. The reflected signals include echo signals formed by the reflection of the M subcarrier signals detected by the detection device after they are projected onto the detection object during the movement of the detection object relative to the detection device. The M subcarrier signals are signals obtained by modulating the ultrasonic signals onto the M subcarriers. The first time-frequency diagram corresponding to the ultrasonic detection data includes P first time-frequency diagrams. At this time, the electronic device performs signal processing on the ultrasonic detection data to obtain the first time-frequency diagram corresponding to the ultrasonic detection data, including: the electronic device performs signal processing on the reflected signal of each of the M subcarrier signals to obtain a first time-frequency diagram corresponding to each subcarrier signal; the electronic device obtains P first time-frequency diagrams based on the first time-frequency diagram corresponding to each subcarrier signal.
[0230] In this implementation, to enhance the Doppler frequency shift sensing capability, the detection device modulates the ultrasonic signal onto M subcarriers, forming M subcarrier signals that are transmitted orthogonally. Each of these M subcarrier signals is reflected upon encountering an obstacle (e.g., the object being detected), and the detection device receives the reflected signal of each subcarrier signal. The electronic device processes the reflected signal of each subcarrier signal to obtain a first time-frequency diagram corresponding to each subcarrier signal. The specific process by which the electronic device determines the first time-frequency diagram corresponding to each subcarrier signal can be referred to the description of the above embodiment, and will not be repeated here.
[0231] Next, the electronic device obtains P first time-frequency maps based on a first time-frequency map corresponding to each subcarrier signal. That is, the electronic device obtains P first time-frequency maps based on M first time-frequency maps.
[0232] In one example, if M equals P, then these M first time-frequency maps are determined as P first time-frequency maps.
[0233] In one example, if P equals M+1, the electronic device can average the frequency values corresponding to each pixel in the M first time-frequency maps to obtain a new first time-frequency map, thus obtaining P first time-frequency maps. For example, as shown in Figure 11, assuming M equals 3, the electronic device generates a first time-frequency map for each of the three subcarrier signals, obtaining three first time-frequency maps. Then, it performs an averaging process on these three first time-frequency maps; that is, for each pixel in the three first time-frequency maps, the average frequency value of that pixel in these three first time-frequency maps is used as the new frequency value for that pixel, thus obtaining a new first time-frequency map. In this way, a total of four first time-frequency maps can be obtained.
[0234] In this embodiment, after obtaining P first time-frequency maps based on the above steps, the electronic device determines the time-frequency information corresponding to the detected object in the time-frequency information included in each of the P first time-frequency maps based on the size change data of the detected object, thus obtaining P second time-frequency maps. These P second time-frequency maps correspond one-to-one with the aforementioned P first time-frequency maps. That is, for each of the P first time-frequency maps, the electronic device can determine the corresponding second time-frequency map by using the above steps, thereby obtaining P second time-frequency maps.
[0235] In this way, the electronic device can obtain the liveness detection result of the detected object based on these P second time-frequency maps.
[0236] This application does not limit the specific method by which an electronic device determines the liveness detection result of a detection object based on P second time-frequency maps.
[0237] In some embodiments, the electronic device analyzes the frequency data included in each of the P second time-frequency maps to obtain a liveness detection result corresponding to each second time-frequency map. Then, based on the liveness detection results corresponding to the P second time-frequency maps, a liveness detection result for the detected object is obtained.
[0238] In some embodiments, as shown in FIG12, the electronic device performs liveness detection on each of the P (e.g., 3) second time-frequency maps using a liveness detection model, obtaining liveness detection results corresponding to each of the P second time-frequency maps. Then, based on the liveness detection results corresponding to the P second time-frequency maps, the electronic device determines the final liveness detection result of the detected object.
[0239] This application does not limit the specific method by which the electronic device determines the liveness detection result of the detection object based on the liveness detection results corresponding to the P second time-frequency maps.
[0240] In some embodiments, if all the liveness detection results corresponding to the P second time-frequency maps indicate that the detected object is alive, then the liveness detection result of the detected object is considered to be live. If one of the liveness detection results corresponding to the P second time-frequency maps indicates that the detected object is not alive, then the liveness detection result of the detected object is determined to be not live.
[0241] In some embodiments, the electronic device performs liveness detection on the detected object based on video detection data to obtain a visual liveness detection result. Then, the electronic device obtains the liveness detection result of the detected object based on the liveness detection results corresponding to the P second time-frequency maps and the visual liveness detection result. For example, if the visual liveness detection result of the detected object indicates that the detected object is alive, and the liveness detection results corresponding to the P second time-frequency maps all indicate that the detected object is alive, then the detected object is determined to be alive.
[0242] The liveness detection method provided in this application acquires liveness detection data, including ultrasonic detection data. This ultrasonic detection data consists of ultrasonic echo signals from emitted ultrasonic signals. These echo signals contain the echo signals formed by the ultrasonic signals detected by the detection device and reflected after being projected onto the detection object during its movement relative to the detection device. Based on this ultrasonic detection data, the liveness detection result of the detection object is determined. In this application embodiment, ultrasonic signals are emitted and echo signals are received during the movement of the detection object relative to the detection device. This uses the movement between the detection object and the detection device as the basic action, and the large amplitude of this basic action expands the sensing range of Doppler frequency shift. The reflected ultrasonic signals carry rich phase information, effectively suppressing the influence of external factors such as environmental noise and dynamic interference. This allows the acquired ultrasonic detection data to accurately reflect the frequency change characteristics of the ultrasonic echo signals during the movement of the detection object relative to the detection device, thereby improving the accuracy of liveness detection when based on this ultrasonic detection data.
[0243] The above provides an overall overview of the liveness detection method provided in the embodiments of this application. The liveness detection method of this application will now be further described with reference to Figure 13.
[0244] Figure 13 is a schematic flowchart of a liveness detection method provided in an embodiment of this application.
[0245] As shown in Figure 13, the liveness detection method of this application embodiment includes:
[0246] S201. Electronic equipment acquires liveness detection data.
[0247] The liveness detection data includes ultrasonic detection data and video detection data. Ultrasonic detection data consists of the echo signals of the emitted ultrasonic signals. These echo signals include the echo signals formed by the ultrasonic signals detected by the detection device and reflected after being projected onto the object during its movement relative to the detection device. Video detection data consists of video data of the object being detected, collected as it moves relative to the detection device at varying distances.
[0248] The specific implementation process of S201 can be referred to the relevant description of S101 above, and will not be repeated here.
[0249] S202. Whether the liveness detection data of electronic equipment meets the conditions for ultrasonic liveness detection.
[0250] In this embodiment of the application, before performing ultrasonic liveness detection, it is first determined whether the liveness detection data meets the conditions for ultrasonic liveness detection. That is, it is determined whether the detection device can send ultrasonic signals, receive ultrasonic signals, or whether the received ultrasonic signals meet the requirements.
[0251] With the rapid pace of updates and iterations in testing equipment, it is impossible to conduct continuous offline testing on all equipment to evaluate its ultrasonic sensing and processing capabilities. Therefore, an online method for determining whether a testing device model can deploy an ultrasonic-based liveness detection model is particularly necessary.
[0252] After collecting approximately 800 video data points from 10 different detection devices at varying price points, it was found that the devices unable to deploy ultrasound-based liveness detection models exhibited two main limitations: First, the devices could not transmit ultrasound waves because the internal crystal oscillator did not support transmitting sound signals beyond the range of human hearing. Second, the devices could not effectively receive ultrasound waves. This was due to two reasons: one, the device's earpiece did not support ultrasound reception; and two, while the earpiece did support ultrasound reception, noise reduction was applied to signals outside the range of human hearing perception before they were sent to the software layer.
[0253] For the reasons mentioned above, in the embodiments of this application, when performing liveness detection, the first step is to check whether the liveness detection data meets the conditions for ultrasonic liveness detection.
[0254] This application does not limit the specific method by which electronic devices detect whether the liveness detection data meets the conditions for ultrasonic liveness detection.
[0255] In some embodiments, the liveness detection data of this application may further include device information of the detection device. This device information may include a first identifier, a second identifier, and a third identifier. The first identifier indicates whether the detection device has an earpiece (i.e., whether it can transmit ultrasonic signals), the second identifier indicates whether the detection device has a microphone (i.e., whether it can receive ultrasonic signals), and the third identifier indicates whether the detection device has a noise reduction module. Thus, the electronic device can determine whether the liveness detection data meets the ultrasonic liveness detection conditions based on the device information in the liveness detection data. For example, if the first identifier indicates that the detection device does not have a microphone, or the second identifier indicates that the detection device does not have a microphone, or the third identifier indicates that the detection device has a noise reduction module, then the collected liveness detection data does not meet the ultrasonic liveness detection conditions. As another example, if the first identifier indicates that the detection device has a microphone, the second identifier indicates that the detection device has a microphone, and the third identifier indicates that the detection device does not have a noise reduction module, then the electronic device determines that the liveness detection data meets the ultrasonic liveness detection conditions.
[0256] In some embodiments, S202 above includes the following steps S202-A to S202-D:
[0257] S202-A, Whether frequency components exist in the liveness detection data of electronic devices;
[0258] S202-B. If there are frequency components in the liveness detection data, the electronic device will draw the spectrum corresponding to the ultrasonic detection data.
[0259] S202-C, Electronic equipment determines the main lobe width of the spectrogram;
[0260] S202-D. If the main lobe width is greater than or equal to the preset width, the electronic device determines that the liveness detection data meets the ultrasonic liveness detection conditions. If the main lobe width is less than the preset width, the liveness detection data does not meet the ultrasonic liveness detection conditions.
[0261] In this detection method, the electronic device first determines whether a frequency component exists in the liveness detection data detected by the device. If no frequency component is found in the liveness detection data, it indicates that the device cannot send or receive ultrasonic signals. In this case, it is determined that the liveness detection data does not meet the conditions for ultrasonic liveness detection, and therefore ultrasonic liveness detection is not performed.
[0262] If a frequency component is found in the liveness detection data, it is also necessary to determine whether the detection device has a noise reduction function. This is because the ultrasonic liveness detection in this application embodiment is mainly based on the Doppler frequency shift caused by multipath echo signals. Frequency selective fading is a phenomenon caused by multipath effects, where fading characteristics differ across different frequency bands; it is closely related to multipath effects. For simplicity, we assume that the multipath channel with impulse response H(w) has only two reflection paths and analyze the fast fading phenomenon caused by this channel. We assume that there are only two multipath propagation paths, and that these two paths differ only in time delay (the amplitude attenuates the propagating signal the same); and that the signal transmitted by the detection device is s(t), with the transmission time as the time origin. Based on this multipath signal, the received signal r(t) can be expressed as: r(t) = A × s(t - τ0) + A × s(t - τ0 - τ), where A is the propagation attenuation (assuming both paths have the same propagation attenuation), τ0 is the propagation delay of the first path, and τ is the difference in propagation delay between the two paths. To obtain the impulse response of the multipath channel, a Fourier transform of r(t) can be performed to obtain... Thus obtain The focus is on the variation characteristics of the H(w) modulus. For (1+e -jwτ The modulus can be used to obtain Specifically, as shown in Figure 14, the thick horizontal black line represents the frequency response of a single propagation path channel, and the arc represents the frequency response of a two-path channel. It can be seen that for a single-path channel, the frequency response is consistent across all frequency bands. For a multipath channel, while the frequency response may be enhanced at certain frequencies due to signal superposition, correspondingly, the frequency response may be zero at other frequencies due to interference between the two paths. For detection devices capable of receiving ultrasonic signals, the main sources of ultrasonic signals are: multipath echo signals and direct leakage from the earpiece. If the detection device has a noise reduction module at the hardware level, the received multipath echo signals will be weakened, and liveness detection based on Doppler frequency shift will be impossible; the main lobe bandwidth of the corresponding frequency component will also be smaller. If the mobile phone hardware does not have a noise reduction module, the received signal will contain relatively strong echo signals, and the final spectral characteristics will exhibit a larger main lobe bandwidth. For example, as shown in Figures 15A and 15B, Figure 15A shows the spectrum received by a detection device with a noise reduction module, and Figure 15B shows the spectrum received by a detection device without a noise reduction module.
[0263] Based on this, when the electronic device detects a frequency component in the liveness detection data, it processes the ultrasonic detection data and plots the corresponding spectrum. For example, the ultrasonic detection data is demodulated to obtain an ultrasonic echo signal. Then, a Fourier transform is used to convert the ultrasonic echo signal from the time domain to the frequency domain, and the power spectral density of the signal is calculated. This power spectral density is then processed through smoothing filtering, envelope detection, and other signal processing to obtain the spectrum corresponding to the ultrasonic detection data. The main lobe width of this spectrum is determined through step-by-step scanning. If the main lobe width is greater than or equal to a preset width, the liveness detection data is deemed to meet the ultrasonic liveness detection conditions, and the ultrasonic liveness detection operation is executed. If the main lobe width is less than the preset width, the liveness detection data is deemed not to meet the ultrasonic liveness detection conditions, and the ultrasonic liveness detection operation is not executed.
[0264] In this embodiment of the application, if the liveness detection data of the electronic device meets the conditions for ultrasonic liveness detection, then the following step S203 is executed.
[0265] If the electronic device determines that the liveness detection data does not meet the conditions for ultrasonic liveness detection, then the following step S206 is executed.
[0266] S203. If it is determined that the liveness detection data meets the conditions for ultrasonic liveness detection, the electronic device performs signal processing on the ultrasonic detection data to obtain the first time-frequency diagram corresponding to the ultrasonic detection data.
[0267] The specific implementation process of S203 can be referred to the relevant description of S102 above, and will not be repeated here.
[0268] S204. Electronic devices determine the size change data of the detected object based on video detection data.
[0269] The specific implementation process of S204 can be referred to the relevant description of S102 above, and will not be repeated here.
[0270] S205. The electronic device determines the time-frequency information corresponding to the detected object in the first time-frequency map based on the size change data of the detected object, so as to obtain the second time-frequency map.
[0271] The specific implementation process of S205 can be referred to the relevant description of S102 above, and will not be repeated here.
[0272] S206. The electronic device determines the liveness detection result of the detected object based on the second time-frequency diagram.
[0273] The specific implementation process of S206 can be referred to the relevant description of S102 above, and will not be repeated here.
[0274] S207. If the liveness detection data does not meet the conditions for ultrasonic liveness detection, the electronic device shall perform liveness detection on the object to be detected based on the video detection data.
[0275] The methods for electronic devices to perform liveness detection on the detection object based on video detection data can be referred to in relevant technologies, and will not be repeated here in the embodiments of this application.
[0276] The liveness detection method provided in this application acquires liveness detection data and checks whether the data meets the conditions for ultrasonic liveness detection. If the liveness detection data meets the conditions, signal processing is performed on the ultrasonic detection data to obtain a first time-frequency map corresponding to the ultrasonic detection data. Simultaneously, the detection object in the video detection data is identified, and the size change data of the detection object collected during the guided movement of the detection object relative to the detection device is determined. Then, based on the size change data of the detection object, the time-frequency information corresponding to the detection object in the time-frequency information included in the first time-frequency map is determined to obtain a second time-frequency map. Based on the second time-frequency map, the liveness detection result of the detection object is determined. Therefore, this application embodiment, when performing ultrasonic-based liveness detection, first determines whether to perform ultrasonic liveness detection based on the liveness detection data. This effectively evaluates the ultrasonic sensing capabilities of different detection devices, thereby accurately determining whether the corresponding detection device is suitable for the ultrasonic-based liveness detection model. This allows electronic devices to flexibly select appropriate liveness detection schemes, thereby improving the reliability and efficiency of liveness detection. Meanwhile, this application embodiment takes the movement between the detection object and the detection device as the basic action, which can effectively suppress the influence of external factors such as environmental noise and dynamic interference. Combined with the size change data of the detection object in the video detection data, the time-frequency characteristics corresponding to the movement of the detection object relative to the detection device can be accurately captured. Therefore, when performing liveness detection based on the accurately captured time-frequency characteristics, the accuracy of liveness detection can be improved.
[0277] The following describes the liveness detection method of this application embodiment in further detail, taking the detection object as a face.
[0278] Figure 16 is a schematic flowchart of a liveness detection method provided in an embodiment of this application.
[0279] As shown in Figure 16, the liveness detection method of this application embodiment includes:
[0280] S301. Electronic equipment acquires liveness detection data.
[0281] The liveness detection data includes video detection data and ultrasound detection data.
[0282] The ultrasonic detection data includes the reflected signals of the emitted M subcarrier signals. The reflected signals include the echo signals formed by the reflection of the M subcarrier signals detected by the detection equipment when the detection object moves relative to the detection equipment. The M subcarrier signals are obtained by modulating the ultrasonic signals onto the M subcarriers.
[0283] Among them, the video detection data refers to the facial video data collected during the process of guiding the face to move relative to the detection device.
[0284] In this embodiment, to enhance the Doppler shift sensing capability, the detection device modulates the ultrasonic signal into M subcarriers, forming M subcarrier signals that are transmitted orthogonal to each other. Each of these M subcarrier signals is reflected upon encountering an obstacle (e.g., a human face), and the detection device receives the reflected signal of each subcarrier signal.
[0285] The specific implementation process of S301 can be referred to the relevant description of S101 above, and will not be repeated here.
[0286] S302. Does the liveness detection data of the electronic device meet the conditions for ultrasonic liveness detection?
[0287] For example, the electronic device first detects whether there are frequency components in the liveness detection data. If frequency components are present, a spectrum diagram corresponding to the ultrasonic detection data is plotted. The electronic device determines the main lobe width of the spectrum diagram. If the main lobe width is greater than or equal to a preset width, the electronic device determines that the liveness detection data meets the ultrasonic liveness detection conditions; if the main lobe width is less than the preset width, the electronic device determines that the liveness detection data does not meet the ultrasonic liveness detection conditions.
[0288] If the electronic device determines that the liveness detection data meets the conditions for ultrasonic liveness detection, then the following step S303 is executed.
[0289] If the electronic device determines that the liveness detection data does not meet the conditions for ultrasonic liveness detection, then the following step S313 is executed.
[0290] The specific implementation process of S302 can be referred to the relevant description of S202 above, and will not be repeated here.
[0291] S303. For each of the M subcarrier signals, perform coherent detection processing on the reflected signal of the subcarrier signal to obtain the corresponding hybrid ultrasonic echo signal.
[0292] The mixed ultrasonic signal contains echo signals from multiple reflection paths, including reflection paths formed by a human face as it moves relative to the detection device, as well as reflection paths formed by non-human faces.
[0293] Specifically, for each of the M subcarrier signals, the electronic device extracts the phase information I′(t) from the reflected signal r(t) of that subcarrier signal using a cosine function. Next, the extracted phase information I′(t) is low-pass filtered to remove the high-frequency components, yielding the in-phase component I(t). Then, the in-phase component I(t) undergoes an orthogonal transform to obtain the quadrature component Q(t). The sum of the in-phase component I(t) and the quadrature component Q(t) is determined as the mixed ultrasonic echo signal x(t) corresponding to the multiple reflection paths of that subcarrier signal.
[0294] S304. The electronic device acquires the spatial enhancement vector of the N+1 enhancement elements, and enhances the hybrid ultrasonic echo signal corresponding to the subcarrier signal through the N+1 enhancement elements to obtain the N+1 enhanced ultrasonic echo signals corresponding to the subcarrier signal.
[0295] For example, the electronic device multiplies each of the above N+1 enhancement elements with the hybrid ultrasonic echo signal corresponding to the subcarrier signal to obtain N+1 enhanced ultrasonic echo signals corresponding to the subcarrier signal.
[0296] S305. The electronic device selects the enhanced ultrasonic signal with the highest energy from the N+1 enhanced ultrasonic echo signals corresponding to the subcarrier signal, and uses it as the enhanced ultrasonic echo signal corresponding to the face under the subcarrier signal.
[0297] For example, the electronic device determines the energy value of each of the N+1 enhanced ultrasonic echo signals corresponding to the subcarrier signal; based on the energy value, the electronic device selects the enhanced ultrasonic echo signal with the largest energy value from these N+1 enhanced ultrasonic echo signals as the ultrasonic echo signal corresponding to the face under the subcarrier signal.
[0298] S306. The electronic device filters the DC component in the enhanced ultrasonic echo signal corresponding to the face under the subcarrier signal to obtain the filtered ultrasonic echo signal corresponding to the subcarrier signal.
[0299] For example, an electronic device uses a zero-dip filter to remove the signal component with a frequency of 0 from the enhanced ultrasonic echo signal corresponding to the face under the subcarrier signal, ensuring that the frequency domain characteristics of the filtered ultrasonic echo signal corresponding to the subcarrier signal are only generated by Doppler frequency shift.
[0300] S307. The electronic device draws a time-frequency diagram based on the filtered ultrasonic echo signal corresponding to the subcarrier signal to obtain the first time-frequency diagram corresponding to the subcarrier signal.
[0301] For example, the electronic device converts the filtered ultrasonic echo signal corresponding to the subcarrier signal from the time domain to the frequency domain to obtain the frequency domain characteristics of the filtered ultrasonic echo signal corresponding to the subcarrier signal. Based on the time domain and frequency domain characteristics of the filtered ultrasonic echo signal corresponding to the subcarrier signal, a time-frequency diagram is plotted to obtain the first time-frequency diagram.
[0302] Following the steps described above, the electronic device can determine the first time-frequency diagram corresponding to each of the M subcarrier signals, thus obtaining M first time-frequency diagrams.
[0303] S308. The electronic device obtains P first time-frequency diagrams based on M first time-frequency diagrams corresponding to M subcarrier signals.
[0304] In one example, if M equals P, the electronic device will determine these M first time-frequency maps as P first time-frequency maps.
[0305] In one example, if P equals M+1, the electronic device can take the average of the frequency values corresponding to each pixel in these M first time-frequency maps to obtain a new first time-frequency map, and thus obtain M+1 first time-frequency maps.
[0306] S309. Electronic devices determine the size change data of a person's face based on video detection data.
[0307] It should be noted that there is no specific order in which S309 and S303 are executed. That is, S303 can be executed after S303, before S303, or simultaneously with S303. This application embodiment does not impose any restrictions on this.
[0308] The specific implementation process of S309 is described in the relevant description of S102 above, and will not be repeated here.
[0309] S310. Based on the face size change data, the electronic device determines the time-frequency information corresponding to the face in the time-frequency information included in each of the P first time-frequency maps, so as to obtain P second time-frequency maps.
[0310] For example, in determining the size change data of a detected object, the electronic device identifies the transition times between two processes: the object shrinking from large to small and vice versa. For each of the P first time-frequency maps, the first time-frequency map is divided into a first region and a second region based on the transition times. The first region corresponds to the process in the first time-frequency map where the face moves away from the detection device, and the second region corresponds to the process in the first time-frequency map where the face moves closer to the detection device. Based on the frequency change characteristics of the ultrasonic echo signals received when the face moves away from and closer to the detection device, the electronic device determines the time-frequency signal corresponding to the face from the time-frequency signals included in the first and second regions, thus obtaining the second time-frequency map corresponding to that first time-frequency map. Following this method, the electronic device can obtain the second time-frequency map corresponding to each of the P first time-frequency maps, thereby obtaining P second time-frequency maps.
[0311] S311. The electronic device performs liveness detection on P second time-frequency maps respectively using a liveness detection model, and obtains the liveness detection results corresponding to each of the P second time-frequency maps.
[0312] For example, the electronic device inputs these P second time-frequency maps one by one into the liveness detection model to perform liveness detection, and obtains the liveness detection result corresponding to each of the P second time-frequency maps.
[0313] S312. The electronic device determines the liveness detection result of the face based on the liveness detection results corresponding to P second time-frequency maps.
[0314] In one example, if the liveness detection results corresponding to P second time-frequency maps all indicate that the face is alive, then the electronic device determines that the liveness detection result of the face is live.
[0315] In another example, the electronic device performs liveness detection on the face based on video detection data to obtain a visual liveness detection result; the electronic device obtains the liveness detection result of the face based on the liveness detection results corresponding to P second time-frequency maps and the visual liveness detection result.
[0316] S313. If it is determined that the liveness detection data does not meet the conditions for ultrasonic liveness detection, the electronic device performs liveness detection on the face based on the video detection data.
[0317] The methods for electronic devices to perform liveness detection on the detection object based on video detection data can be referred to in relevant technologies, and will not be repeated here in the embodiments of this application.
[0318] The liveness detection method provided in this application acquires liveness detection data, which includes video detection data and ultrasonic detection data. It then checks whether the liveness detection data meets the ultrasonic liveness detection conditions. If the liveness detection data meets the ultrasonic liveness detection conditions, for each of the M subcarrier signals, coherent detection processing is performed on the reflected signal of that subcarrier signal to obtain the corresponding hybrid ultrasonic echo signal. A spatial enhancement vector including N+1 enhancement elements is acquired, and these N+1 enhancement elements are used to enhance the hybrid ultrasonic echo signal corresponding to the subcarrier signal, respectively, to obtain N+1 enhanced ultrasonic echo signals corresponding to the subcarrier signal. From the N+1 enhanced ultrasonic echo signals corresponding to the subcarrier signal, the enhanced ultrasonic echo signal corresponding to the face under that subcarrier signal is determined. The DC component in the enhanced ultrasonic echo signal corresponding to the face under that subcarrier signal is filtered to obtain the filtered ultrasonic echo signal corresponding to the subcarrier signal. A time-frequency diagram is plotted based on the filtered ultrasonic echo signal corresponding to the subcarrier signal to obtain the first time-frequency diagram corresponding to the subcarrier signal. Based on M first time-frequency maps corresponding to M subcarrier signals, P first time-frequency maps are obtained. Based on video detection data, face size change data is determined. Based on face size change data, the time-frequency information corresponding to the face in the time-frequency information included in each of the P first time-frequency maps is determined, resulting in P second time-frequency maps. Liveness detection is performed on each of the P second time-frequency maps using a liveness detection model, obtaining liveness detection results corresponding to each of the P second time-frequency maps. Then, based on the liveness detection results corresponding to each of the P second time-frequency maps, the liveness detection result of the face is determined. Therefore, in this embodiment, by sending M subcarrier signals, the Doppler frequency shift sensing capability is enhanced, thereby improving the accuracy of ultrasonic liveness detection. Furthermore, by checking whether the liveness detection data collected by the detection device meets the ultrasonic liveness detection conditions, the ultrasonic sensing capability of different detection devices can be effectively evaluated, thereby accurately determining whether the corresponding detection device is suitable for the ultrasonic liveness detection model. This allows for flexible selection of appropriate liveness detection schemes, thereby improving the reliability and efficiency of liveness detection. Meanwhile, this application embodiment can effectively cope with external interference, including multipath effects, dynamic interference and environmental noise, by using specific coherent detection, spatial enhancement and null filtering techniques. It can capture the time-frequency characteristics corresponding to the movement well. Therefore, when performing liveness detection based on the accurately captured time-frequency characteristics, the accuracy of liveness detection can be improved. Moreover, this application embodiment has low requirements for the inspection equipment and low detection cost.
[0319] The method embodiments of this application have been described in detail above with reference to Figures 2 to 16, and the device embodiments of this application have been described in detail below with reference to Figure 17.
[0320] Figure 17 is a schematic block diagram of a liveness detection device provided in an embodiment of this application.
[0321] As shown in Figure 17, the liveness detection device 10 includes:
[0322] The acquisition unit 11 is used to acquire liveness detection data, which includes ultrasonic detection data. The ultrasonic detection data is the ultrasonic echo signal of the emitted ultrasonic signal. The ultrasonic echo signal includes the echo signal formed by the ultrasonic signal detected by the detection device and reflected after being projected onto the detection object during the movement of the detection object relative to the detection device.
[0323] The liveness detection unit 12 is used to determine the liveness detection result of the detection object based on the ultrasonic detection data.
[0324] In some embodiments, the liveness detection unit 12 is specifically used to perform signal processing on the ultrasonic detection data to obtain a first time-frequency diagram corresponding to the ultrasonic detection data; and to determine the liveness detection result of the detection object based on the first time-frequency diagram.
[0325] In some embodiments, the liveness detection unit 12 is specifically used to determine the time-frequency information corresponding to the detection object in the first time-frequency diagram to obtain a second time-frequency diagram; and to determine the liveness detection result of the detection object based on the second time-frequency diagram.
[0326] In some embodiments, the ultrasonic echo signal further includes an echo signal formed by the ultrasonic signal detected by the detection device being projected onto a non-detection object and then reflected; the liveness detection unit 12 is specifically used to perform coherent detection processing on the ultrasonic detection data to obtain a mixed ultrasonic echo signal, the mixed ultrasonic signal including echo signals of multiple reflection paths, the multiple reflection paths including the reflection path formed by the detection object during its movement relative to the detection device, and the reflection path formed by the non-detection object; based on the mixed ultrasonic echo signal, the first time-frequency diagram is obtained.
[0327] In some embodiments, the liveness detection unit 12 is specifically used to acquire a spatial enhancement vector including N+1 enhancement elements, where N is a positive integer, and the N+1 enhancement elements are obtained based on N+1 different propagation delays; enhance the hybrid ultrasonic echo signal using the N+1 enhancement elements to obtain N+1 enhanced ultrasonic echo signals; select the enhanced ultrasonic echo signal with the highest energy from the N+1 enhanced ultrasonic echo signals; and draw a time-frequency diagram based on the enhanced ultrasonic echo signal with the highest energy to obtain the first time-frequency diagram.
[0328] In some embodiments, the liveness detection unit 12 is specifically used to multiply each of the N+1 enhancement elements with the hybrid ultrasonic echo signal to obtain the enhanced hybrid ultrasonic echo signal.
[0329] In some embodiments, the liveness detection unit 12 is specifically used to filter the DC component in the enhanced ultrasonic echo signal with the highest energy to obtain a filtered ultrasonic echo signal; convert the filtered ultrasonic echo signal from the time domain space to the frequency domain space to obtain the frequency domain characteristics of the filtered ultrasonic echo signal; and draw a time-frequency diagram based on the time domain characteristics and frequency domain characteristics of the filtered ultrasonic echo signal to obtain the first time-frequency diagram.
[0330] In some embodiments, the liveness detection data further includes video detection data, which is video data of the detected object collected during the process of guiding the detected object to move relative to the detection device. The liveness detection unit 12 is specifically used to determine the size change data of the detected object based on the video detection data; and to determine the time-frequency information corresponding to the detected object in the first time-frequency diagram based on the size change data of the detected object, so as to obtain the second time-frequency diagram.
[0331] In some embodiments, the liveness detection unit 12 is specifically used to determine the transition times of the two processes in the size change data of the detected object, namely, the process of the detected object changing from large to small and from small to large; based on the transition times, the first time-frequency diagram is divided into a first region and a second region, wherein the first region is the region corresponding to the process of the detected object moving away from the detection device in the first time-frequency diagram, and the second region is the region corresponding to the process of the detected object moving closer to the detection device in the first time-frequency diagram; based on the frequency change characteristics of the ultrasonic echo signals received when the detected object moves away from and moves closer to the detection device, the time-frequency signal corresponding to the detected object is determined from the time-frequency signals included in the first region and the second region to obtain a second time-frequency diagram.
[0332] In some embodiments, the ultrasonic detection data includes reflected signals of M emitted subcarrier signals. The reflected signals include echo signals formed by the reflection of the M subcarrier signals detected by the detection device after they are projected onto the detection object during its movement relative to the detection device. The M subcarrier signals are signals obtained by modulating the ultrasonic signal onto the M subcarriers. The first time-frequency diagram corresponding to the ultrasonic detection data includes P first time-frequency diagrams, where M is a positive integer and P is a positive integer greater than or equal to M. The liveness detection unit 12 is specifically used to detect the M subcarrier signals. The reflected signal of each subcarrier signal in the signal is processed to obtain a first time-frequency map corresponding to each subcarrier signal; based on the first time-frequency map corresponding to each subcarrier signal, P first time-frequency maps are obtained; based on the size change data of the detected object, the time-frequency information corresponding to the detected object in the time-frequency information included in each of the P first time-frequency maps is determined to obtain P second time-frequency maps, and the P first video maps correspond one-to-one with the P second time-frequency maps; based on the P second time-frequency maps, the liveness detection result of the detected object is determined.
[0333] In some embodiments, the liveness detection unit 12 is specifically used to perform liveness detection on the P second time-frequency maps respectively through a liveness detection model to obtain liveness detection results corresponding to the P second time-frequency maps respectively; and to determine the liveness detection result of the detection object based on the liveness detection results corresponding to the P second time-frequency maps respectively.
[0334] In some embodiments, the liveness detection unit 12 is specifically used to perform liveness detection on the detection object based on the video detection data to obtain a visual liveness detection result; and to obtain a liveness detection result of the detection object based on the liveness detection results corresponding to the P second time-frequency maps and the visual liveness detection result.
[0335] In some embodiments, the liveness detection unit 12 is specifically used to detect whether the liveness detection data meets the ultrasonic liveness detection conditions; if the liveness detection data meets the ultrasonic liveness detection conditions, then the liveness detection result of the detection object is determined based on the ultrasonic liveness detection data.
[0336] In some embodiments, the liveness detection unit 12 is specifically used to detect whether there is a frequency component in the liveness detection data; if there is a frequency component in the liveness detection data, then a spectrum diagram corresponding to the ultrasonic detection data is plotted; the main lobe width of the spectrum diagram is determined; if the main lobe width is greater than or equal to a preset width, then the liveness detection data is determined to meet the ultrasonic liveness detection conditions; if the main lobe width is less than the preset width, then the liveness detection data is determined not to meet the ultrasonic liveness detection conditions.
[0337] In some embodiments, the liveness detection unit 12 is further configured to perform liveness detection on the detection object based on the video detection data if it is determined that the liveness detection data does not meet the conditions for ultrasonic liveness detection.
[0338] In some embodiments, the ultrasonic signal is emitted by the detection device.
[0339] In some embodiments, the detection device includes a earpiece, and the ultrasonic signal is emitted by the detection device through the earpiece.
[0340] In some embodiments, the detection device includes a microphone through which the ultrasonic echo is received.
[0341] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, they will not be repeated here. Specifically, the device shown in FIG17 can perform the above-described embodiments of the liveness detection method, and the foregoing and other operations and / or functions of each module in the device are respectively for implementing the above-described method embodiments, which will not be repeated here for the sake of brevity.
[0342] The apparatus of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the method disclosed in this application embodiment can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above method embodiments.
[0343] Figure 18 is a schematic flowchart of a liveness detection method provided in an embodiment of this application. The execution subject of this embodiment is a detection device. As shown in Figure 18, the method of this embodiment includes the following steps:
[0344] S401, The detection equipment emits ultrasonic signals.
[0345] In this embodiment of the application, the detection device has an ultrasonic signal transmission function and can transmit ultrasonic signals outward.
[0346] In some embodiments, during liveness detection, the detection device displays or plays guidance information to instruct the object to move relative to the detection device. As the object moves relative to the detection device under the guidance of the guidance information, the detection device emits ultrasonic signals.
[0347] S402, The detection equipment receives the ultrasonic echo signal of the ultrasonic signal.
[0348] Among them, the ultrasonic echo signal includes the echo signal formed by the ultrasonic signal detected by the detection equipment being projected onto the detection object and reflected during the movement of the detection object relative to the detection equipment.
[0349] In this embodiment, the detection device also has the ability to receive ultrasonic echo signals. As shown in Figure 19, during the movement of the object being detected relative to the detection device, the detection device emits ultrasonic signals. These ultrasonic signals are reflected when they encounter obstacles such as the object being detected, forming echo signals. The detection device can receive these ultrasonic echo signals.
[0350] S402. The detection equipment determines the liveness detection result of the object based on the ultrasonic echo signal.
[0351] After receiving the ultrasonic echo signal from the ultrasonic signal, the detection equipment determines the liveness detection result of the object based on the ultrasonic echo signal.
[0352] This application does not limit the specific method by which the detection device determines the liveness detection result of the detection object based on the ultrasonic echo signal.
[0353] In some embodiments, the detection device itself has a liveness detection capability, allowing it to process the received ultrasonic echo signal to determine the liveness detection result of the object being detected. For example, the detection device performs signal processing on the ultrasonic echo signal to obtain a first time-frequency diagram corresponding to the ultrasonic echo signal, and then determines the liveness detection result of the object based on the first time-frequency diagram. The specific method by which the detection device processes the ultrasonic echo signal to determine the liveness detection result of the object can be referred to the description in the above embodiments, and will not be repeated here.
[0354] In some embodiments, the detection device sends the received ultrasonic echo signal to a server, so that the server processes the ultrasonic echo signal to determine the liveness detection result of the detected object. For example, the server performs signal processing on the ultrasonic echo signal to obtain a first time-frequency diagram corresponding to the ultrasonic echo signal, and then determines the liveness detection result of the detected object based on the first time-frequency diagram. The specific method by which the server processes the ultrasonic echo signal to determine the liveness detection result of the detected object can be referred to the description in the above embodiments, and will not be repeated here. In one example of this implementation, the server sends the liveness detection result of the detected object to the detection device, and the detection device displays or plays the liveness detection result.
[0355] The liveness detection method provided in this application embodiment involves a detection device emitting an ultrasonic signal and receiving an ultrasonic echo signal. This echo signal includes the echo signal formed after the ultrasonic signal is reflected from the object being detected as it moves relative to the detection device. The detection device then determines the liveness detection result of the object based on the ultrasonic echo signal. This liveness detection method only requires the detection device to have the ability to emit and receive ultrasonic signals, thus reducing equipment requirements and lowering the cost of liveness detection. This allows the liveness detection method proposed in this application embodiment to be widely adopted and used.
[0356] Figure 20 is a schematic diagram of a detection device provided in an embodiment of this application. As shown in Figure 20, the detection device includes a microphone, an earpiece, and a processor. The earpiece can emit ultrasonic signals, the microphone can receive echo signals of ultrasonic signals, and the processor is used to execute the liveness detection method of the embodiment of this application.
[0357] In this embodiment, as shown in FIG20, the detection device emits an ultrasonic signal through a receiver; the detection device receives the ultrasonic echo signal of the ultrasonic signal through a microphone. The ultrasonic echo signal contains the echo signal formed by the ultrasonic signal received by the microphone being projected onto the detection object and reflected during the movement of the detection object relative to the detection device; the detection device determines the liveness detection result of the detection object based on the ultrasonic echo signal through a processor. The specific process by which the detection device determines the liveness detection result of the detection object based on the ultrasonic echo signal can be referred to the description of the above embodiment, and will not be repeated here.
[0358] In some embodiments, the detection device also plays guidance information through a speaker, or displays guidance information on a display screen, which instructs the object to be detected to move relative to the detection device. As the object moves relative to the detection device based on this guidance information, the detection device emits an ultrasonic signal through a receiver and receives the ultrasonic echo signal through a microphone.
[0359] In some embodiments, as shown in FIG20, the detection device of this application embodiment further includes a camera. During the process of guiding the detection object to move relative to the detection device, the camera acquires video data of the detection object to form video detection data. Thus, the processor can determine the time-frequency information corresponding to the detection object in the first time-frequency map based on the video detection data, and obtain a second time-frequency map. For example, the processor identifies the detection object in the video detection data, determines the size change data of the detection object collected during the movement of the detection object relative to the detection device, and then determines the time-frequency information corresponding to the detection object in the first time-frequency map based on the size change data of the detection object, obtaining a second time-frequency map, and then determines the liveness detection result of the detection object based on the second time-frequency map. The specific process can be referred to the description of the above embodiments, and will not be repeated here.
[0360] In some embodiments, the detection device can send the liveness detection results of the detected object to the detected object. For example, the detection device can play the liveness detection results of the detected object through a speaker, or the detection device can display the liveness detection results of the detected object on a display screen.
[0361] Figure 21 is a schematic block diagram of an electronic device provided in an embodiment of this application. The electronic device may be the detection device or server described above.
[0362] As shown in Figure 21, the electronic device 40 may include:
[0363] The system includes a memory 41 and a processor 42. The memory 41 stores a computer program 43 and transfers the computer program 43 to the processor 42. In other words, the processor 42 can retrieve and run the computer program 43 from the memory 41 to implement the methods described in the embodiments of this application.
[0364] For example, the processor 42 can be used to execute the steps in the above method according to the instructions in the computer program 43.
[0365] In some embodiments of this application, the processor 42 may include, but is not limited to:
[0366] General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0367] In some embodiments of this application, the memory 41 includes, but is not limited to:
[0368] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0369] In some embodiments of this application, the computer program 43 may be divided into one or more modules, which are stored in the memory 41 and executed by the processor 42 to complete the page recording method provided in this application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 43 in the electronic device.
[0370] As shown in Figure 21, the electronic device 40 may further include:
[0371] Transceiver 44, which can be connected to processor 42 or memory 41.
[0372] The processor 42 can control the transceiver 44 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 44 may include a transmitter and a receiver. The transceiver 44 may further include antennas, and the number of antennas may be one or more.
[0373] It should be understood that the various components in the electronic device 40 are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.
[0374] According to one aspect of this application, a computer storage medium is provided that stores a computer program thereon, which, when executed by a computer, enables the computer to perform the methods of the above-described method embodiments. Alternatively, embodiments of this application also provide a computer program product containing instructions that, when executed by a computer, cause the computer to perform the methods of the above-described method embodiments.
[0375] According to another aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method described in the above-described method embodiments.
[0376] In other words, when implemented using software, it can be implemented wholly or partially in the form of a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0377] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0378] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0379] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0380] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for detecting liveness, characterized in that, include: Acquire ultrasonic testing data of the object to be tested. The ultrasonic testing data includes echo signals of ultrasonic signals, which are detected by the testing equipment. The echo signals are formed by the reflection of the object to be tested during the movement of the ultrasonic signals relative to the testing equipment. Based on the ultrasonic detection data, the liveness detection result of the object being detected is determined.
2. The method according to claim 1, characterized in that, The movement of the detection object relative to the detection device includes: the detection object moving towards the detection device and then moving away from the detection device, and the detection object moving away from the detection device and then moving towards the detection device.
3. The method according to claim 1 or 2, characterized in that, The step of determining the liveness detection result of the detection object based on the ultrasonic detection data includes: The ultrasonic detection data is processed to obtain a first time-frequency diagram corresponding to the ultrasonic detection data; Based on the first time-frequency diagram, the liveness detection result of the detection object is determined.
4. The method according to claim 3, characterized in that, The ultrasonic echo signal also includes the echo signal formed by the ultrasonic signal detected by the detection device being projected onto the non-detection object and then reflected. The step of processing the ultrasonic detection data to obtain a first time-frequency diagram corresponding to the ultrasonic detection data includes: The ultrasonic detection data is subjected to coherent detection processing to obtain a mixed ultrasonic echo signal. The mixed ultrasonic signal contains echo signals from multiple reflection paths, including reflection paths formed by the object being detected during its movement relative to the detection device, and reflection paths formed by the non-object being detected. The first time-frequency diagram is obtained based on the hybrid ultrasonic echo signal.
5. The method according to claim 4, characterized in that, The process of obtaining the first time-frequency diagram based on the hybrid ultrasonic echo signal includes: Obtain a spatial enhancement vector comprising N+1 enhancement elements, where N is a positive integer, and the N+1 enhancement elements are obtained based on N+1 different propagation delays; The N+1 enhancement elements are used to enhance the hybrid ultrasonic echo signal to obtain N+1 enhanced ultrasonic echo signals. From the N+1 enhanced ultrasonic echo signals, select the enhanced ultrasonic echo signal with the highest energy. The first time-frequency diagram is obtained by plotting a time-frequency diagram based on the enhanced ultrasonic echo signal with the highest energy.
6. The method according to claim 5, characterized in that, The step of plotting a time-frequency diagram based on the enhanced ultrasonic echo signal with the highest energy to obtain the first time-frequency diagram includes: The DC component in the enhanced ultrasonic echo signal with the highest energy is filtered to obtain the filtered ultrasonic echo signal. The filtered ultrasonic echo signal is converted from the time domain to the frequency domain to obtain the frequency domain characteristics of the filtered ultrasonic echo signal. The first time-frequency diagram is obtained by plotting the time-domain and frequency-domain characteristics of the filtered ultrasonic echo signal.
7. The method according to any one of claims 3-6, characterized in that, Determining the liveness detection result of the detection object based on the first time-frequency diagram includes: Determine the time-frequency information corresponding to the detection object in the first time-frequency diagram to obtain the second time-frequency diagram; Based on the second time-frequency diagram, the liveness detection result of the detection object is determined.
8. The method according to claim 7, characterized in that, The liveness detection data also includes video detection data, which is video data of the detection object collected during the process of guiding the detection object to move relative to the detection device; Determining the time-frequency information corresponding to the detection object in the first time-frequency graph to obtain the second time-frequency graph includes: Based on the video detection data, determine the size change data of the detected object; Based on the size change data of the detected object, the time-frequency information corresponding to the detected object in the first time-frequency graph is determined to obtain the second time-frequency graph.
9. The method according to claim 8, characterized in that, The step of determining the time-frequency information corresponding to the detected object in the time-frequency information included in the first time-frequency map based on the size change data of the detected object, in order to obtain the second time-frequency map, includes: Determine the transition time between the two processes of the detected object changing from large to small and from small to large in the data of the size change of the detected object; Based on the turning point, the first time-frequency graph is divided into a first region and a second region. The first region is the region corresponding to the process in which the detected object moves away from the detection device in the first time-frequency graph, and the second region is the region corresponding to the process in which the detected object moves closer to the detection device in the first time-frequency graph. Based on the frequency change characteristics of the ultrasonic echo signals received when the object being detected moves away from and towards the detection device, the time-frequency signal corresponding to the object being detected is determined from the time-frequency signals included in the first region and the second region, thus obtaining the second time-frequency diagram.
10. The method according to claim 8 or 9, characterized in that, The ultrasonic detection data includes reflected signals of M emitted subcarrier signals. The reflected signals include echo signals formed by the reflection of the M subcarrier signals detected by the detection device after they are projected onto the detection object during the movement of the detection object relative to the detection device. The M subcarrier signals are signals obtained by modulating the ultrasonic signal onto the M subcarriers. The first time-frequency diagram corresponding to the ultrasonic detection data includes P first time-frequency diagrams, where M is a positive integer and P is a positive integer greater than or equal to M. The step of processing the ultrasonic detection data to obtain a first time-frequency diagram corresponding to the ultrasonic detection data includes: The reflected signal of each of the M subcarrier signals is processed to obtain a first time-frequency diagram corresponding to each subcarrier signal; Based on a first time-frequency diagram corresponding to each subcarrier signal, the P first time-frequency diagrams are obtained; The step of determining the time-frequency information corresponding to the detected object in the time-frequency information included in the first time-frequency map based on the size change data of the detected object, in order to obtain the second time-frequency map, includes: Based on the size change data of the detected object, the time-frequency information corresponding to the detected object is determined in the time-frequency information included in each of the P first time-frequency maps, so as to obtain P second time-frequency maps, and the P first video maps correspond one-to-one with the P second time-frequency maps; The step of determining the liveness detection result of the detection object based on the second time-frequency map includes: Based on the P second time-frequency maps, the liveness detection result of the detection object is determined.
11. The method according to claim 10, characterized in that, The determination of the liveness detection result of the detection object based on the P second time-frequency maps includes: Liveness detection is performed on the P second time-frequency maps using a liveness detection model to obtain the liveness detection results corresponding to the P second time-frequency maps respectively; Based on the liveness detection results corresponding to the P second time-frequency maps, the liveness detection result of the detection object is determined.
12. The method according to claim 11, characterized in that, The step of determining the liveness detection result of the detection object based on the liveness detection results corresponding to the P second time-frequency maps includes: Based on the video detection data, liveness detection is performed on the detected object to obtain a visual liveness detection result; Based on the liveness detection results corresponding to the P second time-frequency maps and the visual liveness detection results, the liveness detection result of the detected object is obtained.
13. The method according to any one of claims 1-12, characterized in that, Before determining the liveness detection result of the object based on the ultrasonic detection data, the method further includes: Check whether the liveness detection data meets the conditions for ultrasonic liveness detection; The step of determining the liveness detection result of the detection object based on the ultrasonic detection data includes: If the liveness detection data meets the conditions for ultrasonic liveness detection, then the liveness detection result of the detection object is determined based on the ultrasonic liveness detection data.
14. The method according to claim 13, characterized in that, The detection of whether the liveness detection data meets the conditions for ultrasonic liveness detection includes: Detect whether a frequency component exists in the liveness detection data; If the liveness detection data contains frequency components, then a spectrum diagram corresponding to the ultrasonic detection data is plotted. Determine the main lobe width of the spectrogram; If the width of the main lobe is greater than or equal to the preset width, then the liveness detection data is determined to meet the ultrasonic liveness detection conditions.
15. The method according to any one of claims 1-14, characterized in that, The ultrasonic signal is emitted by the detection device.
16. The method according to claim 15, characterized in that, The detection device includes a hearing receiver, and the ultrasonic signal is emitted by the detection device through the hearing receiver.
17. The method according to any one of claims 1-16, characterized in that, The detection device includes a microphone, and the ultrasonic echo is received through the microphone.
18. A liveness detection device, characterized in that, include: The acquisition unit is used to acquire liveness detection data, which includes ultrasonic detection data. The ultrasonic detection data is the ultrasonic echo signal of the emitted ultrasonic signal. The ultrasonic echo signal includes the echo signal formed by the ultrasonic signal detected by the detection device and reflected after being projected onto the detection object during the movement of the detection object relative to the detection device. The liveness detection unit is used to determine the liveness detection result of the object being detected based on the ultrasonic detection data.
19. A method for detecting liveness, characterized in that, include: The detection equipment emits ultrasonic signals; The detection device receives the ultrasonic echo signal of the ultrasonic signal, and the ultrasonic echo signal includes the echo signal formed by the ultrasonic signal detected by the detection device being projected onto the detection object and reflected during the movement of the detection object relative to the detection device. The detection device determines the liveness detection result of the object based on the ultrasonic echo signal.
20. The method according to claim 19, characterized in that, The method further includes: The detection device displays or plays guidance information, which is used to instruct the detection object to move relative to the detection device.
21. The method according to claim 19 or 20, characterized in that, The movement of the detection object relative to the detection device includes: the detection object moving towards the detection device and then moving away from the detection device, and the detection object moving away from the detection device and then moving towards the detection device.
22. The method according to any one of claims 19-21, characterized in that, The detection device includes a hearing receiver, and the ultrasonic signal is emitted by the detection device through the hearing receiver.
23. The method according to any one of claims 19-22, characterized in that, The detection device includes a microphone, and the ultrasonic echo is received through the microphone.
24. A testing device, characterized in that, The detection device includes a microphone, a hearing hand, and a processor; The detection device emits ultrasonic signals through the earpiece; The detection device receives the ultrasonic echo signal of the ultrasonic signal through the microphone. The ultrasonic echo signal includes the echo signal formed by the ultrasonic signal received by the microphone being projected onto the detection object and reflected during the movement of the detection object relative to the detection device. The detection device determines the liveness detection result of the object to be detected based on the ultrasonic echo signal through the processor.
25. The testing equipment according to claim 24, characterized in that, The detection device also includes a speaker and a display screen; The detection device also plays guidance information through the speaker, or the detection device also displays guidance information through the display screen, the guidance information being used to instruct the detection object to move relative to the detection device.
26. An electronic device, characterized in that, Including processor and memory; The memory is used to store computer programs; The processor is configured to execute the computer program to implement the method as described in any one of claims 1 to 17 or 19 and 23 above.
27. A computer-readable storage medium, characterized in that, Used to store computer programs; The computer program causes the computer to perform the method as described in any one of claims 1 to 17 or 19 and 23 above.
28. A computer program product, characterized in that, The computer program product includes at least one program segment stored in a computer-readable storage medium, a processor of a computer device reading the at least one program segment from the computer-readable storage medium, and the processor executing the at least one program segment to cause the computer device to perform the method according to any one of claims 1 to 17 or 19 and 23.