Fingerprint identification method and electronic device
By using a fingerprint sensor and image enhancement model to process fingerprint images in electronic devices, the problem of media interference between the finger and the touchscreen is solved, thus improving the accuracy of under-display fingerprint recognition.
Patent Information
- Application Number
- CN202110216686.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-26
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2041-02-26
AI Technical Summary
When electronic devices capture fingerprint images, the medium between the finger and the touchscreen (such as a protective film) interferes with fingerprint recognition, resulting in a reduced recognition rate.
By incorporating fingerprint sensors into electronic devices, fingerprint images are captured and processed using image enhancement models, reducing media interference and improving recognition rates.
It effectively improves the accuracy of under-display fingerprint recognition and reduces interference from the medium on the fingerprint image.
Smart Images

Figure CN115050058B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronics, and in particular to a fingerprint identification method and an electronic device. BACKGROUND
[0002] With the development of science and technology, the application of under-screen fingerprint identification technology is becoming more and more widespread.
[0003] At present, an electronic device generally collects a fingerprint image when a finger touches a screen through a fingerprint module installed under the touch screen, and then matches the fingerprint image with a pre-stored fingerprint image. If the similarity between the fingerprint image and the pre-stored fingerprint image is greater than a preset value, the verification is passed, and the electronic device performs a corresponding unlocking operation or decryption operation.
[0004] However, when the electronic device collects the fingerprint image, there is usually a medium (for example, a protective film attached to the screen) between the finger and the touch screen. Such a medium will interfere with the collected fingerprint image data, thereby reducing the recognition rate of the under-screen fingerprint and resulting in a low matching accuracy of the fingerprint image. SUMMARY
[0005] The present application provides a fingerprint identification method and an electronic device, which realizes that the electronic device detects the presence of a medium between the finger and the touch screen, processes the collected fingerprint image according to a predetermined algorithm to reduce the interference of the medium with the recognition of the fingerprint image by the electronic device, thereby effectively improving the recognition rate of the under-screen fingerprint.
[0006] In a first aspect, the present application provides a fingerprint identification method applied to an electronic device, wherein the electronic device comprises a fingerprint sensor; the method comprises: the electronic device collects a first fingerprint image; when it is judged according to the first fingerprint image that there is a medium on the display screen of the electronic device, the electronic device processes the first fingerprint image through a first image enhancement model to obtain a second fingerprint image; wherein the number of feature points of the second fingerprint image is greater than the number of feature points of the first fingerprint image; the electronic device calculates a feature value of the second fingerprint image, and when the similarity between the feature value of the second fingerprint image and a feature value of a preset fingerprint image is greater than a first preset value, the electronic device confirms that the fingerprint unlocking or decryption is successful.
[0007] In this way, the electronic device detects the presence of a medium between the finger and the touch screen, processes the collected fingerprint image according to a predetermined algorithm to reduce the interference of the medium with the recognition of the fingerprint image by the electronic device, thereby effectively improving the recognition rate of the under-screen fingerprint.
[0008] With reference to the first aspect, in a possible implementation manner, before the electronic device determines that the medium exists on the display screen of the electronic device according to the first fingerprint image, the method further includes: the electronic device calculates a pixel number of the first fingerprint image; and the electronic device determines that the medium exists on the display screen of the electronic device according to the first fingerprint image, specifically including: the electronic device determines that the pixel number of the first fingerprint image in a first preset area is less than a preset pixel number, and then the electronic device determines that the medium exists on the display screen of the electronic device; wherein the pixel number of the first fingerprint image in the first preset area is a part of the pixel number of the first fingerprint image, and the first preset area is located at any position in a fingerprint image receiving area of the fingerprint sensor.
[0009] With reference to the first aspect, in a possible implementation manner, before the electronic device collects the first fingerprint image, the method further includes: the electronic device obtains training data, the training data including a third fingerprint image and a fourth fingerprint image; wherein the third fingerprint image is a fingerprint image collected when the screen of the electronic device has the medium, and the fourth fingerprint image is a fingerprint image collected when the screen of the electronic device does not have the medium; the electronic device takes the third fingerprint image as an input of the first image enhancement model, processes the third fingerprint image through the first image enhancement model to obtain a fifth fingerprint image; the electronic device calculates a similarity between the fifth fingerprint image and the fourth fingerprint image; when the similarity between the fifth fingerprint image and the fourth fingerprint image is greater than a second preset value, the electronic device modifies parameters of the first image enhancement model, and then takes the third fingerprint image as an input of the first image enhancement model, and the first image enhancement model outputs a sixth fingerprint image, until the similarity between the sixth fingerprint image output by the first image enhancement model and the fourth fingerprint image is less than the second preset value.
[0010] With reference to the first aspect, in a possible implementation manner, before the electronic device collects the first fingerprint image, the method further includes: the electronic device collects a sixth fingerprint image; and the electronic device calculates a feature value of the sixth fingerprint image, the feature value of the sixth fingerprint image being the feature value of the preset fingerprint image.
[0011] With reference to the first aspect, in a possible implementation manner, before the electronic device collects the first fingerprint image, the method further includes: the electronic device collects a seventh fingerprint image, and determines a first light spot area formed by the seventh fingerprint image in the fingerprint image receiving area of the fingerprint sensor; after the electronic device collects the first fingerprint image, the method further includes: the electronic device calculates a second light spot area formed by the first fingerprint image in the fingerprint image receiving area of the fingerprint sensor; and the electronic device determines that the medium exists on the display screen of the electronic device according to the first fingerprint image, specifically including: when the second light spot area is greater than the first light spot area, the electronic device determines that the medium exists on the screen of the electronic device.
[0012] With reference to the first aspect, in a possible implementation manner, the method further includes: when the electronic device determines that no medium exists on the display screen of the electronic device according to the first fingerprint image, if the electronic device determines that the pixel quantity of the first fingerprint image is less than a second preset pixel quantity, the electronic device processes the first fingerprint image according to any one of the following image enhancement algorithms to obtain a second fingerprint image; and the image enhancement algorithms include: gray scale transformation, linear transformation, and edge sharpening.
[0013] With reference to the first aspect, in a possible implementation manner, the method further includes: when the electronic device determines that no medium exists on the display screen of the electronic device according to the first fingerprint image, if the electronic device determines that the pixel quantity of the first fingerprint image is not less than a second preset pixel quantity, the electronic device extracts features of the first fingerprint image, and calculates a feature value of the first fingerprint image; and if the feature value of the first fingerprint image is greater than the first preset value than the preset fingerprint image feature value, the electronic device confirms that the fingerprint unlocking or decryption is successful.
[0014] In a second aspect, the present application provides an electronic device, characterized in that the electronic device includes one or more processors, one or more memories, and a fingerprint sensor; the one or more memories are coupled with the one or more processors, and the one or more memories are configured to store computer program codes, the computer program codes include computer instructions, when the one or more processors execute the computer instructions, the electronic device executes the fingerprint identification method in any one of the possible implementation manners of the first aspect.
[0015] In a third aspect, the present application provides a readable storage medium, configured to store computer instructions, when the computer instructions run on an electronic device, the electronic device executes the fingerprint identification method in any one of the possible implementation manners of the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 A structural schematic diagram of an electronic device 100 provided for an embodiment of the present application;
[0017] Figure 2 A software structural block diagram of an electronic device 100 provided for an embodiment of the present application;
[0018] Figure 3 A process of an under-screen fingerprint identification method provided for an embodiment of the present application;
[0019] Figure 4 A schematic diagram of a fingerprint identification device module in an electronic device provided for an embodiment of the present application;
[0020] Figures 5-7 A principle schematic diagram of a group of fingerprint sensors collecting a user's fingerprint image provided for an embodiment of the present application;
[0021] Figure 8 A working process of each hardware of fingerprint identification in an electronic device provided for an embodiment of the present application;
[0022] Figure 9 A schematic diagram of a screen 402 of an electronic device 100 without medium (for example, tempered film) provided for an embodiment of the present application;
[0023] Figure 10 A schematic diagram of an optical sensing array of a fingerprint sensor 404 provided for an embodiment of the present application;
[0024] Figure 11 A schematic diagram of a light spot formed when a light signal reaches an optical sensing array of a fingerprint sensor 404 when a screen 402 of an electronic device has no medium (for example, tempered film) provided for an embodiment of the present application;
[0025] Figure 12 A schematic diagram of a light spot formed when a light signal reaches an optical sensing array of a fingerprint sensor 404 when a screen 402 of an electronic device has medium (for example, tempered film) provided for an embodiment of the present application;
[0026] Figure 13 A schematic diagram of a calibration area on an optical sensing array provided for an embodiment of the present application;
[0027] Figure 14 A structural schematic diagram of a cyclegan model provided for an embodiment of the present application;
[0028] Figure 15 A flowchart of another fingerprint unlocking method provided for an embodiment of the present application. DETAILED DESCRIPTION
[0029] The technical solutions in the embodiments of the present application will be clearly and fully described below with reference to the drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B; the "and / or" in the text only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0030] Hereinafter, the terms "first" and "second" are only used for description purposes, and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" is two or more than two. The term "user interface (UI)" in the specification and claims and drawings of the present application is a medium interface for interaction and information exchange between an application or an operating system and a user, which realizes the conversion between the internal form of information and the form that the user can accept. The user interface of the application is the source code written in a specific computer language such as java, extensible markup language (XML), etc. The interface source code is parsed, rendered on the terminal device, and finally presented as content that the user can recognize, such as pictures, text, button controls, etc. The control (widget) is the basic element of the user interface, and the typical controls include toolbar, menu bar, text box, button, scrollbar, picture and text. The properties and content of the controls in the interface are defined by tags or nodes, such as XML <textview> 、 <imgview> 、 <videoview>The interface is defined by nodes that specify the controls contained in the interface. One node corresponds to one control or property in the interface, and the nodes are parsed and rendered to present the content visible to the user. In addition, many applications, such as hybrid applications, also contain web pages in the interface. A web page, also referred to as a page, can be understood as a special control embedded in the interface of an application. The web page is a source code written in a specific computer language, such as hyper text markup language (HTML), cascading style sheets (CSS), JavaScript (JS), etc. The web page source code can be loaded and displayed by a browser or a web page display component similar to the function of a browser to present content recognizable to the user. The specific content contained in the web page is also defined by tags or nodes in the web page source code, such as HTML defines a page by 、 、 <video> 、 <canvas>to define the elements and attributes of a web page.
[0031] A common form of user interface is a graphic user interface (GUI), which refers to a user interface that displays in a graphical manner. It can be an icon, a window, a control, etc. interface element displayed in the display screen of an electronic device, wherein the control can include an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, and the like visible interface elements.
[0032] Figure 1 A structural schematic diagram of the electronic device 100 is shown.
[0033] The embodiments will be described below with the electronic device 100 as an example of a mobile phone. It should be understood that, Figure 1 The electronic device 100 shown is only an example, and the electronic device 100 can have more or fewer components than those shown in Figure 1 the components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0034] The electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0035] It can be understood that the structural schematic of the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than those shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0036] The processor 110 can include one or more processing units. For example, the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated into one or more processors.
[0037] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.
[0038] The memory can also be provided in the processor 110, for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that have just been used or are repeatedly used by the processor 110. If the processor 110 needs to use the instructions or data again, it can directly call from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.
[0039] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0040] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 can include multiple sets of I2C buses. The processor 110 can be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example, the processor 110 can be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface, and realize the touch function of the electronic device 100.
[0041] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple sets of I2S buses. The processor 110 can be coupled to the audio module 170 through the I2S bus, and realize the communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can deliver audio signals to the wireless communication module 160 through the I2S interface, and realize the function of answering the phone through the Bluetooth headset.
[0042] The PCM interface can also be used for audio communication, which samples, quantizes and encodes analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled through the PCM bus interface. In some embodiments, the audio module 170 can also deliver audio signals to the wireless communication module 160 through the PCM interface, and realize the function of answering the phone through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0043] The UART interface is a universal serial bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is usually used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface to realize the function of playing music through the Bluetooth headset.
[0044] The MIPI interface can be used to connect the processor 110 and peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through the CSI interface to realize the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to realize the display function of the electronic device 100.
[0045] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 and the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0046] The USB interface 130 is an interface that meets the USB standard specification, which can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect a headset to play audio through the headset. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0047] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection methods or combinations of multiple interface connection methods in the above embodiments.
[0048] The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some embodiments with wired charging, the charging management module 140 can receive charging input from a wired charger through the USB interface 130. In some embodiments with wireless charging, the charging management module 140 can receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 can charge the battery 142 and power the electronic device through the power management module 141.
[0049] The power management module 141 is configured to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160, etc. The power management module 141 can also be configured to monitor parameters such as battery capacity, battery cycle count, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be disposed in the same device.
[0050] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.
[0051] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in combination with a tuning switch.
[0052] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transfer the same to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and radiate the same as electromagnetic waves through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the same device as at least part of the modules of the processor 110.
[0053] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the microphone 170B, etc.), or displays an image or a video through the display screen 194. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110, and disposed in the same device as the mobile communication module 150 or other functional modules.
[0054] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and radiate it as an electromagnetic wave via the antenna 2.
[0055] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidu navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).
[0056] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs, which execute program instructions to generate or change display information.
[0057] The display screen 194 is configured to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diodes (QLED), or the like. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.
[0058] The electronic device 100 can implement the photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor.
[0059] The ISP is configured to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also optimize the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be disposed in the camera 193.
[0060] The camera 193 is configured to capture still images or videos. An object generates an optical image through a lens and projects it onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the electronic device 100 can include one or N cameras 193, where N is a positive integer greater than 1.
[0061] The digital signal processor is used to process digital signals, in addition to being able to process digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
[0062] The video codec is used to compress or decompress digital video. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.
[0063] The NPU is a neural-network (NN) calculation processor, which can quickly process input information by drawing on the structure of a biological neural network, such as drawing on the transmission mode between human brain neurons, and can also constantly self-learn. Through the NPU, the electronic device 100 can realize intelligent cognition applications such as image recognition, face recognition, voice recognition, text understanding, etc.
[0064] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to realize data storage functions. For example, music, video, etc. Files are saved in the external memory card.
[0065] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various function applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0066] The electronic device 100 can realize audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. For example, music playing, recording, etc.
[0067] The audio module 170 is configured to convert digital audio information into an analog audio signal output, and to convert an analog audio input into a digital audio signal. The audio module 170 can also be configured to encode and decode audio signals. In some embodiments, the audio module 170 can be disposed in the processor 110, or some of the functions of the audio module 170 can be disposed in the processor 110.
[0068] The speaker 170A, also referred to as a "loudspeaker", is configured to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0069] The receiver 170B, also referred to as a "earpiece", is configured to convert an audio electrical signal into a sound signal. When the electronic device 100 receives a call or a voice message, the user can listen to the voice by holding the receiver 170B close to the ear.
[0070] The microphone 170C, also referred to as a "microphone", "transducer", is configured to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can speak into the microphone 170C by holding the mouth close to the microphone 170C, and input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, in addition to collecting sound signals, the noise reduction function can also be realized. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C, in addition to collecting sound signals, noise reduction, it can also identify the source of the sound, realize the function of directional recording, etc.
[0071] The earphone interface 170D is configured to connect a wired earphone. The earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0072] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0073] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shake of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 100 by moving in the opposite direction, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing game scenarios.
[0074] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.
[0075] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic flip unlocking can be set.
[0076] The 180E accelerometer can detect the magnitude of acceleration of electronic device 100 in various directions (typically three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic devices and applied to applications such as screen orientation switching and pedometers.
[0077] Distance sensor 180F is configured to measure distance. Electronic device 100 can measure distance by infrared or laser. In some embodiments, electronic device 100 can utilize distance sensor 180F to measure distance for fast focusing when taking a picture.
[0078] Proximity light sensor 180G can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode can be an infrared light emitting diode. Electronic device 100 emits infrared light outwardly through the light emitting diode. Electronic device 100 detects infrared reflected light from nearby objects using the photodiode. When sufficient reflected light is detected, electronic device 100 can determine that there is an object near electronic device 100. When insufficient reflected light is detected, electronic device 100 can determine that there is no object near electronic device 100. Electronic device 100 can utilize proximity light sensor 180G to detect that a user is holding electronic device 100 close to the ear for a phone call, so as to automatically turn off the screen to save power. Proximity light sensor 180G can also be used for automatic unlocking and locking of the screen in a holster mode or a pocket mode.
[0079] Ambient light sensor 180L is configured to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display 194 according to the sensed ambient light brightness. Ambient light sensor 180L can also be used to automatically adjust white balance when taking a picture. Ambient light sensor 180L can also cooperate with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touch.
[0080] Fingerprint sensor 180H is configured to collect a fingerprint. Electronic device 100 can utilize the collected fingerprint characteristics to implement fingerprint unlocking, access application lock, fingerprint photographing, fingerprint answering a call, and the like.
[0081] Temperature sensor 180J is configured to detect temperature. In some embodiments, electronic device 100 utilizes the temperature detected by temperature sensor 180J to implement a temperature handling strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 implements a performance reduction of a processor located near temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, electronic device 100 heats battery 142 to avoid abnormal shutdown of electronic device 100 caused by low temperature. In other embodiments, when the temperature is lower than yet another threshold, electronic device 100 implements a boost of output voltage of battery 142 to avoid abnormal shutdown caused by low temperature.
[0082] Touch sensor 180K, also referred to as "touch panel". Touch sensor 180K can be disposed on display screen 194, and touch sensor 180K and display screen 194 together form a touch screen, also referred to as "touch panel". Touch sensor 180K is configured to detect touch operations applied to or near the touch sensor 180K. The touch sensor 180K can transmit the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K can also be disposed on the surface of electronic device 100, in a position different from that of display screen 194.
[0083] Bone conduction sensor 180M can obtain vibration signals. In some embodiments, bone conduction sensor 180M can obtain vibration signals of the human body's vocal vibration bone block. Bone conduction sensor 180M can also contact the human body's pulse to receive blood pressure pulsation signals. In some embodiments, bone conduction sensor 180M can also be disposed in a headset to form a bone conduction headset. Audio module 170 can analyze voice signals based on the vibration signals of the vocal vibration bone block obtained by bone conduction sensor 180M to realize voice functions. The application processor can analyze heart rate information based on the blood pressure pulsation signals obtained by bone conduction sensor 180M to realize heart rate detection functions.
[0084] Keys 190 include power on / off keys, volume keys, and the like. Keys 190 can be mechanical keys. They can also be touch keys. Electronic device 100 can receive key input and generate key signal input related to user settings and function control of electronic device 100.
[0085] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts and also for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, and the like) can correspond to different vibration feedback effects. Touch operations applied to different regions of display screen 194 can also correspond to different vibration feedback effects. Different application scenarios (such as time reminders, received messages, alarms, games, and the like) can also correspond to different vibration feedback effects. Touch vibration feedback effects can also be customizable.
[0086] Indicator 192 can be an indicator light, which can be used to indicate charging status, power changes, and also to indicate messages, missed calls, notifications, and the like.
[0087] The SIM card interface 195 is configured to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by being inserted into or pulled out of the SIM card interface 195. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than one. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195. The multiple cards can be of the same type or of different types. The SIM card interface 195 can be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 can interact with a network through the SIM card to enable voice calls, data communication, and the like. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be disconnected from the electronic device 100.
[0088] The software system of the electronic device 100 can use a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. Embodiments of the present disclosure exemplarily illustrate the software structure of the electronic device 100 using a layered architecture of an Android system.
[0089] Figure 2 is a software structure block diagram of the electronic device 100 according to an embodiment of the present disclosure.
[0090] The layered architecture divides software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Android runtime and system library, and a kernel layer.
[0091] The application layer can include a series of application packages.
[0092] As shown in Figure 2 , the application packages can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, and the like.
[0093] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications of the application layer. The application framework layer includes a number of pre-defined functions.
[0094] As shown in Figure 2 , the application framework layer can include a window manager, a content provider, a view system, a fingerprint API, a phone manager, a resource manager, a notification manager, and the like.
[0095] The window manager is used to manage windows programs. The window manager can acquire the display screen size, determine whether there is a status bar, lock the screen, and intercept the screen, etc.
[0096] The content provider is used to store and acquire data, and make the data accessible to the application program. The data can include video, image, audio, dialed and received phone, browsing history and bookmark, phone book, etc.
[0097] The view system includes visual controls, such as a control for displaying text, a control for displaying pictures, etc. The view system can be used to build an application program. A display interface can be composed of one or more views. For example, a display interface including a short message notification icon can include a view for displaying text and a view for displaying pictures.
[0098] The phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call state (including call connection, call hang-up, etc.).
[0099] The resource manager provides various resources for the application program, such as localized strings, icons, pictures, layout files, video files, etc.
[0100] The notification manager makes the application program display notification information in the status bar, which can be used to convey a type of message that can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform the completion of downloading, message reminders, etc. The notification manager can also be a notification in the form of a chart or a scroll bar text appearing in the top status bar of the system, such as a notification of an application program running in the background, and can also be a notification in the form of a dialogue window appearing on the screen. For example, prompting text information in the status bar, issuing a prompt sound, the electronic device vibrating, the indicator light flashing, etc.
[0101] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0102] The core library contains two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
[0103] The application program layer and the application program framework layer run in the virtual machine. The virtual machine executes the java file of the application program layer and the application program framework layer into a binary file. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection, etc.
[0104] The system library can include a plurality of functional modules. For example, a surface manager, media libraries, a fingerprint HAL, a window manager service (WMS), a 3D graphics processing library (e.g., OpenGL ES), a 2D graphics engine (e.g., SGL), and the like.
[0105] The surface manager is used to manage the display subsystem and provides a plurality of applications with fusion of 2D and 3D layers.
[0106] The media libraries support a plurality of commonly used audio, video format playback and recording, and static image files. The media libraries can support a plurality of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, and the like.
[0107] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, and the like.
[0108] The 2D graphics engine is a drawing engine for 2D drawing.
[0109] The kernel layer is a layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, and a sensor driver.
[0110] The following illustrates the working flow of the software and hardware of the electronic device 100 in connection with a fingerprint unlocking application scenario.
[0111] First, the electronic device 100 displays preset content (for example, an identifier of a clock and a date) always on display (AOD) on the display screen of the electronic device 100 in a lock screen state. The electronic device 100 receives and responds to a user's operation of touching a touch panel, and a corresponding hardware interrupt (for example, a click event) is sent to a fingerprint HAL in a system library. The fingerprint HAL determines whether a coordinate point of the click event is located in a fingerprint collection area. If the coordinate point of the click event is located in the fingerprint collection area, the electronic device 100 sends a fingerprint unlocking event to a fingerprint API in an application framework layer. The fingerprint API determines whether a feature of a fingerprint image collected by the electronic device 100 is similar to a feature of a preset fingerprint image by more than a preset value. If the feature of the fingerprint image is similar to the feature of the preset fingerprint image by more than the preset value, the electronic device 100 triggers a power driver in a kernel layer to start working (for example, to light up a screen). In response to the power driver in the kernel layer starting to work (for example, to light up the screen), a window management service in the system library starts to draw a window, that is, the display screen of the electronic device 100 displays which user interface. Exemplarily, the user interface can be a home interface or a user interface of an application. After the electronic device 100 is successfully fingerprint-unlocked or decrypted, the power driver in the kernel layer and the window management service in the system library always work. The power driver in the kernel layer continuously discharges to light up the screen, and the window management service in the system library continuously draws the window. Because the electronic device 100 can accept a user's operation, the content displayed on the display screen of the electronic device 100 changes constantly, and thus the window management service needs to continuously draw the window according to the user's operation.
[0112] As shown in Figure 3 , Figure 3 a process of a method for under-screen fingerprint recognition is shown.
[0113] S301, the electronic device collects a fingerprint image.
[0114] The user places a finger on a fingerprint collection area of the electronic device, and the electronic device collects a fingerprint image of the user.
[0115] Specifically, the fingerprint sensor converts a light signal into an electrical signal through a photosensitive signal of the user's finger, and identifies the fingerprint image of the user according to the electrical signal.
[0116] S302, the electronic device obtains a fingerprint feature value according to the fingerprint image of the user.
[0117] The electronic device obtains a fingerprint feature point according to the fingerprint image of the user, and calculates a feature value of each fingerprint feature point.
[0118] S303, the electronic device compares the similarity of the fingerprint feature value and a preset fingerprint feature value.
[0119] Before the electronic device identifies the fingerprint, the fingerprint information of the user is collected and the characteristic value of the fingerprint image is extracted as a preset fingerprint characteristic value.
[0120] When the user uses the electronic device and needs to unlock or decrypt through the fingerprint, the electronic device compares the fingerprint characteristic value with the preset fingerprint characteristic value, that is, obtains the similarity of the fingerprint characteristic value and the preset fingerprint characteristic value.
[0121] In a possible implementation, the electronic device obtains the similarity of the fingerprint characteristic value and the preset fingerprint characteristic value, that is, calculates the Euclidean distance D1 of the fingerprint characteristic value and the preset fingerprint characteristic value.
[0122] S304, the electronic device judges whether the similarity of the fingerprint characteristic value and the preset fingerprint characteristic value is greater than a preset value, and the fingerprint recognition is successful
[0123] The electronic device judges whether the similarity of the fingerprint characteristic value and the preset fingerprint characteristic value is greater than a preset value, and the fingerprint recognition is successful, and the electronic device will perform a corresponding unlocking operation or decryption operation.
[0124] In a possible implementation, the electronic device calculates the Euclidean distance D1 of the fingerprint characteristic value and the preset fingerprint characteristic value, and the Euclidean distance D1 is less than a preset Euclidean distance D, and the fingerprint recognition is successful, and the electronic device will perform a corresponding unlocking operation or decryption operation.
[0125] However, when the electronic device (for example, a mobile phone) is a full screen, in order to prevent the screen from being broken, a layer of tempered film is generally pasted on the full screen. After the tempered film is pasted on the full screen, the fingerprint image of the user identified by the fingerprint sensor will not be clear, which reduces the success rate of unlocking or decryption of the electronic device and affects the user experience.
[0126] The following embodiments of the present application provide a fingerprint identification method, which realizes that the electronic device detects that there is a medium between the finger and the touch screen, processes the collected fingerprint image according to a predetermined algorithm to reduce the interference of the medium on the identification of the fingerprint image by the electronic device, thereby effectively improving the identification rate of the under-screen fingerprint.
[0127] As shown in Figure 4 , it is a schematic diagram of a fingerprint identification device module in an electronic device. Figure 4
[0128] The fingerprint identification device module includes a medium 401, a screen 402, a convex lens 403, a fingerprint sensor 404, and a flexible circuit board (FPC) 405.
[0129] The medium 401 can be a tempered film, and the medium 401 is used to protect the screen 402 from being broken.
[0130] The convex lens 403 collects light signals. A user places a finger on a fingerprint collection area of the electronic device, and the finger presses the screen 402. The screen 402 emits light and illuminates the finger. The finger receives the light signals and reflects the light signals to the fingerprint sensor 404. The fingerprint collection device module further includes a holder for fixing the convex lens 403.
[0131] The fingerprint sensor 404 can include an optical sensing array having a plurality of optical sensing units (or light-sensitive pixels) for receiving a detection light signal multiplied by a target object above the screen 402 and converting the light signal into an electrical signal. The detection light signal can be a reflected light signal formed by reflection of the target object (for example, a finger) above the screen 402 irradiated by a detection light. The detection light can be a light signal emitted by a specific light-emitting pixel of the screen 402 to the target object or a light signal emitted by an external power supply independent of the screen 402 to the target object. Moreover, when the light signal reaches the optical sensing array of the fingerprint sensor 404, the light signal forms a light spot on the optical sensing array of the fingerprint sensor 404. The fingerprint sensor 404 further converts the light spot on the optical sensing array into an electrical signal.
[0132] In some embodiments, the fingerprint sensor 404 can further include a signal processing chip. That is, the fingerprint sensor 404 transmits the electrical signal to the signal processing chip in the fingerprint sensor 404. The signal processing chip receives and processes the electrical signal to obtain a collected fingerprint image.
[0133] In other embodiments, the signal processing chip can be independent of the fingerprint sensor 404. That is, the fingerprint sensor 404 transmits the electrical signal to the signal processing chip independent of the fingerprint sensor 404. The signal processing chip receives and processes the electrical signal to obtain a collected fingerprint image.
[0134] The form of the signal processing chip is not limited.
[0135] The flexible printed circuit board (FPC) 405 is used to transmit a fingerprint image of a user's finger recognized by the fingerprint sensor 404 to a processor of the electronic device. Moreover, the flexible printed circuit board (FPC) 405 is also used to power the fingerprint sensor 404.
[0136] The electronic device is further provided with a reinforcing steel sheet for fixing the fingerprint collection device module to ensure reliability.
[0137] Figures 5-7 A schematic diagram showing the principle of collecting a fingerprint image of a user by the fingerprint sensor 404 is shown.
[0138] The imaging principle of the convex lens is:
[0139] As shown in Figure 5 , the focal length of the convex lens is x, when the object distance p is greater than 2 times the focal length x, then the image distance q is between 1 times the focal length and 2 times the focal length on the other side of the convex lens from the convex lens, and an inverted, reduced real image is formed. At this time, the image distance q is less than the object distance p, the image is smaller than the object, and the object and the image are on the opposite side of the convex lens.
[0140] As shown in Figure 6 , the focal length of the convex lens is x, when the object distance p is equal to 2 times the focal length x, then the image distance q is equal to 2 times the focal length on the other side of the convex lens from the convex lens, and an inverted, equal real image is formed, the image is equal to the object, and the object and the image are on the opposite side of the convex lens.
[0141] As shown in Figure 7 , the focal length of the convex lens is x, when the object distance p is greater than 1 times the focal length x and less than 2 times the focal length x, then the image distance q is greater than 2 times the focal length on the other side of the convex lens from the convex lens, and an inverted, enlarged real image is formed, the image is larger than the object, and the object and the image are on the opposite side of the convex lens.
[0142] That is, when the object distance is greater than 1 times the focal length, as the object distance increases, the image distance will become smaller and smaller, and the image will become smaller and smaller.
[0143] The imaging principle of the fingerprint image is to use the imaging principle of the convex lens, that is, the distance between the convex lens (lens) 403 and the screen of the electronic device is set to be greater than 2 times the focal length of the convex lens (lens) 403. The distance between the fingerprint sensor 404 and the screen of the electronic device is set to be greater than 1 times the focal length of the convex lens (lens) 403 and less than 2 times the focal length of the convex lens (lens) 403. In this way, the fingerprint image obtained by the fingerprint sensor 404 is an inverted and reduced image of the user's fingerprint image.
[0144] It can be understood that the electronic device can also use other imaging principles of the convex lens to collect the user's fingerprint image, which will not be described herein.
[0145] Figure 8 Exemplary working processes of various hardware for fingerprint recognition in the electronic device are shown.
[0146] First, the electronic device detects that a user's finger is pressed on a fingerprint collection area on a touch panel integrated circuit (TPIC), the touch panel integrated circuit (TPIC) triggers an interrupt signal to a host board (HOST), the host board (HOST) receives the interrupt signal from the touch panel integrated circuit (TPIC), and notifies a display panel driving chip (DDIC) through a MIPI protocol to highlight a light spot of a liquid crystal display (LCD) in the fingerprint collection area, that is, to display a fingerprint guide pattern in the fingerprint collection area. The fingerprint guide pattern can be any color such as red, cyan, or white, and can be any shape such as a circle or an ellipse. The user can know which area to collect a fingerprint pattern by observing the fingerprint guide pattern.
[0147] Subsequently, the electronic device sends a reset signal to a fingerprint sensor (fingerprint sensor) through a SPI protocol every preset time through the host board (HOST), the fingerprint sensor (fingerprint sensor) receives the reset signal and starts to collect a fingerprint image.
[0148] The fingerprint sensor (fingerprint sensor) collects a fingerprint image of the user through a received light signal. The light signal received by the fingerprint sensor (fingerprint sensor) mainly consists of two parts: leakage light and medium light. Specifically, when the user's finger is pressed on the screen, the screen is lit to emit screen light upward, but there is also part of the light spot that leaks downward, and there is also reflected light at the interface between the layers in the screen. These two parts of light are called leakage light. The screen light reflected by the user's finger is called medium light.
[0149] After the fingerprint sensor (fingerprint sensor) collects the fingerprint image, the fingerprint sensor (fingerprint sensor) extracts feature points of the fingerprint image and calculates feature values of the feature points of the fingerprint image, compares the feature values of the fingerprint image with preset fingerprint feature values, and when the feature values of the fingerprint image match the preset fingerprint feature values, the fingerprint sensor (fingerprint sensor) sends an INT signal to the host board (HOST) through a SPI protocol, and the host board (HOST) receives the INT signal and performs a fingerprint unlocking operation. In response to the successful fingerprint unlocking operation, the electronic device displays a user interface (for example, a main interface of the electronic device) on the liquid crystal display (LCD) through the display panel driving chip (DDIC).
[0150] Alternatively, after the fingerprint sensor acquires a fingerprint image, it extracts the feature points of the fingerprint image and calculates the feature values of the feature points. The feature values of the fingerprint image are then compared with preset fingerprint feature values. If the feature values of the fingerprint image do not match the preset fingerprint feature values, the fingerprint sensor sends an INT signal to the motherboard (HOST) via the SPI protocol. After receiving the INT signal, the motherboard (HOST) can output a prompt such as "fingerprint unlocking failed" or vibration.
[0151] Next, we will explain how electronic devices determine whether there is a medium (such as a tempered glass screen protector) on their screens.
[0152] Electronic devices can determine whether there is a medium (such as a tempered glass screen protector) on their screens using any of the following methods.
[0153] Method 1: The electronic device determines whether the real-time light spot size collected by the fingerprint sensor 404 is consistent with the preset light spot size; if the real-time light spot size collected by the fingerprint sensor 404 is larger than the preset light spot size, then there is a medium (such as tempered glass) on the screen of the electronic device.
[0154] like Figure 9 As shown, Figure 9 An exemplary schematic diagram shows the screen 402 of electronic device 100 without a medium (e.g., tempered glass film). For descriptions of the lens 403, fingerprint sensor 404, and flexible printed circuit board (FPC) 405, please refer to... Figure 4 The embodiments shown will not be described again in this application.
[0155] Figure 10 A schematic diagram of the optical sensing array of the fingerprint sensor 404 is shown as an example. The optical sensing array of the fingerprint sensor 404 can be represented by an M*N array. The M*N of the optical sensing array of the fingerprint sensor 404 can be the fingerprint image receiving area of the fingerprint sensor 404.
[0156] like Figure 11 As shown, when the screen 402 has no medium (such as a tempered glass film), when the light signal reaches the optical sensing array of the fingerprint sensor 404, the light signal will form a light spot on the optical sensing array of the fingerprint sensor 404, which can be represented by the array P*Q. The shape of the light spot can be circular, rectangular or irregular, and this application does not limit it.
[0157] It is understandable that when the screen 402 has no medium (such as tempered glass), the size of the light spot P*Q can be the preset light spot size of the electronic device.
[0158] like Figure 12 As shown, Figure 12 This is a schematic diagram of the light spot formed when the light signal reaches the optical sensing array of the fingerprint sensor 404, provided that the screen 402 of the electronic device has a medium (such as a tempered glass film).
[0159] Depend on Figure 4 It is known that when the detection light signal is reflected from the target object (e.g., a finger) and passes through the medium 401, screen 402, and other devices to reach the optical sensing array of the fingerprint sensor 404, the transmission path of the detection light signal to the optical sensing array of the fingerprint sensor 404 increases. Therefore, the size of the light spot formed when the detection light signal reaches the optical sensing array of the fingerprint sensor 404 will increase. Figure 12 As shown, since there is a medium 401 on the screen 402, the light spot formed when the detection light signal reaches the optical sensing array of the fingerprint sensor 404 can be represented by the array S*T.
[0160] Depend on Figure 12 and Figure 11 It is understood that because a medium 401 (e.g., tempered glass) is present on the screen 402, the size of the light spot formed when the detection light signal reaches the optical sensing array of the fingerprint sensor 404 will increase. The electronic device can determine whether there is a medium (e.g., tempered glass) on its screen based on the size of the real-time light spot formed on the optical sensing array of the fingerprint sensor 404. When the size of the real-time light spot formed on the optical sensing array of the fingerprint sensor 404 is larger than a preset light spot size, then there is a medium (e.g., tempered glass) on the screen of the electronic device.
[0161] Method 2: The electronic device determines whether the real-time pixel count within the first preset area of the fingerprint sensor 404 matches the preset pixel count. If the real-time pixel count within the first preset area of the fingerprint sensor 404 is less than the preset pixel count, then there is a medium (e.g., tempered glass) on the screen of the electronic device. The first preset area is located within the fingerprint image receiving area of the fingerprint sensor 404.
[0162] When the screen 402 has no medium (such as a tempered glass film), when the light signal reaches the optical sensing array of the fingerprint sensor 404, the light signal will form a light spot on the optical sensing array of the fingerprint sensor 404, which can be represented by the array P*Q. Figure 13 As shown, a first preset region within the area containing the light spot array P*Q is selected as the calibration region, and the number of pixels within the first preset region is used as the calibration value. For example, when the screen 402 has no medium (e.g., tempered glass film), the number of pixels in the first preset region is R, and the number R is used as the preset number of pixels in the first preset region.
[0163] After a medium 401 (e.g., tempered glass) is applied to the screen 402, the size of the light spot formed when the detection light signal reaches the optical sensing array of the fingerprint sensor 404 will increase. Because the size of the light spot formed on the optical sensing array of the fingerprint sensor 404 increases, the number of pixels in the first preset area on the optical sensing array of the fingerprint sensor 404 is less than a preset number.
[0164] When the electronic device determines that the number of pixels in the first preset area on the optical sensing array of the fingerprint sensor 404 is less than a preset number, the electronic device determines that there is a medium 401 (e.g., tempered glass film) on the screen 402.
[0165] It should be noted that this application does not limit the size and position of the first preset region, which can be located at any position in the region where the spot array P*Q is located.
[0166] The following describes how to improve the accuracy of fingerprint recognition after an electronic device detects the presence of a medium (such as a tempered glass screen protector) on its screen.
[0167] Electronic device 100 may improve the accuracy of fingerprint recognition by any of the following methods.
[0168] Method 1:
[0169] When there is no medium (such as tempered glass) on the screen of an electronic device, such as Figure 11 As shown, when the light signal reaches the optical sensing array of the fingerprint sensor 404, the light signal will form a light spot on the optical sensing array of the fingerprint sensor 404, which can be represented by the area where the array P*Q is located.
[0170] During fingerprint feature point pre-collection, the electronic device will extract feature points in the region where the array P*Q is located. The number of feature points extracted by the electronic device in the region where the array P*Q is located is A. The electronic device calculates the feature values of A feature points and saves the number of feature points A and the feature values of A feature points in the region where the array P*Q is located as the number of calibration feature points and calibration feature values of the fingerprint image during fingerprint recognition.
[0171] Subsequently, when there is no medium (such as tempered glass) on the screen of the electronic device, the electronic device uses the area where array P*Q is located as the preset feature point extraction area. The electronic device will collect feature points of the real-time fingerprint image of the area where array P*Q is located. When the number of feature points in the real-time fingerprint image is greater than or equal to the number of calibration feature points A, the electronic device calculates the feature values corresponding to the feature points in the real-time fingerprint image. When the similarity between the feature values corresponding to the feature points in the real-time fingerprint image and the calibration feature values is greater than a threshold, the electronic device confirms that the fingerprint recognition is successful and will perform an unlocking or decryption operation.
[0172] When there is a medium (e.g., tempered film) on the screen of the electronic device, the size of the light spot formed when the probe light signal reaches the optical sensing array of the fingerprint sensor 404 will expand, as shown in Figure 12 Because of the medium 401 on the screen 402, the light spot formed when the probe light signal reaches the optical sensing array of the fingerprint sensor 404 can be represented by the array S*T. However, the electronic device will still perform feature point extraction in the preset feature point extraction area (the area where the array P*Q is located). However, because the size of the light spot formed when the probe light signal reaches the optical sensing array of the fingerprint sensor 404 expands, the number of feature points of the fingerprint image in the area where the array P*Q is located is less than the calibration feature point number when the electronic device performs feature point extraction in the area where the array P*Q is located. As a result, the fingerprint unlocking or decryption will fail, affecting the user experience.
[0173] Therefore, in order to improve the success rate of fingerprint unlocking or decryption when there is a medium (e.g., tempered film) on the screen of the electronic device, the electronic device will expand the feature point extraction area on the area where the optical sensing array of the fingerprint sensor 404 is located.
[0174] That is, the electronic device takes the area where the real-time light spot formed on the optical sensing array is located as the fingerprint extraction area to perform feature extraction on the real-time fingerprint image. For example, as shown in Figure 12 Figure 12 The array S*T shown in the figure is the area where the real-time light spot is located. The electronic device performs feature point extraction in the area where the array S*T is located, and the number of feature points of the fingerprint image in the area where the array S*T is located is greater than or equal to the calibration feature point number. The electronic device will perform feature extraction on the feature points of the fingerprint image in the area where the array S*T is located, and when the similarity between the feature values corresponding to the feature points of the fingerprint image in the area where the array S*T is located and the calibration feature values is greater than a preset value, the electronic device confirms that the fingerprint unlocking or decryption is successful.
[0175] Method two:
[0176] The electronic device uses the trained first image enhancement model, which can remove the influence of the medium (e.g., tempered film) on the input fingerprint image collected when there is a medium (e.g., tempered film) to obtain a fingerprint image collected when there is no medium (e.g., tempered film). In this way, the electronic device eliminates the influence of the screen of the electronic device when there is a medium (e.g., tempered film) through the first image enhancement model, improves the success rate of fingerprint unlocking, and improves the user experience.
[0177] Next, the process of training the first image enhancement model by the electronic device is introduced.
[0178] First, the electronic device acquires a collected fingerprint image when there is a medium on the screen of the electronic device and a collected fingerprint image when there is no medium on the screen of the electronic device. The electronic device forms a data pair of the collected fingerprint image when there is a medium on the screen of the electronic device and the collected fingerprint image when there is no medium on the screen of the electronic device.
[0179] After that, the electronic device trains the first image enhancement model using the data pair.
[0180] The electronic device inputs the collected fingerprint image when there is a medium on the screen of the electronic device in the data pair to the first image enhancement model, and the first image enhancement model outputs a processed fingerprint image. The electronic device calculates a similarity of the processed fingerprint image and the collected fingerprint image when there is no medium on the screen of the electronic device in the data pair. When the similarity of the processed fingerprint image and the collected fingerprint image when there is no medium on the screen of the electronic device in the data pair is less than a preset value, the electronic device modifies parameter information of a model of the first image enhancement model, and trains the first image enhancement model again using the data pair until the similarity of the processed fingerprint image output by the first image model and the collected fingerprint image when there is no medium on the screen of the electronic device in the data pair is greater than or equal to the preset value, and then the training of the first image enhancement model is completed.
[0181] For example, the first image enhancement model can be a cyclegan model. Figure 14 An exemplary structure diagram of the cyclegan model is shown.
[0182] The cyclegan model is essentially two symmetrical generative adversarial networks (GANs) and constitutes a ring-shaped network. The two generative adversarial networks in the cyclegan model share two generators (i.e., generator G and generator F). The principle of the cyclegan model can be summarized as converting a picture of one type into a picture of another type. For example, there are two sample spaces, X and Y, and the cyclegan model can convert samples in the X space into samples in the Y space. The mapping of the samples in the X space to the samples in the Y space is the generator F. The generator F can convert a picture x in the X space to a picture F(x) in the Y space. For the generated picture F(x), a discriminator in the cyclegan model is used to determine whether it is a real picture, thereby forming an adversarial network. Assuming that this discriminator is Dy, according to the generator F and the discriminator Dy, a gan loss can be calculated as follows:
[0183] L GAN (F,Dy,x,y)=E y~Pdata(y) [logD Y (y)]+E x~Pdata(x) [log(1-D Y (F(x)))]formula (1)
[0184] As shown in equation (1), F represents the generator, Dy represents the discriminator, x represents a real picture, and y represents a picture converted by the generator F from x.
[0185] The loss L is simply GAN (F, Dy, x, y) cannot be trained because the generator F can map all pictures in the X space to the same picture in the Y space, which invalidates the loss.
[0186] Therefore, another mapping G, i.e., the generator G, is assumed. The generator G can convert a picture y in the Y space to a picture G(y) in the X space, and requires F(G(y))≈y and G(F(x))≈x. That is, a picture in the X space can be converted to a picture in the Y space and then converted back to a picture in the X space. In this way, the cyclegan model can be prevented from mapping all pictures in the X space to the same picture in the Y space. According to F(G(y))≈y and G(F(x))≈x, the cycle consistency loss is defined as:
[0187] L cyc (F, G, x, y) = E y~Pdata(x) [||G(F(x))-x||1]+E y~Pdata(y) [||G(F(y))-y||1] equation (2)
[0188] As shown in equation (2), F represents the generator F, G represents the discriminator G, x represents a real picture, and y represents a picture converted by the generator F from x.
[0189] According to the generator G and the discriminator Dx, another gan loss L GAN (G, Dx, x, y) can be calculated.
[0190] Finally, the loss of the cyclegan model is composed of three parts:
[0191] L = L GAN (F, Dy, X, Y) + L GAN (G, Dx, X, Y) + L cyc (F, G, X, Y) equation (3)
[0192] The cyclegan model is trained according to the above process according to the picture x in the X space to convert the picture y in the Y space. Until the loss L of the trained cyclegan model is within a preset range, the training of L is completed. The cyclegan model generates the picture y according to the picture x.
[0193] Exemplarily, the electronic device inputs the collected fingerprint image a of the screen of the electronic device with medium into the cyclegan model, the fingerprint image a is generated into an image F(a) by the generator F, and the electronic device calculates a first loss according to the generator F, the discriminator Dy, the image a and the image F(a), denoted as loss1. Similarly, the electronic device inputs the collected fingerprint image b of the screen of the electronic device without medium into the cyclegan model, the fingerprint image b is generated into an image G(b) by the generator G, and the electronic device calculates a second loss according to the generator G, the discriminator Dx, the image b and the image G(b), denoted as loss2. According to the cycle consistency of the cyclegan model, F(G(b))≈b and G(F(a))≈a, the cycle consistency loss is defined as loss3. In this way, the loss of the cyclegan model = loss1 + loss2 + loss3. For the calculation of loss1, loss2 and loss3, please refer to L GAN (F, Dy, x, y), L GAN (G, Dx, x, y) and L cyc (F, G, x, y), which will not be repeated again. The electronic device trains the cyclegan model with the collected fingerprint image of the screen of the electronic device with medium and the collected fingerprint image of the screen of the electronic device without medium, until the loss of the cyclegan model is within a preset range, then the training of the cyclegan model is completed, that is, the electronic device can remove the influence of the medium on the collected fingerprint image of the screen with medium by the cyclegan model to obtain the collected fingerprint image of the screen without medium.
[0194] As Figure 15 shown, Figure 15 another fingerprint unlocking method flowchart provided by the embodiment of the present application.
[0195] The method comprises:
[0196] S1501, the electronic device collects a first fingerprint image through the fingerprint image receiving area of the fingerprint sensor.
[0197] Figure 10 Exemplarily, the optical sensing array of the fingerprint sensor 404 is schematically shown, and the optical sensing array of the fingerprint sensor 404 can be represented by an array of M*N. It can be understood that the optical sensing array M*N is the fingerprint image receiving area of the fingerprint sensor 404.
[0198] When the user's finger touches the fingerprint collection area on the electronic device, the electronic device triggers the collection of the fingerprint image, and the electronic device collects the user's fingerprint image through the light signal received by the fingerprint image receiving area of the fingerprint sensor. The fingerprint image collected by the fingerprint sensor can also be referred to as the first fingerprint image.
[0199] In some embodiments, after the electronic device collects the first fingerprint image through the fingerprint image receiving area of the fingerprint sensor, the first fingerprint image is preprocessed, which can include noise reduction and other processing to reduce noise or other interference.
[0200] S1502, the electronic device calculates the number of pixels of the first fingerprint image.
[0201] After the electronic device collects the first fingerprint image through the fingerprint image receiving area of the fingerprint sensor, the number of pixels of the first fingerprint image is calculated.
[0202] S1503, the electronic device determines whether the number of real-time pixels in the first preset area is less than the preset number of pixels? The first preset area is located in the fingerprint image receiving area of the fingerprint sensor.
[0203] Before the electronic device is unlocked or decrypted using the fingerprint, when there is no medium (such as tempered film) on the screen of the electronic device, the electronic device collects the high-definition fingerprint image of the user through the fingerprint image receiving area of the fingerprint sensor, extracts the feature points of the high-definition fingerprint image, and stores the feature values of the feature points of the high-definition fingerprint image. The feature values of the feature points of the high-definition fingerprint image can also be referred to as the preset fingerprint image feature values. After that, when the user needs to unlock or decrypt the electronic device through the fingerprint information, the feature values of the fingerprint image collected by the current electronic device are compared with the feature values of the high-definition fingerprint image. If the similarity between the feature values of the fingerprint image collected by the current electronic device and the feature values of the high-definition fingerprint image is less than the preset value, the fingerprint recognition fails; if the similarity between the feature values of the fingerprint image collected by the current electronic device and the feature values of the high-definition fingerprint image is greater than the preset value, the fingerprint recognition succeeds.
[0204] At the same time, after the electronic device collects the high-definition fingerprint image of the user through the fingerprint image receiving area of the fingerprint sensor, the electronic device calculates the number of pixels of the high-definition fingerprint image in the first preset area, and the number of pixels of the high-definition fingerprint image in the first preset area is referred to as the preset pixel number R. Wherein, the first preset area is located at any position in the fingerprint image receiving area of the fingerprint sensor.
[0205] As shown in Figure 10 , the fingerprint image receiving area of the fingerprint sensor can be an optical sensing array M*N as shown in Figure 10 . The first preset area can be a light spot array P*Q as shown in Figure 10 .
[0206] When the user is unlocking or decrypting by fingerprint, the electronic device determines whether the real-time pixel quantity in the first preset area is less than the preset pixel quantity in the first preset area. If the electronic device determines that the real-time pixel quantity in the first preset area is less than the preset pixel quantity in the first preset area, the electronic device determines that there is a medium (for example, tempered film) on the screen.
[0207] In some embodiments, the electronic device can also take another approach to determine whether there is a medium (for example, tempered film) on the screen.
[0208] Before the electronic device is used to unlock or decrypt by fingerprint, when there is no medium (for example, tempered film) on the screen of the electronic device, the electronic device collects light signals through the fingerprint image receiving area of the fingerprint sensor, and the light signals reflected by the user's finger form a light spot in the fingerprint image receiving area of the fingerprint sensor. The electronic device stores the size of the light spot in the fingerprint image receiving area as a preset light spot size.
[0209] Then, when the user needs to unlock or decrypt the electronic device by fingerprint information, the electronic device determines whether the real-time light spot size collected by the fingerprint sensor 404 is consistent with the preset light spot size. If the real-time light spot size collected by the fingerprint sensor 404 is greater than the preset light spot size, there is a medium (for example, tempered film) on the screen of the electronic device.
[0210] Specifically, when the user's finger touches the fingerprint collection area on the electronic device, triggering the electronic device to collect a fingerprint image, the electronic device receives light signals through the fingerprint image receiving area of the fingerprint sensor, and the light signals reflected by the user's finger form a light spot in the fingerprint image receiving area of the fingerprint sensor. The electronic device calculates whether the real-time light spot size formed in the fingerprint image receiving area is consistent with the preset light spot size. If the real-time light spot size formed in the fingerprint image receiving area is greater than the preset light spot size, the electronic device determines that there is a medium (for example, tempered film) on the screen. For details, please refer to the embodiment shown in Figures 9-12 The present application will not be described here any more.
[0211] If the electronic device determines that the real-time pixel quantity in the first preset area is less than the preset pixel quantity, the electronic device performs S1504.
[0212] If the electronic device determines that the real-time pixel quantity in the first preset area is not less than the preset pixel quantity, the electronic device performs S1505.
[0213] S1504, the electronic device processes the first fingerprint image according to the first image enhancement model to obtain a second fingerprint image, wherein the number of feature points of the second fingerprint image is more than the number of feature points of the first fingerprint image.
[0214] When the electronic device determines that there is a medium (e.g., tempered film) on the screen, the electronic device uses the trained first image enhancement model. The first image enhancement model can remove the influence of the medium (e.g., tempered film) according to the input first fingerprint image collected when there is a medium (e.g., tempered film), to obtain a second fingerprint image without the medium (e.g., tempered film). Since the electronic device processes the first fingerprint image through the first image enhancement model, the influence of the medium is eliminated, and thus the obtained second fingerprint image is clearer. The electronic device extracts feature points of the first fingerprint image and the second fingerprint image. Since the second fingerprint image is clearer than the first fingerprint image, the number of feature points of the second fingerprint image is more than that of the first fingerprint image.
[0215] The first image enhancement model is trained in advance, and the training process is introduced as follows.
[0216] First, the electronic device obtains a fingerprint image (third fingerprint image) collected when there is a medium on the screen of the electronic device and a fingerprint image (fourth fingerprint image) collected when there is no medium on the screen of the electronic device. The electronic device forms a data pair by using the fingerprint image collected when there is a medium on the screen of the electronic device and the fingerprint image collected when there is no medium on the screen of the electronic device.
[0217] Then, the electronic device trains the first image enhancement model by using the data pair.
[0218] The electronic device inputs the fingerprint image collected when there is a medium on the screen of the electronic device in the data pair as input of the first image enhancement model, and the first image enhancement model outputs a processed fingerprint image (fifth fingerprint image). The electronic device calculates the similarity between the processed fingerprint image and the fingerprint image collected when there is no medium on the screen of the electronic device in the data pair. When the similarity between the processed fingerprint image and the fingerprint image collected when there is no medium on the screen of the electronic device in the data pair is less than a preset value, the model parameter information of the first image enhancement model is modified, and the first image enhancement model is trained again by using the data pair, until the similarity between the processed fingerprint image output by the first image model and the fingerprint image collected when there is no medium on the screen of the electronic device in the data pair is greater than or equal to a second preset value. The training of the first image enhancement model is completed.
[0219] After the training of the first image enhancement model is completed, the electronic device inputs the fingerprint image collected when there is a medium on the screen into the first image enhancement model, and the first image enhancement model eliminates the influence of the medium and outputs a fingerprint image without the medium.
[0220] S1505, the electronic device calculates whether the number of pixels of the first fingerprint image is less than a second preset pixel number.
[0221] As can be known from S1502, after the electronic device collects the first fingerprint image through the fingerprint image receiving area of the fingerprint sensor, the electronic device calculates the pixel quantity of the first fingerprint image.
[0222] If the electronic device calculates that the pixel quantity of the first fingerprint image is less than the second preset pixel quantity, the electronic device determines that the image quality of the first fingerprint image is poor, and the electronic device performs S1506.
[0223] If the electronic device calculates that the pixel quantity of the first fingerprint image is not less than the second preset pixel quantity, the electronic device performs S1507.
[0224] S1506, the electronic device processes the first fingerprint image according to any one of the following image enhancement algorithms to obtain a second fingerprint image, and the image enhancement algorithms include: gray scale transformation, linear transformation, edge sharpening, and filtering algorithm.
[0225] The image enhancement algorithm can also include other algorithms, which are not limited herein.
[0226] In this way, the electronic device determines that the real-time pixel quantity in the first preset area is not less than the preset pixel quantity, and determines that there is no medium on the screen of the electronic device. After the electronic device determines that there is no medium on the screen, the electronic device processes according to the image enhancement algorithm, so that the success rate of fingerprint unlocking or decryption can be improved when the image quality of the first fingerprint image is poor.
[0227] It can be understood that the difference between the image enhancement algorithm and the first image enhancement model is that the electronic device processes the first fingerprint image through the first image enhancement model, which eliminates the influence of the medium on the screen and obtains a second fingerprint image. The second fingerprint image can be understood as a fingerprint image collected when there is no medium on the electronic device.
[0228] The image enhancement algorithm only makes the image clearer, and does not eliminate the influence of the medium on the screen on the collected fingerprint image. In other words, the first image enhancement model has stronger capability than the image enhancement algorithm, that is, the first image enhancement algorithm can make the fingerprint image collected by the electronic device when there is a medium on the screen clearer, so that the success rate of fingerprint image unlocking or decryption by the electronic device can be greatly improved.
[0229] S1507, the electronic device extracts features from the first fingerprint image and calculates a feature value of the first fingerprint image, and if the feature value of the first fingerprint image is similar to a preset fingerprint image feature value by more than a preset value, it is determined that the fingerprint unlocking or decryption is successful.
[0230] S1508, the electronic device performs feature extraction on the second fingerprint image to obtain a feature value of the second fingerprint image, and when a similarity between the feature value of the second fingerprint image and a preset fingerprint image feature value is greater than a preset value (a first preset value), it is determined that the fingerprint unlocking or decryption is successful.
[0231] After the electronic device determines that there is a medium on the screen, the electronic device processes the first fingerprint image through a first image enhancement model to obtain a second fingerprint image. Alternatively, after the electronic device determines that there is no medium on the screen, the electronic device processes the first fingerprint image through any one of the following image enhancement algorithms to obtain a second fingerprint image, the image enhancement algorithms including: gray scale transformation, linear transformation, and edge sharpening. Then, the electronic device extracts a feature value of the second fingerprint image, and when the feature value of the second fingerprint image is greater than a preset fingerprint image feature value, the electronic device determines that the fingerprint unlocking or decryption is successful.
[0232] In the above embodiments, according to the context, the term "when" can be interpreted as meaning "if" or "after" or "in response to determining" or "in response to detecting". Similarly, according to the context, the phrase "upon determining" or "if detecting (the stated condition or event)" can be interpreted as meaning "if determining" or "in response to determining" or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)".
[0233] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid-state disk), etc.
[0234] Those skilled in the art can understand that all or part of the processes in the above-mentioned method embodiments can be implemented by a computer program instructing relevant hardware to complete, and the program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes ROM or random storage memory RAM, magnetic disk or optical disk, and various storage program code media.
[0235] The above description is only used to illustrate the technical solutions of the present application, and is not a limitation thereof. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features can be replaced by equivalents. These modifications or replacements do not change the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.< / canvas> < / video> < / videoview> < / imgview> < / textview>
Claims
1. A method of fingerprint recognition, characterized by, The application is applied to an electronic device comprising a fingerprint sensor; the method comprises: The electronic device collects a first fingerprint image; When it is judged according to the first fingerprint image that there is a medium on the display screen of the electronic device, the electronic device processes the first fingerprint image through a first image enhancement model to obtain a second fingerprint image; wherein the number of feature points of the second fingerprint image is greater than that of the first fingerprint image; the electronic device calculates the feature value of the second fingerprint image, and when the similarity between the feature value of the second fingerprint image and the feature value of a preset fingerprint image is greater than a first preset value, the electronic device confirms that the fingerprint unlocking or decryption is successful; When the electronic device judges according to the first fingerprint image that there is no medium on the display screen of the electronic device, if the electronic device judges that the pixel number of the first fingerprint image is less than a second preset pixel number, the electronic device processes the first fingerprint image according to an image enhancement algorithm to obtain a third fingerprint image, and the number of feature points of the third fingerprint image is greater than that of the first fingerprint image; The electronic device calculates the feature value of the third fingerprint image, and when the similarity between the feature value of the third fingerprint image and the feature value of a preset fingerprint image is greater than the first preset value, the electronic device confirms that the fingerprint unlocking or decryption is successful; When the electronic device judges according to the first fingerprint image that there is no medium on the display screen of the electronic device, if the electronic device judges that the pixel number of the first fingerprint image is not less than a second preset pixel number, the electronic device extracts features from the first fingerprint image and calculates the feature value of the first fingerprint image; If the feature value of the first fingerprint image is greater than the first preset value, the electronic device confirms that the fingerprint unlocking or decryption is successful.
2. The method of claim 1, wherein, Before the electronic device judges according to the first fingerprint image that there is a medium on the display screen of the electronic device, the method further comprises: The electronic device calculates the pixel number of the first fingerprint image; The electronic device judges according to the first fingerprint image that there is a medium on the display screen of the electronic device, specifically comprising: If the electronic device judges that the pixel number of the first fingerprint image in the first preset area is less than a preset pixel number, the electronic device determines that there is a medium on the display screen of the electronic device; wherein the pixel number of the first fingerprint image in the first preset area is a part of the pixel number of the first fingerprint image, and the first preset area is located at any position in the fingerprint image receiving area of the fingerprint sensor.
3. The method of claim 1, wherein, Before the electronic device collects a first fingerprint image, the method further comprises: The electronic device obtains training data, and the training data comprises a third fingerprint image and a fourth fingerprint image; wherein the third fingerprint image is a fingerprint image collected when there is a medium on the screen of the electronic device, and the fourth fingerprint image is a fingerprint image collected when there is no medium on the screen of the electronic device; The electronic device takes the third fingerprint image as input of the first image enhancement model, processes the third fingerprint image through the first image enhancement model to obtain a fifth fingerprint image; The electronic device calculates the similarity between the fifth fingerprint image and the fourth fingerprint image; When the similarity between the fifth fingerprint image and the fourth fingerprint image is greater than a second preset value, the electronic device modifies the parameters of the first image enhancement model, takes the third fingerprint image as input of the first image enhancement model again, and the first image enhancement model outputs a sixth fingerprint image until the similarity between the sixth fingerprint image output by the first image enhancement model and the fourth fingerprint image is less than the second preset value.
4. The method of claim 1, wherein, Before the electronic device collects the first fingerprint image, the method further comprises: The electronic device collects a sixth fingerprint image; The electronic device calculates the feature value of the sixth fingerprint image, and the feature value of the sixth fingerprint image is the feature value of the preset fingerprint image.
5. The method according to any of claims 1-2, characterized by, Before the electronic device collects the first fingerprint image, the method further comprises: The electronic device collects a seventh fingerprint image and determines a first light spot area formed by the seventh fingerprint image in the fingerprint image receiving area of the fingerprint sensor; After the electronic device collects the first fingerprint image, the method further comprises: The electronic device calculates a second light spot area formed by the first fingerprint image in the fingerprint image receiving area of the fingerprint sensor; The electronic device determines that there is a medium on the display screen of the electronic device according to the first fingerprint image, specifically comprising: When the second light spot area is greater than the first light spot area, the electronic device determines that there is a medium on the screen of the electronic device.
6. The method of claim 2, wherein, The image enhancement algorithm includes any one of the following: gray scale transformation, linear transformation, edge sharpening, and filtering algorithm.
7. An electronic device, comprising: The electronic device includes one or more processors, one or more memories, and a fingerprint sensor; the one or more memories are coupled with the one or more processors, and the one or more memories are used to store computer program codes, the computer program codes include computer instructions, when the one or more processors execute the computer instructions, the electronic device executes the fingerprint identification method in any one of claims 1-6.
8. A readable storage medium for storing computer instructions, when the computer instructions run on an electronic device, the electronic device executes the fingerprint identification method in any one of claims 1-6.
Citation Information
Patent Citations
Fingerprint collection method and related product
CN107256383A
Fingerprint identification method and device suitable for under-screen
CN109614964A
Under-screen optical device and detection method of display screen film
CN111524480A