Abnormality detection method and device and electronic equipment

By performing abnormal detection of fingerprint modules in electronic devices only when the relevant conditions of fingerprint service are met, the problem of high power consumption in the prior art is solved, and effective abnormal detection of fingerprint modules and power consumption reduction is achieved.

CN119415359APending Publication Date: 2025-02-11VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411543308.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The prior art periodically detects abnormalities of fingerprint chips in electronic devices, resulting in high power consumption.

Method used

When the relevant conditions of fingerprint service are met, abnormality detection is performed on the fingerprint module, and the service trigger or end mechanism of the fingerprint module is used as the trigger mechanism for abnormality detection.

Benefits of technology

By performing abnormal detection only when the fingerprint module has service, detection when there is no service is avoided, thereby minimizing the abnormal detection power consumption of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415359A_ABST
    Figure CN119415359A_ABST
Patent Text Reader

Abstract

The invention discloses an anomaly detection method and device and electronic equipment, and belongs to the technical field of terminals. The anomaly detection method comprises the steps of performing anomaly detection on a fingerprint module under the condition that fingerprint service related conditions are met; wherein the fingerprint service related condition is used for triggering the fingerprint module to execute or end execution of at least one service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of terminal technology, and specifically relates to an abnormality detection method, device and electronic equipment. Background Art

[0002] Currently, electronic devices can collect and identify fingerprints through fingerprint chips in the electronic devices, and unlock the screen of the electronic device after successful fingerprint identification.

[0003] During the use of the fingerprint chip, the internal circuit of the fingerprint chip may be short-circuited due to external collision or accidental drop, etc. After the fingerprint chip is short-circuited, it will not only fail to work normally, but also become hot due to continuous current shock, which will cause the electronic device to heat up or even be damaged. To this end, in the relevant technology, during the operation of the electronic device, the upper-level software periodically sends out instructions to query the device status, and each time the bottom-level software receives the instruction, it will perform a fingerprint abnormality detection.

[0004] However, according to the above method, since the electronic device periodically performs abnormality detection on the fingerprint chip, the power consumption of the electronic device may be high. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide an abnormality detection method, device and electronic device, which can reduce the power consumption of the electronic device when performing abnormality detection on the fingerprint module.

[0006] In a first aspect, an embodiment of the present application provides an anomaly detection method, which includes: performing an anomaly detection on a fingerprint module when fingerprint service-related conditions are met; wherein the fingerprint service-related conditions are used to trigger the fingerprint module to execute or end execution of at least one service.

[0007] In a second aspect, an embodiment of the present application provides an anomaly detection device, which includes: a detection module; a detection module, used to perform anomaly detection on a fingerprint module when fingerprint service-related conditions are met; wherein the fingerprint service-related conditions are used to trigger the fingerprint module to execute or end execution of at least one service.

[0008] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0009] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0011] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.

[0012] In the embodiment of the present application, since the fingerprint module can be detected for abnormalities when the conditions related to the fingerprint service are met, that is, the abnormality detection method provided in the embodiment of the present application uses the triggering or ending mechanism of the fingerprint module's service as the triggering mechanism for abnormality detection, it is possible to avoid performing abnormality detection on the fingerprint module when the fingerprint module has no service. Therefore, not only can the abnormality detection of the fingerprint module be achieved, but also the abnormality detection power consumption of the electronic device can be minimized. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 It is a flowchart of an anomaly detection method provided in an embodiment of the present application;

[0014] Figure 2 It is a flowchart of an anomaly detection method provided in an embodiment of the present application;

[0015] Figure 3 It is a flowchart of an anomaly detection method provided in an embodiment of the present application;

[0016] Figure 4 is a schematic diagram of the structure of an abnormality detection device provided in an embodiment of the present application;

[0017] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0018] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0020] The nouns and terms involved in the embodiments of the present application are introduced below.

[0021] Fingerprint entry command: After the user enters the phone settings-fingerprint entry interface, the electronic device system will issue an entry command, which will be received and processed by the fingerprint software;

[0022] Fingerprint unlock command: After fingerprint entry is completed and fingerprint unlocking is required, the electronic device system will issue an entry command, which will be received and processed by the fingerprint software;

[0023] Mobile phone screen on / off command: When the user presses the power button or uses shortcuts to turn the phone screen on or off, the electronic device's system will issue a corresponding command, which will be received and processed by the fingerprint software;

[0024] Interrupt signal: refers to the electrical signal sent by the hardware device. In this article, the hardware device refers to the fingerprint chip. The interrupt signal sent by the fingerprint chip will eventually be received and processed by the fingerprint software.

[0025] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0026] The following is a detailed description of the anomaly detection method, device and electronic device provided in the embodiments of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0027] The anomaly detection method provided in the embodiment of the present application can be executed by an electronic device or at least one of the functional modules and entity modules in the electronic device that can implement the search. The specific execution can be determined according to actual use requirements and is not limited in the embodiment of the present application. In the embodiment of the present application, an electronic device executing the anomaly detection method is taken as an example to illustrate the anomaly detection method provided in the embodiment of the present application.

[0028] The present application embodiment provides an abnormality detection method, such as Figure 1 As shown, the anomaly detection method provided in the embodiment of the present application may include the following steps.

[0029] Step 101: The electronic device determines whether service-related conditions are met.

[0030] Step 102: When the service-related conditions are met, the electronic device performs abnormality detection on the fingerprint module.

[0031] The service-related conditions may be used to trigger the fingerprint module to execute or terminate the execution of at least one service.

[0032] In some embodiments of the present application, the electronic device may perform abnormal detection on the fingerprint module, including but not limited to: detecting whether the fingerprint module is short-circuited, detecting whether the fingerprint module is sensitive, detecting whether there is hardware damage in the fingerprint module, etc.

[0033] It can be understood that if at least one element in the fingerprint module is short-circuited, it can be determined that the fingerprint module is short-circuited; correspondingly, if each element in the fingerprint module is not short-circuited, it can be determined that the fingerprint module is not short-circuited.

[0034] In some embodiments of the present application, the services performed by the fingerprint module may include but are not limited to at least one of the following: fingerprint entry service, fingerprint unlocking service, system restart service, working mode switching service, service of starting fingerprint image collection, service of terminating fingerprint image collection, fingerprint image recognition service, service of outputting recognition results, etc.

[0035] The working mode switching task of the fingerprint module may include: switching from a low power consumption mode to a normal power consumption mode, or switching from a normal power consumption mode to a low power consumption mode.

[0036] It can be understood that the main purpose of the abnormality detection method provided in the embodiment of the present application is to perform abnormality detection when the fingerprint module needs to perform business or the business execution is completed. Since the abnormality detection method provided in the embodiment of the present application performs abnormality detection based on the business logic of the fingerprint module, when there is no business logic in the fingerprint module, the electronic device does not perform abnormality detection on the fingerprint module, thereby achieving the purpose of reducing power consumption.

[0037] In some embodiments of the present application, the above-mentioned business-related conditions may include at least one of the following: receiving a fingerprint entry command, receiving a fingerprint unlocking command, receiving an interrupt signal output by a fingerprint sensor in a fingerprint module, and receiving a screen state switching command.

[0038] In some embodiments of the present application, the fingerprint entry command is used to trigger the fingerprint module to perform fingerprint entry.

[0039] In some embodiments of the present application, the fingerprint unlocking command is used to trigger the fingerprint module to collect and identify the fingerprint image and unlock the screen of the electronic device according to the identification result.

[0040] In some embodiments of the present application, since both the fingerprint entry command and the fingerprint unlocking command can trigger the fingerprint module to perform fingerprint image acquisition and recognition processes, they can also be collectively referred to as fingerprint process commands.

[0041] In some embodiments of the present application, the interrupt signal output by the fingerprint sensor can be used to trigger the fingerprint module to enter the fingerprint image acquisition task or trigger the fingerprint module to end the fingerprint image acquisition task.

[0042] In some embodiments of the present application, the above interrupt signal is triggered by any of the following: the user presses the fingerprint sensor, the user leaves the fingerprint sensor, the fingerprint sensor is subjected to external stimulation, such as static electricity flowing into the fingerprint sensor.

[0043] It is understandable that when static electricity flows into the fingerprint sensor, the general-purpose input / output (GPIO) interrupt pin of the fingerprint sensor may be interfered by the static electricity, thereby causing the fingerprint sensor to output an interrupt signal.

[0044] In some embodiments of the present application, a screen state switching command can trigger the fingerprint module to switch the working mode. The screen state switching command may include: a screen light command and a screen off command. When receiving a screen light command, the electronic device may light up the screen of the electronic device to display the content; when receiving a screen off command, the electronic device may turn off the screen of the electronic device to save power consumption.

[0045] It should be noted that the screen-lighting command may include any command that triggers the electronic device to light up the screen.

[0046] For example, the screen-lighting command may be a power-on command.

[0047] For example, the screen-on command may be a command triggered by a user pressing a power button of the electronic device when the screen of the electronic device is in an off state. After receiving the command, the electronic device may switch the screen state from the off state to the locked state.

[0048] It should be noted that the screen-off command may include any command that triggers the electronic device to turn off the screen.

[0049] For example, the screen-off command may be a shutdown command. After receiving the shutdown command, the electronic device first performs an abnormality detection on the fingerprint module, and then shuts down the electronic device after the detection is completed.

[0050] For example, the screen-off command may be a command triggered by a user inputting a power button of the electronic device when the screen of the electronic device is in the screen-on state. After receiving the command, the electronic device may switch the screen state from the screen-on state to the screen-off state.

[0051] In some embodiments of the present application, when a screen-on command is received, the working mode of the fingerprint module can be switched from a low power consumption mode to a normal power consumption mode; or, when a screen-off command is received, the working mode of the fingerprint module can be switched from a normal power consumption mode to a low power consumption mode.

[0052] In this way, since the fingerprint module can be detected for abnormalities when a fingerprint entry command is received, a fingerprint unlocking command is received, an interrupt signal output by the fingerprint sensor in the fingerprint module is received, or a screen status switching command is received, the flexibility of detecting abnormalities on the fingerprint module can be improved.

[0053] In some embodiments of the present application, the fingerprint module may include a fingerprint sensor and at least one micro controller unit (MCU).

[0054] The fingerprint sensor is used to collect fingerprint images, and the at least one MCU is used to identify, analyze and process the fingerprint images collected by the fingerprint sensor.

[0055] In some embodiments of the present application, the fingerprint module may further include at least one auxiliary sensor, wherein each auxiliary sensor may be any one of the following: a temperature sensor, a pressure sensor, and a distance sensor.

[0056] In some embodiments of the present application, the fingerprint module further includes a register corresponding to each sensor. For example, the fingerprint module further includes a register corresponding to the fingerprint sensor and a register corresponding to each auxiliary sensor.

[0057] In some embodiments of the present application, the electronic device can implement abnormal detection of the fingerprint module through a fingerprint trusted application (TA) and a fingerprint common application (CA). It can be understood that the fingerprint common application can also be called: fingerprint authorization credential (Credential Authorization).

[0058] Specifically, when the fingerprint service-related conditions are met, the fingerprint CA can send an abnormality detection command to the fingerprint TA, and the fingerprint TA can perform abnormality detection on the fingerprint module after receiving the abnormality detection command. It can be understood that fingerprint-related data transmission, that is, the data interaction between the processor of the electronic device and the fingerprint module, needs to be executed inside the fingerprint TA.

[0059] Among them, the fingerprint TA runs in the trusted execution environment (TEE) of the electronic device and is mainly responsible for the algorithm processing and matching of fingerprints. The fingerprint TA contains the core algorithm and logic of fingerprint recognition and is a key component to ensure the security and performance of fingerprint recognition. The fingerprint TA usually needs to be compiled and deployed in the TEE environment to ensure its security and isolation. The fingerprint CA runs in the system execution environment (REE) of the electronic device. It is mainly responsible for interacting with the hardware driver and managing the collection and transmission of fingerprint data. The communication between the fingerprint CA and the hardware driver is crucial to ensure the accuracy and efficiency of fingerprint recognition. It may also involve the encryption and secure storage of fingerprint data to ensure data security and privacy protection.

[0060] In some embodiments of the present application, the “performing abnormality detection on the fingerprint module” in the above step 102 may include at least one of the following steps A to D:

[0061] Step A: The electronic device detects register information corresponding to the fingerprint sensor.

[0062] In some embodiments of the present application, the electronic device can detect whether the register information corresponding to the fingerprint sensor is read correctly. If the read register information corresponding to the fingerprint sensor is correct, it is determined that the fingerprint sensor is not short-circuited, otherwise it is determined that the fingerprint sensor is short-circuited.

[0063] In some embodiments of the present application, the register information may be information stored in a register in the fingerprint sensor.

[0064] The register information may include but is not limited to at least one of the following: the chip ID number (Identity Document, ID) of the fingerprint sensor, and the security authentication mechanism (One-Time Password, OPT) information of the fingerprint sensor.

[0065] Exemplarily, the fingerprint TA in the electronic device can read the chip ID and OPT information of the fingerprint sensor from the register of the fingerprint sensor in sequence. If the read chip ID and OPT information are correct, it is determined that the fingerprint module is not short-circuited, otherwise it is determined that the fingerprint module is short-circuited. It can be understood that the fingerprint TA can store the correct chip ID and OPT information of the fingerprint sensor.

[0066] It can be understood that when the fingerprint sensor is short-circuited, the information read from the register in the fingerprint sensor is mostly garbled, so by comparing the read information with the correct information, it can be determined whether there is a short circuit inside the fingerprint sensor.

[0067] Step B: The electronic device detects the image collected by the fingerprint sensor.

[0068] In some embodiments of the present application, if the electronic device detects that the image captured by the fingerprint sensor is correct, the electronic device can confirm that the image capture process of the image sensor is correct, thereby determining that the fingerprint module is not short-circuited, otherwise it is determined that the fingerprint module is short-circuited.

[0069] In some embodiments of the present application, the above step B can be implemented by at least one of the following steps B1 and B2.

[0070] Step B1: The electronic device detects whether the data size of at least one image matches a preset data size.

[0071] Step B1: The electronic device detects whether the data of at least one image passes the data legitimacy verification.

[0072] The at least one image is an image collected by a fingerprint sensor after satisfying fingerprint service-related conditions.

[0073] In some embodiments of the present application, the preset data size may be the same as the data size of the image collected by the fingerprint sensor when the fingerprint module is not short-circuited.

[0074] In some embodiments of the present application, in step B1, if the data size of each image in the at least one image is the same as the preset data size, it indicates that the fingerprint module is not short-circuited, otherwise it indicates that the fingerprint module may be short-circuited.

[0075] Similarly, in step B2, if the data of the at least one image passes the legality verification, it indicates that the fingerprint module is not short-circuited, otherwise it indicates that the fingerprint module may be short-circuited.

[0076] In some embodiments of the present application, the data of an image passing the legality verification means that every data in the image passes the legality verification.

[0077] For example, assuming that an image includes 1000 data, if the 1000 data all pass the legality verification, it means that the image is a legal image.

[0078] It should be noted that when step B includes step B1 and step B2, when at least one of the above images passes the legality verification and the data size of the image matches the preset data size, the electronic device can determine that the fingerprint module is not short-circuited, otherwise it is considered that the fingerprint module is short-circuited. Since there are many situations in which the fingerprint sensor is damaged, by detecting the reading of the register information corresponding to the image sensor and detecting the image collected by the image sensor, different damage conditions of the image sensor can be detected. In this way, it may not be possible to truly determine whether the fingerprint sensor is damaged. For example, the chipID and otp information of the fingerprint are correct, but the image collected by the fingerprint sensor may have problems. Therefore, by detecting the image collected by the image sensor, it is possible to accurately confirm whether the fingerprint sensor is short-circuited, thereby improving the accuracy of abnormality detection.

[0079] For the verification method of legality verification, please refer to the relevant technology, and this application will not go into details.

[0080] In this way, since detecting the register information corresponding to the fingerprint sensor can determine whether the fingerprint sensor stores the collected image data correctly, and detecting the image collected by the fingerprint sensor can determine whether the image collection process of the fingerprint sensor is normal, such as whether the pixels in the fingerprint sensor are damaged; that is, by detecting the register information corresponding to the fingerprint sensor and the collected image, the fingerprint sensor can be detected from different angles and sides, thereby improving the flexibility and comprehensiveness of detection.

[0081] Step C: The electronic device detects the communication connection between the fingerprint sensor and the MCU in the fingerprint module.

[0082] In some embodiments of the present application, each MCU in the fingerprint module can perform some recognition or data processing on the image collected by the fingerprint sensor. If the MCU is abnormal, it may also cause the fingerprint module to work abnormally, so it is necessary to detect whether the communication is good.

[0083] In some embodiments of the present application, the electronic device can detect whether the communication connection between the fingerprint sensor and each MCU is correct.

[0084] In some embodiments of the present application, when the fingerprint module includes multiple MCUs, it is necessary to detect the communication connection between each MCU and the sensor. In addition, if the communication connection between each MCU and the fingerprint sensor is correct, the electronic device can determine that the fingerprint module is not short-circuited; if the communication connection between one or more MCUs and the fingerprint sensor is abnormal, the electronic device can determine that the fingerprint module is abnormal.

[0085] In some embodiments of the present application, the fingerprint sensor can send a preset character to the MCU. If the MCU successfully receives the preset character, it means that the communication connection between the fingerprint sensor and the MCU is correct. Otherwise, it is considered that the communication connection between the fingerprint sensor and the MCU is incorrect, such as communication failure.

[0086] In this way, since the communication status between each MCU and the fingerprint sensor in the fingerprint module can be detected when the fingerprint module is abnormally detected, the normal operation of the fingerprint module may be prevented from being affected by a short circuit of the MCU, thereby improving the comprehensiveness of abnormality detection.

[0087] Step D: The electronic device detects the corresponding register information of the auxiliary sensor in the fingerprint module.

[0088] It can be understood that the electronic device can detect the register information corresponding to each auxiliary sensor in the fingerprint module, and when it is detected that the register information corresponding to all auxiliary sensors is correct, the electronic device can determine that the fingerprint module is not abnormal; if it is detected that the register information corresponding to one or more auxiliary sensors is read incorrectly, the fingerprint module is determined to be abnormal.

[0089] For other descriptions in step D, please refer to the relevant descriptions in the above step A. In order to avoid repetition, they will not be repeated here.

[0090] It should be noted that when the abnormality detection process includes the above steps A to D, if the detection result of any one of the above steps A to D indicates that the fingerprint module is abnormal, the electronic device can end this detection. Furthermore, after the electronic device ends this detection, in order to improve the detection accuracy, the electronic device can perform abnormality detection on the fingerprint module again, such as re-executing steps A to D until the number of abnormality detections reaches a preset number, such as 3 times. When the detection results of the above steps A to D indicate that the fingerprint module is normal, the electronic device determines that the fingerprint module is working normally, such as there is no short circuit.

[0091] In this way, since at least one of the register information corresponding to the fingerprint sensor, the register information corresponding to the auxiliary sensor, the communication connection between the MCU and the fingerprint sensor, and the image captured by the fingerprint sensor can be detected, the flexibility and comprehensiveness of abnormality detection of the fingerprint module can be improved.

[0092] In some embodiments of the present application, since a single detection may have accidental factors, such as partial damage in the fingerprint module may be unstable, and thus the accuracy of a single detection result may be low, in order to improve the accuracy of abnormal detection of the fingerprint module, the electronic device may perform multiple abnormal detections on the fingerprint module.

[0093] Exemplarily, if the electronic device performs an abnormality detection on the fingerprint module once and detects that the fingerprint module is normal, the electronic device may end the abnormality detection.

[0094] If the electronic device performs an abnormality detection on the fingerprint module once and detects that the fingerprint module is abnormal, in order to avoid false detection, the electronic device can trigger the fingerprint module to execute a restart service. After the fingerprint module is restarted, the fingerprint module is detected for a second abnormality. If the fingerprint module is also detected to be abnormal for the second time, the electronic device can restart the fingerprint module again and perform a third abnormality detection on the fingerprint module after restarting; if the fingerprint module is detected to be abnormal for the third short circuit, the electronic device can determine that the fingerprint module is indeed short-circuited.

[0095] It can be understood that in the above example, the abnormal detection is ended when it is detected that the fingerprint module is not short-circuited for the first time. In actual implementation, the electronic device can also perform multiple consecutive detections on the fingerprint module, and when the multiple detection results are correct, it is finally determined that the fingerprint module is normal.

[0096] It should be noted that the fingerprint module restart process can be as follows: the fingerprint CA sends a restart command to the fingerprint driver, so that the fingerprint driver controls the fingerprint module to power off, then power on, and resets the reset pin of the fingerprint sensor to achieve a complete restart state of the circuit inside the chip. After the fingerprint module completes the restart, the fingerprint CA can resend the abnormality detection command to the fingerprint TA, so that the fingerprint TA performs the next abnormality detection on the fingerprint module until multiple abnormality detections are completed.

[0097] In the anomaly detection method provided in the embodiment of the present application, since the fingerprint module can be detected for anomalies when the fingerprint service-related conditions are met, that is, the anomaly detection method provided in the embodiment of the present application uses the triggering or ending mechanism of the fingerprint module's service as the triggering mechanism for anomaly detection, thereby avoiding performing anomaly detection on the fingerprint module when the fingerprint module has no service. Therefore, not only can the anomaly detection of the fingerprint module be achieved, but also the anomaly detection power consumption of the electronic device can be minimized.

[0098] In some embodiments of the present application, after performing abnormality detection on the fingerprint module, the electronic device may execute an operation corresponding to the abnormality detection result.

[0099] In some embodiments of the present application, after the above step 102, the anomaly detection method provided by the embodiment of the present application may further include the following step 103.

[0100] Step 103: When the electronic device detects that the fingerprint module is normal, the electronic device executes the service triggered by the fingerprint service-related conditions through the fingerprint module.

[0101] In some embodiments of the present application, when the electronic device determines that the business-related conditions are met, it can first perform an abnormality detection on the fingerprint module, and when it is detected that the fingerprint module is normal, such as not short-circuited, execute the business corresponding to the business-related conditions through the fingerprint module.

[0102] For example, assuming that the electronic device receives a fingerprint entry command, the electronic device may first perform an abnormality detection on the fingerprint module, and if the detection is successful, that is, the fingerprint module is normal, control the fingerprint module to perform the fingerprint entry service.

[0103] In this way, since the service triggered by fingerprint-related conditions is executed only when the fingerprint module is determined to be normal, it can avoid the fingerprint module from executing the service in the case of a short circuit, thereby increasing the probability of the fingerprint module successfully executing the service and further saving the power consumption of the electronic device.

[0104] In some embodiments of the present application, if the electronic device determines that the fingerprint module is normal, and the fingerprint service-related conditions are used to trigger the fingerprint module to end the execution of a certain fingerprint service, such as triggering the fingerprint module to stop image acquisition, the electronic device can first end the service and then perform an abnormality detection on the fingerprint module to further save the power consumption of the electronic device and avoid interfering with or affecting the response speed of the fingerprint module.

[0105] In some embodiments of the present application, after the above step 102, the anomaly detection method provided by the embodiment of the present application may further include the following step 104.

[0106] Step 104: When the electronic device detects that the fingerprint module is abnormal, it turns off the power of the fingerprint module.

[0107] It is understandable that the electronic device can turn off the power of the fingerprint module when detecting an abnormality in the fingerprint module at least once.

[0108] For example, if the electronic device detects that the fingerprint module is abnormal three times in a row, the electronic device can determine that the fingerprint module is abnormal, and the electronic device can turn off the power of the fingerprint module to avoid heating inside the fingerprint module.

[0109] In this way, since the power of the fingerprint module can be turned off when an abnormality of the fingerprint module is detected, the fingerprint module can be prevented from being continuously impacted by current, thereby preventing the fingerprint module and the electronic device from heating up and saving power consumption of the electronic device.

[0110] The anomaly detection method provided in the embodiment of the present application is described below with reference to specific examples.

[0111] For example, taking the electronic device as a mobile phone as an example, Figure 2As shown, the embodiment of the present application provides an abnormality detection method, which may include the following steps:

[0112] Step 201: When the mobile phone receives a fingerprint input command during operation, it performs abnormality detection on the fingerprint module.

[0113] Step 202: When the mobile phone detects that the fingerprint module is abnormal, it turns off the power of the fingerprint module.

[0114] Step 203: When the mobile phone detects that the fingerprint module is normal, the mobile phone performs the fingerprint entry service through the fingerprint module.

[0115] In some embodiments of the present application, Figure 3 As shown, in step 201, "performing abnormality detection on the fingerprint module" may include the following steps:

[0116] Step 21A: The fingerprint CA in the mobile phone sends an abnormality detection command to the fingerprint TA in the mobile phone.

[0117] In some embodiments of the present application, after the fingerprint TA receives the abnormality detection command, it can start the abnormality detection process for the fingerprint module.

[0118] Step 21B: The fingerprint TA detects whether the register information corresponding to the fingerprint sensor is read normally.

[0119] In some embodiments of the present application, if the fingerprint TA detects that the corresponding register information of the fingerprint sensor is read normally, step 21C is continued to be executed, otherwise step 21D is executed.

[0120] Step 21C: The fingerprint TA detects whether the image collected by the image sensor is correct.

[0121] In some embodiments of the present application, if the fingerprint TA detects that the image captured by the fingerprint sensor is correct, that is, the image capture process of the image sensor is correct, the fingerprint TA continues to execute step 21H, otherwise the fingerprint TA executes step 21D.

[0122] Step 21D: The fingerprint TA determines that the abnormal detection result is that the fingerprint module is abnormal, and determines whether the number of fingerprint module restarts reaches 3 times.

[0123] In some embodiments of the present application, if the fingerprint module has been restarted 3 times, the fingerprint CA can execute step 21E. If the number of restarts of the fingerprint module is less than 3 times, the fingerprint CA can execute step 21F. It can be understood that the information interaction between the fingerprint TA and the fingerprint CA is omitted here. In fact, before the fingerprint CA executes step 21E or step 21F, the fingerprint CA can receive the instruction information sent by the fingerprint TA and determine whether to execute step 21E or step 21F according to the instruction information.

[0124] Step 21E: Fingerprint CA sends a first command to the fingerprint driver.

[0125] The first command is used to instruct the fingerprint driver to completely shut down the power of the fingerprint module. The fingerprint CA sends the first command, indicating that the fingerprint module is indeed short-circuited.

[0126] Step 21F: Fingerprint CA sends a second command to the fingerprint driver.

[0127] The second command is used to instruct the fingerprint driver to restart the fingerprint module and reset the reset pin of the fingerprint sensor.

[0128] In some embodiments of the present application, the first command and the second command may be system call commands, such as ioctl commands.

[0129] In some embodiments of the present application, the fingerprint driver may restart the fingerprint module according to the second command, and execute step 21G after the restart is completed.

[0130] Step 21G: The fingerprint driver notifies the fingerprint CA to perform a cyclic detection.

[0131] In some embodiments of the present application, after the fingerprint CA receives the notification sent by the fingerprint driver, step 21A may be repeated.

[0132] Step 21H: The fingerprint TA detects whether the communication connection between the fingerprint sensor and the MCU in the fingerprint module is correct.

[0133] In some embodiments of the present application, if the fingerprint TA detects that the communication connection between the fingerprint sensor and the MCU is normal, the fingerprint TA continues to execute step 21I, otherwise the fingerprint TA executes step 21D.

[0134] Step 21I: The fingerprint TA detects whether the register information corresponding to the auxiliary sensor in the fingerprint module is read correctly.

[0135] In some embodiments of the present application, if the fingerprint TA detects that the corresponding stored information of the auxiliary sensor is read correctly, the fingerprint TA executes step 21J, otherwise the fingerprint TA executes step 21D.

[0136] Step 21J: The fingerprint TA determines that the abnormal detection result of the fingerprint sensor is that the fingerprint module is normal.

[0137] In this way, on the one hand, since the fingerprint module is determined to be normal only after the register information corresponding to the fingerprint sensor is detected to be correct, the image collected by the fingerprint sensor is correct, the communication connection between the fingerprint sensor and the MCU is normal, and the register information corresponding to the auxiliary sensor is correct, the detection accuracy of whether the fingerprint module is normal can be improved.

[0138] On the other hand, since the electronic device ends an abnormality detection when any of the register information corresponding to the fingerprint sensor, the image collected by the fingerprint sensor, the register information corresponding to the auxiliary sensor, and the communication connection between the fingerprint sensor and the MCU is detected to be incorrect, the abnormality detection time can be shortened and the detection power consumption of the electronic device can be saved.

[0139] On the other hand, when the detection results of multiple abnormality detections on the fingerprint module are all abnormal, it is determined that an abnormality has occurred in the fingerprint module, so the accuracy of the detection result can be further improved.

[0140] In some embodiments of the present application, before the above step 201, after the mobile phone is turned on, the fingerprint software in the mobile phone initializes the fingerprint module, and after the fingerprint module is initialized, performs abnormal detection on the fingerprint module. After detecting that the fingerprint module is not short-circuited, the mobile phone operates normally.

[0141] The abnormality detection method provided in the embodiment of the present application can be executed by an abnormality detection device. In the embodiment of the present application, the abnormality detection device provided in the embodiment of the present application is described by taking the abnormality detection method executed by the abnormality detection device as an example.

[0142] The present application provides an abnormality detection device. Figure 4 The structure diagram of the abnormality detection device provided in the embodiment of the present application is shown as follows: Figure 4 As shown, the abnormality detection device 400 may include a detection module 401.

[0143] The detection module 401 may be used to perform abnormality detection on the fingerprint module when the fingerprint service related conditions are met;

[0144] The fingerprint service related condition may be used to trigger the fingerprint module to execute or terminate at least one service.

[0145] In some embodiments of the present application, the fingerprint service-related conditions may include at least one of the following:

[0146] A fingerprint entry command is received, a fingerprint unlocking command is received, an interrupt signal output by a fingerprint sensor in the fingerprint module is received, and a screen state switching command is received.

[0147] In some embodiments of the present application, the detection module 401 may be used to detect at least one of the following:

[0148] Detecting register information corresponding to the fingerprint sensor;

[0149] Detecting an image captured by the fingerprint sensor;

[0150] Detecting the communication connection between the fingerprint sensor and the microcontroller unit MCU in the fingerprint module;

[0151] Detecting whether the register information in the auxiliary sensor in the fingerprint module is read correctly;

[0152] Detect register information corresponding to the auxiliary sensor in the fingerprint module.

[0153] In some embodiments of the present application, the detection module 401 may be used to detect at least one of the following:

[0154] Detecting whether the data size of at least one image matches a preset data size;

[0155] Check whether the data of at least one image passes the data validity check;

[0156] The at least one image may be an image collected by the fingerprint sensor after the fingerprint service-related conditions are met.

[0157] In some embodiments of the present application, the above-mentioned abnormality detection device may further include: a processing module;

[0158] The processing module may be configured to shut down the power supply of the fingerprint module when the detection module 401 detects that the fingerprint module is abnormal.

[0159] In the anomaly detection device provided in the embodiment of the present application, since the anomaly detection device can perform anomaly detection on the fingerprint module when the fingerprint service-related conditions are met, that is, the anomaly detection device uses the triggering or ending mechanism of the fingerprint module's service as the triggering mechanism for anomaly detection, it can avoid performing anomaly detection on the fingerprint module when the fingerprint module has no service. Therefore, not only can the anomaly detection of the fingerprint module be achieved, but also the power consumption of the electronic device for anomaly detection can be minimized.

[0160] The abnormality detection device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.

[0161] The abnormality detection device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0162] The abnormality detection device provided in the embodiment of the present application can achieve Figures 1 to 3 The various processes implemented in the method embodiment achieve the same technical effect and will not be described again here to avoid repetition.

[0163] Alternatively, if Figure 5 As shown, an embodiment of the present application also provides an electronic device 500, including a processor 501 and a memory 502, wherein the memory 502 stores a program or instruction that can be executed on the processor 501, and when the program or instruction is executed by the processor 501, the various steps of the above-mentioned abnormality detection method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0164] It should be noted that the electronic devices in the embodiments of the present application include mobile electronic devices and non-mobile electronic devices.

[0165] Figure 6 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0166] The electronic device 1500 includes but is not limited to: a radio frequency unit 1501, a network module 1502, an audio output unit 1503, an input unit 1504, a sensor 1505, a display unit 1506, a user input unit 1507, an interface unit 1508, a memory 1509, and a processor 1510 and other components.

[0167] Those skilled in the art will appreciate that the electronic device 1500 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1510 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0168] The processor 1510 may be used to perform abnormality detection on the fingerprint module when the fingerprint service-related conditions are met;

[0169] The fingerprint service related condition may be used to trigger the fingerprint module to execute or terminate at least one service.

[0170] In some embodiments of the present application, the fingerprint service-related conditions may include at least one of the following:

[0171] A fingerprint entry command is received, a fingerprint unlocking command is received, an interrupt signal output by a fingerprint sensor in the fingerprint module is received, and a screen state switching command is received.

[0172] In some embodiments of the present application, the processor 1510 may be used to detect at least one of the following:

[0173] Detecting register information corresponding to the fingerprint sensor;

[0174] Detecting an image captured by the fingerprint sensor;

[0175] Detecting the communication connection between the fingerprint sensor and the microcontroller unit MCU in the fingerprint module;

[0176] Detecting whether the register information in the auxiliary sensor in the fingerprint module is read correctly;

[0177] Detect register information corresponding to the auxiliary sensor in the fingerprint module.

[0178] In some embodiments of the present application, the processor 1510 may be used to detect at least one of the following:

[0179] Detecting whether the data size of at least one image matches a preset data size;

[0180] Check whether the data of at least one image passes the data validity check;

[0181] The at least one image may be an image collected by the fingerprint sensor after the fingerprint service-related conditions are met.

[0182] In some embodiments of the present application, the processor 1510 may also be configured to shut down the power supply of the fingerprint module when an abnormality of the fingerprint module is detected.

[0183] In the electronic device provided in the embodiment of the present application, since the electronic device can perform abnormal detection on the fingerprint module when the conditions related to the fingerprint service are met, that is, the electronic device uses the triggering or ending mechanism of the fingerprint module's service as the triggering mechanism for abnormal detection, it can avoid abnormal detection of the fingerprint module when the fingerprint module has no service. Therefore, not only can the abnormal detection of the fingerprint module be achieved, but also the abnormal detection power consumption of the electronic device can be minimized.

[0184] It should be understood that in the embodiment of the present application, the input unit 1504 may include a graphics processor (Graphics Processing Unit, GPU) 15041 and a microphone 15042, and the graphics processor 15041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1506 may include a display panel 15061, and the display panel 15061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1507 includes a touch panel 15071 and at least one of other input devices 15072. The touch panel 15071 is also called a touch screen. The touch panel 15071 may include two parts: a touch detection device and a touch controller. Other input devices 15072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0185] The memory 1509 can be used to store software programs and various data. The memory 1509 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1509 may include a volatile memory or a non-volatile memory, or the memory 1509 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1509 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0186] The processor 1510 may include one or more processing units; optionally, the processor 1510 integrates an application processor and a modem processor, wherein the application processor mainly processes operations involving an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1510. The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by the processor, each process of the above-mentioned abnormality detection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0187] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0188] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned abnormality detection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0189] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0190] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned abnormality detection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0191] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0192] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0193] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An anomaly detection method, characterized in that: The method comprises: When the fingerprint service-related conditions are met, the fingerprint module is detected for abnormalities; The fingerprint service related condition is used to trigger the fingerprint module to execute or terminate at least one service.

2. The method according to claim 1, characterized in that The fingerprint service related conditions include at least one of the following: A fingerprint entry command is received, a fingerprint unlocking command is received, an interrupt signal output by a fingerprint sensor in the fingerprint module is received, and a screen state switching command is received.

3. The method according to claim 1, characterized in that The abnormality detection of the fingerprint module includes at least one of the following: Detecting register information corresponding to the fingerprint sensor; Detecting an image captured by the fingerprint sensor; Detecting the communication connection between the fingerprint sensor and the microcontroller unit MCU in the fingerprint module; Detect register information corresponding to the auxiliary sensor in the fingerprint module.

4. The method according to claim 3, characterized in that The detecting the image acquired by the fingerprint sensor includes at least one of the following: Detecting whether the data size of at least one image matches a preset data size; Check whether the data of at least one image passes the data validity check; The at least one image is an image collected by the fingerprint sensor after the fingerprint service-related conditions are met.

5. The method according to any one of claims 1 to 4, characterized in that After performing abnormality detection on the fingerprint module, the method further includes: When an abnormality of the fingerprint module is detected, the power supply of the fingerprint module is turned off.

6. An abnormality detection device, characterized in that: The device comprises: a detection module; The detection module is used to perform abnormal detection on the fingerprint module when the fingerprint service related conditions are met; The fingerprint service related condition is used to trigger the fingerprint module to execute or terminate at least one service.

7. The device according to claim 6, characterized in that The fingerprint service related conditions include at least one of the following: A fingerprint entry command is received, a fingerprint unlocking command is received, an interrupt signal output by a fingerprint sensor in the fingerprint module is received, and a screen state switching command is received.

8. The device according to claim 6, characterized in that The detection module is specifically used to detect at least one of the following: Detecting register information corresponding to the fingerprint sensor; Detecting an image captured by the fingerprint sensor; Detecting the communication connection between the fingerprint sensor and the microcontroller unit MCU in the fingerprint module; Detecting whether the register information in the auxiliary sensor in the fingerprint module is read correctly; Detect register information corresponding to the auxiliary sensor in the fingerprint module.

9. The device according to claim 6, characterized in that The detection module is specifically used to detect at least one of the following: Detecting whether the data size of at least one image matches a preset data size; Check whether the data of at least one image passes the data validity check; The at least one image is an image collected by the fingerprint sensor after the fingerprint service-related conditions are met.

10. The device according to any one of claims 6 to 9, characterized in that The device further comprises: a processing module; The processing module is used to turn off the power supply of the fingerprint module when the detection module detects that the fingerprint module is abnormal.

11. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the abnormality detection method according to any one of claims 1 to 6 are implemented.