CN117631798A - Fault processing method and device, electronic equipment and storage medium - Google Patents

Fault processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117631798A
CN117631798A CN202311458421.4A CN202311458421A CN117631798A CN 117631798 A CN117631798 A CN 117631798A CN 202311458421 A CN202311458421 A CN 202311458421A CN 117631798 A CN117631798 A CN 117631798A
Authority
CN
China
Prior art keywords
electronic device
electronic equipment
power consumption
fault
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311458421.4A
Other languages
Chinese (zh)
Inventor
占志全
薛海滨
刘均凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dianeng Technology Hangzhou Co ltd
Original Assignee
Dianeng Technology Hangzhou Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dianeng Technology Hangzhou Co ltd filed Critical Dianeng Technology Hangzhou Co ltd
Priority to CN202311458421.4A priority Critical patent/CN117631798A/en
Publication of CN117631798A publication Critical patent/CN117631798A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The application provides a fault processing method, a fault processing device, electronic equipment and a storage medium. The method comprises the following steps: acquiring voltage data and current data of the electronic equipment, and calculating the total power consumption of the electronic equipment according to the voltage data and the current data; determining the state of the electronic equipment, and determining a preset threshold corresponding to the state; and if the circuit fault of the electronic equipment is determined based on the total power consumption and the preset threshold value, executing a preset fault processing mechanism. With the method, whether the electronic device has a circuit fault caused by early degradation of the circuit or not can be accurately detected, and continuous degradation of the circuit fault is avoided.

Description

Fault processing method and device, electronic equipment and storage medium
Technical Field
The application belongs to the field of computers, and particularly relates to a fault processing method, a fault processing device, electronic equipment and a storage medium.
Background
Fuses are widely used for circuit protection in electronic devices, however, fuses tend to break the current of a power supply in the event of a serious circuit failure (e.g., a short circuit). This means that it is difficult for the fuse to detect a circuit failure problem early in the degradation of the circuit, resulting in continued operation of the degradation process of the circuit and ultimately more serious failure.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a failure processing method, apparatus, electronic device, and storage medium capable of solving the technical problem that it is difficult to detect a circuit failure at an early stage of deterioration of the circuit.
In one aspect, the present application provides a fault handling method, applied to an electronic device, where the method includes: and acquiring voltage data and current data of the electronic equipment, calculating total power consumption of the electronic equipment according to the voltage data and the current data, determining the state of the electronic equipment, determining a preset threshold corresponding to the state, and executing a preset fault processing mechanism if the electronic equipment is determined to have a circuit fault based on the total power consumption and the preset threshold.
In some embodiments of the present application, the method further comprises: and determining whether to execute the fault handling mechanism according to preset conditions.
In some embodiments of the present application, the determining whether to execute the fault handling mechanism according to a preset condition includes: and when the electronic equipment is in a power supply state or when the electronic equipment is in a charging state and the charging time of the electronic equipment is smaller than or equal to a preset value, the fault processing mechanism is not executed.
In some embodiments of the present application, the acquiring voltage data and current data of the electronic device includes: and reading the first voltage data and the first current data from an analog/digital converter of the electronic device, and reading the second voltage data and the second current data from a system management bus of the electronic device, wherein the analog/digital converter is connected with a power adapter, and the system management bus is connected with a battery in the electronic device.
In some embodiments of the present application, the calculating the total power consumption of the electronic device from the voltage data and the current data includes: and calculating first power consumption according to the first voltage data and the first current data, calculating second power consumption according to the second voltage data and the second current data, and calculating the total power consumption according to the first power consumption and the second power consumption.
In some embodiments of the present application, the fault handling mechanism includes: and sending a first preset instruction to a charging chip of the electronic equipment, controlling the charging chip to disconnect a power path between the power adapter and the electronic equipment, and sending a second preset instruction to the battery, and controlling the battery to stop supplying power to the electronic equipment.
In some embodiments of the present application, a method of determining whether a circuit failure has occurred in an electronic device includes: and if the total power consumption is larger than the preset threshold, determining that the electronic equipment has circuit faults, or if the total power consumption is smaller than or equal to the preset threshold, determining that the electronic equipment has no circuit faults.
In another aspect, the present application provides a fault handling apparatus, operating in an electronic device, the apparatus comprising: the device comprises an acquisition unit, a calculation unit, a determination unit and a control unit, wherein the acquisition unit is used for acquiring voltage data and current data of the electronic equipment, the calculation unit is used for calculating the total power consumption of the electronic equipment according to the voltage data and the current data, and the determination unit is used for determining the state of the electronic equipment and determining a preset threshold corresponding to the state;
and the execution unit is used for executing a preset fault processing mechanism if the electronic equipment is determined to have a circuit fault based on the total power consumption and the preset threshold value.
In another aspect, the present application provides an electronic device, including: a memory storing at least one instruction; and a processor executing at least one instruction to implement the fault handling method.
In another aspect, the present application provides a computer-readable storage medium having stored therein at least one instruction for execution by a processor in an electronic device to implement the fault handling method.
According to the embodiment, each state of the electronic device corresponds to a preset threshold, and because the preset threshold corresponding to each state is determined by the power consumption corresponding to the circuit without faults and the power consumption corresponding to the circuit with faults, whether the electronic device in each state has the circuit faults or not can be accurately measured by the preset threshold. Because the total power consumption of the electronic equipment can reflect the operation condition of the circuit in the electronic equipment, whether the electronic equipment has a circuit fault caused by early degradation of the circuit can be accurately detected through the total power consumption and a preset threshold value. When the electronic equipment is determined to have a circuit fault, a fault processing mechanism is executed, and the power supply of the circuit in the electronic equipment is cut off by the fault processing mechanism, so that the operation of the circuit is interrupted, and the continuous degradation of the circuit fault can be avoided while a user is warned.
Drawings
Fig. 1 is a schematic diagram of an electronic device according to an embodiment of the present application.
Fig. 2 is a flowchart of a fault handling method according to an embodiment of the present application.
Fig. 3 is a flowchart of a circuit fault judging method according to an embodiment of the present application.
Fig. 4 is a functional block diagram of a fault handling apparatus according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in detail below with reference to the accompanying drawings and specific embodiments.
It should be noted that "at least one" in this application means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and the representation may have three relationships, for example, a and/or B may represent: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The terms "first," "second," "third," "fourth" and the like in the description and in the claims and drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
In the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as examples, illustrations, or descriptions. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
Fuses are widely used for circuit protection in electronic devices, however, fuses tend to break the current of a power supply in the event of a serious circuit failure (e.g., a short circuit). This means that it is difficult for the fuse to detect a circuit failure problem early in the degradation of the circuit, resulting in continued operation of the degradation process of the circuit and ultimately more serious failure.
In order to solve the technical problems, the application provides a fault processing method, a device, an electronic device and a storage medium, which can accurately detect whether the electronic device has a circuit fault caused by early degradation of a circuit or not and avoid continuous degradation of the circuit fault. The fault processing method provided by the embodiment of the application can be applied to one or more electronic devices.
An electronic device is a device capable of automatically performing parameter value calculation and/or information processing according to a preset or stored instruction, and its hardware includes, but is not limited to: microprocessors, application specific integrated circuits (ApplicationSpecificIntegratedCircuit, ASIC), programmable gate arrays (Field-ProgrammableGateArray, FPGA), digital signal processors (DigitalSignalProcessor, DSP), embedded devices, and the like.
Fig. 1 is a schematic diagram of an electronic device according to an embodiment of the present application. The electronic device 10 in fig. 1 is a notebook computer, which is merely an example, and the practical application is not limited thereto. For example, the electronic device may be any electronic device that can perform man-machine interaction with a user, such as a mobile phone, a computer, a tablet computer, an industrial personal computer, a refrigerator, and an air conditioner.
The electronic device may also include a network device and/or a user device. Network devices include, but are not limited to, a single network server, a server group of multiple network servers, or a cloud of numerous hosts or network servers based on cloud computing (CloudComputing). The network on which the electronic device is located includes, but is not limited to: the internet, wide area network, metropolitan area network, local area network, virtual private network (VirtualPrivateNetwork, VPN), etc., the specific type of electronic device is not limited in this embodiment.
As shown in fig. 2, a flowchart of a fault handling method according to an embodiment of the present application is provided. The sequence of the steps in the flowchart may be adjusted according to actual requirements, and some steps may be omitted. The main execution body of the fault handling method is an electronic device, such as the electronic device 10 shown in fig. 1.
S11, acquiring voltage data and current data of the electronic equipment.
In some embodiments of the present application, the electronic device may obtain the voltage data and the current data in a variety of ways. For example, an electronic device may read first voltage data and first current data from an Analog-to-digital converter (Analog-to-DigitalConverter, ADC) and second voltage data and second current data from a system management bus (SystemManagementBus, SMBus) of the electronic device. The analog/digital converter is connected to a power adapter (PowerAdapter), and is used for converting an analog signal (such as a voltage signal or a current signal) input by the power adapter into a digital signal capable of being recognized by an electronic device. The system management bus is a two-wire interface and is used for managing and monitoring communication among internal components of the electronic equipment, the system management bus is connected with a battery in the electronic equipment, and the battery in the electronic equipment determines whether to supply power for the electronic equipment or not by reading instructions of the system management bus.
In some embodiments of the present application, the electronic device may use the first voltage data and/or the second voltage data as voltage data of the electronic device, and use the first current data and/or the second current data as current data of the electronic device.
In this embodiment, when the circuit in the electronic device is degraded to cause a circuit failure, the power consumption of the electronic device exceeds a preset threshold, so that current data and voltage data of the electronic device are obtained, which provides a basis for calculating the power consumption of the electronic device subsequently.
S12, calculating the total power consumption of the electronic equipment according to the voltage data and the current data.
In an embodiment of the present application, if the electronic device uses the first voltage data and the second voltage data as voltage data of the electronic device and uses the first current data and the second current data as current data of the electronic device, the electronic device may calculate the first power consumption according to the first voltage data and the first current data, calculate the second power consumption according to the second voltage data and the second current data, and calculate the total power consumption according to the first power consumption and the second power consumption.
The electronic device determines a product between the first voltage data and the first current data as first power consumption, a product between the second voltage data and the second current data as second power consumption, and a sum between the first power consumption and the second power consumption as total power consumption.
In other embodiments of the present application, if the electronic device uses the first voltage data or the second voltage data as voltage data of the electronic device and uses the first current data or the second current data as current data of the electronic device, the electronic device may determine the first power consumption calculated from the first voltage data and the first current data as the total power consumption, or determine the second power consumption calculated from the second voltage data and the second current data as the total power consumption.
In this embodiment, since the total power consumption of the electronic device can reflect the operation condition of the circuit in the electronic device, a basis is provided for determining whether the electronic device has a circuit failure by calculating the total power consumption of the electronic device.
In other embodiments of the present application, the electronic device may calculate the total power consumption of the electronic device in other ways, which is not limited by the present application. For example, the electronic device may calculate the total power consumption of the electronic device based on the current data and the resistance data of the electronic device.
S13, determining the state of the electronic equipment, and determining a preset threshold corresponding to the state.
In some embodiments of the present application, the status of the electronic device includes, but is not limited to: sleep state, off state, restart state, running state, flight mode, etc. The electronic device may determine the state of the electronic device by reading system information of the electronic device and state information of underlying hardware. The system information includes, but is not limited to: system log information, system version information, network connection information, system performance information, application information, and the like.
For example, the system log information includes information such as an operating system log, an application log, and a security log, the system version information includes information such as an operating system version, a patch version, and a function version, the network connection information network interface card status, and network connection configuration information, and the system performance information includes information such as a startup time of the operating system, a hard disk usage, a memory usage, and a usage rate of the central processing unit (CentralProcessingUnit, CPU), and the application information includes information such as an installed application, an running application, and a started service. Underlying hardware includes, but is not limited to: hard disk, memory, CPU, display card, network card and main board. Status information of underlying hardware includes, but is not limited to: memory usage, hard disk read-write speed CPU usage and temperature.
For example, if the network connection information of the electronic device indicates that the electronic device is not connected to the network, and the CPU usage rate of the electronic device is zero in the system performance information, it may be determined that the electronic device is in a sleep state. Or if the network connection information shows that the electronic equipment has network connection, and meanwhile, the CPU utilization rate of the electronic equipment in the system performance information is larger than a preset configuration value, and the electronic equipment is determined to be in an operation state. The preset configuration value may be set by itself, which is not limited in this application. For example, the preset configuration value may be 80%.
In some embodiments of the present application, each state corresponds to a preset threshold, and the preset threshold corresponding to each state may be obtained by testing a failed circuit. For example, if it is detected that the power consumed by the circuit in which no fault occurs is 150 watts (W), the power consumed by the circuit in which the fault occurs is 155 watts, and thus any value between 150 watts and 155 watts may be determined as the preset threshold corresponding to the operation state. Alternatively, if it is detected that the power consumed by the circuit in which no fault has occurred is 15 watts (W), the power consumed by the circuit in which the fault has occurred is 17 watts, and therefore any value between 15 watts and 17 watts may be determined as the preset threshold value corresponding to the sleep state.
In other embodiments of the present application, the preset threshold corresponding to each state may be set by itself, which is not limited in this application.
In this embodiment, different preset thresholds corresponding to different states are flexibly configured, so that the fault processing method in the embodiment of the present application can adapt to more scenes. Because the preset threshold value corresponding to each state is determined by the power consumption corresponding to the circuit without faults and the power consumption corresponding to the circuit with faults, the preset threshold value can accurately measure whether the electronic equipment in each state has the circuit faults caused by early degradation, and therefore the reliability of determining the circuit faults can be improved.
And S14, if the electronic equipment is determined to have a circuit fault based on the total power consumption and a preset threshold value, executing a preset fault processing mechanism.
In some embodiments of the present application, the electronic device may compare the total power consumption with a preset threshold value to obtain a comparison result, and determine whether the electronic device has a circuit failure according to the comparison result.
In some embodiments of the present application, an electronic device includes a motherboard and a charging chip, the charging chip is on the motherboard, and a fault handling mechanism includes: the electronic equipment sends a first preset instruction to a charging chip of the electronic equipment, controls the charging chip to disconnect a power path between the power adapter and the electronic equipment, and sends a second preset instruction to a battery of the electronic equipment, and controls the battery to stop supplying power to the electronic equipment.
The first preset instruction and the second preset instruction can be set by themselves, which is not limited in this application.
In this embodiment, whether the electronic device has a circuit failure due to early degradation of the circuit can be accurately detected by the total power consumption and the preset threshold. When the electronic equipment is determined to have a circuit fault, a fault processing mechanism is executed, and the power supply of the circuit in the electronic equipment is cut off by the fault processing mechanism, so that the operation of the circuit is interrupted, and the continuous degradation of the circuit fault can be avoided while a user is warned.
In other embodiments of the present application, if it is determined that the electronic device has not failed in the circuit based on the total power consumption and the preset threshold, the electronic device does not execute the failure handling mechanism.
In other embodiments of the present application, since power consumption of the electronic device exceeds a preset threshold when the electronic device is in some specific states (for example, the electronic device is in a just-charged state and a power-supplied state), before executing the fault handling mechanism, it may be detected whether the electronic device is in a specific state, including: the electronic device excludes a case where power consumption exceeds a preset threshold value due to the electronic device being in a specific state according to a preset condition, thereby determining whether to execute the fault handling mechanism. The preset conditions can be set by themselves, and the application is not limited to the preset conditions.
For example, if the electronic device is in a power supply state, the fault handling mechanism is not executed, where the power supply state is that the electronic device supplies power to other devices (such as a mobile phone). Or if the electronic device is in a charging state and the charging time of the electronic device is less than or equal to a preset value (just-charged state), the fault handling mechanism is not executed. Or when the electronic device is in a charging state and the charging time of the electronic device is greater than a preset value, executing a fault handling mechanism. The preset value may be set by itself, which is not limited in this application, for example, the preset value may be 2s. The examples of the preset conditions are only examples, and the practical situation is not limited thereto.
The step of detecting whether the electronic device is in a specific state is an optional step. The electronic equipment can provide a man-machine interaction interface, and if an opening instruction triggered by a preset button on the man-machine interaction interface is received, the step of detecting whether the electronic equipment is in a specific state is executed. If the opening instruction triggered by the user on the preset button is not received, or if the closing instruction triggered by the user on the preset button is received, the step of detecting whether the electronic equipment is in a specific state is not executed.
In this embodiment, since the preset conditions can be set by themselves, the flexibility of detection can be improved. By detecting whether the electronic equipment is in a specific state, the situation that the power consumption caused by the fact that the electronic equipment is in the specific state exceeds a preset threshold value and misjudgment is avoided, and therefore the accuracy of determining the circuit faults can be improved.
In some embodiments of the present application, the electronic device may execute the above-described fault handling method (steps S11 to S14) at intervals of a preset time, where the preset time may be set by itself, which is not limited in this application. For example, the preset time may be 3 hours.
According to the embodiment, each state of the electronic device corresponds to a preset threshold, and because the preset threshold corresponding to each state is determined by the power consumption corresponding to the circuit without faults and the power consumption corresponding to the circuit with faults, whether the electronic device in each state has the circuit faults or not can be accurately measured by the preset threshold. Because the total power consumption of the electronic equipment can reflect the operation condition of the circuit in the electronic equipment, whether the electronic equipment has a circuit fault caused by early degradation of the circuit can be accurately detected through the total power consumption and a preset threshold value. When the electronic equipment is determined to have a circuit fault, a fault processing mechanism is executed, and the power supply of the circuit in the electronic equipment is cut off by the fault processing mechanism, so that the operation of the circuit is interrupted, and the continuous degradation of the circuit fault can be avoided while a user is warned.
In some embodiments of the present application, as shown in fig. 3, a flowchart of a circuit fault judging method provided in an embodiment of the present application specifically includes the following steps:
s141, judging whether the total power consumption is larger than a preset threshold value.
In this embodiment, if the total power consumption is greater than the preset threshold, step S142 is performed, or alternatively. If the total power consumption is less than or equal to the preset threshold, step S143 is performed.
And S142, determining that the electronic equipment has circuit faults.
In this embodiment, since the preset threshold value corresponding to each state is obtained by testing the circuit in the early degradation stage, the preset threshold value can accurately measure whether the electronic device in each state has a circuit failure. And when the total power consumption is larger than a preset threshold value, the total power consumption of the electronic equipment is abnormal, so that the electronic equipment is determined to have circuit faults.
And S143, determining that the electronic equipment has no circuit fault.
In this embodiment, when the total power consumption is less than or equal to the preset threshold, it is indicated that no abnormality occurs in the total power consumption of the electronic device, and therefore it is determined that no circuit failure occurs in the electronic device.
Fig. 4 is a functional block diagram of a fault handling apparatus according to an embodiment of the present application. The failure processing apparatus 11 includes an acquisition unit 110, a calculation unit 111, a determination unit 112, and an execution unit 113. The module/unit referred to herein is a series of computer readable instructions capable of being fetched by the processor 103 in fig. 5 and performing a fixed function, which are stored in the memory 102 in fig. 5. In the present embodiment, the functions of the respective modules/units will be described in detail in the following embodiments.
The acquiring unit 110 is configured to acquire voltage data and current data of the electronic device.
In some embodiments of the present application, the obtaining unit 110 is further configured to read the first voltage data and the first current data from an analog/digital converter of the electronic device, and read the second voltage data and the second current data from a system management bus of the electronic device, where the analog/digital converter is connected to the power adapter, and the system management bus is connected to a battery in the electronic device.
The calculating unit 111 is configured to calculate the total power consumption of the electronic device according to the voltage data and the current data.
In some embodiments of the present application, the calculating unit 111 is further configured to calculate a first power consumption according to the first voltage data and the first current data, calculate a second power consumption according to the second voltage data and the second current data, and calculate a total power consumption according to the first power consumption and the second power consumption.
And the determining unit 112 is configured to determine a state of the electronic device, and determine a preset threshold corresponding to the state.
In some embodiments of the present application, the determining unit 112 is further configured to determine that the electronic device has a circuit failure if the total power consumption is greater than a preset threshold, or determine that the electronic device has not had a circuit failure if the total power consumption is less than or equal to the preset threshold.
In some embodiments of the present application, the determining unit 112 is further configured to determine whether to execute the fault handling mechanism according to a preset condition.
The execution unit 113 is configured to execute a preset fault handling mechanism if it is determined that the electronic device has a circuit fault based on the total power consumption and a preset threshold.
In some embodiments of the present application, the execution unit 113 is further configured to send a first preset instruction to a charging chip of the electronic device, control the charging chip to disconnect a power path between the power adapter and the electronic device, and send a second preset instruction to the battery, and control the battery to stop supplying power to the electronic device.
In some embodiments of the present application, the execution unit 113 is further configured to not execute the fault handling mechanism when the electronic device is in a power supply state, or when the electronic device is in a charging state and the charging time of the electronic device is less than or equal to a preset value.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. In fig. 5, the electronic device 10 may include a communication module 101, a memory 102, a processor 103, an Input/Output (I/O) interface 104, and a bus 105. The processor 103 is coupled to the communication module 101, the memory 102, and the input/output interface 104 via the bus 105, respectively.
The communication module 101 may include a wired communication module and/or a wireless communication module. The wired communication module may provide one or more of a Universal Serial Bus (USB), a controller area network bus (CAN, controllerAreaNetwork), etc. wired communication solution. The wireless communication module may provide one or more of wireless communication solutions such as wireless fidelity (Wi-Fi), bluetooth (BT), mobile communication networks, frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like.
The memory 102 may include one or more Random Access Memories (RAMs) and one or more non-volatile memories (NVM). The random access memory may be directly readable and writable by the processor 103, may be used for storing or other executable programs (e.g. machine instructions) of the program in operation, may also be used for storing data of users and applications, etc. The random access memory may include a static random-access memory (SRAM), a Dynamic Random Access Memory (DRAM), a Synchronous Dynamic Random Access Memory (SDRAM), a double data rate synchronous dynamic random access memory (ddr SDRAM), and the like.
The nonvolatile memory may store executable programs, store data of users and applications, and the like, and may be loaded into the random access memory in advance for the processor 110 to directly read and write. The nonvolatile memory may include a disk storage device, a flash memory (flash memory).
The memory 102 is used to store one or more computer programs. One or more computer programs are configured to be executed by the processor 103. The one or more computer programs include a plurality of instructions that when executed by the processor 103, implement the fault handling method executing on the electronic device 10.
In other embodiments, the electronic device 10 as shown in fig. 5 further includes an external memory interface for connecting to an external memory to enable expansion of the memory capabilities of the electronic device 10.
The processor 103 may include one or more processing units, such as: the processor 103 may include an Application Processor (AP), a modem processor, a Graphics Processor (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), and/or a neural-Network Processor (NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The processor 103 provides computing and control capabilities, for example, the processor 103 is configured to execute computer programs stored in the memory 102 to implement the fault handling methods described above.
The input/output interface 104 is used to provide a channel for user input or output, for example, the input/output interface 104 may be used to connect various input/output devices, such as a mouse, keyboard, touch device, display screen, etc., so that a user may enter information, or visualize information.
The bus 105 is used at least to provide a channel for communication between the communication module 101, the memory 102, the processor 103, and the input/output interface 104 in the electronic device 10.
The embodiments of the present application further provide a computer readable storage medium, where a computer program is stored, where the computer program includes program instructions, and a method implemented when the program instructions are executed may refer to a method in each of the foregoing embodiments of the present application. The computer readable storage medium may be an internal memory of the electronic device according to the above embodiment, for example, a hard disk or a memory of the electronic device. The computer readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash memory card (FlashCard), etc. provided on the electronic device.
In some embodiments, the computer readable storage medium may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc.
It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other manners. For example, the apparatus/electronic device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A fault handling method for an electronic device, the method comprising:
acquiring voltage data and current data of the electronic equipment, and calculating the total power consumption of the electronic equipment according to the voltage data and the current data;
determining the state of the electronic equipment, and determining a preset threshold corresponding to the state;
and if the circuit fault of the electronic equipment is determined based on the total power consumption and the preset threshold value, executing a preset fault processing mechanism.
2. The fault handling method of claim 1, wherein the method further comprises:
and determining whether to execute the fault handling mechanism according to preset conditions.
3. The fault handling method of claim 2, wherein the determining whether to execute the fault handling mechanism based on a preset condition comprises:
and when the electronic equipment is in a power supply state or when the electronic equipment is in a charging state and the charging time of the electronic equipment is smaller than or equal to a preset value, the fault processing mechanism is not executed.
4. The fault handling method of claim 1, wherein the obtaining voltage data and current data of the electronic device comprises:
and reading the first voltage data and the first current data from an analog/digital converter of the electronic device, and reading the second voltage data and the second current data from a system management bus of the electronic device, wherein the analog/digital converter is connected with a power adapter, and the system management bus is connected with a battery in the electronic device.
5. The fault handling method of claim 4, wherein the calculating the total power consumption of the electronic device from the voltage data and the current data comprises:
calculating first power consumption according to the first voltage data and the first current data, and calculating second power consumption according to the second voltage data and the second current data;
and calculating the total power consumption according to the first power consumption and the second power consumption.
6. The fault handling method of claim 4, wherein the fault handling mechanism comprises:
and sending a first preset instruction to a charging chip of the electronic equipment, controlling the charging chip to disconnect a power path between the power adapter and the electronic equipment, and sending a second preset instruction to the battery, and controlling the battery to stop supplying power to the electronic equipment.
7. The fault handling method of claim 1, wherein the method of determining whether the electronic device has a circuit fault comprises:
if the total power consumption is larger than the preset threshold value, determining that the electronic equipment has circuit faults; or if the total power consumption is smaller than or equal to the preset threshold value, determining that the electronic equipment has no circuit fault.
8. A fault handling apparatus for operation with an electronic device, the apparatus comprising:
the acquisition unit is used for acquiring voltage data and current data of the electronic equipment;
a calculating unit, configured to calculate total power consumption of the electronic device according to the voltage data and the current data;
the determining unit is used for determining the state of the electronic equipment and determining a preset threshold corresponding to the state;
and the execution unit is used for executing a preset fault processing mechanism if the electronic equipment is determined to have a circuit fault based on the total power consumption and the preset threshold value.
9. An electronic device, the electronic device comprising:
a memory storing at least one instruction; and
A processor executing the at least one instruction to implement the fault handling method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized by: the computer readable storage medium having stored therein at least one instruction which when executed by a processor in an electronic device implements the fault handling method of any of claims 1 to 7.
CN202311458421.4A 2023-11-02 2023-11-02 Fault processing method and device, electronic equipment and storage medium Pending CN117631798A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311458421.4A CN117631798A (en) 2023-11-02 2023-11-02 Fault processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311458421.4A CN117631798A (en) 2023-11-02 2023-11-02 Fault processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117631798A true CN117631798A (en) 2024-03-01

Family

ID=90034710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311458421.4A Pending CN117631798A (en) 2023-11-02 2023-11-02 Fault processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117631798A (en)

Similar Documents

Publication Publication Date Title
TWI530790B (en) System boot code recovery method, computing system, and controller for use in a system
US9927853B2 (en) System and method for predicting and mitigating corrosion in an information handling system
CN107665308B (en) TPCM system for building and maintaining trusted operating environment and corresponding method
JP2017224272A (en) Hardware failure recovery system
US20120166605A1 (en) Remote Management Systems and Methods for Servers
WO2023115999A1 (en) Device state monitoring method, apparatus, and device, and computer-readable storage medium
US20150113309A1 (en) Rogue Hardware Detection Through Power Monitoring
CN110457907B (en) Firmware program detection method and device
US11340684B2 (en) System and method for predictive battery power management
JP2020053017A (en) System and method for hybrid power source
US20140013428A1 (en) Apparatus and method for managing operation of a mobile device
CN105739668A (en) Power management method and power management system of notebook computers
US20160350538A1 (en) Embedded controller for safety booting and method thereof
EP3528125B1 (en) Power supply unit fan recovery process
CN115617550A (en) Processing device, control unit, electronic device, method, and computer program
CN111949320A (en) Method, system and server for providing system data
CN113918953A (en) Trusted server security control device and method and trusted server
US11640377B2 (en) Event-based generation of context-aware telemetry reports
CN111198832B (en) Processing method and electronic equipment
CN112328442A (en) Radiator detection method and device and computer readable storage medium
US10732691B2 (en) Apparatus, systems and methods for detecting electrical failures within computing devices
CN117631798A (en) Fault processing method and device, electronic equipment and storage medium
CN115728665A (en) Power failure detection circuit, method and system
US9013207B2 (en) Method and apparatus for chip self deactivation
CN111880945B (en) Shared device information processing method, system, device, computer and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination