Fault detection method and electronic device
By forcibly setting the screen on/off state in the AOD mode of the terminal device and comparing the changes in the screen on/off state, the false detection problem of screen on/off fault detection of the terminal device is solved, the detection accuracy is improved and the false detection rate is reduced.
Patent Information
- Application Number
- CN202210018485.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-07
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2042-01-07
AI Technical Summary
Existing methods for detecting screen on/off faults are prone to false detections in terminal devices, resulting in insufficient detection accuracy.
By detecting a power button press, the electronic device enters AOD (Always On Display) mode, forcibly setting the screen to on/off state. After a timer reaches a specified duration, the on/off state before and after the press is compared to perform fault detection.
It improves the accuracy of fault detection, reduces the false detection rate, and especially reduces unnecessary power consumption in specific scenarios.
Smart Images

Figure CN116450423B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of terminal devices, and in particular to a fault detection method and an electronic device. BACKGROUND
[0002] With the continuous development of terminal technology, terminal devices configured with display screens are attracting more and more attention, and the number of application programs is also increasing, which leads to the occurrence of faults such as non-lighting or non-extinguishing screen during the use of the terminal device. Therefore, it is particularly important to detect the lighting and extinguishing screen faults of the terminal device. However, the existing lighting and extinguishing screen fault detection method usually has the problem of false detection when performing fault detection. Therefore, how to improve the accuracy of fault detection is a technical problem to be solved. SUMMARY
[0003] In order to solve the above technical problems, the present application provides a fault detection method and an electronic device. In the method, by determining the current scene of the electronic device, different fault detection strategies are adopted to avoid false detection of the lighting and extinguishing screen faults, thereby improving the accuracy of fault detection.
[0004] In a first aspect, an embodiment of the present application provides a fault detection method. The method comprises: in response to a pressing operation of a power key of an electronic device by a user, starting a timer, and entering an AOD display state after receiving the pressing operation; the electronic device acquires a first lighting and extinguishing state, which is the lighting and extinguishing state of the screen of the electronic device before the power key is pressed; the electronic device sets a second lighting and extinguishing state as an extinguishing screen state, wherein the second lighting and extinguishing state is used to represent the lighting and extinguishing state of the screen of the electronic device after the power key is pressed; and the electronic device performs a lighting and extinguishing screen fault detection operation based on the first lighting and extinguishing state and the second lighting and extinguishing state when the timing of the timer reaches a specified time length. In this way, the electronic device can ensure the accuracy of fault detection by forcibly setting the state of the lighting and extinguishing screen when the AOD mode is determined to be in the open state, thereby reducing the false detection rate of faults.
[0005] According to the first aspect, in response to the pressing operation of the power key of the electronic device by the user, the timer is started, comprising: in response to the pressing operation of the power key of the electronic device by the user, determining whether the electronic device is in a lighting screen state; if the electronic device is in the lighting screen state, starting the timer when the lifting operation is received. In this way, the electronic device is in the lighting screen state, and the timer is started when the power key is lifted, which can improve the accuracy of fault detection.
[0006] According to the first aspect, or any one of the implementations of the first aspect, the starting the timer in response to the pressing operation of the power key of the electronic device comprises: determining whether a scenario in which the electronic device is located is a specific scenario in response to the pressing operation of the power key of the electronic device, wherein the screen of the electronic device does not change from the first brightness state to the second brightness state when the pressing operation is received in the specific scenario; and starting the timer if the scenario in which the electronic device is located is not the specific scenario. In this way, the electronic device can more accurately and flexibly detect the screen failure.
[0007] For example, the specific scenario can include a proximity light scenario, a combined pressing scenario, and a voice wake-up scenario.
[0008] According to the first aspect, or any one of the implementations of the first aspect, if the scenario in which the electronic device is located is the specific scenario, the screen failure detection operation is not performed. In this way, the accuracy of the failure detection can be improved, and unnecessary power consumption of the electronic device caused by the screen failure detection can be reduced.
[0009] According to the first aspect, or any one of the implementations of the first aspect, the specific scenario includes at least the proximity light scenario, the combined pressing scenario, and the voice wake-up scenario; wherein the proximity light scenario is triggered when the screen of the electronic device is shielded in a call state, the combined pressing scenario is triggered when the power key and another key are pressed at the same time, and the voice wake-up scenario is triggered when the power key is pressed for a long time to trigger the human-computer voice interaction. In this way, the electronic device can more accurately and flexibly detect the screen failure.
[0010] According to the first aspect, or any one of the implementations of the first aspect, the performing the screen failure detection operation based on the first brightness state and the second brightness state when the timing of the timer reaches the specified time length comprises: determining whether the first brightness state and the second brightness state are the same when the timing of the timer reaches the specified time length; determining that the screen of the electronic device fails if the first brightness state and the second brightness state are the same; and determining that the screen of the electronic device does not fail if the first brightness state and the second brightness state are not the same.
[0011] For example, the first brightness state and the second brightness state can be a screen-on state or a screen-off state.
[0012] For example, the specified time length can be 6s.
[0013] In a second aspect, the embodiments of the present application provide a fault detection method. The method comprises: in response to a pressing operation of a power key of an electronic device by a user, starting a timer, the electronic device being in an AOD display state before the pressing operation is received; setting a bright-dark state of a screen of the electronic device before the power key is pressed as an off-screen state, and taking the set bright-dark state as a first bright-dark state; obtaining a second bright-dark state when timing of the timer reaches a specified time length, the second bright-dark state being a bright-dark state of the screen of the electronic device when the timing of the timer reaches the specified time length after the power key is pressed; and performing a bright-dark screen fault detection operation based on the first bright-dark state and the second bright-dark state. In this way, the electronic device can ensure the accuracy of fault detection by forcibly setting the state of the bright-dark screen when it is determined that the electronic device is in the AOD display state, and thus the false detection rate of faults can be reduced.
[0014] According to the second aspect, the pressing operation comprises a pressing-down operation and a lifting-up operation, and starting the timer in response to the pressing operation of the power key of the electronic device by the user comprises: directly starting the timer in response to a pressing-down operation of the power key of the electronic device by the user. In this way, the electronic device is in the AOD screen state, and the timer is started when the power key is pressed down, so that the accuracy of fault detection can be improved.
[0015] According to the second aspect, or any one of the implementations of the second aspect, starting the timer in response to the pressing operation of the power key of the electronic device by the user comprises: in response to the pressing operation of the power key of the electronic device by the user, determining whether a scene in which the electronic device is located is a specific scene, the bright-dark state of the screen of the electronic device not changing when the pressing operation is received in the specific scene; and if the scene in which the electronic device is located is not the specific scene, starting the timer. In this way, the electronic device can more accurately and flexibly detect the bright-dark screen fault.
[0016] According to the second aspect, or any one of the implementations of the second aspect, if the scene in which the electronic device is located is the specific scene, the bright-dark screen fault detection operation is not performed. In this way, the accuracy of fault detection can be improved, and unnecessary power consumption of the electronic device caused by the bright-dark screen fault detection can be reduced.
[0017] According to the second aspect, or any one of the implementations of the second aspect, the specific scene at least comprises a proximity light scene, a combined pressing scene, and a voice wake-up scene; the proximity light scene is a scene triggered when the screen of the electronic device is shielded in a call state, the combined pressing scene is a scene triggered when the power key and another key are pressed by the user at the same time, and the voice wake-up scene is a scene triggered when a human-machine voice interaction is triggered by the user pressing the power key for a long time.
[0018] According to a second aspect, or any possible implementation mode of the second aspect, the screen-on and screen-off fault detection operation is performed based on the first screen-on and screen-off state and the second screen-on and screen-off state, including: determining whether the first screen-on and screen-off state and the second screen-on and screen-off state are same; if the first screen-on and screen-off state and the second screen-on and screen-off state are same, determining that the screen of the electronic device is faulty; if the first screen-on and screen-off state and the second screen-on and screen-off state are not same, determining that the screen of the electronic device is not faulty.
[0019] According to a third aspect, embodiments of the present application provide an electronic device. The electronic device includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: in response to a pressing operation of a power key of the electronic device by a user, starting a timer, and entering an AOD display state after receiving the pressing operation; obtaining a first screen-on and screen-off state, the first screen-on and screen-off state being a screen-on and screen-off state of a screen of the electronic device before the power key is pressed; setting a second screen-on and screen-off state as a screen-off state, wherein the second screen-on and screen-off state is used to represent a screen-on and screen-off state of the screen of the electronic device after the power key is pressed; and performing a screen-on and screen-off fault detection operation based on the first screen-on and screen-off state and the second screen-on and screen-off state when a timing of the timer reaches a specified time length.
[0020] According to the third aspect, the pressing operation includes a pressing operation and a lifting operation, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: in response to the pressing operation of the power key of the electronic device by the user, determining whether the electronic device is in a screen-on state; if the electronic device is in the screen-on state, starting the timer when the lifting operation is received.
[0021] According to the third aspect, or any possible implementation mode of the third aspect, when the computer programs are executed by the one or more processors, the electronic device performs the following steps: in response to the pressing operation of the power key of the electronic device by the user, determining whether a scene in which the electronic device is located is a specific scene, and in the specific scene, a screen-on and screen-off state of the screen of the electronic device does not change when the pressing operation is received; if the scene in which the electronic device is located is not the specific scene, starting the timer.
[0022] According to the third aspect, or any possible implementation mode of the third aspect, when the computer programs are executed by the one or more processors, the electronic device performs the following steps:
[0023] If the scene in which the electronic device is located is the specific scene, the screen-on and screen-off fault detection operation is not performed.
[0024] According to a third aspect, or any possible implementation mode of the third aspect, the specific scene includes at least a proximity light scene, a combination press scene and a voice wake-up scene; the proximity light scene is a scene triggered when the screen is shielded while the electronic device is in a call state; the combination press scene is a scene triggered when a user simultaneously presses a power key and another key; and the voice wake-up scene is a scene triggered by a user pressing the power key for a long time to trigger a human-computer voice interaction.
[0025] According to the third aspect, or any possible implementation mode of the third aspect, when the computer program is executed by one or more processors, the electronic device performs the following steps: determining whether the first screen-on / off state and the second screen-on / off state are the same when the timing of the timer reaches the specified time length; if the first screen-on / off state and the second screen-on / off state are the same, determining that the screen of the electronic device is faulty; and if the first screen-on / off state and the second screen-on / off state are not the same, determining that the screen of the electronic device is not faulty.
[0026] According to a fourth aspect, an embodiment of the present application provides an electronic device. The electronic device includes one or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer program is executed by the one or more processors, the electronic device performs the following steps: in response to a press operation of a power key of the electronic device by a user, starting a timer, the electronic device being in an AOD display state before the press operation is received; setting a screen-on / off state of the electronic device before the power key is pressed to an off-screen state, and setting the set screen-on / off state as a first screen-on / off state; obtaining a second screen-on / off state when the timing of the timer reaches a specified time length, the second screen-on / off state being a screen-on / off state of the electronic device when the timing of the timer reaches the specified time length after the power key is pressed; and performing a screen-on / off fault detection operation based on the first screen-on / off state and the second screen-on / off state.
[0027] According to the fourth aspect, when the computer program is executed by one or more processors, the electronic device performs the following steps: in response to a press operation of a power key of the electronic device by a user, directly starting a timer.
[0028] According to the fourth aspect, or any possible implementation mode of the fourth aspect, when the computer program is executed by one or more processors, the electronic device performs the following steps: in response to a press operation of a power key of the electronic device by a user, determining whether a scene in which the electronic device is located is a specific scene, the screen-on / off state of the electronic device not being changed when the press operation is received in the specific scene; and if the scene in which the electronic device is located is not the specific scene, starting a timer.
[0029] According to a fourth aspect, or any possible implementation mode of the fourth aspect, when the computer program is executed by one or more processors, the electronic device is caused to perform the following steps: if the scenario in which the electronic device is located is a specific scenario, the screen-on / off fault detection operation is not performed.
[0030] According to the fourth aspect, or any possible implementation mode of the fourth aspect, the specific scenario at least includes a proximity light scenario, a combined press scenario, and a voice wake-up scenario; the proximity light scenario is a scenario triggered when the screen is shielded while the electronic device is in a call state; the combined press scenario is a scenario triggered when a user simultaneously presses a power key and another key; and the voice wake-up scenario is a scenario triggered when a user long-presses the power key to trigger human-computer voice interaction.
[0031] According to the fourth aspect, or any possible implementation mode of the fourth aspect, when the computer program is executed by one or more processors, the electronic device is caused to perform the following steps: determining whether the first screen-on / off state and the second screen-on / off state are the same; if the first screen-on / off state and the second screen-on / off state are the same, determining that the screen of the electronic device is faulty; and if the first screen-on / off state and the second screen-on / off state are not the same, determining that the screen of the electronic device is not faulty.
[0032] In a fifth aspect, an embodiment of the present application provides a chip. The chip includes one or more interface circuits and one or more processors; the interface circuit is configured to receive a signal from a memory of an electronic device and send a signal to the processor, the signal including computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device is caused to perform the fault detection method of the first aspect and the second aspect and any one of the first aspect and the second aspect.
[0033] The fifth aspect and any possible implementation mode of the fifth aspect correspond to the first aspect and any possible implementation mode of the first aspect, respectively. For details, refer to the technical effects of the first aspect and the second aspect and any possible implementation mode of the first aspect and the second aspect, which will not be described here.
[0034] In a sixth aspect, an embodiment of the present application provides a computer readable storage medium. The computer readable storage medium includes a computer program, and is characterized by: when the computer program is executed on an electronic device, the electronic device is caused to perform the fault detection method of the first aspect and the second aspect and any one of the first aspect and the second aspect.
[0035] The sixth aspect and any one of the implementation forms of the sixth aspect correspond to the first aspect and the second aspect and any one of the implementation forms of the first aspect and the second aspect respectively. The technical effects corresponding to the sixth aspect and any one of the implementation forms of the sixth aspect can be referred to the technical effects corresponding to the first aspect and the second aspect and any one of the implementation forms of the first aspect and the second aspect, which will not be described here. BRIEF DESCRIPTION OF DRAWINGS
[0036] Figures 1a-1b An application scenario schematic diagram provided for an embodiment of the present application;
[0037] Figures 2a-2b Another application scenario schematic diagram provided for an embodiment of the present application;
[0038] Figures 3a-3c A schematic diagram of switching from a desktop mode to an AOD mode provided for an embodiment of the present application;
[0039] Figures 4a-4b A schematic diagram of switching from an AOD mode to a lock screen mode provided for an embodiment of the present application;
[0040] Figure 5 A structural schematic diagram of an electronic device shown in an embodiment of the present application;
[0041] Figure 6 A software structural schematic diagram of an electronic device shown in an embodiment of the present application;
[0042] Figure 7 A flow schematic diagram of a fault detection method provided for an embodiment;
[0043] Figure 8 A flow schematic diagram of a fault detection method provided for an embodiment of the present application;
[0044] Figure 9 A flow schematic diagram of a screen-on and screen-off fault detection operation of a fault detection method provided for an embodiment of the present application;
[0045] Figure 10 A flow schematic diagram of a fault detection method provided for another embodiment of the present application;
[0046] Figure 11 An example diagram of an electronic device from a screen-on and screen-off state to a screen-off state in a fault detection method provided for an embodiment of the present application;
[0047] Figure 12 A flow schematic diagram of a fault detection method provided for yet another embodiment of the present application;
[0048] Figure 13 An example diagram of an electronic device from a screen-off state to a screen-on state in a fault detection method provided for an embodiment of the present application. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0050] It should be understood that, when used in the specification and the appended claims of the present application, the term “comprising” indicates the presence of the described features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0051] It should also be understood that, in the embodiments of the present application, “one or more” means one, two, or more than two; “and / or” describes the association relationship of the associated objects, which means that there can be three relationships; for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character “ / ” generally represents an “or” relationship between the associated objects before and after it.
[0052] The terms “first” and “second” and the like in the specification and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of the objects. For example, the first target object and the second target object are used to distinguish different target objects, rather than to describe a specific order of the target objects.
[0053] In the present application, the reference “one embodiment” or “some embodiments” and the like means that the specific features, structures, or characteristics described in connection with the embodiment are included in one or more embodiments of the present application. Therefore, the statements “in one embodiment”, “in some embodiments”, “in other some embodiments”, “in further some embodiments” and the like appearing in different places in the specification are not necessarily all referring to the same embodiment, but mean “one or more but not all embodiments”, unless otherwise specifically emphasized. The terms “include”, “contain”, “have” and their variants mean “include but are not limited to”, unless otherwise specifically emphasized.
[0054] In the description of the embodiments of the present application, the meaning of “a plurality of” is two or more, unless otherwise specified. For example, a plurality of processing units means two or more processing units; a plurality of systems means two or more systems.
[0055] As Figures 1a-1bFor example, please refer to the following diagram illustrating an application scenario. Figure 1a When the screen of an electronic device is on, if the user presses the power button 101, the screen status of the electronic device will change from... Figure 1a Switch to Figure 1b , Figure 1b The screen is in off state. If the electronic device's screen is not malfunctioning and is in a bright state, pressing the power button 101 will turn the screen off. Figure 1a Switching to screen-on state Figure 1b The screen is off. Pressing the power button can be done by pressing and releasing it.
[0056] Additionally, if an electronic device experiences a screen-on / off malfunction while the screen is on, pressing the power button 101 will prevent the screen from turning off. Figure 1a Switch to Figure 1b In other words, if the user presses the power button 101 when the screen of the electronic device malfunctions, the screen will remain in the same state. Figure 1a constant.
[0057] like Figures 2a-2b For an illustrative example, please refer to the diagram illustrating another application scenario. Figure 2a When the screen of an electronic device is off, if the user presses the power button 101, the screen state of the electronic device can be changed from off to on. Figure 2a Switch to Figure 2b , Figure 2b The screen is in the on state. Therefore, if the screen of the electronic device is not malfunctioning and is in the off state, the screen of the electronic device will turn on when the user presses the power button 101. Figure 2a Switching to screen-off state Figure 2b The screen is on.
[0058] Additionally, if an electronic device experiences a screen-on / off malfunction while the screen is off, pressing the power button 101 will prevent the screen from turning on / off. Figure 2a Switch to Figure 2b In other words, if the user presses the power button 101 when the screen of the electronic device malfunctions, the screen will remain in the same state. Figure 2a constant.
[0059] Therefore, in order to accurately detect screen on / off faults, when it is detected that the user presses the power button 101 of the electronic device, the first on / off state of the screen before the press operation and the second on / off state of the screen after the press operation can be obtained.
[0060] The second bright-extinction state is obtained after a first specified time length after receiving the pressing operation. For example, the second bright-extinction state is obtained 6s after detecting the pressing operation. On this basis, it is determined whether the first bright-extinction state and the second bright-extinction state are the same. If the first bright-extinction state and the second bright-extinction state are the same, it is determined that the screen of the electronic device is faulty, otherwise it is determined that the screen of the mobile phone is not faulty. However, in some specific scenarios, the bright-extinction state of the screen of the electronic device may not change even if the pressing operation is triggered. At this time, if the fault is output or the fault log is recorded, it will cause false alarm of the fault, and then affect the user experience.
[0061] The fault detection involved in the embodiments of the present application can be triggered in any mode of the electronic device. The modes of the electronic device in the embodiments of the present application include but are not limited to: screen-off mode, lock screen mode, desktop mode, and AOD (Always on Display, screen-off display) mode, etc.
[0062] For example, the desktop mode is the mode after the electronic device is unlocked, as shown in Figure 1a For example, the user can operate the electronic device in the desktop mode to use the corresponding functions provided by the electronic device. For example, the user can use chat applications, video applications, calls, watch videos, etc.
[0063] In the desktop mode, after receiving the pressing operation of the power key by the user, the electronic device can switch from the bright screen interface to the screen-off interface in normal cases, as shown in Figure 1a and Figure 1b On the contrary, in abnormal cases, the current interface of the electronic device can remain the bright screen interface unchanged. In addition, the desktop mode can also be referred to as a non-lock screen mode, which can include both desktop use scenarios and application use scenarios.
[0064] For example, the screen-off mode can be optionally the mode entered by the electronic device after receiving the user's click on the power key (power key), as shown in Figure 2a When the electronic device is in the screen-off mode, the electronic device can switch from the screen-off interface to the bright screen interface in normal cases after receiving the touch operation of the power key by the user. On the contrary, in abnormal cases, the current interface of the electronic device can remain the screen-off interface unchanged.
[0065] For example, the lock screen mode can optionally lock the screen of the electronic device, as shown in Figure 2b For example, in the screen-off mode, the user can operate the electronic device by touch or key, etc. to make the electronic device enter the lock screen mode. For example, the lock screen mode locks the screen, and the user needs to unlock to enter the desktop mode.
[0066] Exemplarily, the lock screen mode can provide some functions that do not need to be unlocked to use, such as a photographing function, widgets, and the like. That is, the user can perform corresponding operations on the electronic device in the lock screen mode, and when the user presses the power key of the electronic device, the electronic device enters the lock screen mode. In the lock screen mode of the electronic device, after receiving a touch operation of the power key by the user, the electronic device switches to the screen-off interface in a normal case of the electronic device. In an abnormal case of the electronic device, the lock screen interface remains unchanged.
[0067] Exemplarily, the AOD mode refers to a display mode in which a partial area of the display screen remains always-on or brightens when the display screen detects a touch screen operation when the electronic device is in the screen-off state. The electronic device in which the AOD mode is set switches from the display-on interface to the AOD interface directly when the electronic device is about to be in the screen-off state, and switches from the AOD interface to the lock screen interface directly when the electronic device is about to be in the display-on state. In addition, the electronic device can switch from the display-on interface to the screen-off interface first, and then switch from the screen-off interface to the AOD interface when the electronic device is about to be in the screen-off state.
[0068] In some embodiments, the electronic device (such as a mobile phone) in which the AOD mode is set can display the AOD interface in the screen-off state, and the scene in which the electronic device is located is the AOD scene. The screen-off state can refer to a state in which the screen of the electronic device is completely not lit. The AOD can be referred to as the screen-off display or the screen-out display, and is not limited in this regard. The following is explained and described by taking a mobile phone as an example.
[0069] Exemplarily, the mobile phone can display information such as time, date, and power when performing the AOD, and can also display an animation, as shown in Figures 3a-3c . Figures 3a-3c FIG. 1 is a schematic diagram of an AOD scene. When the user presses the power key 101 while the electronic device is displaying any interface, the electronic device enters the screen-off state. If the AOD mode of the electronic device is in the open state, the electronic device displays the AOD interface after being in the screen-off state.
[0070] Exemplarily, when the electronic device is in the desktop mode as shown in Figure 3a , the user presses the power key 101, and the electronic device can enter the screen-off state as shown in Figure 3b , and then display the AOD interface as shown in Figure 3c . In addition, when the electronic device displays the AOD interface, the mobile phone exits the AOD interface and enters the display-on state when the user presses the power key.
[0071] It should be noted that when the electronic device is in the desktop mode as shown in Figure 3a , the electronic device can directly enter the AOD interface as shown in Figure 3c after the user presses the power key.
[0072] As another example, as shown in FIG. 6A, when the electronic device is in the AOD interface, if it is detected that the user presses the power key 101, the display interface of the electronic device can be switched from the AOD interface to the lock screen interface, as shown in FIG. 6B. Figures 4a-4b As shown in FIG. 6A, when the electronic device is in the AOD interface, if it is detected that the user presses the power key 101, the electronic device enters the lock screen mode, that is, displays the lock screen interface as shown in FIG. 6B. Figure 4a As shown in FIG. 6A, when the electronic device is in the AOD interface, if it is detected that the user presses the power key 101, the electronic device enters the lock screen mode, that is, displays the lock screen interface as shown in FIG. 6B. Figure 4b As shown in FIG. 6A, when the electronic device is in the AOD interface, if it is detected that the user presses the power key 101, the electronic device enters the lock screen mode, that is, displays the lock screen interface as shown in FIG. 6B.
[0073] As can be seen from the above, when the electronic device is in the bright state and the AOD mode is in the open state, if it is detected that the user presses the power key 101 of the electronic device, the electronic device first switches from the AOD mode to the lock screen mode. Figures 4a-4b As can be seen from the above, when the electronic device is in the bright state and the AOD mode is in the open state, if it is detected that the user presses the power key 101 of the electronic device, the electronic device first switches from the AOD mode to the lock screen mode.
[0074] In addition, the second bright-dark state can be obtained after a first specified time period after receiving the pressing operation. However, when the first specified time period is reached, the interface displayed by the electronic device is the AOD interface, so the second bright-dark state is the bright state. It can be seen that the first bright-dark state and the second bright-dark state at this time are the same. Therefore, the bright-dark screen fault detection operation using the above fault detection method will have the problem of false detection.
[0075] As an example, as shown in FIG. 6A, when the electronic device is in the desktop interface (the first bright-dark state is bright), it is detected that the user presses the power key, and the electronic device switches from the bright state to the dark state. Then, since the AOD mode is in the open state, the electronic device can switch from the dark state to the bright state (AOD interface) after 1s. The second bright-dark state obtained by the electronic device after 6s is the bright state. It can be seen that the bright-dark state change at this time is a normal case, but according to the above fault detection method, it will be detected that the bright-dark screen has a fault, thereby causing the false detection rate to increase.
[0076] Figures 3a-3c As an example, as shown in FIG. 6A, when the electronic device is in the AOD interface (the first bright-dark screen state is bright), it is detected that the user presses the power key, and the electronic device switches from the bright state to the lock screen interface (the second bright-dark state is dark). It can be seen that the bright-dark state change at this time is a normal case, but according to the above fault detection method, it will be detected that the bright-dark screen has a fault, thereby causing the false detection rate to increase.
[0077] As an example, as shown in FIG. 6A, when the electronic device is in the AOD interface (the first bright-dark screen state is bright), it is detected that the user presses the power key, and the electronic device switches from the bright state to the lock screen interface (the second bright-dark state is dark). It can be seen that the bright-dark state change at this time is a normal case, but according to the above fault detection method, it will be detected that the bright-dark screen has a fault, thereby causing the false detection rate to increase. Figures 4a-4b
[0078] To solve the above problems, the embodiment of the present application provides a fault detection method. In the fault detection method, if it is detected that a user inputs a pressing operation on the power key in the case that the AOD mode of the electronic device is in an open state, the accuracy of fault detection can be ensured by forcibly setting the state of screen on / off, and thus the false detection rate of faults can be reduced.
[0079] The fault detection method in the embodiment of the present application can be applied to the electronic device as shown in Figure 5 . Figure 5 The electronic device 100 as shown in Figures 1a to 4b may be a terminal, which can also be referred to as a terminal device. The terminal can be a cellular phone, a pad, a wearable device, an Internet of Things device, or a device with a camera, without limitation. It should be noted that the structural schematic diagram of the electronic device 100 can be applicable to a mobile phone / electronic device in .
[0080] It should be further noted that the electronic device 100 can have more or fewer components than those shown in the figure, can combine two or more components, or can have a different component configuration. Figure 5 The various components shown in may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.
[0081] The electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor, a gyroscope sensor, a barometric pressure sensor 180, a magnetic sensor 180, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor 180, a temperature sensor 180, a touch sensor, an ambient light sensor 180, a bone conduction sensor 180, etc.
[0082] It can be understood that the structural schematic of the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than the schematic, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0083] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.
[0084] Among them, the controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of fetching instructions and executing instructions.
[0085] The memory in the processor 110 can also be provided for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The USB interface 130 is an interface conforming to the USB standard specification, which can be a MiniUSB interface, a MicroUSB interface, a USB Type-C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect earphones to play audio through the earphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0086] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example: the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0087] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device 100.
[0088] In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology.
[0089] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, connected with the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.
[0090] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD) or an organic light-emitting diode (OLED). In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.
[0091] The external memory interface 120 can be used to connect an external memory card, such as a MicroSD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, music, video, etc. files are saved in the external memory card.
[0092] The internal memory 121 can be used to store computer executable program codes including instructions. The processor 110 performs various functional applications of the electronic device 100 and data processing by executing the instructions stored in the internal memory 121. The internal memory 121 can include a program area storing programs and a data area storing data.
[0093] The electronic device 100 can implement an audio function through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. For example, music play, recording, etc.
[0094] The audio module 170 is used to convert digital audio information into an analog audio signal output, and also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be disposed in the processor 110, or part of the functions of the audio module 170 can be disposed in the processor 110.
[0095] The pressure sensor is used to sense a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor can be disposed in the display screen 194. There are many types of pressure sensors, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, etc. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions.
[0096] The proximity light sensor can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode can be an infrared light emitting diode. The electronic device 100 emits infrared light outwardly through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using the photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor to detect that a user holds the electronic device 100 close to the ear for a call, so as to automatically turn off the screen to achieve the purpose of power saving. The proximity light sensor can also be used for automatic unlocking and locking of the skin cover mode and the pocket mode.
[0097] The touch sensor, also referred to as a "touch panel". The touch sensor can be disposed on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, also referred to as a "touch screen". The touch sensor is configured to detect a touch operation acting on or near the touch sensor. The touch sensor can transmit the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor can also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0098] The keys 190 include a power key (or power button), a volume key, and the like. The keys 190 can be mechanical keys. Alternatively, the keys 190 can be touch keys. The electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100. In this case, pressing the power key can cause the electronic device 100 to turn off or turn on the screen.
[0099] The layered architecture of the electronic device 100 divides software into several layers, each of which has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and the system library, and the kernel layer.
[0100] The application layer can include a series of application packages.
[0101] As shown in FIG. 1, the application layer can include camera, gallery, calendar, call, map, WLAN, Bluetooth, music, video, short message, and the like. Figure 6
[0102] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications of the application layer. The application framework layer includes a series of pre-defined functions. As shown in FIG. 1, the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like. Figure 6
[0103] The kernel layer is a layer between the hardware and the above-mentioned software layers. The kernel layer includes at least a display setting module, a sensor driver, a scene judgment module, a panel setting module, and a screen-on / off fault detection operation module. The hardware can include a camera, a display screen, a microphone, a processor, a memory, and the like.
[0104] The display setting module is configured to set the content currently displayed by the electronic device. In addition, the panel setting module is configured to set the on / off state of the display screen.
[0105] The scene judgment module is configured to determine the current scene of the electronic device and the on / off state of the electronic device. As an example, the scene judgment module is configured to determine whether the electronic device is currently in a screen-on / screen-off state and determine whether the AOD mode of the electronic device is in an open state.
[0106] The on / off screen fault detection operation module is configured to determine whether the on / off screen of the electronic device has a fault. Specifically, after detecting that the user performs a pressing operation on the power key, the on / off screen fault detection operation module can determine whether the electronic device has a fault based on the state of the on / off screen before and after the pressing operation.
[0107] The sensor driver is configured to receive data collected by each sensor and transmit the data to the scene judgment module. For example, the sensor driver can receive relevant data collected by the proximity light sensor and transmit the data to the scene judgment module.
[0108] It can be understood that, Figure 6 The components included in the application framework layer, system library, and runtime layer shown do not constitute a specific limitation on the electronic device 100. In some other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements.
[0109] When the AOD mode of the electronic device is in an open state, if it is detected that the user inputs a pressing operation based on the power key, the on / off state obtained before and after the pressing operation can be the same. Specifically, when the electronic device is in a desktop mode, the first on / off state is a screen-on state, and after detecting that the user inputs a pressing operation on the power key, a timer is started. When the first specified time period is reached, the second on / off state is obtained. Since the electronic device is in an AOD interface when the first specified time period is reached, the second on / off state at this time is a screen-on state. This case is a normal manifestation of the AOD function of the electronic device, but the above detection method will determine that there is a fault in the on / off screen of the electronic device.
[0110] As an example, as shown, Figure 7 When the electronic device is in a screen-on state, it is detected that the power key is pressed, i.e., the power key receives a pressing operation input by the user, on the one hand, the power key can send an on / off screen fault detection operation request to the on / off screen fault detection operation module, and on the other hand, it can send an off screen request to the display setting module. The power key can first send the off screen request to the display setting module, and then send the on / off screen fault detection operation request to the on / off screen fault detection operation module, or it can first send the on / off screen fault detection operation request to the on / off screen fault detection operation module, and then send the off screen request to the display setting module.
[0111] Optionally, the power key can also send the screen-on / off fault detection operation request and the screen-off request to the screen-on / off fault detection operation module and the display setting module, respectively. The order of sending the screen-on / off fault detection operation request and the screen-off request is not limited, and can be selected according to actual conditions.
[0112] The display setting module can first set the screen-on / off state to 0, i.e., the screen-off state, when receiving the screen-off request. However, due to the opening of the AOD mode, the electronic device will switch from the screen-off state to the state after a second specified time period after the screen-off. As shown in FIG. 8, the display setting module can determine whether the AOD is displayed completely after receiving the screen-off request. If it is determined that the AOD is displayed completely, the display setting module can set the screen-on / off state to a non-0, i.e., the screen-on state. Figure 7
[0113] It should be noted that the panel setting module can obtain the first screen-on / off state of the electronic device before the pressing operation, and send the first screen-on / off state to the screen-on / off fault detection operation module in advance before setting the screen-on / off state of the electronic device to 0. In other words, the first screen-on / off state can be stored in the screen-on / off fault detection operation module in advance before the timer is started, to facilitate the subsequent screen-on / off fault detection operation.
[0114] On this basis, the display setting module can set the screen-on / off state to a non-0, and can also send the information set to the non-0 to the panel setting module. The panel setting module can set the screen-on / off state of the electronic device based on the information sent by the display setting module. At the same time, the panel setting module can also send the latest screen-on / off state information to the screen-on / off fault detection operation module, and the screen-on / off state information at this time can be the second screen-on / off state.
[0115] In addition, the screen-on / off fault detection operation module can also start the timer when receiving the screen-on / off fault detection operation request transmitted by the power key, and receive the screen-on / off state transmitted by the panel setting module after the timer reaches the first specified time period. Then, the screen-on / off fault detection operation is performed, i.e., it is determined whether the second screen-on / off state transmitted by the panel setting module is the same as the first screen-on / off state of the electronic device before the power key is pressed. If the first screen-on / off state and the second screen-on / off state are the same, it is determined that the electronic device has a fault, otherwise it is determined that the electronic device has no fault.
[0116] As an example, the user presses the power key when the mobile phone is in the desktop mode, at this time, the first on-off state of the electronic device is not 0, and after 6s, the second on-off state of the electronic device is acquired again. Since the AOD mode is opened, the on-off state at this time is also not 0. In this case, the screen of the electronic device belongs to the normal operation stage, however, if the above fault detection method is used for detection, it is determined that the screen of the electronic device is faulty, that is, there is a fault false detection case.
[0117] Therefore, in order to solve the above problems, before performing the on-off screen fault detection operation, the embodiment of the application can determine whether the electronic device is in a specific scene, and if it is in a specific scene, the fault detection strategy corresponding to the specific scene can be acquired. Especially, when the specific scene is the AOD scene, the embodiment of the application can forcibly set the on-off state to improve the accuracy of fault detection.
[0118] As shown in Figure 8 The fault detection method provided by the embodiment of the application can include the following steps S110 to S190.
[0119] Step S110: The power key receives a pressing operation.
[0120] In the embodiment of the application, the pressing operation can be triggered when the user presses the power key. When the power key receives the pressing operation input by the user, on the one hand, it can send a screen-off request to the display setting module, that is, enter step S120. On the other hand, the power key can also send an on-off screen fault detection operation request to the on-off screen fault detection operation module, that is, enter step S130.
[0121] It should be noted that before sending the screen-off request to the display setting module, the embodiment of the application can first determine the current state of the electronic device. If the current state of the electronic device is the bright screen state, the power key can be instructed to send the screen-off request to the display setting module. The bright screen state can be that the electronic device is in the desktop mode or in the lock screen mode.
[0122] As a way, the pressing operation input by the user can include a pressing operation, and can also include a lifting operation. The timing of triggering the on-off screen fault detection operation is different when the electronic device is in different modes. For example, when the current mode of the electronic device is the desktop mode, the user performs the pressing operation on the power key to trigger the on-off screen fault detection operation. For example, when the current mode of the electronic device is the screen-off mode, the user performs the lifting operation on the power key to trigger the on-off screen fault detection operation.
[0123] In the embodiment of the application, the pressing indication information can be used to indicate that the scene judgment module user has input the pressing and lifting operation based on the power key.
[0124] Step S120: the power key sends a screen-off request to the display setting module.
[0125] In the embodiment of the present application, before receiving the screen-off request, the display setting module can send the current on-off state of the electronic device to the on-off screen failure detection operation module in advance, and take the on-off state as the first on-off state.
[0126] In addition, the on-off screen failure detection operation module can also send an on-off state acquisition request to the panel setting module before receiving the pressing operation, and after receiving the on-off state transmitted by the display setting module, the on-off screen failure detection operation module can store the on-off state as the first on-off state.
[0127] Step S130: the power key sends an on-off screen failure detection operation request to the on-off screen failure detection operation module.
[0128] From the above introduction, it is known that after receiving the pressing operation, the power key can send a screen-off request to the display setting module, and also can send an on-off screen failure detection operation request to the on-off screen failure detection operation module, wherein the sending order of the screen-off request and the on-off screen failure detection operation request is not limited here, and can be selected according to the actual situation.
[0129] Step S140: the on-off screen failure detection operation module starts a timer.
[0130] In the embodiment of the present application, the on-off screen failure detection operation module can include a timer, after receiving the on-off screen failure detection operation request, the on-off screen failure detection operation module can start the timer, and after the timer reaches the first specified time length, receive the second on-off state from the panel setting module.
[0131] As a way, when the on-off screen failure detection operation module determines that the timer reaches the first specified time length, it can send a timing prompt information to the display setting module, and the display setting module can set the on-off screen state to 0 after receiving the timing prompt information, that is, enter step S150.
[0132] In addition, the display setting module can also directly set the on-off screen state to 0 when receiving the screen-off request, and after receiving the timing prompt information transmitted by the on-off screen failure detection operation module, send the second on-off state set to the on-off screen failure detection operation module, to instruct the on-off screen failure detection operation module to perform the on-off screen failure detection operation based on the first on-off state and the second on-off state.
[0133] It should be noted that before setting the state of the screen-on / off to 0, the display setting module can also send a state acquisition request to the scene judgment module, where the state acquisition request is used to instruct the scene judgment module to determine whether the AOD mode of the electronic device is in an open state. If the display setting module determines that the AOD mode is in the open state through the state information sent by the scene judgment module, the state of the screen-on / off can be set to 0.
[0134] Step S150: The display setting module sets the state of the screen-on / off to 0.
[0135] As a manner, the state of the screen-on / off of the electronic device can be the screen-on state before receiving the pressing operation, and at this time, the mode of the electronic device can be the desktop mode or the lock screen mode. After the timer starts for the first specified time length, the display setting module can set the state of the screen-on / off to 0. In other words, after determining that the timer starts for the first specified time length, the display setting module can switch the state of the screen-on / off of the electronic device from 1 to 0, and then the display setting module can send the latest state of the screen-on / off to the screen-on / off failure detection operation module.
[0136] As another manner, the display setting module can switch the state of the screen-on / off of the electronic device from 1 to 0 when receiving the screen-off request, and send the state of the screen-on / off set to 0 to the screen-on / off failure detection operation module after receiving the timing start prompt information transmitted by the screen-on / off failure detection operation module.
[0137] In the embodiment of the application, after setting the state of the screen-on / off to 0, the display setting module can only send the latest state of the screen-on / off to the screen-on / off failure detection operation module, and does not need to send the state of the screen-on / off to the panel setting module, so that the display of the AOD interface can be avoided to affect the screen-on / off detection.
[0138] Step S160: The screen-on / off failure detection operation module receives the state of the screen-on / off transmitted by the display setting module, and correspondingly executes the screen-on / off failure detection operation.
[0139] In the embodiment of the application, after receiving the message of setting the state of the screen-on / off to 0 transmitted by the display setting module, the screen-on / off failure detection operation module can execute the screen-on / off failure detection operation based on the first state of the screen-on / off and the second state of the screen-on / off. The detection process of the screen-on / off failure detection operation can be as shown in Figure 9
[0140] Step S161: The screen-on / off failure detection operation module acquires the first state of the screen-on / off of the electronic device.
[0141] In the embodiments of the present application, the first bright-dark state of the electronic device can be the bright-dark state of the screen before the power key is pressed. If the mode of the electronic device before the power key is pressed is different, the corresponding bright-dark state is also different.
[0142] As an example, before the power key is pressed, if the mode of the electronic device is the desktop mode, the first bright-dark state of the electronic device is the screen-on state, that is, the value of the first bright-dark state can be non-0.
[0143] As an example, before the power key is pressed, if the mode of the electronic device is the lock screen mode, the first bright-dark state of the electronic device is the screen-on state.
[0144] As another example, before the power key is pressed, if the mode of the electronic device is the screen-off mode, the first bright-dark state of the electronic device is the screen-off state. In addition, before the power key is pressed, if the mode of the electronic device is the AOD mode, the first bright-dark state of the electronic device can be the screen-on state, that is, the value of the first bright-dark state can be non-0.
[0145] Step S162: The bright-dark screen fault detection operation module obtains the second bright-dark state of the electronic device.
[0146] From the above introduction, it is known that the bright-dark detection module can include a timer. After receiving the bright-dark detection request, the timer can start timing, and when the timing reaches the first specified time length, the second bright-dark state is obtained, and on this basis, it is determined whether the first bright-dark state and the second bright-dark state are the same.
[0147] In the embodiments of the present application, the second bright-dark state of the electronic device can be the bright-dark state of the screen after the power key is pressed. If the mode of the electronic device after the power key is pressed is different, the corresponding bright-dark state is also different.
[0148] As an example, after the power key is pressed, if the mode of the electronic device is the screen-off mode, the second bright-dark state of the electronic device is the screen-off state, that is, the value of the second bright-dark state is 0.
[0149] As an example, after the power key is pressed, if the mode of the electronic device is the lock screen mode, the second bright-dark state of the electronic device is the screen-on state, that is, the value of the second bright-dark state is non-0.
[0150] As another example, after the power key is pressed, if the mode of the electronic device is the desktop mode, the second bright-dark state of the electronic device is the screen-on state. In addition, after the power key is pressed, if the mode of the electronic device is the AOD, the second bright-dark state of the electronic device is the screen-on state.
[0151] It should be noted that the second bright-dark state in the embodiment of the present application is a state forcibly set by the display setting module according to the current mode of the electronic device. The main purpose of such setting is to avoid the false detection of the failure caused by the display of the AOD interface.
[0152] Step S163: The bright-dark screen failure detection operation module determines whether the first bright-dark state and the first bright-dark state are the same.
[0153] In some embodiments, the bright-dark screen failure detection operation module can start a timer after receiving the bright-dark screen failure detection operation request, and obtain the second bright-dark state after the timer counts for a first specified time length. On this basis, it is determined whether the first bright-dark state and the second bright-dark state are the same. The first specified time length can be 6 seconds or 10 seconds.
[0154] As an example, when the electronic device is in the desktop mode, it is detected that the user inputs a pressing operation on the power key. At this time, the bright-dark screen failure detection operation module of the electronic device starts a timer, and when the timer counts for 6s, the first bright-dark state 1 of the electronic device before pressing the power key is obtained, and the second bright-dark state 0 transmitted from the display setting module is obtained. It is determined that the first bright-dark state 1 and the second bright-dark state 0 are not the same, so the bright-dark screen failure detection operation module determines that the screen of the electronic device has not failed.
[0155] As a way, if the first bright-dark state is the bright screen state and the second bright-dark state is the bright screen state, it is determined that the first bright-dark state and the second bright-dark state are the same. In addition, if the first bright-dark state is the dark screen state and the second bright-dark state is the dark screen state, it is determined that the first bright-dark state and the second bright-dark state are the same. At this time, it can be determined that the screen of the electronic device has failed.
[0156] As a way, if the first bright-dark state is the bright screen state and the second bright-dark state is the dark screen state, it is determined that the first bright-dark state and the second bright-dark state are not the same. In addition, if the first bright-dark state is the dark screen state and the second bright-dark state is the bright screen state, it is determined that the first bright-dark state and the second bright-dark state are not the same. At this time, it can be determined that the screen of the electronic device has not failed.
[0157] In the embodiment of the present application, when the bright-dark screen failure detection operation module determines that the first bright-dark state and the second bright-dark state are the same, it is determined that the screen of the electronic device has failed, that is, step S164 is entered. In addition, if the first bright-dark state and the second bright-dark state are not the same, it is determined that the screen of the electronic device has not failed, that is, step S166 is entered.
[0158] Step S164: The bright-dark screen failure detection operation module determines that the screen of the electronic device has failed.
[0159] In the embodiment of the present application, the screen failure detection operation module can determine that the screen of the electronic device has failed by comparing the first screen-on / off state and the second screen-on / off state, and at this time, the screen failure detection operation module can collect the target log related to the failure, i.e., step S165 is entered.
[0160] As an example, when the electronic device determines that the screen of the electronic device has failed, the electronic device can output the failure prompt information through the speaker. In addition, when the electronic device determines that the screen of the electronic device has failed, if the user does not wear earphones and the electronic device is not in hands-free mode, the electronic device can output the failure prompt information through the receiver.
[0161] As another example, when the electronic device determines that the screen of the electronic device has failed, if the user wears earphones, the electronic device can output the failure prompt information through the earphones. In this process, the electronic device can first determine whether the electronic device is in a pocket, and if the electronic device is in the pocket and the electronic device is connected to the earphones, the failure prompt information can be output to the user through the earphones.
[0162] In addition, if the electronic device is not in the pocket and the electronic device is connected to the earphones, the failure prompt information can be output through the earphones within a first time period, and if no failure resolution operation input by the user is received within the first time period, the failure prompt information can be output through the earphones and the receiver to speed up the failure resolution rate.
[0163] Step S165: The screen failure detection operation module collects the target log related to the failure and stores the target log.
[0164] As a manner, when the electronic device determines that the screen of the electronic device has a screen-on / off failure, the screen failure detection operation module can obtain the event of the failure and collect the target log of the failure, and then store the target log. The target log can also be referred to as a screen-on / off failure log.
[0165] In the embodiment of the present application, the target log can include a process list of a D state and a Z state, wherein the D state is an uninterruptible deep sleep state, and the Z state is a zombie state.
[0166] In addition, the target log can also include the process state (task status) of a system service (SS), wherein the process state of the system service can include a block signal, a running status, and a scheduling parameter (affinity), etc. Therefore, the target log in the embodiment of the present application can include the processes of the D state and the stack of the key processes, etc.
[0167] As another way, after obtaining the malfunction event and the malfunction target log, the electronic device can also send the malfunction time and the malfunction target log to the server, so that the server can analyze the failure rate of the electronic device according to the time and the target log.
[0168] Optionally, after the server analyzes the failure rate of the electronic device according to the failure time and the target log, on the one hand, the server can display the failure rate to the manufacturer, so that the manufacturer can measure the quality standard of the electronic device according to the failure rate index, and can find more failures and possible operations.
[0169] On the other hand, the server can also display the failure rate to the developer, so that the developer can locate the problem of the malfunction of the electronic device. For example, locate the problem of not bright screen / not dark screen, and solve the problem. In this way, the product quality of the electronic device can be improved.
[0170] As another way, when it is determined that the screen of the electronic device fails, the electronic device can also detect whether the application process causes the failure. If the process causing the failure is an application process, the electronic device can perform a forced closing operation. The forced closing operation is an operation of forcing the user to close the currently running application program on the electronic device.
[0171] In addition, when it is determined that the screen of the electronic device fails, the electronic device can also detect whether the application process system service process causes the failure. If the process causing the failure is a system service process, the electronic device can perform a forced restart operation. The forced restart operation is an operation of forcing the user to restart the operating system of the electronic device.
[0172] As another way, when it is determined that the screen of the electronic device fails, the electronic device can also output a voice prompt. For example, when the electronic device determines that the target application program causes the failure, the electronic device can output prompt information, which informs the user that the failure is caused by the target application program, and forces the user to close the target application program.
[0173] For another example, when the electronic device determines that the system process causes the failure, the electronic device can output prompt information, which informs the user that the failure is caused by the system failure, and forces the user to press the power key to restart the electronic device.
[0174] Step S166: The bright / dark screen failure detection operation module determines that the screen of the electronic device does not fail.
[0175] Step S170: The display setting module determines to display AOD.
[0176] In the embodiment of the present application, when the AOD mode of the electronic device is in the open state and the bright and dark state is the bright screen state, if the screen-off request is received, the display setting module can determine to display AOD. Specifically, the display setting module can determine whether the AOD interface is displayed completely. If the AOD is displayed completely, the state of the bright and dark screen is set to be non-0, and the set message is sent to the panel setting module, and step S180 is entered.
[0177] Step S180: The display setting module sets the state of the bright and dark screen to be non-0, and sends the set message to the panel setting module.
[0178] As a way, after the panel setting module receives the message transmitted by the display setting module for setting the state of the bright and dark screen to be non-0, it can perform the display operation of the corresponding interface based on the message.
[0179] In another embodiment of the present application, in order to ensure the accuracy of fault detection, the state of the bright and dark screen of the electronic device is different before the pressing operation is performed, and the trigger time of the bright and dark screen fault detection operation is also different, so that the accuracy of fault detection can be improved to a certain extent. Specifically, when the electronic device is in the bright screen state, if the pressing operation is received, the lifting operation is used as the trigger time of the bright and dark screen fault detection operation. For details, please refer to Figure 10 .
[0180] Step S201: The power key sends the pressing indication information to the scene judgment module.
[0181] The pressing indication information is used to indicate that the scene judgment module inputs the pressing operation for the power key.
[0182] Step S202: The scene judgment module determines whether the electronic device is in the bright screen state.
[0183] As a way, when the scene judgment module determines whether the electronic device is in the bright screen state, it can obtain the brightness parameter of the current screen of the electronic device, and determine whether the electronic device is currently in the bright screen state based on the brightness parameter.
[0184] As an example, if the brightness parameter of the current screen of the electronic device is non-0, it is determined that the electronic device is currently in the bright screen state, and if the brightness parameter of the current screen is 0, it is determined that the electronic device is currently in the dark screen state.
[0185] It should be noted that when the brightness parameter is not 0, the scene judgment module can first determine whether the current scene of the electronic device is an AOD scene, and if the current scene is not an AOD scene, it is determined that the electronic device is in a bright screen state. Specifically, when the scene judgment module determines that the brightness parameter is not 0, it can determine whether the interface currently displayed by the electronic device is an AOD interface, and if it is not an AOD interface, it is determined that the electronic device is currently in a bright screen state.
[0186] As another way, when the electronic device is in a bright screen state, the mode corresponding to the electronic device can be a desktop mode or a lock screen mode. Therefore, when the scene judgment module determines whether the electronic device is currently in a bright screen state, it can also determine whether the current mode of the electronic device is a desktop mode, and if it is not a desktop mode, it can be determined whether it is a lock screen mode. If the current mode of the electronic device is neither a desktop mode nor a lock screen mode, it is determined that the electronic device is currently in an off screen state.
[0187] Step S203: The scene judgment module enters a waiting state.
[0188] In the embodiment of the application, when the scene judgment module determines that the electronic device is in a bright screen state, it can enter a waiting state, and in the waiting state, the scene judgment module can detect whether the lifting indication information transmitted by the power key is received.
[0189] Step S204: When the power key detects that the user inputs a lifting operation, it can send lifting indication information to the scene judgment module.
[0190] In the embodiment of the application, the lifting indication information is used to indicate that the scene judgment module inputs a lifting operation by the user. The main reason why the press operation and the lifting operation do not include the long press operation is that the bright and off states of the electronic device may not change when the power key is long pressed, and this situation is normal. If the lifting operation includes the long press operation, it will cause false positives of the bright and off screen fault detection operation, and thus reduce the user experience.
[0191] As an example, the time length between the press operation and the lifting operation is less than a first long press time length, and the first long press time length can be less than a second long press time length for waking up the smart voice scene. For example, the first long press time length is 1s, and the second long press time length is 3s.
[0192] In other words, if the scene judgment module receives lifting indication information within 1s of receiving press indication information, it performs subsequent scene judgment operations, and if it does not receive lifting indication information within 1s of receiving press indication information, the embodiment of the application can not perform subsequent scene judgment operations.
[0193] In the embodiments of the present application, the first long pressing time length can be less than the third long pressing time length for turning off the electronic device. For example, the first long pressing time length is 1s, and the third long pressing time length is 10s. The first long pressing time length, the second long pressing time length, and the third long pressing time length are only examples, and the actual situation is used for reference.
[0194] As a way, when the scene judgment module receives the lifting indication information transmitted by the power key, on the one hand, it can send a screen-out request to the display setting module, that is, enter step S205. On the other hand, the scene judgment module can also send a screen-on and screen-off fault detection operation request to the screen-on and screen-off fault detection operation module, that is, enter step S206.
[0195] Step S205: The scene judgment module sends a screen-out request to the display setting module.
[0196] Step S206: The scene judgment module sends a screen-on and screen-off fault detection operation request to the screen-on and screen-off fault detection operation module.
[0197] As a way, when the scene judgment module receives the lifting indication information transmitted by the power key, it can send a screen-on and screen-off fault detection operation request to the screen-on and screen-off fault detection operation module.
[0198] Step S207: When the screen-on and screen-off fault detection operation module receives the screen-on and screen-off fault detection operation request transmitted by the scene judgment module, it can start a timer.
[0199] In the embodiments of the present application, if the user inputs a pressing operation for the power key when the electronic device is in the screen-on state, the lifting operation is used as the trigger point for starting the timer. The mode corresponding to the screen-on state can be a desktop mode or a lock screen mode. Since in these two modes, the electronic device will only switch from the screen-on state to the screen-off state when the power key is lifted, the lifting operation is used as the starting point of the timer when the electronic device is in the screen-on state. In this way, the accuracy of fault detection can be improved to some extent.
[0200] Step S208: After starting the timer, the screen-on and screen-off fault detection operation module can send a message to the display setting module to prompt the timer start.
[0201] As a manner, after determining that the timer is started, the screen-on / off fault detection operation module can send a timer starting prompt message to the display setting module to obtain the second on / off state from the display setting module through the prompt message. The second on / off state can be obtained by the display setting module after receiving the timer starting prompt message, that is, the display setting module can set the screen-on / off state to 0 after obtaining the timer starting prompt message, and send the message set to 0 to the screen-on / off fault detection operation module, and the message can be used as the second on / off state information.
[0202] As another manner, the display setting module can set the screen-on / off state to 0 after receiving the screen-off request transmitted by the scene judgment module, and transmit the message set to 0 to the screen-on / off fault detection operation module after receiving the timer starting prompt message transmitted by the screen-on / off fault detection operation module.
[0203] It should be noted that, before setting the screen-on / off state to 0, the display setting module can also send a state obtaining request to the scene judgment module, and the state obtaining request is used to instruct the scene judgment module to determine whether the AOD mode of the electronic device is in the open state. If the display setting module determines that the AOD mode is in the open state through the state information transmitted by the scene judgment module, the screen-on / off state can be set to 0.
[0204] Step S209: The screen-on / off fault detection operation module receives the message transmitted by the display setting module to set the screen-on / off state to 0.
[0205] Step S210: The screen-on / off fault detection operation module performs the screen-on / off fault detection operation.
[0206] Step S211: The display setting module determines to display AOD.
[0207] Step S212: The display setting module sets the screen-on / off state to a non-0 value, and sends the message to the screen-on / off detection module.
[0208] It can be known from the above introduction that the screen-on / off fault detection operation module can include a timer, and after receiving the screen-on / off fault detection operation request, the timer can be started, and it is determined whether the second on / off state obtained after a specified time period is the same as the first on / off state obtained before the specified time period. If they are the same, it is determined that the screen of the electronic device has a fault, and if they are not the same, it is determined that the screen of the electronic device has no fault. The specific implementation of the screen-on / off fault detection operation request has been described in detail in the above embodiments, that is, steps S209 to S212 have been described in detail in the above embodiments, and will not be described here.
[0209] In order to more clearly understand the embodiments of the present application, the following Figure 11In the example shown, by Figure 11 It can be seen that the electronic device, in the case of being in the bright screen state (desktop mode / lock screen mode), enters the waiting state when detecting the lifting of the power key. In the waiting state, a timer is started, and it is determined whether the bright and dark states of the electronic device change when the timer is started for a first specified time length. If the change occurs, it is determined that the bright and dark screen of the electronic device is normal, that is, the screen enters the dark screen state, and the brightness of the screen is 0 at this time.
[0210] In addition, if the timer times out and the bright and dark states of the electronic device still do not change, it is determined that the screen of the electronic device is faulty. In other words, after determining that the timer is started for the first specified time length, if the bright and dark states of the electronic device still do not change, it is determined that the timer times out, at this time, the timeout state is entered, that is, it is determined that the screen of the electronic device is faulty. For example, the brightness of the electronic device is not 0 before the lifting operation is performed, and the brightness of the electronic device is still not 0 after 6s after the lifting operation is performed, it is determined that the screen of the electronic device is faulty.
[0211] It should be noted that the specific scenarios in the embodiments of the present application can also include the proximity light scenario, the combined pressing scenario, and the voice wake-up scenario. When the scene judgment module determines that the electronic device currently stays in the proximity light scenario, the combined pressing scenario, or the voice wake-up scenario, the corresponding fault detection strategy is not to send a fault detection request to the bright and dark screen fault detection operation module. In this way, not only can the unnecessary power consumption of the bright and dark screen fault detection operation for the electronic device be reduced, but also the accuracy of fault detection can be improved.
[0212] In addition, if the electronic device currently stays in a scenario that is not the proximity light scenario, the combined pressing scenario, or the voice wake-up scenario, it can be determined whether the AOD mode of the electronic device is in an open state. If it is in the open state, the bright and dark states of the screen of the electronic device are forcibly set to reduce the false detection rate of the fault.
[0213] In some embodiments, the proximity light scenario can be a scenario in which the electronic device detects that the screen of the electronic device is in an occluded state based on the proximity light sensor during a call. For example, the scenario generated when the user holds the electronic device close to the ear to make a call can be referred to as the proximity light scenario. After entering the proximity light scenario, the electronic device is in a dark screen state, and when exiting the proximity light scenario, the electronic device is in a bright screen state. In this way, the power consumption of the electronic device can be reduced to a certain extent.
[0214] In addition, if the power key is pressed when the electronic device is in the proximity light scenario, the bright and dark states of the electronic device do not change, at this time, the electronic device is in a normal running stage. In order to avoid false detection of faults, the scene judgment module can not send a bright and dark screen fault detection operation request to the bright and dark screen fault detection operation module when determining that the electronic device is in the proximity light scenario.
[0215] Specifically, the scene judgment module can determine whether the current scene of the electronic device is a proximity light scene. If the current scene of the electronic device is the proximity light scene, the scene judgment module can not send a screen-on / off fault detection operation request to the screen-on / off fault detection operation module.
[0216] In addition, when determining whether the current scene of the electronic device is the proximity light scene, the scene judgment module can comprehensively determine in combination with data collected by sensors driven to transmit. The data collected by the sensors can be collected by multiple different types of sensors, and the multiple different types of sensors can include a proximity light sensor, a temperature sensor, a distance sensor, and an illumination sensor, etc.
[0217] As an example, when determining whether the current scene of the electronic device is the proximity light scene, the scene judgment module can first determine whether the current scene of the electronic device is a call state. If the current scene of the electronic device is the call state, the scene judgment module can obtain data collected by sensors driven to transmit, and then determine whether the current scene of the electronic device is the proximity light scene based on the data collected by the sensors driven to transmit.
[0218] In addition, the electronic device can store a proximity light marker, which is used to indicate whether the current scene of the electronic device is the proximity light scene. When the proximity light marker is a first marker value, it is determined that the current scene of the electronic device is the proximity light scene. When the proximity light marker is a second marker value, it is determined that the current scene of the electronic device is the proximity light scene. In other words, the electronic device can set the proximity light marker to the first marker value when entering the proximity light scene, and set the proximity light marker to the second marker value when exiting the proximity light scene.
[0219] As another way, when the scene judgment module determines that the electronic device enters the proximity light scene, it can set the proximity light marker to the first marker value, and when detecting that the electronic device exits the proximity light scene, the scene judgment module can set the proximity light marker to the second marker value. After receiving the pressing indication information, the scene judgment module can directly read the proximity light marker, and determine whether the current scene of the electronic device is the proximity light scene based on the read proximity light marker.
[0220] As an example, the first marker value can be 1, that is, when it is determined that the first marker value is 1, it is determined that the current scene of the electronic device is the proximity light scene. In addition, the second marker value can be 0, that is, when it is determined that the second marker value is 0, it is determined that the current scene of the electronic device is not the proximity light scene.
[0221] Optionally, when the scene judgment module receives the press indication information transmitted by the power key, it can first acquire the proximity light marker, and then determine whether the proximity light marker is 1. If the proximity light marker is 1, it is determined that the current scene of the electronic device is the proximity light scene. If the proximity light marker is 0, it is determined that the current scene of the electronic device is not the proximity light scene.
[0222] As another example, the first marker value can be True, that is, when it is determined that the first marker value is True, it is determined that the current scene of the electronic device is the proximity light scene. In addition, the second marker value can be False, that is, when it is determined that the second marker value is False, it is determined that the current scene of the electronic device is not the proximity light scene.
[0223] Optionally, when the scene judgment module receives the press indication information transmitted by the power key, it can first acquire the proximity light marker, and then determine whether the proximity light marker is True. If the proximity light marker is True, it is determined that the current scene of the electronic device is the proximity light scene. If the proximity light marker is False, it is determined that the current scene of the electronic device is not the proximity light scene.
[0224] It should be noted that the first marker value and the second marker value can be set to any two different values, as long as they can distinguish between entering the proximity light scene and exiting the proximity light scene. The first marker value and the second marker value are not specifically limited to how many can be selected according to actual conditions.
[0225] In other embodiments, the combination press scene can be a scene generated by the electronic device when it receives a combination press operation of user input in the desktop mode, where the combination press operation can be a scene in which the user presses other keys while pressing the power key.
[0226] As an example, when the electronic device is in the desktop mode, if the scene judgment module detects that the user presses the volume down key while pressing the power key, a screenshot operation is triggered, which is used to capture the content displayed in the current interface of the electronic device.
[0227] As an example, when the electronic device is in the desktop mode, if the scene judgment module detects that the user presses the volume up key while pressing the power key, a screen recording operation is triggered, which is used to record the content displayed in the current interface of the electronic device.
[0228] In the embodiments of the present application, simultaneous pressing of the power key and the volume key can trigger the combination press scene, and simultaneous pressing of the power key and other keys can also trigger the combination press scene. The other keys are not specifically limited here and can be selected according to actual conditions.
[0229] In summary, in the combined pressing scenario, the bright / dim state of the electronic device does not change before and after pressing the power key, that is, the electronic device is in a bright screen state before pressing the power key, and the electronic device is still in the bright screen state after performing the combined pressing operation.
[0230] It can be seen that the bright / dim state of the electronic device does not change before and after pressing the power key, and this situation is not caused by the bright / dim screen failure, but is a manifestation of the normal operation of the electronic device to perform functions such as screen capture / recording. At this time, if the bright / dim screen failure detection operation is performed, not only the unnecessary power consumption of the electronic device will be increased, but also the false detection rate of the failure detection will be increased, thereby affecting the user experience.
[0231] To solve the above problems, the embodiments of the present application can not perform the bright / dim screen failure detection operation when it is determined that the scenario of the electronic device is a combined pressing scenario. In this way, the accuracy of failure detection can be improved, and the power consumption of the electronic device can be reduced.
[0232] In other embodiments, the voice wake-up scenario can be a scenario generated when the electronic device receives a user's long press on the power key in the desktop mode. In addition, the voice wake-up scenario can also be a scenario generated when the electronic device receives a user's long press on the power key in the lock screen mode.
[0233] When the scene judgment module detects that the user inputs a pressing operation on the power key, it can obtain the duration of the pressing operation. Then it is determined whether the duration reaches a first long press duration. If the first long press duration is reached, it is determined that the scenario of the electronic device is a voice wake-up scenario. For example, the first long press duration can be 1s.
[0234] In the embodiments of the present application, when the duration of long pressing the power key exceeds the first long press duration, the electronic device enters the voice wake-up scenario. In the voice wake-up scenario, the user can input voice to instruct the electronic device to perform different operations. For example, the user inputs the voice "open the camera", and the electronic device can correspondingly open the camera at this time.
[0235] In addition, when the duration of long pressing the power key exceeds a second long press duration, the electronic device enters a shutdown scenario, wherein the shutdown scenario can include a shutdown control, a restart control, and other prompt information. The user presses different controls, and the electronic device can perform corresponding operations. The first long press duration is less than the second long press duration. For example, the first long press duration is 1s, and the second long press duration is 3s.
[0236] It should be noted that after the electronic device enters the shutdown scenario, if the user still long presses the power key for a third long press duration, the electronic device directly shuts down. The third long press duration is greater than the second long press duration. For example, the third long press duration is 10s.
[0237] It can be known from the above introduction that when the electronic device is in the desktop mode, the user is detected to long press the power key, and the power key is long pressed for more than 1s, and the electronic device enters the voice wake-up scene. Before the power key is long pressed, the electronic device is in a bright screen state, and after the power key is long pressed, the electronic device is still in the bright screen state. In other words, before the electronic device enters the voice wake-up scene by long pressing the power key, the electronic device is in the bright screen state, and after the electronic device enters the voice wake-up scene by long pressing the power key, the electronic device is still in the bright screen state.
[0238] It can be seen that the bright and dark states of the electronic device before and after the power key is long pressed do not change, and this situation is not caused by the bright and dark screen failure, but is a manifestation of the normal operation of the voice wake-up function of the electronic device. At this time, if the bright and dark screen failure detection operation is performed, not only the unnecessary power consumption of the electronic device will be increased, but also the false detection rate of the failure detection will be increased, thereby affecting the user experience.
[0239] To solve the above problem, the embodiment of the present application can not perform the bright and dark screen failure detection operation when it is determined that the scene of the electronic device is the voice wake-up scene. In this way, the accuracy of the failure detection can be improved, and the power consumption of the electronic device can be reduced.
[0240] In another embodiment of the present application, in order to ensure the accuracy of the failure detection, the state of the bright and dark screen of the electronic device before the pressing operation is performed is different, and the timing of triggering the bright and dark screen failure detection operation is also different. Specifically, when the electronic device is in the bright screen state, the lifting operation is used as the trigger point of the screen-off detection operation. In this way, the accuracy of the failure detection can be improved to a certain extent. In addition, the mode corresponding to the screen-off state can include the AOD mode. For details, please refer to Figure 12 .
[0241] Step S301: The power key sends the pressing indication information to the scene judgment module.
[0242] Step S302: The scene judgment module determines whether the electronic device is in AOD display.
[0243] In the embodiment of the present application, when the scene judgment module receives the pressing indication information, it can obtain the brightness parameter of the current screen of the electronic device, and when it is determined that the brightness parameter participates, it determines whether the interface currently displayed by the electronic device is an AOD interface. If it is an AOD interface, it is determined that the electronic device is currently in AOD display.
[0244] In some embodiments, if it is determined that the electronic device is currently in AOD display, it can be determined that the electronic device is currently in the bright screen state. Wherein, AOD refers to a display mode in which part of the area of the display screen remains constant or part of the area of the display screen lights up when the touch screen operation is detected when the electronic device is in the screen-off state.
[0245] Step S303: The scene judgment module sends a bright-out state setting request to the display setting module.
[0246] As a manner, when the scene judgment module determines that the current display interface of the electronic device is the AOD interface, in order to avoid false detection of the failure, it can send a bright-out state setting request to the display setting module to instruct the display setting module to set the bright-out state of the screen of the electronic device to 0, i.e., enter step S304.
[0247] Step S304: The display setting module sets the bright-out state of the screen to 0.
[0248] Step S305: The display setting module sends a message of setting the bright-out state to 0 to the bright-out failure detection operation module.
[0249] In some embodiments, after receiving the bright-out state transmitted by the display setting module, the bright-out failure detection operation module can take the bright-out state as a first bright-out state and store the first bright-out state. In addition, after receiving the message that the bright-out state transmitted by the display setting module is 0, the bright-out failure detection operation module can send a setting success prompt information to the scene judgment module, and the scene judgment module can send a screen-on request to the bright-out failure detection operation module after receiving the prompt information.
[0250] As a manner, before receiving the pressing operation, since the electronic device is in the AOD interface, at this time, the first bright-out state stored by the bright-out failure detection operation module is non-0, and after receiving the message that the display setting module transmits to set the bright-out state to 0, the bright-out detection module can update the first bright-out state to 0.
[0251] Step S306: The scene judgment module sends a screen-on request to the display setting module.
[0252] Step S307: The display setting module determines to display the screen-on interface.
[0253] Step S308: The scene judgment module sends a bright-out failure detection operation request to the bright-out failure detection operation module.
[0254] Step S309: When receiving the bright-out failure detection operation request transmitted by the scene judgment module, the bright-out failure detection operation module can start a timer.
[0255] Step S310: After starting the timer, the bright-out failure detection operation module can send a message of timer start prompt to the display setting module.
[0256] Step S311: The panel setting module receives the bright-out state of the screen transmitted by the display setting module.
[0257] As a manner, after receiving the message of the timer starting prompt, the display setting module can set the on-off state to non-0, and send the message set to non-0 to the panel setting module, and after receiving the message set to non-0, the panel setting module can set the on-off screen state of the electronic device based on the message. In addition, the panel setting module can also transmit the message set to non-0 to the on-off screen fault detection operation module.
[0258] Step S312: The on-off screen fault detection operation module receives the message of setting the on-off state to 0 transmitted by the panel setting module.
[0259] In the embodiment of the application, after receiving the message of setting the on-off state to 0, the on-off screen fault detection operation module can determine the state in which the electronic device is currently located, and take the state as the second on-off state.
[0260] Step S313: The on-off screen fault detection operation module performs the on-off screen fault detection operation.
[0261] As a manner, the first on-off state of the electronic device is forcibly set to 0 before starting the timer, and the second on-off state obtained after the display of the on screen interface is successful is non-0. By judging, it is known that the first on-off state and the second on-off state are not the same. Therefore, when the electronic device displays the AOD interface, if the press operation for the power key is received, the press operation is taken as the trigger point for starting the timer, and the on-off state can be forcibly set to 0 before sending the on-off screen fault detection operation request, so that the accuracy of the fault detection can be ensured.
[0262] It should be noted that when the electronic device is in the screen-off mode, if the press operation is received, the press operation is also taken as the trigger point for starting the timer.
[0263] As known from the above introduction, the on-off screen fault detection operation module can include a timer, which can start timing after receiving the on-off screen fault detection operation request. When the timing reaches the first specified time length, the first on-off state and the second on-off state are obtained, and then it is determined whether the first on-off state and the second on-off state are the same. If they are the same, it is determined that the screen of the electronic device has a fault. If they are not the same, it is determined that the screen of the electronic device has no fault. The specific execution of the on-off screen fault detection operation request has been described in detail in the above embodiment, and will not be described here.
[0264] In order to more clearly understand the embodiments of the application, an example diagram as shown in Figure 13 is given, and the operation of the on-off screen fault detection operation module is described in detail as follows. Figure 13It can be seen that when the electronic device is in the off-screen state (AOD mode / screen-off mode), as long as it is detected that the user presses the power key, the electronic device enters the waiting state, starts a timer in the waiting state, and determines whether the brightness and off state of the electronic device changes after the first specified time length of the timer is triggered. If it changes, it is determined that the brightness and off screen of the electronic device is normal, that is, it enters the on-screen state, and the brightness of the screen at this time is non-zero.
[0265] In addition, if the timer times out and the brightness and off state of the electronic device still does not change, it is determined that the screen of the electronic device is faulty. In other words, after determining that the timer triggers the first specified time length, if the brightness and off state of the electronic device still does not change, it is determined that the timer times out, at this time, the timeout state is entered, that is, it is determined that the screen of the electronic device is faulty. For example, the brightness of the electronic device is 0 before the press operation is performed, and the brightness of the electronic device is still 0 after 6s after the press operation is performed, it is determined that the screen of the electronic device is faulty.
[0266] It can be understood that in order to realize the above functions, the electronic device comprises hardware and / or software modules corresponding to the functions. The algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware 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 in combination with the embodiments, but such implementation should not be considered beyond the scope of the present application.
[0267] The embodiment also provides a computer storage medium, which stores computer instructions, when the computer instructions run on the electronic device, make the electronic device execute the related method steps to realize the fault detection method in the above embodiment.
[0268] The embodiment also provides a computer program product, when the computer program product runs on the computer, makes the computer execute the related steps to realize the fault detection method in the above embodiment.
[0269] In addition, the embodiment of the present application also provides an apparatus, which can be a chip, a component or a module, and the apparatus can include a processor and a memory connected to each other; wherein the memory is used to store computer execution instructions, and when the apparatus runs, the processor can execute the computer execution instructions stored in the memory to make the chip execute the fault detection method in the above method embodiments.
[0270] The electronic device, the computer storage medium, the computer program product or the chip provided in the embodiment are used for executing the corresponding method provided above, and thus the beneficial effects achieved by the electronic device, the computer storage medium, the computer program product or the chip can refer to the beneficial effects of the corresponding method provided above, which will not be described here again.
[0271] Through the description of the above embodiments, those skilled in the art can understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0272] In several embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented by other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0273] The units described as separate components can or can not be physically separate, and the components shown as units can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0274] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0275] Any content of each embodiment of the present application, and any content of the same embodiment, can be freely combined. Any combination of the above content is within the scope of the present application.
[0276] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application, essentially or in other words, the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The software product is stored in a storage medium, including a number of instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the various embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0277] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the specific embodiments described above, and the specific embodiments described above are only illustrative, not limiting. Those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope of protection of the claims.
Claims
1. A fault detection method characterized by, The method is applied to an electronic device and comprises the following steps: In response to a pressing operation of a power key of the electronic device by a user, a timer is started, and the electronic device enters an AOD display state after the pressing operation is received; in the AOD display state, the bright-dark state of the screen of the electronic device is a bright screen state; A first bright-dark state is obtained, which is the bright-dark state of the screen of the electronic device before the power key is pressed; A second bright-dark state is forcibly set to an off-screen state, wherein the second bright-dark state is used to represent the bright-dark state of the screen of the electronic device after the power key is pressed; When the timing of the timer reaches a specified time length, it is determined whether the first bright-dark state and the second bright-dark state are the same; If the first bright-dark state and the second bright-dark state are the same, it is determined that the screen of the electronic device has failed; If the first bright-dark state and the second bright-dark state are not the same, it is determined that the screen of the electronic device has not failed; The pressing operation includes a pressing operation and a lifting operation, and the starting of the timer in response to the pressing operation of the power key of the electronic device by the user comprises the following steps: In response to the pressing operation of the power key of the electronic device by the user, it is determined whether the electronic device is in a bright screen state; If the electronic device is in a bright screen state, the timer is started when the lifting operation is received.
2. The method of claim 1, wherein, The starting of the timer in response to the pressing operation of the power key of the electronic device by the user comprises the following steps: In response to the pressing operation of the power key of the electronic device by the user, it is determined whether the scenario in which the electronic device is located is a specific scenario, and in the specific scenario, the bright-dark state of the screen of the electronic device does not change when the pressing operation is received; If the scenario in which the electronic device is located is not the specific scenario, the timer is started.
3. The method of claim 2, wherein, The method further comprises the following steps: If the scenario in which the electronic device is located is the specific scenario, the bright-dark screen failure detection operation is not performed.
4. The method according to claim 2 or 3, characterized in that, The specific scenario at least includes a proximity light scenario, a combined pressing scenario, and a voice wake-up scenario; wherein The proximity light scenario is a scenario triggered when the screen of the electronic device is blocked when the electronic device is in a call state, The combined pressing scenario is a scenario triggered when the user simultaneously presses the power key and other keys, The voice wake-up scenario is a scenario in which human-computer voice interaction is triggered by the user pressing the power key for a long time.
5. A fault detection method characterized by, The method is applied to an electronic device and comprises the following steps: In response to a pressing operation of a power key of the electronic device by a user, a timer is started, and the electronic device is in an AOD display state before the pressing operation is received; in the AOD display state, the bright-dark state of the screen of the electronic device is a bright screen state; The bright-dark state of the screen of the electronic device before the power key is pressed is forcibly set to an off-screen state, and the bright-dark state after the forcible setting is taken as a first bright-dark state; When the timing of the timer reaches a specified time length, a second bright-dark state is obtained, which is the bright-dark state of the screen of the electronic device after the power key is pressed when the timing of the timer reaches the specified time length; determining whether the first and second screen-on / off states are the same; if the first and second screen-on / off states are the same, determining that the screen of the electronic device is faulty; if the first and second screen-on / off states are not the same, determining that the screen of the electronic device is not faulty; the pressing operation includes a pressing-down operation and a pressing-up operation, and the starting of the timer in response to the pressing operation of the power key of the electronic device includes: directly starting the timer in response to the pressing-down operation of the power key of the electronic device.
6. The method of claim 5, wherein, the starting of the timer in response to the pressing operation of the power key of the electronic device includes: determining whether the electronic device is in a specific scenario in response to the pressing operation of the power key of the electronic device, and when the pressing operation is received in the specific scenario, the screen-on / off state of the screen of the electronic device does not change; if the electronic device is not in the specific scenario, starting the timer.
7. The method of claim 6, wherein, the method further includes: if the electronic device is in the specific scenario, not performing the screen-on / off fault detection operation.
8. The method according to claim 6 or 7, characterized in that, the specific scenario includes at least a proximity light scenario, a combined pressing scenario, and a voice wake-up scenario; wherein the proximity light scenario is triggered when the screen of the electronic device is shielded in a call state, the combined pressing scenario is triggered when the power key and another key are pressed simultaneously by the user, the voice wake-up scenario is triggered when the power key is pressed for a long time by the user to start a human-computer voice interaction.
9. An electronic device, comprising: include: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored on the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: starting a timer in response to a pressing operation of a power key of the electronic device, and the electronic device enters an AOD display state after the pressing operation is received; the screen-on / off state of the screen of the electronic device in the AOD display state is a screen-on state; obtaining a first screen-on / off state, the first screen-on / off state being a screen-on / off state of the screen of the electronic device before the power key is pressed; forcibly setting a second screen-on / off state to an off-screen state, wherein the second screen-on / off state is used to represent a screen-on / off state of the screen of the electronic device after the power key is pressed; determining whether the first and second screen-on / off states are the same when the timing of the timer reaches a specified time length; if the first and second screen-on / off states are the same, determining that the screen of the electronic device is faulty; if the first and second screen-on / off states are not the same, determining that the screen of the electronic device is not faulty; the pressing operation includes a pressing-down operation and a pressing-up operation, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: determining whether the electronic device is in a screen-on state in response to the pressing-down operation of the power key of the electronic device; If the electronic device is in a bright screen state, the timer is started upon receiving the lifting operation.
10. The apparatus of claim 9, wherein, When the computer program is executed by the one or more processors, the electronic device performs the following steps: In response to a pressing operation of a power key of the electronic device by a user, it is determined whether a scenario in which the electronic device is located is a specific scenario, and in the specific scenario, a bright / dim state of a screen of the electronic device does not change when the pressing operation is received; If the scenario in which the electronic device is located is not the specific scenario, the timer is started.
11. The apparatus of claim 10, wherein, When the computer program is executed by the one or more processors, the electronic device performs the following steps: If the scenario in which the electronic device is located is the specific scenario, the bright / dim screen fault detection operation is not performed.
12. The apparatus of claim 10 or 11, wherein, The specific scenario includes at least a proximity light scenario, a combined pressing scenario, and a voice wake-up scenario; the proximity light scenario is triggered when the screen of the electronic device is shielded in a call state, the combined pressing scenario is triggered when the power key and another key are pressed simultaneously by the user, and the voice wake-up scenario is triggered when the power key is pressed for a long time by the user to start human-computer voice interaction.
13. An electronic device, comprising: Comprise: One or more processors; Memory; And one or more computer programs, wherein the one or more computer programs are stored on the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: In response to a pressing operation of a power key of the electronic device by a user, a timer is started, and before the pressing operation is received, the electronic device is in an AOD display state; in the AOD display state, a bright / dim state of a screen of the electronic device is a bright screen state; The bright / dim state of the screen of the electronic device before the power key is pressed is forcibly set to a dim screen state, and the forcibly set bright / dim state is set as a first bright / dim state; A second bright / dim state is obtained when the timing of the timer reaches a specified time length, and the second bright / dim state is a bright / dim state of the screen of the electronic device when the timing of the timer reaches the specified time length after the power key is pressed; It is determined whether the first bright / dim state and the second bright / dim state are the same; If the first bright / dim state and the second bright / dim state are the same, it is determined that the screen of the electronic device has failed; If the first bright / dim state and the second bright / dim state are not the same, it is determined that the screen of the electronic device has not failed; When the computer program is executed by the one or more processors, the electronic device performs the following steps: In response to a pressing operation of a power key of the electronic device by a user, the timer is directly started.
14. The apparatus of claim 13, wherein, When the computer program is executed by the one or more processors, the electronic device performs the following steps: In response to a pressing operation of a power key of the electronic device by a user, it is determined whether a scenario in which the electronic device is located is a specific scenario, and in the specific scenario, a bright / dim state of a screen of the electronic device does not change when the pressing operation is received; If the scenario in which the electronic device is located is not the specific scenario, starting the timer.
15. The apparatus of claim 14, wherein, When the computer program is executed by the one or more processors, the electronic device is caused to perform the following steps: If the scenario in which the electronic device is located is the specific scenario, the screen-on / off fault detection operation is not performed.
16. The apparatus of claim 14 or 15, wherein, The specific scenario includes at least a proximity light scenario, a combined press scenario, and a voice wake-up scenario; wherein the proximity light scenario is triggered when the screen is blocked while the electronic device is in a call state, the combined press scenario is triggered when the user simultaneously presses the power key and another key, and the voice wake-up scenario is triggered when the user long-presses the power key to initiate human-computer voice interaction.
17. A computer readable storage medium comprising a computer program, characterized in that, When the computer program is executed on an electronic device, the electronic device is caused to perform the fault detection method as claimed in any one of claims 1-8.
Citation Information
Patent Citations
Fault processing method for terminal device and terminal device
CN110709822A
Power key mistaken touch detection method and electronic equipment
CN113645341A