Method for reporting charging disconnection event of charger and electronic equipment

By implementing the delay reporting strategy for charger disconnection events in a laptop, the frequent discharging problem is solved, the user experience is improved, and the user does not perceive a short-term charging interruption.

CN119231673APending Publication Date: 2024-12-31HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310801329.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-30
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

When laptops are frequently plugged into chargers, they may have repeated discharging, resulting in a reduced user experience.

Method used

Provide a method for reporting charger disconnection charging events. By detecting whether the charger is in the fault list, a delay reporting strategy is adopted. When the charger is disconnected and does not recover within the first time interval, the disconnection event is reported to avoid A brief interruption triggers a user interface change.

Benefits of technology

It improves users' experience of electronic devices, avoids user perception problems caused by temporary charging, and enhances the stability and user satisfaction of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119231673A_ABST
    Figure CN119231673A_ABST
Patent Text Reader

Abstract

The invention provides a method for reporting a charging disconnection event of a charger and electronic equipment, and relates to the technical field of computers. The method comprises the steps that when it is detected that a charger is in place, whether the charger is in a charger fault list or not is determined; if yes, a delay report instruction is issued to an embedded controller EC, so that when the EC detects that the charger disconnects charging and restores charging within a first time interval, the EC does not report a charging disconnection event of the charger, and when the EC detects that the charger disconnects charging and does not restores charging within the first time interval, the EC does not report a charging disconnection event of the charger. And reporting a charger disconnection charging event. By using the method, the change of the user interface of the electronic equipment cannot be triggered by the charging disconnection event, so that a user cannot perceive short charging disconnection, and the use experience of the electronic equipment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method for reporting a charger disconnection event and an electronic device. Background Art

[0002] As a productivity tool and entertainment and leisure tool, laptops can provide users with a good experience. Especially in mobile office scenarios, the demand for using laptops is increasing.

[0003] When frequently plugging in a charger to charge a laptop, the charger and the laptop may be disconnected repeatedly. Specifically, although the charger and the laptop remain connected, the laptop will first display that the charger is disconnected, and then display that the charger is reconnected after a short delay. The above process may occur repeatedly and be perceived by the user, reducing the user experience. Summary of the invention

[0004] In order to solve the above problems, the present application provides a method for reporting a charger disconnection charging event and an electronic device, which can improve the user experience of a laptop computer.

[0005] In a first aspect, the present application provides a method for reporting a charger disconnection event, which is applied to an electronic device, for example, a laptop computer, and includes: when it is detected that a charger is in place, determining whether the charger is in a charger fault list; if so, sending a delayed reporting instruction to an embedded controller EC, so that when the EC detects that the charger is disconnected from charging and charging is resumed within a first time interval, the charger disconnection event is not reported; when the EC detects that the charger is disconnected from charging and charging is not resumed within the first time interval, the charger disconnection event is reported.

[0006] By using the technical solution provided by the present application, a delayed reporting strategy for the charger disconnection charging event is implemented, that is, when the charger is detected to be disconnected and normal charging is not restored within the first time interval, it is determined that the charger is indeed disconnected at this time, rather than a short disconnection, and then the charger disconnection charging event is reported. When the charger is detected to be disconnected and normal charging is restored within the first time interval, it is characterized that the charger disconnection at this time is instantaneous, which may be due to a jump in the charging current or a short disconnection caused by a large peak power consumption of the electronic device. At this time, the charger disconnection charging event is not reported, so that the electronic device will not be triggered by the disconnection charging event to change the user interface, and the user will not perceive the short disconnection, which can improve the user experience of the electronic device.

[0007] In a possible implementation, when it is detected that a charger is in place, determining whether the charger is in a charger fault list specifically includes: when it is detected that a charger is in place, obtaining the maximum output power of the charger; querying in the charger fault list whether there is a maximum charging power of a faulty charger that is the same as the maximum charging power of the charger; if so, determining that the charger is in the charger fault list, otherwise determining that the charger is not in the charger fault list.

[0008] In a possible implementation, when it is detected that a charger is in place, determining whether the charger is in a charger fault list specifically includes: when it is detected that a charger is in place, obtaining the model of the charger; querying in the charger fault list whether the model of the faulty charger is the same as the model of the charger; if so, determining that the charger is in the charger fault list, otherwise determining that the charger is not in the charger fault list. In a possible implementation, when it is detected that a charger is in place, determining whether the charger is in a charger fault list specifically includes: when it is detected that a charger is in place, obtaining the model of the charger and the maximum output power of the charger; determining in the charger fault list whether the maximum charging power of the faulty charger is the same as the maximum output power of the charger, and the model of the faulty charger is the same as the model of the charger; if so, determining that the charger is in the charger fault list, otherwise determining that the charger is not in the charger fault list.

[0009] In a possible implementation manner, the sending a delayed reporting instruction to the embedded controller EC specifically includes: sending a delayed reporting instruction to the EC, wherein the event reporting flag bit included in the delayed reporting instruction is a first value.

[0010] In a possible implementation, the EC pre-stores the first time interval, and when the EC detects that the charger is disconnected from charging and resumes charging within the first time interval, the charger disconnection event is not reported, specifically including: when the EC detects that the charger is disconnected from charging, the timer is started, and the timing length of the timer is the first time interval; when the charger is detected to resume charging before the timer ends, the timer is interrupted, and the reporting of the charger disconnection event is not triggered. When the EC detects that the charger is disconnected from charging and does not resume charging within the first time interval, the charger disconnection event is reported, specifically including: when the EC detects that the charger is disconnected from charging, the timer is started, and the timing length of the timer is the first time interval; when the timer ends and the charger is not detected to resume charging, the charger disconnection event is reported.

[0011] In a possible implementation, sending a delayed reporting instruction to the embedded controller EC specifically includes: sending a delayed reporting instruction to the EC, the event reporting flag bit included in the delayed reporting instruction is a first value, and the delayed reporting instruction also includes the first time interval; the EC obtains the first time interval from the delayed reporting instruction and saves the first time interval.

[0012] In a possible implementation, when the EC detects that the charger is disconnected from charging and does not resume charging within a first time interval, the event of the charger disconnecting from charging is not reported, specifically including: when the EC detects that the charger is disconnected from charging, starting a timer, the timing length of the timer is the first time interval; when the charger is detected to resume charging before the timer ends, interrupting the timer, and not triggering reporting of the event of the charger disconnecting from charging. When the EC detects that the charger is disconnected from charging and does not resume charging within the first time interval, the event of the charger disconnecting from charging is reported, specifically including: when the EC detects that the charger is disconnected from charging, starting a timer, the timing length of the timer is the first time interval; when the timer ends and the charger is not detected to resume charging, reporting the event of the charger disconnecting from charging.

[0013] In a possible implementation, when it is determined that the charger is not in the charger fault list, the method further includes: sending a clear delay reporting instruction to the EC, wherein the clear delay reporting instruction includes an event reporting flag bit having a second value.

[0014] In a possible implementation, after reporting the charger disconnection event, the method further includes: triggering the charging status icon on the operating system interface to switch to a battery icon

[0015] In a possible implementation manner, the method further includes: updating the charger fault list according to a preset period.

[0016] In a second aspect, the present application also provides an electronic device, which includes: an embedded controller EC and at least one Type-C interface, the electronic device running a charging event management program; the Type-C interface is used to connect a charger; the charging event management program is used to determine whether the currently in-place charger is in a charger fault list; if so, a delayed reporting instruction is sent to the EC; the EC is used to determine whether the charger is in place, and after receiving the delayed reporting instruction sent by the charging event management program, when it is detected that the charger is disconnected from charging and charging is resumed within a first time interval, the charger disconnection charging event is not reported, and when it is detected that the charger is disconnected from charging and charging is not resumed within the first time interval, the charger disconnection charging event is reported.

[0017] The electronic device and the charger can be quickly charged through the PD protocol, and the maximum charging power of the charger currently used by the electronic device can be less than or equal to the charging power supported by the electronic device.

[0018] In a possible implementation, the EC is specifically used to obtain the maximum output power of the charger and report it to the charging event management program when it is detected that a charger is in place; the charging event management program is specifically used to query in the charger fault list whether there is a maximum charging power of the faulty charger that is the same as the maximum charging power of the charger; if so, it is determined that the charger is in the charger fault list, otherwise it is determined that the charger is not in the charger fault list.

[0019] In a possible implementation, the EC is specifically configured to obtain the model of the charger and report it to the charging event management program when detecting that a charger is in place. The charging event management program is specifically configured to query in the charger fault list whether the model of the faulty charger is the same as the model of the charger; if so, determine that the charger is in the charger fault list; otherwise, determine that the charger is not in the charger fault list.

[0020] In a possible implementation, the EC is specifically used to obtain the model of the charger and the maximum output power of the charger when it is detected that a charger is in place, and report the model of the charger and the maximum output power of the charger to the charging event management program; the charging event management program is specifically used to determine whether there is a maximum charging power of a faulty charger in the charger fault list that is the same as the maximum output power of the charger, and the model of the faulty charger is the same as the model of the charger; if so, it is determined that the charger is in the charger fault list, otherwise it is determined that the charger is not in the charger fault list.

[0021] In a possible implementation manner, the charging event management program is specifically configured to send a delayed reporting instruction to the EC, and the event reporting flag bit included in the delayed reporting instruction is a first value.

[0022] In a possible implementation manner, the EC pre-stores the first time interval; and the EC is specifically configured to:

[0023] When the EC detects that the charger is disconnected from charging, the timer is started, and the timing length of the timer is the first time interval; when the charger is detected to resume charging before the timer expires, the timer is interrupted, and no reporting of the charger disconnection event is triggered; and when the EC detects that the charger is disconnected from charging, the timer is started, and the timing length of the timer is the first time interval; when the timer expires and the charger is not detected to resume charging, the charger disconnection event is reported.

[0024] In a possible implementation, the charging event management program is specifically used to send a delayed reporting instruction to the EC, the event reporting flag bit included in the delayed reporting instruction is a first value, and the delayed reporting instruction also includes the first time interval; the EC is also used to obtain and save the first time interval from the delayed reporting instruction.

[0025] In a possible implementation, the EC is specifically configured to: when the EC detects that the charger is disconnected from charging, start a timer, the timing length of the timer being the first time interval; when the charger is detected to resume charging before the timer expires, interrupt the timer, and do not trigger reporting of a charger disconnection event; and, when the EC detects that the charger is disconnected from charging, start a timer, the timing length of the timer being the first time interval; when the timer expires and the charger is not detected to resume charging, report a charger disconnection event.

[0026] In a possible implementation, the charging event management program is further configured to, when it is determined that the charger is not in the charger fault list, send a clear delay reporting instruction to the EC, wherein the event reporting flag bit included in the clear delay reporting instruction is a second value.

[0027] In a possible implementation, the EC is specifically used to report the charger disconnection event to the power management service of the electronic device. Upon receiving the reported charger disconnection event, the power management service triggers the charging status icon of the operating system interface of the electronic device to switch to a battery icon.

[0028] In a possible implementation, the EC is specifically used to report the charger disconnection charging event to the charging event management program. The charging event management program is specifically used to, upon receiving the charger disconnection charging event, notify the power management service of the electronic device that the current charger has been disconnected, so that the power management service triggers the charging status icon of the operating system interface of the electronic device to switch to a battery icon.

[0029] In a possible implementation manner, the charging event management program is further used to update the charger fault list according to a preset period.

[0030] In a possible implementation, the electronic device is a notebook computer. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A schematic diagram of an electronic device provided in an embodiment of the present application;

[0032] Figure 2 A schematic diagram of the principles provided for the embodiments of the present application;

[0033] Figure 3 Scenario diagram provided for the embodiment of the present application Figure 1 ;

[0034] Figure 4 Scenario diagram provided for the embodiment of the present application Figure 2 ;

[0035] Figure 5 Scenario diagram provided for the embodiment of the present application Figure 3 ;

[0036] Figure 6 A flowchart of a method for reporting a charger disconnection event provided in an embodiment of the present application;

[0037] Figure 7 A flowchart of another method for reporting a charger disconnection event provided in an embodiment of the present application;

[0038] Figure 8 A schematic diagram of an electronic device according to an embodiment of the present invention;

[0039] Fig. 9 A schematic diagram of the components of a charger disconnection charging event provided in an embodiment of the present application;

[0040] Fig.10 A flowchart of another method for reporting a charger disconnection event provided in an embodiment of the present application;

[0041] Fig.11 A flowchart of a method for reporting a charger disconnection event provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to make the technical personnel in this field understand the solution of this application more clearly, the application scenario of the technical solution of this application is first described below. The schematic diagram of the interface in the following description of this application is only for the convenience of understanding the technical solution, and does not constitute a limitation on the technical solution of this application. In actual application, the relevant interface can adopt other design methods.

[0043] The following takes a laptop computer as an example to explain the hardware structure of the electronic device.

[0044] See also Figure 1 , which is a schematic diagram of an electronic device provided in an embodiment of the present application.

[0045] The electronic device 10 may include a CPU 101, a Type-C interface 102, a power delivery (PD) module 103, an embedded controller (EC) 104, a battery 105, an internal memory 106, an external memory interface 107, a camera 108, an audio module 109, a display screen 110, a keyboard 111, a sensor module 112, an indicator 113, a wireless communication module 114 and an antenna group 115.

[0046] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 10. In other embodiments of the present application, the electronic device 10 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0047] CPU101 may include one or more processing units, for example, an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.

[0048] The Universal Serial Bus (USB) Type-C interface 102, hereinafter referred to as the Type-C interface, can be connected to the charger 20 to charge the electronic device 10, and can also be used to transmit data between the electronic device 10 and peripheral devices.

[0049] The Type-C interface 102 of the PC product supports the USB Power Delivery (PD) charging protocol. As the peak power of laptop computers increases, the charging power specifications of laptop chargers also increase. For example, the charger can output 65W, 100W or 135W of charging power.

[0050] The power delivery (PD) module 103 is used to charge the battery 105 using the PD protocol.

[0051] The embedded controller (EC) 104 is actually a single-chip microcomputer and can be used for power management, battery management, etc. in a notebook computer.

[0052] The battery 105 is used to supply power to the CPU 101 , the internal memory 106 , the display screen 110 , the camera 108 , the wireless communication module 114 and the like.

[0053] The internal memory 106 can be used to store computer executable program codes, which include instructions. The internal memory 106 can include a program storage area and a data storage area. The program storage area can store an operating system, an application required for at least one function, etc. The data storage area can store data created during the use of the electronic device 10.

[0054] The external memory interface 107 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 10. The external memory card communicates with the CPU 101 via the external memory interface 107.

[0055] The camera 108 is used to capture still images or videos.

[0056] The audio module 109 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 109 can also be used to encode and decode audio signals.

[0057] The display screen 110 is used to display images, videos, etc. The display screen 110 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Mini-LED, Micro-Led, Micro-OLED, a quantum dot light-emitting diode (QLED), etc.

[0058] The keyboard 111 is used to obtain user input information.

[0059] The sensor module 112 may include a pressure sensor, a gyroscope sensor, a magnetic sensor, an acceleration sensor, a fingerprint sensor, a touch sensor, an ambient light sensor, etc., which is not specifically limited in the embodiment of the present application.

[0060] The indicator 113 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. In some embodiments, the indicator 113 may be disposed near the Type-C interface.

[0061] The wireless communication function of the electronic device 10 can be implemented through the wireless communication module 114 and the antenna group 115, etc.

[0062] The antenna group 115 is used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 10 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.

[0063] The wireless communication module 114 can provide wireless communication solutions including wireless local area networks (WLAN) (Wi-Fi network), Bluetooth (BT), etc. applied to the electronic device 10. The wireless communication module 114 can be one or more devices integrating at least one communication processing module. The wireless communication module 114 receives electromagnetic waves via the antenna group 114, modulates and filters the electromagnetic wave signals, and sends the processed signals to the CPU 101. The wireless communication module 114 can also receive the signal to be sent from the CPU 101, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna group 114.

[0064] As the peak power of laptops increases, when the laptops are frequently plugged into a charger to charge, the charger and the laptop will have a probability of repeated disconnection. Specifically, although the charger is connected to the laptop, the laptop will first display that the charger is disconnected, and then display that the charger is restored after a short delay. Research has found the following reasons for this phenomenon.

[0065] See also Figure 2 , which is a schematic diagram of the principles provided by an embodiment of the present application.

[0066] When the charger 20 is plugged into the Type-C interface of the electronic device 10, the handshake of the PD protocol is implemented through the Channel Configuration (CC) line. The charging current is transmitted on VBUS, and the charging return current is transmitted on GND. D+ and D- are used for the secure copy (SCP) protocol handshake.

[0067] R1, R2, R3, R4, R5 and R6 in the figure are equivalent impedances between the cable and the printed circuit board (PCB). R7 is the impedance of D+ to ground on the CPU 101 side, and R8 is the impedance of D+ to ground on the charger protocol integrated circuit (IC) side.

[0068] On the charger protocol IC side, under the SCP protocol, the D+ level is detected by the comparator L, and the detection result is compared with the reference voltage Vref. When the detection result is less than the reference voltage Vref, the reset of the charger is triggered.

[0069] When the charging current jumps and the charging peak current is large, or the peak power consumption of the laptop is large, the charging reflux is large. At this time, when the current flows through R5, or a voltage drop occurs on GND, the level of D+ detected by the charger protocol IC side relative to GND jumps, triggering the reset of the charger. After the charger is reset, it will disconnect the charging of the laptop, and automatically resume the PD protocol handshake with the laptop, and then resume normal charging. This process lasts about 2 seconds, but it will be perceived by the user of the laptop. For example, see Figure 3 The scene shown is schematic Figure 1 ,as well as Figure 4 The scene shown is schematic Figure 2 , detailed description is given below.

[0070] When the laptop is charging normally, the battery indicator in the task bar of the laptop system interface will display the charging status icon 31, and the indicator light on the laptop can also display the color corresponding to the charging status, indicating that the laptop is charging at this time.

[0071] When disconnection occurs, the battery indicator in the task bar of the system interface of the notebook computer will display an icon 32 indicating that the battery is not in the charging state, and the indicator light on the notebook computer may also display a color corresponding to the non-charging state.

[0072] When normal charging is resumed, Figure 4 The status is restored to Figure 3 As shown in the state, the above process may occur repeatedly and be perceived by the user.

[0073] See also Figure 5 The scene shown is schematic Figure 3 .

[0074] Since current laptops may have a performance mode, the performance mode is mainly optimized for the underlying hardware, energy strategy, and workload. It no longer compromises between performance and efficiency, but attempts to maximize the performance of the laptop. It is generally used in scenarios where laptop devices are used for gaming or running other large software. In this case, the power consumption of the laptop is relatively high.

[0075] When a user is plugged into a charger and turns on the performance mode of a laptop, if a disconnection occurs, the system may be forced to exit the performance mode, and the operating system (OS) interface may prompt in the form of a pop-up window.

[0076] In the above description, the charging current jumps and the charging peak current is large, which may be caused by the aging or poor performance of the laptop's charging chip. The laptop's peak power consumption is large, which may be caused by the laptop's performance mode being turned on or the current application load is high.

[0077] It is understandable that the excessive power of the laptop is relative to the charging power of the charger. In some embodiments, the user may use a charger that does not match the power specification of the laptop. For example, the charging power of the charger is 65W, and the laptop works at 100W. At this time, although the charger can charge the laptop and has no effect when the laptop runs at a low load, when the peak power consumption of the laptop is too high, disconnection may occur. When the power of the laptop drops, it will reconnect normally.

[0078] In summary, the current short-term disconnection of the charger has a negligible impact on the laptop computer due to the short disconnection time, but it will be perceived by the user. In order to solve the above problems, the present application provides a method and electronic device for reporting a charger disconnection event. When the electronic device detects that the charger is in place, it determines whether the charger is in a pre-stored charger fault list. If it is, the delayed reporting strategy is started. After the delayed reporting strategy is started, the charger disconnection event is reported when it is detected that the charger is disconnected and normal charging is not restored within a first time interval. When the charger is detected to be disconnected and normal charging is restored within the first time interval, the charger disconnection event is not reported, so that the electronic device will not be triggered by the disconnection event to change the user interface, so that the user cannot perceive the short-term disconnection, which can improve the user experience of the electronic device.

[0079] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0080] The terms "first", "second", etc. in the description of this application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features.

[0081] In the present application, unless otherwise clearly specified and limited, the term "connection" should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium.

[0082] In the following embodiments of the present application, the electronic device is a laptop computer, and both the laptop computer and the charger support the PD protocol. The electronic device may also be other devices, which will not be described in detail here.

[0083] See also Figure 6 , which is a flow chart of a method for reporting a charger disconnection charging event provided in an embodiment of the present application.

[0084] The method comprises the following steps:

[0085] S11: When it is detected that a charger is in place, determine whether the charger is in a charger fault list.

[0086] See also Figure 1 When a user plugs a charger into a laptop to charge it, the PD module of the electronic device performs a PD protocol handshake with the charger to determine that it is the power receiving device (Sink) and the charger is the power supply device (Source), thus confirming that the charger is in place.

[0087] The charger fault list is a list pre-stored in the electronic device, which records various models of chargers corresponding to the device model of the laptop computer that have experienced charger disconnection failures. The charger fault list can be collected by the manufacturer of the laptop computer and maintained on each laptop computer through remote updating.

[0088] When the laptop detects that the charger is in place, it determines whether the charger is in the charger fault list, thereby triggering the delayed reporting strategy.

[0089] S12: When it is determined that the charger is in the charger fault list, a delayed reporting instruction is sent to the embedded controller.

[0090] The delayed reporting instruction is used to enable the EC to implement a delayed reporting strategy, and the EC can interact with the PD module of the electronic device through an inter-integrated circuit (I2C) bus.

[0091] S13: After receiving the delayed reporting instruction, the embedded controller does not report the charger disconnection event when it detects that the charger is disconnected from charging and charging is resumed within the first time interval; and reports the charger disconnection event when it detects that the charger is disconnected from charging and charging is not resumed within the first time interval.

[0092] At this time, the EC implements a delayed reporting strategy for the charger disconnection event, that is, when it is detected that the charger is disconnected and normal charging is not restored within the first time interval, it is determined that the charger is indeed disconnected at this time, rather than a short disconnection, and then the charger disconnection event is reported.

[0093] When the EC detects that the charger is disconnected and normal charging is restored within the first time interval, it indicates that the charger is disconnected instantaneously, which may be due to a jump in the charging current or a large peak power consumption of the electronic device, resulting in a brief disconnection. At this time, the charger disconnection event is not reported, so that the electronic device will not be triggered by the charging disconnection event to change the user interface, and the user will not perceive the brief disconnection, which can improve the user experience of the electronic device.

[0094] The following is an explanation in conjunction with a specific implementation method.

[0095] See also Figure 7 and Figure 8 .in, Figure 7 A flowchart of another method for reporting a charger disconnection event provided in an embodiment of the present application, Figure 8 This is a schematic diagram of the implementation principle of the electronic device provided in the embodiment of the present application.

[0096] The method comprises the following steps:

[0097] S21: When the EC detects that a charger is in place, it obtains the maximum output power and model of the charger.

[0098] In a possible implementation, after the charger is connected to the Type-C interface of the laptop, a charging capability (Source_Capabilites) message is sent to the PD module of the laptop. The Source_Capabilites message carries the charging specifications supported by the charger.

[0099] The PD module can parse the charging specifications indicated in the Source_Capabilites message and obtain the maximum charging power supported by the charger.

[0100] In actual applications, the charger can support multiple charging specifications, such as supporting a charging power of 65W and a charging power of 100W. The charger can determine the charging specification that the laptop needs to use based on a request message sent by the laptop; the charger can also support only one charging specification.

[0101] When the PD module obtains the maximum charging power, it can report the maximum output power to the EC.

[0102] In addition, if Figure 2 As shown in , the laptop computer can also obtain the charger model by handshaking with the SCP protocol and the charger protocol IC of the charger.

[0103] S22: The EC sends the maximum output power of the charger and the charger model to the WMI communication module.

[0104] In the embodiment of the present application, the charging event management program sends instructions to the EC, and the EC reports information to the charging event management program based on Windows Management Instrumentation (WMI). WMI is a command line tool that comes with the Windows system and is used to manage and monitor various resources and services on the Windows system.

[0105] At this time, the EC of the hardware layer first reports the maximum output power and charger model to the WMI communication module of the driver layer.

[0106] S23: The WMI communication module reports the maximum output power and the charger model to the WMI service.

[0107] The WMI communication module of the driver layer reports the maximum output power and the charger model to the WMI service of the operating system (OS).

[0108] S24: The WMI service reports the maximum output power and the charger model to the charging event management program.

[0109] The charging event management program may be a computer manager application on a notebook computer.

[0110] S25: The charging event management program determines that the charger is in the charger fault list according to the maximum output power of the charger and the model of the charger.

[0111] The charging event manager maintains a list of charger faults.

[0112] The charger failure list is a list pre-stored in the electronic device, which records the various models and maximum charging power of chargers that have experienced charger disconnection failures corresponding to the device model of the laptop computer. The charger failure list can be collected by the manufacturer of the laptop computer and maintained on each laptop computer through remote update. The charging event management program can update the charger failure list according to a preset period, or update the charger failure list in response to an update operation triggered by the user.

[0113] The charging event management program determines in the charger fault list whether there is a faulty charger whose maximum charging power is the same as the maximum output power of the charger, and the model of the faulty charger is the same as the model of the charger. If so, it is determined that the charger is in the charger fault list. This indicates that the model corresponding to the charger is prone to charger disconnection faults.

[0114] S26: The charging event management program sends a delayed reporting instruction through the WMI service.

[0115] The charging event management program uses the WMI service to send delayed reporting instructions to the EC through WMI commands.

[0116] S27: The WMI service transmits the delay reporting instruction to the WMI communication module.

[0117] S28: The WMI communication module sends the delay reporting instruction to the EC.

[0118] S29: EC updates the register parameters and continues to monitor the charger disconnect charging event.

[0119] In a possible implementation, the delayed reporting instruction sent by the charging event management program includes an event reporting flag bit, and the flag is a first value.

[0120] The value of the event reporting flag bit may be a first value or a second value. When the value of the event reporting flag bit is the first value, it indicates that the charger disconnection event is delayed in reporting at this time, and when the value of the event reporting flag bit is the second value, it indicates that the charger disconnection event is not delayed in reporting at this time, that is, the charger disconnection event is reported normally.

[0121] The EC includes a register, which can pre-store a first time interval for delayed reporting. The register also stores a local flag bit corresponding to the event reporting flag bit. Initially, the local flag bit can be configured to be a second value, that is, delayed reporting is not performed by default. When the EC receives the delayed reporting instruction, the register parameter is updated to modify the local flag bit to the first value. At this time, the EC starts the delayed reporting strategy.

[0122] In another possible implementation, the register does not pre-store the first time interval for delayed reporting, and the first time interval needs to be obtained from the delayed reporting instruction issued by the charging event management program. In this implementation, the event reporting flag bit included in the delayed reporting instruction issued by the charging event management program is a first value, and the delayed reporting instruction also includes the first time interval.

[0123] The register of the EC stores a local flag bit corresponding to the event reporting flag bit, and stores a time interval corresponding to the time carried in the delayed reporting instruction. Initially, the local flag bit can be configured as the second value, and the initially stored time interval can be configured as 0, that is, real-time reporting is performed by default. When the EC receives the delayed reporting instruction, it updates the parameters of the register, modifies the local flag bit to the first value, and replaces the initial time interval with the first time interval. At this time, the EC starts the delayed reporting strategy.

[0124] The first time interval in the embodiment of the present application can be determined according to the actual situation, and the first time interval covers the length of time for the charger protocol IC to reset the charger - restore the PD protocol handshake with the laptop - restore normal charging. After experimental testing and calibration, the above charging recovery process usually takes about 2 seconds, so the first time interval can be 3 seconds.

[0125] After the EC updates the register parameters, it can continuously monitor the charger disconnection charging event to implement a delayed reporting strategy.

[0126] The following first describes the process of reporting a charger disconnection event.

[0127] See also Fig. 9 , this figure is a flow chart of another method for reporting a charger disconnection charging event provided in an embodiment of the present application.

[0128] S30a: When the EC detects that the charger is disconnected from charging, a timer is started.

[0129] In some embodiments, the charger disconnection event is reported to the EC in real time by the PD module of the electronic device.

[0130] The timing length of the timer is the first time interval, and before the timer expires, the EC will not report a charger disconnection charging event.

[0131] The timer is started when the EC detects that the charger is disconnected, and is interrupted when the EC detects that the charger is restored. The timer can only end when the charger is not restored within the first time interval, otherwise it will be interrupted.

[0132] S31a: The timer expires and the charger is not detected to resume charging.

[0133] At this time, the charger disconnection event is not a short disconnection caused by a jump in the charging current or a large peak power consumption of the electronic device, and the charger disconnection event needs to be reported.

[0134] S32a: Report the charger disconnection event to the WMI communication module.

[0135] See also Fig. 9 , which is a schematic diagram of the composition of the charger disconnection charging event provided in an embodiment of the present application.

[0136] At this time, EC updates the value of the flag bit Byte1 in the Output in the figure to the value corresponding to the charger disconnection charging event, and reports it to the charging event management program through the WMI communication module and WMI service, thereby realizing the reporting of the charger disconnection charging event.

[0137] S33a: The WMI communication module reports the charger disconnection event to the WMI service.

[0138] S34a: The WMI service reports the charger disconnection event to the charging event management program.

[0139] S35a: The charging event management program notifies the power management service that the charger is disconnected.

[0140] When receiving the charger disconnection charging event, the charging event management program notifies the power management service of the electronic device that the current charger has been disconnected.

[0141] S36a: The power management service executes the charging and discharging strategy.

[0142] The embodiment of the present application does not specifically limit the specific charging and discharging strategy. For example, at this time, the power management service can trigger the notebook computer to exit the performance mode to extend the battery life of the notebook computer.

[0143] S37a: The power management service triggers the charging status icon in the status bar to switch to a battery icon.

[0144] The status bar of the laptop will Figure 3 The charging status icon 31 shown switches to Figure 4 The icon 32 shown is not in a charging state, which is a battery icon.

[0145] In addition, when the laptop includes an indicator light, the system can also be triggered to switch the color of the indicator light to a color corresponding to a non-charging state.

[0146] The above description takes the case where the EC reports the charger disconnection charging event to the charging event management program as an example. In another possible implementation, the EC may also report the charger disconnection charging event to the power management service through the WMI communication module, so that the power management service executes the charging and discharging strategy and triggers the charging status icon of the operating system interface of the electronic device to switch to the battery icon; in some other possible implementations, the EC may also report the charger disconnection charging event to the charging event management program and the power management service through the WMI communication module at the same time, and in this case, the charging event management program does not need to notify the power management service that the charger is disconnected.

[0147] Through the above steps, delayed reporting of the charger disconnection charging event is achieved, and at this time the connection between the electronic device and the charger has been disconnected.

[0148] The following describes the process when the charger disconnection charging event is not reported.

[0149] See also Fig.10 , this figure is a flow chart of another method for reporting a charger disconnection charging event provided in an embodiment of the present application.

[0150] For the detailed description of S21-S29, please refer to the above records, which will not be repeated here.

[0151] S30b: When the EC detects that the charger is disconnected from charging, a timer is started.

[0152] In some embodiments, the charger disconnection event is reported to the EC in real time by the PD module of the electronic device.

[0153] S31b: Before the timer expires, the EC detects that the charger is restored.

[0154] When the EC detects that the charger resumes charging before the timer expires, it indicates that the charger disconnection event at this time is a short disconnection caused by a jump in the charging current or a large peak power consumption of the electronic device. The charger has resumed charging the electronic device, and there is no need to report the charger disconnection event.

[0155] S32b: The EC interrupts the timer and does not trigger reporting of the charger disconnection event.

[0156] At this time, since the charger disconnection event is not reported, the power management service will not know that the current charger is disconnected, and the previous charging and discharging strategy will be maintained unchanged, and the charging status icon in the status bar will not be triggered to change. For the user, there will be no perceived change. Therefore, through this delayed reporting strategy, the brief disconnection of the charger will not trigger the reporting of the charger disconnection event, and then the electronic device will not be triggered by the charging disconnection event to change the user interface. The user cannot perceive the brief disconnection, which can improve the user experience of the electronic device. For electronic devices that adopt the above delayed reporting strategy, one manifestation is that when the user manually plugs in and out the charger, the delayed reporting strategy will cause the charging status icon and the battery icon in the status bar of the electronic device's user interface to not switch frequently, and the electronic device will not exit the performance mode that has been turned on.

[0157] The above embodiments describe the implementation method when the current charger matches the charger recorded in the charger fault list. The following describes the implementation method when the current charger does not match the charger recorded in the charger fault list.

[0158] See also Fig.11 , which is a flowchart of another method for reporting a charger disconnection event provided in an embodiment of the present application

[0159] The method comprises the following steps:

[0160] S41: When the EC detects that a charger is in place, it obtains the maximum output power and model of the charger.

[0161] S42: The EC sends the maximum output power of the charger and the charger model to the WMI communication module.

[0162] S43: The WMI communication module reports the maximum output power and the charger model to the WMI service.

[0163] S44: The WMI service reports the maximum output power and the charger model to the charging event management program.

[0164] S45: The charging event management program determines, based on the maximum output power of the charger and the model of the charger, that the charger is not in the charger fault list.

[0165] The charging event manager maintains a list of charger faults.

[0166] The charger failure list is a list pre-stored in the electronic device, which records the various models and maximum charging power of chargers that have experienced charger disconnection failures corresponding to the device model of the laptop computer. The charger failure list can be collected by the manufacturer of the laptop computer and maintained on each laptop computer through remote update. The charging event management program can update the charger failure list according to a preset period, or update the charger failure list in response to an update operation triggered by the user.

[0167] The charging event management program determines in the charger fault list whether the maximum charging power of the faulty charger is the same as the maximum output power of the charger, and the model of the faulty charger is the same as the model of the charger. If not, it is determined that the charger is not in the charger fault list. This indicates that the model corresponding to the charger is not a model that is prone to charger disconnection failure. At this time, the EC does not need to start the delayed reporting strategy, and the charger disconnection event can be reported normally.

[0168] S46: The charging event management program sends a clear delay reporting instruction through the WMI service.

[0169] The charging event management program uses the WMI service to send a clear delay reporting instruction to the EC through the WMI command.

[0170] S47: The WMI service transmits the clear delay reporting instruction to the WMI communication module.

[0171] S48: The WMI communication module sends a clear delay reporting instruction to the EC.

[0172] S49: EC updates the parameters of the register and continues to monitor the charger disconnect charging event.

[0173] The clear delay reporting instruction issued by the charging event management program includes an event reporting flag bit, and the flag is the second value.

[0174] The value of the event reporting flag bit can be a first value or a second value. When the value of the event reporting flag bit is the first value, it indicates that the charger disconnection charging event is delayed in reporting at this time, and when the value of the event reporting flag bit is the second value, it indicates that the charger disconnection charging event is not delayed in reporting at this time, that is, the charger disconnection charging event is reported normally.

[0175] The EC includes a register, which can pre-store a record of a first time interval for delayed reporting. The register also stores a local flag bit corresponding to the event reporting flag bit. Initially, the local flag bit can be configured to be a second value, that is, no delayed reporting is performed by default. When the EC receives the clear delayed reporting instruction, it determines whether the value of the local flag bit is the second value. If so, it does not modify it, otherwise, the value marked is modified to the second value. At this time, the EC starts the normal reporting strategy.

[0176] When the laptop computer is plugged into the charger for the first time, the local mark bit is the second value, and the local mark bit is not modified after receiving the clear delay reporting instruction.

[0177] When the charger previously used by the laptop is also a charger that is not in the charger fault list, the local mark has been the second value, and the local mark does not need to be modified after receiving the clear delay reporting instruction this time.

[0178] When the charger previously used by the laptop computer is a charger in the charger failure list, the local mark has been modified to the first value, and the local mark needs to be modified after receiving the clear delay reporting instruction this time.

[0179] In addition, after receiving the clear delay reporting instruction, the EC may also clear the first time interval stored in the register; or modify the first time interval stored locally to zero or other specific values ​​so that the timer is not started and the delay reporting is not triggered.

[0180] S50: The EC detects a charger disconnection charging event.

[0181] S51: Reporting the charger disconnection event to the WMI communication module.

[0182] At this time, the EC does not start the delayed reporting strategy and can report the charger disconnection charging event normally.

[0183] S52: The WMI communication module reports the charger disconnection event to the WMI service.

[0184] S53: The WMI service reports the charger disconnection event to the charging event management program.

[0185] S54: The charging event management program notifies the power management service of the electronic device that the current charger is disconnected.

[0186] S55: The power management service executes the charging and discharging strategy.

[0187] The embodiment of the present application does not specifically limit the specific charging and discharging strategy. For example, at this time, the power management service can trigger the notebook computer to exit the performance mode to extend the battery life of the notebook computer.

[0188] S56: The power management service triggers the charging status icon in the status bar to switch to a battery icon.

[0189] The status bar of the laptop will Figure 3 The charging status icon 31 shown switches to Figure 4 The icon 32 shown in the non-charging state is a battery icon. In addition, when the notebook computer includes an indicator light, the system can also be triggered to switch the indicator light color to a color corresponding to the non-charging state.

[0190] In the above description, the EC reports the charger disconnection charging event to the charging event management program as an example. In another possible implementation, the EC can report the charger disconnection charging event to the power management service, so that the power management service executes the charging and discharging strategy and triggers the charging status icon of the operating system interface of the electronic device to switch to the battery icon.

[0191] In the description of the above embodiments, when it is detected that a charger is in place, the EC obtains the maximum output power and model of the charger and reports them to the charging event management program, which determines whether the charger is in the charger fault list.

[0192] In another possible implementation, when it is detected that a charger is in place, the EC can obtain the maximum output power of the charger and report the maximum output power of the charger to the charging event management program through the WMI pass module and the WMI service. The charging event management program queries the charger fault list to see whether the maximum charging power of the faulty charger is the same as the maximum charging power of the charger. If so, it is determined that the charger is in the charger fault list, otherwise it is determined that the charger is not in the charger fault list. The subsequent implementation is the same as in the above description and will not be repeated here.

[0193] In another possible implementation, when it is detected that a charger is in place, the EC can obtain the model of the charger and report the model of the charger to the charging event management program through the WMI pass module and the WMI service. The charging event management program queries the charger fault list to see whether the model of the faulty charger is the same as the model of the charger. If so, it is determined that the charger is in the charger fault list, otherwise it is determined that the charger is not in the charger fault list. The subsequent implementation is the same as in the above description and will not be repeated here.

[0194] Based on the method for reporting a charger disconnection event provided in the above embodiment, an embodiment of the present application further provides an electronic device for implementing the method.

[0195] The electronic device includes an EC and at least one Type-C interface. The electronic device runs a charging event management program.

[0196] Among them, the Type-C interface is used to connect the charger.

[0197] The charging event management program is used to determine whether the currently-located charger is in the charger fault list; if so, a delayed reporting instruction is sent to the EC.

[0198] The EC is used to determine whether the charging is in place, and after receiving the delayed reporting instruction issued by the charging event management program, when it is detected that the charger is disconnected from charging and charging is resumed within a first time interval, the charger disconnection charging event is not reported, and when it is detected that the charger is disconnected from charging and charging is not resumed within the first time interval, the charger disconnection charging event is reported.

[0199] For the specific working principles of the charging event management program and EC, please refer to the description in the above method embodiment, and the embodiments of the present application will not be repeated here.

[0200] In a possible implementation, the electronic device is a notebook computer.

[0201] By using the device provided in the embodiment of the present application, the electronic device implements a delayed reporting strategy for the charger disconnection event, that is, when the charger is detected to be disconnected and normal charging is not restored within a first time interval, it is determined that the charger is indeed disconnected at this time, rather than a short disconnection, and then the charger disconnection event is reported. When the charger is detected to be disconnected and normal charging is restored within the first time interval, it is characterized that the charger disconnection is instantaneous at this time, which may be due to a jump in the charging current or a short disconnection caused by a large peak power consumption of the electronic device. At this time, the charger disconnection event is not reported, so that the electronic device will not be triggered by the disconnection event to change the user interface, and the user will not perceive the short disconnection, which can improve the user experience of the electronic device.

[0202] It should be understood that, in the present application, “at least one (item)” means one or more, and “more than one” means two or more.

[0203] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for reporting a charger disconnection event, characterized in that: The reporting method includes: When it is detected that a charger is in place, determining whether the charger is in a charger fault list; If so, a delayed reporting instruction is sent to the embedded controller EC so that when the EC detects that the charger is disconnected from charging and charging is resumed within a first time interval, the charger disconnection event is not reported; when the EC detects that the charger is disconnected from charging and charging is not resumed within the first time interval, the charger disconnection event is reported.

2. The reporting method according to claim 1, characterized in that: When it is detected that a charger is in place, determining whether the charger is in a charger fault list specifically includes: When it is detected that a charger is in place, obtaining the maximum output power of the charger; Querying in the charger fault list whether there is a faulty charger with a maximum charging power that is the same as the maximum charging power of the charger; If so, it is determined that the charger is in the charger fault list; otherwise, it is determined that the charger is not in the charger fault list.

3. The reporting method according to claim 1, characterized in that: When it is detected that a charger is in place, determining whether the charger is in a charger fault list specifically includes: When it is detected that a charger is in place, obtaining the model of the charger; Querying in the charger fault list whether there is a faulty charger with the same model as the charger; If so, it is determined that the charger is in the charger fault list; otherwise, it is determined that the charger is not in the charger fault list.

4. The reporting method according to claim 1, characterized in that: When it is detected that a charger is in place, determining whether the charger is in a charger fault list specifically includes: When it is detected that a charger is in place, obtaining the model of the charger and the maximum output power of the charger; Determine in the charger fault list whether there is a faulty charger whose maximum charging power is the same as the maximum output power of the charger, and the model of the faulty charger is the same as the model of the charger; If so, it is determined that the charger is in the charger fault list; otherwise, it is determined that the charger is not in the charger fault list.

5. The reporting method according to claim 1, characterized in that: The sending of the delay reporting instruction to the embedded controller EC specifically includes: A delayed reporting instruction is issued to the EC, wherein the event reporting flag bit included in the delayed reporting instruction is a first value.

6. The reporting method according to claim 5, characterized in that: The EC pre-stores the first time interval, and when the EC detects that the charger is disconnected from charging and resumes charging within the first time interval, does not report the charger disconnection event, specifically including: When the EC detects that the charger is disconnected from charging, a timer is started, and the timing length of the timer is the first time interval; When it is detected that the charger resumes charging before the timer expires, the timer is interrupted, and no charger disconnection event is triggered to be reported; When the EC detects that the charger is disconnected from charging and charging is not resumed within the first time interval, reporting a charger disconnection event, specifically including: When the EC detects that the charger is disconnected from charging, a timer is started, and the timing length of the timer is the first time interval; When the timer ends and it is not detected that the charger resumes charging, a charger disconnection charging event is reported.

7. The reporting method according to claim 1, characterized in that: The sending of the delay reporting instruction to the embedded controller EC specifically includes: Sending a delayed reporting instruction to the EC, wherein the event reporting flag bit included in the delayed reporting instruction is a first value, and the delayed reporting instruction also includes the first time interval; The EC obtains the first time interval from the delay reporting instruction and saves the first time interval.

8. The reporting method according to claim 7, characterized in that: When the EC detects that the charger is disconnected from charging and resumes charging within a first time interval, the event of the charger being disconnected from charging is not reported, specifically including: When the EC detects that the charger is disconnected from charging, a timer is started, and the timing length of the timer is the first time interval; When it is detected that the charger resumes charging before the timer expires, the timer is interrupted, and no charger disconnection event is triggered to be reported; When the EC detects that the charger is disconnected from charging and charging is not resumed within the first time interval, reporting a charger disconnection event, specifically including: When the EC detects that the charger is disconnected from charging, a timer is started, and the timing length of the timer is the first time interval; When the timer ends and it is not detected that the charger resumes charging, a charger disconnection charging event is reported.

9. The reporting method according to any one of claims 5 to 8, characterized in that: When it is determined that the charger is not in the charger fault list, the method further includes: A clear delay reporting instruction is issued to the EC, wherein the event reporting flag bit included in the clear delay reporting instruction is the second value.

10. The reporting method according to claim 1, characterized in that: After reporting the charger disconnection charging event, the method further includes: Trigger the charging status icon on the operating system interface to switch to a battery icon.

11. The reporting method according to claim 1, characterized in that: The method further comprises: The charger fault list is updated according to a preset period.

12. An electronic device, characterized in that: The electronic device comprises: an embedded controller EC and at least one Type-C interface, and the electronic device runs a charging event management program; The Type-C interface is used to connect a charger; The charging event management program is used to determine whether the currently-in-place charger is in the charger fault list; if so, send a delayed reporting instruction to the EC; The EC is used to determine whether the charging is in place, and after receiving the delayed reporting instruction issued by the charging event management program, when it is detected that the charger is disconnected from charging and charging is resumed within a first time interval, not report the charger disconnection charging event, and when it is detected that the charger is disconnected from charging and charging is not resumed within the first time interval, report the charger disconnection charging event.

13. The electronic device according to claim 12, characterized in that: The EC is specifically used to obtain the maximum output power of the charger and report it to the charging event management program when detecting that a charger is in place; The charging event management program is specifically used to query whether there is a maximum charging power of a faulty charger in the charger fault list that is the same as the maximum charging power of the charger; if so, determine that the charger is in the charger fault list, otherwise determine that the charger is not in the charger fault list.

14. The electronic device according to claim 12, characterized in that: The EC is specifically used to obtain the model of the charger and report it to the charging event management program when detecting that a charger is in place; The charging event management program is specifically used to query in the charger fault list whether there is a faulty charger with the same model as the charger; if so, determine that the charger is in the charger fault list; otherwise, determine that the charger is not in the charger fault list.

15. The electronic device according to claim 12, characterized in that: The EC is specifically configured to obtain the model of the charger and the maximum output power of the charger when detecting that a charger is in place, and report the model of the charger and the maximum output power of the charger to the charging event management program; The charging event management program is specifically used to determine whether there is a faulty charger in the charger fault list whose maximum charging power is the same as the maximum output power of the charger, and the model of the faulty charger is the same as the model of the charger; if so, it is determined that the charger is in the charger fault list, otherwise it is determined that the charger is not in the charger fault list.

16. The electronic device according to claim 12, characterized in that: The charging event management program is specifically used to send a delayed reporting instruction to the EC, and the event reporting flag bit included in the delayed reporting instruction is a first value.

17. The electronic device according to claim 16, characterized in that: The EC pre-stores the first time interval; and the EC is specifically configured to: When the EC detects that the charger is disconnected from charging, a timer is started, and the timing length of the timer is the first time interval; when the charger is detected to resume charging before the timer expires, the timer is interrupted, and the charger disconnection event is not triggered to be reported; And, when the EC detects that the charger is disconnected from charging, a timer is started, and the timing length of the timer is the first time interval; when the timer ends and it is not detected that the charger resumes charging, a charger disconnection event is reported.

18. The electronic device according to claim 12, characterized in that: The charging event management program is specifically used to send a delayed reporting instruction to the EC, the event reporting flag bit included in the delayed reporting instruction is a first value, and the delayed reporting instruction also includes the first time interval; The EC is further configured to obtain and save the first time interval from the delay reporting instruction.

19. The electronic device according to claim 18, characterized in that: The EC is specifically used for: When the EC detects that the charger is disconnected from charging, a timer is started, and the timing length of the timer is the first time interval; when the charger is detected to resume charging before the timer expires, the timer is interrupted, and the charger disconnection event is not triggered to be reported; And, when the EC detects that the charger is disconnected from charging, a timer is started, and the timing length of the timer is the first time interval; when the timer ends and it is not detected that the charger resumes charging, a charger disconnection event is reported.

20. The electronic device according to any one of claims 16 to 19, characterized in that: The charging event management program is further configured to send a clear delay reporting instruction to the EC when it is determined that the charger is not in the charger fault list, wherein the clear delay reporting instruction includes an event reporting flag bit having a second value.

21. The electronic device according to claim 12, characterized in that: The EC is specifically used to report the charger disconnection charging event to the power management service of the electronic device; The power management service, upon receiving the reported event of the charger being disconnected from charging, triggers the charging status icon on the operating system interface of the electronic device to switch to a battery icon.

22. The electronic device according to claim 12, characterized in that: The EC is specifically used to report the charger disconnection charging event to the charging event management program; The charging event management program is specifically used to notify the power management service of the electronic device that the current charger is disconnected after receiving the charger disconnection charging event, so that the power management service triggers the charging status icon of the operating system interface of the electronic device to switch to a battery icon.

23. The electronic device according to claim 12, characterized in that: The charging event management program is further used to update the charger fault list according to a preset period.