Fingerprint liveness detection method, system, device, terminal and storage medium

By acquiring the square wave signal of a preset frequency reflected by a finger and calculating its mean and variance, and using transmitting and receiving electrodes for liveness detection, the problem of identifying fake fingerprints and dry or wet fingers in existing technologies is solved, achieving low-cost and efficient live fingerprint detection.

CN116052284BActive Publication Date: 2026-07-03SHENZHEN CHIPSAILING TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN CHIPSAILING TECH CO LTD
Filing Date
2022-12-06
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing fingerprint recognition technologies struggle to effectively detect liveness when faced with fake fingerprints or wet/dry fingers, leading to decreased security and reliability. Infrared vein detection methods are costly and have a short lifespan, while image analysis methods are ineffective with wet/dry fingers.

Method used

By acquiring the square wave signal of a preset frequency reflected by a finger, converting it into a digital signal, and calculating the mean and variance, liveness detection is performed using transmitting and receiving electrodes, reducing system costs and improving the ability to detect both dry and wet fingers.

Benefits of technology

It achieves low-cost live fingerprint detection, effectively identifying live fingers and improving the system's practicality and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116052284B_ABST
    Figure CN116052284B_ABST
Patent Text Reader

Abstract

This application relates to the field of fingerprint detection technology, and provides a fingerprint liveness detection method, system, device, terminal, and storage medium. The fingerprint liveness detection method includes: acquiring an analog signal; wherein the analog signal is generated by a square wave signal of a preset frequency reflected by a finger; converting the analog signal into a digital signal, and acquiring multiple sample sets in the digital signal; wherein each sample set includes multiple sampling voltages; calculating the mean and variance of all sampling voltages in each sample set; and determining whether the finger is a live finger based on the mean and variance calculated from all sample sets. The fingerprint liveness detection system provided in this application uses a transmitting electrode to emit a square wave signal and a receiving electrode to receive the analog signal reflected by the finger, and then processes and analyzes the analog signal to achieve finger liveness detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of fingerprint detection technology, and in particular relates to a fingerprint liveness detection method, system, device, terminal and storage medium. Background Technology

[0002] With the popularization of fingerprint recognition technology, people are paying more and more attention to the security of fingerprint recognition technology. However, recently, fake fingerprints such as fingerprint sleeves and fingerprint films on the market have made it difficult for capacitive fingerprint scanners to recognize them. At this time, live fingerprint detection has emerged, which has improved the security of fingerprint recognition.

[0003] Currently, the main methods for live fingerprint detection are infrared vein detection and image analysis detection. Infrared vein detection requires an infrared light source and an infrared sensor, resulting in high cost and a short lifespan. Image analysis detection requires detecting details such as the sweat pores on the finger, but it is difficult to capture images of tiny sweat pores in images of both dry and wet fingers on the scanner, making live fingerprint detection impossible. Summary of the Invention

[0004] This application provides a fingerprint liveness detection method, system, device, terminal, and storage medium, which can realize fingerprint liveness detection.

[0005] In a first aspect, embodiments of this application provide a fingerprint liveness detection method, including:

[0006] Acquire an analog signal; wherein the analog signal is generated by a square wave signal of a preset frequency reflected by a finger;

[0007] The analog signal is converted into a digital signal, and multiple sample sets are collected from the digital signal; wherein each sample set includes multiple sampled voltages;

[0008] Calculate the mean and variance of all the sampled voltages in each of the sample sets;

[0009] Based on the mean and variance calculated from all the said sample sets, it is determined whether the finger is a living finger.

[0010] In one possible implementation of the first aspect, prior to acquiring the analog signal, the method further includes:

[0011] Upon receiving the pressing signal from the finger, a square wave signal of a preset frequency is transmitted to the finger.

[0012] In one possible implementation of the first aspect, converting the analog signal into a digital signal includes:

[0013] Amplify the analog signal;

[0014] The amplified analog signal is converted into a digital signal.

[0015] In one possible implementation of the first aspect, acquiring multiple sample sets in the digital signal includes:

[0016] During one cycle of the square wave signal, the voltage of the digital signal is sampled multiple times to obtain multiple sampled voltages, which constitute a sample set;

[0017] During multiple cycles of the square wave signal, the voltage of the digital signal is acquired to obtain multiple sample sets.

[0018] In one possible implementation of the first aspect, determining whether the finger is a living finger based on the mean and variance calculated from all said sample sets includes:

[0019] When the difference between the means of any two of the sample sets is less than a first preset value, and the variance of all the sample sets is greater than a second preset value, the finger is determined to be a living finger.

[0020] In one possible implementation of the first aspect, after determining whether the finger is a living finger based on the mean and variance calculated from all said sample sets, the method further includes:

[0021] The digital signal corresponding to the finger is stored.

[0022] Secondly, embodiments of this application provide a fingerprint liveness detection system, including a control unit, a transmitting electrode, and a receiving electrode, wherein the transmitting electrode and the receiving electrode are both electrically connected to the control unit;

[0023] The transmitting electrode is used to send a square wave signal of a preset frequency according to the control command of the control unit;

[0024] The receiving electrode is used to receive analog signals and transmit the analog signals to the control unit;

[0025] The control unit is used to perform the method described in any one of the first aspects.

[0026] Thirdly, embodiments of this application provide a fingerprint liveness detection device, comprising:

[0027] An acquisition module is used to acquire an analog signal; wherein the analog signal is generated by a square wave signal of a preset frequency reflected by a finger.

[0028] A sampling module is used to convert the analog signal into a digital signal and acquire multiple sample sets in the digital signal; wherein each sample set includes multiple sampled voltages;

[0029] A calculation module is used to calculate the mean and variance of all the sampled voltages in each sample set;

[0030] The analysis module is used to determine whether the finger is a living finger based on the mean and variance calculated from all the sample sets.

[0031] Fourthly, embodiments of this application provide a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in any one of the first aspects.

[0032] Fifthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any one of the first aspects.

[0033] The beneficial effects of the embodiments in this application compared with the prior art are:

[0034] When performing finger liveness detection, an analog signal is first acquired, which is generated by a square wave signal of a preset frequency reflected by the finger. Then, the analog signal is converted into a digital signal, and multiple sample sets are collected from the digital signal. Each sample set includes multiple sampled voltages. The mean and variance of all sampled voltages in each sample set are then calculated. Finally, based on the mean and variance calculated from all sample sets, it is determined whether the finger is a live finger, thus achieving finger liveness detection.

[0035] The fingerprint liveness detection system provided in this application utilizes a transmitting electrode to emit a square wave signal and a receiving electrode to receive the analog signal reflected from the finger. The analog signal is then processed and analyzed to achieve liveness detection. Compared to existing infrared vein detection methods that require an infrared light source and an infrared sensor, the fingerprint liveness detection system provided in this application only requires transmitting and receiving electrodes, reducing system cost. Furthermore, unlike existing image analysis detection methods that cannot detect both dry and wet fingers, the fingerprint liveness detection system provided in this application can detect both, making it more practical.

[0036] It is understood that the beneficial effects of the second and fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is a schematic diagram of the structure of a fingerprint liveness detection system provided in one embodiment of this application;

[0039] Figure 2 This is a schematic flowchart of a fingerprint liveness detection method provided in an embodiment of this application;

[0040] Figure 3 This is a schematic diagram of the structure of a fingerprint liveness detection device provided in an embodiment of this application;

[0041] Figure 4 This is a schematic diagram of the terminal structure provided in the embodiments of this application. Detailed Implementation

[0042] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0043] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0044] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0045] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."

[0046] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0047] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0048] Figure 1 A schematic diagram of the structure of a fingerprint liveness detection system according to an embodiment of this application is shown. See also Figure 1 As shown, the fingerprint liveness detection system includes a control unit 10, a transmitting electrode 20, and a receiving electrode 30, both of which are electrically connected to the control unit 10.

[0049] Specifically, when a finger presses the receiving electrode 30, the control unit 10 controls the transmitting electrode 20 to send a square wave signal of a preset frequency. The square wave signal is reflected after reaching the finger, and the reflected signal is an analog signal. The receiving electrode 30 receives the analog signal reflected by the finger and transmits it to the control unit 10. After receiving the analog signal, the control unit 10 converts it into a digital signal and collects multiple sample sets from the digital signal. Each sample set includes multiple sampled voltages. Then, the control unit 10 calculates the mean and variance of all sampled voltages in each sample set, and determines whether the finger is a living finger based on the mean and variance calculated from all sample sets.

[0050] Therefore, the fingerprint liveness detection system provided in this application embodiment utilizes the transmitting electrode 20 to emit a square wave signal and the receiving electrode 30 to receive the analog signal reflected by the finger. The analog signal is then processed and analyzed to achieve liveness detection of the finger. Compared to existing infrared vein detection methods that require an infrared light source and an infrared sensor, the fingerprint liveness detection system provided in this application embodiment only requires the transmitting electrode 20 and the receiving electrode 30, reducing system cost. Compared to existing image analysis detection methods that cannot detect both dry and wet fingers, the fingerprint liveness detection system provided in this application embodiment can detect both dry and wet fingers, making it more practical.

[0051] In one embodiment of this application, the control unit 10 may include an operational amplifier 12, an ADC converter 13, and a controller 11. The operational amplifier 12 is electrically connected to the receiving electrode 30 and is also electrically connected to the ADC converter 13. The ADC converter 13 and the transmitting electrode 20 are both electrically connected to the controller 11.

[0052] Specifically, when a finger presses the receiving electrode 30, the controller 11 can control the transmitting electrode 20 to emit a square wave signal of a preset frequency. The receiving electrode 30 receives the analog signal reflected by the finger and transmits the analog signal to the operational amplifier 12. The operational amplifier 12 amplifies the analog signal and transmits the amplified analog signal to the ADC converter 13. The ADC converter 13 converts the amplified analog signal into a digital signal and transmits the digital signal to the controller 11. By analyzing the digital signal, the controller 11 can determine whether the finger is a living finger.

[0053] It should be noted that designers can set the frequency of the square wave signal emitted by the transmitting electrode 20 according to the actual situation. For example, the frequency of the square wave signal can be set to 500HZ, 700HZ or 800HZ.

[0054] Figure 2 A schematic flowchart of a fingerprint liveness detection method according to an embodiment of this application is shown. See also Figure 2 As shown, the fingerprint liveness detection method includes steps S201 to S204.

[0055] Step S201: Acquire an analog signal; wherein the analog signal is generated by a square wave signal of a preset frequency reflected by a finger.

[0056] Specifically, when a finger presses the receiving electrode, the output level of the receiving electrode changes. After the controller detects this change, it controls the transmitting electrode to emit a square wave of a preset frequency. The square wave signal reaches the finger and is reflected; the reflected signal is an analog signal. The receiving electrode receives the analog signal reflected by the finger and transmits it to the control unit, thus completing the acquisition of the analog signal.

[0057] It should be noted that designers can set the frequency of the square wave signal emitted by the transmitting electrode according to the actual situation. For example, the frequency of the square wave signal can be set to 500HZ, 700HZ or 800HZ.

[0058] Step S202: Convert the analog signal into a digital signal and collect multiple sample sets in the digital signal; wherein each sample set includes multiple sampled voltages.

[0059] Specifically, the operational amplifier amplifies the analog signal and sends the amplified analog signal to the ADC converter. The ADC converter converts the amplified analog signal into a digital signal and sends the digital signal to the controller. The controller acquires multiple sample sets from the digital signal; each sample set includes multiple sampled voltages.

[0060] For example, step S202 may specifically include steps S2021 and S2022.

[0061] Step S2021: During one cycle of the square wave signal, the voltage of the digital signal is sampled multiple times to obtain multiple sampled voltages, forming a sample set.

[0062] Specifically, designers can set the number of times the digital signal voltage is sampled in one cycle of the square wave signal according to actual needs. For example, if the digital signal voltage is sampled 8 times in one cycle of the square wave signal, 8 sample voltages are obtained, and then a sample set includes 8 sample voltages.

[0063] Step S2022: During multiple cycles of the square wave signal, the voltage of the digital signal is collected to obtain multiple sample sets.

[0064] Specifically, designers can set the number of samples to be obtained in the final sample set according to actual needs. For example, they can collect the periods of 16 square wave signals to obtain 16 sample sets.

[0065] Step S203: Calculate the mean and variance of all sampled voltages in each sample set.

[0066] Specifically, after obtaining multiple sample sets, the mean and variance of all sampled voltages in each sample set are calculated, and finally each sample set obtains a mean and a variance.

[0067] Step S204: Determine whether the finger is a living finger based on the mean and variance calculated from all sample sets.

[0068] Specifically, by analyzing the mean and variance of all sample sets, it is possible to determine whether a finger is a living finger, thus achieving the detection of a living finger.

[0069] For example, a finger is determined to be a living finger when the difference between the means of any two sample sets is less than a first preset value and the variance of all sample sets is greater than a second preset value. A finger is determined to be a non-living finger when the difference between the means of any two sample sets is greater than or equal to the first preset value and / or the variance of all sample sets is less than or equal to the second preset value.

[0070] Once the finger is confirmed to be a living finger, the corresponding digital signal is stored in the register of the fingerprint scanner to facilitate subsequent fingerprint feature extraction and recognition.

[0071] It should be noted that designers can set the specific values ​​of the first and second preset values ​​according to actual needs. For example, the first preset value can be set to 0.1 and the second preset value can be set to 5%.

[0072] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0073] Figure 3 A schematic diagram of the structure of a fingerprint liveness detection device according to an embodiment of this application is shown. Figure 3 As shown, the fingerprint liveness detection device includes:

[0074] The acquisition module 31 is used to acquire an analog signal; wherein the analog signal is generated by a square wave signal of a preset frequency reflected by a finger.

[0075] The sampling module 32 is used to convert the analog signal into a digital signal and collect multiple sample sets in the digital signal; wherein each sample set includes multiple sampled voltages;

[0076] The calculation module 33 is used to calculate the mean and variance of all the sampled voltages in each sample set;

[0077] Analysis module 34 is used to determine whether the finger is a living finger based on the mean and variance calculated from all the sample sets.

[0078] In one embodiment of this application, the fingerprint liveness detection device further includes:

[0079] The transmitting module is used to transmit a square wave signal of a preset frequency to the finger after receiving the pressing signal of the finger.

[0080] In one embodiment of this application, the sampling module 32 is further configured to:

[0081] Amplify the analog signal;

[0082] The amplified analog signal is converted into a digital signal.

[0083] In one embodiment of this application, the sampling module 32 is further configured to:

[0084] During one cycle of the square wave signal, the voltage of the digital signal is sampled multiple times to obtain multiple sampled voltages, which constitute a sample set;

[0085] During multiple cycles of the square wave signal, the voltage of the digital signal is acquired to obtain multiple sample sets.

[0086] In one embodiment of this application, the analysis module 34 is further configured to:

[0087] When the difference between the means of any two of the sample sets is less than a first preset value, and the variance of all the sample sets is greater than a second preset value, the finger is determined to be a living finger.

[0088] In one embodiment of this application, the fingerprint liveness detection device further includes:

[0089] A storage module is used to store the digital signal corresponding to the finger.

[0090] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0091] Figure 4 This is a schematic diagram of the terminal structure provided in an embodiment of this application. Figure 4 As shown, the terminal 4 in this embodiment may include: at least one processor 40 ( Figure 4 Only one processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40 are shown. When the processor 40 executes the computer program 42, it implements the steps in any of the above method embodiments, for example... Figure 2 Steps S201 to S204 in the illustrated embodiment. Alternatively, when the processor 40 executes the computer program 42, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 3 The functions of modules 31 to 34 are shown.

[0092] For example, the computer program 42 can be divided into one or more modules / units, which are stored in the memory 41 and executed by the processor 40 to complete the present invention. The one or more modules / units can be a series of computer program 42 instruction segments capable of performing specific functions, which describe the execution process of the computer program 42 in the terminal 4. In this embodiment, the terminal 4 can be a cloud server or a controller in a vehicle.

[0093] This application also provides a computer-readable storage medium storing a computer program 42, which, when executed by a processor 40, implements the steps described in the above-described method embodiments.

[0094] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.

[0095] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program 42 instructing related hardware. The computer program 42 can be stored in a computer-readable storage medium, and when executed by the processor 40, it can implement the steps of the various method embodiments described above. The computer program 42 includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a terminal, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0096] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0097] Those skilled in the art will recognize that the units 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.

[0098] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units 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 devices or units may be electrical, mechanical, or other forms.

[0099] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0100] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A fingerprint liveness detection method, characterized in that, include: Acquire an analog signal; wherein the analog signal is generated by a square wave signal of a preset frequency reflected by a finger; The analog signal is converted into a digital signal, and multiple sample sets are collected from the digital signal; wherein each sample set includes multiple sampled voltages; Calculate the mean and variance of all the sampled voltages in each of the sample sets; Based on the mean and variance calculated from all the aforementioned sample sets, it is determined whether the finger is a living finger; The acquisition of multiple sample sets from the digital signal includes: During one cycle of the square wave signal, the voltage of the digital signal is sampled multiple times to obtain multiple sampled voltages, which constitute a sample set; During multiple cycles of the square wave signal, the voltage of the digital signal is acquired to obtain multiple sample sets.

2. The liveness detection method of fingerprints according to claim 1, characterized in that, Before acquiring the analog signal, the method further includes: Upon receiving the pressing signal from the finger, a square wave signal of a preset frequency is transmitted to the finger.

3. The fingerprint liveness detection method according to claim 1, characterized in that, The process of converting the analog signal into a digital signal includes: Amplify the analog signal; The amplified analog signal is converted into a digital signal.

4. The fingerprint liveness detection method according to claim 1, characterized in that, The step of determining whether the finger is a living finger based on the mean and variance calculated from all the sample sets includes: When the difference between the means of any two of the sample sets is less than a first preset value, and the variance of all the sample sets is greater than a second preset value, the finger is determined to be a living finger.

5. The fingerprint liveness detection method according to claim 1, characterized in that, After determining whether the finger is a living finger based on the mean and variance calculated from all the sample sets, the method further includes: The digital signal corresponding to the finger is stored.

6. A fingerprint liveness detection system, characterized in that, It includes a control unit, a transmitting electrode, and a receiving electrode, wherein the transmitting electrode and the receiving electrode are both electrically connected to the control unit; The transmitting electrode is used to send a square wave signal of a preset frequency according to the control command of the control unit; The receiving electrode is used to receive analog signals and transmit the analog signals to the control unit; The control unit is used to perform the method according to any one of claims 1-5.

7. A fingerprint liveness detection device, characterized in that, include: An acquisition module is used to acquire an analog signal; wherein the analog signal is generated by a square wave signal of a preset frequency reflected by a finger. A sampling module is used to convert the analog signal into a digital signal and acquire multiple sample sets in the digital signal; wherein each sample set includes multiple sampled voltages; A calculation module is used to calculate the mean and variance of all the sampled voltages in each sample set; The analysis module is used to determine whether the finger is a living finger based on the mean and variance calculated from all the sample sets. The acquisition of multiple sample sets from the digital signal includes: During one cycle of the square wave signal, the voltage of the digital signal is sampled multiple times to obtain multiple sampled voltages, which constitute a sample set; During multiple cycles of the square wave signal, the voltage of the digital signal is acquired to obtain multiple sample sets.

8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 5.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 5.