Battery charging method, electronic device, and storage medium

CN120767455BActive Publication Date: 2026-09-25HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410636383.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2026-09-25
Estimated Expiration
2044-05-21

AI Technical Summary

Technical Problem

[0004]然而,电子设备在使用状态下,由于芯片的工作状态不同,会导致主板和副板出现发热不均匀的情况

Benefits of technology

[0077]第三方面以及第三方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第三方面以及第三方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120767455B_ABST
    Figure CN120767455B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a battery charging method, an electronic device and a storage medium. In the method, the electronic device determines whether a first working period ends in response to a plug-in operation of a charger, and obtains first target data when the first working period ends; the electronic device calculates first working data in a second working period according to the first target data, to determine a first time period and a second time period in the second working period according to the first working data, so that in the first time period, a first chip is turned on, a second chip is turned off, and the battery is charged through the first chip, and in the second time period, the first chip is turned off, the second chip is turned on, and the battery is charged through the second chip. In this way, the electronic device can dynamically adjust the charging time of the charging chip in different working periods, thereby reducing the temperature difference between the mainboard area and the subboard area, and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of smart terminal technology, and in particular to a battery charging method, electronic device and storage medium. Background Technology

[0002] With the development of information technology, in order to improve the performance of electronic devices, the chips of electronic devices can be distributed in the motherboard and sub-board. The motherboard is mainly responsible for most of the system functions in the electronic device; the sub-board is used to assist the motherboard in completing other functions, such as signal connection processing and headphone audio signal transmission.

[0003] The main board and sub-board of an electronic device can be located in different positions within the device, and typically a charging chip is installed in both the main board and the sub-board to improve the charging speed of the electronic device.

[0004] However, during use, the different operating states of chips in electronic devices can lead to uneven heating between the motherboard and the secondary board. Therefore, when charging electronic devices, if only one charging chip from the motherboard or the secondary board is used, it may result in a large temperature difference between the two boards, affecting the user experience. Summary of the Invention

[0005] To address the aforementioned technical problems, embodiments of this application provide a battery charging method, an electronic device, and a storage medium. In this method, the electronic device can determine the charging periods of different charging chips within different operating cycles, so that the battery is charged using different charging chips during different charging periods. This dynamically adjusts the charging duration of the charging chips within different operating cycles, thereby reducing the temperature difference between the main board area and the secondary board area and improving the user experience.

[0006] In a first aspect, embodiments of this application provide a method for charging a battery. This method is applied in an electronic device, which includes a first chip, a second chip, and a battery; wherein the first chip and the second chip are used to charge the battery.

[0007] The method may include: an electronic device determining whether a first working cycle has ended in response to a charger insertion operation; if the first working cycle has ended, the electronic device acquiring first target data; the electronic device calculating first working data for a second working cycle based on the first target data; the electronic device determining a first time period and a second time period within the second working cycle based on the first working data; during the first time period, the electronic device turning on a first chip and turning off a second chip to charge the battery through the first chip; and during the second time period, the electronic device turning off the first chip and turning on the second chip to charge the battery through the second chip.

[0008] The first chip can be the main charging chip. The second chip can be the auxiliary charging chip.

[0009] The first chip is installed in the first area of ​​the electronic device; the second chip is installed in the second area of ​​the electronic device.

[0010] Specifically, the first area can be the motherboard area. The second area can be the sub-board area.

[0011] For example, refer to Figure 3a As shown in 3b, the first chip can be SC-M (switch charge main) 12; the second chip can be SC-A (switch charge auxiliary) 22; the first area can be the motherboard 11; and the second area can be the sub-board 21.

[0012] The working cycle can be one cycle in which the battery is charged through the main charging chip and the auxiliary charging chip. The second working cycle is the next working cycle adjacent to the first working cycle.

[0013] For example, the cycle length of a work cycle can be 20 seconds.

[0014] The first target data can be a set of shell temperature data. It should be noted that the shell temperature data is updated periodically. That is, the shell temperature data acquired at different times may be different.

[0015] The first working data may include the working duration data of each charging chip during the second working cycle.

[0016] The first time period can be a period within the second working cycle. During this period, the battery can be charged via the main circuit charging chip. In other words, the first time period is the period during which the main circuit charging chip operates within the second working cycle.

[0017] The second time period can be another time period within the second working cycle. During this time period, the battery can be charged through the auxiliary charging chip. In other words, the second time period is the period during which the auxiliary charging chip operates within the second working cycle.

[0018] Specifically, the sum of the first and second time periods constitutes a complete work cycle.

[0019] In this way, electronic devices can determine the charging period of different charging chips in different working cycles, so that the battery is charged by different charging chips in different charging periods, thereby dynamically adjusting the charging time of the charging chips in different working cycles, thereby reducing the temperature difference between the motherboard area and the sub-board area and improving the user experience.

[0020] According to the first aspect, before acquiring the first target data, the electronic device may further include: at the beginning of the fitting period, acquiring the second target data within a preset time period, and performing data fitting based on the second target data to calculate the first target data.

[0021] The fitting period can be the period during which the shell temperature data is fitted. It can be understood that one fitting period yields one set of shell temperature data.

[0022] Specifically, the duration of the fitting cycle is less than or equal to the duration of the working cycle.

[0023] For example, the duration of the fitting period can be 5 seconds.

[0024] The preset time period can be a pre-defined historical time period, such as the first 60 seconds of the current time or the first 70 seconds of the current time.

[0025] The second target data can be a set of NTC sensor temperature data. It should be noted that the NTC sensor temperature data is periodically updated.

[0026] For example, the update cycle for NTC sensor temperature data can be 5 seconds.

[0027] The first target data is the data calculated in the latest fitting period. It should be noted that the shell temperature data calculated in the latest fitting period can overwrite the shell temperature data calculated in the previous fitting period.

[0028] In this way, the electronic device can obtain shell temperature data by fitting the temperature data from each sensor, which can improve the accuracy of the shell temperature data.

[0029] According to the first aspect, or any implementation of the first aspect above, the first working data includes a first working duration and a second working duration;

[0030] The electronic device calculates the first working data within the second working cycle based on the first target data, which may include: the electronic device determining the first data and the second data from the first target data; the electronic device calculating the first difference based on the first data and the second data, and calculating the first working duration within the second working cycle based on the first difference; and the electronic device calculating the second working duration within the second working cycle based on the cycle duration of the working cycle and the first working duration.

[0031] The first working duration can be the charging duration of the main circuit charging chip within the second working cycle. The second working duration can be the charging duration of the auxiliary circuit charging chip within the second working cycle.

[0032] The first data refers to the first case temperature data in the motherboard area. The second data refers to the second case temperature data in the sub-board area. The first difference is the difference between the first and second case temperature data.

[0033] For example, suppose the first data is A1, the second data is B1, and the first difference is C1, then C1 = A1 - B1.

[0034] Specifically, the first working time within the second working cycle is calculated based on the first difference. This can be achieved by inputting the first difference into the first PID control algorithm to obtain the first working time within the second working cycle.

[0035] In this way, the electronic device can calculate the working time of each charging chip based on the temperature difference between the case temperature data of the motherboard area and the case temperature data of the sub-board area, and thus control the temperature difference between the motherboard area and the sub-board area based on the working time of each charging chip, thereby reducing the temperature difference between the motherboard area and the sub-board area.

[0036] According to the first aspect, or any implementation of the first aspect above, the electronic device can calculate the target current data of the second chip during the second time period, and determine the first current data of the second chip based on the target current; when the electronic device charges the battery through the second chip, it charges the battery based on the first current data.

[0037] The target current data, also known as the target compensation current, can be the compensation current used to compensate for the charging current when the battery is charged through the auxiliary charging chip.

[0038] The first current data can be the current after compensating the charging current of the auxiliary circuit charging chip according to the target compensation current.

[0039] In this way, when the auxiliary circuit charging chip charges the battery, the electronic device compensates for the charging current, which can increase the temperature of the secondary board area, further reduce the temperature difference between the main board area and the secondary board area, and at the same time improve the charging speed of the battery.

[0040] According to the first aspect, or any implementation of the first aspect above, the electronic device calculates the target current of the second chip, which may include: the electronic device acquiring third target data, and determining third data and fourth data in the third target data; the electronic device calculating a second difference based on the third data and the fourth data, and calculating the target current of the second chip based on the second difference.

[0041] The third target data can be a set of shell temperature data. Specifically, the third target data can be the same as or different from the first target data.

[0042] The third data refers to the third case temperature data in the motherboard area. The fourth data refers to the fourth case temperature data in the sub-board area. The second difference is the difference between the second case temperature data, which can be the difference between the third and fourth case temperature data.

[0043] For example, suppose the third data is A2, the fourth data is B2, and the second difference is C2, then C2 = A2 - B2.

[0044] Specifically, the target current of the second chip can be calculated based on the second difference. This can be achieved by inputting the second difference into the second PID control algorithm to obtain the target current of the second chip.

[0045] In this way, the electronic device can calculate the compensation current of the auxiliary circuit charging chip based on the temperature difference between the case temperature data of the motherboard area and the case temperature data of the sub-board area, thereby increasing the temperature of the sub-board area and reducing the temperature difference between the motherboard area and the sub-board area.

[0046] According to the first aspect, or any implementation of the first aspect above, after calculating the target current of the second chip, the electronic device may further include: updating the target current according to the first threshold when the electronic device determines that the target current is less than the first threshold; and updating the target current according to the second threshold when the electronic device determines that the target current is greater than the second threshold.

[0047] The first threshold can be the minimum compensation threshold.

[0048] For example, the first threshold could be 0.

[0049] The second threshold can be the maximum compensation threshold. Specifically, different second thresholds can be used for different usage scenarios of electronic devices.

[0050] In this way, electronic devices can avoid instability in the control system caused by excessive target compensation current, and at the same time, they can avoid a decrease in charging speed caused by insufficient target compensation current.

[0051] According to the first aspect, or any implementation of the first aspect above, after the electronic device calculates the first working data within the second working cycle based on the first target data, it may further include:

[0052] Record the first work data and delete the first work data at the end of the second work cycle.

[0053] According to the first aspect, or any implementation of the first aspect above, the electronic device can determine whether the first chip has finished working within the first working cycle before the first working cycle ends; if the first chip has not finished working within the first working cycle, the electronic device can turn on the first chip and turn off the second chip, and charge the battery through the first chip; if the first chip has finished working within the first working cycle, the electronic device can determine whether the second chip has finished working within the first working cycle; if the second chip has not finished working within the first working cycle, the electronic device can turn off the first chip and turn on the second chip, and charge the battery through the second chip.

[0054] In this way, the electronic device can charge the battery first through the main charging chip and then through the auxiliary charging chip in the first working cycle, thereby optimizing the battery charging strategy and improving the stability of battery charging.

[0055] According to the first aspect, or any implementation of the first aspect above, the electronic device determining whether the first chip has finished its work in the first working cycle may include: the electronic device acquiring second working data in the first working cycle; the electronic device determining whether the first chip has finished its work in the first working cycle based on the current time and the second working data.

[0056] The electronic device determines whether the second chip has finished its work within the first working cycle, which may include: determining whether the second chip has finished its work within the first working cycle based on the current time and second working data.

[0057] The second working data may include the working duration data of each charging chip during the first working cycle.

[0058] According to the first aspect, or any implementation of the first aspect above, the electronic device can also determine the end of the first working cycle and delete the second working data in the first working cycle when the second chip finishes its work in the first working cycle.

[0059] In this way, the electronic device can end its working cycle when the auxiliary circuit charging chip finishes charging.

[0060] According to the first aspect, or any implementation of the first aspect above, before determining whether the first working cycle has ended, the electronic device may further include: the electronic device acquiring the current state of the electronic device;

[0061] The electronic device determines whether the first working cycle has ended, which may include: the electronic device determining whether the first working cycle has ended when the current state is the target state.

[0062] The target state can be an expanded state.

[0063] In this way, the electronic device can determine whether the first working cycle has ended when the electronic device is in the unfolded state, thereby controlling the charging time of each charging chip when the electronic device is in the unfolded state.

[0064] According to the first aspect, or any implementation of the first aspect above, before determining whether the first working cycle has ended, the electronic device may further include: the electronic device acquiring fourth target data;

[0065] The electronic device's determination of whether the first working cycle has ended may include: the electronic device determining whether the first working cycle has ended when it determines that the fourth target data is the target data.

[0066] The fourth target data can be a set of shell temperature data. The fourth target data can be the same as or different from the third and first target data.

[0067] The target data can be valid shell temperature data.

[0068] In this way, the electronic device can determine whether the first working cycle has ended when the case temperature data is valid, thereby controlling the charging time of each charging chip when the case temperature data is valid.

[0069] According to the first aspect, or any implementation of the first aspect above, before determining whether the first working cycle has ended, the electronic device may further include: the electronic device acquiring second current data;

[0070] The electronic device may determine whether the first working cycle has ended if it determines that the second current data is less than the third threshold.

[0071] The second current data is the current entering the battery, which is also the battery's charging current. The third threshold can be a preset current threshold.

[0072] For example, the third threshold could be 8A.

[0073] In this way, the electronic device determines whether the first working cycle has ended when the battery charging current is less than a preset current threshold, thereby controlling the charging time of each charging chip when the battery charging current is less than the preset current threshold.

[0074] Secondly, embodiments of this application provide an electronic device. The electronic device includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when executed by the one or more processors, cause the electronic device to perform the battery charging method of the first aspect and any one thereof.

[0075] The second aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the second aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here.

[0076] Thirdly, embodiments of this application provide a computer-readable storage medium. The computer-readable storage medium includes a computer program that, when executed on an electronic device, causes the electronic device to perform the battery charging method of the first aspect and any one thereof.

[0077] The third aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the third aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here.

[0078] Fourthly, embodiments of this application provide a computer program product, including a computer program that, when run, causes a computer to perform a battery charging method as described in the first aspect or any one of the first aspects.

[0079] The fourth aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the fourth aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here.

[0080] Fifthly, this application provides a chip including a processing circuit and transceiver pins. The transceiver pins and the processing circuit communicate with each other via an internal connection path. The processing circuit executes a battery charging method as described in the first aspect or any one thereof, controls the receiving pin to receive signals, and controls the transmitting pin to transmit signals.

[0081] The fifth aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the fifth aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here. Attached Figure Description

[0082] Figure 1 A schematic diagram of the hardware structure of an electronic device as an example;

[0083] Figure 2 A schematic diagram of the software structure of an electronic device as an example;

[0084] Figures 3a-3b This is an example of an application scenario;

[0085] Figure 4 This is a schematic diagram illustrating the module interaction of a battery charging method as an example.

[0086] Figure 5 The following is an example of a periodic time series diagram for shell temperature fitting;

[0087] Figure 6 This is a schematic diagram illustrating the process of calculating charging time data;

[0088] Figure 7 The schematic diagram of the first PID control algorithm is shown as an example.

[0089] Figure 8 This is a schematic diagram illustrating the process of calculating the target compensation current;

[0090] Figure 9 The schematic diagram of the second PID control algorithm is shown as an example.

[0091] Figure 10 This is a schematic diagram illustrating the process of updating the target compensation current;

[0092] Figure 11 This is an example of a module interaction diagram for parameter configuration;

[0093] Figure 12 A timing diagram illustrating the working cycle of a battery charging method as an example;

[0094] Figure 13 This is a schematic diagram illustrating the temperature curve, current curve, and charge amount curve during the charging process of a battery, as an example. Detailed Implementation

[0095] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0096] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0097] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.

[0098] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0099] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units means two or more processing units; multiple systems means two or more systems.

[0100] The battery charging method provided in this application can be applied to electronic devices. The electronic device can be any device having a motherboard and a sub-board, with charging chips respectively installed in both the motherboard and the sub-board. Optionally, the electronic device in this application can be a mobile phone, action camera (GoPro), digital camera, tablet computer, handheld computer, in-vehicle device, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, etc. This application does not impose any special limitations on the specific form of the electronic device.

[0101] To better understand the embodiments of this application, the structure of the electronic device of this application is described below:

[0102] like Figure 1 The diagram shown is a structural schematic of the electronic device 100. Optionally, the electronic device 100 can be a terminal, also referred to as a terminal device. The terminal can be a cellular phone or a tablet computer, etc., and this application does not limit the scope.

[0103] It should be understood that, Figure 1 The electronic device 100 shown is only one example of an electronic device, and the electronic device 100 may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations. Figure 1 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.

[0104] Electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include pressure sensors, gyroscope sensors, accelerometers, temperature sensors, motion sensors, barometric pressure sensors, magnetic sensors, distance sensors, proximity sensors, fingerprint sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.

[0105] Processor 110 may include one or more processing units, such as: application processor (AP), audio digital signal processor (ADSP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. The different processing units may be independent devices or integrated into one or more processors.

[0106] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0107] The application processor (AP) can communicate with the ADSP via G-link (Generic Link, a point-to-point link layer transport protocol). The ADSP can then be used to control battery charging.

[0108] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory.

[0109] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0110] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0111] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.

[0112] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, 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 (NFC), infrared (IR) technology, etc.

[0113] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.

[0114] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0115] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0116] Electronic device 100 can achieve shooting functions through an ISP, camera 193, video codec, GPU, display 194, and application processor. The ISP processes data fed back from the camera 193. The camera 193 captures still images or videos. An object passes through a lens to generate an optical image that is projected onto a photosensitive element. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats.

[0117] In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0118] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage functions.

[0119] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121, such as enabling the electronic device 100 to implement the battery charging method in this embodiment. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.).

[0120] In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0121] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0122] A pressure sensor is used to sense pressure signals and can convert these signals into electrical signals. In some embodiments, the pressure sensor may be located on the display screen 194. The electronic device 100 may also calculate the position of a touch based on the detection signal from the pressure sensor.

[0123] A touch sensor, also known as a "touch panel," can be located on the display screen 194. The touch sensor and display screen 194 together form a touchscreen, also called a "touch display." The touch sensor detects touch operations applied to or near it. The touch sensor can then transmit the detected touch operation to the application processor to determine the type of touch event. In some embodiments, the touch display can be a foldable screen.

[0124] A battery may include one or more batteries that can be used to power a load.

[0125] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0126] The charging management module 140 may include multiple charging chips, wherein the multiple charging chips may be connected to a battery, or each chip may be connected to a battery, so that the charging management module 140 can charge the battery through the charging chips.

[0127] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

[0128] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture, etc. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.

[0129] Figure 2 This is a software structure block diagram of the electronic device 100 according to an embodiment of this application.

[0130] The layered architecture of the electronic device 100 divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the electronic device may include an application processor (AP) side and an ADSP side. The AP side can be divided into five layers, from top to bottom: the application layer, the application framework layer, the Android Runtime and system libraries, the hardware abstraction layer (HAL), and the kernel layer. The ADSP side can be used to manage power, sensors, and audio processing, etc.

[0131] The application layer on the AP side can include a series of application packages.

[0132] like Figure 2 As shown, the application package may include a camera, gallery, and third-party applications with camera functionality. For example, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0133] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer, including various components and services to support Android development. The application framework layer includes some predefined functions.

[0134] like Figure 2 As shown, the application framework layer may include a window manager, content provider, view system, resource manager, notification manager, parameter configuration module, etc.

[0135] The parameter configuration module is used to configure the parameters during the battery charging process. For example, the configuration parameters may include configuration information for each algorithm in equalization control, configuration information for each algorithm in current compensation, calculated coefficients in shell temperature fitting, and reference information for sensor temperature in shell temperature fitting.

[0136] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0137] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, and more.

[0138] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0139] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0140] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0141] The Android Runtime consists of core libraries and a virtual machine. The Android Runtime is responsible for the scheduling and management of the Android system.

[0142] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0143] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0144] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0145] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0146] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0147] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0148] A 2D graphics engine is a graphics engine for 2D drawing.

[0149] The HAL layer is the interface layer located between the operating system kernel and the hardware circuitry. The HAL layer includes, but is not limited to, a camera HAL module and an audio HAL module. The camera HAL module processes the image stream, while the audio HAL module processes the audio stream (e.g., performs noise reduction, directional enhancement, etc.).

[0150] The kernel layer is the layer between hardware and software. It includes at least a file node parsing module, an audio driver, and a sensor driver module. The hardware includes at least a processor, display screen, camera, and ISP. The file node parsing module is used to parse valid configuration information from the parameter configuration information, and then sends this valid configuration information to the ADSP side via Glink communication.

[0151] The ADSP may include a parameter update module, a charging control module, an equalization control module, a current compensation module, and a case temperature fitting module.

[0152] The parameter update module updates various parameters in the charging control module, equalization control module, current compensation module, and case temperature fitting module based on received valid configuration information. The charging control module manages battery charging, such as turning charging chips on or off and controlling charging current. The equalization control module determines the operating time of different charging chips to balance the temperatures of the main board and sub-board. The current compensation module determines the compensation current for the charging chips on the sub-board to improve charging speed. The case temperature fitting module fits the case temperature data of the main board area and the sub-board area.

[0153] Understandable, Figure 2 The layers in the illustrated software structure and the components contained in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer layers than illustrated, and each layer may include more or fewer components; this application does not impose any limitations.

[0154] It is understood that, in order to implement the battery charging method in the embodiments of this application, the electronic device includes hardware and / or software modules that perform various functions. Based on the algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.

[0155] The following describes a battery charging scenario provided by an embodiment of this application. Battery charging is a common application scenario for electronic devices such as mobile phones. As users' requirements for electronic devices increase, the battery charging functions of electronic devices are becoming more and more sophisticated. In this scenario, a foldable screen mobile phone is used as an example for explanation.

[0156] A foldable phone has a motherboard and a sub-board located in its two folding areas, respectively. The motherboard can be located in either of the two folding areas, while the sub-board is located in the other. The motherboard area may include the main charging chip, and the sub-board area may include the auxiliary charging chip.

[0157] For example, such as Figure 3a As shown, foldable screen phones can be horizontally folded, meaning they can fold along... Figure 3a The folding axis 30 is folded laterally. Figure 3a The foldable phone shown may include a folding area 10 and a folding area 20. Folding area 10 may be the right screen area of ​​the foldable phone, and folding area 20 may be the left screen area of ​​the foldable phone.

[0158] Reference Figure 3a As shown in (1), the mainboard 11 of the foldable phone can be located in the folding area 10, and the secondary board 21 can be located in the folding area 20. (Refer to...) Figure 3a As shown in (2), the mainboard 11 of the foldable screen phone can be set in the folding area 20, and the subboard 21 can be set in the folding area 10.

[0159] In another example, such as Figure 3b As shown, foldable phones can also be vertically folding, meaning they can fold along... Figure 3b The folding axis 60 is folded longitudinally. Figure 3b The foldable phone shown may include a folding area 40 and a folding area 50. Folding area 40 may be the upper screen area of ​​the foldable phone, and folding area 50 may be the lower screen area of ​​the foldable phone.

[0160] Reference Figure 3b As shown in (1), the mainboard 11 of the foldable phone can be located in the folding area 40, and the secondary board 21 can be located in the folding area 50. (Refer to...) Figure 3b As shown in (2), the mainboard 11 of the foldable screen phone can be set in the folding area 50, and the sub-board 21 can be set in the folding area 40.

[0161] Continue to refer to Figure 3a and Figure 3bThe mainboard 11 may include chips such as a System on Chip (SOC) 13 and a Switch Charge Main (SC-M) 12, which perform main system functions. The secondary board 21 may include chips such as an audio BOX chip 23 and a Switch Charge Auxiliary (SC-A) 22, which assist the mainboard's calculations. It should be noted that the audio BOX chip 23 in the secondary board 21 can also be any chip that contributes to temperature during operation.

[0162] For foldable phones, because the motherboard and sub-board are located in two different folding areas, and different chips are arranged in the motherboard and sub-board, uneven heat generation can occur between the two folding areas during use. Understandably, the heat generation in the folding area mainly depends on the operating status of the individual chips in the motherboard or sub-board within that area; that is, the degree of heat generation unevenness will vary depending on the usage scenario.

[0163] Based on the above, when charging a foldable phone during use, if only the main charging chip or the auxiliary charging chip is used, a significant temperature difference will occur between the two folded areas, thus affecting the user experience. Therefore, foldable phones become overly reliant on the quality and efficiency of the heat spreader, but a heat spreader capable of balancing the temperature of both folded areas does not exist.

[0164] To address the aforementioned technical problems, this application provides a battery charging method. In this method, at the end of the current working cycle, the electronic device calculates the charging duration data for the next working cycle based on fitted case temperature data, and determines the charging periods for the main charging chip and the auxiliary charging chip based on the charging duration data. Thus, during the charging period of the main charging chip, the electronic device can turn on the main charging chip and turn off the auxiliary charging chip, thereby charging the battery through the main charging chip; and during the charging period of the auxiliary charging chip, the main charging chip can be turned off and the auxiliary charging chip can be turned on, thereby charging the battery through the auxiliary charging chip.

[0165] Therefore, electronic devices can determine the charging periods of different charging chips in different working cycles, so that the battery can be charged by different charging chips in different charging periods, thereby dynamically adjusting the charging time of the charging chips in different working cycles, thereby reducing the temperature difference between the motherboard area and the sub-board area and improving the user experience.

[0166] Furthermore, during the charging period of the auxiliary charging chip, the electronic device can calculate the target compensation current of the auxiliary charging chip to compensate for its charging current. This allows the electronic device to increase the temperature of the secondary board area, further reducing the temperature difference between the main board area and the secondary board area, while also improving battery charging efficiency.

[0167] Understandably, the longer the charging time of the charging chip, the more heat it generates, leading to an increase in temperature in the area where the charging chip is located. Therefore, adjusting the charging time of the main circuit charging chip and the auxiliary circuit charging chip can make the temperature of the motherboard area and the secondary board area relatively balanced, thereby reducing the temperature difference between the motherboard area and the secondary board area.

[0168] like Figure 4 The diagram illustrates an interaction between the various modules of an electronic device. (Refer to...) Figure 4 The charging method for the battery provided in this application specifically includes:

[0169] S101. After receiving the notification that the charger has been inserted, the charging control module sends the charger insertion information to the shell temperature fitting module.

[0170] Pluging in the charger means inserting the charger plug into the interface of the electronic device. Understandably, once the charger plug is inserted into the interface of the electronic device, the device can be charged via the charger; this charging method is also known as direct charging.

[0171] When a user plugs the charger into the interface of an electronic device, the electronic device can generate a charger insertion notification and send the notification to the charging control module.

[0172] Charger insertion information can be any information related to charger insertion, such as charger insertion current, charger insertion time, etc.

[0173] After receiving a notification that the charger has been inserted, the charging control module can generate charger insertion information and then send the charger insertion information to the casing temperature fitting module.

[0174] S102. After receiving the charger insertion information, the shell temperature fitting module acquires the NTC (Negative Temperature Coefficient) temperature data and periodically performs shell temperature fitting based on the NTC temperature data to obtain the shell temperature data.

[0175] NTC temperature data refers to temperature data measured by NTC temperature sensors at different locations within an electronic device. For example, NTC temperature data may include temperature data measured by an NTC temperature sensor located at the CPU location, temperature data measured by an NTC temperature sensor located at the USB port location, etc.

[0176] Specifically, the shell temperature fitting module can periodically acquire and store NTC temperature data. The database corresponding to the NTC temperature data can contain multiple sets of temperature data. For example, the shell temperature fitting module can acquire NTC temperature data every 5 seconds and store each acquired temperature data set.

[0177] It should be noted that the shell temperature fitting module can obtain the sensor temperature data at different locations by acquiring the NTC temperature data once. Regarding "which sensor locations' temperature data to acquire when acquiring the NTC temperature data," this can be determined according to the actual application scenario requirements; this embodiment does not impose specific limitations on this.

[0178] Shell temperature data can be temperature data at different points in an electronic device obtained through fitting.

[0179] Specifically, case temperature data can include the motherboard area (e.g., Figure 3a The folded area 10 shown in (1) is... Figure 3a The folded area 20 shown in (2) is... Figure 3b The folded area 40 shown in (1) is... Figure 3b Temperature data at different points within the folded area 50 shown in (2) and the sub-plate area (e.g.) Figure 3a The folded area 20 shown in (1) or Figure 3a The folded area 10 shown in (2) is... Figure 3b The folded area 50 shown in (1) is... Figure 3b Temperature data at different points within the folded area 40 shown in (2) of the diagram.

[0180] For example, shell temperature data may include front and rear shell temperature data, border temperature data, etc. in each region.

[0181] The shell temperature fitting module can perform shell temperature fitting based on NTC temperature data.

[0182] Specifically, shell temperature can be fitted based on historical NTC temperature data.

[0183] For example, the shell temperature fitting module can perform shell temperature fitting based on NTC temperature data from a preset historical time period (such as the 60 seconds before the current moment), or it can perform shell temperature fitting based on NTC temperature data from a preset number of historical periods (such as 8 historical periods). This embodiment does not specifically limit this.

[0184] The shell temperature fitting module can perform shell temperature fitting periodically, for example, every 5 seconds or every 10 seconds. The fitting period can be determined based on the specific application requirements; this embodiment does not impose a specific limitation. It is understood that the shorter the fitting period, the higher the accuracy of the shell temperature data obtained.

[0185] For example, such as Figure 5 As shown, the shell temperature fitting module obtains shell temperature data a at the start time t11 of the i-th calculation cycle. It obtains shell temperature data b at the start time t12 of the (i+1)-th calculation cycle. It obtains shell temperature data c at the start time t13 of the (i+2)-th calculation cycle. It obtains shell temperature data d at the start time t14 of the (i+3)-th calculation cycle. Each calculation cycle can be 5 seconds, 10 seconds, etc. The calculation cycle is also the cycle of the shell temperature fitting.

[0186] After obtaining the shell temperature data, the shell temperature fitting module can save the shell temperature data.

[0187] Specifically, when saving shell temperature data, only the most recent shell temperature data is retained. That is, the database corresponding to the shell temperature data contains only one set of shell temperature data. After obtaining shell temperature data through shell temperature fitting in the latest calculation cycle, the shell temperature data obtained in the latest calculation cycle can be used to overwrite the shell temperature data fitted in the previous calculation cycle.

[0188] Continue to refer to Figure 5 At time t11, the shell temperature fitting module can save shell temperature data 'a' to the corresponding database. At time t12, it can save shell temperature data 'b' to the corresponding database. At this time, shell temperature data 'a' is overwritten by shell temperature data 'b'. At time t13, it can save shell temperature data 'c' to the corresponding database. At this time, shell temperature data 'b' is overwritten by shell temperature data 'c'.

[0189] It should be noted that the relevant processing procedures for shell temperature fitting can be found in existing technologies, and will not be repeated here.

[0190] S103. After receiving the notification that the charger has been inserted, the charging control module obtains the shell temperature data information from the shell temperature fitting module.

[0191] Shell temperature data information can include shell temperature data and its update cycle. The update cycle of the shell temperature data is also the cycle of shell temperature fitting.

[0192] In other words, when the casing temperature fitting module obtains casing temperature data, the charging control module can also obtain the update cycle of the casing temperature data in order to determine the validity of the casing temperature data based on the update cycle of the casing temperature data.

[0193] S104. The charging tube control module determines whether the current state of the electronic device is in the unfolded state and whether the shell temperature data is valid; if yes, execute S105; if no, end the process.

[0194] The current state of an electronic device can include an unfolded state and a closed state. The unfolded state refers to the state where the electronic device is unfolded along the folding axis. The closed state refers to the state where the electronic device is closed along the folding axis.

[0195] After the charging control module obtains the shell temperature data in the shell temperature fitting module, it can determine whether the shell temperature data is valid based on the obtained shell temperature data.

[0196] Specifically, the charging control module can determine whether the shell temperature data is valid based on the update cycle of the shell temperature data.

[0197] For example, assuming the shell temperature data has been updated for 5 cycles, it can be determined that the shell temperature data is valid.

[0198] In another optional embodiment, the charging control module can also determine whether the shell temperature data is valid based on the data format, data range, data integrity, etc.

[0199] For the relevant processing procedures for determining whether the current state of an electronic device is in the unfolded state, please refer to existing technologies, which will not be elaborated here.

[0200] When the charging control module determines that the current state of the electronic device is the deployed state and that the casing temperature data is valid, it can further determine whether the battery current is less than the current threshold. When the charging control module determines that the current state of the electronic device is not the deployed state or that the casing temperature data is invalid, it can terminate the charging method of the battery provided in this application.

[0201] It is understood that the charging method for the battery provided in this application can be a cyclical process. If, during this process, the charging control module determines that the current state of the electronic device is not the unfolded state or that the shell temperature data is invalid, then the process can end and proceed to the next process until it is determined that the current state of the electronic device is the unfolded state and that the shell temperature data is valid.

[0202] S105. The charging control module determines whether IBAT (battery current) is less than the current threshold; if yes, proceed to S106; otherwise, end the process.

[0203] IBAT can be the current entering the battery, i.e., the battery charging current. The current threshold can be a preset threshold for the current entering the battery. For example, the current threshold can be 8A (Amperes), 10A, etc. The specific value of the current threshold can be determined according to the actual application scenario requirements, and this embodiment does not impose a specific limitation on it.

[0204] When the charging control module determines that IBAT is less than the current threshold, the balancing control module can further determine whether the current working cycle has ended. When the charging control module determines that IBAT is greater than the current threshold, it can terminate the charging method for the battery provided in this application.

[0205] In existing technologies, if IBAT is greater than the current threshold, the charging control module can activate both the main charging chip and the auxiliary charging chip. That is, the battery is charged simultaneously using both the main and auxiliary charging chips. However, if the battery is charged simultaneously using both chips, the temperature difference between the main board area and the secondary board area cannot be adjusted. Therefore, in this embodiment, the process ends when IBAT exceeds the current threshold.

[0206] In one optional implementation, the charging control module can also determine whether the electronic device is in a screen-on state. If the electronic device is in a screen-on state, the next step can be executed; if the electronic device is not in a screen-on state, the process can be terminated.

[0207] It should be noted that the step "the charging control module determines whether the electronic device is in a screen-on state" can be executed before or after step S103 or S104. This embodiment does not make any specific limitation on this.

[0208] S106. The equalization control module determines whether the current work cycle has ended; if yes, execute S107; if no, execute S108.

[0209] A working cycle can be one cycle in which the battery is charged using the main charging chip and the auxiliary charging chip. Within a working cycle, only the main charging chip, only the auxiliary charging chip, or both can be activated. However, two charging chips cannot be activated simultaneously within a single working cycle.

[0210] That is, assuming the cycle length of the working cycle is T, the working time of the main charging chip is T1, and the working time of the auxiliary charging chip is T2, then when the main charging chip is turned on alone, T1 = T, or when the auxiliary charging chip is turned on alone, T2 = T, or when both the main charging chip and the auxiliary charging chip are turned on, T = T1 + T2.

[0211] For example, the cycle length can be 20 seconds or 30 seconds, etc. The cycle length can be determined according to the actual application scenario requirements, and this embodiment does not impose a specific limitation on it.

[0212] When the equalization control module determines that the current working cycle has ended, it can further obtain the shell temperature data from the shell temperature fitting module to calculate the charging time of the main charging chip and the auxiliary charging chip based on the shell temperature data.

[0213] Understandably, once the current working cycle ends, the next working cycle can begin. That is, at the beginning of each working cycle, the equalization control module acquires the casing temperature data from the casing temperature fitting module and calculates the charging time of the main charging chip and the auxiliary charging chip based on the casing temperature data. Thus, within each working cycle, the charging time of the battery can be controlled based on the calculated charging time of the main charging chip and the auxiliary charging chip.

[0214] The equalization control module can skip the step of calculating charging time if it determines that the current work cycle has not ended. Understandably, if the current work cycle has not ended, there is no need to calculate the charging time until the current work cycle ends.

[0215] S107. The equalization control module obtains the shell temperature data from the shell temperature fitting module, calculates the charging time data for the next working cycle based on the shell temperature data, and records the charging time data.

[0216] The charging time data can include the charging time T1 of the main charging chip and the charging time T2 of the auxiliary charging chip.

[0217] Once the current work cycle is completed, the equalization control module can calculate and record the working time data for the next work cycle, so that the electronic device can control the charging of the battery based on the charging time data.

[0218] Understandably, the maximum value of T1 and T2 is the cycle length of the work period, and the minimum value is 0. For example, assuming the cycle length of the work period is 20 seconds, then 0... <T1<20,0<T2<20。

[0219] Normally, the temperature of the motherboard area is higher than that of the secondary board area. Therefore, the charging time of the auxiliary charging chip can be longer than that of the main charging chip. This increases the temperature of the secondary board area, thereby reducing the temperature difference between the motherboard and secondary board areas.

[0220] Reference Figure 6 The process of calculating the charging time T1 of the main charging chip and the charging time T2 of the auxiliary charging chip based on the case temperature data can specifically include:

[0221] S1071. In the shell temperature data, determine the first shell temperature data A1 in the motherboard area and the second shell temperature data B1 in the sub-board area.

[0222] The first case temperature data can be either the highest value among the case temperature data corresponding to each point in the motherboard area, or the average value among the case temperature data corresponding to each point in the motherboard area. Similarly, the second case temperature data can be either the highest value among the case temperature data corresponding to each point in the sub-board area, or the average value among the case temperature data corresponding to each point in the sub-board area.

[0223] It is understandable that when the first shell temperature data is the highest value, the second shell temperature data will also be the highest value. When the first shell temperature data is the average value, the second shell temperature data will also be the average value.

[0224] S1072. Calculate the difference C1 between the first shell temperature data A1 in the motherboard area and the second shell temperature data B1 in the sub-board area.

[0225] Specifically, the difference in the first shell temperature data C1 = the first shell temperature data A1 - the second shell temperature data B1.

[0226] S1073. Based on the first shell temperature data difference C1, calculate the charging time T1 of the main charging chip and the charging time T2 of the auxiliary charging chip.

[0227] Specifically, the equalization control module can employ a first PID (Proportion Integral Differential) control algorithm to calculate the charging time T1 of the main charging chip and the charging time T2 of the auxiliary charging chip. The first PID control algorithm is used to calculate the charging time of each charging chip.

[0228] Figure 7 The schematic diagram of the first PID control algorithm is shown as an example. (Refer to...) Figure 7The equalization control module can input the first case temperature data of the main board and the second case temperature data of the secondary board into the first PID control algorithm. The first PID control algorithm performs proportional, integral and derivative adjustments to obtain the charging time T1 of the main charging chip. Then, the charging time T2 of the auxiliary charging chip is calculated by the cycle length of the working cycle.

[0229] Specifically, the first PID control algorithm can be calculated using the following formula:

[0230]

[0231] T2 = T - T1

[0232] Where C1(t) represents the first shell temperature data difference at time t; K p1 K represents the proportional control coefficient in the first PID control algorithm. i1 This represents the integral control system in the first PID control algorithm; K d1 T represents the derivative control coefficient in the first PID control algorithm; T represents the cycle length of the working cycle; T1 represents the charging time of the main charging chip; T2 represents the charging time of the auxiliary charging chip.

[0233] S108. The equalization control module determines whether the main charging chip has finished charging; if yes, execute S110; if no, execute S109.

[0234] If the current work cycle has not ended, it can continue to determine whether the main circuit charging chip has finished charging within the current work cycle. If the current work cycle has ended, the charging time of the main circuit charging chip in the next work cycle is calculated, and then it is determined whether the main circuit charging chip has finished charging.

[0235] When the equalization control module determines that the main charging chip has not finished charging, it can send first control information to the charging control module, which then controls the battery charging based on the first control information. When the equalization control module determines that the main charging chip has finished charging, it can further determine whether the auxiliary charging chip has finished charging.

[0236] It should be noted that during the working cycle, if the charging time of the main charging chip is not 0, the main charging chip will be turned on first until the main charging chip finishes charging, and then the auxiliary charging chip will be turned on.

[0237] In one optional embodiment, the equalization control module can determine whether the main charging chip has finished charging based on the start time of the working cycle, the current time, and the charging duration of the main charging chip.

[0238] Specifically, first, the time difference between the start time of the working cycle and the current time can be calculated, and then the magnitude of the time difference and the charging duration of the main-path charging chip is compared. If the time difference is less than the charging duration of the main-path charging chip, it can be determined that the main-path charging chip has not finished charging. If the time difference is greater than or equal to the charging duration of the main-path charging chip, it can be determined that the main-path charging chip has finished charging.

[0239] For example, assuming the start time of the working cycle is S, the current time is M, and the charging duration of the main-path charging chip is T1, then the time difference is D1=M-S. When D1≥T1, it can be determined that the auxiliary-path charging chip has finished charging. When D1<T1, it can be determined that the auxiliary-path charging chip has not finished charging.

[0240] S109: an equalization control module sends first control information to a charging control module, and the charging control module enables the main-path charging chip and disables the auxiliary-path charging chip according to the first control information.

[0241] The first control information may be information capable of controlling battery charging. The first control information may include information for enabling the main-path charging chip and disabling the auxiliary-path charging chip.

[0242] When the equalization control module determines that the main-path charging chip has not finished charging, it can send first control information to the charging control module, and the charging control module can enable the main-path charging chip and disable the auxiliary-path charging chip according to the first control information, so as to charge the battery through the main-path charging chip.

[0243] After the charging control module enables the main-path charging chip and disables the auxiliary-path charging chip, the operation of step S103 in which a case temperature fitting module acquires case temperature data information can be executed again, so as to continue the procedure of the battery charging method provided in the present application.

[0244] S110: the equalization control module determines whether the auxiliary-path charging chip has finished charging; if yes, execute S114; if no, execute S111 and S112.

[0245] If the main-path charging chip has finished charging, the battery can be charged by the auxiliary-path charging chip. Therefore, after determining that the main-path charging chip has finished charging, it is possible to further determine whether the auxiliary-path charging chip has finished charging.

[0246] If the auxiliary-path charging chip has not finished charging, the equalization control module can send second control information to the charging control module, so that the charging control module controls charging of the battery according to the second control information. Meanwhile, the equalization control module can also send charging state information to a current compensation module, so that the current compensation module calculates a target compensation current, and thus compensates the current in the auxiliary-path charging chip according to the target compensation current.

[0247] If the auxiliary-path charging chip finishes charging, the charging duration data can be cleared, and it can be determined that the current working cycle is ended.

[0248] In an optional embodiment, the equalization control module can determine whether the auxiliary-path charging chip has finished charging according to the start time of the working cycle, the current time, the charging duration of the main-path charging chip, and the charging duration of the auxiliary-path charging chip.

[0249] Specifically, firstly, the time difference between the start time of the working cycle and the current time can be calculated, then the duration difference between the time difference and the charging duration of the main-path charging chip is calculated, and then the size comparison between the duration difference and the charging duration of the auxiliary-path charging chip is performed. If the duration difference is less than the charging duration of the auxiliary-path charging chip, it can be determined that the auxiliary-path charging chip has not finished charging. If the duration difference is greater than or equal to the charging duration of the auxiliary-path charging chip, it can be determined that the auxiliary-path charging chip has finished charging.

[0250] For example, assuming that the start time of the working cycle is S, the current time is M, the charging duration of the main-path charging chip is T1, and the charging duration of the auxiliary-path charging chip is T2, then the time difference is D1=M-S, and the duration difference is D2=D1-T1. When D2≥T2, it can be determined that the auxiliary-path charging chip has finished charging. When D2<T2, it can be determined that the auxiliary-path charging chip has not finished charging.

[0251] S111: The equalization control module sends second control information to the charging control module, and the charging control module turns off the main-path charging chip and turns on the auxiliary-path charging chip according to the second control information.

[0252] The second control information may be another piece of information capable of controlling current charging. The second control information may include information of turning off the main-path charging chip and turning on the auxiliary-path charging chip.

[0253] When the equalization control module determines that the auxiliary-path charging chip has not finished charging, it can send the second control information to the charging control module, and the charging control module can turn off the main-path charging chip and turn on the auxiliary-path charging chip according to the second control information, so as to charge the battery through the auxiliary-path charging chip.

[0254] S112: The equalization control module sends charging state information to the current compensation module, and the current compensation module calculates a target compensation current.

[0255] The charging state information can characterize the state of charging the battery through the auxiliary-path charging chip. The target compensation current may be a compensation current for compensating the charging current when the battery is charged through the auxiliary-path charging chip.

[0256] When the equalization control module determines that the auxiliary charging chip has not finished charging, it can send charging status information to the current compensation module, which can then calculate the target compensation current. In other words, the current compensation module can calculate the target compensation current as soon as it determines that the auxiliary charging chip is operating.

[0257] In one optional implementation, the current compensation module can acquire shell temperature data from the shell temperature fitting module and calculate the target compensation current based on the shell temperature data. (See reference...) Figure 8 The process by which the current compensation module calculates the target compensation current based on the case temperature data can specifically include:

[0258] S1121. In the shell temperature data, determine the third shell temperature data A2 in the motherboard area and the fourth shell temperature data B2 in the sub-board area.

[0259] The third case temperature data can be either the highest value among the case temperature data corresponding to each point in the motherboard area, or the average value among the case temperature data corresponding to each point in the motherboard area. Similarly, the fourth case temperature data can be either the highest value among the case temperature data corresponding to each point in the sub-board area, or the average value among the case temperature data corresponding to each point in the sub-board area.

[0260] It is understandable that when the third shell temperature data is the highest value, the fourth shell temperature data is also the highest value. When the third shell temperature data is the average value, the fourth shell temperature data is also the average value.

[0261] S1122. Calculate the difference C2 between the second shell temperature data between the third shell temperature data A2 in the motherboard area and the fourth shell temperature data B2 in the sub-board area.

[0262] Specifically, the difference in the second shell temperature data C2 = the difference in the third shell temperature data A2 - the difference in the fourth shell temperature data B2.

[0263] S1123. Calculate the target compensation current of the auxiliary circuit charging chip based on the difference in the second shell temperature data.

[0264] Specifically, the equalization control module can employ a second PID (Proportion Integral Differential) control algorithm to calculate the target compensation current for the auxiliary circuit charging chip. The second PID control algorithm is used to calculate the compensation current for the auxiliary circuit charging chip.

[0265] Figure 9 The schematic diagram of the second PID control algorithm is shown as an example. (Refer to...) Figure 9The equalization control module can input the third case temperature data of the main board and the fourth case temperature data of the sub-board into the second PID control algorithm. The second PID control algorithm performs proportional, integral and derivative adjustments to obtain the compensation current I of the auxiliary circuit charging chip.

[0266] Specifically, the second PID control algorithm can be calculated using the following formula:

[0267]

[0268] Where C2(t) represents the difference in the second shell temperature data at time t; K p2 K represents the proportional control coefficient in the second PID control algorithm. i2 This represents the integral control system in the second PID control algorithm; K d2 The derivative control coefficient in the second PID control algorithm is represented by T; the cycle length of the working cycle is represented by I; and the target compensation current of the auxiliary circuit charging chip is represented by I.

[0269] In another alternative implementation, the current compensation module can also calculate the target compensation current based on the NTC temperature data. The relevant processing flow for "the current compensation module calculating the target compensation current based on the NTC temperature data" can be found in existing technologies and will not be repeated here.

[0270] Normally, the target compensation current is a positive value. However, in certain usage scenarios of electronic devices, the case temperature of the secondary board area may be higher than that of the main board area, resulting in a negative difference between the two case temperatures. Consequently, the target compensation current calculated based on this difference will also be negative. A negative target compensation current reduces the battery charging speed. To improve the battery charging speed, a threshold can be used to limit the target compensation current.

[0271] In one optional embodiment, after calculating the target compensation current, the current compensation module can update the target compensation current based on a maximum compensation threshold and a minimum compensation threshold. The maximum compensation threshold prevents the target compensation current from being too large, thereby maintaining the stability of the existing control system. The minimum compensation threshold prevents the target compensation current from being too small, thereby improving the charging speed.

[0272] Reference Figure 10 The current compensation module updates the target compensation current based on the maximum and minimum compensation thresholds, which may include:

[0273] S1. Determine whether the target compensation current I is less than the minimum compensation threshold I. min If yes, execute S2; otherwise, execute S3.

[0274] The minimum compensation threshold can be a permissible minimum value for the compensation current. That is, the target compensation current cannot be less than the minimum compensation threshold. For example, the minimum compensation threshold can be 0, meaning the target compensation current cannot be negative.

[0275] It is understandable that the specific value of the minimum compensation threshold can be determined according to the actual application scenario requirements, and this embodiment does not impose a specific limitation on it.

[0276] If the target compensation current is less than the minimum compensation threshold, the target compensation current can be updated based on the minimum compensation threshold. That is, the value of the target compensation current is updated to the value of the minimum compensation threshold.

[0277] If the target compensation current is greater than the minimum compensation threshold, it can be further determined whether the target compensation threshold is greater than the maximum compensation threshold.

[0278] S2. Update the target compensation current based on the minimum compensation threshold.

[0279] S3. Determine whether the target compensation current I is greater than the maximum compensation threshold I. max If yes, execute S4; otherwise, keep the target compensation current unchanged.

[0280] The maximum compensation threshold can be a maximum allowable value for the compensation current. That is, the target compensation current is not allowed to exceed the maximum compensation threshold.

[0281] In different usage scenarios of electronic devices (such as gaming, social networking, and short video scenarios), due to hardware and thermal design reasons, the temperature difference between the motherboard area and the sub-board area will be different in different usage scenarios. Therefore, different usage scenarios can correspond to different maximum compensation thresholds.

[0282] If the target compensation current is greater than the maximum compensation threshold, the target compensation current can be updated based on the maximum compensation threshold. In other words, the value of the target compensation current is updated to the value of the maximum compensation threshold.

[0283] If the target compensation current is less than the maximum compensation threshold, it means that the target compensation current is within the allowable range, so the target compensation current does not need to be updated and can remain unchanged.

[0284] S4. Update the target compensation current based on the maximum compensation threshold.

[0285] S113. The current compensation module sends the target compensation current to the charging control module, and the charging control module controls the charging current of the auxiliary charging chip according to the target compensation current.

[0286] After calculating the target compensation current, the current compensation module can send the target compensation current to the charging control module. The charging control module then controls the charging current of the auxiliary charging chip based on the target compensation current.

[0287] After the charging control module controls the charging current of the auxiliary charging chip according to the target compensation current, it can return to step S103 to obtain the case temperature data information in the case temperature fitting module to continue the process of the battery charging method provided in this application.

[0288] S114. The equalization control module clears the charging time data and determines that the current working cycle has ended.

[0289] If the equalization control module determines that the auxiliary charging chip has finished charging, it means that the current working cycle has ended. Then, the charging duration data can be cleared and the current working cycle can be confirmed to have ended.

[0290] After the equalization control module clears the charging time data and determines that the current working cycle has ended, it can return to step S103 to obtain the shell temperature data information in the shell temperature fitting module to continue the process of the battery charging method provided in this application.

[0291] Before executing the battery charging method provided in this application, the electronic device can also configure various parameters of the battery charging method. (Refer to...) Figure 11 The process of configuring various parameters in the battery charging method of an electronic device may specifically include:

[0292] S201. The parameter configuration module obtains the parameter configuration file and parses the parameter configuration file.

[0293] A parameter configuration file is a file that configures various parameters. It can include configuration details for parameters such as control coefficients in a PID control algorithm and NTC temperature data for shell temperature fitting.

[0294] For example, the parameter configuration file can be in JSON file format.

[0295] After the electronic device is powered on, the parameter configuration module in the application processor (AP) can obtain the parameter configuration file and parse it, thereby converting the parameter configuration file into data.

[0296] S202. The parameter configuration module packages the parsed parameter configuration file to obtain the parameter configuration file node.

[0297] The parameter configuration file node can be the file node corresponding to the parameter configuration information obtained from the packaging.

[0298] After parsing the parameter configuration file, the parameter configuration module can further package the parsed parameter configuration file and then write the packaged data into the file node, thereby obtaining the parameter configuration file node.

[0299] S203. The parameter configuration module sends the parameter configuration file node to the file node parsing module. The file node parsing module parses the configuration information in the parameter configuration file node to obtain valid configuration information.

[0300] The file node parsing module can parse configuration information in parameter configuration file nodes and package the valid configuration information.

[0301] S204. The file node parsing module sends the valid configuration information to the configuration update module, and the configuration update module updates the charging configuration information based on the valid configuration information.

[0302] The file node parsing module can send valid configuration information to the configuration update module in the ADSP processor via G-link communication.

[0303] Charging configuration information can be the parameter configuration information of each module in the ADSP when the electronic device executes the battery charging method.

[0304] For example, the charging configuration information may include the configuration information of each control coefficient in the second PID control algorithm of the current compensation module. The charging configuration information may also include the configuration information of each NTC temperature data used during shell temperature fitting in the shell temperature fitting module. Furthermore, the charging configuration information may include the configuration information of each control coefficient in the first PID control algorithm of the equalization control module.

[0305] The specific configuration information in the charging configuration information can be determined according to the actual application scenario requirements, and this embodiment does not impose specific limitations on it.

[0306] The following detailed description of the working cycle in the battery charging method provided in this application embodiment is illustrated by a specific example. Figure 12 This is a timing diagram of a work cycle as an example.

[0307] Reference Figure 12 At time t21, the electronic device can determine the end of the current working cycle (i.e., the (i-1)th working cycle) and calculate the charging time data for the next working cycle (i.e., the i-th working cycle) at time t21. This means calculating the charging time T1 of the main charging chip and the charging time T2 of the auxiliary charging chip in the i-th working cycle. For example... Figure 12 As shown, both T1 and T2 are greater than 0.

[0308] At time t21 (the start of the i-th working cycle), the electronic device can turn on the main charging chip and turn off the auxiliary charging chip, thereby charging the battery through the main charging chip. At time t3 (the end of the main charging chip's charging), the electronic device can turn off the main charging chip and turn on the auxiliary charging chip, thereby charging the battery through the auxiliary charging chip.

[0309] During the period from time t3 to time t22 (that is, during the process of charging the battery through the auxiliary charging chip), the electronic device can calculate the compensation current of the auxiliary charging chip, thereby compensating for the charging current of the battery.

[0310] At time t22 (which is the time when the auxiliary circuit charging chip finishes charging), the electronic device can determine that the i-th working cycle has ended and clear the values ​​of T1 and T2.

[0311] Continue to refer to Figure 12 At time t22, the electronic device calculates the charging time data for the next working cycle (i.e., the (i+1)th working cycle), which is the charging time T1 of the main charging chip and the charging time T2 of the auxiliary charging chip in the (i+1)th working cycle. For example... Figure 12 As shown, the charging time T1 of the main charging chip is equal to the cycle length of the working cycle, and the charging time T2 of the auxiliary charging chip is 0.

[0312] At time t22 (the start of the (i+1)th working cycle), the electronic device can turn on the main charging chip and turn off the auxiliary charging chip, thus charging the battery through the main charging chip. At time t23, the electronic device can determine that the main charging chip has finished charging. However, since the charging time T2 of the auxiliary charging chip is 0, the electronic device can also determine that the auxiliary charging chip has finished charging at time t23.

[0313] Continue to refer to Figure 12 The electronic device calculates the charging time data for the next working cycle (i.e., the (i+2)th working cycle) at time t23, which is the charging time T1 of the main charging chip and the charging time T2 of the auxiliary charging chip in the (i+1)th working cycle. For example... Figure 12 As shown, the charging time T1 of the main charging chip is 0, and the charging time T2 of the auxiliary charging chip is equal to the cycle length of the working cycle.

[0314] Since the charging time T1 of the main charging chip is 0, the electronic device can determine that the main charging chip has finished charging at time t23. Therefore, at time t23 (that is, at the beginning of the (i+2)th working cycle), the electronic device can turn off the main charging chip and turn on the auxiliary charging chip, thereby charging the battery through the auxiliary charging chip.

[0315] Between time t23 and time t24 (that is, during the process of charging the battery through the auxiliary charging chip), the electronic device can calculate the compensation current of the auxiliary charging chip, thereby compensating for the charging current of the battery.

[0316] It should be noted that the compensation current of the auxiliary charging chip can change in real time between time t3 and time t22, and between time t23 and time t24.

[0317] For example, assuming the compensation current of the auxiliary charging chip is calculated based on the case temperature data, if the case temperature data changes during the (i+2)th working cycle, the compensation current of the auxiliary charging chip will also change accordingly.

[0318] Figure 13 An exemplary diagram illustrates the temperature curve, current curve, and charge amount curve during the battery charging process. For example... Figure 13 As shown in (1), the horizontal axis is used to represent time, and the vertical axis is used to represent the temperature corresponding to the temperature curve or the charging current corresponding to the charging current curve.

[0319] After the electronic device performs the battery charging method provided in this application (hereinafter referred to as "after performing this application"), the overall temperature change curve of the electronic device is as follows: Figure 13 Curve 301, shown in (1), is the battery charging current variation curve, as follows: Figure 13 Curve 303 is shown in (1) of the diagram. The highest temperature of temperature change curve 301 is T2.

[0320] The overall temperature change curve of the electronic device before executing the battery charging method provided in this application (hereinafter referred to as "before executing this application"), as shown in the figure. Figure 13 Curve 302, shown in (1), is the battery charging current variation curve, as follows: Figure 13 Curve 304 is shown in (1) of the diagram. The highest temperature of temperature change curve 302 is T1.

[0321] Depend on Figure 13 As shown in (1), at the same time, the charging current entering the battery after the execution of this application is much larger than the charging current entering the battery before the execution of this application. However, after the execution of this application, the overall temperature of the electronic device does not increase significantly compared to before the execution of this application, and the highest temperature T2 of temperature change curve 301 is very close to the highest temperature T1 of temperature change curve 302. That is, during the battery charging process, under the effect of the balanced control of the shell temperature and the current compensation of the auxiliary circuit charging chip, the overall temperature of the electronic device does not increase significantly despite the significant increase in charging current.

[0322] like Figure 13 As shown in (2), the horizontal axis represents time, and the vertical axis represents the battery charge level. The battery charge level curve after the electronic device executes this application is shown below. Figure 13 Curve 305 is shown in (2) of the diagram. The battery charge curve of the electronic device prior to execution of this application is shown below. Figure 13 The curve 306 is shown in (2) of the diagram.

[0323] Depend on Figure 13 As can be seen from (2) in the above, within the same time period, the rate of increase in battery charge after the implementation of this application is much faster than the rate of increase in battery charge before the implementation of this application. That is, during the battery charging process, the charging speed of the battery is significantly improved under the effect of the balanced control of the casing temperature and the current compensation of the auxiliary circuit charging chip.

[0324] Therefore, the battery charging method provided in this application can improve the battery charging speed while reducing the temperature difference between the motherboard area and the sub-board area, thereby enhancing the user experience.

[0325] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the battery charging method in the above embodiment.

[0326] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the battery charging method described in the above embodiment.

[0327] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the battery charging method in the above-described method embodiments.

[0328] In this embodiment, the electronic devices (such as mobile phones), computer storage media, computer program products, or chips are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0329] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0330] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0331] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for charging a battery, characterized in that, The method is applied in an electronic device, the electronic device including a first chip, a second chip, and a battery; wherein the first chip and the second chip are used to charge the battery; the method includes: Determine whether the first working cycle has ended, and if the first working cycle has ended, acquire the first target data; the first working cycle is a cycle in which the battery is charged through the first chip and the second chip; the first target data is a set of case temperature data; Based on the first target data, calculate the first working data within the second working cycle; wherein, the second working cycle is the next working cycle adjacent to the first working cycle; the first working data includes the working duration data of each charging chip within the second working cycle; Based on the first work data, determine the first time period and the second time period within the second work cycle; During the first time period, the first chip is turned on and the second chip is turned off, and the battery is charged through the first chip; During the second time period, the first chip is turned off and the second chip is turned on, and the battery is charged through the second chip.

2. The method according to claim 1, characterized in that, Before acquiring the first target data, the method further includes: At the beginning of the fitting period, the second target data within a preset time period is acquired, and the data is fitted based on the second target data to calculate the first target data; Wherein, the duration of the fitting period is less than or equal to the duration of the working period; the first target data is the data calculated from the latest fitting period.

3. The method according to claim 1, characterized in that, The first work data includes a first work duration and a second work duration; The step of calculating the first working data within the second working cycle based on the first target data includes: In the first target data, determine the first data and the second data; Calculate the first difference based on the first data and the second data; Based on the first difference, calculate the first working time within the second working cycle; Calculate the second working time within the second working cycle based on the cycle length of the working cycle and the first working time.

4. The method according to claim 1, characterized in that, The method further includes: During the second time period, the target current data of the second chip is calculated; Based on the target current, determine the first current data of the second chip; When the battery is charged through the second chip, the battery is charged according to the first current data.

5. The method according to claim 4, characterized in that, The calculation of the target current of the second chip includes: Obtain the third target data; From the third target data, determine the third data and the fourth data; Calculate the second difference based on the third and fourth data; The target current of the second chip is calculated based on the second difference.

6. The method according to claim 4, characterized in that, After calculating the target current of the second chip, the method further includes: If it is determined that the target current is less than a first threshold, the target current is updated according to the first threshold. If it is determined that the target current is greater than the second threshold, the target current is updated according to the second threshold.

7. The method according to claim 1, characterized in that, After calculating the first working data within the second working cycle based on the first target data, the method further includes: Record the first work data, and delete the first work data at the end of the second work cycle.

8. The method according to claim 1, characterized in that, The method further includes: If the first work cycle has not ended, determine whether the first chip has finished its work within the first work cycle; If the first chip has not finished working in the first working cycle, turn on the first chip and turn off the second chip, and charge the battery through the first chip; If the first chip finishes its work within the first work cycle, determine whether the second chip has finished its work within the first work cycle. If the second chip has not finished working in the first working cycle, the first chip is turned off and the second chip is turned on, and the battery is charged through the second chip.

9. The method according to claim 8, characterized in that, Determining whether the first chip has finished its work within the first work cycle includes: Obtain the second work data within the first work cycle; Based on the current time and the second working data, determine whether the first chip has finished its work within the first working cycle; Determining whether the second chip has finished its work within the first work cycle includes: Based on the current time and the second working data, determine whether the second chip has finished its work within the first working cycle.

10. The method according to claim 9, characterized in that, The method further includes: If the second chip finishes its work within the first work cycle, the first work cycle is determined to have ended, and the second work data within the first work cycle is deleted.

11. The method according to claim 1, characterized in that, Before determining whether the first work cycle has ended, the following is also included: Obtain the current state of the electronic device; Determining whether the first work cycle has ended includes: If the current state is the target state, determine whether the first work cycle has ended.

12. The method according to claim 1, characterized in that, Before determining whether the first work cycle has ended, the following is also included: Obtain the fourth target data; Determining whether the first work cycle has ended includes: If the fourth target data is determined to be the target data, then determine whether the first working cycle has ended.

13. The method according to claim 1, characterized in that, Before determining whether the first work cycle has ended, the following is also included: Acquire the second current data; Determining whether the first work cycle has ended includes: If the second current data is determined to be less than the third threshold, it is then determined whether the first working cycle has ended.

14. An electronic device, characterized in that, include: One or more processors; Memory; And one or more computer programs, wherein the one or more computer programs are stored on the memory, and when the computer programs are executed by the one or more processors, cause the electronic device to perform a battery charging method as described in any one of claims 1-13.

15. A computer-readable storage medium comprising a computer program, characterized in that, When the computer program is run on an electronic device, it causes the electronic device to perform a battery charging method as described in any one of claims 1-13.

Citation Information

Patent Citations

  • Method and device for controlling charging of terminal device

    CN104578372A

  • Charging module, electronic equipment and charging control method

    CN113241835A

  • Modulation charging circuitry for battery charging

    US20060255767A1