Method, medium, and apparatus for fingerprint recognition

By switching to the SPI bus when an I2C error occurs, and using a multimedia chip as an intermediary, the problem of fingerprint recognition failure caused by I2C errors is solved, ensuring the stability of the fingerprint recognition process.

CN119513844BActive Publication Date: 2026-05-29HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2023-08-24
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

When the I2C bus is interfered with, the communication between the main control MCU and the fingerprint module is abnormal, causing the fingerprint recognition process to fail.

Method used

In the event of an I2C malfunction, the system switches to the SPI bus, using the multimedia chip as an intermediary to facilitate communication between the main control MCU and the fingerprint module, ensuring the normal operation of the fingerprint recognition process.

Benefits of technology

Even in the event of an I2C malfunction, the fingerprint recognition process can still be completed smoothly, avoiding recognition failures caused by communication anomalies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513844B_ABST
    Figure CN119513844B_ABST
Patent Text Reader

Abstract

The application provides a fingerprint identification method, medium and device. The method is applied to a device, the device comprising a fingerprint module, a multimedia chip and a master micro control unit (MCU), the master MCU communicating with the fingerprint module through a first bus, the multimedia chip communicating with the fingerprint module through a second bus, and the master MCU communicating with the multimedia chip through the second bus; the method comprising: the master MCU determining that the first bus is abnormal; the master MCU sending a switching instruction to the fingerprint module via the multimedia chip; and in response to the switching instruction, the fingerprint module communicating with the master MCU via the multimedia chip through the second bus. The fingerprint identification method, medium and device of the application can detect whether the first bus is normal, switch to the second bus communication when the first bus is abnormal, and avoid affecting the fingerprint identification process due to I2C abnormality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of equipment, and more particularly to a method, medium, and device for fingerprint recognition. Background Technology

[0002] Fingerprint recognition technology can be widely used in various devices, such as smart locks, mobile phones, and tablets. The implementation of fingerprint recognition technology relies on normal communication between the main microcontroller unit (MCU) and the fingerprint module. Whether the communication between the MCU and the fingerprint module is normal affects whether the fingerprint recognition process can be performed correctly. Currently, the MCU communicates with the fingerprint module via I2C (inter-integrated circuit). When the I2C bus is subjected to significant interference, the stability of I2C communication will be affected, causing abnormal communication between the MCU and the fingerprint module. Consequently, the fingerprint module cannot be controlled and therefore cannot perform the corresponding processing.

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

[0004] This application provides a method, medium, and device for fingerprint recognition. Even in the event of an I2C malfunction, the main control MCU and the fingerprint module can communicate normally, without affecting the fingerprint recognition process.

[0005] A first aspect provides a fingerprint recognition method, characterized in that the method is applied to a device, the device including a fingerprint module, a multimedia chip, and a main control microcontroller unit (MCU), the main control MCU communicating with the fingerprint module via a first bus, the multimedia chip communicating with the fingerprint module via a second bus, and the main control MCU communicating with the multimedia chip via the second bus; the method includes: the main control MCU determining that the first bus is abnormal; the main control MCU sending a switching command to the fingerprint module via the multimedia chip; and in response to the switching command, the fingerprint module communicating 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 I2C (inter-integrated circuit), and the second bus can be understood as the Serial Peripheral Interface (SPI) bus.

[0007] Based on the above scheme, the device's main control MCU can detect whether the I2C is normal. When the first bus is normal, the fingerprint module can directly communicate with the main control MCU via 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. This avoids the main control MCU being unable to send control commands to the fingerprint module, or the fingerprint module being unable to send various events to the main control MCU due to I2C abnormalities, which would affect the fingerprint recognition process.

[0008] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the main control MCU sending an identification command to the multimedia chip via the second bus; and in response to the identification command, the multimedia chip performing fingerprint identification according to the identification command.

[0009] It should be noted that the multimedia chip performs MOH (Mount Occupancy) recognition based on the recognition command. When an I2C malfunction occurs, the main control MCU sends a control command to the multimedia chip, triggering it to perform MOH recognition to ensure the normal operation of the fingerprint recognition process.

[0010] In conjunction with the first aspect, in some implementations of the first aspect, before the main control MCU determines that there is an anomaly in the first bus, the method further includes: the fingerprint module sending a sensor interrupt signal to the main control MCU in response to the user's pressing operation; and the main control MCU controlling the fingerprint module to power on in response to the sensor interrupt signal.

[0011] In conjunction with the first aspect, in some implementations of the first aspect, the master control MCU determines that the first bus is abnormal, including: the master control MCU determines 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 failed to send an event to the master control MCU through the first bus, or the failure to read the first bus indicates that the master control MCU failed to receive an event from the fingerprint module through the first bus.

[0012] In conjunction with the first aspect, in some implementations of the first aspect, the event includes: the initialization event of the fingerprint module and / or the press event.

[0013] It should be noted that before the main control MCU decides to switch from the first bus to the second bus, it needs to verify that the first bus is functioning correctly. After the fingerprint module powers on, it can perform initialization. If the I2C communication 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 via I2C. However, I2C errors can occur at any time after the fingerprint module powers on. When I2C malfunctions, the fingerprint module will be unable to send initialization events and / or press events to the main control MCU via I2C, or the main control MCU will be unable to receive initialization events and / or press events from the fingerprint module via I2C.

[0014] It should be noted that the main control MCU can receive I2C interrupt signals. Receiving an I2C interrupt signal indicates that the main control MCU may subsequently receive other data via I2C. In other words, after receiving an I2C interrupt signal, the main control MCU will attempt to read subsequently sent content (e.g., initialization events, press events, or other data). If the main control MCU does not receive any sent content via I2C within a certain period, it determines that the first bus read has failed, i.e., the first bus is abnormal.

[0015] For example, in response to a user's press operation, the fingerprint module sends a sensor interrupt signal to the main control MCU, which then powers on the fingerprint module. If the main control MCU does not receive any events sent by the fingerprint module via I2C within a certain period of time (e.g., 300ms) after receiving the sensor interrupt signal, and the number of I2C error messages reaches a certain threshold (e.g., three), the main control MCU determines that there is an I2C malfunction.

[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 conjunction with the first aspect, in some implementations of the first aspect, the multimedia chip performs fingerprint recognition, including: the multimedia chip sending an image acquisition command to the fingerprint module; the fingerprint module responding to the image acquisition command and feeding back the image acquisition result to the multimedia chip; and the multimedia chip performing fingerprint recognition based on the image acquisition result to obtain a fingerprint recognition result.

[0018] Specifically, after receiving the MOH recognition command, the multimedia chip sends an image acquisition command to the fingerprint module via SPI. Once the fingerprint module completes the image acquisition task, it sends the acquisition result back to the multimedia chip via SPI. The multimedia chip then compares the acquired result with pre-stored data; the comparison result is the MOH recognition result.

[0019] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the multimedia chip sending the fingerprint recognition result to the main control MCU; and the main control MCU processing the recognition result based on the fingerprint recognition result.

[0020] In conjunction with the first aspect, in some implementations of the first aspect, the fingerprint recognition result includes fingerprint recognition success or fingerprint recognition failure; the main control MCU processes the recognition result based on the fingerprint recognition result, including: the main control MCU prompts the user that the fingerprint recognition is successful; or the main control MCU prompts the user that the fingerprint recognition is failed.

[0021] It is understandable that after receiving the fingerprint recognition result, the main control MCU can process the recognition result. This processing can be understood as prompting the user with the fingerprint recognition result. For example, the main control MCU's processing methods include, but are not limited to, prompting the user with the fingerprint recognition result through a user interface or by providing an audio prompt. User interface prompts are applicable to mobile phones, while audio prompts are applicable to smart door locks.

[0022] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the main control MCU sending a sleep command to the fingerprint module via the multimedia chip; the fingerprint module responding to the sleep command and feeding back a sleep result to the main control MCU via the multimedia chip, the sleep result indicating that the fingerprint module is in a sleep state.

[0023] In other words, during the MOH (Motion on Hibernation) recognition process triggered by a user pressing the fingerprint module, the fingerprint module can enter a sleep state regardless of whether the fingerprint recognition is successful. The main control MCU sends a sleep command to the fingerprint module via SPI through the multimedia chip, and the fingerprint module enters a sleep state under the control of the main control MCU. Therefore, in the event of an I2C malfunction, after switching to SPI communication, the information exchanged between the main control MCU and the fingerprint module needs to be forwarded through the multimedia chip.

[0024] In conjunction 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 sending a power-down command to the fingerprint module via the multimedia chip.

[0025] In conjunction with the first aspect, in some implementations of the first aspect, when the fingerprint recognition result is that the fingerprint recognition fails, the method further includes: the fingerprint module responding to the user's re-press operation by sending a re-press event to the main control MCU via the multimedia chip; when the main control MCU receives the re-press event within a preset time period, the main control MCU sends the recognition command to the multimedia chip via the second bus; when the main control MCU does not receive the re-press event within the preset time period, the main control MCU sends a power-down command to the fingerprint module via the multimedia chip.

[0026] For example, the preset duration can be set to 8 seconds.

[0027] It should be noted that when the main control MCU receives another press event within the preset time period, it can continue fingerprint recognition via SPI. Since it has already switched to SPI, the main control MCU does not need to re-check the first bus for abnormalities. When fingerprint recognition is successful, or when the main control MCU does not receive another press event within the preset time period (indicating fingerprint recognition timeout), the fingerprint recognition process ends, and the fingerprint module is powered down. For the next fingerprint recognition attempt, the main control MCU needs to re-check the first bus for abnormalities.

[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 control microcontroller unit (MCU). The main control MCU communicates with the fingerprint module via a first bus, the multimedia chip communicates with the fingerprint module via a second bus, and the main control MCU communicates with the multimedia chip via the second bus. The main control MCU is used to determine if the first bus is faulty. The main control MCU is also used to send a switching command to the fingerprint module via the multimedia chip. The fingerprint module is also used to respond to the switching command by communicating with the main control MCU via the second bus and the multimedia chip.

[0029] In conjunction with the second aspect, in some implementations of the second aspect, the main control MCU is also used to send an identification command to the multimedia chip via the second bus; the multimedia chip is used to perform fingerprint recognition in response to the identification command.

[0030] In conjunction with the second aspect, in some implementations of the second aspect, before the main control MCU determines 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 the 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 conjunction with the second aspect, in some implementations of the second aspect, the master control MCU is specifically used to determine the first bus abnormality based on the failure of the first bus read, wherein the failure of the first bus read indicates that the fingerprint module failed to send an event to the master control MCU through the first bus, or the failure of the first bus read indicates that the master control MCU failed to receive an event from the fingerprint module through the first bus.

[0032] In conjunction with the second aspect, in some implementations of the second aspect, the event includes: the initialization event of the fingerprint module and / or the press event.

[0033] In conjunction with the second aspect, in some implementations of the second aspect, the multimedia chip is specifically used to send an image acquisition command to the fingerprint module; the fingerprint module is also used to respond to the image acquisition command and feed back the image acquisition result to the multimedia chip; the multimedia chip is also used to perform fingerprint recognition based on the image acquisition result and obtain a fingerprint recognition result.

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

[0035] In conjunction 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 that the fingerprint recognition is successful based on the fingerprint recognition success; or specifically used to prompt the user that the fingerprint recognition is failed based on the fingerprint recognition failure.

[0036] In conjunction with the second aspect, in some implementations of the second aspect, the main control MCU is further configured to send a sleep command to the fingerprint module via the multimedia chip; the fingerprint module is further configured to respond to the sleep command by sending a sleep result back to the main control MCU via the multimedia chip, the sleep result indicating that the fingerprint module is in a sleep state.

[0037] In conjunction 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 also used to send a power-down command to the fingerprint module via the multimedia chip.

[0038] In conjunction with the second aspect, in some implementations of the second aspect, when the fingerprint recognition result is that the fingerprint recognition has failed, the fingerprint module is further configured to respond to the user's re-press operation by sending a re-press event to the main control MCU via the multimedia chip; when the main control MCU receives the re-press event within a preset time period, the main control MCU is further configured to send the recognition command to the multimedia chip via the second bus; when the main control MCU does not receive the re-press event within the preset time period, the main control MCU is further configured to send a power-down command to the fingerprint module via the multimedia chip.

[0039] In conjunction with the second aspect, in some implementations of the second aspect, the fingerprint recognition device is incorporated into a smart door lock.

[0040] Thirdly, a fingerprint recognition device is provided, comprising: a processor coupled to a memory for storing a program, the processor for running the program, such that the fingerprint recognition device performs the methods described in the first aspect and any possible implementation thereof.

[0041] In conjunction with the third aspect, some implementations of the third aspect also include one or more of the memory and the transceiver, the transceiver being used to receive signals and / or transmit signals.

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

[0043] Fourthly, an apparatus 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 including instructions that, when executed by the one or more processors, cause the apparatus to perform the methods of the first aspect and any possible implementation thereof.

[0044] Fifthly, a readable storage medium is provided having a program stored thereon, which, when executed by a device, causes the device to implement the methods described in the first aspect and any possible implementation thereof.

[0045] A sixth aspect is a program product, characterized in that, when the program product is run on a device, it causes the device to perform the methods described in the first aspect and any possible implementation thereof.

[0046] In a seventh aspect, a chip system is provided, the chip system including a processor and a data interface, the processor reading instructions stored in a memory through the data interface to execute the methods as described in the first aspect and any possible implementation thereof.

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

[0048] In conjunction with the seventh aspect, in one possible implementation, the chip system also includes a memory in which programs or instructions are stored. Attached Figure Description

[0049] Figure 1 This is a schematic diagram of a scenario provided in an embodiment of this application.

[0050] Figure 2 This is a system architecture diagram provided in an embodiment of this application.

[0051] Figure 3 This is a schematic flowchart of a fingerprint recognition method provided in an embodiment of this application.

[0052] Figure 4 This is a schematic flowchart of a fingerprint recognition method provided in an embodiment of this application.

[0053] Figure 5 This is a schematic flowchart of a fingerprint recognition method provided in an embodiment of this application.

[0054] Figure 6 This is a set of GUIs provided in the embodiments of this application.

[0055] Figure 7 This is a schematic flowchart of a fingerprint recognition method provided in an embodiment of this application. Detailed Implementation

[0056] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0057] The terminology used in the following embodiments is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to also include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one” and “one or more” refer to one, two, or more than two. The term “and / or” is used to describe the relationship between related objects, indicating that three relationships may exist; for example, A and / or B can indicate: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character “ / ” generally indicates that the preceding and following related objects are in an “or” relationship.

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

[0059] The following describes the technical terms used in the embodiments of this application.

[0060] I2C (Inter-Integrated Circuit) bus

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

[0062] Serial Peripheral Interface (SPI)

[0063] A high-speed, full-duplex, synchronous communication bus. It enables microcontroller units (MCUs) to communicate serially with various peripheral devices 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 may be a portable device that also includes other functions such as a personal digital assistant and / or music player, such as a mobile phone, tablet computer, laptop computer, wearable device with wireless communication capabilities (such as a smartwatch), etc. Exemplary embodiments of the portable device include, but are not limited to, devices equipped with... Alternatively, it can be a portable device running another operating system. It should also be understood that in some other embodiments, the device may also be a desktop computer. In some other embodiments, the device may be a smart door lock.

[0065] For example, such as Figure 1As shown, a device applicable to the method provided in the embodiments of this application is illustrated, 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, as a technology for identity verification, is more convenient, faster, and more secure than requiring a password; the device identifies the user based on their fingerprint. In fingerprint recognition technology, the main control MCU can communicate with the fingerprint module via I2C, but I2C may experience random anomalies. When there is significant interference on the I2C bus, it affects the stability of I2C communication, leading to I2C anomalies. When I2C anomalies occur, communication between the main control MCU and the fingerprint module is abnormal, making it difficult for the fingerprint module to process tasks normally under the control of the main control MCU. Consequently, both fingerprint chip matching (MOC) and host matching (MOH) fail to function properly.

[0066] Therefore, to prevent fingerprint recognition from failing due to I2C malfunctions causing both MOC and MOH to malfunction, this application provides a fingerprint recognition method and device that switches to the SPI path when an I2C malfunction occurs. This allows for MOH fingerprint recognition and the execution of various instructions via the SPI path, ensuring successful fingerprint recognition even during I2C malfunctions.

[0067] like Figure 2 The diagram illustrates a system architecture provided in an embodiment of this application. This system architecture can be applied to, for example... Figure 3 The examples shown include smart door locks, mobile phones, and other devices that support fingerprint recognition. The system architecture 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. Specifically, the main control MCU communicates with the fingerprint module via I2C and with the multimedia chip via SPI. The management module can also include modules for fingerprint management, recognition management, or enrollment management to implement different management functions. The multimedia chip includes a MOH recognition module and an SPI driver. The MOH recognition module can perform MOH recognition 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, I2C information processing, and SPI information processing. The sensor is used to detect user pressure signals and can communicate with the main control MCU through general purpose input / output (GPIO). The fingerprint module MCU is used to perform MOH recognition tasks. The I2C information processing is used to process information obtained through I2C, and the SPI information processing is used to process information obtained through SPI. For example, the multimedia chip can be a multimedia image signal processor (ISP).

[0069] As explained above, communication between the fingerprint module and the main control MCU relies on I2C, and I2C errors generally occur randomly. For ease of understanding, as follows... Figure 3 The diagram illustrates a schematic flowchart of a fingerprint recognition method, introducing a fingerprint recognition method under normal I2C conditions. This method can be applied to applications such as... Figure 2 The system architecture shown below illustrates this method.

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

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

[0072] It should be noted that the fingerprint module includes a sensor. When a user presses the fingerprint module's sensor, a corresponding sensor interrupt signal is generated. This sensor interrupt signal can be sent to the main control MCU via GPIO. The main control MCU includes a management module and an MCU driver.

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

[0074] S304, the management module sends a power-on instruction message, and the multimedia chip receives the power-on instruction message accordingly.

[0075] Understandably, when the main control MCU receives the sensor interrupt signal, it can send power-on indication information to both the multimedia chip and the fingerprint module. For example, the MCU driver sends the power-on indication information to the fingerprint module via GPIO, and the management module sends the power-on indication information to the multimedia chip via SPI.

[0076] S305, fingerprint module initialization.

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

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

[0079] Understandably, once the fingerprint module is powered on, it can send press events and initialization events to the main control MCU via I2C. Fingerprint module initialization can be understood as the fingerprint module preparing for subsequent processing of other tasks (e.g., processing I2C messages, processing SPI messages, or MOC recognition).

[0080] S307, MCU driver confirms I2C is normal.

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

[0082] It is understood that steps S307 and S308 are optional steps.

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

[0084] It should be noted that when I2C communication is normal, the main control MCU can communicate normally with the fingerprint module via I2C. Furthermore, based on the normal communication between the main control MCU and the fingerprint module, the normal execution of user press operations, fingerprint recognition, and subsequent fingerprint module power-down procedures can be guaranteed.

[0085] Understandably, once the fingerprint module is powered on, the MCU driver can immediately determine whether the I2C connection is working properly. In other words, step S306 can be executed after step S303, but the specific order of execution is not limited.

[0086] S309, Multimedia chip initialization.

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

[0088] It is understandable that the multimedia chip can be initialized after power-on. That is, step S310 can be executed after step S304. Multimedia chip initialization can be understood as the multimedia chip preparing for subsequent processing of other tasks (e.g., MOH recognition).

[0089] S311, the management module recognizes the initialization event.

[0090] S312, the management module sends an MOC recognition command, and the fingerprint module receives the MOC recognition command accordingly.

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

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

[0093] It should be noted that when I2C is functioning correctly, the main control MCU and the fingerprint module can communicate normally. The main control MCU sends MOC recognition commands to the fingerprint module via I2C, and the fingerprint module performs MOC recognition. The fingerprint module then 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's important to note that the main control MCU can send MOC recognition commands to the fingerprint module via I2C and MOH recognition commands to the multimedia chip via SPI. In other words, it can perform both MOC and MOH recognition. However, typically, when a user presses the fingerprint sensor, the main control MCU powers on both the fingerprint module and the multimedia chip separately. The power-on times for the fingerprint module and the multimedia chip differ; the multimedia chip takes longer to power on, while the fingerprint module's power-on and MOC recognition process is faster. Therefore, the fingerprint module can complete the power-on, initialization, and MOC recognition process relatively quickly. By the time the fingerprint module completes MOC recognition, the multimedia chip may have just finished initializing.

[0096] In other words, because the fingerprint module initialization and MOC recognition process are completed quickly, when I2C communication is normal, although the fingerprint module can perform MOC recognition and the multimedia chip can also perform MOH recognition, the fingerprint module's MOC recognition can be completed first.

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

[0098] Therefore, fingerprint recognition methods can typically support both MOC and MOH recognition.

[0099] It's important to note that MOC (Multi-Coverage) and MOH (Multi-Hybrid) fingerprint recognition are two different technologies. MOC recognition involves the fingerprint module handling all recognition tasks; MOH recognition involves the fingerprint module capturing the image and then using a secondary sensor to complete the recognition process. Simply put, a fingerprint module can perform MOC recognition, while a multimedia chip can perform MOH recognition.

[0100] It's easy to understand that MOC recognition results can have two possibilities: successful fingerprint recognition or failed fingerprint recognition. The following is a brief explanation of these two scenarios.

[0101] In one scenario, S315 indicates that the management module has successfully processed the identification.

[0102] Understandably, the fingerprint module uses MOC (Modular Object) recognition to obtain the MOC recognition result. If the fingerprint matches in the recognition result, it indicates successful recognition.

[0103] It should be noted that after receiving the recognition results, the management module can process them. The management module can process the recognition results by displaying a successful recognition message through the user interface or by providing an audio notification.

[0104] S316, the management module sends a sleep command, and the fingerprint module receives the sleep command accordingly.

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

[0106] S318, the management module processes the hibernation results.

[0107] It should be noted that after the user presses the fingerprint sensor, the MOC (Mobile Controller) verifies that the fingerprint matches, and the management module notifies the user that the recognition was successful. The management module can also control the fingerprint module to enter a sleep state.

[0108] It should be noted that the fingerprint module can report the sleep status to the management module, which can then process the sleep status. The management module's processing of the sleep status can be understood as checking whether it receives another press event from the user within a certain timeframe.

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

[0110] In another scenario, S319, the management module failed to process the identification.

[0111] Understandably, the fingerprint module uses MOC (Modular Object) recognition to obtain MOC recognition results. If the fingerprints in the recognition results are inconsistent or the fingerprint acquisition is incomplete, it indicates that the recognition has failed.

[0112] It should be noted that after receiving the recognition results, the management module can process them. The management module can process the recognition results by informing the user of recognition failure through the user interface or by providing an audio prompt.

[0113] S320, the fingerprint module responds to the user's press operation again and confirms the press event.

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

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

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

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

[0118] Understandably, in step S307 above, the MCU driver determines that I2C is normal. Based on this, the fingerprint module can perform MOC recognition in step S313. Therefore, when I2C is normal, the fingerprint recognition process can be completed through I2C communication between the main control MCU and the fingerprint module. However, since the I2C communication for the previous user-triggered fingerprint recognition process was normal, the MCU driver needs to reconfirm I2C functionality for the next user press. If I2C is abnormal, the main control MCU will not be able to receive the next user press event, thus preventing the transmission of subsequent control commands via I2C. Therefore, based on this situation, it is necessary to reconfirm I2C functionality every time the user presses the fingerprint.

[0119] Once the MCU driver confirms that I2C is working correctly, the management module can continue with subsequent steps.

[0120] S324, the management module sends an MOC recognition command, and the fingerprint module receives the MOC recognition command accordingly.

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

[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 recognition processing. The management module can send recognition commands to the fingerprint module and the multimedia chip respectively. The fingerprint module can perform MOC recognition according to the MOC recognition command, and the multimedia chip can perform MOH recognition according to the MOH recognition command.

[0123] Understandably, the management module can obtain the MOC recognition result from the fingerprint module and the MOH recognition result from the multimedia chip, respectively. Furthermore, the management module can process successful recognition results or fail recognition results according to steps S315 or S319 as described above, and then execute subsequent steps.

[0124] Based on the above scheme, under normal I2C conditions, the fingerprint module and the main control MCU can communicate normally. The fingerprint module can send various events to the main control MCU, and 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 commands to the fingerprint module to control its sleep mode or power-down.

[0125] Furthermore, such as Figure 4 The diagram illustrates a schematic flowchart of a fingerprint recognition method, introducing a fingerprint recognition method for I2C exceptions. This method can be applied to applications such as... Figure 2The system architecture shown below illustrates this method.

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

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

[0128] In other words, when a user presses the sensor, the main control MCU can receive a sensor interrupt signal. The main control MCU includes a management module and an MCU driver.

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

[0130] S404, the management module sends a power-on instruction message, and the multimedia chip receives the power-on instruction message accordingly.

[0131] Understandably, the main control MCU sends power-on indication information to both the fingerprint module and the multimedia chip.

[0132] S405, fingerprint module initialization.

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

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

[0135] S407, MCU driver identifies I2C error.

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

[0137] It should be noted that the main control MCU's driver layer (MCU driver) can receive I2C interrupt signals. The MCU driver receiving an I2C interrupt signal indicates that it may subsequently receive other data via I2C. After receiving the I2C interrupt signal, the MCU driver attempts to read the subsequently sent content. If, within a certain period, the MCU driver does not receive any sent content via I2C, it determines that an I2C exception has occurred. Based on this, the management module acquires the I2C exception event.

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

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

[0140] Understandably, when an I2C error occurs, the main control MCU cannot communicate directly with the fingerprint module via I2C. Furthermore, based on the above... Figure 2 The system architecture is as follows: the multimedia chip can communicate with the main control MCU via SPI, while the fingerprint module can communicate with the multimedia chip via SPI. Therefore, when an I2C error occurs, the main control MCU needs to send commands to the fingerprint module via SPI, and simultaneously, the fingerprint module sends various events to the main control MCU via SPI.

[0141] S409, the management module confirms the switch to SPI.

[0142] Understandably, when an I2C error occurs, the main control MCU will switch to SPI and will subsequently send commands via SPI.

[0143] S410, Multimedia chip initialization.

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

[0145] It is understandable that the multimedia chip can be initialized after power-on. That is, step S411 can be executed after step S404. Multimedia chip initialization can be understood as the multimedia chip preparing for subsequent processing of other tasks (e.g., MOH recognition).

[0146] S411, the management module recognizes the initialization event.

[0147] S412, the management module sends a command to switch to SPI, and the multimedia chip receives the command to switch to SPI accordingly.

[0148] S413, the multimedia chip sends a command to switch to SPI, and the fingerprint module receives the command to switch to SPI accordingly.

[0149] S414, the fingerprint module is switched to SPI.

[0150] It should be noted that when an I2C failure occurs, the management module determines to switch to SPI and needs to send a switching command to the fingerprint module to control the fingerprint module to switch to SPI communication. However, as described above, the main control MCU communicates directly with the fingerprint module via I2C. When I2C fails, the main control MCU cannot directly send the switching command to the fingerprint module via I2C. Therefore, the main control MCU sends the switching command to the multimedia chip via SPI, and the multimedia chip then sends the switching command to the fingerprint module via SPI. In other words, the command sent by the main control MCU to the fingerprint module can be forwarded through the multimedia chip.

[0151] Understandably, based on the above... Figure 2 As can be seen from the introduction of the system architecture, 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 via SPI.

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

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

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

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

[0156] It should be noted that the fingerprint module also needs to transmit events to the main control MCU via the multimedia chip. That is, the fingerprint module sends initialization events and press events to the multimedia chip via SPI, and the multimedia chip sends initialization times and press events to the main control MCU via SPI.

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

[0158] Understandably, the multimedia chip includes an MOH (Mobility On Hazard) identification module. When an I2C error occurs, the main control MCU sends a command to the multimedia chip, instructing the MOH identification module within the chip to perform MOH identification.

[0159] S418, the multimedia chip sends an image acquisition command, and the fingerprint module receives the image acquisition command accordingly.

[0160] S419, fingerprint module image acquisition.

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

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

[0163] It should be noted that after the multimedia chip receives the MOH recognition command, it can send an image acquisition command to the fingerprint module via SPI. Once the fingerprint module completes the image acquisition task, it sends the acquisition result back to the multimedia chip via SPI. The multimedia chip then compares the acquired result with pre-stored data; the comparison result is the MOH recognition result.

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

[0165] For example, the multimedia chip sends the MOH recognition result to the main control MCU via SPI. The recognition result may include whether the fingerprint recognition was successful or failed.

[0166] S423, the management module successfully processed the recognition.

[0167] Understandably, the multimedia chip uses MOH (Modular Image Recognition) to obtain the MOH recognition result. If the fingerprint matches in the recognition result, it indicates successful recognition.

[0168] It should be noted that after receiving the recognition results, the management module can process them. The management module can process the recognition results by displaying a successful recognition message through the user interface or by providing an audio notification.

[0169] S424, the management module sends a sleep command, and the fingerprint module receives the sleep command accordingly.

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

[0171] S426, the management module processes the hibernation results.

[0172] S427, the management module sends a power-down command, and the fingerprint module receives the power-down command accordingly.

[0173] It should be noted that after the user presses the fingerprint, the MOH (Modular Controller) verifies that the fingerprint matches, and the management module prompts the user that the recognition was 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, causing the fingerprint module to enter sleep mode 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] In other words, when switching to SPI communication, the information exchanged between the main control MCU and the fingerprint module needs to be forwarded through the multimedia chip.

[0176] Understandably, if the management module does not receive another press event within a certain period of time (e.g., 8 seconds), the management module sends a power-down command to the multimedia chip via SPI. The multimedia chip then sends a power-down command to the fingerprint module via SPI, causing the main control MCU to power down the fingerprint module. When the management module receives another press event within a certain period of time (e.g., 8 seconds), the user's next press can trigger the next fingerprint recognition process.

[0177] It is understandable that in step S414 above, the fingerprint module has already switched to SPI. Therefore, when the management module receives a press event again within a certain period of time, it can continue the fingerprint recognition process via SPI. Thus, in 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 in step S321 to determine whether I2C is normal. However, in method 400, due to I2C malfunction, the fingerprint module has already switched to SPI. When the management module receives a press event within a certain period of time, the MCU driver does not need to determine whether I2C is normal again and can continue the fingerprint recognition process via SPI until fingerprint recognition is successful, or the management module does not receive a press event within a certain period of time (fingerprint recognition timeout), at which point the fingerprint recognition process ends.

[0178] Similar to the description of method 300 above, the recognition result may also fail. When the management module receives a failed recognition result, it can continue to execute as follows: Figure 5 The steps shown, Figure 5 The steps in can also be applied to, for example Figure 2 In the system architecture shown, the following is about... Figure 5 A detailed introduction will follow.

[0179] S501, the management module failed to process the recognition.

[0180] Understandably, the multimedia chip obtains the MOH recognition result through MOH recognition. If the fingerprint comparison in the recognition result is inconsistent or the fingerprint is not completely obtained, it indicates that the recognition has failed.

[0181] It should be noted that after receiving the recognition results, the management module can process them. The management module can process the recognition results by informing the user of recognition failure through the user interface or by providing an audio prompt.

[0182] For example, such as Figure 6 As shown, a set of graphical user interfaces (GUIs) is provided. Taking mobile phone fingerprint recognition unlocking as an example, it illustrates a way in which the management module processes the recognition results.

[0183] like Figure 6 As shown in (a), the phone's lock screen interface is displayed. The lock screen interface displays a fingerprint unlock area 601. In response to the user pressing the unlock area 601, the phone can display as shown... Figure 6 (b) or as in Figure 6 The GUI shown in (c) is shown in the image.

[0184] like Figure 6 As shown in (b), in response to the user pressing the fingerprint unlock area 601, the phone's lock screen interface is maintained. The lock screen interface displays a prompt message 602, which reads "Unlock failed, please try again," to inform the user of the recognition failure.

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

[0186] S502, the fingerprint module responds to the user's press operation again and confirms the press event.

[0187] S503, the fingerprint module sends a press event, and the management module receives the press event accordingly.

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

[0189] It should be noted that when fingerprint recognition is successful (e.g., step S423 in method 600 above), or when fingerprint recognition fails and the management module does not receive another press event within a certain time (e.g., the management module does not execute step S503 within a certain time), the fingerprint recognition process can be considered complete. After the fingerprint recognition process ends, the fingerprint module goes into sleep mode, the multimedia chip powers down, and the default I2C path can be restored. Since I2C errors are random events, it is necessary to re-determine whether the I2C is abnormal after the fingerprint module is powered on again.

[0190] In method 500, if the management module receives another press event within a certain time (the management module executes step S503 within a certain time), the fingerprint recognition process is not yet complete. The fingerprint recognition process triggered by the next press event will continue to be completed via SPI. The MCU driver does not need to check whether I2C is working properly again. Based on this, the subsequent MOH recognition process will continue to be completed via SPI.

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

[0192] In the S505, the multimedia chip sends an image acquisition command, and the fingerprint module receives the image acquisition command accordingly.

[0193] S506, fingerprint module image acquisition.

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

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

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

[0197] S510, the management module successfully processed the recognition.

[0198] S511, the management module sends a sleep command, and the fingerprint module receives the sleep command accordingly.

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

[0200] S513, the management module processes the hibernation results.

[0201] S514, the management module sends a power-down command, and the fingerprint module receives the power-down command accordingly.

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

[0203] Based on the above solution, the device can detect I2C anomalies and switch to the SPI path when an I2C anomaly occurs. This allows the main control MCU to communicate with the fingerprint module via SPI, without affecting the sending of commands by the main control MCU or the event transmission process of the fingerprint module. This ensures that the fingerprint recognition function remains normal even when I2C is faulty, improving the stability of fingerprint recognition.

[0204] like Figure 7 The illustration shows a fingerprint recognition method provided in an embodiment of this application. This method can be applied to a device, which may include, for example, […]. Figure 2 The system architecture shown below will be followed by a detailed description of the method.

[0205] It should be noted that the device includes a fingerprint module, a multimedia chip, and a main control MCU. The main control MCU communicates with the fingerprint module via a first bus, the multimedia chip with the fingerprint module via a second bus, and the main control MCU with the multimedia chip via a second bus. Therefore, when the first and second buses are functioning correctly, the fingerprint module, multimedia chip, and main control MCU can communicate with each other. The first bus can be understood as I2C, and the second bus as SPI.

[0206] S701, the main control MCU has determined that there is an anomaly on the first bus.

[0207] Understandably, before the main control MCU determines that there is an anomaly in the first bus, it 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 the user's pressing operation, and send the sensor interrupt signal to the main control MCU. The main control MCU can then 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 based on the failure to read the first bus. The failure to read the first bus indicates that the fingerprint module failed 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 failed to receive an event from the fingerprint module through the first bus.

[0210] For example, the events mentioned above include the initialization event of the fingerprint module and / or the press event.

[0211] It should be noted that the fingerprint module can perform initialization processing after power-on. If the I2C communication 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 via I2C. However, I2C errors can occur at any time after the fingerprint module is powered on. When an I2C error occurs, the fingerprint module will be unable to send initialization events and / or press events to the main control MCU via I2C, or the main control MCU will be unable to receive initialization events and / or press events from the fingerprint module via I2C.

[0212] It should be noted that the main control MCU can receive I2C interrupt signals. Receiving an I2C interrupt signal indicates that the main control MCU may subsequently receive other data via I2C. In other words, after receiving an I2C interrupt signal, the main control MCU will attempt to read subsequently sent content (e.g., initialization events, press events, or other data). If the main control MCU does not receive any sent content via I2C within a certain period, it determines that the first bus read has failed, i.e., the first bus is abnormal.

[0213] For example, in response to a user's press operation, the fingerprint module sends a sensor interrupt signal to the main control MCU, which then powers on the fingerprint module. If the main control MCU does not receive any events sent by the fingerprint module via I2C within a certain period of time (e.g., 300ms) after receiving the sensor interrupt signal, and the number of I2C error messages reaches a certain threshold (e.g., three), the main control MCU determines that there is an I2C malfunction.

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

[0215] Understandably, when an I2C error occurs, the main control MCU determines to switch to SPI and generates a switching command. This command controls the fingerprint module to switch to SPI communication. Because of the I2C error, the main control MCU cannot directly send the switching command to the fingerprint module via I2C. Therefore, the main control MCU needs to send the switching command to the fingerprint module through the multimedia chip. In short, the multimedia chip can forward the control commands sent by the main control MCU.

[0216] In response to a switching command, the fingerprint module communicates with the main control MCU via the second bus through the multimedia chip.

[0217] In other words, when the first bus malfunctions, the fingerprint module will be unable to communicate directly with the main control MCU via I2C. The fingerprint module will then communicate with the multimedia chip via SPI, and in turn, the multimedia chip will enable communication with the main control MCU.

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

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

[0220] It should be noted that the multimedia chip sends an image acquisition command to the fingerprint module, the fingerprint module responds to the image acquisition command to acquire an image, and feeds back the image acquisition result to the multimedia chip. The multimedia chip performs fingerprint recognition based on the image acquisition result, thereby obtaining the fingerprint recognition result.

[0221] Specifically, after receiving the MOH recognition command, the multimedia chip sends an image acquisition command to the fingerprint module via SPI. Once the fingerprint module completes the image acquisition task, it sends the acquisition result back to the multimedia chip via SPI. The multimedia chip then compares the acquired result with pre-stored data; 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. The main control MCU then processes the recognition result. The fingerprint recognition result includes either successful fingerprint recognition or fingerprint recognition failure. If the fingerprint recognition is successful, the main control MCU will notify the user of successful recognition; if the fingerprint recognition fails, the main control MCU will notify the user of fingerprint recognition failure.

[0223] It is understandable that after receiving the fingerprint recognition result, the main control MCU can process the recognition result. This processing can be understood as prompting the user with the fingerprint recognition result. For example, the main control MCU's processing methods include, but are not limited to, prompting the user with the fingerprint recognition result through a user interface or by providing an audio prompt. User interface prompts are applicable to mobile phones, while audio prompts are applicable to smart door locks.

[0224] For example, the main control MCU can send a sleep command to the fingerprint module via the multimedia chip. The fingerprint module responds to the sleep command and goes into sleep mode. The sleep result is fed back to the main control MCU via the multimedia chip, indicating that the fingerprint module is in sleep mode.

[0225] In other words, during the MOH (Motion on Hibernation) recognition process triggered by a user pressing the fingerprint module, the fingerprint module can enter a sleep state regardless of whether the fingerprint recognition is successful. The main control MCU sends a sleep command to the fingerprint module via SPI through the multimedia chip, and the fingerprint module enters a sleep state under the control of the main control MCU. Therefore, in the event of an I2C failure, after switching to SPI communication, the information exchanged between the main control MCU and the fingerprint module needs to be forwarded through the multimedia chip.

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

[0227] When fingerprint recognition fails, the fingerprint module responds to the user's subsequent press by sending a "press again" event to the main control MCU via the multimedia chip. If the main control MCU receives the "press again" event within a preset time, it sends a recognition command to the multimedia chip via the second bus. If the main control MCU does not receive the "press again" event within the preset time, it sends a power-down command to the fingerprint module via the multimedia chip. The recognition command is used to instruct the fingerprint module to perform MOH (Motion-Off) recognition.

[0228] For example, the preset duration can be set to 8 seconds.

[0229] It should be noted that when the main control MCU receives another press event within the preset time period, it can continue fingerprint recognition via SPI. Since it has already switched to SPI, the main control MCU does not need to re-check the first bus for abnormalities. When fingerprint recognition is successful, or when the main control MCU does not receive another press event within the preset time period (indicating fingerprint recognition timeout), the fingerprint recognition process ends, and the fingerprint module is powered down. For the next fingerprint recognition attempt, the main control MCU needs to re-check the first bus for abnormalities.

[0230] Based on the above solution, the device can detect I2C anomalies and switch to the SPI path when an I2C anomaly occurs. This allows the main control MCU to communicate with the fingerprint module via SPI, without affecting the sending of commands by the main control MCU or the event transmission process of the fingerprint module. This ensures that the fingerprint recognition function remains normal even when I2C is faulty, improving the stability of fingerprint recognition.

[0231] This application provides a program product that, when run on a device, causes the device to execute the technical solutions described in the above embodiments. Its implementation principle and technical effects are similar to those of the related embodiments described above, and will not be repeated here.

[0232] This application provides a readable storage medium containing instructions that, when executed on a device, cause the device to perform the technical solutions described in the above embodiments. The implementation principle and technical effects are similar and will not be repeated here.

[0233] This application provides a chip for executing instructions. When the chip is running, it executes the technical solutions described in the above embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0234] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the embodiments of this application.

[0235] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit (module) can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

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

[0237] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A fingerprint recognition method, characterized in that, The method is applied to a device, the device including a fingerprint module, a multimedia chip, and a main control microcontroller unit (MCU). The main control MCU communicates with the fingerprint module via a first bus, the multimedia chip communicates with the fingerprint module via a second bus, and the main control MCU communicates with the multimedia chip via the second bus. The method includes: The main control MCU determines that there is an anomaly in the first bus; The main control MCU sends a switching command to the fingerprint module via the multimedia chip; In response to the switching command, the fingerprint module communicates with the main control MCU via the second bus and the multimedia chip; In the event of an anomaly in the first bus, the fingerprint module is used to acquire the image acquisition result, and the multimedia chip is used to obtain the fingerprint recognition result. The main control MCU determines that the first bus has an anomaly, including: The main control MCU determines that there is an anomaly in the first bus based on the failure to read the first bus.

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

3. The method according to claim 1 or 2, characterized in that, Before the main control MCU determines that there is an anomaly in the first bus, the method further includes: The fingerprint module responds to the user's pressing operation by sending a sensor interrupt signal to the main control MCU; The main control MCU responds to the sensor interrupt signal and controls the fingerprint module to power on.

4. The method according to claim 2, characterized in that, The multimedia chip performs fingerprint recognition, including: The multimedia chip sends an image acquisition command to the fingerprint module; The fingerprint module responds to the image acquisition command and sends the image acquisition result back to the multimedia chip; The multimedia chip performs fingerprint recognition based on the image acquisition results to obtain the fingerprint recognition result.

5. The method according to claim 4, characterized in that, The method further includes: The multimedia chip sends the fingerprint recognition result to the main control MCU; The main control MCU processes the fingerprint recognition results.

6. The method according to claim 5, characterized in that, The fingerprint recognition results include: Fingerprint recognition successful, or fingerprint recognition failed; The main control MCU processes the fingerprint recognition result, including: The main control MCU prompts the user that the fingerprint recognition is successful; or The main control MCU prompts the user that the fingerprint recognition has failed.

7. The method according to claim 6, characterized in that, The method further includes: The main control MCU sends a sleep command to the fingerprint module via the multimedia chip; In response to the sleep command, the fingerprint module sends a sleep result to the main control MCU via the multimedia chip. 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 indicates that the fingerprint recognition was successful, the method further includes: The main control MCU sends a power-off command to the fingerprint module via the multimedia chip.

9. The method according to claim 7, characterized in that, When the fingerprint recognition result indicates that the fingerprint recognition has failed, the method further includes: The fingerprint module responds to the user's press operation by sending a press event to the main control MCU via the multimedia chip; When the main control MCU receives the press event again within a preset time period, the main control MCU sends the recognition command to the multimedia chip through the second bus; If the main control MCU does not receive another press event within the preset time period, the main control MCU sends a power-off command to the fingerprint module via the multimedia chip.

10. A device, characterized in that, include: One or more processors; One or more memory units; Display screen; The one or more memories store one or more programs, the one or more programs including instructions that, when executed by the one or more processors, cause the device to perform the method of any one of claims 1 to 9.

11. A readable storage medium, characterized in that, It stores a program that, when executed by the device, causes a computer to perform the method as described in any one of claims 1 to 9.