Charging control method and device, electronic equipment, storage medium and program product

By obtaining and comprehensively judging the power adapter information and charging interruption information, the charging current is reduced to solve the charging interruption problem caused by the increase in ground impedance during fast charging of electronic devices, and the accurate identification of abnormal power adapters and charging interruption is achieved. The accurate solution improves charging stability and efficiency.

CN119253780APending Publication Date: 2025-01-03GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310809288.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-03
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The existing charging control methods cannot effectively solve the charging interruption problem caused by the increase in ground impedance during fast charging of electronic devices. Traditional methods cannot accurately identify abnormal power adapters and charging interruption events, resulting in unstable charging.

Method used

By obtaining the power adapter information and charging interruption information of historical charging interruption events, we comprehensively judge whether the historical charging interruption event is an abnormal charging interruption event, and reduce the charging current when it is judged as abnormal, and control the power adapter to reduce the subsequent current Charging electronic devices enables accurate identification of abnormal power adapters and accurate solution to the interruption of charging.

Benefits of technology

Improve the accuracy of identification of charging interruption events, ensure the stability and efficiency of electronic devices during charging, and avoid the charging interruption problems caused by abnormal power adapters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119253780A_ABST
    Figure CN119253780A_ABST
Patent Text Reader

Abstract

The invention relates to a charging control method and device, electronic equipment, a storage medium and a program product. The method comprises the following steps: acquiring power adapter information and charging interruption information of a historical charging interruption event under the condition that the electronic equipment is connected with a power adapter; determining whether the historical charging interruption event is an abnormal charging interruption event according to the power adapter information and the charging interruption information; and if the historical charging interruption event is an abnormal charging interruption event, reducing the current charging current, and controlling the power adapter to charge the electronic equipment based on the reduced charging current. Whether the power adapter is an abnormal power adapter or not can be judged according to the power adapter information, and whether the historical charging interruption event is an abnormal charging interruption event passively generated by the electronic equipment or not can also be judged according to the charging interruption information. Active interruption of the electronic equipment caused by normal reasons is eliminated, the identification accuracy of charging interruption is improved, and the problem of charging interruption of the electronic equipment is better solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of charging technology, and in particular to a charging control method, device, electronic device, storage medium and program product. Background Art

[0002] With the development of charging technology, there are more and more different types of fast charging protocols, such as Programmable Power Supply (PPS) fast charging protocol, VOOC fast charging protocol, and the new generation of Universal Fast Charging Specification (UFCS). In the process of fast charging adapter controlling the charging of the terminal based on the fast charging protocol, the grounding impedance increases due to the aging of the line in the fast charging adapter, and the increase in grounding impedance will cause the electronic equipment to have a probability of intermittent charging.

[0003] However, traditional charging control methods cannot effectively solve the problem of intermittent charging of electronic devices. Summary of the invention

[0004] The embodiments of the present application provide a charging control method, device, electronic device, computer-readable storage medium and computer program product, which can better solve the problem of intermittent charging.

[0005] In one aspect, the present application provides a charging control method. The method comprises:

[0006] When the electronic device is connected to a power adapter, obtaining power adapter information and charging intermittent information of historical charging intermittent events;

[0007] Determine whether the historical charging intermittent event is an abnormal charging intermittent event based on the power adapter information and the charging intermittent information;

[0008] If the historical charging intermittent event is an abnormal charging intermittent event, the current charging current is reduced, and the power adapter is controlled to charge the electronic device based on the reduced charging current.

[0009] On the other hand, the present application also provides a charging control device. The device includes:

[0010] An acquisition module, used to acquire power adapter information and charging intermittent information of historical charging intermittent events when the electronic device is connected to a power adapter;

[0011] A determination module, used to determine whether a historical charging intermittent event is an abnormal charging intermittent event based on the power adapter information and the charging intermittent information;

[0012] The control module is used to reduce the current charging current if the historical charging intermittent event is an abnormal charging intermittent event, and control the power adapter to charge the electronic device based on the reduced charging current.

[0013] On the other hand, the present application also provides an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0014] When the electronic device is connected to a power adapter, obtaining power adapter information and charging intermittent information of historical charging intermittent events;

[0015] Determine whether the historical charging intermittent event is an abnormal charging intermittent event based on the power adapter information and the charging intermittent information;

[0016] If the historical charging intermittent event is an abnormal charging intermittent event, the current charging current is reduced, and the power adapter is controlled to charge the electronic device based on the reduced charging current.

[0017] On the other hand, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0018] When the electronic device is connected to a power adapter, obtaining power adapter information and charging intermittent information of historical charging intermittent events;

[0019] Determine whether the historical charging intermittent event is an abnormal charging intermittent event based on the power adapter information and the charging intermittent information;

[0020] If the historical charging intermittent event is an abnormal charging intermittent event, the current charging current is reduced, and the power adapter is controlled to charge the electronic device based on the reduced charging current.

[0021] On the other hand, the present application also provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0022] When the electronic device is connected to a power adapter, obtaining power adapter information and charging intermittent information of historical charging intermittent events;

[0023] Determine whether the historical charging intermittent event is an abnormal charging intermittent event based on the power adapter information and the charging intermittent information;

[0024] If the historical charging intermittent event is an abnormal charging intermittent event, the current charging current is reduced, and the power adapter is controlled to charge the electronic device based on the reduced charging current.

[0025] The above-mentioned charging control method, device, electronic device, storage medium and computer program product, when the electronic device is connected to a power adapter, obtains the power adapter information and charging intermittent information of the historical charging intermittent event; determines whether the historical charging intermittent event is an abnormal charging intermittent event according to the power adapter information and the charging intermittent information; if the historical charging intermittent event is an abnormal charging intermittent event, the current charging current is reduced, and the power adapter is controlled to charge the electronic device based on the reduced charging current. That is, in the embodiment of the present application, when solving the charging intermittent problem, the electronic device obtains the power adapter information of the power adapter connected to the electronic device for the charging intermittent event, and on the other hand, obtains the charging intermittent information of the historical charging intermittent event, and then, in combination with the power adapter information and the charging intermittent information, makes a comprehensive judgment on the historical charging intermittent event, and when it is judged that the historical charging intermittent event is an abnormal charging intermittent event, controls the charging current of the power adapter to be reduced, so as to solve the charging intermittent problem. That is to say, by adopting the charging control method proposed in the embodiment of the present application, it is possible to determine not only whether the power adapter is an abnormal power adapter based on the power adapter information, but also whether the historical charging intermittent event is an abnormal charging intermittent event that occurs passively in the electronic device based on the charging intermittent information; that is, it is possible to accurately identify not only the abnormal power adapter, but also the abnormal charging intermittent, exclude the active intermittent of the electronic device caused by normal reasons, identify the charging intermittent events of the electronic device from multiple dimensions, and improve the recognition accuracy of the charging intermittent, so as to better solve the charging intermittent problem of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0027] Figure 1 An application environment diagram of a charging control method in an embodiment;

[0028] Figure 2 is a flow chart of a charging control method in one embodiment;

[0029] Figure 3 is a flow chart of a charging control method in another embodiment;

[0030] Figure 4 is a flow chart of a charging control method in another embodiment;

[0031] Figure 5is a flow chart of a charging control method in another embodiment;

[0032] Figure 6 is a flow chart of a charging control method in another embodiment;

[0033] Figure 7 is a flow chart of a charging control method in another embodiment;

[0034] Figure 8 is a flow chart of a charging control method in another embodiment;

[0035] Fig. 9 is a flow chart of a charging control method in another embodiment;

[0036] Fig.10 A complete flow chart of a charging control method in one embodiment;

[0037] Fig.11 is a structural block diagram of a charging control device in one embodiment;

[0038] Fig.12 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0040] With the continuous development of charging technology, there are more and more types of high-power charging protocols, especially fast charging protocols for mobile phone charging, such as PPS, UFCS, VOOC, SVOOC, etc.; accordingly, the design of the adapter is also developing towards supporting many charging protocols, that is, the adapter supports multiple fast charging protocols, and the choice of charging protocol is determined by the electronic device. The electronic device communicates with the adapter based on the processes of various fast charging protocols, and then selects the fast charging protocol supported by both the adapter and the electronic device for fast charging.

[0041] In the related technology, there is an adapter that can support the PPS fast charging protocol and the SVOOC fast charging protocol. When executing the SVOOC fast charging protocol, the adapter will probabilistically cause charging interruptions because the VBUS+GND impedance of the abnormal cable, which is easy to reproduce, is about 180mΩ, and the estimated GND impedance is 90mΩ. If the GND impedance of the abnormal cable is reduced, the charging current will not be abnormal at 6.3A. When the GND impedance of the abnormal cable is increased, even if the charging current is reduced to 4A, it may trigger repeated interruptions.

[0042] Normally, the MCU chip in the fast charging adapter is set to execute the VOOC&SVOOC protocol with a voltage level less than the low-level threshold of 1.1V. That is, when the voltage level is low, the VOOC&SVOOC protocol is executed, and when the voltage level is high, the VOOC&SVOOC protocol is not executed. However, in actual tests, it was found that as long as the low level reaches 0.7V, the adapter will receive errors. That is, the actual voltage level is 0.7V, but the adapter mistakenly identifies it as 1.1V, causing the adapter to misread the 0 sent by the electronic device as 1, resulting in a frame error, which ultimately leads to abnormal fast charging communication and intermittent charging problems.

[0043] In the prior art, when solving the problem of intermittent charging, for abnormal power adapters that have actually had intermittent charging problems, by identifying whether the ID of the fast charging adapter is the ID of the abnormal power adapter, if the fast charging adapter is determined to be an abnormal power adapter, if the fast charging adapter is intermittent for three consecutive times, it will be subjected to current reduction processing, and the current reduction setting is reduced from 6A to 4A. Among them, the ID of the abnormal power adapter judged here is the ID divided based on the power of the adapter. For example, for a 65W adapter, its ID is uniformly set to 0X14. In addition, it should be noted that after reducing the current, the floating pressure of the adapter will be reduced accordingly. When the floating pressure is reduced, the collected level data will be more accurate, thereby avoiding level recognition errors, accurately identifying the low-level signal sent by the electronic device, and realizing continuous fast charging of the electronic device to solve the problem of intermittent charging.

[0044] However, there are many problems with the existing solutions to the intermittent charging problem of abnormal power adapters. First, there are many different manufacturers and batches of fast-charging adapters with the same power. It is impossible to accurately identify abnormal power adapters based only on the adapter ID divided by power, and it will also affect the normal fast charging of non-abnormal power adapters; secondly, it is not reasonable to directly reduce the charging current to 4A; because the GND impedance will increase with the aging of the wire, setting it to 5A in the early stage may solve the problem of intermittent charging, but setting it to 4A in the later stage may still cause inaccurate level detection and intermittent charging.

[0045] Based on this, an embodiment of the present application proposes a charging control method for accurately identifying abnormal power adapters.

[0046] Figure 1 FIG. 1 is a schematic diagram of an application environment of a charging control method in an embodiment. Figure 1As shown, the application environment includes an electronic device 120, and the electronic device 120 can obtain the power adapter information and charging intermittent information of the historical charging intermittent event when the electronic device is connected to the power adapter; determine whether the historical charging intermittent event is an abnormal charging intermittent event based on the power adapter information and the charging intermittent information; if the historical charging intermittent event is an abnormal charging intermittent event, reduce the current charging current, and control the power adapter to charge the electronic device based on the reduced charging current. Among them, the electronic device 120 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc.

[0047] Figure 2 FIG. 1 is a flow chart of a charging control method in an embodiment. The charging control method in this embodiment is operated at Figure 1 The electronic device in the example is used to describe. Figure 2 As shown, the charging control method includes steps 220 to 260, wherein:

[0048] Step 220: When the electronic device is connected to a power adapter, power adapter information and charging intermittent information of historical charging intermittent events are obtained.

[0049] Among them, when the electronic device is connected to the power adapter, the power adapter charges the electronic device, which can be fast charging or normal charging. During the charging process, the power adapter and the electronic device may be disconnected from each other. The charging disconnection may include a physical disconnection, that is, unplugging the power adapter from the charging port of the electronic device; of course, it may also include a non-physical disconnection, that is, the charging port of the power adapter is physically connected to the charging port of the electronic device, but the power adapter suspends providing charging current to the electronic device; for non-physical charging disconnection, usually after a period of time of charging disconnection, the power adapter will re-establish the charging connection with the electronic device, thereby continuing to charge the electronic device. It should be noted that in the embodiment of the present application, the non-physical disconnection can be for fast charging, disconnecting the fast charging, but still performing normal charging; of course, it can also be for the entire charging, directly suspending the charging of the electronic device.

[0050] Generally, non-physical disconnection can include active disconnection of electronic devices, such as: the electronic device actively exits fast charging due to over-temperature, and can also include passive disconnection of electronic devices, such as: passive exit from fast charging due to incorrect fast charging level recognition caused by large GND impedance. Therefore, when solving the intermittent charging problem of abnormal power adapters, it is necessary not only to accurately identify the abnormal power adapter, but also to accurately identify whether the charging intermittent event is an abnormal charging intermittent event caused by large GND impedance. Only then can the abnormal charging intermittent problem of the abnormal power adapter be accurately solved by reducing its charging current.

[0051] Exemplarily, when the electronic device is connected to a power adapter, the power adapter information and charging intermittent information of the historical charging intermittent events can be obtained to determine whether the historical charging intermittent events are abnormal charging intermittent events corresponding to the abnormal power adapter.

[0052] The historical charging intermittent event may be a charging intermittent event that is adjacent to the current charging connection event and occurs before the current charging connection event.

[0053] The power adapter information can be used to characterize the identity of the power adapter and accurately identify whether the power adapter connected to the electronic device is an abnormal power adapter with intermittent charging problems. For example, the power adapter information can include but is not limited to the identity information of the power adapter, such as the manufacturer information and product information of the power adapter; the power adapter information can also include the working status of the power adapter, which can include a normal state and an abnormal state, to characterize whether the power adapter is an abnormal power adapter.

[0054] In addition, the charging intermittent information may include information related to charging intermittent corresponding to historical charging intermittent events, such as: at least one information such as intermittent duration and intermittent cause; used to determine whether the historical charging intermittent event is an abnormal charging intermittent event or a normal charging intermittent event.

[0055] Step 240: Determine whether the historical charging intermittent event is an abnormal charging intermittent event based on the power adapter information and the charging intermittent information.

[0056] Exemplarily, the electronic device can first determine whether the power adapter connected to the electronic device is an abnormal power adapter based on the power adapter information and the preset abnormal power adapter information; when it is determined that the power adapter is an abnormal power adapter, it can further determine whether the historical charging intermittent event is an abnormal charging intermittent event based on the charging intermittent information and the preset charging intermittent conditions.

[0057] For example, if the power adapter is not a preset abnormal power adapter, and the power adapter also has the above abnormal charging intermittent event, then the charging control method proposed in the embodiment of the present application can also be used for the power adapter to adjust the charging current of the power adapter. In addition, for the power adapter, the abnormal charging problem of the power adapter can also be reported, and the power adapter information can be added to the preset abnormal power adapter information to achieve automatic update of the preset abnormal power adapter information.

[0058] Step 260: If the historical charging intermittent event is an abnormal charging intermittent event, the current charging current is reduced, and the power adapter is controlled to charge the electronic device based on the reduced charging current.

[0059] Exemplarily, when the electronic device identifies that the historical charging intermittent event is an abnormal charging intermittent event, the electronic device can reduce the current charging current, which can be the charging current provided by the power adapter to the electronic device before the historical charging intermittent event occurs.

[0060] Assuming that the historical charging intermittent event is an active charging intermittent event of the electronic device, the power adapter will continue to charge the electronic device based on the current charging current; if the historical charging intermittent event is an abnormal charging intermittent event, then it is necessary to reduce the current charging current so that the power adapter can charge the electronic device based on the reduced charging current. After reducing the charging current of the power adapter, the power adapter may accurately identify the low-level signal sent by the electronic device, and then it will execute the fast charging protocol to fast charge the electronic device.

[0061] For example, when reducing the current charging current, the electronic device may reduce the current charging current according to the preset current reduction step size to obtain the reduced charging current; the electronic device may also use a preset current algorithm to determine the reduced charging current based on at least one of the current charging current, the service life of the power adapter, and the preset charging conditions of the electronic device. After determining the reduced charging current, the electronic device may control the power adapter to charge the electronic device based on the reduced charging current.

[0062] In an embodiment of the present application, when the electronic device is connected to a power adapter, the power adapter information and charging intermittent information of the historical charging intermittent event are obtained; based on the power adapter information and charging intermittent information, it is determined whether the historical charging intermittent event is an abnormal charging intermittent event; if the historical charging intermittent event is an abnormal charging intermittent event, the current charging current is reduced, and the power adapter is controlled to charge the electronic device based on the reduced charging current. That is, in an embodiment of the present application, when solving the charging intermittent problem, the electronic device obtains the power adapter information of the power adapter connected to the electronic device for the charging intermittent event, and on the other hand, the charging intermittent information of the historical charging intermittent event is obtained. Then, the historical charging intermittent event is comprehensively judged in combination with the power adapter information and the charging intermittent information, and when it is determined that the historical charging intermittent event is an abnormal charging intermittent event, the charging current of the power adapter is controlled to be reduced, so as to solve the charging intermittent problem. That is to say, by adopting the charging control method proposed in the embodiment of the present application, it is possible to determine not only whether the power adapter is an abnormal power adapter based on the power adapter information, but also whether the historical charging intermittent event is an abnormal charging intermittent event that occurs passively in the electronic device based on the charging intermittent information; that is, it is possible to accurately identify not only the abnormal power adapter, but also the abnormal charging intermittent, exclude the active intermittent of the electronic device caused by normal reasons, identify the charging intermittent events of the electronic device from multiple dimensions, and improve the recognition accuracy of the charging intermittent, so as to better solve the charging intermittent problem of the electronic device.

[0063] In the previous embodiment, a charging control method is described, in which the power adapter information and charging intermittent information of the historical charging intermittent event are obtained when the electronic device is connected to the power adapter, and whether the historical charging intermittent event is an abnormal charging intermittent event is determined based on the power adapter information and the charging intermittent information. If the historical charging intermittent event is an abnormal charging intermittent event, the current charging current is reduced, and the power adapter is controlled to charge the electronic device based on the reduced charging current. In this embodiment, Figure 3 As shown, step 220 is described in detail, obtaining the power adapter information and charging intermittent information of the historical charging intermittent events, wherein the power adapter information may include the working status of the power adapter; the charging intermittent information may include the charging intermittent duration and the charging intermittent reason; then, step 220 includes:

[0064] Step 222, obtaining the charging intermittent duration and charging intermittent cause of historical charging intermittent events.

[0065] Exemplarily, the electronic device may monitor charging intermittent events, and when a charging intermittent event is detected, determine and record the charging intermittent duration and the cause of the charging intermittent event, so as to provide a basis for charging intermittent analysis for the next charging connection event.

[0066] Exemplarily, for the charging intermittent duration, the electronic device can obtain the charging disconnection time corresponding to the historical charging intermittent event and the charging connection time corresponding to the current charging connection event; wherein the current charging connection event is adjacent to the historical charging intermittent event; then, according to the charging connection time and the charging disconnection time, the charging intermittent duration of the historical charging intermittent event is determined. That is, the interval between the charging disconnection time corresponding to the historical charging intermittent event and the charging connection time corresponding to the current charging connection event is the charging intermittent duration corresponding to the historical charging intermittent event.

[0067] Step 224: Acquire the identity information of the power adapter from the power adapter based on the communication connection between the electronic device and the power adapter.

[0068] Exemplarily, the electronic device may send an identity information acquisition request to the power adapter based on the communication connection between the electronic device and the power adapter to instruct the power adapter to send the identity information of the power adapter to the electronic device, thereby acquiring the identity information of the power adapter.

[0069] Optionally, the identity information of the power adapter may include manufacturer information and product information of the power adapter, wherein the product information of the power adapter may be used to characterize production batch information of the power adapter.

[0070] Step 226: Determine the working status of the power adapter according to the identity information of the power adapter.

[0071] Among them, the working state of the power adapter can include an abnormal state or a normal state. The abnormal state can be used to characterize that the power adapter has experienced abnormal charging intermittent events in the historical charging process, and the normal state can be used to characterize that the power adapter has not experienced abnormal charging intermittent events.

[0072] Exemplarily, the electronic device can determine whether the power adapter is an abnormal power adapter based on the identity information of the power adapter and a preset set of identity information of abnormal power adapters; when it is determined that the power adapter is an abnormal power adapter, it can be determined that the working state of the power adapter is an abnormal state; when it is determined that the power adapter is not an abnormal power adapter, it can be determined that the working state of the power adapter is a normal state.

[0073] Exemplarily, in a case where the identity information of the power adapter includes the manufacturer information and product information of the power adapter, the identity information set of the preset abnormal power adapter may include the manufacturer information and product information of each abnormal power adapter; the electronic device may compare the identity information of the power adapter with the identity information of each abnormal power adapter in turn to see whether they are completely consistent; in a case where the comparison shows that the identity information of a certain abnormal power adapter is completely consistent with the identity information of the power adapter, it can be determined that the power adapter is an abnormal power adapter.

[0074] In the embodiment of the present application, on the one hand, the electronic device can obtain the charging intermittent duration and charging intermittent cause of the historical charging intermittent event; on the other hand, the electronic device can obtain the identity information of the power adapter from the power adapter based on the communication connection between the electronic device and the power adapter, and determine the working state of the power adapter according to the identity information of the power adapter; wherein the working state of the power adapter includes an abnormal state or a normal state. That is, in the embodiment of the present application, the electronic device can monitor the charging intermittent event, and determine and record the charging intermittent duration and charging intermittent cause corresponding to the charging intermittent event, so as to provide data support for the charging connection after the charging intermittent event; in addition, the electronic device can also obtain the identity information of the power adapter from the power adapter based on the communication connection with the power adapter when monitoring the occurrence of the charging intermittent event, and determine the working state of the power adapter based on the identity information of the power adapter, thereby providing a basis for judging the abnormal power adapter for the charging connection after the charging intermittent event; it can improve the recognition accuracy of the abnormal charging intermittent event of the abnormal power adapter.

[0075] In the previous embodiment, it is described that the electronic device can obtain the charging intermittent duration and charging intermittent cause of historical charging intermittent events; and based on the communication connection between the electronic device and the power adapter, obtain the identity information of the power adapter from the power adapter; and then, determine the working state of the power adapter according to the identity information of the power adapter; the working state includes abnormal state or normal state. In this embodiment, Figure 4 As shown, step 224 is described in detail, based on the communication connection between the electronic device and the power adapter, obtaining the identity information of the power adapter from the power adapter, including:

[0076] Step 224a: determine the type of communication interface between the electronic device and the power adapter.

[0077] Step 224b: Send an identity information acquisition request to the power adapter according to the communication protocol corresponding to the communication interface type.

[0078] The identity information acquisition request is used to instruct the power adapter to send the identity information of the power adapter to the electronic device.

[0079] Step 224c, receiving the identity information of the power adapter.

[0080] That is to say, in the embodiment of the present application, when the electronic device sends an identity information acquisition request to the power adapter, it needs to send the identity information acquisition request to the power adapter in accordance with the communication protocol between the electronic device and the power adapter; and the communication protocol between the electronic device and the power adapter can be determined based on the type of communication interface between the electronic device and the power adapter; if the electronic device uses a communication protocol other than that between the electronic device and the power adapter to send an identity information acquisition request to the power adapter, it may cause the power adapter to be unable to receive or recognize the identity information acquisition request, which may cause the electronic device to be unable to obtain its own identity information from the power adapter.

[0081] In the embodiment of the present application, the electronic device first determines the type of communication interface between the electronic device and the power adapter; then, according to the communication protocol corresponding to the communication interface type, sends an identity information acquisition request to the power adapter; instructing the power adapter to send the identity information of the power adapter to the electronic device, thereby receiving the identity information of the power adapter. The reliability and accuracy of the electronic device acquiring the identity information of the power adapter from the power adapter can be improved.

[0082] In the previous embodiment, it is described that the electronic device can obtain the charging intermittent duration and charging intermittent cause of historical charging intermittent events; and based on the communication connection between the electronic device and the power adapter, obtain the identity information of the power adapter from the power adapter; and then, determine the working state of the power adapter according to the identity information of the power adapter; the working state includes abnormal state or normal state. In this embodiment, Figure 5 As shown, step 226 is described in detail, determining the working state of the power adapter according to the identity information of the power adapter, including:

[0083] Step 226a, obtaining a set of identity information of a preset abnormal power adapter.

[0084] Among them, the working state of the preset abnormal power adapter is an abnormal state, that is, the identity information set of the preset abnormal power adapter includes the identity information of one or more abnormal power adapters, and the abnormal power adapter is a power adapter that has had abnormal charging intermittent events in the past.

[0085] Exemplarily, the electronic device may request a preset server to obtain a set of identity information of a preset abnormal power adapter, wherein the preset server may be a server corresponding to the service provider of the electronic device, or the preset server may also be a server corresponding to the service provider of the power adapter, etc.

[0086] Step 226b: Based on the identity information of the power adapter and the preset identity information set of abnormal power adapters, determine whether the identity information set includes the identity information of the power adapter.

[0087] Exemplarily, the electronic device can compare the identity information of the power adapter and the identity information of each abnormal power adapter in a preset identity information set of abnormal power adapters. If the preset identity information set of abnormal power adapters includes the identity information of an abnormal power adapter that is completely consistent with the identity information of the power adapter, it can be determined that the identity information set includes the identity information of the power adapter.

[0088] Step 226c: if it is determined that the identity information set includes the identity information of the power adapter, it is determined that the working state of the power adapter is an abnormal state.

[0089] Exemplarily, when the electronic device determines that the identity information set includes the identity information of the power adapter, the electronic device may consider the power adapter to be an abnormal power adapter, and thus, may determine that the working state of the power adapter is an abnormal state.

[0090] In the embodiment of the present application, the electronic device obtains the identity information set of the preset abnormal power adapter; then, based on the identity information of the power adapter and the identity information set of the preset abnormal power adapter, it is determined whether the identity information set includes the identity information of the power adapter; if it is determined that the identity information set includes the identity information of the power adapter, it is determined that the working state of the power adapter is an abnormal state. That is, in the embodiment of the present application, based on the identity information of each abnormal power adapter included in the identity information set of the preset abnormal power adapter and the identity information of the power adapter, it is determined whether the power adapter connected to the electronic device and having an abnormal charging intermittent event is an abnormal power adapter; because the identity information of the power adapter can accurately represent a power adapter of a certain manufacturer or a certain batch, therefore, compared with the ID information of the power adapter that is generally divided according to the power of the power adapter, it can accurately identify the abnormal power adapter, thereby improving the efficiency of solving the charging intermittent problem of the abnormal power adapter.

[0091] In the previous embodiment, a charging control method is described, in which the power adapter information and charging intermittent information of the historical charging intermittent event are obtained when the electronic device is connected to the power adapter, and whether the historical charging intermittent event is an abnormal charging intermittent event is determined based on the power adapter information and the charging intermittent information. If the historical charging intermittent event is an abnormal charging intermittent event, the current charging current is reduced, and the power adapter is controlled to charge the electronic device based on the reduced charging current. In this embodiment, Figure 6As shown, step 240 is described in detail, and according to the power adapter information and the charging intermittent information, determining whether the historical charging intermittent event is an abnormal charging intermittent event includes:

[0092] Step 242, determining whether the working state of the power adapter is an abnormal state or a normal state.

[0093] Step 244, if it is determined that the working state of the power adapter is abnormal, it is determined whether the charging intermittent duration meets the preset charging intermittent duration condition, and whether the charging intermittent cause does not belong to the preset charging intermittent cause.

[0094] Among them, the preset charging intermittent duration condition includes that the charging intermittent duration is less than or equal to the preset charging intermittent duration threshold; the preset charging intermittent reason includes the normal charging intermittent reason.

[0095] Step 246: If the charging intermittent duration of the historical charging intermittent event meets the preset charging intermittent duration condition, and the charging intermittent cause does not belong to the preset charging intermittent cause, then determine that the historical charging intermittent event is an abnormal charging intermittent event.

[0096] That is to say, in the embodiment of the present application, when the current charging connection event occurs, the electronic device first determines whether the power adapter is an abnormal power adapter in an abnormal state based on the working state of the power adapter corresponding to the historical charging intermittent event; when it is determined that the power adapter is an abnormal power adapter, it continues to determine whether the charging intermittent duration corresponding to the historical charging intermittent event is less than or equal to the preset charging intermittent duration threshold, and determines whether the charging intermittent cause corresponding to the historical charging intermittent event does not belong to the preset normal charging intermittent cause; if the charging intermittent duration and the charging intermittent cause both meet the corresponding preset abnormal charging intermittent conditions, then it can be determined that the historical charging intermittent event is an abnormal charging intermittent event.

[0097] In an embodiment of the present application, the electronic device comprehensively determines whether the historical charging intermittent event is an abnormal charging intermittent event based on the working status of the power adapter corresponding to the historical charging intermittent event, the charging intermittent duration and the charging intermittent cause. This can improve the accuracy of identifying abnormal charging intermittent events, effectively eliminate the normal charging intermittent situation of the electronic device, and thereby improve the solution effect to the abnormal charging intermittent problem.

[0098] In the previous embodiment, a charging control method is described, in which the power adapter information and charging intermittent information of the historical charging intermittent event are obtained when the electronic device is connected to the power adapter, and whether the historical charging intermittent event is an abnormal charging intermittent event is determined based on the power adapter information and the charging intermittent information. If the historical charging intermittent event is an abnormal charging intermittent event, the current charging current is reduced, and the power adapter is controlled to charge the electronic device based on the reduced charging current. In this embodiment, Figure 7 As shown, step 260 is described in detail, controlling the power adapter to charge the electronic device based on the reduced charging current, including:

[0099] Step 262, obtaining the number of occurrences of abnormal charging intermittent events.

[0100] Among them, the number of occurrences of abnormal charging intermittent events is the number of occurrences of abnormal charging intermittent events when no physical charging disconnection occurs during the charging process. If a physical charging disconnection occurs, the number of occurrences of abnormal charging intermittent events needs to be re-recorded after the physical charging is connected. Of course, in another implementation method, if the disconnection duration of the physical disconnection is less than or equal to the preset disconnection duration threshold, and the power adapter after the physical connection has not changed, the number of occurrences of abnormal charging intermittent events can continue to be accumulated, and this physical disconnection may not belong to an abnormal charging intermittent event.

[0101] That is to say, when the electronic device is physically connected to the power adapter, the electronic device monitors the charging intermittent event. If it is determined that the charging intermittent event is an abnormal charging intermittent event, the number of occurrences of the abnormal charging intermittent event is increased by 1; if it is determined that the charging intermittent event is neither an abnormal charging intermittent event nor a physical disconnection, the number of occurrences of the abnormal charging intermittent event remains unchanged.

[0102] Step 264, according to the number of occurrences of abnormal charging intermittent events, determine a preset charging current value corresponding to the number of occurrences.

[0103] The preset charging current value decreases as the number of occurrences increases.

[0104] That is, when an abnormal charging intermittent event occurs in the electronic device, the charging current value of the electronic device is reduced, and then, when the abnormal charging intermittent event occurs again in the electronic device, the charging current value of the electronic device continues to be reduced.

[0105] Exemplarily, the electronic device can calculate the preset charging current value corresponding to the number of occurrences according to the preset current reduction step, the initial charging current value, and the number of occurrences of abnormal charging intermittent events. The initial charging current value is the charging current value provided by the power adapter to the electronic device when the electronic device is initially connected to the power adapter. For example: the preset charging current value corresponding to the number of occurrences = initial charging current value - preset current reduction step × number of occurrences of abnormal charging intermittent events.

[0106] Step 266: Control the power adapter to charge the electronic device based on a preset charging current value.

[0107] In the embodiment of the present application, the electronic device obtains the number of occurrences of abnormal charging intermittent events, and then determines the preset charging current value corresponding to the number of occurrences according to the number of occurrences of the abnormal charging intermittent events; and then controls the power adapter to charge the electronic device based on the preset charging current value; wherein the preset charging current value decreases as the number of occurrences increases. That is, in the embodiment of the present application, the electronic device gradually reduces the charging current value provided by the power adapter to the electronic device according to the number of occurrences of abnormal charging intermittent events, so as to achieve the purpose of gradually reducing the current, thereby achieving refined current control in the case of abnormal charging intermittent events, and improving the effect of solving the problem of abnormal charging intermittent events.

[0108] In the previous embodiment, a charging control method is described, where the electronic device obtains the number of occurrences of abnormal charging intermittent events, and then determines a preset charging current value corresponding to the number of occurrences according to the number of occurrences of the abnormal charging intermittent events; and then controls the power adapter to charge the electronic device based on the preset charging current value. In this embodiment, Figure 8 As shown, step 264 is described in detail, and according to the number of occurrences of abnormal charging intermittent events, a preset charging current value corresponding to the number of occurrences is determined, including:

[0109] Step 264a, determining whether the number of occurrences of abnormal charging intermittent events is greater than a preset number threshold.

[0110] Among them, the preset number threshold can be used to characterize the number of abnormal charging intermittent events that are allowed to occur during the fast charging process of the electronic device. When the number of abnormal charging intermittent events does not exceed the preset number threshold, the electronic device can be charged based on the fast charging current value corresponding to the fast charging protocol; when the number of abnormal charging intermittent events exceeds the preset number threshold, the fast charging can be exited and the electronic device can be charged based on the current value corresponding to the ordinary charging protocol; wherein the current value corresponding to the ordinary charging protocol is less than the fast charging current value corresponding to the fast charging protocol.

[0111] Based on this, when it is determined that the historical charging intermittent event is an abnormal charging intermittent event, the number of occurrences of the abnormal charging intermittent event is accumulated and added by 1. Then, it can be determined whether the number of occurrences of the abnormal charging intermittent event is greater than the preset number threshold, and based on the judgment result, the preset charging current value corresponding to the number of occurrences is further determined.

[0112] Step 264b, if the number of occurrences is less than or equal to the preset number threshold, determine that the preset charging current value corresponding to the number of occurrences is a first preset charging current value; the first preset charging current value is inversely proportional to the number of occurrences.

[0113] Among them, the first preset charging current value is a fast charging current value within the fast charging current range corresponding to the fast charging protocol; the fast charging current range may include multiple charging current values ​​greater than or equal to a preset number threshold, and each charging current value is inversely proportional to the number of occurrences, that is, the greater the number of occurrences, the smaller the corresponding charging current value.

[0114] Exemplarily, the electronic device may first obtain a preset charging current set; the preset charging current set includes multiple preset charging current values; wherein the number of preset charging current values ​​may be greater than or equal to a preset number threshold, and the number of occurrences of each abnormal charging intermittent event corresponds to the preset charging current value; then, the electronic device may determine a target preset charging current value corresponding to the number of occurrences from the multiple preset charging current values; and use the target preset charging current value as the first preset charging current value.

[0115] Step 264c: if the number of occurrences is greater than the preset number threshold, determine that the preset charging current value corresponding to the number of occurrences is a second preset charging current value.

[0116] Among them, the second preset charging current value is less than the preset charging current value corresponding to the preset number threshold, that is, the second preset charging current value is a current value corresponding to the common charging protocol that is less than the minimum fast charging current value.

[0117] In the embodiment of the present application, it is determined whether the number of occurrences of abnormal charging intermittent events is greater than a preset number threshold; if the number of occurrences is less than or equal to the preset number threshold, the preset charging current value corresponding to the number of occurrences is determined to be a first preset charging current value; wherein the first preset charging current value is inversely proportional to the number of occurrences; if the number of occurrences is greater than the preset number threshold, the preset charging current value corresponding to the number of occurrences is determined to be a second preset charging current value; wherein the second preset charging current value is less than the preset charging current value corresponding to the preset number threshold. That is, in the embodiment of the present application, the fast charging current value is gradually reduced according to the number of occurrences of abnormal charging intermittent events, and when the fast charging current value reaches the minimum fast charging current value, that is, when the number of occurrences of abnormal charging intermittent events is greater than the preset number threshold, fast charging is exited and converted to normal charging, thereby realizing a step-by-step reduction of the current, realizing refined current control under abnormal charging intermittent conditions, and improving the effect of solving the problem of abnormal charging intermittent.

[0118] In the previous embodiment, a charging control method is described, by obtaining a preset charging current set, determining a target preset charging current value corresponding to the number of occurrences from a plurality of preset charging current values; and using the target preset charging current value as the first preset charging current value. Fig. 9 As shown, it is detailed that determining a target preset charging current value corresponding to the number of occurrences from a plurality of preset charging current values ​​includes:

[0119] Step 920: Determine a first candidate charging current value corresponding to the number of occurrences from a preset charging current set.

[0120] Step 940, obtaining a second candidate charging current value corresponding to the electronic device; the second candidate charging current value is a minimum charging current value determined based on a plurality of preset charging conditions of the electronic device.

[0121] Exemplarily, the multiple preset charging conditions of the electronic device may include a charging current judgment condition determined based on at least one of a charging curve, a scene charging current, an impedance current, etc. Based on each preset charging condition, a minimum charging current value required by the electronic device is determined, and the minimum charging current value required by the electronic device is used as the second candidate charging current value corresponding to the electronic device.

[0122] Step 960: Determine the smallest candidate charging current value from the first candidate charging current value and the second candidate charging current value as the target preset charging current value corresponding to the number of occurrences.

[0123] In an embodiment of the present application, a first candidate charging current value corresponding to the number of occurrences is determined from a preset charging current set; at the same time, a second candidate charging current value corresponding to the electronic device is obtained; the second candidate charging current value is the minimum charging current value determined based on multiple preset charging conditions of the electronic device; then, from the first candidate charging current value and the second candidate charging current value, the minimum candidate charging current value is determined as the target preset charging current value corresponding to the number of occurrences. That is, in the embodiment of the present application, the electronic device determines a first candidate charging current value corresponding to the number of occurrences of abnormal charging intermittent events from the fast charging current range supported by the power adapter, and at the same time determines the minimum charging current supported by the electronic device as the second candidate charging current value of the electronic device based on multiple preset charging conditions of the electronic device; then, a smaller one is determined from the first candidate charging current value and the second candidate charging current value as the target preset charging current value corresponding to the number of occurrences; that is, in the embodiment of the present application, the minimum current value that the electronic device can accept and the minimum current value that the power adapter can provide are taken into account at the same time to finally determine the target preset charging current value provided by the power adapter for the electronic device; this method can ensure that in the event of abnormal charging intermittent, more suitable charging current values ​​are determined for the power adapter and the electronic device, thereby improving the reliability of charging.

[0124] In one embodiment, a specific implementation step of a charging control method is provided. Fig.10 Taking the electronic device as a mobile phone as an example, the charging control method may include the following steps:

[0125] Step 1, after the mobile phone is connected to the power adapter, the configuration file can be parsed first, and the configuration file may include the attribute support_check_adapter_abnormal. If it is equal to true, it means that the charging intermittent function provided in the embodiment of the present application is supported. If it is equal to false, it means that it does not support the charging intermittent function provided in the embodiment of the present application. In addition, when support_check_adapter_abnormal = true, the intermittent current configuration information can also be parsed from the configuration file, including the gear length abnormal_adapter_current_cnt of the total intermittent current and the specific charging current array abnormal_adapter_current; for example: the gear length abnormal_adapter_current_cnt of the total intermittent current can be equal to 5, then the corresponding charging current array value abnormal_adapter_current = [5A, 4A, 3A, 2A, 1A].

[0126] Step 2: During the initial charging connection, related variables may be initialized, including: Is_abnormal_adapter=false, Pre_is_abnormal_adapter=false, Adnormal_adapter_dis_cnt=0, and atach_time=detach_time=0.

[0127] Among them, Is_abnormal_adapter represents the identification of the abnormal power adapter (true means yes, false means no); in addition, since the unplugging interrupt triggered each time a charging intermittent event occurs will clear the value of is_abnormal_adapter, Pre_is_abnormal_adapter is needed to record the properties of is_abnormal_adapter; and Adnormal_ad apter_dis_cnt represents the number of occurrences of abnormal charging intermittent events, and the initial number of occurrences is equal to 0; atach_time is used to record the system time of the corresponding charging connection event when the power adapter is inserted, that is, the charging connection time, and detach_time is used to record the system time of the corresponding charging intermittent event when the power adapter is unplugged, that is, the charging disconnection time, and the initial settings of both are equal to 0.

[0128] Step 3, insert the fast charging adapter, first generate a plugin interrupt, in the interrupt handler will update the atach_time time equal to the current system running time, and obtain the last exit reason of fast charging, including known reasons and unknown reasons, known reasons are the reasons why the electronic device actively exits fast charging, such as abnormal impedance intermittent, actively cut off the fast charging switch to exit fast charging (such as high temperature needs to exit fast charging), etc.; unknown reasons may include the reasons for exiting fast charging due to errors in receiving data by the power adapter caused by abnormal GND impedance.

[0129] If Pre_is_abnormal_adapter is equal to true, and the current insertion time minus the last plug-in time is within 1000ms, that is, the intermittent charging duration is within 1000ms, and the reason for the last fast charge exit is unknown, that is, Fig.10 The conditional judgment formula shown in the flowchart shown is: (atach_time-detach_time<=1000)&&fastchg_exit_reason==unknown reason, then it will be considered that the last plugging and unplugging was an abnormal plugging and unplugging, that is, an abnormal charging intermittent event; the Abnor mal_adapter_dis_cnt that records the number of intermittent times will be executed +1, otherwise it is not intermittent.

[0130] Step 4, if the power adapter is a C-port adapter, and there is communication between it and the electronic device on CC, then the power adapter will broadcast its voltage and current output capabilities through the CC communication line; the mobile phone thus knows that it is a C-port adapter, and it can ask the power adapter for its identity information through the PPS protocol, that is, send a getidentify info communication packet to the power adapter; after receiving the get identify info communication packet, the power adapter will first send an ack signal to the mobile phone, and then the power adapter will send an identify data packet to the mobile phone. The mobile phone obtains the SVID information of the power adapter by parsing the identify data packet, and obtains the VDOS information of the power adapter by parsing the source cap data packet.

[0131] Among them, the SVID information of the power adapter can represent the manufacturer information of the power adapter. The SVID of power adapters authorized by different manufacturers is different, for example, the SVID of OPPO is 0x22d9; in addition, the vdos information of the power adapter is information containing a specific product ID (i.e., product ID), for example, the product ID of an abnormal adapter is 0x20002; if the SVID of the power adapter is 0x22d9 and the vdos is 0x20002, the flag Is_abnormal_adapter can be set to true, otherwise Is_abnormal_adapter is set to false.

[0132] 5. Determine whether the number of intermittent times has reached the maximum number, that is, if the minimum current value in the intermittent array is set, there will still be intermittent charging problems. In this case, the mobile phone cannot be charged through fast charging, and it is switched to charging through normal charging. Fig.10 If the comparison condition Abnormal_adapter_dis_cnt>abnormal_adapter_current_cnt in the flowchart shown, normal charging will be used, otherwise it will switch to the fast charging switch and enable the VOOC fast charging module to execute the fast charging protocol.

[0133] 6. After the fast charging communication is established, the power adapter will ask the mobile phone for the fast charging current. The fast charging current is determined by many factors, such as the charging curve, scene charging current, impedance current, etc. The minimum value of all factors is taken as the target target_current current to apply for current from the power adapter; but if the number of discontinuities is greater than 0, indicating that there is discontinuity, then the selection of target_current also needs to be compared with abnormal_current. Abnormal_current is the maximum fast charging current allowed by the abnormal adapter, and its value comes from an element in the configured discontinuous current array; the specific element selection depends on the number of discontinuities Abnormal_adapter_dis_cnt>0, Abnormal_current=abnormal_adapter_current[Abnormal_adapter_dis_cnt], for example, Abnormal_adapter_dis_cnt=1 time, then Abnormal_current=5A; if Abnormal_adapter_dis_c nt=2 times, then Abnormal_current=4A, and so on.

[0134] Then, the target current is set to the minimum value between target_current and abnormal_current excluding the abnormal adapter factor, that is, target current target_current = min (target_current, abnormal_current). Then, target_current is applied to the fast charging adapter.

[0135] 7. If there is no interruption or unplugging, the fast charging communication is maintained, and the power adapter will keep asking the fast charging current on the mobile phone. If there is an interruption or unplugging, a plugout interrupt will be generated. In the unplugging interrupt handler, the detach_time time will be updated and the reason for the abnormal fast charging exit, fastchg_exit_reason, will be updated. Then Pre_is_abnormal_adapter is updated to the value of is_abnormal_adatapter, and Is_abnormal_adapter is set to false. Then determine whether the reason for the fast charging exit is a known reason. If it is a known reason, Pre_is_abnormal_adapte r can be set to false.

[0136] If it is physically unplugged at this time, the charging will end; if it is intermittent, after waiting for about 800ms, the power adapter will output again, and the plug-in interrupt will be generated again on the mobile phone side, returning to the above step 3, and repeating this cycle.

[0137] By adopting the charging control method in the embodiment of the present application, it is possible to accurately identify power adapters with excessively high GND impedance, eliminate scenarios of active intermittence and intermittence with known reasons, and realize step-by-step current regulation. By gradually reducing the current to seek the smoothing point of the "intermittent" current, it is possible to maximize the abnormal adapter's ability to fast charge electronic devices at the uninterrupted maximum power without affecting the normal power adapter, thereby ensuring that the abnormal power adapter is fast-charged at the maximum power under the current aging level, thereby achieving the best charging effect of the power adapter.

[0138] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0139] Based on the same inventive concept, the embodiment of the present application also provides a charging control device for implementing the charging control method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more charging control device embodiments provided below can refer to the limitations of the charging control method above, and will not be repeated here.

[0140] In one embodiment, Fig.11 As shown, a charging control device is provided, comprising: an acquisition module, a determination module and a control module, wherein:

[0141] An acquisition module, used to acquire power adapter information and charging intermittent information of historical charging intermittent events when the electronic device is connected to a power adapter;

[0142] A determination module, used to determine whether a historical charging intermittent event is an abnormal charging intermittent event based on the power adapter information and the charging intermittent information;

[0143] The control module is used to reduce the current charging current if the historical charging intermittent event is an abnormal charging intermittent event, and control the power adapter to charge the electronic device based on the reduced charging current.

[0144] In one embodiment, the power adapter information includes the working status of the power adapter; the charging intermittent information includes the charging intermittent duration and the charging intermittent reason; the acquisition module includes:

[0145] A first acquisition unit is used to acquire the charging intermittent duration and charging intermittent cause of historical charging intermittent events;

[0146] A second acquiring unit, configured to acquire identity information of the power adapter from the power adapter based on a communication connection between the electronic device and the power adapter;

[0147] The first determining unit is used to determine the working state of the power adapter according to the identity information of the power adapter; the working state includes an abnormal state or a normal state.

[0148] In one embodiment, the first acquisition unit includes:

[0149] The first acquisition subunit is used to acquire the charging disconnection time corresponding to the historical charging intermittent event and the charging connection time corresponding to the current charging connection event; the current charging connection event is adjacent to the historical charging intermittent event;

[0150] The first determining subunit is used to determine the charging intermittent duration of the historical charging intermittent event according to the charging connection time and the charging disconnection time.

[0151] In one embodiment, the second acquisition unit includes:

[0152] A second determining subunit, used to determine the type of communication interface between the electronic device and the power adapter;

[0153] The sending subunit is used to send an identity information acquisition request to the power adapter according to the communication protocol corresponding to the communication interface type; the identity information acquisition request is used to instruct the power adapter to send the identity information of the power adapter to the electronic device;

[0154] The receiving subunit is used to receive the identity information of the power adapter.

[0155] In one embodiment, the determining unit includes:

[0156] The second acquisition subunit is used to acquire a set of identity information of a preset abnormal power adapter; the working state of the preset abnormal power adapter is an abnormal state;

[0157] A first judging subunit is used to judge whether the identity information set includes the identity information of the power adapter according to the identity information of the power adapter and the preset identity information set of abnormal power adapters;

[0158] The third determining subunit is configured to determine that the working state of the power adapter is an abnormal state if it is determined that the identity information set includes the identity information of the power adapter.

[0159] In one embodiment, the determining module includes:

[0160] A first judging unit, used for judging whether the working state of the power adapter is an abnormal state or a normal state;

[0161] The second judgment unit is used to judge whether the charging intermittent duration meets the preset charging intermittent duration condition and whether the charging intermittent cause does not belong to the preset charging intermittent cause if it is judged that the working state of the power adapter is abnormal; the preset charging intermittent duration condition includes that the charging intermittent duration is less than or equal to the preset charging intermittent duration threshold; the preset charging intermittent cause includes the normal charging intermittent cause;

[0162] The second determining unit is used to determine that the charging intermittent event is an abnormal charging intermittent event if the charging intermittent duration of the charging intermittent event meets a preset charging intermittent duration condition and the charging intermittent cause does not belong to the preset charging intermittent cause.

[0163] In one embodiment, the control module includes:

[0164] A third acquisition unit is used to acquire the number of occurrences of abnormal charging intermittent events;

[0165] A third determining unit, configured to determine a preset charging current value corresponding to the number of occurrences of abnormal charging intermittent events according to the number of occurrences; the preset charging current value decreases as the number of occurrences increases;

[0166] The control unit is used to control the power adapter to charge the electronic device based on a preset charging current value.

[0167] In one embodiment, the third determining unit includes:

[0168] A second judgment subunit is used to judge whether the number of occurrences of abnormal charging intermittent events is greater than a preset number threshold;

[0169] A fourth determination subunit is used to determine that the preset charging current value corresponding to the number of occurrences is a first preset charging current value if the number of occurrences is less than or equal to a preset number threshold; the first preset charging current value is in inverse proportion to the number of occurrences;

[0170] The fifth determination subunit is used to determine that the preset charging current value corresponding to the number of occurrences is a second preset charging current value if the number of occurrences is greater than a preset number threshold; the second preset charging current value is less than the preset charging current value corresponding to the preset number threshold.

[0171] In one of the embodiments, the fourth determination subunit is used to obtain a preset charging current set; the preset charging current set includes multiple preset charging current values; the number of preset charging current values ​​is greater than or equal to a preset number threshold, and the number of occurrences of each abnormal charging intermittent event corresponds to the preset charging current value; from the multiple preset charging current values, determine the target preset charging current value corresponding to the number of occurrences; and use the target preset charging current value as the first preset charging current value.

[0172] In one of the embodiments, the fourth determination subunit is used to determine a first candidate charging current value corresponding to the number of occurrences from a preset charging current set; obtain a second candidate charging current value corresponding to the electronic device; the second candidate charging current value is a minimum charging current value determined based on multiple preset charging conditions of the electronic device; and determine the minimum candidate charging current value from the first candidate charging current value and the second candidate charging current value as the target preset charging current value corresponding to the number of occurrences.

[0173] The division of the various modules in the above-mentioned charging control device is only for illustration. In other embodiments, the charging control device can be divided into different modules as needed to complete all or part of the functions of the above-mentioned charging control device.

[0174] For the specific definition of the charging control device, please refer to the definition of the charging control method above, which will not be repeated here. Each module in the above-mentioned charging control device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0175] Fig.12Schematic diagram of the internal structure of an electronic device in an embodiment. The electronic device may be any terminal device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, etc. The electronic device includes a processor and a memory connected via a system bus. Among them, the processor may include one or more processing units. The processor may be a CPU (Central Processing Unit) or a DSP (Digital Signal Processing), etc. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by a processor to implement a charging control method provided in each of the following embodiments. The internal memory provides a cache operating environment for the operating system computer program in the non-volatile storage medium.

[0176] The implementation of each module in the charging control device provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on an electronic device. The program module constituted by the computer program may be stored in the memory of the electronic device. When the computer program is executed by the processor, the steps of the method described in the embodiment of the present application are implemented.

[0177] The embodiment of the present application also provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, the processors execute the steps of the charging control method.

[0178] An embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute a charging control method.

[0179] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0180] Any reference to memory, storage, database or other medium used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include ROM (Read-Only Memory), PROM (Programmable Read-only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-only Memory) or flash memory. Volatile memory may include RAM (Random Access Memory), which is used as an external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), SDRAM (Synchronous Dynamic Random Access Memory), Double Data Rate DDRSDRAM (Double Data Rate Synchronous Dynamic Random Access memory), ESDRAM (Enhanced Synchronous Dynamic Random Access memory), SLDRAM (Sync Link Dynamic Random Access Memory), RDRAM (Rambus Dynamic Random Access Memory), and DRDRAM (Direct Rambus Dynamic Random Access Memory).

[0181] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A charging control method, characterized in that: The method comprises: When the electronic device is connected to a power adapter, obtaining power adapter information and charging intermittent information of historical charging intermittent events; Determining whether the historical charging intermittent event is an abnormal charging intermittent event according to the power adapter information and the charging intermittent information; If the historical charging intermittent event is the abnormal charging intermittent event, the current charging current is reduced, and the power adapter is controlled to charge the electronic device based on the reduced charging current.

2. The method according to claim 1, characterized in that The power adapter information includes the working status of the power adapter; the charging intermittent information includes the charging intermittent duration and the charging intermittent reason; The obtaining of the power adapter information and charging intermittent information of the historical charging intermittent events includes: Obtain the charging intermittent duration and charging intermittent reasons of historical charging intermittent events; Based on the communication connection between the electronic device and the power adapter, obtaining the identity information of the power adapter from the power adapter; The working state of the power adapter is determined according to the identity information of the power adapter; the working state includes an abnormal state or a normal state.

3. The method according to claim 2, characterized in that The obtaining of the charging intermittent duration of the historical charging intermittent events includes: Obtaining a charging disconnection time corresponding to a historical charging intermittent event and a charging connection time corresponding to a current charging connection event; the current charging connection event is adjacent to the historical charging intermittent event; The charging intermittent duration of the historical charging intermittent event is determined according to the charging connection time and the charging disconnection time.

4. The method according to claim 2, characterized in that: The acquiring the identity information of the power adapter from the power adapter based on the communication connection between the electronic device and the power adapter includes: Determining a type of communication interface between the electronic device and the power adapter; According to the communication protocol corresponding to the communication interface type, sending an identity information acquisition request to the power adapter; the identity information acquisition request is used to instruct the power adapter to send the identity information of the power adapter to the electronic device; Receive the identity information of the power adapter.

5. The method according to claim 2, characterized in that: The step of determining the working state of the power adapter according to the identity information of the power adapter includes: Acquire a set of identity information of a preset abnormal power adapter; the working state of the preset abnormal power adapter is an abnormal state; According to the identity information of the power adapter and the identity information set of the preset abnormal power adapter, determining whether the identity information set includes the identity information of the power adapter; If it is determined that the identity information set includes the identity information of the power adapter, it is determined that the working state of the power adapter is an abnormal state.

6. The method according to any one of claims 2 to 5, characterized in that The determining, based on the power adapter information and the charging intermittent information, whether the historical charging intermittent event is an abnormal charging intermittent event includes: Determining whether the working state of the power adapter is an abnormal state or a normal state; If it is determined that the working state of the power adapter is abnormal, then it is determined whether the charging intermittent duration meets the preset charging intermittent duration condition, and whether the charging intermittent cause does not belong to the preset charging intermittent cause; the preset charging intermittent duration condition includes that the charging intermittent duration is less than or equal to the preset charging intermittent duration threshold; the preset charging intermittent cause includes a normal charging intermittent cause; If the charging intermittent duration of the historical charging intermittent event meets the preset charging intermittent duration condition, and the charging intermittent cause does not belong to the preset charging intermittent cause, the historical charging intermittent event is determined to be an abnormal charging intermittent event.

7. The method according to claim 1, characterized in that The step of reducing the current charging current and controlling the power adapter to charge the electronic device based on the reduced charging current includes: Obtaining the number of occurrences of the abnormal charging intermittent event; According to the number of occurrences of the abnormal charging intermittent event, determining a preset charging current value corresponding to the number of occurrences; the preset charging current value decreases as the number of occurrences increases; The power adapter is controlled to charge the electronic device based on the preset charging current value.

8. The method according to claim 7, characterized in that The determining, according to the number of occurrences of the abnormal charging intermittent event, a preset charging current value corresponding to the number of occurrences includes: Determine whether the number of occurrences of the abnormal charging intermittent event is greater than a preset number threshold; If the number of occurrences is less than or equal to the preset number threshold, determining that the preset charging current value corresponding to the number of occurrences is a first preset charging current value; the first preset charging current value is in inverse proportion to the number of occurrences; If the number of occurrences is greater than the preset number threshold, the preset charging current value corresponding to the number of occurrences is determined to be a second preset charging current value; the second preset charging current value is less than the preset charging current value corresponding to the preset number threshold.

9. The method according to claim 8, characterized in that The step of determining that the preset charging current value corresponding to the number of occurrences is a first preset charging current value comprises: Acquire a preset charging current set; the preset charging current set includes a plurality of preset charging current values; the number of the preset charging current values ​​is greater than or equal to the preset number threshold, and the number of occurrences of each of the abnormal charging intermittent events corresponds to the preset charging current value; Determining a target preset charging current value corresponding to the number of occurrences from the plurality of preset charging current values; The target preset charging current value is used as the first preset charging current value.

10. The method according to claim 9, characterized in that The step of determining a target preset charging current value corresponding to the number of occurrences from the plurality of preset charging current values ​​includes: Determining a first candidate charging current value corresponding to the number of occurrences from the preset charging current set; Acquire a second candidate charging current value corresponding to the electronic device; the second candidate charging current value is a minimum charging current value determined based on a plurality of preset charging conditions of the electronic device; A minimum candidate charging current value is determined from among the first candidate charging current value and the second candidate charging current value as a target preset charging current value corresponding to the number of occurrences.

11. A charging control device, characterized in that: The device comprises: An acquisition module, used to acquire power adapter information and charging intermittent information of historical charging intermittent events when the electronic device is connected to a power adapter; A determination module, configured to determine whether the historical charging intermittent event is an abnormal charging intermittent event according to the power adapter information and the charging intermittent information; The control module is used to reduce the current charging current if the historical charging intermittent event is the abnormal charging intermittent event, and control the power adapter to charge the electronic device based on the reduced charging current.

12. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.