Fingerprint identification method, device, terminal and storage medium

By adjusting the priority of the trusted execution system process, the performance problem of fingerprint recognition and unlocking in terminal devices under high CPU load scenarios is solved, achieving faster and more stable fingerprint unlocking operations and improving user experience.

CN113138845BActive Publication Date: 2024-10-22BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110449265.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-25
Publication Date
2024-10-22
Estimated Expiration
2041-04-25

AI Technical Summary

Technical Problem

Fingerprint recognition and unlocking operations in existing terminal devices perform poorly in scenarios with heavy CPU load, resulting in lags and poor stability, affecting user experience.

Method used

By calling the trusted execution system process interface, adjust its process level from the first level to the second level to obtain a higher priority, thereby allocating more time slice resources in scenarios with heavy CPU load and improving fingerprint unlocking. Speed ​​and stability.

Benefits of technology

In any usage scenario with heavy CPU load, the fingerprint unlocking speed is improved, the fingerprint unlocking time is saved, the stability of fingerprint unlocking is ensured, and the user experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113138845B_ABST
    Figure CN113138845B_ABST
Patent Text Reader

Abstract

The present application discloses a fingerprint recognition method, device, terminal and storage medium, the method comprising: when a fingerprint operation instruction acting on the terminal is detected, calling a preset trusted execution system process interface, adjusting the process level of the trusted execution system process from the first level to the second level, the priority of the second level is higher than the priority of the first level; running the trusted execution system process corresponding to the second level to perform the fingerprint recognition operation corresponding to the fingerprint operation instruction. This solution can improve the speed of fingerprint unlocking, save fingerprint unlocking time, and ensure the stability of fingerprint unlocking, further improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention generally relates to the technical field of intelligent terminals, and in particular to a fingerprint recognition method, device, terminal and storage medium. Background Art

[0002] With the rapid development of electronic information technology, the functions of terminal devices have become more and more powerful. They have been widely used in more and more fields, such as terminal payment services and fingerprint unlocking services. These applications need to be bound to personal key information. Therefore, it is particularly important to ensure the security of personal key information in terminal devices.

[0003] At present, fingerprint recognition, fingerprint verification and other security operations in terminal devices are all implemented in the Trusted Execution Environment (TEE) in the processor, and fingerprint processing operations are implemented by binding the TEE process running in the TEE environment to the CPU core. However, this method cannot meet the fingerprint unlocking performance requirements in scenarios such as heavy CPU load, and there will be jams during the unlocking process, which makes the fingerprint recognition less stable, resulting in a poor user experience. Summary of the invention

[0004] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a fingerprint recognition method, device, terminal and storage medium.

[0005] In a first aspect, the present application provides a fingerprint recognition method, the method comprising:

[0006] When a fingerprint operation instruction acting on the terminal is detected, a preset trusted execution system process interface is called to adjust the process level of the trusted execution system process from a first level to a second level, wherein the priority of the second level is higher than that of the first level;

[0007] A trusted execution system process corresponding to the second level is run to perform a fingerprint recognition operation corresponding to the fingerprint operation instruction.

[0008] In one embodiment, the trusted execution system includes a user space and a kernel space, and calling a preset trusted execution system process interface to adjust the process level of the trusted execution system process from a first level to a second level includes:

[0009] Calling a preset trusted execution system process interface in the user space, and determining a target parameter corresponding to the second level based on a preset level parameter configuration rule;

[0010] Based on a preset communication protocol, the process level of the trusted execution system process is adjusted from the first level to a second level in the kernel space based on the target parameter.

[0011] In one embodiment, running the trusted execution system process corresponding to the second level to perform the fingerprint recognition operation corresponding to the fingerprint operation instruction includes:

[0012] Running a trusted execution system process corresponding to the second level, parsing and obtaining fingerprint operation information corresponding to the fingerprint operation instruction;

[0013] Based on the fingerprint operation information, a preset fingerprint processing algorithm is used to perform a corresponding fingerprint recognition operation.

[0014] In one embodiment, based on the fingerprint operation information, a preset fingerprint processing algorithm is used to perform a corresponding fingerprint recognition operation, including:

[0015] Based on the fingerprint operation information, obtaining current fingerprint data;

[0016] When it is determined based on the preset fingerprint processing algorithm that the current fingerprint data is consistent with the pre-stored fingerprint template data, a corresponding fingerprint recognition operation is performed.

[0017] In one embodiment, when it is determined based on a preset fingerprint processing algorithm that the current fingerprint data is consistent with the pre-stored fingerprint template data, a corresponding fingerprint recognition operation is performed, including:

[0018] When it is determined based on a preset fingerprint processing algorithm that the current fingerprint data is consistent with the pre-stored fingerprint template data, obtaining a processing operation type of the terminal;

[0019] The terminal is controlled to execute a processing operation corresponding to the processing operation type.

[0020] In one embodiment, controlling the terminal to perform a processing operation corresponding to the processing operation type includes:

[0021] If the processing operation type is a fingerprint unlocking operation type, controlling the terminal to perform an unlocking operation; or,

[0022] If the processing operation type is a fingerprint payment operation type, control the terminal to perform a payment operation.

[0023] In a second aspect, the present application provides a fingerprint recognition device, the device comprising:

[0024] an adjustment module, configured to, when detecting a fingerprint operation instruction acting on the terminal, call a preset trusted execution system process interface to adjust the process level of the trusted execution system process from a first level to a second level, wherein the priority of the second level is higher than the priority of the first level;

[0025] The operation execution module is used to run the trusted execution system process corresponding to the second level to execute the fingerprint recognition operation corresponding to the fingerprint operation instruction.

[0026] In a third aspect, an embodiment of the present application provides an electronic terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of the first aspect when executing the program.

[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is used to implement the method described in the first aspect.

[0028] The fingerprint recognition method, device, terminal and storage medium provided in the embodiment of the present application obtain the process level of the trusted execution system process when the fingerprint operation instruction acting on the terminal is detected, and the process level is the first level, and the preset trusted execution system process interface is called to adjust the first level of the trusted execution system process to the second level, the priority of the second level is higher than the priority of the first level, and the trusted execution system process corresponding to the second level is run to perform the fingerprint recognition operation corresponding to the fingerprint operation instruction. This technical solution can adjust the process level of the trusted execution system process to a higher priority through the preset trusted execution system process interface, and by running the higher-level process, more time slice resources are allocated to the trusted execution system process of the fingerprint processing operation, ensuring that in any use scenario with heavy CPU load, more time slice resources can be used for fingerprint unlocking, thereby improving the speed of fingerprint unlocking, saving fingerprint unlocking time, and ensuring the stability of fingerprint unlocking, further improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0030] Figure 1 A schematic diagram of the flow of an existing fingerprint recognition method provided in an embodiment of the present application;

[0031] Figure 2 A schematic diagram of the fingerprint recognition method provided in the embodiment of the present application;

[0032] Figure 3A schematic diagram of the fingerprint recognition method provided in the embodiment of the present application;

[0033] Figure 4 A schematic diagram of the fingerprint recognition method provided in the embodiment of the present application;

[0034] Figure 5 A schematic diagram of the fingerprint recognition method provided in the embodiment of the present application;

[0035] Figure 6 A schematic diagram of fingerprint unlocking time obtained by using the prior art provided in an embodiment of the present application;

[0036] Figure 7 A schematic diagram of fingerprint unlocking time provided in an embodiment of the present application;

[0037] Figure 8 A schematic diagram of the structure of a fingerprint recognition device provided in an embodiment of the present application;

[0038] Fig. 9 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.

[0040] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0041] It is understandable that with the widespread application of terminal devices such as smartphones, they can support more and more applications and their functions are becoming more and more powerful. Among them, fingerprint recognition technology has been widely used in terminal devices such as smartphones. For example, the optical fingerprint and capacitive fingerprint recognition principles can include fingerprint acquisition, processing, feature extraction and comparison processes. The feature points on the fingerprint image are extracted by exposure, capture or analog-to-digital conversion to complete fingerprint recognition. The feature points may include starting points, end points, junction points and bifurcation points.

[0042] At present, fingerprint unlocking and fingerprint payment both involve the privacy and security of personal user fingerprint information and need to run in TEE (Trusted Execution Environment). In the related technology, fingerprint operation is realized by binding the TEE process to the processor core, but there are many processes that need to be carried out on the processor CPU core. For the first fingerprint unlocking of the smartphone after restarting or starting up, and fingerprint unlocking in different usage scenarios such as heavy CPU load, it takes a lot of unlocking time, which makes the fingerprint unlocking slow and there are unstable unlocking situations such as jamming, which leads to poor user experience. This is because the priority of the TEE process used by the fingerprint software is a normal ordinary level process, which cannot compete with high-priority processes for CPU time slice resources, that is, high-priority processes are more likely to compete with ordinary-level processes for CPU time slice resources.

[0043] See also Figure 1 As shown in the figure, during the fingerprint operation, the TEE process used by the fingerprint software applies to the CPU for CPU time slice resources, wherein RT (real-time) level process 1 occupies time slice 1 of the CPU time slice resources, RT level process 2 occupies time slice 2 of the CPU time slice resources, high priority process occupies time slice 3 of the CPU time slice resources, system level process occupies time slice n of the CPU time slice resources, etc. The high priority process refers to a process at a higher level than the normal level. However, the priority of the TEE process is an ordinary level process, i.e., the normal level. During this period of time, it cannot grab the CPU time slice resources with the high priority process and the RT level process, and can only get a very small part of the CPU time slice or no CPU time slice at all.

[0044] Based on the above defects, the present application provides a fingerprint recognition method. Compared with the prior art, the method can adjust the process level of the trusted execution system process to a higher priority through a preset trusted execution system process interface, thereby allocating more time slice resources to the trusted execution system process of the fingerprint processing operation, thereby improving the fingerprint recognition speed, ensuring that in any usage scenario with heavy CPU load, the speed of fingerprint unlocking is improved, the fingerprint unlocking time is saved, and the stability of fingerprint unlocking is ensured, further improving the user experience.

[0045] The terminal in this embodiment may include a mobile terminal such as a smart phone, a tablet computer, a PDA, a laptop computer, a mobile Internet device (MID), etc., or may be a wearable device such as a smart watch, a smart phone, smart glasses, etc.

[0046] It should be noted that the terminal's operating system can have at least two operating systems coexisting in parallel, one can be REE OS (Rich Execution Environment), the other can be TEE OS, and it can also include other operating systems such as Flyme operating system, SySymbian operating system, Black Berry operating system, etc. This embodiment does not impose any limitation on this.

[0047] Among them, REE OS may refer to an Android operating system, an iOS operating system, a Linux operating system, etc., which has low security and can run client applications (CA) with low security.

[0048] TEE OS refers to a trusted execution space that is more secure than REE, which is composed of trusted software and hardware resources such as a security core, TEE hardware resources, and trusted applications (TA). It is a micro operating system with security and is essentially a hardware virtualization technology. Among them, trusted applications are isolated from each other through cryptographic technology, and will not arbitrarily read and operate the data of other trusted applications. This environment can ensure that it is not interfered with by conventional operating systems. It is achieved by creating a small operating system that can run independently in the secure world of TrustZone. The operating system directly provides a small number of services in the form of system calls, such as services involving security information such as fingerprints. TEE and REE interact through shared memory. TEE can also be divided into kernel space (TEE Kernel) and user space. The user space of TEE can run multiple different security applications.

[0049] For ease of understanding and explanation, the following Figures 2 to 9 The fingerprint recognition method, device, terminal and storage medium provided in the embodiments of the present application are described in detail.

[0050] Figure 1 FIG. 1 is a flow chart of a fingerprint recognition method provided in an embodiment of the present application, wherein the method is applied to a terminal, such as Figure 1 As shown, the method includes:

[0051] S101. When a fingerprint operation instruction acting on a terminal is detected, a preset trusted execution system process interface is called to adjust the process level of the trusted execution system process from a first level to a second level, wherein the priority of the second level is higher than that of the first level.

[0052] Specifically, the user can perform a fingerprint operation in the fingerprint sensing area of ​​the terminal to trigger a fingerprint operation instruction. The operation corresponding to the fingerprint operation instruction may be, for example, a fingerprint pressing operation, so that the terminal implements a corresponding processing function, such as a fingerprint unlocking function, a fingerprint payment function, etc. The fingerprint sensing area may be arranged in the back area of ​​the terminal or in the surrounding area of ​​the terminal.

[0053] Optionally, a fingerprint operation instruction acting on the terminal can be detected by a fingerprint sensor. When the fingerprint sensor detects a fingerprint operation acting on the terminal, the REE running on the terminal can send the fingerprint operation instruction to the TEE. Since the fingerprint operation instruction involves the user's security information, it is necessary to operate in the trusted execution system. When the fingerprint operation instruction acting on the terminal is detected, the process level of the trusted execution system process is obtained, wherein the trusted execution system process is the process corresponding to the operating system running in the trusted execution environment TEE.

[0054] It should be noted that the process level of the trusted execution system process can be obtained through the recorder built into the terminal software, or by executing a command. Different processes have different process levels. The process level of the trusted execution system process obtained in this step is the first level, which can be a normal level.

[0055] In this step, the process represents the currently running program. The process-level priority determines the running time of the process and how much CPU time slice resources it receives, that is, determines the order in which the programs are executed.

[0056] The priority of a process can be adjusted dynamically. A high-priority process runs first. Only when a high-priority process is not running, a low-priority process is scheduled to run. Processes with the same priority run in turns according to the time slice. Generally speaking, there are 32 levels of process priority, which are values ​​from 0 to 31, called basic priority levels. The operating system schedules the running of processes according to different priorities. Levels 0 to 15 are normal priority levels, and levels 16 to 31 are real-time (RT) priority levels. Among them, the lower the priority value of a process of the same type, the higher the priority of the corresponding process. For example, for an RT priority process, the priority corresponding to a priority value of 16 is higher than the priority corresponding to a priority value of 18, and the RT priority is higher than the normal priority. The biggest difference between the real-time priority and the normal priority is that the running of processes of the same priority does not rotate according to the time slice, but the process that runs first controls the CPU first. If it does not actively give up control, processes of the same level or lower priority cannot run.

[0057] In a general operating system, there are dozens or even hundreds of processes running at the same time, but the number of CPUs is far less than that of processes, and limited CPU resources need to be allocated to processes. A heavy CPU load means that the CPU currently has a large number of processes running or to be run. The kernel space considers the priority of the process before allocating CPU time slice resources to the process. Therefore, when a fingerprint operation acting on the terminal is detected, the process level of the trusted execution system process is obtained, and the preset trusted execution system process interface is called to adjust the process level of the trusted execution system process from the first level to the second level. Furthermore, when the first level is the normal level, the normal level can be adjusted to the RT level, and the priority value with a lower priority in the RT level has a higher priority. When it is necessary to adjust the normal level to a level corresponding to a specific priority value in the RT level, the level corresponding to the specific priority value in the adjusted RT level can be determined according to the number of processes running in the operating system on the terminal and a preset process number threshold. When the number of processes running in the operating system is greater than the process data threshold, the first level is adjusted to a priority with a lower priority value in the same type of RT level. For example, when the first level is level 4 in the normal level, and the same type of RT level includes level 16 and level 18, the 4th level is adjusted to level 16 in the RT level. When the number of processes running in the operating system is not greater than the process number threshold, the first level is adjusted to a priority with a higher priority value in the same type of RT level. For example, when the first level is level 4 in the normal level, the 4th level is adjusted to level 18.

[0058] Among them, the second level priority is higher than the first level priority, so that in the usage scenario with heavy CPU load, the trusted execution system process can be allocated more CPU time slice resources. The second level can be, for example, the RT level.

[0059] It should be noted that the above-mentioned preset trusted execution system process interface is used to adjust the process level of the trusted execution system.

[0060] Optionally, the trusted execution system may include kernel space and user space, wherein the kernel function module runs in the kernel space, while the application runs in the user space. The CPU has different operation modes, representing different levels, and different levels have different functions. Certain operations are prohibited at lower levels. The kernel runs at the highest level (kernel state), which can perform all operations, while the application runs at a lower level (user state), at which the processor controls direct access to hardware and unauthorized access to memory. The kernel state and user state have their own memory mapping, i.e., their own address space. The kernel space needs to record and manage relevant information during process operation, including: address space, memory mapping, open files, process status, and threads contained therein. When a fingerprint operation acting on the terminal is detected, the preset trusted execution system process interface can be called in the user space, and based on the preset level parameter configuration rule, the target parameter corresponding to the second level is determined. The level parameter configuration rule can be set in advance according to the correspondence between the level and the parameter for adjusting the process level. For example, the level parameter setting rule can be that when the process level corresponding to the trusted execution system process is the normal level, the corresponding target parameter Function_2 is assigned a value of 0; when the process level corresponding to the trusted execution system process is the RT level, the corresponding target parameter Function_1 is assigned a value of 1. Then, based on the preset communication protocol, the process level of the trusted execution system is adjusted from the first level to the second level in the kernel space based on the target parameter corresponding to the second level.

[0061] The transmission instruction may be configured according to a preset communication protocol, for example, an ioctl instruction, and its corresponding communication protocol may be a netlink protocol. The parameter configuration rule may include, for example, a first target parameter Function_1 and a second target parameter Function_2, the first target parameter may be assigned a value of 1, and the second target parameter may be assigned a value of 0, wherein the first target parameter 1 indicates that the first level of the trusted execution system process is adjusted to the second level; the second target parameter 0 indicates that the second level of the trusted execution system process is adjusted to the first level.

[0062] S102: Run the trusted execution system process corresponding to the second level to perform a fingerprint recognition operation corresponding to the fingerprint operation instruction.

[0063] When fingerprint recognition is required, the REE running on the terminal can send a fingerprint operation instruction to the TEE, and the fingerprint operation instruction includes fingerprint operation information, so that the TEE receives the fingerprint operation instruction, and then responds to the fingerprint operation instruction, thereby parsing and obtaining the fingerprint operation information corresponding to the fingerprint operation instruction, and based on the fingerprint operation information, using a preset fingerprint processing algorithm to perform the corresponding fingerprint recognition operation. Optionally, the fingerprint operation information includes information corresponding to the collection of fingerprint data and fingerprint comparison operations, and the fingerprint operation instruction can be a cmd command.

[0064] In the process of performing the corresponding fingerprint recognition operation based on the fingerprint operation information and using the preset fingerprint processing algorithm, the current fingerprint data can be first obtained, and the current fingerprint data includes fingerprint feature points, such as the starting point, end point, junction point and bifurcation point of the fingerprint, and then the preset fingerprint processing algorithm is used to compare the obtained current fingerprint data with the pre-stored fingerprint template data to obtain the fingerprint comparison processing result. The above-mentioned fingerprint processing algorithm can, for example, be a pre-processing of the collected fingerprint image, data feature extraction, feature matching, fingerprint recognition and other processing operations.

[0065] It should be noted that the above fingerprint comparison processing result may indicate that the current fingerprint data is consistent with the pre-stored fingerprint template data, or may indicate that the current fingerprint data is inconsistent with the pre-stored fingerprint template data.

[0066] When a preset fingerprint processing algorithm is used to perform a corresponding fingerprint recognition operation, the fingerprint comparison processing result and the processing operation type of the terminal can be obtained, and then based on the fingerprint comparison processing result and the processing operation type, the terminal is controlled to perform a processing operation corresponding to the processing operation type.

[0067] Furthermore, when the processing operation type is a fingerprint unlocking operation type, when the fingerprint comparison processing result indicates that the current fingerprint data is consistent with the pre-stored fingerprint template data, the control terminal performs an unlocking operation, such as opening the main screen or opening the corresponding application; when the fingerprint comparison processing result indicates that the current fingerprint data is inconsistent with the pre-stored fingerprint template data, the control terminal prompts an unlocking failure message, and the unlocking failure message can be prompted by, for example, displaying it on the terminal interface, or by voice or vibration, and the displayed message is, for example, "Fingerprint unlocking failed, please re-enter".

[0068] When the processing operation type is a fingerprint payment operation type, when the fingerprint comparison processing result indicates that the current fingerprint data is consistent with the pre-stored fingerprint template data, the control terminal executes the payment operation, such as sending a payment request to a third-party payment platform, so that the third-party payment platform completes the payment operation; when the fingerprint comparison processing result indicates that the current fingerprint data is inconsistent with the pre-stored fingerprint template data, the control terminal prompts a payment failure message, and the payment failure message can be prompted by, for example, displaying it on the terminal interface, or by voice or vibration, and the displayed information is, for example, "Fingerprint payment failed, please re-enter".

[0069] The fingerprint recognition method provided in the embodiment of the present application obtains the process level of the trusted execution system process when the fingerprint operation instruction acting on the terminal is detected, and the process level is the first level, and calls the preset trusted execution system process interface to adjust the first level to the second level, the priority of the second level is higher than the priority of the first level, and runs the trusted execution system process corresponding to the second level to perform the fingerprint recognition operation corresponding to the fingerprint operation instruction. This technical solution can adjust the process level of the trusted execution system process to a higher priority through the preset trusted execution system process interface, so as to allocate more time slice resources to the trusted execution system process of the fingerprint processing operation, ensuring that in any use scenario with heavy CPU load, there are more time slice resources for fingerprint unlocking, improving the speed of fingerprint unlocking, saving fingerprint unlocking time, and ensuring the stability of fingerprint unlocking, further improving the user experience.

[0070] Further, based on the above embodiment, Figure 3 As shown, after executing the fingerprint recognition operation corresponding to the fingerprint operation instruction, the method further includes the following method steps:

[0071] S103: Call a preset trusted execution system process interface to adjust the second level to the first level.

[0072] In this embodiment, the above-mentioned first level can be the normal level, and the second level can be the RT level. Since processes of the same level or low priority cannot run unless the real-time process actively gives up occupying the CPU time slice resources, the second level needs to be dynamically adjusted to the first level.

[0073] In this step, after executing the fingerprint recognition operation corresponding to the fingerprint operation instruction, the preset trusted execution system process interface can be called to adjust the second level to the first level. By calling the preset trusted execution system process interface in the user space, the target parameters corresponding to the first level are determined based on the preset level parameter configuration rules, and then based on the preset communication protocol, the process level of the trusted execution system process is adjusted from the second level to the first level in the kernel space based on the target parameters corresponding to the first level.

[0074] For example, the target parameter corresponding to the first level may be assigned a value of 0, indicating that the second level of the trusted execution system process is dynamically adjusted to the first level.

[0075] In this embodiment, after executing the fingerprint recognition operation corresponding to the fingerprint operation instruction, the priority of the trusted execution system process is dynamically adjusted to a lower level, so as to avoid occupying too many CPU time slice resources and ensure that the CPU can run other processes normally.

[0076] Figure 4 The flowchart of the fingerprint recognition method provided in this application is based on the above embodiment. Figure 4 As shown, the method includes:

[0077] S201. Call the trusted execution system process interface to adjust the priority level of the trusted execution system process REE process from the normal level to the RT level.

[0078] S202: Receive and respond to the command fingerprint operation instruction, and perform a fingerprint recognition operation corresponding to the fingerprint operation instruction.

[0079] S203: Call the trusted execution system process interface to adjust the priority RT level of the trusted execution system process REE process to the normal level.

[0080] For example, see Figure 5As shown, when the upper-layer client application (CA) of REE initiates an operation request such as fingerprint unlocking or fingerprint payment, the user performs a fingerprint pressing operation. When the fingerprint sensor detects the fingerprint operation acting on the terminal, the process level of the trusted execution system process is obtained through the process recorder. The process level can be a first-level normal-level process, and a first-level adjustment request is sent to the trusted execution system driver (TEE Driver), so that the TEE Driver obtains the first-level adjustment request, and the first-level adjustment request is used to adjust the normal level of the trusted execution system process TEE process to the RT level, and send the first-level adjustment request to the trusted execution system TEE OS, and then the TEE The OS receives and responds to the first level adjustment request, calls the preset trusted execution system interface through the application in the user space, determines the first target parameter corresponding to adjusting the first level normal level to the second level RT level based on the preset level parameter configuration rule, and assigns the first target parameter 1=1, and then sends the first target parameter to the kernel space kernel part through the transmission instruction icctl instruction based on the preset communication protocol, and adjusts the first level normal process of the trusted execution system TEE process to the second level RT process based on the first target parameter 1 in the kernel space. In this embodiment, the target parameter corresponding to adjusting the trusted execution system process from a low priority to a high priority is recorded as the first target parameter, and the target parameter corresponding to adjusting the trusted execution system process from a high priority to a low priority is recorded as the second target parameter.

[0081] After adjusting the normal process of the trusted execution system TEE process to the RT process, the TEE Driver obtains the command fingerprint operation instruction, which is used to perform the fingerprint recognition operation corresponding to the fingerprint operation instruction. The TEE Driver acts as a medium for shared memory interaction, and then the TEE Driver passes the command command and the parameters carried in the command command through shared memory. It can first be passed to the kernel part of the TEE OS through shared memory, so that the TEE OS receives and responds to the command fingerprint operation instruction, and processes the fingerprint recognition operation through the TA in the kernel part. After obtaining the fingerprint operation information, the preset fingerprint processing algorithm is used in the TEE OS to perform the corresponding fingerprint recognition operation. The TA performs the processing in the TEE environment, and the obtained processing results are refilled into the shared memory, so that the upper-layer application CA in the REE obtains the fingerprint recognition result through the shared memory. Among them, the CA and the TA communicate through the communication mechanism provided by ARMTrustZone.

[0082] When the fingerprint recognition operation is completed, the TEE Driver obtains a second-level adjustment request, which is used to adjust the priority RT level of the trusted execution system process TEE process to the normal level, and sends the second-level adjustment request to the TEE OS. Then the TEE OS receives and responds to the second-level adjustment request, and can call the preset trusted execution system interface, based on the preset level parameter configuration rules, determine to adjust the second-level RT level to the second target parameter corresponding to the first-level normal level, and assign the second target parameter 1=0, and then based on the preset communication protocol, send the second target parameter to the kernel space kernel part through the transmission instruction icctl instruction, and adjust the second-level RT process of the trusted execution system TEE process to the first-level normal process based on the second target parameter 0 in the kernel space. It should be noted that the above-mentioned TEE OS process is bound to the CPU core, and when the REE switches to the TEE environment, the identification id of the trusted execution system process remains unchanged.

[0083] Furthermore, when the terminal performs a fingerprint unlocking operation, and the fingerprint recognition result indicates that the current fingerprint data is consistent with the pre-stored fingerprint template data, the terminal is controlled to perform an unlocking operation, such as opening the main screen or opening a corresponding application; when the terminal performs a fingerprint payment operation, and the fingerprint recognition result indicates that the current fingerprint data is consistent with the pre-stored fingerprint template data, the terminal is controlled to perform a payment operation, such as sending a payment request to a third-party payment platform, so that the third-party payment platform completes the payment operation.

[0084] In this embodiment, when the corresponding fingerprint recognition operation is performed, the fingerprint unlocking time obtained is 599ms. However, by dynamically adjusting the priority of the trusted execution system process in this application, the fingerprint unlocking time obtained is only 68ms. The fingerprint unlocking time can be respectively referred to Figure 6 and Figure 7 As shown, it can be seen that by dynamically adjusting the priority of the trusted execution system process, the fingerprint unlocking time is shortened, while the stability of fingerprint unlocking is guaranteed, avoiding the problem of fingerprint software being unable to unlock or abnormal freezing, thereby improving the user experience.

[0085] It should be noted that although the operations of the method of the present invention are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flow chart can be performed in a different order. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.

[0086] on the other hand, Figure 8 The structure diagram of a fingerprint recognition device provided in an embodiment of the present application is shown in FIG. The device may be a device in a terminal device, such as Figure 8 As shown, the device 400 includes:

[0087] The adjustment module 410 is used to call a preset trusted execution system process interface to adjust the process level of the trusted execution system process from the first level to the second level when a fingerprint operation instruction acting on the terminal is detected, and the priority of the second level is higher than the priority of the first level;

[0088] The operation execution module 420 is used to run the trusted execution system process corresponding to the second level to execute the fingerprint recognition operation corresponding to the fingerprint operation instruction.

[0089] Optionally, the adjustment module 410 is specifically used to:

[0090] Calling a preset trusted execution system process interface in the user space, and determining a target parameter corresponding to the second level based on a preset level parameter configuration rule;

[0091] Based on a preset communication protocol, the process level of the trusted execution system process is adjusted from a first level to a second level based on target parameters in the kernel space.

[0092] Optionally, the operation execution module 420 is specifically used to:

[0093] Running the trusted execution system process corresponding to the second level, parsing and obtaining fingerprint operation information corresponding to the fingerprint operation instruction;

[0094] Based on the fingerprint operation information, a preset fingerprint processing algorithm is used to perform the corresponding fingerprint recognition operation.

[0095] Optionally, the operation execution module 420 is further used to:

[0096] Based on the fingerprint operation information, obtaining current fingerprint data;

[0097] When it is determined based on the preset fingerprint processing algorithm that the current fingerprint data is consistent with the pre-stored fingerprint template data, a corresponding fingerprint recognition operation is performed.

[0098] Optionally, the operation execution module 420 is further used to:

[0099] When it is determined based on a preset fingerprint processing algorithm that the current fingerprint data is consistent with the pre-stored fingerprint template data, obtaining a processing operation type of the terminal;

[0100] The terminal is controlled to execute a processing operation corresponding to the processing operation type.

[0101] Optionally, the operation execution module 420 is further used to:

[0102] If the processing operation type is a fingerprint unlocking operation type, the control terminal performs an unlocking operation; or,

[0103] If the processing operation type is a fingerprint payment operation type, the control terminal executes the payment operation.

[0104] The fingerprint recognition device provided in the embodiment of the present application, when detecting the fingerprint operation instruction acting on the terminal, obtains the process level of the trusted execution system process through the level acquisition module, and calls the preset trusted execution system process interface through the adjustment module to adjust the first level to the second level, the priority of the second level is higher than the priority of the first level, and then runs the trusted execution system process corresponding to the second level through the operation execution module to perform the fingerprint recognition operation corresponding to the fingerprint operation instruction. This technical solution can adjust the process level of the trusted execution system process to a higher priority through the preset trusted execution system process interface, thereby allocating more time slice resources to the trusted execution system process of the fingerprint processing operation, ensuring that the speed of fingerprint unlocking is improved in any use scenario with heavy CPU load, saving fingerprint unlocking time, and ensuring the stability of fingerprint unlocking, further improving the user experience.

[0105] On the other hand, the terminal device provided in the embodiment of the present application includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the fingerprint recognition method as described above when executing the program.

[0106] Reference below Fig. 9 , Fig. 9 A schematic diagram of the structure of a computer system of a terminal device according to an embodiment of the present application.

[0107] like Fig. 9 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 603 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0108] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0109] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a machine-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 603, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present application are executed.

[0110] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0111] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of the code, and the aforementioned module, program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0112] The units or modules involved in the embodiments of the present application may be implemented in software or in hardware. The units or modules described may also be provided in a processor, for example, may be described as: a processor comprising: an adjustment module and an operation execution module. Among them, the names of these units or modules do not constitute limitations on the units or modules themselves in certain circumstances, for example, the adjustment module may also be described as "for detecting a fingerprint operation instruction acting on a terminal, calling a preset trusted execution system process interface, and adjusting the process level of the trusted execution system process from a first level to a second level, wherein the priority of the second level is higher than the priority of the first level".

[0113] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently and not be assembled into the electronic device. The above computer-readable storage medium stores one or more programs, and when the above programs are used by one or more processors to execute the fingerprint recognition method described in the present application:

[0114] When a fingerprint operation instruction acting on the terminal is detected, a preset trusted execution system process interface is called to adjust the process level of the trusted execution system process from a first level to a second level, wherein the priority of the second level is higher than that of the first level;

[0115] A trusted execution system process corresponding to the second level is run to perform a fingerprint recognition operation corresponding to the fingerprint operation instruction.

[0116] In summary, the fingerprint recognition method, device, equipment and storage medium provided in the embodiments of the present application, when detecting the fingerprint operation instruction acting on the terminal, obtains the process level of the trusted execution system process, which is the first level, and calls the preset trusted execution system process interface to adjust the first level to the second level, the priority of the second level is higher than the priority of the first level, and runs the trusted execution system process corresponding to the second level to perform the fingerprint recognition operation corresponding to the fingerprint operation instruction. This technical solution can adjust the process level of the trusted execution system process to a higher priority through the preset trusted execution system process interface, thereby allocating more time slice resources to the trusted execution system process of the fingerprint processing operation, ensuring that the speed of fingerprint unlocking is improved in any use scenario with heavy CPU load, saving fingerprint unlocking time, and ensuring the stability of fingerprint unlocking, further improving the user experience.

[0117] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other.

Claims

1. A fingerprint recognition method, It is characterized in that The method comprises: When a fingerprint operation instruction acting on the terminal is detected, a preset trusted execution system process interface is called to adjust the process level of the trusted execution system process from a first level to a second level, wherein the priority of the second level is higher than that of the first level; Running a trusted execution system process corresponding to the second level to perform a fingerprint recognition operation corresponding to the fingerprint operation instruction; The trusted execution system includes a user space and a kernel space, and calling a preset trusted execution system process interface to adjust the process level of the trusted execution system process from the first level to the second level includes: Calling a preset trusted execution system process interface in the user space, and determining a target parameter corresponding to the second level based on a preset level parameter configuration rule; Based on a preset communication protocol, the process level of the trusted execution system process is adjusted from the first level to a second level in the kernel space based on the target parameter.

2. The method according to claim 1, It is characterized in that Running a trusted execution system process corresponding to the second level to perform a fingerprint recognition operation corresponding to the fingerprint operation instruction includes: Running a trusted execution system process corresponding to the second level, parsing and obtaining fingerprint operation information corresponding to the fingerprint operation instruction; Based on the fingerprint operation information, a preset fingerprint processing algorithm is used to perform a corresponding fingerprint recognition operation.

3. The method according to claim 2, It is characterized in that Based on the fingerprint operation information, a preset fingerprint processing algorithm is used to perform a corresponding fingerprint recognition operation, including: Based on the fingerprint operation information, obtaining current fingerprint data; When it is determined based on the preset fingerprint processing algorithm that the current fingerprint data is consistent with the pre-stored fingerprint template data, a corresponding fingerprint recognition operation is performed.

4. The method according to claim 3, It is characterized in that When it is determined based on the preset fingerprint processing algorithm that the current fingerprint data is consistent with the pre-stored fingerprint template data, a corresponding fingerprint recognition operation is performed, including: When it is determined based on a preset fingerprint processing algorithm that the current fingerprint data is consistent with the pre-stored fingerprint template data, obtaining a processing operation type of the terminal; The terminal is controlled to execute a processing operation corresponding to the processing operation type.

5. The method according to claim 4, It is characterized in that Controlling the terminal to perform a processing operation corresponding to the processing operation type includes: If the processing operation type is a fingerprint unlocking operation type, controlling the terminal to perform an unlocking operation; or, If the processing operation type is a fingerprint payment operation type, control the terminal to perform a payment operation.

6. A fingerprint recognition device, It is characterized in that The device includes: an adjustment module, configured to, when detecting a fingerprint operation instruction acting on the terminal, call a preset trusted execution system process interface to adjust the process level of the trusted execution system process from a first level to a second level, wherein the priority of the second level is higher than the priority of the first level; an operation execution module, configured to run a trusted execution system process corresponding to the second level to execute a fingerprint recognition operation corresponding to the fingerprint operation instruction; The trusted execution system includes a user space and a kernel space, and the adjustment module is specifically used to: Calling a preset trusted execution system process interface in the user space, and determining a target parameter corresponding to the second level based on a preset level parameter configuration rule; Based on a preset communication protocol, the process level of the trusted execution system process is adjusted from the first level to a second level in the kernel space based on the target parameter.

7. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium having a computer program stored thereon, It is characterized in that The computer program is configured to implement the method according to any one of claims 1 to 5 when executed by a processor.