Fault detection method and electronic device
By judging the scenario of the electronic device and adopting different fault detection strategies, the problem of false detection in screen on/off fault detection is solved, the accuracy of detection is improved and power consumption is reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2022-01-07
- Publication Date
- 2026-07-31
AI Technical Summary
Existing methods for detecting screen on/off faults are prone to false detections, which can negatively impact user experience and device power consumption.
By determining the current scenario of the electronic device, different fault detection strategies can be adopted to avoid performing screen-on/off fault detection in specific scenarios.
It reduces the false detection rate of fault detection, improves the accuracy of detection, and reduces unnecessary power consumption.
Smart Images

Figure CN116450424B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal devices, and more particularly to a fault detection method and an electronic device. Background Technology
[0002] With the continuous development of terminal technology, terminal devices equipped with displays are receiving increasing attention, and the number of applications is also constantly increasing. This leads to malfunctions such as the display screen not turning on or remaining on during use, making the detection of screen on / off faults particularly important. However, existing screen on / off fault detection methods often suffer from false detections. Therefore, improving the accuracy of fault detection is a pressing technical problem that needs to be solved. Summary of the Invention
[0003] To address the aforementioned technical problems, this application provides a fault detection method and an electronic device. In this method, by determining the current scenario of the electronic device, different fault detection strategies are adopted to avoid false detections of screen on / off faults, thereby improving the accuracy of fault detection.
[0004] Firstly, embodiments of this application provide a fault detection method. The method includes: responding to a user pressing the power button of an electronic device, determining whether the electronic device is in a specific scenario; if the pressing operation is received in a specific scenario, the on / off state of the electronic device screen remains unchanged; if the electronic device is in a specific scenario, then no on / off fault detection operation is performed; if the electronic device is not in a specific scenario, then the on / off fault detection operation is performed. In this way, the electronic device can determine whether to perform the on / off fault detection operation based on the scenario in which the electronic device is located, which can reduce the false detection rate of faults to a certain extent.
[0005] According to the first aspect, in response to a user pressing the power button of an electronic device, determining whether the electronic device is in a specific scenario includes: in response to a user pressing the power button of an electronic device, determining whether the electronic device is in a proximity light scenario; wherein, a proximity light scenario is a scenario triggered when the screen of an electronic device is blocked while it is in a call state. Thus, if the electronic device receives a press operation while in a proximity light scenario, it will not perform a screen-on / off detection operation, which can not only reduce the false detection rate but also reduce the unnecessary power consumption of the screen-on / off detection operation.
[0006] Based on the first aspect, or any implementation thereof, determining whether the scene in which the electronic device is located is a proximity light scene includes: acquiring a proximity light marker value, which indicates whether the electronic device is in a proximity light scene; if the proximity light marker is a specified marker value, then the scene in which the electronic device is located is determined to be a proximity light scene. In this way, the electronic device can more easily and quickly determine whether its current scene is a proximity light scene, thereby accelerating the efficiency of fault detection.
[0007] For example, the specified flag value can be 1.
[0008] For example, the specified tag value can be True.
[0009] Based on the first aspect, or any implementation of the first aspect above, determining whether the scene in which the electronic device is located is a proximity light scene includes: when the electronic device is in a call state, acquiring proximity light parameters collected by a proximity light sensor; if the proximity light parameters are greater than a preset threshold, then determining that the scene in which the electronic device is located is a proximity light scene. In this way, the electronic device can more accurately determine whether it is in a proximity light scene.
[0010] For example, proximity light parameters may include temperature parameters and proximity light parameters.
[0011] According to the first aspect, or any implementation thereof, in response to a user pressing the power button of an electronic device, determining whether the electronic device is in a specific scenario includes: in response to a user pressing the power button of an electronic device, determining whether the electronic device is in a combined press scenario, where a combined press scenario is triggered by the user simultaneously pressing the power button and other buttons. In this way, when the electronic device determines that it is in a combined press scenario, it can avoid performing screen-on / off fault detection operations, thus preventing false detections triggered by combined press scenarios and improving the user experience.
[0012] For example, other buttons could be volume buttons.
[0013] According to the first aspect, or any implementation thereof, in response to a user pressing the power button of the electronic device, determining whether the electronic device is in a specific scenario includes: in response to a user pressing the power button of the electronic device, determining whether the electronic device is in a voice wake-up scenario, wherein the voice wake-up scenario is a scenario where the user long-presses the power button to trigger human-computer voice interaction. In this way, when the electronic device determines that it is in a voice wake-up scenario, it can avoid performing screen-on / off fault detection operations, thus avoiding false detections triggered by the voice wake-up scenario and improving the user experience.
[0014] Based on the first aspect, or any implementation of the first aspect above, determining whether the scenario in which the electronic device is located is a voice wake-up scenario includes: when the voice wake-up mode of the electronic device is turned on, responding to the user's pressing operation of the power button of the electronic device, obtaining the duration of the pressing operation; if the duration is longer than the first long press duration and shorter than the second long press duration, then the scenario in which the electronic device is located is determined to be a voice wake-up scenario; wherein the second long press duration is longer than the first long press duration. In this way, the electronic device can distinguish between the triggering of the voice wake-up mode and the triggering of the power-off mode, thereby ensuring the accuracy of fault detection.
[0015] For example, the first long press duration can be 1 second, and the second long press duration can be 3 seconds.
[0016] According to the first aspect, or any implementation thereof, the pressing operation includes a pressing operation and a lifting operation; if the electronic device is not in a specific scenario, a screen-on / off fault detection operation is performed, including: if the electronic device is not in a specific scenario, determining whether the electronic device was in a screen-on state before receiving the pressing operation; if it was in a screen-on state, then performing the screen-on / off fault detection operation when receiving the lifting operation. Thus, the operation triggering the screen-on / off fault detection differs depending on the screen-on / off state of the electronic device, thereby improving the flexibility of screen-on / off fault detection.
[0017] According to the first aspect, or any implementation of the first aspect above, if the electronic device was in a screen-off state before the press operation was received, the screen-on / off fault detection operation is directly executed.
[0018] According to the first aspect, or any implementation of the first aspect above, a screen on / off fault detection operation is performed, including: acquiring a first on / off state of the electronic device screen, the first on / off state being the on / off state of the electronic device screen before the power button is pressed; acquiring a second on / off state of the electronic device screen, the second on / off state being the on / off state of the electronic device screen after a specified time has elapsed since the power button was pressed; if the first on / off state and the second on / off state are the same, then it is determined that the screen of the electronic device has malfunctioned. In this way, the electronic device can more simply and effectively detect screen on / off faults.
[0019] Secondly, embodiments of this 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. When the computer programs are executed by the one or more processors, the electronic device performs the following steps: in response to a user pressing the power button of the electronic device, determining whether the scene in which the electronic device is located is a specific scene; if the pressing operation is received in a specific scene, the on / off state of the screen of the electronic device does not change; if the scene in which the electronic device is located is a specific scene, then the on / off screen fault detection operation is not performed; if the scene in which the electronic device is located is not a specific scene, then the on / off screen fault detection operation is performed.
[0020] According to the second aspect, when a computer program is executed by one or more processors, it causes the electronic device to perform the following steps: in response to a user pressing the power button of the electronic device, determining whether the scene in which the electronic device is located is a proximity light scene; wherein, the proximity light scene is a scene triggered by the screen being blocked when the electronic device is in a call state.
[0021] According to the second aspect, or any implementation of the second aspect above, when the computer program is executed by one or more processors, the electronic device performs the following steps: the electronic device acquires a proximity light marker value, the proximity light marker value being used to indicate whether the electronic device is in a proximity light scene; if the proximity light marker is a specified marker value, then the scene in which the electronic device is located is determined to be a proximity light scene.
[0022] According to the second aspect, or any implementation of the second aspect above, when the computer program is executed by one or more processors, the electronic device performs the following steps: when the electronic device is in a call state, it acquires the proximity light parameters collected by the proximity light sensor; if the proximity light parameters are greater than a preset threshold, it determines that the scene in which the electronic device is located is a proximity light scene.
[0023] According to the second aspect, or any implementation of the second aspect above, the feature is that when the computer program is executed by one or more processors, the electronic device performs the following steps: in response to a user pressing the power button of the electronic device, determining whether the scene in which the electronic device is located is a combined pressing scene, wherein a combined pressing scene is a scene triggered by the user pressing the power button and other buttons simultaneously.
[0024] According to the second aspect, or any implementation of the second aspect above, when the computer program is executed by one or more processors, the electronic device performs the following steps: in response to a user pressing the power button of the electronic device, determining whether the scene in which the electronic device is located is a voice wake-up scene, wherein the voice wake-up scene is a scene in which human-computer voice interaction is triggered by the user pressing and holding the power button.
[0025] According to the second aspect, or any implementation of the second aspect above, when the computer program is executed by one or more processors, the electronic device performs the following steps: when the voice wake-up mode of the electronic device is turned on, in response to the user pressing the power button of the electronic device, the duration of the pressing operation is obtained; if the duration is greater than the first long press duration and less than the second long press duration, the scenario in which the electronic device is located is determined to be a voice wake-up scenario; wherein, the second long press duration is greater than the first long press duration.
[0026] According to the second aspect, or any implementation of the second aspect above, the pressing operation includes a pressing operation and a lifting operation; when the computer program is executed by one or more processors, the electronic device performs the following steps: if the scene in which the electronic device is located is not a specific scene, then determine whether the electronic device is in a screen-on state before receiving the pressing operation; if it is in a screen-on state, then perform a screen-on / off fault detection operation when the lifting operation is received.
[0027] According to the second aspect, or any implementation of the second aspect above, when a computer program is executed by one or more processors, the electronic device performs the following steps: if the electronic device was in a screen-off state before receiving the press operation, then the screen-on / off fault detection operation is directly performed.
[0028] According to the second aspect, or any implementation thereof, when a computer program is executed by one or more processors, the electronic device performs the following steps: acquiring a first on / off state of the electronic device screen, the first on / off state being the on / off state of the electronic device screen before the power button is pressed; acquiring a second on / off state of the electronic device screen, the second on / off state being the on / off state of the electronic device screen after a specified time has elapsed since the power button was pressed; if the first on / off state and the second on / off state are the same, then it is determined that the screen of the electronic device has malfunctioned.
[0029] Thirdly, embodiments of this application provide a chip. The chip includes one or more interface circuits and one or more processors; the interface circuits are used to receive signals from the memory of an electronic device and send signals to the processors, the signals including computer instructions stored in the memory; when the processor executes the computer instructions, it causes the electronic device to perform the fault detection method of the first aspect and any one thereof.
[0030] The third aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the third aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here.
[0031] Fourthly, embodiments of this application provide a computer-readable storage medium. The computer-readable storage medium includes a computer program, characterized in that, when the computer program is run on an electronic device, it causes the electronic device to perform the first aspect and any one of the fault detection methods in the first aspect.
[0032] The fourth aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the fourth aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here. Attached Figure Description
[0033] Figures 1a-1b This is a schematic diagram of an application scenario provided by an embodiment of this application;
[0034] Figures 2a-2b This is a schematic diagram illustrating another application scenario provided by an embodiment of this application;
[0035] Figures 3a-3d A schematic diagram of a proximity light scene provided in an embodiment of this application;
[0036] Figure 4 A schematic diagram of a combined pressing scenario provided in an embodiment of this application;
[0037] Figure 5 A schematic diagram of a voice wake-up scenario provided in an embodiment of this application;
[0038] Figure 6 This is a schematic diagram of the structure of an electronic device shown in an embodiment of this application;
[0039] Figure 7 This is a schematic diagram of the software structure of an electronic device shown in an embodiment of this application;
[0040] Figure 8 A flowchart illustrating a fault detection method provided in an embodiment of this application;
[0041] Figure 9 Example diagram of fault detection of electronic device in near-light scene provided in the embodiments of this application;
[0042] Figure 10 A schematic diagram of the screen on / off fault detection process in the fault detection method provided in the embodiments of this application;
[0043] Figure 11 A flowchart illustrating a fault detection method provided in another embodiment of this application;
[0044] Figure 12An example diagram illustrating the switching of an electronic device from a lit-off state to a screen-off state in the fault detection method provided in this application embodiment;
[0045] Figure 13 A flowchart illustrating a fault detection method provided in another embodiment of this application;
[0046] Figure 14 An example diagram illustrating the switching of an electronic device from a screen-off state to a screen-on state in the fault detection method provided in this application embodiment;
[0047] Figure 15 A flowchart illustrating a fault detection method provided in another embodiment of this application;
[0048] Figure 16 A flowchart illustrating a fault detection method provided in another embodiment of this application;
[0049] Figure 17 This is a flowchart illustrating a fault detection method provided in another embodiment of this application. Detailed Implementation
[0050] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0051] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0052] It should also be understood that in the embodiments of this application, "one or more" refers to one, two, or more; "and / or" describes the relationship between the associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.
[0053] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.
[0054] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0055] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units means two or more processing units; multiple systems means two or more systems.
[0056] like Figures 1a-1b For example, please refer to the following diagram illustrating an application scenario. Figure 1a When the phone screen is on, if the user presses the power button 101, the phone screen status will change from... Figure 1a Switch to Figure 1b , Figure 1b The screen is off. It's clear that the phone screen is not malfunctioning, and when the screen is on, pressing the power button 101 will turn the screen back on. 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.
[0057] Additionally, if the phone experiences a screen-on / off malfunction while the screen is on, pressing the power button (101) will not turn the screen off. Figure 1a Switch to Figure 1b In other words, if the user presses the power button 101 when the phone screen malfunctions, the screen will remain in the same state. Figure 1a constant.
[0058] like Figures 2a-2b For an illustrative example, please refer to the diagram illustrating another application scenario. Figure 2a When the phone screen is off, if the user presses the power button 101, the phone screen status will change from off to on. Figure 2a Switch to Figure 2b , Figure 2b The screen is on. It's clear that the phone screen is not malfunctioning, and even when the screen is off, pressing the power button 101 will turn the screen back on. Figure 2a Switching to screen-off state Figure 2bThe screen is on.
[0059] Additionally, if the phone experiences a screen-on / off malfunction while the screen is off, pressing the power button (101) will not cause the screen to turn on / off. Figure 2a Switch to Figure 2b In other words, if the user presses the power button 101 when the phone screen malfunctions, the screen will remain in the same state. Figure 2a constant.
[0060] Therefore, in order to accurately detect screen on / off faults in electronic devices, when a user presses the power button 101 of the phone, the system can acquire the first on / off state of the screen before the press and the second on / off state of the screen after the press, and then determine whether the first and second on / off states are the same. If the first and second on / off states are the same, it is determined that the phone screen is faulty; otherwise, it is determined that the phone screen is not faulty.
[0061] However, in certain scenarios, even if the power button is pressed, the screen's on / off state may not change. If an output malfunction occurs in this situation, it can cause a false alarm, thus affecting the user experience. These specific scenarios can be determined by the current operation performed by the electronic device; different operations result in different scenarios. For example, if the electronic device is currently holding the phone close to its ear for a call, then the scenario is a near-light scenario.
[0062] As an example, such as Figures 3a-3d As shown, when the phone is in a proximity light scenario, if the user presses the power button 101, the screen's on / off state will not change under normal circumstances. A proximity light scenario can be one where the electronic device detects that its screen is obstructed during a call based on a proximity sensor.
[0063] As an example, a scenario where a user holds their phone close to their ear to make a call could be a near-light situation. This call could be a voice call generated by a third-party application or a voice call generated by a built-in system application.
[0064] In near-light conditions, when a user holds their phone close to their ear, they don't need to view the screen content, so no screen display operation is required. To reduce power consumption, the phone can be set to an off-screen state in near-light conditions, and when the phone is moved away from the ear, the screen can be turned on again, thus exiting the near-light scenario.
[0065] In one approach, when a user is detected holding their phone close to their ear while making a call, it can be determined that the phone has entered a proximity light scenario, and when a user is detected holding their phone away from their ear while making a call, it can be determined that the phone has exited a proximity light scenario.
[0066] like Figure 3a This is a screenshot of the phone's interface when a user is talking to the contact "Zhang San". Once the call is successfully connected, the user can hold the phone close to their ear to talk to the contact. Figure 3b As shown above, Figure 3b The scenario shown is a near-light scenario. In near-light scenarios, to reduce the phone's power consumption, the phone can be set to a screen-off state. Furthermore, in this near-light scenario, pressing the power button 101 will not change the phone's on / off state; that is, the phone remains in a screen-off state.
[0067] like Figure 3c This refers to the display state of the phone screen when the user presses the power button in a near-light environment. Figure 3d This refers to the screen display state of the phone when the user lifts the power button in a near-light environment. (Combined with...) Figure 3c and Figure 3d It can be seen that in near-light conditions, if the user presses and releases the power button, the phone screen remains in the off state.
[0068] As can be seen, in near-light conditions, if the user presses the power button 101, the phone is in a screen-off state before and after pressing the power button, that is, the first on-screen state and the second on-screen state are the same. In this case, the phone's screen on-screen is in normal operation. If the above method is used for testing, a false fault will be detected.
[0069] As an example, if a user presses another button while pressing the power button 101, the phone enters a combined press scenario. In this scenario, the on / off state of the phone screen usually remains unchanged before and after pressing the power button 101. Figure 4 As shown, when the phone screen is on, if the user presses the volume button 102 at the same time as pressing the power button 101, the phone screen will still be on.
[0070] In this embodiment, if the power button 101 and other buttons are pressed simultaneously, the phone is in a combined press scenario. These other buttons can be mechanical buttons, such as volume up or volume down buttons. Alternatively, they can be touch-sensitive buttons. Different other buttons result in different operations performed by the phone; the specific types of other buttons are not explicitly limited here.
[0071] As a specific example, when the power button 101 and the volume down button are pressed simultaneously, the phone performs a screenshot operation, and the screen remains on after the screenshot operation. As another example, when the power button 101 and the volume up button are pressed simultaneously, the phone performs a screen recording operation, and the screen remains on after the screen recording operation.
[0072] It is evident that when the electronic device is in a combined press scenario, if the user presses the power button 101, the phone screen remains on both before and after pressing the power button 101. In other words, the first on / off state and the second on / off state are identical. In this case, the phone screen is in a normal state. However, if the above method is used for testing, a false fault detection problem will occur.
[0073] As an example, if a user presses and holds the power button 101 for a certain duration, the phone enters a voice wake-up mode. In this mode, pressing the power button 101 will typically keep the phone screen on / off. Figure 5 As shown, when the phone screen is on, if the user presses and holds the power button 101 for more than the initial press duration, the phone enters the voice wake-up scenario. In the voice wake-up scenario, the phone's display screen can show multiple controls 103. These controls can be for viewing real-time news, or for recommending other messages, etc. After pressing the corresponding control, the user can view the information in more detail.
[0074] Additionally, in voice wake-up scenarios, users can also input voice commands, and the phone can perform different operations upon receiving the user's voice input. For example, if the user inputs "open the phonebook," the phone's display will switch from the current screen to the phonebook interface. Similarly, if the user inputs "turn up the volume," the display will show the volume control interface.
[0075] Furthermore, after executing the corresponding voice command, the phone can output different voice commands based on the voice. For example, after the user performs a volume adjustment operation based on their voice, the phone can output the voice command "Volume turned up".
[0076] It should be noted that the phone performs different actions depending on the duration of the long press of the power button 101. For example, pressing and holding the power button 101 for more than 1 second activates the voice wake-up mode; pressing and holding the power button 101 for more than 3 seconds activates the shutdown reminder screen, which may display restart and shutdown controls, as well as other prompts. Furthermore, pressing and holding the power button 101 for more than 10 seconds shuts down the phone.
[0077] It is evident that in a voice wake-up scenario, if the user presses and holds the power button 101, the phone may be in a screen-on state before and after pressing and holding the power button 101, meaning the first on / off state and the second on / off state are the same. In this case, the phone screen is in a normal state. If the above method is used for testing, a false fault detection problem will occur.
[0078] To address the aforementioned issues, this application provides a fault detection method. In this method, if a user presses the power button, it determines whether to perform screen-on / off fault detection based on the current scenario of the electronic device, thus avoiding false detections in specific scenarios. These specific scenarios may include proximity light scenarios, key combination press scenarios, and voice wake-up scenarios.
[0079] The fault detection method in this application embodiment can be applied to, for example, Figure 6 In the electronic devices shown, Figure 6 The electronic device 100 shown can be a terminal, also referred to as a terminal device. A terminal can be a cellular phone, tablet, wearable device, or IoT device, or any device with a camera; this application does not limit the scope of the terminal. It should be noted that the structural diagram of the electronic device 100 can be applied to... Figures 1a to 5 The phone in the middle.
[0080] It should be further noted that the electronic device 100 may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations. Figure 6 The various components shown can 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] Electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, 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 headphone jack 170D, a sensor module 180, buttons 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 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.
[0082] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0083] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0084] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0085] The processor 110 may also include a memory 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 compliant with the USB standard specification, specifically a Mini USB interface, a Micro USB interface, a USB Type-C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used for data transfer between the electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0086] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0087] Mobile communication module 150 can provide solutions for wireless communication applications, including 2G / 3G / 4G / 5G, applied to electronic device 100. Mobile communication module 150 may include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. Wireless communication module 160 can provide solutions for wireless communication applications, including wireless local area networks (WLANs) (such as Wireless Fidelity (Wi-Fi) networks), Bluetooth (BT), Global Navigation Satellite System (GNSS), frequency modulation (FM), near-field communication (NFC), infrared (IR), etc., applied to electronic device 100.
[0088] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.
[0089] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0090] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD) or an organic light-emitting diode (OLED). In some embodiments, electronic device 100 may include one or N displays screens 194, where N is a positive integer greater than 1.
[0091] The external storage 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 storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0092] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area.
[0093] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0094] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0095] A pressure sensor is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor may be located on the display screen 194. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. In some embodiments, touch operations applied to the same touch location but with different touch intensity can correspond to different operation commands.
[0096] The proximity sensor may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device 100 emits infrared light outward through the LED. The electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that an object is near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that no object is near the electronic device 100. The electronic device 100 may use the proximity sensor to detect when a user holds the electronic device 100 close to their ear for a phone call, so as to automatically turn off the screen to save power. The proximity sensor can also be used in holster mode and pocket mode for automatic unlocking and screen locking.
[0097] A touch sensor, also known as a "touch panel," can be located on the display screen 194. The touch sensor and display screen 194 together form a touchscreen, also called a "touch screen." The touch sensor detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor may also be located on the surface of the electronic device 100, in a different position than the display screen 194.
[0098] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100. Pressing the power button can turn the phone screen off or on.
[0099] The layered architecture of the electronic device 100 divides the software into several layers, each with a clear role and division of labor. 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 system libraries, and the kernel layer.
[0100] The application layer can include a series of application packages.
[0101] like Figure 7 As shown, the application layer can include applications such as camera, gallery, calendar, call, map, WLAN, Bluetooth, music, video, and SMS.
[0102] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example... Figure 7 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0103] The kernel layer is the layer between the hardware and the aforementioned software layers. The kernel layer includes at least a display driver, a sensor driver, a scene determination module, and a screen on / off fault detection module. The hardware may include devices such as a camera, display screen, microphone, processor, and memory.
[0104] The scene determination module is used to determine the current scene of the electronic device and its on / off state. As an example, the scene determination module is used to determine whether the current scene of the electronic device is a near-light scene.
[0105] In addition, the screen on / off fault detection module is used to determine whether the screen on / off of the electronic device has malfunctioned. Specifically, after detecting that the user has pressed the power button, the screen on / off fault detection module can determine whether the screen of the electronic device has malfunctioned based on the screen on / off state before and after the pressing operation.
[0106] The sensor driver receives data collected by various sensors and sends this data to the scene determination module. For example, the sensor driver can receive relevant data collected by the proximity sensor and send this data to the scene determination module.
[0107] Understandable Figure 7 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 other embodiments of this application, the electronic device 100 may include more or fewer components than shown, or combine some components, or split some components, or have different component arrangements.
[0108] To reduce the false detection rate of faults, embodiments of this application can determine whether the electronic device is in a specific scenario. If it is in a specific scenario, a fault detection strategy corresponding to that specific scenario can be obtained. In particular, when the specific scenario is a near-light scenario, the electronic device may not perform the screen-on / off fault detection operation, which can reduce the false detection rate of screen-on / off fault detection to a certain extent.
[0109] It should be noted that the fault detection involved in this application embodiment can be triggered in any mode. Among them, the electronic device modes include, but are not limited to: desktop mode, screen-off mode, and screen-lock mode.
[0110] For example, desktop mode is the mode in which an electronic device is unlocked, such as... Figure 1a As shown. For example, a user can operate the electronic device in desktop mode to use the corresponding functions provided by the electronic device. For example, a user can use chat applications, video applications, make calls, watch videos, etc.
[0111] In desktop mode, upon receiving a user's press of the power button, the electronic device can normally switch from the on screen to the off screen, such as... Figure 1a As shown and Figure 1b Conversely, under abnormal circumstances, the current interface of the electronic device may remain on. Additionally, desktop mode, also known as unlocked mode, can include both desktop usage scenarios and application usage scenarios.
[0112] For example, screen-off mode can optionally be the mode that an electronic device enters after receiving a user's click of the power button, such as... Figure 2a As shown. When an electronic device is in screen-off mode, receiving a touch operation on the power button from the user should normally allow the device to switch from the screen-off interface to the screen-on interface. Conversely, under abnormal circumstances, the current interface of the electronic device may remain unchanged as the screen-off interface.
[0113] For example, the lock screen mode can optionally be the screen lock of an electronic device, such as... Figure 2b As shown. For example, in screen-off mode, a user can enter lock screen mode by touching or pressing buttons on the electronic device. For example, lock screen mode locks the screen, requiring the user to unlock it before accessing desktop mode.
[0114] For example, lock screen mode can provide some functions that can be used without unlocking, such as camera functions and widgets. In other words, users can perform corresponding operations on the electronic device in lock screen mode, while in screen-off mode, when the user presses the power button, the electronic device will enter lock screen mode. In lock screen mode, upon receiving a touch operation on the power button, the electronic device switches to the screen-off interface if the device is functioning normally. If the electronic device malfunctions, the lock screen remains unchanged.
[0115] It should be noted that the mode switching in the embodiments of this application includes, for example, switching from screen-off mode to lock screen mode, switching from lock screen mode to desktop mode, or switching from desktop mode (or lock screen mode) to screen-off mode. The mode switching can be an interface switching. For example, switching from screen-off mode to lock screen mode may optionally mean switching the screen-off interface displayed on the electronic device's screen to the lock screen interface.
[0116] In this embodiment, each interface (including the always-on display, the lock screen, and the desktop) is a full-screen display. That is, when the display screen switches from one interface (e.g., the always-on display) to another interface (e.g., the lock screen), the previous interface (i.e., the always-on display) is not displayed, and the switched interface (i.e., the lock screen) is displayed in full screen on the display screen.
[0117] like Figure 8 As shown in the embodiment of this application, a fault detection method is provided, which may include the following steps S110 to S150.
[0118] Step S110: The power button sends a press indication message to the scene judgment module.
[0119] In this embodiment, a pressing operation can be triggered when the user presses the power button. After receiving the pressing operation input by the user, the power button can send pressing instruction information to the scene judgment module. In addition, after receiving the pressing instruction information, the scene judgment module can determine whether the scene in which the electronic device is currently located is a proximity light scene, and then proceed to step S120.
[0120] In one approach, the press indication information sent by the power button can be used to indicate to the scene judgment module that the user has pressed the power button. This pressing action can include either pressing down or releasing the button. The timing of triggering screen-on / off fault detection differs depending on the electronic device's current mode. For example, when the electronic device is in desktop mode, pressing the power button triggers screen-on / off fault detection. Conversely, when the electronic device is in screen-off mode, releasing the power button triggers screen-on / off fault detection.
[0121] In this embodiment of the application, the press indication information can be used to indicate that the user of the scene judgment module has input a press and release operation based on the power button.
[0122] Step S120: The scene determination module determines whether the scene in which the electronic device is located is a near-light scene.
[0123] In some implementations, when the scene determination module receives the press indication information transmitted by the power button, it can determine whether the current scene of the electronic device is a proximity light scene. If the current scene of the electronic device is a proximity light scene, it determines that the screen on / off fault detection operation will not be performed, i.e., proceed to step S130. The proximity light scene can be as follows: Figures 3a-3d As shown. In addition, if the current scene of the electronic device is not a near-light scene, then the screen on / off fault detection operation is determined to be performed, that is, step S140 is entered.
[0124] As explained above, the proximity light scenario occurs when a user holds an electronic device close to their ear for a call, during which the device's screen is off. Conversely, when the device exits the proximity light scenario, the screen turns on, thus reducing power consumption to some extent.
[0125] In one approach, the scene determination module can determine whether the current scene of the electronic device is a proximity light scene based on at least two of the data collected by a proximity light sensor, a distance sensor, a temperature sensor, and a light sensor. For example, when the scene determination module determines that the electronic device is currently in a call state, it checks whether the data collected by the proximity light sensor and the temperature sensor meet preset conditions. If they do, the scene of the electronic device is determined to be a proximity light scene.
[0126] Alternatively, the electronic device can store a proximity light marker to indicate whether it is currently in a proximity light scene. When the proximity light marker is at a first marker value, the scene the electronic device is currently in is determined to be a proximity light scene. When the proximity light marker is at a second marker value, the scene the electronic device is currently in is determined to be a non-proximity light scene. In other words, the electronic device can set the proximity light marker to the first marker value when entering a proximity light scene, and can set the proximity light marker to the second marker value when exiting a proximity light scene.
[0127] Alternatively, when the scene determination module determines that the electronic device has entered a proximity light scene, it can set the proximity light marker to a first marker value. Conversely, when the electronic device is detected to have exited a proximity light scene, the scene determination module can set the proximity light marker to a second marker value. Upon receiving a press instruction, the scene determination module can directly read the proximity light marker and determine whether the electronic device is currently in a proximity light scene based on the read proximity light marker.
[0128] As an example, the first flag value can be 1, meaning that when the first flag value is determined to be 1, the current scene of the electronic device is determined to be a near-light scene. Conversely, the second flag value can be 0, meaning that when the second flag value is determined to be 0, the current scene of the electronic device is determined to be not a near-light scene.
[0129] Optionally, when the scene determination module receives the press indication information transmitted by the power button, it can first obtain the proximity light marker, and then determine whether the proximity light marker is 1. If the proximity light marker is 1, it determines that the current scene of the electronic device is a proximity light scene. If the proximity light marker is 0, it determines that the current scene of the electronic device is not a proximity light scene.
[0130] As another example, the first flag value can be True, meaning that when the first flag value is True, the scene in which the electronic device is currently located is determined to be a near-light scene. Conversely, the second flag value can be False, meaning that when the second flag value is False, the scene in which the electronic device is currently located is determined to be not a near-light scene.
[0131] Optionally, when the scene determination module receives the press indication information transmitted by the power button, it can first obtain the proximity light marker and then determine whether the proximity light marker is True. If the proximity light marker is True, it determines that the current scene of the electronic device is a proximity light scene. If the proximity light marker is False, it determines that the current scene of the electronic device is not a proximity light scene.
[0132] It should be noted that the first and second marker values can be set to any two different values, as long as they can distinguish between entering and exiting a proximity light scene. There are no specific restrictions on the exact values of the first and second marker values; they can be chosen based on the actual situation.
[0133] In this embodiment, if the scene determination module determines that the scene described by the electronic device is a near-light scene, it can skip the screen-on / off fault detection operation and proceed to step S130. This not only improves the accuracy of fault detection but also reduces the power consumption of the electronic device. Alternatively, if it determines that the scene described by the electronic device is not a near-light scene, the scene determination module can send a screen-on / off fault detection request to the screen-on / off fault detection module and proceed to step S140.
[0134] Step S130: The scene judgment module determines that the screen on / off fault detection operation will not be performed.
[0135] In some implementations, when the scene determination module determines that the current scene of the electronic device is a near-light scene, it decides not to perform the screen-on / off fault detection operation. That is, the scene determination module does not need to send a screen-on / off fault detection request to the screen-on / off fault detection module, thus ending the screen-on / off fault detection process. In other words, when the scene determination module determines that the current scene of the electronic device is a near-light scene, it does not need to call the screen-on / off fault detection module to perform the screen-on / off fault detection operation.
[0136] In one approach, when an electronic device is in a near-light environment, if the user presses the power button, the on / off state of the electronic device will not change before or after pressing the power button. That is, the electronic device is in a screen-off state before pressing the power button and remains in a screen-off state after pressing the power button.
[0137] It is evident that the on / off state of the electronic device did not change before and after pressing the power button, and this situation was not caused by a screen malfunction, but rather a manifestation of the normal function of the electronic device. Performing a screen malfunction detection operation at this time would not only increase the unnecessary power consumption of the electronic device, but also increase the false detection rate of the malfunction, thereby affecting the user experience.
[0138] To address the aforementioned issues, this application embodiment can eliminate the need for screen-on / off fault detection when determining that the electronic device is in a near-field scenario. This not only reduces unnecessary power consumption associated with screen-on / off fault detection but also lowers the false detection rate.
[0139] To better understand the relationship between proximity light scenes and pressing the power button, embodiments of this application provide the following... Figure 9 The example diagram is shown below. (By...) Figure 9 It can be seen that when the electronic device enters the proximity light scene, the proximity light marker can be set to the first marker value. Furthermore, when the electronic device exits the proximity light scene, the proximity light marker can be set to the second marker value. Moreover, the proximity light marker can remain unchanged at the first marker value from the time the electronic device enters the proximity light scene until it exits it. In other words, the proximity light marker can be set to the first marker value between T1 and T2.
[0140] Please see Figure 9 If the user presses the power button at time T0, and since the time T0 is between T1 and T2, the proximity light marker at this moment is the first marker value. The scene judgment module obtains the current proximity light marker of the electronic device as the first marker value, therefore the scene judgment module determines not to perform the screen on / off fault detection operation.
[0141] Step S140: The scene judgment module sends a screen on / off fault detection request to the screen on / off fault detection module.
[0142] In this embodiment, when the scene judgment module determines that the current scene of the electronic device is not a near-light scene, it can send a screen-on / off fault detection request to the screen-on / off fault detection module. Upon receiving the screen-on / off fault detection request from the scene judgment module, the screen-on / off fault detection module can perform a screen-on / off fault detection operation, i.e., proceed to step S150.
[0143] Step S150: When the screen on / off fault detection module receives the screen on / off fault detection request transmitted by the scene judgment module, it performs the screen on / off fault detection operation.
[0144] In some implementations, the screen-on / off fault detection module can initiate a screen-on / off fault detection operation upon receiving a screen-on / off fault detection request transmitted by the scene judgment module. The detection process of the screen-on / off fault detection operation can be as follows: Figure 10 As shown.
[0145] Step S151: The screen on / off fault detection module acquires the first on / off state of the electronic device.
[0146] In this embodiment of the application, the first on / off state of the electronic device can be the on / off state of the screen before the power button is pressed. The on / off state will be different depending on the mode of the electronic device before the power button is pressed.
[0147] As an example, if the electronic device is in desktop mode before the power button is pressed, the first on / off state of the electronic device is the screen-on state.
[0148] As another example, if the electronic device is in lock screen mode before the power button is pressed, the first on / off state of the electronic device is the on screen state.
[0149] As another example, if the electronic device is in screen-off mode before the power button is pressed, the first on / off state of the electronic device is the screen-off state.
[0150] Step S152: The screen on / off fault detection module acquires the second on / off state of the electronic device.
[0151] In this embodiment of the application, the second on / off state of the electronic device can be the on / off state of the screen after the power button is pressed. The on / off state will be different depending on the mode of the electronic device after the power button is pressed.
[0152] As an example, after the power button is pressed, if the electronic device is in screen-off mode, then the second on / off state of the electronic device is the screen-off state.
[0153] As another example, if the electronic device is in lock screen mode after the power button is pressed, the second on / off state of the electronic device is the on screen state.
[0154] As another example, after the power button is pressed, if the electronic device is in desktop mode, the second on / off state of the electronic device is the screen-on state.
[0155] Step S153: The screen on / off fault detection module determines whether the first on / off state and the first on / off state are the same.
[0156] In some implementations, the screen on / off fault detection module can determine whether the first on / off state and the second on / off state are the same after receiving a screen on / off fault detection request. The second on / off state can be the screen on / off state obtained after a timer in the screen on / off fault detection module reaches a first specified duration. As an example, the first specified duration can be 6 seconds or 10 seconds.
[0157] As one approach, if both the first and second on / off states are on, then the first and second on / off states are considered to be the same. Conversely, if both the first and second on / off states are on, then the first and second on / off states are considered to be the same.
[0158] As one approach, if the first on / off state is a screen-on state and the second on / off state is a screen-off state, then the first on / off state and the second on / off state are determined to be different. Conversely, if the first on / off state is a screen-off state and the second on / off state is a screen-on state, then the first on / off state and the second on / off state are determined to be different.
[0159] In this embodiment, the screen on / off fault detection module determines that the screen of the electronic device has experienced a screen on / off fault when the first on / off state and the second on / off state are the same, and proceeds to step S154. Alternatively, if the first on / off state and the second on / off state are different, it determines that the screen of the electronic device has not experienced a screen on / off fault, and proceeds to step S156.
[0160] Step S154: The screen on / off fault detection module determines that the screen of the electronic device has malfunctioned.
[0161] In this embodiment of the application, the screen on / off fault detection module can determine that the screen of the electronic device has malfunctioned by comparing the first on / off state and the second on / off state. At this time, the screen on / off fault detection module can collect target logs related to the fault, that is, proceed to step S155.
[0162] As an example, when an electronic device determines that its screen has malfunctioned, it can use its speaker to output a fault message. Alternatively, if the user is not wearing headphones and the electronic device is not hands-free, the device can output a fault message via the receiver when a screen malfunction is detected.
[0163] As another example, when a screen malfunction is determined to be malfunctioning on an electronic device, if the user is wearing headphones, the electronic device can output a malfunction notification message through the headphones. In this process, embodiments of this application can also first determine whether the electronic device is in a pocket. If the electronic device is in a pocket and headphones are connected, the malfunction notification message can be output to the user through the headphones.
[0164] Additionally, if the electronic device is not in a pocket and is connected to headphones, a fault notification message can be output through the headphones within the first time period. If no troubleshooting action is received from the user within the first time period, a fault notification message can be output through both the headphones and the receiver to expedite the troubleshooting process.
[0165] Step S155: The screen on / off fault detection module collects target logs related to the fault and stores the target logs.
[0166] In one approach, when a screen on / off fault is detected in an electronic device, the screen on / off fault detection module can acquire the event of the fault and collect the target log of the fault, and then store the target log. This target log can also be referred to as the screen on / off fault log.
[0167] In this embodiment of the application, the target log may include a list of processes in states D and Z, where state D is an uninterruptible deep sleep state and state Z is a zombie state.
[0168] Additionally, the target log may also include the process status (taskstatus) of a system service (SS). The process status of a system service may include block signals, running status, and scheduling parameters (affinity), etc. Therefore, the target log in this embodiment may include processes in state D and the stacks of critical processes, etc.
[0169] Alternatively, after obtaining the fault event and the target log of the fault, the electronic device can also send the fault event and the target log of the fault to the server, so that the server can analyze the failure rate of the electronic device based on the event and the target log.
[0170] Optionally, after the server analyzes the failure rate of the electronic device based on the fault events and target logs, it can display the failure rate to the manufacturer so that the manufacturer can measure the quality standard of the electronic device based on the failure rate indicator and discover more faults and possible operations.
[0171] On the other hand, the server can also display this failure rate to developers, enabling them to pinpoint problems with electronic devices. For example, identifying and resolving issues such as a screen that won't turn on or off. This can improve the overall quality of electronic devices.
[0172] As another approach, when a screen malfunction is detected on an electronic device, the device can also detect whether the malfunction is caused by an application process. If the malfunctioning process is an application process, the electronic device can perform a forced shutdown operation. This forced shutdown operation is an action performed by the user on the electronic device to forcibly close the currently running application.
[0173] Additionally, when a screen malfunction is detected on an electronic device, the device can also detect whether the malfunction is caused by a system service process. If the process causing the malfunction is a system service process, the electronic device can perform a forced restart. This forced restart is an operation performed by the user to forcefully restart the operating system of the electronic device.
[0174] As another approach, when a screen malfunction is identified, the electronic device can also output a voice prompt. For example, if the device determines that a specific application is causing the malfunction, it can output a message informing the user that the malfunction is caused by the application and requesting that the application be forcibly closed. Alternatively, if the device determines that a system process is causing the malfunction, it can output a message informing the user that the malfunction is caused by a system malfunction and requesting that the user press and hold the power button to force a restart of the device.
[0175] Step S156: The screen on / off fault detection module determines that the screen of the electronic device is not faulty.
[0176] In another embodiment of this application, to ensure the accuracy of fault detection, the timing of triggering the screen-on / off fault detection operation varies depending on the screen-on / off state of the electronic device before the pressing operation. Specifically, when the electronic device is in the screen-on state, the lifting operation is used as the trigger point for the screen-off detection operation. This can improve the accuracy of fault detection to a certain extent. For details, please refer to [link to relevant documentation]. Figure 11 .
[0177] Step S210: The power button sends a press indication message to the scene judgment module.
[0178] The press indication information is used to indicate to the scene judgment module that the user has pressed the power button.
[0179] Step S220: The scene judgment module determines whether the scene in which the electronic device is currently located is a near-light scene.
[0180] In this embodiment, when the scene determination module receives the press indication information sent by the power button, if it determines that the current scene of the electronic device is a near-light scene, it will not send a screen-on / off fault detection request to the screen-on / off fault detection module, and proceeds to step S230. Alternatively, if it determines that the current scene of the electronic device is not a near-light scene, the scene determination module can determine whether the electronic device is currently in a screen-on state, and proceeds to step S240.
[0181] Step S230: The scene judgment module determines not to send a screen on / off fault detection request to the screen on / off fault detection module.
[0182] Step S240: The scene judgment module determines whether the electronic device is currently in a screen-on state.
[0183] In this embodiment of the application, when the scene determination module determines that the scene in which the electronic device is currently located is not a near-light scene, it can obtain the brightness parameter of the current screen of the electronic device and determine whether the electronic device is currently in a bright screen state based on the brightness parameter.
[0184] As an example, if the brightness parameter of the current screen of an electronic device is greater than 0, it is determined that the electronic device is currently in a screen-on state; if the brightness parameter of the current screen is 0, it is determined that the electronic device is currently in a screen-off state.
[0185] As one approach, when an electronic device is in a screen-on state, its corresponding mode can be either desktop mode or lock screen mode. Therefore, when determining whether an electronic device is currently in a screen-on state, the scene determination module can determine whether the current mode is desktop mode. If it is not desktop mode, it can further determine whether the current mode is lock screen mode. If the current mode is neither desktop mode nor lock screen mode, it is determined that the electronic device is currently in a screen-off state; otherwise, the electronic device is in a screen-on state.
[0186] In some implementations, when the scene determination module determines that the electronic device is currently in a screen-on state, it enters a waiting state, that is, enters step S250.
[0187] Step S250: The scene judgment module enters a waiting state.
[0188] In this embodiment of the application, when the scene judgment module determines that the electronic device is in the screen-on state, it can enter the waiting state. In the waiting state, the scene judgment module can detect whether it receives the power button release instruction information. If it receives it, it sends a screen-on / off fault detection request to the screen-on / off fault detection module, that is, it enters step S270.
[0189] Step S260: When the power button detects a user input lift operation, it can send lift indication information to the scene judgment module.
[0190] In this embodiment, the lift-up indication information is used to indicate to the scene judgment module that the user has input a lift-up operation on the power button. The press and lift-up operations do not include long-press operations, primarily because the on / off state of the electronic device may not change when the power button is pressed for a long time, and this is a normal situation. If the lift-up operation included a long-press operation, it would lead to false alarms in the screen on / off fault detection, thereby degrading the user experience.
[0191] As an example, the duration between pressing and releasing the button is less than the duration of the first long press, where the duration of the first long press can be less than the duration of the second long press to activate the smart voice scenario. For example, the duration of the first long press is 1 second, and the duration of the second long press is 3 seconds.
[0192] As another example, the first long press duration can also be shorter than the third long press duration for turning off the electronic device. For example, the first long press duration is 1 second, and the third long press duration is 10 seconds. These first, second, and third long press durations are just examples; the actual duration may vary depending on the specific circumstances.
[0193] Step S270: The scene judgment module sends a screen on / off fault detection request to the screen on / off fault detection module.
[0194] In one approach, when the scene judgment module receives the power button's release indication information, it can send a screen-on / off fault detection request to the screen-on / off fault detection module.
[0195] Step S280: When the screen on / off fault detection module receives the screen on / off fault detection request transmitted by the scene judgment module, it can start a timer and perform the screen on / off fault detection operation.
[0196] In this embodiment, the screen on / off fault detection module may include a timer. Upon receiving a screen on / off fault detection request, the timer can start and determine 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 malfunctioned; if they are different, it is determined that the screen of the electronic device has not malfunctioned. The specific execution of the screen on / off fault detection request has been described in detail in the above embodiments and will not be repeated here.
[0197] To better understand the embodiments of this application, the following are provided: Figure 12 The example diagram shown is obtained by... Figure 12 As can be seen, when the electronic device is in a screen-on state (non-zero), it enters a standby state when the power button is detected being lifted. Furthermore, a timer is started in the standby state, and it is determined whether the screen-on / off state of the electronic device changes after the first specified duration of the timer's start. If a change occurs, it is determined that the screen-on / off state of the electronic device is normal, and it enters the screen-off state, at which point the screen brightness is 0.
[0198] Furthermore, if the timer expires and the on / off state of the electronic device remains unchanged, the screen of the electronic device is determined to be faulty. In other words, if the on / off state of the electronic device remains unchanged after the timer has been triggered for a first specified duration, the timer is determined to have expired, and the device enters a timeout state, indicating that the screen of the electronic device has malfunctioned. For example, if the brightness of the electronic device is non-zero before the lift-up operation, and the brightness is still non-zero 6 seconds after the lift-up operation, then the screen of the electronic device is determined to be faulty.
[0199] In another embodiment of this application, to ensure the accuracy of fault detection, the timing of triggering the screen-on / off fault detection operation varies depending on the screen-off state of the electronic device before the pressing operation. Specifically, when the electronic device is in the off state, the pressing operation is used as the trigger point for the screen-on / off fault detection operation. This can improve the accuracy of fault detection to a certain extent. For details, please refer to [link to relevant documentation]. Figure 13 .
[0200] Step S310: The power button sends a press indication message to the scene judgment module.
[0201] Step S320: The scene judgment module determines whether the scene in which the electronic device is currently located is a near-light scene.
[0202] In this embodiment, if the scene determination module determines that the scene described by the electronic device is a near-light scene, it can skip the screen-on / off fault detection operation and proceed to step S330. This not only improves the accuracy of fault detection but also reduces the power consumption of the electronic device. Alternatively, if it determines that the scene described by the electronic device is not a near-light scene, the scene determination module can determine whether the electronic device is currently in a screen-off state and proceed to step S340.
[0203] Step S330: The scene judgment module determines not to send a screen on / off fault detection request to the screen on / off fault detection module.
[0204] Step S340: The scene judgment module determines whether the electronic device is currently in a screen-off state.
[0205] In this embodiment of the application, when the scene determination module determines that the scene in which the electronic device is currently located is not a near-light scene, it can obtain the brightness parameter of the current screen of the electronic device and determine whether the electronic device is currently in a screen-off state based on the brightness parameter.
[0206] As an example, if the current screen brightness parameter of an electronic device is 0, it is determined that the electronic device is currently in a screen-off state; if the current screen brightness parameter is not 0, it is determined that the electronic device is currently in a screen-on state.
[0207] As one approach, when an electronic device is in a screen-off state, its corresponding mode can be screen-off mode. Therefore, when determining whether an electronic device is currently in a screen-off state, the scene judgment module can determine whether the current mode of the electronic device is screen-off mode. If the current mode of the electronic device is screen-off mode, then the electronic device is determined to be in a screen-off state; otherwise, the electronic device is in a screen-on state.
[0208] It should be noted that, when the brightness parameter is not 0, this embodiment of the application can also determine whether the current mode of the electronic device is AOD mode (Always on Display). If it is AOD mode, the current on / off state of the electronic device can be regarded as a screen-off state, and the brightness parameter is not 0. Here, AOD refers to a display mode in which a part of the display screen remains constantly lit when the electronic device is off, or a part of the display screen lights up when a touch operation is detected.
[0209] Additionally, for electronic devices set to AOD mode, when the screen is about to turn off, the display will switch from the on screen to the off screen, and then from the off screen to the AOD display; when the screen is about to turn on, it will switch directly from the AOD display to the lock screen. Alternatively, when the screen is about to turn off, the electronic device's display interface can also switch directly from the on screen to the AOD display.
[0210] In some implementations, when the scene determination module determines that the electronic device is currently in a screen-off state, it sends a screen-off fault detection request to the screen-off fault detection module, that is, proceeds to step S350.
[0211] Step S350: The scene judgment module sends a screen on / off fault detection request to the screen on / off fault detection module.
[0212] Step S360: When the screen on / off fault detection module receives the screen on / off fault detection request transmitted by the scene judgment module, it can start a timer and perform the screen on / off fault detection operation.
[0213] In this embodiment, the screen on / off fault detection module may include a timer. Upon receiving a screen on / off fault detection request, the timer can be started, and when the timer reaches a first specified duration, a first on / off state and a second on / off state are acquired. 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 malfunctioned; if they are different, it is determined that the screen of the electronic device has not malfunctioned. The specific execution of the screen on / off fault detection request has been described in detail in the above embodiments and will not be repeated here.
[0214] To better understand the embodiments of this application, the following are provided: Figure 14 The example diagram shown is obtained by... Figure 14As can be seen, when the electronic device is in a screen-off state (brightness is 0), if the user presses the power button, it enters a standby state. In the standby state, a timer is started, and it is determined whether the screen-on / off state of the electronic device changes after the first specified duration of the timer's start. If it changes, the screen-on / off state of the electronic device is determined to be normal, and it enters the screen-on state, where the screen brightness is non-zero.
[0215] Furthermore, if the timer expires and the on / off state of the electronic device remains unchanged, it is determined that the screen of the electronic device has malfunctioned. In other words, if the on / off state of the electronic device remains unchanged after the timer has been triggered for a first specified duration, it is determined that the timer has expired, and the device enters a timeout state, indicating that the screen of the electronic device has malfunctioned. For example, if the brightness of the electronic device is 0 before receiving the press instruction information, and the brightness of the electronic device is still 0 6 seconds after receiving the press instruction information, then it is determined that the screen of the electronic device has malfunctioned.
[0216] In another embodiment of this application, in order to improve the accuracy of proximity light scene detection and thus reduce the false detection rate of fault detection, this embodiment of the application can combine data collected by multiple sensors to comprehensively determine whether the scene in which the electronic device is currently located is a proximity light scene. For details, please refer to [link to relevant documentation]. Figure 15 .
[0217] Step S410: The power button sends a press instruction message to the scene judgment module.
[0218] Step S420: The sensor driver receives the data collected by the sensor.
[0219] In this embodiment of the application, the sensor may include at least one data acquisition sensor, wherein the data acquisition sensor may include at least one of a proximity sensor, a temperature sensor, a distance sensor, and a light sensor.
[0220] In some implementations, the sensor can collect corresponding data in real time and transmit the collected data to the sensor driver. Upon receiving the data, the sensor driver can then send the data transmitted by the sensor to the scene determination module in real time. The data collected will differ depending on the sensor. For example, if the sensor is a proximity sensor, the data it collects is proximity light parameters. Similarly, if the sensor is a temperature sensor, the data it collects is temperature parameters.
[0221] In other implementations, after receiving the data collected by the sensor, the sensor driver can also directly store the data collected by the sensor. When the scene judgment module receives the press indication information triggered by the power button, it can directly call the pre-stored data from the sensor driver.
[0222] It should be noted that after receiving data from the sensor, the sensor driver can also process the data and send the processed data to the scene judgment module. For example, the sensor driver can perform format conversion on the data collected by the sensor. The specific processing methods of the sensor driver are not explicitly limited here; they can be selected based on the actual situation.
[0223] Step S430: After receiving the data collected by the sensor, the sensor driver can forward it to the scene judgment module.
[0224] Step S440: The scene judgment module determines whether the scene in which the electronic device is currently located is a near-light scene based on the data sent by the sensor driver.
[0225] As an example, when the scene determination module receives the press instruction information sent by the power button, it can directly obtain the data collected by the sensor from the sensor driver, and then determine whether the scene in which the electronic device is currently located is a proximity light scene based on the data.
[0226] As another example, when the scene determination module receives the press instruction information sent by the power button, it can first determine whether the electronic device is currently in a call state. If the electronic device is currently in a call state, the scene determination module can obtain the data collected by the sensor from the sensor driver, and then determine whether the scene in which the electronic device is currently located is a near-light scene based on the data transmitted by the sensor driver.
[0227] Specifically, when it is determined that the electronic device is in a call state, if the data received by the scene determination module is the proximity light parameter collected by the proximity light sensor, the scene determination module can determine whether the proximity light parameter is greater than a preset threshold. If the proximity light parameter is greater than the preset threshold, the scene in which the electronic device is currently located is determined to be a proximity light scene. The preset threshold can also be called the proximity light threshold.
[0228] As another example, when it is determined that the electronic device is in a call state, if the data received by the scene judgment module is the temperature parameter collected by the temperature sensor, the scene judgment module can determine whether the temperature parameter is greater than the temperature threshold. If the temperature parameter is greater than the temperature threshold, the scene in which the electronic device is currently located is a near light scene.
[0229] As another example, when it is determined that the electronic device is in a call state, if the scene judgment module receives proximity light parameters and temperature parameters, the scene judgment module can first determine whether the proximity light parameters are greater than the proximity light threshold, and then determine whether the temperature parameters are greater than the temperature threshold. If both the proximity light parameters and the temperature parameters meet the conditions, then the scene in which the electronic device is currently located is determined to be a proximity light scene.
[0230] Alternatively, the scene determination module can first determine whether the temperature parameter is greater than a temperature threshold, and then determine whether the proximity light parameter is greater than a proximity light threshold. If both the proximity light parameter and the temperature parameter meet the conditions, then the scene in which the electronic device is currently located is determined to be a proximity light scene. There is no explicit restriction on which value is determined first; it can be selected based on the actual situation.
[0231] Optionally, the data collected by the sensor may also include distance values and illumination values. By combining this data, the embodiments of this application can more accurately determine the proximity light scene, thereby improving and reducing the false detection rate of fault detection. The specific parameters to be included in proximity light are not explicitly limited here.
[0232] In this embodiment of the application, when it is determined that the current scene of the electronic device is a proximity light scene, the screen on / off fault detection operation can be omitted, i.e., proceeding to step S450. This not only improves the accuracy of fault detection but also reduces the power consumption of the electronic device. Conversely, if it is determined that the scene of the electronic device is not a proximity light scene, the scene determination module sends a screen on / off fault detection request to the screen on / off fault detection module, i.e., proceeding to step S460.
[0233] Step S450: The scene judgment module determines not to send a screen on / off fault detection request to the screen on / off fault detection module.
[0234] Step S460: The scene judgment module sends a screen on / off fault detection request to the screen on / off fault detection module.
[0235] Step S470: When the screen on / off fault detection module receives the screen on / off fault detection request transmitted by the scene judgment module, it performs the screen on / off fault detection operation.
[0236] It should be noted that, in the embodiment of this application, when performing the screen on / off fault detection operation, the on / off state of the electronic device before receiving the press instruction information can be determined first. If the electronic device was in the on-screen state before receiving the press instruction information, the screen on / off fault detection module starts a timer when it receives the release instruction information transmitted by the power button. Alternatively, if the electronic device was in the off-screen state before the press operation, the screen on / off fault detection module can start a timer when it receives the press instruction information transmitted by the power button.
[0237] Furthermore, steps S450 to S470 have been described in detail in the above embodiments and will not be repeated here.
[0238] In another embodiment of this application, to reduce the false detection rate of fault detection, this embodiment can detect special scenarios other than proximity light scenarios. These other special scenarios include combined press scenarios. Furthermore, a combined press scenario is triggered when a user presses the power button while simultaneously pressing another button. As an example, the other buttons may include volume buttons. For details of the detection process, please refer to [link to relevant documentation]. Figure 16 .
[0239] Step S510: The power button sends the first press indication information to the scene judgment module.
[0240] The first press indication information is used to indicate to the scene judgment module that the user has pressed the power button.
[0241] Step S520: Other buttons send a second press instruction to the scene judgment module.
[0242] The second press indication information is used to indicate to the scene judgment module that the user has pressed another button. As an example, the other button could be a volume button.
[0243] Step S530: The scene judgment module determines whether the scene in which the electronic device is located is a combined press scene based on the first press indication information and the second press indication information.
[0244] In one approach, upon receiving the first and second press indication information, the scene determination module can determine whether the other button sending the second press indication information can trigger a combined press function with the power button. If so, the scene in which the electronic device is located is determined to be a combined press scene.
[0245] In this embodiment, the combined press scenario can be a scenario generated when the electronic device receives a user's combined press operation in desktop mode. This combined press operation can be a scenario where the user triggers other buttons simultaneously while pressing the power button. Furthermore, the other buttons can be designated buttons. For example, the other button could be the power button.
[0246] like Figure 4 As shown, when the electronic device is in desktop mode, it detects that the user has pressed the power button 101 and triggered the volume button 102 at the same time, which will trigger operations such as screenshotting or screen recording.
[0247] As an example, when the electronic device is in desktop mode, if the scene judgment module detects that the user presses the power button 101 while simultaneously triggering the volume down button, a screenshot operation is triggered. This screenshot operation is used to capture the content displayed on the current screen of the electronic device. For example, ... Figure 4 The content displayed on the screen is captured and stored as an image in the image library of the electronic device.
[0248] As an example, when the electronic device is in desktop mode, if the scene judgment module detects that the user presses the power button 101 while simultaneously triggering the volume up button, a screen recording operation is triggered. This screen recording operation is used to record the content displayed on the current interface of the electronic device. For example, ... Figure 4 The content displayed on the screen is recorded and stored in the image library of the electronic device in video format.
[0249] In one specific embodiment, pressing the power button and volume button simultaneously can trigger a combined press scenario. Alternatively, pressing the power button and other buttons can also trigger a combined press scenario; the specific "other buttons" are not explicitly limited here and can be selected based on the actual situation.
[0250] In summary, in the case of combined pressing, the on / off state of the electronic device does not change before and after pressing the power button. That is, the electronic device is in the on state before pressing the power button, and the electronic device remains in the on state after performing the combined pressing operation.
[0251] It is evident that the on / off state of the electronic device did not change before and after pressing the power button, and this situation was not caused by a screen malfunction, but rather reflected the normal operation of the electronic device's screenshot / screen recording functions. Performing a screen malfunction detection operation at this time would not only increase the unnecessary power consumption of the electronic device, but also increase the false detection rate of the malfunction, thereby affecting the user experience.
[0252] To address the aforementioned issues, this embodiment of the application, when determining that the electronic device is in a combined press scenario, may omit the screen-on / off fault detection operation, i.e., proceed to step S540. This not only improves the accuracy of fault detection but also reduces the power consumption of the electronic device. Furthermore, if it is determined that the electronic device is not in a combined press scenario, the scenario determination module sends a screen-on / off fault detection request to the screen-on / off fault detection module, i.e., proceed to step S550.
[0253] Step S540: The scene judgment module determines that the screen on / off fault detection operation will not be performed.
[0254] Step S550: The scene judgment module sends a screen on / off fault detection request to the screen on / off fault detection module.
[0255] Step S560: When the screen on / off fault detection module receives the screen on / off fault detection request transmitted by the scene judgment module, it performs the screen on / off fault detection operation.
[0256] Steps S40 to S560 have been described in detail in the above embodiments, and will not be repeated here.
[0257] It should be noted that, in the embodiment of this application, when performing the screen on / off fault detection operation, the on / off state of the electronic device before receiving the press instruction information can be determined first. If the electronic device was in the on-screen state before receiving the press instruction information, the screen on / off fault detection module starts a timer when it receives the release instruction information transmitted by the power button. Alternatively, if the electronic device was in the off-screen state before the press operation, the screen on / off fault detection module can start a timer when it receives the press instruction information transmitted by the power button.
[0258] In another embodiment of this application, in order to reduce the false detection rate of fault detection, this embodiment of the application can perform detection on special scenarios other than proximity light scenarios. These other special scenarios include voice wake-up scenarios. For details of the detection process, please refer to [link to relevant documentation]. Figure 17 .
[0259] Step S610: The power button sends a press instruction message to the scene judgment module.
[0260] Step S620: The scene judgment module determines whether the scene in which the electronic device is located is a voice wake-up scene.
[0261] In this embodiment, the voice wake-up scenario can be a scenario where the electronic device receives a long press of the power button from the user while in desktop mode. Alternatively, the voice wake-up scenario can also be a scenario where the electronic device receives a long press of the power button from the user while in lock screen mode.
[0262] In some implementations, the press indication information may include the time the user inputs the press operation, the duration the user holds the press operation, and the time the user inputs the release operation. When the scene determination module receives the press indication information sent by the power button, it can obtain the duration of the press operation based on the indication information. Then it determines whether the duration reaches the first long press duration. If it reaches the first long press duration, it determines that the scene in which the electronic device is in is a voice wake-up scene. For example, the first long press duration can be 1 second.
[0263] In other embodiments, the electronic device may also include a power button driver that can record the trigger time of a press operation when a user input is detected. Simultaneously, the power button driver can record the trigger time of a release operation when a user input is detected.
[0264] Based on this, the power button driver can obtain the duration of a long press of the power button based on the trigger time of the press operation and the trigger time of the release operation, and send this long press duration to the scene judgment module. After receiving the long press duration, the scene judgment module can determine whether the long press duration is greater than the first long press duration. If it is greater, it determines that the scene in which the electronic device is located is a voice wake-up scene.
[0265] It should be noted that when the power button driver detects a user input press, it can also monitor the duration of the press and send the monitored duration to the scene determination module. The scene determination module can also determine that the electronic device is in a voice wake-up scene when it determines that the duration exceeds the first long press duration.
[0266] In this embodiment, after the power button is pressed and held for a duration exceeding a first press duration, the electronic device enters a voice wake-up scenario. In this scenario, the user can instruct the electronic device to perform different operations by inputting voice commands. For example, if the user inputs the voice command "Open camera," the electronic device can then open the camera accordingly.
[0267] Additionally, if the power button is pressed and held for a duration exceeding the second long press duration, the electronic device will enter a shutdown mode. This shutdown mode can include shutdown controls, restart controls, and other prompts. The electronic device can perform corresponding operations when the user triggers different controls. The first long press duration is shorter than the second long press duration. For example, the first long press duration is 1 second, and the second long press duration is 3 seconds.
[0268] It should be noted that if the user continues to press and hold the power button for a third time after the electronic device has entered the power-off state, the electronic device will directly enter the power-off state. The third long press duration is longer than the second long press duration. For example, the third long press duration is 10 seconds.
[0269] like Figure 5 As shown, when the electronic device is in desktop mode, it detects that the user has pressed and held the power button 101 for more than 1 second, and then the electronic device enters the voice wake-up scenario. Combined with... Figure 5 We can see that the electronic device is in a screen-on state before the power button is pressed and held, and remains in a screen-on state after the power button is pressed and held. In other words, the electronic device is in a screen-on state before entering the voice wake-up scenario by pressing and holding the power button, and remains in a screen-on state after entering the voice wake-up scenario by pressing and holding the power button.
[0270] It is evident that the on / off state of the electronic device did not change before and after pressing and holding the power button. This situation is not caused by a screen malfunction, but rather reflects the normal operation of the voice wake-up function of the electronic device. Performing a screen malfunction detection operation at this time would not only increase the unnecessary power consumption of the electronic device, but also increase the false detection rate of the malfunction, thereby affecting the user experience.
[0271] To address the aforementioned issues, this embodiment of the application, when determining that the electronic device is in a voice wake-up scenario, may omit the screen-on / off fault detection operation, i.e., proceed to step S630. This not only improves the accuracy of fault detection but also reduces the power consumption of the electronic device. Furthermore, if it is determined that the electronic device is not in a voice wake-up scenario, the scenario determination module sends a screen-on / off fault detection request to the screen-on / off fault detection module, i.e., proceed to step S640.
[0272] Step S630: The scene judgment module determines that the screen on / off fault detection operation will not be performed.
[0273] Step S640: The scene judgment module sends a screen on / off fault detection request to the screen on / off fault detection module.
[0274] Step S650: When the screen on / off fault detection module receives the screen on / off fault detection request transmitted by the scene judgment module, it performs the screen on / off fault detection operation.
[0275] Steps S630 to S650 have been described in detail in the above embodiments, and will not be repeated here.
[0276] It should be noted that, in the embodiment of this application, when performing the screen on / off fault detection operation, the on / off state of the electronic device before receiving the press instruction information can be determined first. If the electronic device was in the on-screen state before receiving the press instruction information, the screen on / off fault detection module starts a timer when it receives the release instruction information transmitted by the power button. Alternatively, if the electronic device was in the off-screen state before the press operation, the screen on / off fault detection module can start a timer when it receives the press instruction information transmitted by the power button.
[0277] It is understood that, in order to achieve the above-mentioned functions, electronic devices include hardware and / or software modules that perform the respective functions. Based on the algorithmic steps of the examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by 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 conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.
[0278] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned related method steps to implement the fault detection method in the above embodiment.
[0279] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the fault detection method in the above embodiment.
[0280] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory. The memory is used to store computer execution instructions. When the apparatus is running, the processor can execute the computer execution instructions stored in the memory to cause the chip to execute the fault detection methods in the above-described method embodiments.
[0281] In this embodiment, the electronic device, computer storage medium, computer program product or chip are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding method provided above, and will not be repeated here.
[0282] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0283] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0284] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0285] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0286] Any content in the various embodiments of this application, as well as any content in the same embodiment, can be freely combined. Any combination of the above content is within the scope of this application.
[0287] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0288] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A fault detection method characterized by, Applied to electronic devices, the method includes: In response to a user pressing the power button of the electronic device, it is determined whether the scene in which the electronic device is located is a specific scene. When the pressing operation is received in the specific scene, the on / off state of the screen of the electronic device does not change. If the electronic device is in the specific scenario, the screen on / off fault detection operation will not be performed; the specific scenario includes one or more of the following: proximity light scenario, combined press scenario, and voice wake-up scenario; wherein, the proximity light scenario is triggered when the screen of the electronic device is blocked while it is in a call state, the combined press scenario is triggered when the user presses the power button and other buttons at the same time, and the voice wake-up scenario is triggered when the user presses and holds the power button to trigger human-computer voice interaction; If the electronic device is not in the specific scenario, then the screen on / off fault detection operation is performed.
2. The method of claim 1, wherein, The step of determining whether the scene in which the electronic device is located is a specific scene in response to a user pressing the power button of the electronic device includes: In response to a user pressing the power button of the electronic device, it is determined whether the scene in which the electronic device is located is a proximity light scene; wherein, the proximity light scene is a scene triggered when the screen of the electronic device is blocked while it is in a call state.
3. The method of claim 2, wherein, Determining whether the scene in which the electronic device is located is a near-light scene includes: Acquire a proximity light marker value, which is used to indicate whether the electronic device is in the proximity light scene; If the proximity light marker is a specified marker value, then the scene in which the electronic device is located is determined to be the proximity light scene.
4. The method of claim 2, wherein, Determining whether the scene in which the electronic device is located is a near-light scene includes: When the electronic device is in the call state, the proximity light parameters collected by the proximity light sensor are acquired; If the proximity light parameter is greater than a preset threshold, then the scene in which the electronic device is located is determined to be a proximity light scene.
5. The method of claim 1, wherein, The step of determining whether the scene in which the electronic device is located is a specific scene in response to a user pressing the power button of the electronic device includes: In response to a user pressing the power button of the electronic device, determine whether the current scenario of the electronic device is a combined press scenario, which is a scenario triggered by the user pressing the power button and other buttons simultaneously.
6. The method of claim 1, wherein, The step of determining whether the scene in which the electronic device is located is a specific scene in response to a user pressing the power button of the electronic device includes: In response to a user pressing the power button of the electronic device, determine whether the electronic device is in a voice wake-up scenario, wherein the voice wake-up scenario is a scenario in which the user long-presses the power button to trigger human-computer voice interaction.
7. The method of claim 6, wherein, Determining whether the scene in which the electronic device is located is a voice wake-up scene includes: When the voice wake-up mode of the electronic device is turned on, the duration of the press operation is obtained in response to the user pressing the power button of the electronic device. If the duration of the long press is greater than the first long press duration and less than the second long press duration, then the scenario in which the electronic device is located is determined to be the voice wake-up scenario; wherein, the second long press duration is greater than the first long press duration.
8. The method according to any one of claims 1 to 7, characterized in that, The pressing operation includes pressing down and releasing; If the scenario in which the electronic device is located is not the specific scenario, then the screen on / off fault detection operation is performed, including: If the scenario in which the electronic device is located is not the specific scenario, then it is determined whether the electronic device was in a screen-on state before receiving the press operation; If the screen is in the on state, the screen on / off fault detection operation is performed when the screen lift operation is received.
9. The method of claim 8, wherein, The method further includes: If the electronic device was in a screen-off state before receiving the press operation, the screen-on / off fault detection operation is executed directly.
10. The method according to any one of claims 1 to 7, characterized in that, The execution of the screen on / off fault detection operation includes: The first on / off state of the electronic device screen is obtained, and the first on / off state is the on / off state of the electronic device screen before the power button is pressed. The second on / off state of the electronic device screen is obtained. The second on / off state is the on / off state of the electronic device screen after a specified time has elapsed since the power button was pressed. If the first on / off state and the second on / off state are the same, then it is determined that the screen of the electronic device is malfunctioning.
11. An electronic device, comprising: include: 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, cause the electronic device to perform the following steps: In response to a user pressing the power button of the electronic device, it is determined whether the scene in which the electronic device is located is a specific scene. When the pressing operation is received in the specific scene, the on / off state of the screen of the electronic device does not change. If the electronic device is in the specific scenario, the screen on / off fault detection operation will not be performed; the specific scenario includes one or more of the following: proximity light scenario, combined press scenario, and voice wake-up scenario; wherein, the proximity light scenario is triggered when the screen of the electronic device is blocked while it is in a call state, the combined press scenario is triggered when the user presses the power button and other buttons at the same time, and the voice wake-up scenario is triggered when the user presses and holds the power button to trigger human-computer voice interaction; If the electronic device is not in the specific scenario, then the screen on / off fault detection operation is performed.
12. The apparatus of claim 11, wherein, When the computer program is executed by the one or more processors, the electronic device performs the following steps: In response to a user pressing the power button of the electronic device, it is determined whether the scene in which the electronic device is located is a proximity light scene; wherein, the proximity light scene is a scene triggered when the screen of the electronic device is blocked while it is in a call state.
13. The apparatus of claim 12, wherein, When the computer program is executed by the one or more processors, the electronic device performs the following steps: The electronic device acquires a proximity light marker value, which is used to indicate whether the electronic device is in the proximity light scene; If the proximity light marker is a specified marker value, then the scene in which the electronic device is located is determined to be the proximity light scene.
14. The apparatus of claim 12, wherein, When the computer program is executed by the one or more processors, the electronic device performs the following steps: When the electronic device is in the call state, the proximity light parameters collected by the proximity light sensor are acquired; If the proximity light parameter is greater than a preset threshold, then the scene in which the electronic device is located is determined to be a proximity light scene.
15. The apparatus of claim 11, wherein, When the computer program is executed by the one or more processors, the electronic device performs the following steps: In response to a user pressing the power button of the electronic device, determine whether the current scenario of the electronic device is a combined press scenario, which is a scenario triggered by the user pressing the power button and other buttons simultaneously.
16. The apparatus of claim 11, wherein, When the computer program is executed by the one or more processors, the electronic device performs the following steps: In response to a user pressing the power button of the electronic device, determine whether the electronic device is in a voice wake-up scenario, wherein the voice wake-up scenario is a scenario in which the user long-presses the power button to trigger human-computer voice interaction.
17. The apparatus of claim 16, wherein, When the computer program is executed by the one or more processors, the electronic device performs the following steps: When the voice wake-up mode of the electronic device is turned on, the duration of the press operation is obtained in response to the user pressing the power button of the electronic device. If the duration of the long press is greater than the first long press duration and less than the second long press duration, then the scenario in which the electronic device is located is determined to be the voice wake-up scenario; wherein, the second long press duration is greater than the first long press duration.
18. The apparatus of any one of claims 11 to 17, wherein, The pressing operation includes pressing down and releasing; 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 not the specific scenario, then it is determined whether the electronic device was in a screen-on state before receiving the press operation; If the screen is in the on state, the screen on / off fault detection operation is performed when the screen lift operation is received.
19. The apparatus of claim 18, wherein, When the computer program is executed by the one or more processors, the electronic device performs the following steps: If the electronic device was in a screen-off state before receiving the press operation, the screen-on / off fault detection operation is executed directly.
20. The apparatus of any one of claims 11 to 17, wherein, When the computer program is executed by the one or more processors, the electronic device performs the following steps: The first on / off state of the electronic device screen is obtained, and the first on / off state is the on / off state of the electronic device screen before the power button is pressed. The second on / off state of the electronic device screen is obtained. The second on / off state is the on / off state of the electronic device screen after a specified time has elapsed since the power button was pressed. If the first on / off state and the second on / off state are the same, then it is determined that the screen of the electronic device is malfunctioning.
21. A computer readable storage medium comprising a computer program, characterized in that, The computer program product comprises a computer program which, when executed by an electronic device, causes the electronic device to perform the fault detection method according to any one of claims 1-10.