Fingerprint identification method, medium and device

By detecting the abnormal situation of the I2C bus and switching to the SPI bus, the problem of abnormal communication between the master MCU and the fingerprint module when the I2C bus is abnormal is solved, ensuring the normal progress of the fingerprint recognition process.

CN119513844AActive Publication Date: 2025-02-25HUAWEI TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202311084530.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-24
Publication Date
2025-02-25
Estimated Expiration
2043-08-24

AI Technical Summary

Technical Problem

When the I2C bus is abnormal, the communication between the main control MCU and the fingerprint module is abnormal, affecting the normal progress of the fingerprint recognition process.

Method used

By detecting abnormal situations of the I2C bus, the master MCU sends switching instructions to the fingerprint module and switches to the SPI bus for communication to ensure normal communication between the master MCU and the fingerprint module.

Benefits of technology

When the I2C bus is abnormal, by switching to the SPI bus, the fingerprint recognition process is ensured normally, and fingerprint recognition failure caused by the I2C abnormality is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513844A_ABST
    Figure CN119513844A_ABST
Patent Text Reader

Abstract

The invention provides a fingerprint identification method, a medium and equipment. The method is applied to equipment, the equipment comprises a fingerprint module, a multimedia chip and a master control micro-control unit MCU, the master control MCU communicates with the fingerprint module through a first bus, the multimedia chip communicates with the fingerprint module through a second bus, and the master control MCU communicates with the multimedia chip through the second bus; the method comprises the following steps: a master control MCU determines that a first bus is abnormal; the main control MCU sends a switching instruction to the fingerprint module through the multimedia chip; in response to the switching instruction, the fingerprint module communicates with the master control MCU via the multimedia chip through the second bus. According to the fingerprint identification method, the medium and the equipment, whether the first bus is normal or not can be detected, when the first bus is abnormal, the first bus is switched to the second bus for communication, and the situation that the fingerprint identification process is affected due to I2C abnormity is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of devices, and in particular to a fingerprint recognition method, medium and device. Background Art

[0002] Fingerprint recognition technology can be widely used in various devices, such as smart door locks, mobile phones, and tablet computers. The implementation of fingerprint recognition technology depends on the normal communication between the main microcontroller unit (MCU) and the fingerprint module. Whether the communication between the main MCU and the fingerprint module is normal affects whether the fingerprint recognition process can be implemented normally. At present, the main MCU communicates with the fingerprint module through I2C (inter-integrated circuit). When the I2C bus is greatly disturbed, the communication stability of I2C will be affected, causing abnormal communication between the main MCU and the fingerprint module, and the fingerprint module cannot be controlled, thereby performing corresponding processing.

[0003] Therefore, how to ensure that the main control MCU and the fingerprint module can communicate normally when an abnormality occurs in I2C without affecting the fingerprint recognition process is an urgent problem to be solved. Summary of the invention

[0004] The present application provides a fingerprint identification method, medium and device. When the I2C is abnormal, the main control MCU and the fingerprint module can communicate normally without affecting the fingerprint identification process.

[0005] In a first aspect, a fingerprint identification method is provided, characterized in that the method is applied to a device, the device includes a fingerprint module, a multimedia chip and a main microcontroller unit MCU, the main control MCU communicates with the fingerprint module through a first bus, the multimedia chip communicates with the fingerprint module through a second bus, and the main control MCU communicates with the multimedia chip through the second bus; the method includes: the main control MCU determines that the first bus is abnormal; the main control MCU sends a switching instruction to the fingerprint module via the multimedia chip; in response to the switching instruction, the fingerprint module communicates with the main control MCU via the second bus and the multimedia chip.

[0006] It should be noted that the first bus can be understood as an I2C (inter-integrated circuit), and the second bus can be understood as a serial peripheral interface (SPI) bus.

[0007] Based on the above solution, the main control MCU of the device can detect whether I2C is normal. When the first bus is normal, the fingerprint module can communicate with the main control MCU directly through I2C. When the first bus is abnormal, the fingerprint module switches to the second bus and communicates with the main control MCU via the multimedia chip. Avoid the main control MCU being unable to send control instructions to the fingerprint module or the fingerprint module being unable to send various events to the main control MCU due to I2C abnormality, affecting the fingerprint recognition process.

[0008] In combination with the first aspect, in some implementations of the first aspect, the method further includes: the main control MCU sends an identification instruction to the multimedia chip through the second bus; in response to the identification instruction, the multimedia chip performs fingerprint identification according to the identification instruction.

[0009] It should be noted that the multimedia chip performs MOH recognition according to the recognition instruction. When the I2C is abnormal, the main control MCU sends a control instruction to the multimedia chip to trigger the multimedia chip to perform MOH recognition to ensure the normal progress of the fingerprint recognition process.

[0010] In combination with the first aspect, in certain implementations of the first aspect, before the main control MCU determines that there is an abnormality in the first bus, the method also includes: the fingerprint module sends a sensor interrupt signal to the main control MCU in response to a user's pressing operation; and the main control MCU controls the fingerprint module to power on in response to the sensor interrupt signal.

[0011] In combination with the first aspect, in certain implementations of the first aspect, the main control MCU determines that there is an abnormality in the first bus, including: the main control MCU determines that the first bus is abnormal based on a failure to read the first bus, wherein the failure to read the first bus indicates that the fingerprint module fails to send an event to the main control MCU through the first bus, or the failure to read the first bus indicates that the main control MCU fails to receive an event from the fingerprint module through the first bus.

[0012] In combination with the first aspect, in some implementations of the first aspect, the event includes: an initialization event and / or a pressing event of the fingerprint module.

[0013] It should be noted that before the main control MCU determines to switch the first bus to the second bus, it is necessary to determine whether the first bus is normal. When the fingerprint module is powered on, the fingerprint module can perform initialization processing. If the I2C between the fingerprint module and the main control MCU is normal, the fingerprint module can send initialization events and press events to the main control MCU through I2C. When the fingerprint module is powered on, I2C may be abnormal at any time. When I2C is abnormal, the fingerprint module will not be able to send initialization events and / or press events to the main control MCU through I2C, or the main control MCU will not be able to receive initialization events and / or press events sent by the fingerprint module through I2C.

[0014] It should be noted that the master MCU can receive an I2C interrupt signal. The master MCU receiving the I2C interrupt signal indicates that the master MCU may subsequently receive other data through I2C. In other words, after the master MCU receives the I2C interrupt signal, it will try to read the content sent subsequently (for example, an initialization event, a press event, or other data). If the master MCU does not receive the sent content through I2C within a period of time, it is determined that the first bus read fails, that is, the first bus is abnormal.

[0015] Exemplarily, the fingerprint module responds to the user's pressing operation and sends a sensor interrupt signal to the main control MCU, which controls the fingerprint module to power on. When the main control MCU does not receive an event sent by the fingerprint module through I2C within a period of time (e.g., 300ms) after receiving the sensor interrupt signal, and the number of I2C errors reaches a certain threshold (e.g., three times), the main control MCU determines that I2C is abnormal.

[0016] Based on the above solution, the main control MCU can monitor whether the I2C is normal at any time after the fingerprint module is powered on, and promptly instruct the fingerprint module to switch to SPI when the I2C is abnormal, so as to avoid affecting the subsequent fingerprint recognition process.

[0017] In combination with the first aspect, in certain implementations of the first aspect, the multimedia chip performs fingerprint recognition, including: the multimedia chip sends a picture collection instruction to the fingerprint module; the fingerprint module feeds back a picture collection result to the multimedia chip in response to the picture collection instruction; the multimedia chip performs the fingerprint recognition according to the picture collection result to obtain a fingerprint recognition result.

[0018] Specifically, after receiving the MOH recognition instruction, the multimedia chip sends a picture acquisition instruction to the fingerprint module through SPI. When the fingerprint module completes the picture acquisition task, it feeds back the picture acquisition result to the multimedia chip through SPI. The multimedia chip compares the picture acquisition result with the pre-stored data, and the comparison result is the MOH recognition result.

[0019] In combination with the first aspect, in some implementations of the first aspect, the method further includes: the multimedia chip sends the fingerprint recognition result to the main control MCU; and the main control MCU processes the recognition result according to the fingerprint recognition result.

[0020] In combination with the first aspect, in certain implementations of the first aspect, the fingerprint recognition result includes successful fingerprint recognition, or failed fingerprint recognition; the main control MCU performs recognition result processing according to the fingerprint recognition result, including: the main control MCU prompts the user of successful recognition according to the successful fingerprint recognition; or the main control MCU prompts the user of failed recognition according to the failed fingerprint recognition.

[0021] It is understandable that after the main control MCU receives the fingerprint recognition result, it can process the recognition result. The recognition result processing can be understood as prompting the user of the fingerprint recognition result. Exemplarily, the main control MCU recognition result processing method includes but is not limited to prompting the user of the fingerprint recognition result through the user interface, or prompting the user of the fingerprint recognition result through audio. The method of prompting through the user interface can be applied to mobile phones, and the method of prompting the user through audio can be applied to smart door locks.

[0022] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: the main control MCU sends a sleep instruction to the fingerprint module via the multimedia chip; the fingerprint module responds to the sleep instruction and feeds back a sleep result to the main control MCU via the multimedia chip, and the sleep result indicates that the state of the fingerprint module is a sleep state.

[0023] That is to say, when the user presses the fingerprint module to trigger the MOH recognition process, the fingerprint module can enter the sleep state regardless of whether the fingerprint recognition is successful. The main control MCU sends a sleep command to the fingerprint module through the multimedia chip via SPI, and the fingerprint module enters the sleep state under the control of the main control MCU. It can be seen that when I2C is abnormal, after switching to SPI communication, the information exchanged between the main control MCU and the fingerprint module needs to be forwarded via the multimedia chip.

[0024] In combination with the first aspect, in some implementations of the first aspect, when the fingerprint recognition result is that the fingerprint recognition is successful, the method further includes: the main control MCU sends a power-off instruction to the fingerprint module via the multimedia chip.

[0025] In combination with the first aspect, in certain implementations of the first aspect, when the fingerprint recognition result is that the fingerprint recognition fails, the method also includes: the fingerprint module responds to the user's second pressing operation, and sends a second pressing event to the main control MCU via the multimedia chip; when the main control MCU receives the second pressing event within a preset time length, the main control MCU sends the recognition instruction to the multimedia chip through the second bus; when the main control MCU does not receive the second pressing event within the preset time length, the main control MCU sends a power-off instruction to the fingerprint module via the multimedia chip.

[0026] Exemplarily, the preset duration can be set to 8s.

[0027] It should be noted that when the main control MCU receives another press event within the preset time, fingerprint recognition can continue through SPI. Since it has been switched to SPI before, the main control MCU does not need to determine again whether the first bus is abnormal. When the fingerprint recognition is successful, or the main control MCU does not receive another press event within the preset time (indicating fingerprint recognition timeout), the fingerprint recognition process ends and the fingerprint module is powered off. During the next fingerprint recognition, the main control MCU needs to re-determine whether the first bus is abnormal.

[0028] In a second aspect, a fingerprint recognition device is provided, characterized in that the device includes a fingerprint module, a multimedia chip and a main microcontroller unit MCU, the main control MCU communicates with the fingerprint module through a first bus, the multimedia chip communicates with the fingerprint module through a second bus, and the main control MCU communicates with the multimedia chip through the second bus; the main control MCU is used to determine that the first bus is abnormal; the main control MCU is also used to send a switching instruction to the fingerprint module via the multimedia chip; the fingerprint module is also used to communicate with the main control MCU via the second bus and the multimedia chip in response to the switching instruction.

[0029] In combination with the second aspect, in some implementations of the second aspect, the main control MCU is further used to send an identification instruction to the multimedia chip through the second bus; and the multimedia chip is used to perform fingerprint identification in response to the identification instruction.

[0030] In combination with the second aspect, in certain implementations of the second aspect, before the main control MCU is used to determine that there is an abnormality in the first bus, the fingerprint module is used to send a sensor interrupt signal to the main control MCU in response to a user's pressing operation; the main control MCU is also used to control the fingerprint module to power on in response to the sensor interrupt signal.

[0031] In combination with the second aspect, in certain implementations of the second aspect, the master MCU is specifically used to determine that the first bus is abnormal based on the failure to read the first bus, wherein the failure to read the first bus indicates that the fingerprint module fails to send an event to the master MCU through the first bus, or the failure to read the first bus indicates that the master MCU fails to receive an event from the fingerprint module through the first bus.

[0032] In combination with the second aspect, in some implementations of the second aspect, the event includes: an initialization event and / or a pressing event of the fingerprint module.

[0033] In combination with the second aspect, in certain implementations of the second aspect, the multimedia chip is specifically used to send a picture taking instruction to the fingerprint module; the fingerprint module is also used to feedback a picture taking result to the multimedia chip in response to the picture taking instruction; the multimedia chip is also used to perform the fingerprint recognition based on the picture taking result to obtain a fingerprint recognition result.

[0034] In combination with the second aspect, in some implementations of the second aspect, the multimedia chip is further used to send the fingerprint recognition result to the main control MCU; the main control MCU is further used to process the recognition result according to the fingerprint recognition result.

[0035] In combination with the second aspect, in some implementations of the second aspect, the fingerprint recognition result includes fingerprint recognition success, or fingerprint recognition failure; the main control MCU is specifically used to prompt the user of recognition success based on the fingerprint recognition success; or is specifically used to prompt the user of recognition failure based on the fingerprint recognition failure.

[0036] In combination with the second aspect, in certain implementations of the second aspect, the main control MCU is further used to send a sleep instruction to the fingerprint module via the multimedia chip; the fingerprint module is further used to respond to the sleep instruction and feedback a sleep result to the main control MCU via the multimedia chip, and the sleep result indicates that the state of the fingerprint module is a sleep state.

[0037] In combination with the second aspect, in some implementations of the second aspect, when the fingerprint recognition result is that the fingerprint recognition is successful, the main control MCU is further used to send a power-off instruction to the fingerprint module via the multimedia chip.

[0038] In combination with the second aspect, in certain implementations of the second aspect, when the fingerprint recognition result is that the fingerprint recognition fails, the fingerprint module is also used to respond to the user's second pressing operation and send a second pressing event to the main control MCU via the multimedia chip; when the main control MCU receives the second pressing event within a preset time length, the main control MCU is also used to send the recognition instruction to the multimedia chip through the second bus; when the main control MCU does not receive the second pressing event within the preset time length, the main control MCU is also used to send a power-off instruction to the fingerprint module via the multimedia chip.

[0039] In combination with the second aspect, in certain implementations of the second aspect, the fingerprint recognition device is carried in a smart door lock.

[0040] In a third aspect, a fingerprint recognition device is provided, comprising: a processor coupled to a memory, the memory being used to store a program, the processor being used to run the program, so that the fingerprint recognition device executes the method in the first aspect and any possible implementation thereof.

[0041] In combination with the third aspect, in some implementations of the third aspect, one or more of the memory and the transceiver are also included, and the transceiver is used to receive signals and / or send signals.

[0042] In combination with the third aspect, in certain implementations of the third aspect, the fingerprint recognition device is a smart door lock.

[0043] In a fourth aspect, a device is provided, comprising: one or more processors; one or more memories; a display screen; the one or more memories storing one or more programs, the one or more programs comprising instructions, which, when executed by the one or more processors, enable the device to perform the method in the first aspect and any possible implementation thereof.

[0044] In a fifth aspect, a readable storage medium is provided, on which a program is stored. When the program is executed by a device, the device implements the method in the first aspect and any possible implementation thereof.

[0045] In a sixth aspect, a program product is provided, characterized in that when the program product is run on a device, the device is caused to execute the method in the first aspect and any possible implementation thereof.

[0046] In a seventh aspect, a chip system is provided, which includes a processor and a data interface, and the processor reads instructions stored in a memory through the data interface to execute the method in the first aspect and any possible implementation thereof.

[0047] In combination with the seventh aspect, in one possible implementation, the processor is coupled to the memory via an interface.

[0048] In combination with the seventh aspect, in a possible implementation, the chip system also includes a memory, in which programs or instructions are stored. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a schematic diagram of a scenario provided in an embodiment of the present application.

[0050] Figure 2 It is a system architecture diagram provided in an embodiment of the present application.

[0051] Figure 3 It is a schematic flow chart of a fingerprint recognition method provided in an embodiment of the present application.

[0052] Figure 4 It is a schematic flow chart of a fingerprint recognition method provided in an embodiment of the present application.

[0053] Figure 5 It is a schematic flow chart of a fingerprint recognition method provided in an embodiment of the present application.

[0054] Figure 6 It is a set of GUIs provided by the embodiments of the present application.

[0055] Figure 7 It is a schematic flow chart of a fingerprint recognition method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0057] The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0058] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0059] The following is an introduction to the professional terms involved in the embodiments of the present application.

[0060] I2C (inter integrated circuit) bus

[0061] A synchronous, half-duplex communications bus that requires two wires to transfer information between devices connected to the bus.

[0062] Serial peripheral interface (SPI)

[0063] A high-speed, full-duplex, synchronous communication bus that enables a microcontroller unit (MCU) to communicate with various peripheral devices in a serial manner to exchange information.

[0064] With the development of science and technology, fingerprint recognition technology can be applied to a variety of devices. In some embodiments, the device can be a portable device that also includes other functions such as a personal digital assistant and / or a music player, such as a mobile phone, a tablet computer, a laptop computer, a wearable device with wireless communication function (such as a smart watch), etc. Exemplary embodiments of portable devices include but are not limited to devices equipped with Or a portable device of other operating systems. It should also be understood that in some other embodiments, the above device may also be a desktop computer. In some other embodiments, the device may be a smart door lock.

[0065] For example, Figure 1As shown, a device to which the method provided by the embodiment of the present application can be applied is shown, including a smart door lock 100 and a mobile phone 200. Fingerprint unlocking of the device can be achieved through fingerprint recognition technology. Fingerprint recognition technology is a technology for identity recognition. Compared with the user entering a password, the device recognizes the user's identity based on the fingerprint, which is more convenient and faster, and has higher security. In fingerprint recognition technology, the main control MCU can communicate with the fingerprint module through I2C, but random anomalies may occur in I2C. When the I2C bus interference is large, it will affect the stability of I2C communication and cause I2C to be abnormal. When I2C is abnormal, the main control MCU communicates abnormally with the fingerprint module, and it is difficult for the fingerprint module to process tasks normally under the control of the main control MCU, which leads to the fingerprint chip match (match on chip, MOC) and host match (match on host, MOH) of the fingerprint failing to work properly.

[0066] Therefore, in order to prevent the fingerprint MOC and MOH from not working when an abnormality occurs in I2C, thereby causing the fingerprint recognition process to fail, the embodiment of the present application provides a fingerprint recognition method and device, when an abnormality occurs in I2C, it switches to the SPI path, so that the fingerprint MOH recognition and the execution of various instructions are realized through the SPI path. This allows the fingerprint recognition to be successfully completed even when an abnormality occurs in I2C.

[0067] like Figure 2 As shown, a system architecture diagram provided by an embodiment of the present application is shown, and the system architecture can be applied to Figure 3 The smart door lock, mobile phone and other devices that support fingerprint recognition function are shown. The system structure may include a main control MCU, a multimedia chip and a fingerprint module.

[0068] Specifically, the main control MCU can be used to control or manage the fingerprint module and the multimedia chip. The main control MCU includes a management module and an MCU driver. The main control MCU can communicate with the fingerprint module and the multimedia chip through the MCU driver, wherein the main control MCU communicates with the fingerprint module through I2C, and the main control MCU communicates with the multimedia chip through SPI. The management module can also include modules for implementing different management functions such as fingerprint management, identification management or entry management. The multimedia chip includes an MOH identification module and an SPI driver. Among them, the MOH identification module can perform MOH identification tasks, and the multimedia chip can communicate with the fingerprint module and the main control MCU through the SPI driver. The fingerprint module includes a sensor, a fingerprint module MCU, an I2C information processing, and an SPI information processing. Among them, the sensor is used to obtain the user's press signal, and can communicate with the main control MCU through a general purpose input / output (GPIO), the fingerprint module MCU is used to perform MOC identification tasks, the I2C information processing is used to process the information obtained through I2C, and the SPI information processing is used to process the information obtained through SPI. Exemplarily, the multimedia chip can be a multimedia image signal processor (ISP).

[0069] According to the above introduction, the communication between the fingerprint module and the main control MCU can rely on I2C, and I2C anomalies generally occur randomly. Figure 3 As shown, a schematic flow chart of a fingerprint recognition method is shown, and a fingerprint recognition method when I2C is normal is introduced. The method can be applied to Figure 2 The system architecture shown in FIG. The method is described in detail below.

[0070] S301, the fingerprint module generates a sensor interrupt signal in response to a pressing operation by a user.

[0071] S302, the fingerprint module sends a sensor interrupt signal, and accordingly, the MCU driver receives the sensor interrupt signal.

[0072] It should be noted that the fingerprint module includes a sensor. When the user presses the sensor of the fingerprint module, a corresponding sensor interrupt signal can be generated. The sensor interrupt signal can be sent to the main control MCU through GPIO. Among them, the main control MCU includes a management module and an MCU driver.

[0073] S303, the MCU driver sends power-on indication information, and accordingly, the fingerprint module receives the power-on indication information.

[0074] S304, the management module sends power-on indication information, and correspondingly, the multimedia chip receives the power-on indication information.

[0075] It is understandable that when the main control MCU obtains the sensor interrupt signal, it can send power-on indication information to the multimedia chip and the fingerprint module respectively. Exemplarily, the MCU driver sends the power-on indication information to the fingerprint module through GPIO, and the management module sends the power-on indication information to the multimedia chip through SPI.

[0076] S305, fingerprint module initialization.

[0077] It is understandable that when the main control MCU controls the fingerprint module to power on, the fingerprint module performs initialization processing.

[0078] S306, the fingerprint module sends an initialization event and a press event, and correspondingly, the management module receives the initialization event and the press event.

[0079] It is understandable that when the fingerprint module is powered on, a press event and an initialization event can be sent to the main control MCU via I2C. Among them, the fingerprint module initialization can be understood as the fingerprint module preparing for subsequent processing of other tasks (for example, processing I2C messages, processing SPI messages or MOC recognition).

[0080] S307, the MCU driver determines that the I2C is normal.

[0081] S308, the MCU driver sends an I2C normal event, and correspondingly, the management module receives the I2C normal event.

[0082] It can be understood that step S307 and step S308 are optional steps.

[0083] It should be noted that the driver layer (MCU driver) of the main control MCU can receive the I2C interrupt signal. The MCU driver receiving the I2C interrupt signal indicates that the MCU driver may subsequently receive other data through I2C. When the MCU driver can receive the sent content through I2C within a period of time, it can be determined that the I2C communication is normal. Based on this, the management module obtains the I2C normal event.

[0084] It should be noted that when the I2C communication is normal, the main control MCU can communicate normally with the fingerprint module through I2C. Furthermore, based on the normal communication between the main control MCU and the fingerprint module, the normal execution of the response to the user's pressing operation, fingerprint recognition, and the subsequent power-off process of the fingerprint module can be guaranteed.

[0085] It is understandable that after the fingerprint module is powered on, the MCU driver can identify whether the I2C is normal at any time. In other words, step S306 can be executed after step S303, but the specific execution order is not limited.

[0086] S309, multimedia chip initialization.

[0087] S310, the multimedia chip sends an initialization result, and correspondingly, the management module receives the initialization result.

[0088] It is understandable that the multimedia chip can be initialized after it is powered on. That is, step S310 can be performed after step S304. The multimedia chip initialization can be understood as the multimedia chip preparing for subsequent processing of other tasks (eg, MOH identification).

[0089] S311, the management module identifies an initialization event.

[0090] S312, the management module sends a MOC identification instruction, and correspondingly, the fingerprint module receives the MOC identification instruction.

[0091] S313, the fingerprint module performs MOC recognition.

[0092] S314, the fingerprint module sends the MOC recognition result, and correspondingly, the management module receives the MOC recognition result.

[0093] It should be noted that when I2C is normal, the main control MCU and the fingerprint module can communicate normally. The main control MCU sends the MOC recognition command to the fingerprint module through I2C, and the fingerprint module performs MOC recognition. The fingerprint module feeds back the recognition result to the main control MCU.

[0094] Specifically, the fingerprint module MCU in the fingerprint module can perform MOC recognition.

[0095] It should be noted that the main control MCU can not only send MOC identification instructions to the fingerprint module through I2C, but also send MOH identification instructions to the multimedia chip through SPI. In other words, MOC identification can be performed, and MOH identification can also be performed. But generally speaking, when the user presses, the main control MCU powers on the fingerprint module and the multimedia chip respectively, but the time required to power on the fingerprint module and the multimedia chip is different. The multimedia chip takes a longer time to power on, while the power-on and MOC identification process of the fingerprint module is faster. Therefore, the fingerprint module can complete the power-on, initialization and MOC identification process relatively quickly. When the fingerprint module MOC identification is completed, the multimedia chip may just be initialized.

[0096] That is, since the fingerprint module initialization and MOC identification process are completed quickly, when the I2C communication is normal, although the fingerprint module can perform MOC identification and the multimedia chip can also perform MOH identification, the MOC identification of the fingerprint module can be completed first.

[0097] It should be noted that, since the fingerprint module needs a short time to be powered on and initialized, the multimedia chip may be ready only after the fingerprint module has completed MOC recognition. Therefore, the above steps S308 and S309 may be completed only after step S314.

[0098] It can be seen that the fingerprint recognition method can usually support MOC recognition and MOH recognition.

[0099] It should be noted that MOC recognition and MOH recognition are two different fingerprint recognition technologies. Among them, MOC recognition is to complete all recognition tasks through the fingerprint module; MOH recognition is to collect images through the fingerprint module and complete the recognition task through the machine position. In short, the fingerprint module can perform MOC recognition, and the multimedia chip can perform MOH recognition.

[0100] It is not difficult to understand that there are two possible results for MOC recognition: one is successful fingerprint recognition, and the other is failed fingerprint recognition. The following is a brief introduction to these two situations.

[0101] In one case, S315, the management module processes the identification successfully.

[0102] It can be understood that the fingerprint module obtains the MOC recognition result through MOC recognition, and the fingerprint comparison in the recognition result is consistent, indicating that the recognition is successful.

[0103] It should be noted that after receiving the recognition result, the management module may process the recognition result. The management module may process the recognition result by prompting the user of successful recognition through a user interface or by prompting the user of successful recognition through an audio signal.

[0104] S316, the management module sends a sleep instruction, and correspondingly, the fingerprint module receives the sleep instruction.

[0105] S317, the fingerprint module sends the sleep result, and correspondingly, the management module receives the sleep result.

[0106] S318, the management module processes the sleep result.

[0107] It should be noted that after the user presses, the MOC recognizes that the fingerprint is consistent, and the management module prompts the user that the recognition is successful. The management module can control the fingerprint module to enter a dormant state.

[0108] It should be noted that the fingerprint module can feed back the dormancy result to the management module, and the management module can process the dormancy result. The management module processing the dormancy result can be understood as whether the management module receives another pressing event of the user within a certain period of time.

[0109] Exemplarily, if the management module receives a press event within 8 seconds, the next fingerprint recognition process can be performed; if the management module does not receive a press event within 8 seconds, or it can be understood that no user presses the sensor for 8 seconds, the management module can control the fingerprint module to power off.

[0110] In another case, S319, the management module processing identification fails.

[0111] It is understandable that the fingerprint module obtains the MOC recognition result through MOC recognition. If the fingerprint comparison in the recognition result is inconsistent or the fingerprint acquisition is not completed, it means that the recognition has failed.

[0112] It should be noted that after receiving the recognition result, the management module may process the recognition result. The management module may process the recognition result by notifying the user of the recognition failure through the user interface or by audio prompting the user of the recognition failure.

[0113] S320: The fingerprint module determines a pressing event in response to the user's pressing operation again.

[0114] S321, the MCU driver determines whether the I2C is normal or abnormal.

[0115] S322, the MCU driver sends a normal or abnormal event, and accordingly, the management module receives the I2C normal or abnormal event.

[0116] S323, the fingerprint module sends a press event, and correspondingly, the management module receives the press event.

[0117] It should be noted that after the recognition fails, similar to the above steps S316 to S318, the management module can control the fingerprint module to enter a sleep state, and the fingerprint module responds to the user's press again within a certain period of time (for example, 8s), and the user's press again can trigger the next fingerprint recognition process.

[0118] It is understandable that in the above step S307, the MCU driver determines that I2C is normal. Based on the normal I2C, the fingerprint module can perform MOC recognition in step S313. It can be seen that when I2C is normal, the fingerprint recognition process can be completed based on the I2C communication between the main control MCU and the fingerprint module. However, since the I2C of the fingerprint recognition process triggered by the previous user press is normal, the MCU driver needs to confirm again whether I2C is normal when the user presses the next time. If I2C is abnormal, the main control MCU cannot obtain the user's next press event, and thus cannot control the subsequent control instructions sent through I2C. Therefore, based on this situation, every time the user presses, it is necessary to re-determine whether I2C is normal.

[0119] When the MCU driver determines that the I2C is normal, the management module can continue to execute subsequent steps.

[0120] S324, the management module sends a MOC identification instruction, and correspondingly, the fingerprint module receives the MOC identification instruction.

[0121] S325, the management module sends an MOH identification instruction, and correspondingly, the multimedia chip receives the MOH identification instruction.

[0122] It should be noted that, since the fingerprint module completes initialization in step S305 and the multimedia chip completes initialization in step S309, it can be understood that the fingerprint module and the multimedia chip are ready for identification processing. The management module can send identification instructions to the fingerprint module and the multimedia chip respectively, and the fingerprint module can perform MOC identification according to the MOC identification instruction, and the multimedia chip can perform MOH identification according to the MOH identification instruction.

[0123] It is understandable that the management module can obtain the MOC recognition result from the fingerprint module and the MOH recognition result from the multimedia chip, respectively. In addition, the management module can process the recognition success result or the recognition failure result similar to the above steps S315 or S319, and further execute subsequent steps.

[0124] Based on the above solution, when I2C is normal, the fingerprint module can communicate normally with the main control MCU, and the fingerprint module can send various events to the main control MCU. At the same time, the main control MCU can control the fingerprint module to perform MOC recognition and control the multimedia chip to perform MOH recognition. In addition, the main control MCU can send control to the fingerprint module to control the fingerprint module to sleep or power off.

[0125] Furthermore, if Figure 4 As shown, a schematic flow chart of a fingerprint recognition method is shown, and a fingerprint recognition method when I2C is abnormal is introduced. The method can be applied to Figure 2The system architecture shown in FIG. The method is described in detail below.

[0126] S401, the fingerprint module generates a sensor interrupt signal in response to a pressing operation by a user.

[0127] S402, the fingerprint module sends a sensor interrupt signal, and accordingly, the MCU driver receives the sensor interrupt signal.

[0128] That is to say, when the user presses the sensor, the main control MCU can obtain the sensor interrupt signal. The main control MCU includes a management module and an MCU driver.

[0129] S403, the MCU driver sends power-on indication information, and accordingly, the fingerprint module receives the power-on indication information.

[0130] S404, the management module sends power-on indication information, and correspondingly, the multimedia chip receives the power-on indication information.

[0131] It can be understood that the main control MCU sends power-on indication information to the fingerprint module and the multimedia chip respectively.

[0132] S405, fingerprint module initialization.

[0133] S406, the fingerprint module sends an initialization event and a press event, and correspondingly, the management module receives the initialization event and the press event.

[0134] It is understandable that when the main control MCU controls the fingerprint module to power on, the fingerprint module performs initialization processing.

[0135] S407, the MCU driver determines that the I2C is abnormal.

[0136] S408, the MCU driver sends an I2C abnormal event.

[0137] It should be noted that the driver layer (MCU driver) of the main control MCU can receive the I2C interrupt signal. The MCU driver receiving the I2C interrupt signal indicates that the MCU driver may receive other data through I2C in the future. After receiving the I2C interrupt signal, the MCU driver attempts to read the content sent subsequently. If the MCU driver does not receive the content sent through I2C within a period of time, it determines that the I2C is abnormal. Based on this, the management module obtains the I2C abnormal event.

[0138] It should be noted that when the user presses the sensor, the main control MCU can control the fingerprint module to power on. After the fingerprint module is powered on, I2C may be abnormal at any time. In other words, after the fingerprint module is powered on, the MCU driver determines whether there is an abnormality in I2C at any time. Before the fingerprint module sends the press event in step S406 above, the MCU driver may have identified the I2C abnormality. In other words, step S407 can be before step S406.

[0139] For example, when the user presses the sensor and the fingerprint module is powered on, if the MUC driver does not receive a pressing event sent by the fingerprint module through I2C within a period of time (for example, 300ms) after receiving the sensor interrupt signal, and the number of I2C errors reaches a certain threshold (for example, three times), it can be considered that I2C is abnormal.

[0140] It is understandable that when I2C is abnormal, the main control MCU cannot communicate directly with the fingerprint module through I2C. Figure 2 Introduction to the system architecture: the multimedia chip can communicate with the main control MCU through SPI, and the fingerprint module can communicate with the multimedia chip through SPI. Based on this, when I2C is abnormal, the main control MCU needs to send instructions to the fingerprint module through SPI, and at the same time, the fingerprint module sends various events to the main control MCU through SPI.

[0141] S409: The management module determines to switch to SPI.

[0142] It is understandable that when I2C is abnormal, the master MCU determines to switch to SPI, and subsequently sends instructions via SPI.

[0143] S410, multimedia chip initialization.

[0144] S411, the multimedia chip sends an initialization result, and correspondingly, the management module receives the initialization result.

[0145] It is understandable that the multimedia chip can be initialized after it is powered on. That is, step S411 can be performed after step S404. The multimedia chip initialization can be understood as the multimedia chip preparing for subsequent processing of other tasks (eg, MOH identification).

[0146] S411, the management module identifies an initialization event.

[0147] S412, the management module sends an instruction to switch to SPI, and correspondingly, the multimedia chip receives the instruction to switch to SPI.

[0148] S413, the multimedia chip sends an instruction to switch to SPI, and correspondingly, the fingerprint module receives the instruction to switch to SPI.

[0149] S414, the fingerprint module switches to SPI.

[0150] It should be noted that when I2C is abnormal, the management module determines to switch to SPI, and needs to send a switching instruction to the fingerprint module to control the fingerprint module to switch to SPI communication. According to the above records, the main control MCU directly communicates and interacts with the fingerprint module through I2C. When I2C is abnormal, the main control MCU will not be able to directly send a switching instruction to the fingerprint module through I2C. Therefore, the main control MCU sends a switching instruction to the multimedia chip through SPI, and the multimedia chip sends a switching instruction to the fingerprint module through SPI. In other words, the instructions sent by the main control MCU to the fingerprint module can be forwarded via the multimedia chip.

[0151] It is understandable that according to the above Figure 2 From the introduction of the system architecture, it can be seen that the fingerprint module can include an I2C information processing module and an SPI information processing module. When the fingerprint module switches to SPI communication, the SPI message processing module in the fingerprint module can process the subsequent instructions sent through SPI.

[0152] S415, the fingerprint module sends an initialization event, and correspondingly, the management module receives the initialization event.

[0153] S416, the management module identifies the initialization event.

[0154] It is understandable that when the fingerprint module receives the switching instruction, it can be reinitialized and send an initialization event to the main control MCU via SPI.

[0155] Optionally, the fingerprint module can also send a press event to the main control MCU via SPI.

[0156] It should be noted that the fingerprint module sends events to the main control MCU, which also need to be transmitted via the multimedia chip. In other words, the fingerprint module sends initialization events and press events to the multimedia chip via SPI, and the multimedia chip sends initialization time and press events to the main control MCU via SPI.

[0157] S417, the management module sends an MOH identification instruction, and correspondingly, the multimedia chip receives the MOH identification instruction.

[0158] It is understandable that the multimedia chip includes an MOH identification module. When the I2C is abnormal, the main control MCU sends an instruction to the multimedia chip to instruct the MOH identification module in the multimedia chip to perform MOH identification.

[0159] S418, the multimedia chip sends a picture acquisition instruction, and correspondingly, the fingerprint module receives the picture acquisition instruction.

[0160] S419, fingerprint module captures images.

[0161] S420, the fingerprint module sends the image acquisition result, and correspondingly, the multimedia chip receives the image acquisition result.

[0162] S421, the multimedia chip performs MOH identification.

[0163] It should be noted that after the multimedia chip receives the MOH recognition instruction, it can send a picture acquisition instruction to the fingerprint module via SPI. When the fingerprint module completes the picture acquisition task, it sends the picture acquisition result to the multimedia chip via SPI. The multimedia chip compares the picture acquisition result with the pre-stored data, and the comparison result is the result of MOH recognition.

[0164] S422, the multimedia chip sends the MOH identification result, and correspondingly, the management module receives the MOH identification result.

[0165] Exemplarily, the multimedia chip sends the MOH recognition result to the main control MCU via SPI, and the recognition result may include fingerprint recognition success or fingerprint recognition failure.

[0166] S423, the management module processes and identifies successfully.

[0167] It can be understood that the multimedia chip obtains the MOH recognition result through MOH recognition, and the fingerprint comparison in the recognition result is consistent, indicating that the recognition is successful.

[0168] It should be noted that after receiving the recognition result, the management module may process the recognition result. The management module may process the recognition result by prompting the user that the recognition is successful through a user interface or by prompting the user that the recognition is successful through an audio signal.

[0169] S424, the management module sends a sleep instruction, and correspondingly, the fingerprint module receives the sleep instruction.

[0170] S425, the fingerprint module sends the sleep result, and correspondingly, the management module receives the sleep result.

[0171] S426, the management module performs sleep result processing.

[0172] S427, the management module sends a power-off instruction, and correspondingly, the fingerprint module receives the power-off instruction.

[0173] It should be noted that after the user presses, the MOH identifies the fingerprints and confirms that they are consistent, and the management module prompts the user that the identification is successful. The management module sends a sleep command to the multimedia chip via SPI, and the multimedia chip sends a sleep command to the fingerprint module via SPI, so that the fingerprint module enters a sleep state under the control of the main control MCU.

[0174] It should be noted that the fingerprint module sends the sleep result to the multimedia chip via SPI, and the multimedia chip sends the sleep result to the main control MCU via SPI.

[0175] That is to say, after switching to SPI communication, the information exchanged between the main control MCU and the fingerprint module needs to be forwarded via the multimedia chip.

[0176] It is understandable that when the management module does not receive a press event again within a period of time (for example, 8s), the management module sends a power-off command to the multimedia chip via SPI, and the multimedia chip sends a power-off command to the fingerprint module via SPI, so that the main control MCU controls the fingerprint module to power off. When the management module receives a press event again within a certain period of time (for example, 8s), the user's press again can trigger the next fingerprint recognition process.

[0177] It is understandable that in the above step S414, the fingerprint module has been switched to SPI. Therefore, when the management module receives a press event again within a certain period of time, the fingerprint recognition process can continue through SPI. It can be seen that in the above method 300, since I2C is normal, when the management module receives a press event within a certain period of time, the MCU driver will execute the operation of determining whether I2C is normal in step S321. In method 400, due to the abnormality of I2C, the fingerprint module has been switched to SPI. When the management module receives a press event within a certain period of time, the MCU driver can continue to perform the fingerprint recognition process through SPI without determining whether I2C is normal again, until the fingerprint recognition is successful, or the management module does not receive a press event within a certain period of time (fingerprint recognition timeout), the fingerprint recognition process ends.

[0178] Similar to the above description of method 300, the recognition result may also be a failure. When the management module receives a failed recognition result, it may continue to execute the following steps: Figure 5 The steps shown, Figure 5 The steps in can also be applied to Figure 2 In the system architecture shown, the following Figure 5 Give a detailed introduction.

[0179] S501: The management module fails to process and identify the failure.

[0180] It is understandable that the multimedia chip obtains an MOH recognition result through MOH recognition. If the fingerprint comparison in the recognition result is inconsistent or the acquired fingerprint is incomplete, it means that the recognition has failed.

[0181] It should be noted that after receiving the recognition result, the management module may process the recognition result. The management module may process the recognition result by notifying the user of the recognition failure through the user interface or by audio prompting the user of the recognition failure.

[0182] For example, Figure 6 As shown, a set of graphical user interfaces (GUIs) are provided, and a method of processing identification results by a management module is shown by taking mobile phone fingerprint recognition unlocking as an example.

[0183] like Figure 6 As shown in (a) of FIG. 1 , the lock screen interface of the mobile phone is displayed. The lock screen interface displays a fingerprint unlocking area 601. In response to the user pressing the unlocking area 601, the mobile phone may display the following Figure 6 (b) or Figure 6 GUI shown in (c) in FIG.

[0184] like Figure 6 As shown in (b), in response to the user pressing the fingerprint unlocking area 601, the lock screen interface of the mobile phone is maintained. The lock screen interface displays a prompt message 602, and the specific content of the prompt message 602 is "Unlock failed, please try again", which is used to prompt the user that the recognition failed.

[0185] like Figure 6 As shown in (c), in response to the user pressing the fingerprint unlocking area 601, the main interface of the mobile phone is displayed. When the interface of the mobile phone switches from the lock screen interface to the main interface in response to the user's pressing operation, it means that the fingerprint recognition is successful.

[0186] S502: The fingerprint module determines a pressing event in response to the user's pressing operation again.

[0187] S503, the fingerprint module sends a pressing event, and correspondingly, the management module receives the pressing event.

[0188] It should be noted that when fingerprint recognition fails, the management module can also control the fingerprint module to enter a dormant state. When the management module receives a press event again within a certain period of time (e.g., 8 seconds) when the fingerprint module is in the dormant state, the MOH fingerprint recognition process can be continued.

[0189] It should be noted that when fingerprint recognition is successful (for example, step S423 in the above method 600), or after fingerprint recognition fails, the management module does not receive another press event within a certain period of time (for example, the management module does not execute step S503 within a certain period of time), it can be considered that the fingerprint recognition process is over. After the fingerprint recognition is completed, the fingerprint module sleeps, the multimedia chip is powered off, and the default I2C path can be restored. Since the I2C abnormality is a random event, it is necessary to re-determine whether the I2C is abnormal when the fingerprint module is powered on next time.

[0190] In method 500, if the management module receives another pressing event within a certain period of time (the management module executes step S503 within a certain period of time), the fingerprint recognition process is not completed, and the fingerprint recognition process triggered by the pressing event will continue to be completed through SPI. The MCU driver does not need to determine whether the I2C is normal again. Based on this, the subsequent MOH recognition process will continue to be completed through SPI.

[0191] S504, the management module sends an MOH identification instruction, and correspondingly, the multimedia chip receives the MOH identification instruction.

[0192] S505, the multimedia chip sends a picture acquisition instruction, and correspondingly, the fingerprint module receives the picture acquisition instruction.

[0193] S506, the fingerprint module collects images.

[0194] S507, the fingerprint module sends the image acquisition result, and correspondingly, the multimedia chip receives the image acquisition result.

[0195] S508, the multimedia chip performs MOH processing.

[0196] S509, the multimedia chip sends the MOH identification result, and correspondingly, the management module receives the MOH identification result.

[0197] S510: The management module processes and identifies successfully.

[0198] S511, the management module sends a sleep instruction, and correspondingly, the fingerprint module receives the sleep instruction.

[0199] S512, the fingerprint module sends a sleep result, and correspondingly, the management module receives the sleep result.

[0200] S513: The management module processes the sleep result.

[0201] S514, the management module sends a power-off instruction, and correspondingly, the fingerprint module receives the power-off instruction.

[0202] It can be understood that the above steps S504 to S514 are similar to steps S417 to S427 in method 400, and will not be described again here to avoid redundancy.

[0203] Based on the above solution, the device can detect I2C anomalies and switch to SPI when I2C is abnormal, so that the main control MCU can communicate with the fingerprint module through SPI, without affecting the sending of main control MCU instructions and the event sending process of the fingerprint module. It ensures that the fingerprint recognition function is normal when I2C is abnormal, and improves the stability of fingerprint recognition.

[0204] like Figure 7 As shown, a fingerprint recognition method provided by an embodiment of the present application is shown. The method can be applied to a device, and the device may include Figure 2 The system architecture is shown in the figure. The method is described in detail below.

[0205] It should be noted that the device includes a fingerprint module, a multimedia chip and a main control MCU. Among them, the main control MCU communicates with the fingerprint module through the first bus, the multimedia chip communicates with the fingerprint module through the second bus, and the main control MCU communicates with the multimedia chip through the second bus. It can be seen that when the first bus and the second bus are normal, the fingerprint module, the multimedia chip and the main control MCU can communicate with each other. The first bus can be understood as I2C, and the second bus can be understood as SPI.

[0206] S701, the main control MCU determines that an abnormality exists in the first bus.

[0207] It can be understood that before the main control MCU determines that there is an abnormality in the first bus, the main control MCU needs to determine whether the first bus is abnormal.

[0208] It should be noted that the fingerprint module can generate a sensor interrupt signal in response to a user's pressing operation, and send the sensor interrupt signal to the main control MCU. The main control MCU can control the fingerprint module to power on in response to the sensor interrupt signal.

[0209] Specifically, the main control MCU determines that the first bus is abnormal according to the failure to read the first bus, wherein the failure to read the first bus indicates that the fingerprint module fails to send an event to the main control MCU through the first bus, or the failure to read the first bus indicates that the main control MCU fails to receive an event from the fingerprint module through the first bus.

[0210] Exemplarily, the above events include initialization events and / or pressing events of the fingerprint module.

[0211] It should be noted that when the fingerprint module is powered on, the fingerprint module can be initialized. If the I2C between the fingerprint module and the main control MCU is normal, the fingerprint module can send initialization events and press events to the main control MCU through I2C. When the fingerprint module is powered on, I2C may be abnormal at any time. When I2C is abnormal, the fingerprint module will not be able to send initialization events and / or press events to the main control MCU through I2C, or the main control MCU will not be able to receive initialization events and / or press events sent from the fingerprint module through I2C.

[0212] It should be noted that the master MCU can receive an I2C interrupt signal. The master MCU receiving the I2C interrupt signal indicates that the master MCU may subsequently receive other data through I2C. In other words, after the master MCU receives the I2C interrupt signal, it will try to read the content sent subsequently (for example, an initialization event, a press event, or other data). If the master MCU does not receive the sent content through I2C within a period of time, it is determined that the first bus read fails, that is, the first bus is abnormal.

[0213] Exemplarily, the fingerprint module responds to the user's pressing operation and sends a sensor interrupt signal to the main control MCU, which controls the fingerprint module to power on. When the main control MCU does not receive an event sent by the fingerprint module through I2C within a period of time (e.g., 300ms) after receiving the sensor interrupt signal, and the number of I2C errors reaches a certain threshold (e.g., three times), the main control MCU determines that I2C is abnormal.

[0214] S702, the main control MCU sends a switching instruction to the fingerprint module via the multimedia chip.

[0215] It is understandable that when I2C is abnormal, the main control MCU determines to switch to SPI and generates a switching instruction, which is used to control the fingerprint module to switch to SPI communication. Due to the I2C abnormality, the main control MCU cannot directly send the switching instruction to the fingerprint module through I2C. Therefore, the main control MCU needs to send the switching instruction to the fingerprint module via the multimedia chip. In short, the multimedia chip can forward the control instructions sent by the main control MCU.

[0216] S703, in response to the switching instruction, the fingerprint module communicates with the main control MCU via the second bus via the multimedia chip.

[0217] That is to say, when the first bus is abnormal, the fingerprint module will not be able to communicate directly with the main control MCU through I2C. The fingerprint module will communicate with the multimedia chip through SPI, and then communicate with the main control MCU through the multimedia chip.

[0218] Furthermore, the main control MCU sends an identification instruction to the multimedia chip through the second bus; in response to the identification instruction, the multimedia chip performs fingerprint identification.

[0219] Exemplarily, the identification instruction may be the MOH identification instruction determined by the main control MCU in step S417 of the above method 400. The MOH identification module in the multimedia chip may perform MOH identification.

[0220] It should be noted that the multimedia chip sends a picture acquisition instruction to the fingerprint module, the fingerprint module responds to the picture acquisition instruction to acquire a picture, and feeds back the picture acquisition result to the multimedia chip, and the multimedia chip performs fingerprint recognition based on the picture acquisition result to obtain a fingerprint recognition result.

[0221] Specifically, after receiving the MOH recognition instruction, the multimedia chip sends a picture acquisition instruction to the fingerprint module through SPI. When the fingerprint module completes the picture acquisition task, it feeds back the picture acquisition result to the multimedia chip through SPI. The multimedia chip compares the picture acquisition result with the pre-stored data, and the comparison result is the MOH recognition result.

[0222] Furthermore, after the multimedia chip obtains the fingerprint recognition result, it can send the fingerprint recognition result to the main control MCU, and the main control MCU processes the recognition result according to the fingerprint recognition result. The fingerprint recognition result includes a successful fingerprint recognition or a failed fingerprint recognition. The main control MCU prompts the user that the recognition is successful according to the successful fingerprint recognition; or the main control MCU prompts the user that the recognition fails according to the failed fingerprint recognition.

[0223] It is understandable that after the main control MCU receives the fingerprint recognition result, it can process the recognition result. The recognition result processing can be understood as prompting the user of the fingerprint recognition result. Exemplarily, the main control MCU recognition result processing method includes but is not limited to prompting the user of the fingerprint recognition result through the user interface, or prompting the user of the fingerprint recognition result through audio. The method of prompting through the user interface can be applied to mobile phones, and the method of prompting the user through audio can be applied to smart door locks.

[0224] Exemplarily, the main control MCU can send a sleep command to the fingerprint module via the multimedia chip. The fingerprint module goes into sleep in response to the sleep command and feeds back a sleep result to the main control MCU via the multimedia chip. The sleep result indicates that the fingerprint module is in sleep state.

[0225] That is to say, when the user presses the fingerprint module to trigger the MOH recognition process, the fingerprint module can enter the sleep state regardless of whether the fingerprint recognition is successful. The main control MCU sends a sleep command to the fingerprint module via the multimedia chip through SPI, and the fingerprint module enters the sleep state under the control of the main control MCU. It can be seen that when I2C is abnormal, after switching to SPI communication, the information exchanged between the main control MCU and the fingerprint module needs to be forwarded via the multimedia chip.

[0226] When the fingerprint recognition result is successful, the main control MCU sends a power-off command to the fingerprint module via the multimedia chip, and the fingerprint module is powered off according to the power-off command, and the fingerprint recognition process ends.

[0227] When the fingerprint recognition result is a fingerprint recognition failure, the fingerprint module responds to the user's pressing operation again, and sends a pressing event to the main control MCU via the multimedia chip; when the main control MCU receives the pressing event again within the preset time, the main control MCU sends a recognition instruction to the multimedia chip through the second bus; when the main control MCU does not receive the pressing event again within the preset time, the main control MCU sends a power-off instruction to the fingerprint module via the multimedia chip. Among them, the recognition instruction is used to instruct MOH recognition.

[0228] Exemplarily, the preset duration can be set to 8s.

[0229] It should be noted that when the main control MCU receives another press event within the preset time, fingerprint recognition can continue through SPI. Since it has been switched to SPI before, the main control MCU does not need to determine again whether the first bus is abnormal. When the fingerprint recognition is successful, or the main control MCU does not receive another press event within the preset time (indicating fingerprint recognition timeout), the fingerprint recognition process ends and the fingerprint module is powered off. During the next fingerprint recognition, the main control MCU needs to re-determine whether the first bus is abnormal.

[0230] Based on the above solution, the device can detect I2C anomalies and switch to SPI when I2C is abnormal, so that the main control MCU can communicate with the fingerprint module through SPI, without affecting the sending of main control MCU instructions and the event sending process of the fingerprint module. It ensures that the fingerprint recognition function is normal when I2C is abnormal, and improves the stability of fingerprint recognition.

[0231] The embodiment of the present application provides a program product, when the program product is run on a device, the device executes the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above method-related embodiments, and will not be repeated here.

[0232] The embodiment of the present application provides a readable storage medium, which contains instructions. When the instructions are executed on a device, the device executes the technical solution of the above embodiment. The implementation principle and technical effect are similar and will not be repeated here.

[0233] The embodiment of the present application provides a chip, which is used to execute instructions. When the chip is running, the technical solution in the above embodiment is executed. The implementation principle and technical effect are similar and will not be repeated here.

[0234] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.

[0235] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units (modules) can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0236] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0237] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A fingerprint recognition method, characterized in that: The method is applied to a device, the device comprising a fingerprint module, a multimedia chip and a main control micro control unit MCU, the main control MCU communicates with the fingerprint module through a first bus, the multimedia chip communicates with the fingerprint module through a second bus, and the main control MCU communicates with the multimedia chip through the second bus; The method comprises: The master control MCU determines that an abnormality exists in the first bus; The main control MCU sends a switching instruction to the fingerprint module via the multimedia chip; In response to the switching instruction, the fingerprint module communicates with the main control MCU via the second bus and via the multimedia chip.

2. The method according to claim 1, characterized in that: The method further comprises: The main control MCU sends an identification instruction to the multimedia chip through the second bus; In response to the identification instruction, the multimedia chip performs fingerprint identification.

3. The method according to claim 1 or 2, characterized in that: Before the master control MCU determines that the first bus is abnormal, the method further includes: The fingerprint module sends a sensor interrupt signal to the main control MCU in response to a pressing operation by the user; The main control MCU controls the fingerprint module to power on in response to the sensor interrupt signal.

4. The method according to claim 2, characterized in that: The multimedia chip performs fingerprint recognition, including: The multimedia chip sends a picture acquisition instruction to the fingerprint module; The fingerprint module feeds back the image acquisition result to the multimedia chip in response to the image acquisition instruction; The multimedia chip performs the fingerprint recognition according to the image acquisition result to obtain a fingerprint recognition result.

5. The method according to claim 4, characterized in that The method further comprises: The multimedia chip sends the fingerprint recognition result to the main control MCU; The main control MCU performs identification result processing according to the fingerprint identification result.

6. The method according to claim 5, characterized in that The fingerprint recognition result includes: Fingerprint recognition succeeds, or fingerprint recognition fails; The main control MCU performs recognition result processing according to the fingerprint recognition result, including: The main control MCU prompts the user that the fingerprint recognition is successful according to the fingerprint recognition success; or The main control MCU prompts the user of the recognition failure according to the fingerprint recognition failure.

7. The method according to claim 6, characterized in that The method further comprises: The main control MCU sends a sleep instruction to the fingerprint module via the multimedia chip; The fingerprint module responds to the sleep instruction and feeds back a sleep result to the main control MCU via the multimedia chip, where the sleep result indicates that the fingerprint module is in a sleep state.

8. The method according to claim 7, characterized in that When the fingerprint recognition result is that the fingerprint recognition is successful, the method further includes: The main control MCU sends a power-off instruction to the fingerprint module via the multimedia chip.

9. The method according to claim 7, characterized in that: When the fingerprint recognition result is that the fingerprint recognition fails, the method further includes: In response to the user's pressing operation again, the fingerprint module sends a pressing event again to the main control MCU via the multimedia chip; When the main control MCU receives the second pressing event within a preset time period, the main control MCU sends the identification instruction to the multimedia chip through the second bus; When the main control MCU does not receive another pressing event within the preset time period, the main control MCU sends a power-off instruction to the fingerprint module via the multimedia chip.

10. A device, characterized in that: include: one or more processors; one or more memories; Display screen; The one or more memories store one or more programs, and the one or more programs include instructions. When the instructions are executed by the one or more processors, the device performs the method according to any one of claims 1 to 9.

11. A readable storage medium, characterized in that: A program is stored thereon, and when the program is executed by a device, the computer implements the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Master-salve control method and device for dual-control storage equipment

    CN107220197A

  • Fingerprint identifying method and associated product

    CN107480609A

  • Fingerprint verification method and related device

    CN109886162A

  • Hot standby redundant communication system and method

    CN111654359A

  • Under-screen fingerprint display method and electronic device

    CN113325941A