Charging method and electronic device

By monitoring and controlling the charging device to suspend battery charging, it solves the problem that the battery charging process cannot be suspended when the communication signal is weak in the intelligent charging mode, extending the service life of the battery and ensuring the stability of the working circuit.

CN117674345BActive Publication Date: 2024-10-15HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311464519.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-06
Publication Date
2024-10-15
Estimated Expiration
2043-11-06

AI Technical Summary

Technical Problem

The existing smart charging mode cannot ensure that the remaining battery power is maintained at the preset power threshold and does not increase after the battery charging process is suspended in scenarios with weak communication signals, resulting in shortened battery life.

Method used

By monitoring the remaining battery power of the electronic device when the charger is connected, when the first power threshold is reached and within a specific period of time, the switching device between the power interface and the working circuit is controlled to be turned off, and the switching device between the battery and the working circuit is turned off. The switching device turns on to pause the battery's charging process and resume charging when appropriate.

Benefits of technology

This ensures that the battery's remaining power remains at the threshold and does not increase after the battery charging process is suspended, extending the battery's service life and providing stable power when the power consumption of the working circuit increases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117674345B_ABST
    Figure CN117674345B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of terminal technology, and provides a charging method and an electronic device. The charging method includes: monitoring the remaining power of the battery of the electronic device when the electronic device is connected to the charger; when the remaining power is equal to the first power threshold at the first moment and the first moment is within the first time period, controlling the first switch device between the power interface of the electronic device and the first node for connecting the working circuit of the electronic device to be cut off, and controlling the second switch device between the first node and the battery to be turned on, so as to suspend the charging process of the battery; in this way, it can be ensured that when the electronic device is continuously connected to the charger for a long time, the remaining power of the battery is maintained at the first power threshold and no longer increases after the charging process of the battery is suspended, thereby reducing the possibility of the remaining power of the battery being charged quickly, which helps to extend the service life of the battery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a charging method and an electronic device. Background Art

[0002] In daily life, users often charge electronic devices such as mobile phones for a long time. However, charging electronic devices for a long time will cause the battery of the electronic device to be in a full-charge state for a long time, which will accelerate battery aging. In order to slow down the aging of the battery and extend the service life of the battery, the relevant technology provides a smart charging mode. In the smart charging mode, the electronic device can learn the charging habits of the user and control the charging circuit of the electronic device to delay charging the remaining power of the battery to 100% when it recognizes that the electronic device is connected to the charger for a long time. For example, the electronic device can control the charging circuit to suspend charging the battery after the remaining power of the battery reaches a preset power threshold, that is, suspend the charging process of the battery to temporarily maintain the remaining power of the battery at the preset power threshold; and before the user is about to use the electronic device, the charging circuit can be controlled to continue to charge the remaining power of the battery to 100%, thereby shortening the time the battery is in a full-charge state.

[0003] However, in a scenario where the communication signal is weak, the intelligent charging mode cannot ensure that the remaining power of the battery is maintained at a preset power threshold and does not increase after the battery charging process is suspended, which is not conducive to extending the battery life. Summary of the invention

[0004] The embodiments of the present application provide a charging method and an electronic device, which can ensure that the remaining power of the battery is maintained at a first power threshold and no longer increases after the charging process of the battery is paused, thereby reducing the possibility of the remaining power of the battery being charged too quickly, which helps to extend the service life of the battery.

[0005] In a first aspect, an embodiment of the present application provides a charging method, comprising: monitoring the remaining power of a battery of an electronic device when the electronic device is connected to a charger; when the remaining power is equal to a first power threshold at a first moment and the first moment is within a first time period, controlling a first switching device between a power interface of the electronic device and a first node to be cut off, and controlling a second switching device between the first node and the battery to be turned on, the first node being also used to connect a working circuit of the electronic device.

[0006] The remaining power of the battery may refer to the actual battery state of charge (SOC) of the electronic device.

[0007] The SOC value is usually expressed as a percentage, which is used to describe the ratio of the available power of the battery of an electronic device to the nominal capacity. The nominal capacity refers to the theoretical maximum capacity of the battery, that is, the total amount of electrical energy that the battery can provide.

[0008] The first moment may be any moment when the electronic device is connected to a charger.

[0009] The first power threshold may be a remaining power reference value used by the power management module to determine whether to perform a delayed charging operation in the smart charging mode. Exemplarily, the first power threshold may be a default remaining power reference value provided by the smart charging mode.

[0010] The end time of the first period may be within the target charging period, that is, the end time of the first period may be earlier than the end time of the target charging period and later than the start time of the target charging period.

[0011] The target charging period may be a period of time during which the electronic device is continuously connected to the charger for a long time and is not used, determined based on the historical usage data and historical charging data of the electronic device. The duration of the target charging period may be greater than the normal charging time required to charge the remaining power of the battery from 0 to 100%, that is, the normal charging time may be used to describe the time required to charge the remaining power of the battery from 0 to 100% in the normal charging mode. The normal charging mode refers to the charging mode corresponding to the situation where both the first switching device and the second switching device are in the on state.

[0012] Optionally, the end time of the first period can be determined based on the end time of the target charging period. Exemplarily, the time interval between the end time of the first period and the end time of the target charging period can be a first duration, that is, the end time of the first period can be obtained by pushing the end time of the target charging period forward by the first duration.

[0013] Optionally, the end time of the first time period can be determined based on the end time of the target charging time period, the first power threshold and the target charging speed. Exemplarily, the electronic device can first determine the second time required for the battery to charge from the first power threshold to 100% at the target charging speed, and then push the end time of the first time period forward by the second time period to obtain the end time of the first time period. The target charging speed can be the charging speed of the charging stage corresponding to the first power threshold.

[0014] Specifically, the power management module can monitor the remaining power of the battery of the electronic device when the electronic device is connected to the charger when the smart charging mode is turned on. For example, when a charger is connected to the power interface of the electronic device, the power management module can first detect whether the smart charging mode of the electronic device is turned on. When the smart charging mode is turned on, the power management module can start to monitor the remaining power of the battery of the electronic device; when the power interface of the electronic device is disconnected from the charger, the power management module can stop monitoring the remaining power of the battery of the electronic device.

[0015] According to the charging method provided in the embodiment of the present application, by monitoring the remaining power of the battery of the electronic device when it is connected to the charger, when the remaining power is equal to the first power threshold at a first moment and the first moment is within a first time period, the first switch device between the power interface of the electronic device and the first node for connecting the working circuit of the electronic device is controlled to be cut off, and the second switch device between the first node and the battery is controlled to be turned on, so as to suspend the charging process of the battery; thereby, the charging process of the battery can be suspended when the electronic device is continuously connected to the charger for a long time and the remaining power of the battery is charged to the first power threshold, thereby shortening the time when the battery is in a fully charged state, which is beneficial to prolonging the service life of the battery.

[0016] At the same time, by controlling the first switch device to be turned off and controlling the second switch device to be turned on to suspend the charging process of the battery, since the path between the charger and the battery will be disconnected when the first switch device is turned off, it can ensure that the remaining power of the battery is maintained at the first power threshold and no longer increases after the charging of the battery is suspended, thereby reducing the possibility of the remaining power of the battery being charged quickly, which is more helpful to extend the service life of the battery. In addition, since the second switch device is controlled to be turned on when the charging process of the battery is suspended, when the power consumption of the working circuit of the electronic device increases, the battery can supply power to the working circuit through the second switch device, thereby ensuring the stability of the working circuit.

[0017] In an optional implementation of the first aspect, after controlling the first switch device between the power interface of the electronic device and the first node to be turned off, and controlling the second switch device between the first node and the battery to be turned on, it also includes: when the remaining power drops from the first power threshold to less than the first power threshold and greater than the second power threshold at the second moment, and the second moment is within the first time period, keeping the first switch device turned off and keeping the second switch device turned on.

[0018] Among them, the second moment is later than the first moment.

[0019] The second power threshold may refer to the lower limit of the remaining power of the battery that can keep the remaining power displayed on the user interface unchanged at the first power threshold. For example, assuming that when the remaining power of the battery is in the range of 78% to 80%, the remaining power displayed on the user interface will be maintained at 80%, then the second power threshold may be 78%.

[0020] According to the charging method provided in an embodiment of the present application, when the remaining power of the battery drops from a first power threshold to a level less than the first power threshold and greater than the second power threshold at a second moment, and the second moment is within the first time period, it means that after the charging process of the battery is suspended, only a small part of the remaining power of the battery is consumed by the working circuit of the electronic device, and the consumed part is not enough to change the remaining power displayed on the user interface of the electronic device. Therefore, the power management module can not only maintain the remaining power displayed on the user interface of the electronic device unchanged, but also avoid frequent opening and closing operations of the first switching device by continuing to control the first switching device to be cut off and continuing to control the second switching device to be turned on.

[0021] In an optional implementation of the first aspect, after controlling the first switch device between the power interface of the electronic device and the first node to be turned off and controlling the second switch device between the first node and the battery to be turned on, the method further includes: when the remaining power drops from the first power threshold to less than the second power threshold at a third moment, controlling both the first switch device and the second switch device to be turned on. The third moment is later than the second moment.

[0022] According to the charging method provided in an embodiment of the present application, when the remaining power of the battery drops from the first power threshold to less than the second power threshold at a third moment, it means that after the charging process of the battery is suspended, the remaining power of the battery is consumed by a large amount of the working circuit of the electronic device, and this situation no longer meets the suspension condition of the charging process of the battery. Therefore, in this case, the power management module controls the first switching device and the second switching device to be turned on to resume the charging process of the battery, so that the charging circuit can continue to charge the battery.

[0023] In an optional implementation of the first aspect, after monitoring the remaining power of a battery of the electronic device when the electronic device is connected to a charger, it also includes: when the remaining power is equal to a first power threshold at a first moment and the first moment is not within a first time period, controlling both the first switching device and the second switching device to be turned on.

[0024] According to the charging method provided in an embodiment of the present application, when the remaining power of the battery is equal to the first power threshold at a first moment and is not within a first time period, it means that although the remaining power of the battery has been charged to the first power threshold, the electronic device is not currently in a period in which it is continuously connected to the charger for a long time and is not used. Therefore, the power management module controls the first switching device and the second switching device to be turned on, so that the charging circuit can charge the battery normally.

[0025] In an optional implementation of the first aspect, after monitoring the remaining power of the battery of the electronic device when the electronic device is connected to the charger, it also includes: when the remaining power is less than the first power threshold at a fourth moment and the fourth moment is within the first time period, controlling the first switching device and the second switching device to be turned on.

[0026] The fourth moment may be any moment after the electronic device is connected to the charger and before the remaining power of the battery is charged to the first power threshold, that is, the fourth moment may be earlier than the first moment.

[0027] In a second aspect, an embodiment of the present application provides an electronic device, including a power interface, a charging circuit, a battery, a working circuit and a power management module; the charging circuit includes a first switching device and a second switching device; the first end of the first switching device is connected to the power interface, the second end of the first switching device and the first end of the second switching device are connected to a first node, the first node is also used to connect the working circuit, the second end of the second switching device is connected to the positive pole of the battery, the positive pole of the battery is grounded, and the controlled end of the first switching device and the controlled end of the second switching device are both connected to the power management module; the power management module is used to execute each step in the charging method as described in any implementation of the first aspect above.

[0028] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer-executable program. When the computer-executable program is called by an electronic device, the electronic device executes each step of the charging method as described in any implementation of the first aspect above.

[0029] In a fourth aspect, an embodiment of the present application provides a computer executable program product. When the computer executable program product is run on an electronic device, the electronic device executes each step of the charging method of any implementation of the first aspect.

[0030] In a fifth aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device, and the chip system includes a processor, the processor is coupled to a memory, and the memory is used to store computer program instructions. When the processor calls the computer program instructions, the electronic device implements each step of the charging method in any implementation of the first aspect above. The chip system can be a single chip, or a chip module composed of multiple chips.

[0031] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A schematic diagram of a charging scenario for an electronic device;

[0033] Figure 2 A schematic diagram of a charging circuit of an electronic device provided in the related art;

[0034] Figure 3 A schematic diagram of a charging circuit of another electronic device provided in the related art;

[0035] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0036] Figure 5 A schematic diagram of the structure of an electronic device provided in another embodiment of the present application;

[0037] Figure 6 A schematic diagram of the structure of an electronic device provided in yet another embodiment of the present application;

[0038] Figure 7 A schematic diagram of a circuit principle of an electronic device provided in yet another embodiment of the present application;

[0039] Figure 8 A schematic flow chart of a charging method provided in an embodiment of the present application;

[0040] Fig. 9 A schematic diagram of a setting interface of a smart charging mode provided in an embodiment of the present application;

[0041] Fig.10 A schematic flow chart of a charging method provided in another embodiment of the present application;

[0042] Fig.11 A schematic flow chart of a charging method provided in yet another embodiment of the present application;

[0043] Fig.12 A schematic diagram of an interactive interface of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] It should be noted that the terms used in the implementation methods of the embodiments of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two, "at least one" and "one or more" mean one, two or more than two.

[0045] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, it is defined that the "first" and "second" features may explicitly or implicitly include one or more of the features.

[0046] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0047] In daily life, users often charge electronic devices such as mobile phones for long periods of time. Figure 1 A schematic diagram of a charging scenario for an electronic device is shown. Figure 1 As shown in (a) and (b) in Figure 1, users often connect their electronic devices to chargers before going to bed at night, and disconnect them after waking up the next day, so that the remaining power of the electronic devices can be fully charged to 100% during the nighttime sleep period for easy use the next day. However, charging electronic devices for a long time will cause the batteries of the electronic devices to be fully charged for a long time, which will accelerate battery aging.

[0048] In order to slow down the aging speed of the battery and extend the service life of the battery, the relevant technology provides a smart charging mode. In the smart charging mode, the electronic device can control the charging circuit of the electronic device to delay charging the remaining power of the battery to 100% when it recognizes that the electronic device is connected to the charger for a long time, thereby shortening the time the battery is in a full power state. For example, in the smart charging mode, assuming that the electronic device learns that the user usually charges the electronic device from 23:00 to 7:00 in the morning, the electronic device can control the charging circuit to suspend charging the battery (i.e., suspend the charging process of the battery) when it recognizes that the electronic device is charged during this period and the remaining power of the battery is charged to a preset power threshold (e.g., 80%), so as to temporarily maintain the remaining power of the battery at the preset power threshold; and the charging circuit can be controlled to continue charging the battery (i.e., resume the charging process of the battery) for a short period of time before 7:00 in the morning until the remaining power of the battery is fully charged. In this way, not only can the user's demand for full power of the electronic device be met, but also the time the battery is in a full power state can be shortened, thereby extending the service life of the battery.

[0049] For ease of understanding, the charging process of the electronic device in the smart charging mode is described in detail below in conjunction with the charging circuit of the electronic device.

[0050] For example, Figure 2 The following is a schematic diagram of a charging circuit of an electronic device provided in the related art. Figure 2 As shown, the charging circuit 11 of the electronic device is usually connected between a universal serial bus (USB) interface 10 of the electronic device and a battery 12 , and the charging circuit 11 is usually also connected to a working circuit 13 of the electronic device.

[0051] In some embodiments, when the electronic device is connected to a charger via a USB interface 10, the charging circuit 11 can be used to convert the voltage obtained from the charger into a charging voltage required by the battery 12 and / or a working voltage required by the working circuit 13, so as to charge the battery 12 and / or power the working circuit 13, respectively.

[0052] Specifically, the charging circuit 11 may include a first switching device 111 , a second switching device 112 , and a voltage converter 113 .

[0053] Among them, the first switching device 111, the voltage converter 113 and the second switching device 112 can be connected in sequence between the USB interface 10 of the electronic device and the positive pole of the battery 12, and the end of the voltage converter 113 connected to the positive pole of the battery 12 can also be connected to the working circuit 13 of the electronic device.

[0054] Optionally, when both the first switch device 111 and the second switch device 112 are in the on state, the voltage converter 113 can convert the voltage obtained from the charger into the charging voltage required by the battery 12 and / or the working voltage required by the working circuit 13, so as to charge the battery 12 and / or supply power to the working circuit 13 respectively; in this case, the battery 12 can also supply power to the working circuit 13. Optionally, when the first switch device 111 is in the on state and the second switch device 112 is in the off state, the voltage converter 113 can convert the voltage obtained from the charger into the working voltage required by the working circuit 13, so as to supply power to the working circuit 13. Optionally, when the first switch device 111 is in the off state and the second switch device 112 is in the on state, the battery 12 can supply power to the working circuit 13.

[0055] Based on this, in the smart charging mode, the electronic device usually uses the following method to suspend the charging process of the battery 12:

[0056] In the initial stage of charging, the electronic device can control the first switch device 111 and the second switch device 112 to be turned on; as charging proceeds, when the electronic device detects that the remaining power of the battery 12 reaches a preset power threshold, the first switch device 111 is kept turned on and the second switch device 112 is turned off to suspend the charging process of the battery 12, so that the remaining power of the battery 12 is temporarily maintained at the preset power threshold; in addition, the electronic device can control the voltage converter 113 to output the current I bus The current is reduced to a preset limiting current (e.g., 100 mA). Since the preset limiting current can usually only meet the minimum power demand of the working circuit 13, this charging method has the following technical problems:

[0057] When the electronic device is in a basement or a shielded room where the communication signal is weak and needs to communicate with a base station, the working circuit 13 of the electronic device will consume a high power. bus The power consumption of the working circuit 13 in this scenario is too small to meet the power consumption requirement of the working circuit 13. Therefore, in order to ensure that the working circuit 13 can work stably, the electronic device will force the second switch device 112 to be turned on, so as to force the battery 12 to supply power to the working circuit 13 at the same time. However, the working circuit 13 does not consume high power all the time. When the power consumption of the working circuit 13 is reduced, since the second switch device 112 has been forced to be turned on, the current I output by the voltage converter 113 busThe current I flowing to the battery 12 will also flow through the second switch device 112. In order to avoid frequent switching operations on the second switch device 112, the electronic device does not immediately control the second switch device 112 to be turned off when the power consumption of the working circuit 13 decreases, but batt The second switch device 112 is controlled to be turned off only when the current is greater than a preset cut-off current (e.g., 40 mA), which causes the remaining power of the battery 12 to continue to increase, and cannot ensure that the remaining power of the battery 12 is maintained at the preset power threshold and does not increase after the charging process of the battery 12 is suspended, thereby increasing the possibility that the remaining power of the battery 12 is charged quickly, which is not conducive to extending the service life of the battery 12. And this technical problem is more prominent in multi-battery electronic devices for the following reasons:

[0058] See also Figure 3 , is a schematic diagram of a charging circuit of another electronic device provided in the related art. Figure 3 As shown, taking the electronic device including two parallel batteries 12 as an example, when the wiring lengths between the two batteries 12 and the USB interface 10 are different, the link impedances between the two batteries 12 and the USB interface 10 will be different, so that the charging speed of one battery 12 will be faster than the charging speed of the other battery 12. bus Because the power consumption requirement of the working circuit 13 is reduced, the power flows to the two batteries 12 respectively, and the battery 12 with a faster charging speed also charges the battery 12 with a slower charging speed. For example, assuming Figure 3 If the charging speed of the left battery 12 is faster than that of the right battery 12, the left battery 12 will charge the right battery 12. In this case, the current on the left battery 12 flows from the positive electrode of the left battery 12 to the common positive electrode point A1 of the two batteries 12, and the current on the right battery 12 flows from the common positive electrode point A1 of the two batteries 12 to the positive electrode of the right battery 12, that is, the currents flowing through the two batteries 12 are in opposite directions, which will cause the total current I batt It takes a long time to reach the preset cut-off current, that is, it takes a long time to control the second switch device 112 to be cut off again, which will cause the remaining power of the battery 12 to increase more, further increasing the possibility that the remaining power of the battery 12 will be charged faster, which is more unfavorable to extending the service life of the battery 12.

[0059] In view of this, an embodiment of the present application provides a charging method and an electronic device, which monitors the remaining power of a battery of the electronic device when it is connected to a charger. When the remaining power is equal to a first power threshold at a first moment and the first moment is within a first time period, a first switch device between a power interface of the electronic device and a first node for connecting a working circuit of the electronic device is controlled to be cut off, and a second switch device between the first node and the battery is controlled to be turned on, so as to suspend the charging process of the battery; thereby, the charging process of the battery can be suspended when the electronic device is continuously connected to the charger for a long time and the remaining power of the battery is charged to the first power threshold, thereby shortening the time when the battery is in a fully charged state, which is beneficial to extending the service life of the battery.

[0060] At the same time, by controlling the first switch device to be turned off and controlling the second switch device to be turned on to suspend the charging process of the battery, since the path between the charger and the battery will be disconnected when the first switch device is turned off, it can ensure that the remaining power of the battery is maintained at the first power threshold and no longer increases after the charging of the battery is suspended, thereby reducing the possibility of the remaining power of the battery being charged quickly, which is more helpful to extend the service life of the battery. In addition, since the second switch device is controlled to be turned on when the charging process of the battery is suspended, when the power consumption of the working circuit of the electronic device increases, the battery can supply power to the working circuit through the second switch device, thereby ensuring the stability of the working circuit.

[0061] The charging method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The embodiments of the present application do not limit the specific types of electronic devices.

[0062] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device may include a USB interface 10, a charging circuit 11, a battery 12, a working circuit 13, a power management module 14, and the like.

[0063] Understandably, Figure 4 The illustrated structure does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than those shown in the figure, or combine some components, or separate some components, or arrange the components differently. Figure 4The components shown may be implemented in hardware, software or a combination of software and hardware.

[0064] The USB interface 10 may be an interface that complies with USB standard specifications, and may be a Mini USB interface, a Micro USB interface, or a USB Type C interface, etc. The USB interface 10 may be used to connect a charger to charge an electronic device, to transfer data between an electronic device and a peripheral device, or to connect an earphone to play audio through the earphone, etc.

[0065] In some embodiments, the charging circuit 11 may include a first switching device 111 and a second switching device 112 .

[0066] Among them, the first end of the first switching device 111 can be connected to the USB interface 10, the second end of the first switching device 111 can be connected to the first node B1, the first node B1 can also be used to connect the first end of the second switching device 112 and the working circuit 13, the second end of the second switching device 112 can be connected to the positive electrode of the battery 12, the negative electrode of the battery 12 can be directly grounded or grounded through a resistor, and the controlled end of the first switching device 111 and the controlled end of the second switching device 112 can both be connected to the power management module 14.

[0067] Exemplarily, the first switch device 111 may include an on state and an off state. Optionally, the first switch device 111 may enter the on state upon receiving a first on control signal from the power management module 14. When the first switch device 111 is in the on state, the path between the USB interface 10 and the first node B1 is connected. Optionally, the first switch device 111 may enter the off state upon receiving a first off control signal from the power management module 14. When the first switch device 111 is in the off state, the path between the USB interface 10 and the first node B1 is disconnected.

[0068] In a specific application, the first switch device 111 may be a switch device such as a mechanical switch, a triode or a metal-oxide-semiconductor field-effect transistor (MOSFET), and the embodiment of the present application does not limit the specific type of the first switch device 111. Taking the first switch device 111 as an NPN-type triode as an example, the collector of the NPN-type triode may be used as the first end of the first switch device 111, the emitter of the NPN-type triode may be used as the second end of the first switch device 111, and the base of the NPN-type triode may be used as the controlled end of the first switch device 111. In this example, the first switch device 111 may enter the on state when receiving a high-level signal from the power management module 14, and the first switch device 111 may enter the off state when receiving a low-level signal from the power management module 14; that is, in this example, the first on control signal may be a high-level signal, and the first off control signal may be a low-level signal.

[0069] Exemplarily, the second switch device 112 may include an on state and an off state. Optionally, the second switch device 112 may enter the on state upon receiving a second on control signal from the power management module 14. When the second switch device 112 is in the on state, the path between the first node B1 and the battery 12 is connected. Optionally, the second switch device 112 may enter the off state upon receiving a second off control signal from the power management module 14. When the second switch device 112 is in the off state, the path between the first node B1 and the battery 12 is disconnected.

[0070] In a specific application, the second switch device 112 may be a switch device such as a mechanical switch, a triode or a metal-oxide-semiconductor field-effect transistor (MOSFET), and the embodiment of the present application does not limit the specific type of the second switch device 112. Taking the second switch device 112 as a P-type MOSFET as an example, the drain of the P-type MOSFET can be used as the first end of the second switch device 112, the source of the P-type MOSFET can be used as the second end of the second switch device 112, and the gate of the P-type MOSFET can be used as the controlled end of the second switch device 112. In this example, the second switch device 112 can enter the on state when receiving a low-level signal from the power management module 14; the second switch device 112 can enter the off state when receiving a high-level signal from the power management module 14; that is, in this example, the second on control signal can be a low-level signal, and the second off control signal can be a high-level signal.

[0071] It should be noted that the above examples do not constitute a specific limitation on the first switch device 111 and the second switch device 112. In other embodiments, the first switch device 111 may be a mechanical switch, a PNP transistor, a PMOS or an N-type MOSFET, etc. The second switch device 112 may be a mechanical switch, an NPN transistor, a PNP transistor or an N-type MOSFET, etc.

[0072] Based on this, in some optional implementations, when the electronic device is connected to the charger via the USB interface 10, and the first switch device 111 and the second switch device 112 are both in the on state, the charger can directly output the charging voltage required by the battery 12 to charge the battery 12; or, the charger can directly output the working voltage required by the working circuit 13 to power the working circuit 13. In addition, the battery 12 can also power the working circuit.

[0073] In some other optional implementations, when the electronic device is connected to the charger via the USB interface 10, and the first switch device 111 is in the on state and the second switch device 112 is in the off state, the charger can directly output the working voltage required by the working circuit 13 to power the working circuit 13.

[0074] In some further optional implementations, when the first switch device 111 is in the cut-off state and the second switch device 112 is in the on state, the battery 12 can supply power to the working circuit 13 .

[0075] See also Figure 5 In some other embodiments, the charging circuit 11 may further include a voltage converter 113 .

[0076] Optionally, the voltage converter 113 may be connected between the USB interface 10 and the first switching device 111 .

[0077] Optionally, the voltage converter 113 may be connected between the first switching device 111 and the first node B1.

[0078] Based on this, in some embodiments, when the electronic device is connected to the charger via the USB interface 10 and the first switch device 111 and the second switch device 112 are both in the on state, the voltage converter 113 can be used to convert the voltage obtained from the charger into the charging voltage required by the battery 12 and / or the working voltage required by the working circuit 13, thereby charging the battery 12 and / or supplying power to the working circuit 13; in addition, in this case, the battery 12 can also supply power to the working circuit 13.

[0079] In other embodiments, when the electronic device is connected to the charger via the USB interface 10, and the first switch device 111 is in the on state and the second switch device 112 is in the off state, the voltage converter 113 can be used to convert the voltage obtained from the charger into the working voltage required by the working circuit 13, thereby powering the working circuit 13.

[0080] Exemplarily, the voltage converter 113 may include, but is not limited to, a buck circuit, a boost circuit, or a bust-boost circuit, etc. The present application does not specifically limit the type of the voltage converter 113 .

[0081] The number of batteries 12 may be one or more. Exemplarily, when the number of batteries 12 is multiple, the multiple batteries 12 may be connected in parallel or in series. Taking the case where multiple batteries 12 are connected in parallel as an example, specifically, the positive electrodes of the multiple batteries 12 may be connected to the first node B1, and the negative electrode of each battery 12 may be grounded through a resistor, or the negative electrode of each battery 12 may be directly grounded.

[0082] See also Figure 6 In some other embodiments, when there are multiple batteries 12, a voltage equalization module 15 may be provided between each two adjacent batteries 12. The voltage equalization module 15 may be used to equalize the voltages of two adjacent batteries 12 so that the voltages at both ends of the two adjacent batteries 12 are equal, thereby making the voltages at both ends of all batteries 12 equal.

[0083] See also Figure 7 , is a schematic diagram of the circuit principle of an electronic device provided in an embodiment of the present application.

[0084] For example, the voltage converter 113 includes a buck circuit. Figure 7 As shown, the buck circuit may include, for example, a third switch device S1, a fourth switch device S2, a first inductor L1 and a first capacitor C1.

[0085] Among them, the first end of the third switching device S1 and the first end of the fourth switching device S2 can be connected together and serve as the input end of the buck circuit (i.e., the voltage converter 113), the second end of the fourth switching device S2 can be grounded, the second end of the third switching device S1 can be connected to the first end of the first inductor L1, the second end of the first inductor L1 and the first end of the first capacitor C1 are connected together and serve as the output end of the buck circuit (i.e., the voltage converter 113), the second end of the first capacitor C1 can be grounded, and the controlled end of the third switching device S1 and the controlled end of the fourth switching device S2 can be connected to the power management module 14.

[0086] Based on this, the power management module 14 can control the on-off of the third switch device S1 and the fourth switch device S2 to enable the buck circuit to output the charging voltage required by the battery 12 and / or the working voltage required by the working circuit 13 .

[0087] For example, Figure 7 As shown, the voltage balancing module 15 may include a voltage balancing resistor R1 and a fifth switch device S3. The first end of the voltage balancing resistor R1 may be connected with the first end of the fifth switch device S3 and serve as the first end of the voltage balancing module 15, the second end of the voltage balancing resistor R1 may be connected with the second end of the fifth switch device S3 and serve as the second end of the voltage balancing module 15, and the controlled end of the fifth switch device S3 may be connected to the power management module 14. Based on this, the power management module may realize voltage balancing of two adjacent batteries 12 by controlling the on-off of the fifth switch device S3.

[0088] For example, Figure 7 As shown, the working circuit 13 may include, for example, a processor 131, an internal memory 132, a mobile communication module 133, a wireless communication module 134, an antenna 135, an antenna 136, and a display screen 137. The processor 131 may be connected to the internal memory 132, the mobile communication module 133, the wireless communication module 134, and the display screen 137.

[0089] The processor 131 may include one or more processing units. Different processing units may be independent devices or integrated into one or more processors. A memory may also be provided in the processor 131 for storing instructions and data.

[0090] The internal memory 132 may be used to store computer executable program codes. The computer executable program codes may include instructions. The internal memory 132 may include a program storage area and a data storage area. The program storage area may store an operating system or an application required for at least one function (such as a sound playback function, an image playback function, etc.). The processor 131 may execute various functional applications and data processing of the electronic device by running instructions stored in the internal memory 132 and / or instructions stored in a memory provided in the processor 131.

[0091] The wireless communication function of the electronic device can be implemented through the mobile communication module 133, the wireless communication module 134, the antenna 135, the antenna 136, the modem processor and the baseband processor.

[0092] Exemplarily, the mobile communication module 133 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied in electronic devices. The wireless communication module 134 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC) and infrared technology (IR) applied in electronic devices 100. Antenna 135 and antenna 136 can be used to transmit and receive electromagnetic wave signals.

[0093] In some embodiments, the antenna 135 may be coupled to the mobile communication module 133, and the antenna 136 may be coupled to the wireless communication module 134, so that the electronic device can communicate with a network and other devices via wireless communication technology.

[0094] The electronic device can realize a display function through the processor 131 and the display screen 137. For example, the display screen 137 can display information such as the remaining power or charging status of the battery.

[0095] In addition to controlling the charging and discharging process of the battery 12, the power management module 14 can also be used to monitor parameters such as the remaining power of the battery, the number of battery cycles, and the health status of the battery (leakage, impedance), etc.

[0096] In some other embodiments, the power management module 14 may also be disposed in the processor 131 .

[0097] It is understandable that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0098] The charging method provided in the embodiment of the present application is described in detail below.

[0099] See also Figure 8 , is a schematic flow chart of a charging method provided in an embodiment of the present application. The charging method can be applied in Figures 4 to 7For example, in some embodiments, when the power management module of the electronic device is a discrete component independent of the processor of the electronic device, the execution subject of the charging method can be Figures 4 to 7 In other embodiments, when the power management module is provided in the processor of the electronic device, the execution subject of the charging method may be Figure 7 The following takes the execution subject of the charging method as the power management module of the electronic device as an example to exemplify the charging method.

[0100] like Figure 8 As shown, the charging method may include S81 to S82, which are described in detail as follows:

[0101] S81, monitoring the remaining power of the battery of the electronic device when the electronic device is connected to the charger.

[0102] In an embodiment of the present application, the charging mode of the electronic device may include a smart charging mode. In the smart charging mode, the electronic device learns the charging habits of the user and can control the charging circuit of the electronic device to delay charging the remaining power of the battery to 100% when recognizing that the electronic device is connected to the charger for a long time, thereby shortening the time when the battery of the electronic device is in a fully charged state and extending the service life of the battery.

[0103] In some embodiments, the smart charging mode may be a charging mode inherent to the electronic device, that is, the user does not need to set any charging mode for the electronic device, and the electronic device will enter the smart charging mode by default after being connected to the charger.

[0104] Based on this, in a specific implementation, monitoring the remaining power of the battery of the electronic device when the electronic device is connected to a charger may include: when a charger is connected to the power interface of the electronic device, the power management module starts to monitor the remaining power of the battery of the electronic device; when the power interface of the electronic device is disconnected from the charger, the power management module stops monitoring the remaining power of the battery of the electronic device.

[0105] The power interface of the electronic device may be a USB interface of the electronic device.

[0106] In other embodiments, the smart charging mode may be an optional charging mode of the electronic device, that is, the user may choose whether to enable the smart charging mode according to actual needs.

[0107] For example, see Fig. 9 , is a schematic diagram of a setting interface of a smart charging mode provided in an embodiment of the present application. Fig. 9As shown in (a) of FIG. 1 , when the user needs to turn on the smart charging mode, the user can perform a first operation on the setting application 91 in the electronic device. The first operation can be, for example, a click operation. The electronic device can respond to the first operation by displaying Fig. 9 The main setting interface 911 shown in (b) in FIG.

[0108] like Fig. 9 As shown in (b) of FIG. 1 , the main setting interface 911 may include a battery setting item 9110. The user may perform a second operation on the battery setting item 9110. The second operation may be, for example, a click operation. The electronic device may respond to the second operation by displaying a Fig. 9 The battery setting interface 912 shown in (c) in FIG.

[0109] like Fig. 9 As shown in (c) of FIG. 1 , the battery setting interface 912 may include more battery setting items 9120. The user may perform a third operation on the more battery setting items 9120. The third operation may be, for example, a click operation. The electronic device may respond to the third operation by displaying Fig. 9 More battery settings interface 913 shown in (d) in FIG.

[0110] like Fig. 9 As shown in (d) in the figure, the more battery settings interface 913 may include a first switch control 9130 for turning on or off the smart charging mode. The first switch control 9130 may include an on state and an off state. Specifically, when the first switch control 9130 is in the off state, it means that the smart charging mode is currently in the off state. In this case, the user can turn on the smart charging mode by clicking the first switch control 9130. When the first switch control 9130 is in the on state, it means that the smart charging mode is currently in the on state. In this case, the user can turn off the smart charging mode by clicking the first switch control 9130.

[0111] Based on this, in another specific implementation, monitoring the remaining power of the battery of the electronic device when the electronic device is connected to the charger may include: when the smart charging mode is turned on, monitoring the remaining power of the battery of the electronic device when the electronic device is connected to the charger.

[0112] Specifically, in this implementation, when a charger is connected to the power interface of the electronic device, the electronic device can first detect whether the smart charging mode is turned on. When the smart charging mode is turned on, the power management module starts to monitor the remaining power of the battery of the electronic device; when the power interface of the electronic device is disconnected from the charger, the power management module stops monitoring the remaining power of the battery of the electronic device.

[0113] Among them, the remaining power of the battery of the electronic device may refer to the actual battery state of charge (SOC) of the electronic device. The value of SOC is usually in the form of a percentage, which can be used to describe the proportion of the available power of the battery of the electronic device to the nominal capacity. Among them, the nominal capacity may refer to the theoretical maximum capacity of the battery, that is, the total amount of electrical energy that the battery can provide. The value range of SOC can be [0,100%]. For example, when SOC=0, it can indicate that the battery is in a fully discharged state; when SOC=100%, it can indicate that the battery is in a fully charged state.

[0114] In a specific application, the remaining power of the battery can be estimated by the power management module of the electronic device based on the voltage across the battery and / or the internal resistance of the battery. It should be noted that the specific estimation method of the remaining power of the battery can refer to the description in the relevant technology, and the embodiment of the present application will not be described in detail.

[0115] It is understandable that, since electronic devices usually need to display the remaining battery power on a display screen, the operation of estimating the remaining battery power can be performed in real time by the power management module after the electronic device is turned on.

[0116] In the embodiment of the present application, the purpose of the power management module monitoring the remaining power of the battery of the electronic device when the electronic device is connected to the charger is to determine when the remaining power of the electronic device during the charging process is charged to the first power threshold, so as to further determine whether it is necessary to perform a delayed charging operation on the battery. The first power threshold can be a remaining power reference value used by the power management module to determine whether to perform a delayed charging operation in the smart charging mode.

[0117] Exemplarily, the first power threshold may be a default remaining power reference value provided by the smart charging mode, and the default remaining power reference value may be, for example, 80%.

[0118] In some embodiments, when the power management module monitors that the remaining power of the battery is equal to the first power threshold at the first moment and the first moment is within the first time period, the power management module may execute S82.

[0119] The first moment may be any moment when the electronic device is connected to a charger.

[0120] The end time of the first period may be within the target charging period, that is, the end time of the first period may be earlier than the end time of the target charging period and later than the start time of the target charging period.

[0121] The target charging period may be a period during which the electronic device is continuously connected to a charger for a long period of time and is not used, determined by the electronic device based on its historical charging data and historical usage data.

[0122] The duration of the target charging period may be greater than the normal charging duration required to charge the remaining power of the battery from 0 to 100%, that is, the normal charging duration may be used to describe the duration required to charge the remaining power of the battery from 0 to 100% in the normal charging mode. The normal charging mode refers to the charging mode corresponding to the situation where both the first switching device and the second switching device are in the on state.

[0123] Exemplarily, the difference between the duration of the target charging period and the normal charging period may be greater than or equal to a preset duration threshold. The preset duration threshold may be set according to actual conditions, for example, the preset duration threshold may be 2 hours, that is, assuming that the normal charging time of the battery is 1 hour, the duration of the target charging period may be greater than or equal to 3 hours.

[0124] In a specific implementation, the electronic device may first determine the candidate time periods where the non-use period of the electronic device coincides with the charging period based on its historical charging data and historical usage data, and then select the target candidate time periods from the candidate time periods whose duration is greater than or equal to the normal charging duration and whose occurrence frequency is greater than a preset frequency threshold, and determine the target candidate time periods as the target charging time periods. Among them, the non-use period of the electronic device may refer to the period when the electronic device is not used by the user. The frequency of occurrence may refer to the number of times the corresponding time period is determined as a candidate time period; the preset frequency threshold may be set according to actual needs and is not particularly limited here. For example, the preset frequency threshold may be 10 times or 20 times, etc.

[0125] For example, assuming that the user charges the electronic device at least 10 times during the period from 23:00 at night to 7:00 in the morning and does not use the electronic device, the electronic device can determine the period from 23:00 at night to 7:00 in the morning as the target charging period.

[0126] In an optional implementation, the end time of the first period can be determined based on the end time of the target charging period. Exemplarily, the time interval between the end time of the first period and the end time of the target charging period can be a first duration, that is, the end time of the target charging period can be pushed forward by the first duration to obtain the end time of the first period. The first duration can be determined according to actual needs and is not particularly limited here. For example, assuming that the end time of the target charging period is 7:00 and the first duration is 1 hour, the electronic device can determine 6:00 as the end time of the first period.

[0127] In another optional implementation, the end time of the first time period can be determined based on the end time of the target charging time period, the first power threshold and the target charging speed. Exemplarily, the electronic device can first determine the second time required for the battery to charge from the first power threshold to 100% at the target charging speed, and then push the end time of the first time period forward by the second time period to obtain the end time of the first time period. The target charging speed can be the charging speed of the charging stage corresponding to the first power threshold. For the specific method of determining the target charging speed, please refer to the description in the relevant technology, which will not be described in detail here.

[0128] S82, when the remaining power of the battery is equal to the first power threshold at the first moment and the first moment is within the first time period, the first switch device between the power interface of the electronic device and the first node is controlled to be cut off, and the second switch device between the first node and the battery of the electronic device is controlled to be turned on.

[0129] It is understandable that, at the moment when the electronic device is connected to the charger, the remaining power of the battery of the electronic device may be greater than the first power threshold, or may be less than or equal to the first power threshold. If the remaining power of the battery at the moment when the electronic device is connected to the charger is greater than the first power threshold, there will not be a situation where the remaining power of the battery at the first moment is equal to the first power threshold; that is, only when the remaining power of the battery at the moment when the electronic device is connected to the charger is less than or equal to the first power threshold, there will be a situation where the remaining power of the battery at the first moment is equal to the first power threshold. Therefore, S82 may specifically include:

[0130] When the remaining power of the battery rises to equal the first power threshold at a first moment and the first moment is within a first time period, the first switching device between the power interface of the electronic device and the first node is controlled to be cut off, and the second switching device between the first node and the battery of the electronic device is controlled to be turned on.

[0131] In this embodiment, when the remaining power of the battery rises to be equal to the first power threshold at the first moment, and the first moment is within the first time period, it means that the electronic device is currently in a period of time in which it is continuously connected to the charger for a long time and is not used by the user, and the remaining power of the battery has been charged to the first power threshold. In this case, in order to prevent the remaining power of the battery from being quickly charged to 100% and causing the battery to be in a full power state for a long time, the power management module can control the first switch device to be turned off and control the second switch device to be turned on to suspend the charging process of the battery, that is, control the charging circuit to suspend charging the battery.

[0132] In a specific implementation, controlling the first switch device to be turned off may specifically include:

[0133] The power management module outputs a first cut-off control signal to the control terminal of the first switch device.

[0134] The specific expression form of the first cutoff control signal can be determined according to the specific type of the first switch device. For example, when the first switch device is an NPN transistor, the first cutoff control signal can be a low level signal.

[0135] In a specific implementation, controlling the second switch device to be turned on may specifically include:

[0136] The power management module outputs a second conduction control signal to the control terminal of the second switch device.

[0137] The specific form of the second conduction control signal can be determined according to the specific type of the second switch device. For example, when the second switch device is a P-type MOSFET, the second conduction control signal can be a low-level signal.

[0138] It is understandable that in other embodiments, if the remaining power of the battery of the electronic device is greater than the first power threshold at the moment when the electronic device is connected to the charger, it generally means that the user wants to quickly charge the remaining power of the battery to 100%, and the user will not charge the electronic device for a long time continuously. Therefore, in this case, the power management module can directly control the charging circuit to charge the battery normally without delaying the charging operation of the battery. That is, in this case, the power management module can directly control the first switch device and the second switch device to be turned on so that the charging circuit can charge the battery normally.

[0139] From the above, it can be seen that the charging method provided in the embodiment of the present application monitors the remaining power of the battery of the electronic device when it is connected to the charger. When the remaining power is equal to the first power threshold at a first moment and the first moment is within a first time period, the first switch device between the power interface of the electronic device and the first node for connecting the working circuit of the electronic device is controlled to be cut off, and the second switch device between the first node and the battery is controlled to be turned on, so as to suspend the charging process of the battery; thereby, the charging process of the battery can be suspended when the electronic device is continuously connected to the charger for a long time and the remaining power of the battery is charged to the first power threshold, thereby shortening the time when the battery is in a fully charged state, which is beneficial to extending the service life of the battery.

[0140] At the same time, by controlling the first switch device to be turned off and controlling the second switch device to be turned on to suspend the charging process of the battery, since the path between the charger and the battery will be disconnected when the first switch device is turned off, it can ensure that the remaining power of the battery is maintained at the first power threshold and no longer increases after the charging of the battery is suspended, thereby reducing the possibility of the remaining power of the battery being charged quickly, which is more helpful to extend the service life of the battery. In addition, since the second switch device is controlled to be turned on when the charging process of the battery is suspended, when the power consumption of the working circuit of the electronic device increases, the battery can supply power to the working circuit through the second switch device, thereby ensuring the stability of the working circuit.

[0141] See also Fig.10 , is a schematic flow chart of a charging method provided in another embodiment of the present application. Fig.10 As shown, in some other embodiments, after S82, the charging method may further include S83, or may include S83 and S84.

[0142] It is understandable that after the battery charging process is suspended, if the power consumption of the working circuit of the electronic device increases, the battery will automatically supply power to the working circuit, which will cause the remaining power of the battery to decrease.

[0143] Optionally, if the decrease in the remaining power of the battery is small and insufficient to change the remaining power displayed on the user interface of the electronic device, the power management module can continue to suspend the battery charging process. Specifically, if at a second moment after the first moment, the remaining power of the battery drops from the first power threshold to less than the first power threshold and greater than the second power threshold, and the second moment is still within the first time period, the power management module can execute the following Fig.10 S83 shown.

[0144] The second power threshold is less than the first power threshold. Exemplarily, the second power threshold may refer to the lower limit of the remaining power of the battery that can keep the remaining power displayed on the user interface unchanged at the first power threshold. For example, assuming that when the remaining power of the battery is in the range of 78% to 80%, the remaining power displayed on the user interface will be maintained at 80%, then the second power threshold may be 78%.

[0145] Optionally, if the remaining power of the battery decreases significantly, causing the remaining power displayed on the user interface of the electronic device to change, the power management module can resume the battery charging process. Specifically, if at a third moment after the second moment, the remaining power of the battery decreases from the first power threshold to less than the second power threshold, then regardless of whether the third moment is within the first time period, the power management module can execute the following Fig.10 S84 shown.

[0146] S83, when the remaining power of the battery drops from the first power threshold to less than the first power threshold and greater than the second power threshold at the second moment, and the second moment is within the first time period, keep the first switch device turned off and keep the second switch device turned on.

[0147] In this embodiment, when the remaining power of the battery drops from the first power threshold to less than the first power threshold and greater than the second power threshold at the second moment, and the second moment is within the first time period, it means that after the charging process of the battery is suspended, only a small part of the remaining power of the battery is consumed by the working circuit of the electronic device, and the consumed part is not enough to change the remaining power displayed on the user interface of the electronic device. Therefore, in this case, the power management module can continue to control the first switch device to be turned off, and continue to control the second switch device to be turned on. In this way, not only can the remaining power displayed on the user interface of the electronic device be maintained unchanged, but also frequent opening and closing operations of the first switch device can be avoided.

[0148] S84, when the remaining power of the battery drops from the first power threshold to less than the second power threshold at a third moment, control the first switch device and the second switch device to be turned on.

[0149] In the present embodiment, when the remaining power of the battery drops from the first power threshold to less than the second power threshold at the third moment, it means that after the battery charging process is suspended, the remaining power of the battery is consumed more by the working circuit of the electronic device, and this situation no longer meets the suspension condition of the battery charging process. Therefore, in this case, the power management module can control the first switching device and the second switching device to be turned on to resume the battery charging process, so that the charging circuit continues to charge the battery until the remaining power of the battery is charged to the first power threshold again. It can be determined whether to suspend the battery charging process based on whether the moment when the remaining power of the battery is charged to the first power threshold again is within the first time period.

[0150] In a specific implementation, controlling the first switch device to be turned on may specifically include:

[0151] The power management module outputs a first conduction control signal to the control terminal of the first switch device.

[0152] The specific form of the first conduction control signal can be determined according to the specific type of the first switch device. For example, when the first switch device is an NPN transistor, the first conduction control signal can be a high level signal.

[0153] See also Fig.11 , is a schematic flow chart of a charging method provided by another embodiment of the present application. Fig.11As shown, in some other embodiments, after S81, the charging method may further include S85 or S86, which are described in detail as follows:

[0154] S85, when the remaining power of the battery is equal to the first power threshold at the first moment and the first moment is not within the first time period, control the first switch device and the second switch device to be turned on.

[0155] Similar to S82, when the remaining power of the battery is equal to the first power threshold at the first moment and the first moment is not within the first time period, controlling both the first switch device and the second switch device to be turned on may specifically include:

[0156] When the remaining power of the battery rises to be equal to the first power threshold at the first moment and the first moment is not within the first time period, the first switch device and the second switch device are controlled to be turned on.

[0157] In this embodiment, when the remaining power of the battery rises to equal the first power threshold at the first moment, but is not in the first time period at the first moment, it means that although the remaining power of the battery has been charged to the first power threshold, the electronic device is not currently in a period of time in which it is connected to the charger for a long time and is not used. In this case, the power management module may not suspend the charging process of the battery, that is, the power management module may control the charging circuit to charge the battery normally. Specifically, the power module may control the charging circuit to charge the battery normally by controlling the first switch device and the second switch device to be turned on.

[0158] S86: When the remaining power of the battery is less than the first power threshold at a fourth moment and the fourth moment is within a first time period, control the first switch device and the second switch device to be turned on.

[0159] The fourth moment may be any moment after the electronic device is connected to the charger and before the remaining power of the battery is charged to the first power threshold, that is, the fourth moment may be earlier than the first moment.

[0160] In this embodiment, after the electronic device is connected to the charger, if the remaining power of the battery is not charged to the first power threshold, the power management module may not suspend the charging process of the battery, that is, the power management module may control the charging circuit to charge the battery normally. Specifically, the power module may control the charging circuit to charge the battery normally by controlling the first switch device and the second switch device to be turned on.

[0161] It should be noted that in the embodiment of the present application, S82~S84, S85 and S86 are mutually exclusive steps, that is, the power management module does not execute S85 and S86 when executing S82~S84, does not execute S82~S84 and S86 when executing S85, and does not execute S82~S84 and S85 when executing S86.

[0162] See also Fig.12 In another embodiment of the present application, after the power management module controls the charging circuit to suspend charging the battery, the electronic device may also display a smart charging prompt box 121 in the notification bar of the user interface. The smart charging prompt box 121 may include a text description of smart charging protection, a charging recovery control 1211, and a charging pause control 1212. The user may resume the charging process of the battery by clicking the charging recovery control 1211.

[0163] Based on this, after S82, the charging method may further include the following steps 1 and 2:

[0164] Step 1, instructing the display screen to display a smart charging prompt box, wherein the smart charging prompt box includes a charging recovery control.

[0165] In this embodiment, after the charging process of the battery is suspended, the power management module can send first charging status information to the processor of the electronic device. The first charging status information can be used to describe that the electronic device is in a charging suspension state.

[0166] After receiving the first charging status information from the power management module, the processor can instruct the display screen to display the smart charging prompt box in response to the first charging status information.

[0167] Step 2: In response to a click operation on the charge recovery control, control the first switch device and the second switch device to be turned on.

[0168] When a click operation on the charge recovery control is detected, the processor of the electronic device can send a charge recovery instruction to the power management module. In response to the charge recovery instruction, the power management module can control both the first switch device and the second switch device to be turned on to resume the charging process of the battery.

[0169] From the above, it can be seen that the charging method provided in the embodiment of the present application, after the charging process of the battery is paused, displays a smart charging prompt box on the instructing display screen and configures a charging recovery control in the smart charging prompt box, so that the user can resume the charging process of the battery according to actual needs, thereby improving the user's charging experience.

[0170] Based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer-executable program. When the computer-executable program is called by a computer, the computer executes one or more steps in any of the above method embodiments.

[0171] Based on the same technical concept, the embodiment of the present application also provides a chip system, including a processor, the processor is coupled to a memory, and the processor executes a computer executable program stored in the memory to implement one or more steps in any of the above method embodiments. The chip system can be a single chip, or a chip module composed of multiple chips.

[0172] Based on the same technical concept, an embodiment of the present application also provides a computer executable program product. When the computer executable program product runs on an electronic device, the electronic device executes one or more steps in any of the above method embodiments.

[0173] In the above embodiments, the description of each embodiment has its own emphasis. For the parts not described or recorded in detail in a certain embodiment, please refer to the relevant description of other embodiments. It should be understood that the size of the sequence number of each step in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0174] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)), etc.

[0175] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0176] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the present application should be included in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiment of the present application should be based on the protection scope of the claims.

Claims

1. A charging method, characterized in that: include: Monitoring the remaining power of a battery of the electronic device when the electronic device is connected to a charger; When the remaining power is equal to the first power threshold at a first moment and the first moment is within a first time period, a first switch device between a power interface of the electronic device and a first node is controlled to be turned off, and a second switch device between the first node and the battery is controlled to be turned on, and the first node is also used to connect the working circuit of the electronic device; the end time of the first time period is within a target charging time period, and the target charging time period is a time period during which the electronic device is continuously connected to a charger for a long time and is not used, determined based on historical usage data and historical charging data of the electronic device; When the remaining power drops from the first power threshold to less than the first power threshold and greater than the second power threshold at a second moment, and the second moment is within the first time period, the first switching device is kept off and the second switching device is kept on; the second moment is later than the first moment; the second power threshold refers to the lower limit value of the remaining power that can keep the remaining power displayed on the user interface at the first power threshold unchanged.

2. The charging method according to claim 1, characterized in that: After controlling the first switch device between the power interface of the electronic device and the first node to be turned off and controlling the second switch device between the first node and the battery to be turned on, the method further includes: When the remaining power drops from the first power threshold to less than the second power threshold at a third moment, the first switching device and the second switching device are controlled to be turned on; the third moment is later than the second moment.

3. The charging method according to claim 1, characterized in that: After monitoring the remaining power of the battery of the electronic device when the electronic device is connected to a charger, the method further includes: When the remaining power is equal to a first power threshold at a first moment and the first moment is not within the first time period, the first switching device and the second switching device are controlled to be turned on.

4. The charging method according to claim 1, characterized in that: After monitoring the remaining power of the battery of the electronic device when the electronic device is connected to a charger, the method further includes: When the remaining power is less than the first power threshold at a fourth moment and the fourth moment is within the first time period, the first switching device and the second switching device are controlled to be turned on; the fourth moment is earlier than the first moment.

5. The charging method according to any one of claims 1 to 4, characterized in that: The time interval between the end time of the first time period and the end time of the target charging time period is a first time length.

6. The charging method according to any one of claims 1 to 4, characterized in that: The end time of the first time period is determined according to the end time of the target charging time period, the first power threshold and the target charging speed; the target charging speed is the charging speed of the charging stage corresponding to the first power threshold.

7. An electronic device, characterized in that: It includes a power interface, a charging circuit, a battery, a working circuit and a power management module; the charging circuit includes a first switch device and a second switch device; The first end of the first switch device is connected to the power interface, the second end of the first switch device and the first end of the second switch device are connected to a first node, the first node is also used to connect the working circuit, the second end of the second switch device is connected to the positive electrode of the battery, the positive electrode of the battery is grounded, and the controlled end of the first switch device and the controlled end of the second switch device are both connected to the power management module; The power management module is used to execute each step in the charging method according to any one of claims 1-6.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer-executable program, and when the computer-executable program is called by the electronic device, the electronic device executes each step in the charging method according to any one of claims 1 to 6.

9. A chip system, characterized in that: The chip system is applied to an electronic device, the chip system includes a processor, the processor is coupled to a memory, the memory is used to store computer program instructions, and when the processor calls the computer program instructions, the electronic device implements each step in the charging method as described in any one of claims 1 to 6.