Battery intelligent charging method and device thereof
By acquiring the battery module's power parameters and historical power consumption data, the charging strategy is dynamically adjusted to avoid prolonged periods of full charge, thus solving the problem of accelerated battery aging and improving battery safety and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG DAHUA TECH CO LTD
- Filing Date
- 2026-01-16
- Publication Date
- 2026-06-05
AI Technical Summary
Existing charging technologies maintain a high charge level for extended periods after the battery is fully charged, leading to accelerated battery aging, safety risks, and impacting battery health and lifespan.
By acquiring the battery parameters and historical power consumption data of electronic devices, peak capacity can be determined, and charging strategies can be dynamically adjusted to avoid prolonged periods of full charge. This includes monitoring battery temperature and optimizing the charging process without affecting user battery life.
This effectively avoids the risk of battery bulging and lifespan degradation caused by prolonged full-charge storage, thus improving the long-term safety and reliability of the battery.
Smart Images

Figure CN122159463A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of rechargeable battery technology, and in particular to a smart battery charging method, a charging device, and a computer storage medium. Background Technology
[0002] Current charging technologies primarily ensure safety by monitoring battery voltage and temperature in real time during charging and dynamically adjusting the charging current accordingly. However, these technologies typically aim to fully charge the battery. Once the battery is fully charged, if the device remains connected to the charger for an extended period, the battery will remain in a high-charge state. Prolonged storage at full charge, especially in high-temperature environments, accelerates the aging of internal chemical substances, potentially leading to increased internal pressure and safety risks such as battery bulging, severely impacting battery health and lifespan. Summary of the Invention
[0003] To address the aforementioned technical problems, this application proposes a smart battery charging method and apparatus.
[0004] To address the aforementioned technical problems, this application proposes a smart battery charging method, which includes: Obtain the battery power parameters of the electronic device and historical power consumption data within the first preset period; Based on the historical electricity consumption data, the peak capacity of the battery module is determined; Based on the power parameters and the peak capacity, intelligent charging is performed on the battery assembly.
[0005] The power parameters mentioned above refer to the actual capacity. The step of performing intelligent charging on the battery assembly based on the power parameters and the peak capacity includes: When the actual capacity is less than the peak capacity, intelligent charging is performed on the battery assembly.
[0006] The power parameters mentioned above refer to the actual power consumption. After determining the peak capacity of the battery module based on the historical electricity consumption data, the intelligent battery charging method further includes: The amount of electricity to be charged is determined based on the peak capacity and the parameters of the battery assembly; When the actual battery level is less than the battery level to be charged, intelligent charging is performed on the battery assembly.
[0007] The step of determining the peak capacity of the battery module based on the historical electricity consumption data includes: Based on the historical electricity consumption data, the power consumption of the battery module in each second preset cycle is determined; Determine the power consumption status of the power consumption in a continuous cycle; The peak capacity of the battery module is determined based on the power consumption.
[0008] The step of determining the peak capacity of the battery module based on the power consumption includes: Based on the power consumption, if it is determined that the power consumption of the battery module is less than a first preset threshold in consecutive cycles, and the power consumption in the most recent cycle is greater than a second preset threshold, then the peak capacity of the battery module is set to the maximum value.
[0009] The step of determining the peak capacity of the battery module based on the power consumption includes: Based on the power consumption, determine the number of consecutive periods during which the power consumption of the battery assembly is less than a third preset threshold. The peak capacity of the battery module is determined based on the number of consecutive cycle periods. The number of consecutive cycle days is negatively correlated with the peak capacity.
[0010] The step of determining the peak capacity of the battery module based on the power consumption includes: Based on the power consumption situation, determine the power consumption characteristic value for the third preset period; The peak capacity of the battery assembly is determined based on the power consumption characteristic value. The power consumption characteristic value is positively correlated with the peak capacity.
[0011] The intelligent battery charging method further includes: In response to the battery temperature of the battery assembly being lower than a preset temperature threshold, intelligent charging is performed on the battery assembly based on the power parameters and the peak capacity.
[0012] To address the aforementioned technical problems, this application also proposes a charging device, which includes a memory and a processor coupled to the memory; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the intelligent battery charging method described above.
[0013] To address the aforementioned technical problems, this application also proposes a computer storage medium for storing program data, which, when executed by a computer, is used to implement the aforementioned intelligent battery charging method.
[0014] Compared with the prior art, the beneficial effects of this application are: by acquiring the power parameters of the electronic device and the historical power consumption data of the battery component within a first preset period; determining the peak capacity of the battery component based on the historical power consumption data; and performing intelligent charging on the battery component based on the power parameters and the peak capacity; thereby effectively avoiding the risk of battery bulging and lifespan degradation caused by prolonged full-charge storage, and improving the long-term safety and reliability of the battery without affecting the user's battery life experience. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a flowchart illustrating the first embodiment of the intelligent battery charging method provided in this application; Figure 2 This is a flowchart illustrating the second embodiment of the intelligent battery charging method provided in this application; Figure 3 This is a flowchart illustrating the third embodiment of the intelligent battery charging method provided in this application; Figure 4 This is a flowchart illustrating the fourth embodiment of the intelligent battery charging method provided in this application; Figure 5 This is a flowchart illustrating the fifth embodiment of the intelligent battery charging method provided in this application; Figure 6 This is a schematic diagram of an embodiment of the high and low temperature charging control logic provided in this application; Figure 7 This is a flowchart illustrating an embodiment of the intelligent battery charging strategy provided in this application; Figure 8 This is a schematic diagram of state transitions for an embodiment of the intelligent battery charging strategy provided in this application; Figure 9 This is a schematic diagram of the power management path function provided in this application; Figure 10 This is a flowchart illustrating a specific embodiment of the peak capacity setting logic provided in this application; Figure 11 This is a schematic diagram of the structure of an embodiment of the charging device provided in this application; Figure 12 This is a schematic diagram of the structure of an embodiment of the computer storage medium provided in this application. Detailed Implementation
[0016] 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 a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0017] The terms first, second, third, fourth, etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms include and have, and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0018] This application provides a smart battery charging method that can extend battery life and improve usage safety. It can be applied to various electronic devices equipped with rechargeable batteries to achieve battery health management and extend battery life. The following explanation uses the field of rechargeable batteries as an example: In daily use of electronic devices, different users have different power consumption habits. For example, business users may use their devices frequently to handle work tasks, resulting in higher daily power consumption; while light users may only use their devices during specific periods, resulting in lower daily power consumption. If a uniform charging strategy is adopted for all users, charging the battery to 100% full, light users will have their batteries kept at a high charge level for extended periods, accelerating battery aging.
[0019] Therefore, the intelligent battery charging method provided in this application analyzes the user's historical power consumption data and intelligently adjusts the peak charging capacity, i.e. the upper limit of the target charging capacity, so that the charging strategy can match the user's actual needs. While ensuring sufficient battery life, it avoids overcharging and long-term full-charge storage to the greatest extent, thereby protecting battery health and extending its service life.
[0020] Please refer to the details. Figure 1 , Figure 1 This is a schematic flowchart of the first embodiment of the intelligent battery charging method provided in this application. Figure 1 As shown, the method includes the following steps S101 to S103, combining... Figure 1 The steps shown are explained.
[0021] The intelligent battery charging method of this application is applied to a charging device. The charging device can be a battery management system (BMS) built into an electronic device, a standalone charging management device, or a system in which an electronic device and an external management platform cooperate. Accordingly, the various parts of the charging device, such as units, subunits, modules, and submodules, can all be located in the electronic device, all in the external management platform, or separately in the electronic device and the external management platform.
[0022] Furthermore, the aforementioned external management platform can be either hardware or software. When the external management platform is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the external management platform is software, it can be implemented as multiple software programs or software modules, such as software programs or software modules used to provide distributed services, or as a single software program or software module; no specific limitations are made here.
[0023] like Figure 1 As shown, the specific steps are as follows: Step S101: Obtain the power parameters of the battery components of the electronic device and the historical power consumption data within the first preset period.
[0024] In this application embodiment, electronic devices can refer to devices with data processing capabilities such as servers, laptops, tablets, desktop computers, smart TVs, set-top boxes, and mobile devices (e.g., mobile phones, portable video players, personal digital assistants, dedicated messaging devices, portable gaming devices).
[0025] The battery assembly is used to store electrical energy and power electronic devices; wherein, the battery assembly may include a single battery cell or a battery pack composed of multiple battery cells connected in series and parallel, and this application does not limit it.
[0026] Power parameters include, but are not limited to, actual capacity and actual charge. Actual capacity represents the percentage of the battery module's current remaining usable capacity relative to its fully charged state of capacity; actual charge represents the numerical value of the battery module's current remaining usable capacity, usually expressed in milliampere-hours (mAh) or watt-hours (Wh).
[0027] For example, if the battery's fully charged state capacity is 4000mAh and the current remaining usable capacity is 2000mAh, then the actual capacity is 50%; correspondingly, the actual charge is 2000mAh.
[0028] The first preset period represents a time window used for statistical analysis of users' electricity consumption habits, and can be set to different durations according to different application scenarios. For example, for small-capacity devices such as smartphones, the first preset period can be set to 7 days or 15 days; for large-capacity devices such as laptops, the first preset period can be set to 30 days or longer.
[0029] Historical electricity consumption data includes, but is not limited to: daily charge and discharge records, the starting and ending power parameters of each discharge event, the duration of the device being connected to an external power source, the number of charging cycles, and the distribution of charging time periods.
[0030] The charging device can read historical power consumption data of the battery components within a first preset cycle through the battery management system (BMS) of the electronic device or the application programming interface (API) provided by the operating system. For example, the battery state change events can be listened to through the BatteryManager class interface in the Android system or the IOKit framework in the iOS system to obtain parameters such as charging and discharging capacity, charging and discharging current, charging and discharging time, and battery temperature.
[0031] Historical electricity consumption data can be stored in the local memory of electronic devices or uploaded to a cloud server for storage and analysis; this application does not limit the scope of such data.
[0032] Step S102: Determine the peak capacity of the battery module based on the historical electricity consumption data.
[0033] In this embodiment, peak capacity refers to the target upper limit of the battery capacity set during charging, expressed as a percentage of the battery module's capacity in a fully charged state, and not greater than 100%. By setting a peak capacity below 100%, the battery can be prevented from being fully charged for extended periods, thereby extending its lifespan.
[0034] The process of determining peak capacity for charging devices based on historical electricity consumption data includes: first, extracting user electricity consumption habit characteristics; then, identifying electricity consumption patterns based on electricity consumption habit characteristics; and finally, matching the corresponding peak capacity based on the electricity consumption patterns.
[0035] User power consumption habits can include parameters from multiple dimensions such as daily power consumption, charging frequency, depth of discharge, and usage time distribution. By comprehensively analyzing these parameters, charging devices can accurately identify users' power consumption patterns, such as high-endurance-demand modes, medium-endurance-demand modes, low-endurance-demand modes, and long-term idle modes.
[0036] The peak capacity setting follows the principle of ensuring battery life and extending battery life, that is, while meeting the user's daily battery life needs, the charging limit should be reduced as much as possible to minimize the time the battery stays in a high-capacity state.
[0037] Step S103: Perform intelligent charging on the battery module based on the power parameters and the peak capacity.
[0038] In this embodiment of the application, intelligent charging refers to a charging control method in which the charging device dynamically adjusts the charging and discharging strategy according to the peak capacity and the current power parameters to achieve battery health management.
[0039] The process of intelligent charging by the charging device includes: first, determining the charging termination threshold and recharging threshold based on the peak capacity; and then, based on the relationship between the current power parameters and these two thresholds, executing the corresponding charging and discharging control operations.
[0040] It should be noted that in the embodiments of this application, when the power parameter is expressed in terms of actual capacity, the charging termination threshold is the peak capacity itself, and the recharging threshold is the product of the peak capacity and a preset coefficient. The preset coefficient is usually a positive number less than 1, such as 0.9 or 0.95.
[0041] For example, if the peak capacity is set to 80% and the preset coefficient is 0.9, then the charging termination threshold is 80% and the recharge threshold is 72%, meaning that charging should stop when the battery is charged to 80%.
[0042] It should be noted that, in this embodiment of the application, the purpose of setting the recharge threshold is to prevent the battery from frequently starting and stopping charging after charging is terminated, so as to avoid excessively frequent charging cycles.
[0043] In other embodiments, when the power parameter is expressed as actual power, the charging device needs to first calculate the power to be charged based on the peak capacity, and then compare the actual power with the power to be charged to determine whether to perform smart charging.
[0044] Battery component parameters include, but are not limited to, the battery's Full Charge Capacity (FCC). The formula for calculating the amount of charge to be recharged is:
[0045] For example, assuming the battery assembly has a fully charged state capacity of 4000mAh and a peak capacity of 80%, the amount of charge to be charged is: 4000mAh multiplied by 80% equals 3200mAh.
[0046] If the current actual battery capacity is 2400mAh, since 2400mAh < 3200mAh, the charging device performs intelligent charging on the battery component, increasing the actual battery capacity from 2400mAh to 3200mAh, and then stops charging.
[0047] It should be noted that in other embodiments, when the power parameter is expressed as the actual power, the charging termination threshold is the power to be charged itself, and the recharging threshold is the product of the power to be charged and a preset coefficient, which is usually a positive number less than 1.
[0048] In this embodiment, by supporting two power parameter representation methods, namely actual capacity and actual power, and adopting corresponding charging trigger conditions, the applicability and flexibility of the method are enhanced, and it can be adapted to the implementation methods of different battery management systems.
[0049] Figure 2 This is a flowchart illustrating the second embodiment of the intelligent battery charging method provided in this application. Based on Figure 1 , Figure 1 Step S102 can be further refined into steps S201 to S203, which will combine Figure 2 The steps shown are explained.
[0050] Step S201: Based on historical power consumption data, determine the power consumption of the battery module in each second preset cycle.
[0051] In this embodiment, the second preset period represents the time unit used for statistical analysis of power consumption, and can be set to one day, half a day, one week, etc. In a preferred embodiment, the second preset period is set to one day to facilitate the analysis of users' daily electricity consumption habits.
[0052] Power consumption is defined as the cumulative sum of the reduction in power parameters during all discharge events within a preset cycle when the electronic device is not connected to an external power source.
[0053] A discharge event refers to the process by which a battery module outputs electrical energy to an electronic device load. Each discharge event includes the discharge start time, discharge end time, discharge start charge parameters, and discharge end charge parameters.
[0054] For example, suppose that on a certain day, a user experienced three discharge events while using an electronic device: First discharge: Discharge from 90% to 50%, consuming 40% of the power. Second discharge: Discharge from 80% to 40%, consuming 40% of the power; The third discharge: from 50% to 20%, consuming 30% of the power.
[0055] The power consumption for that day would then be the sum of the three discharge events: 110%.
[0056] If no discharge event (e.g., device shutdown, not in use, or just started in use) is detected within a certain second preset cycle, the charging device assigns the power consumption of that cycle to a preset default value, such as 100%, to ensure that the cycle does not mislead subsequent power consumption pattern identification.
[0057] To ensure the accuracy of historical electricity consumption data, the charging device also needs to handle abnormal situations caused by time changes. If the system time is detected to have been adjusted to a past point in time, the charging device will delete all charging and discharging data recorded at times later than the current new time point to eliminate interference from invalid data.
[0058] Step S202: Determine the power consumption in a continuous cycle.
[0059] In this embodiment of the application, a continuous period refers to a series of consecutive second preset periods traced backward from the current moment. For example, if the second preset period is one day, the continuous period can be 7 consecutive days, 15 consecutive days, 30 consecutive days, etc.
[0060] Power consumption refers to the trend and distribution characteristics of power consumption over multiple consecutive second preset cycles, which is used to reflect the stability and activity of users' power consumption habits.
[0061] The dimensions for analyzing power consumption include, but are not limited to: the number of consecutive low power consumption periods, the power consumption of the most recent period, the median power consumption, the average power consumption, and the maximum power consumption.
[0062] A continuous low-power consumption cycle refers to the number of consecutive preset periods during which power consumption is below a certain threshold. For example, if a user's daily power consumption is below 10% for 7 consecutive days, then the continuous low-power consumption cycle is 7 days.
[0063] By analyzing the number of consecutive low-power cycles, charging devices can identify whether a device has been idle for an extended period; by analyzing the power consumption of the most recent cycle, they can identify whether a device has returned from an idle state to an active usage state; and by analyzing the median or average power consumption, they can assess a user's daily battery life needs.
[0064] Step S203: Determine the peak capacity of the battery module based on the power consumption.
[0065] In this embodiment of the application, the process of determining the peak capacity of the charging device based on the power consumption includes: matching the power consumption with multiple preset power consumption mode judgment rules, identifying the current power consumption mode of the user, and then mapping the corresponding peak capacity according to the power consumption mode.
[0066] Power usage modes include, but are not limited to: long-term idle mode, short-term idle mode, recovery active mode, high battery life demand mode, medium battery life demand mode, low battery life demand mode, and default mode.
[0067] The determination of power consumption mode can follow the following priority order, which is not limited in this application. For example, it can first determine whether the device is in a long-term or short-term idle state, then determine whether it has recovered from an idle state, then classify the battery life requirement level according to the daily power consumption level, and finally determine that the device does not meet all of the above modes and enters the default mode.
[0068] For example, the peak capacity setting principles for different power consumption modes are as follows: (1) Long-term idle mode: Since the equipment is not used for a long time, in order to avoid the battery components aging due to long-term high power storage, a lower peak capacity is set.
[0069] (2) Restore active mode: The device resumes use from idle state. Users may have higher battery life requirements. Set the peak capacity to 100%.
[0070] (3) High battery life demand mode: Users consume a lot of electricity in daily life, so a higher peak capacity is set to meet the battery life demand.
[0071] (4) Medium / low battery life demand mode: When the user's daily power consumption is moderate or low, the peak capacity is set in a middle range to extend the battery life while ensuring the battery life.
[0072] In this embodiment, the charging device extracts the power consumption of each cycle based on historical power consumption data, analyzes the power consumption in continuous cycles, and determines the peak capacity based on the power consumption, thus achieving accurate identification of user power consumption habits and intelligent setting of peak capacity. Compared with existing technologies that rely solely on simple parameter settings, this application, through multi-dimensional data analysis, can better match the actual needs of users and improve the rationality and effectiveness of the charging strategy.
[0073] Figure 3 This is a flowchart illustrating the third embodiment of the intelligent battery charging method provided in this application. Based on Figure 2 , Figure 2 Step S203 can be further refined into steps S301 to S303, which will combine Figure 3 The steps shown are explained.
[0074] Step S301: Based on the power consumption, determine whether the power consumption of the battery module in a continuous cycle is less than the first preset threshold.
[0075] In this embodiment, the first preset threshold is used to determine whether the device is in a low-power state, and can be set to different values according to different application scenarios. For example, the first preset threshold can be set to 10%, 15%, or 20%.
[0076] The charging device determines whether the power consumption is always less than the first preset threshold by checking whether the power consumption in each of several consecutive second preset cycles is less than the first preset threshold. If the power consumption in all cycles is less than the first preset threshold, the device is considered to be in a continuous low power consumption state.
[0077] Step S302: If the power consumption of consecutive cycles is less than the first preset threshold, further determine whether the power consumption of the most recent cycle is greater than the second preset threshold.
[0078] In this embodiment of the application, the most recent period refers to the second preset period that is closest to the current time.
[0079] The second preset threshold is used to determine whether the device has returned from a low power consumption state to a high power consumption state, and its value is usually greater than the first preset threshold. For example, the second preset threshold can be set to 50%, 60%, or 70%.
[0080] If the power consumption in consecutive cycles is less than the first preset threshold, but the power consumption in the most recent cycle is greater than the second preset threshold, it indicates that the device has suddenly resumed high-intensity use from a long-term idle state, and the user may have a high demand for battery life.
[0081] Step S303: If the power consumption in the most recent cycle is greater than the second preset threshold, set the peak capacity of the battery module to the maximum value.
[0082] In the embodiments of this application, the maximum value usually refers to the upper limit of the peak capacity, which is generally set to 100%, indicating that the battery assembly is fully charged. This application does not limit this value.
[0083] The purpose of setting the peak capacity of the charging device to the maximum value is to meet the high battery life demand that users may have after resuming use from an idle state, and to avoid insufficient battery life due to peak capacity limitation, which would affect the user experience.
[0084] For example, suppose a user consumes less than 10% of their power each day for 30 consecutive days (a first preset threshold), but on the 31st day, the power consumption suddenly reaches 80% (greater than a second preset threshold of 50%). At this time, the charging device determines that the user has returned from a long-term idle state to a high-intensity usage state, and adjusts the peak capacity from the previously set 60% or 80% to 100% to ensure sufficient battery life.
[0085] In this embodiment, the charging device can accurately identify the scenario where the device recovers from an idle state to an active usage state by judging whether the power consumption of consecutive cycles is less than a first preset threshold and whether the power consumption of the most recent cycle is greater than a second preset threshold, and promptly adjust the peak capacity to the maximum value to ensure the user's battery life needs, reflecting the flexibility and intelligence of the charging strategy.
[0086] Figure 4 This is a flowchart illustrating the fourth embodiment of the intelligent battery charging method provided in this application. Based on Figure 2 , Figure 2 Step S203 can be further refined into steps S401 to S402, which will combine Figure 4 The steps shown are explained.
[0087] Step S401: Based on the power consumption, determine the number of consecutive periods during which the power consumption of the battery module is less than the third preset threshold.
[0088] In this embodiment, the third preset threshold is used to determine whether the device is in a low-power state, and can be set to different values according to different application scenarios. For example, the third preset threshold can be set to 10%, 15%, or 20%. In a preferred embodiment, the third preset threshold can be the same as or different from the aforementioned first and second preset thresholds, and this application does not limit this.
[0089] The number of consecutive cycle periods refers to the number of consecutive second preset cycles from the current moment backward, where the power consumption is less than the third preset threshold.
[0090] For example, suppose the second preset period is one day and the third preset threshold is 10%. If the user's daily power consumption in the past 7 days is 8%, 9%, 7%, 8%, 9%, 7%, and 8%, respectively, all less than 10%, then the continuous period is 7 days.
[0091] The number of consecutive cycles reflects the duration of time that the equipment is in a low-power consumption state, and is an important indicator for judging whether the equipment has been idle for a long time.
[0092] Step S402: Determine the peak capacity of the battery module based on the number of consecutive cycle periods; wherein, the number of consecutive cycle periods and the peak capacity have a negative correlation.
[0093] In this embodiment of the application, a negative correlation means that the larger the number of consecutive periods, the smaller the set peak capacity; and the smaller the number of consecutive periods, the larger the set peak capacity.
[0094] The design principle behind this negative correlation is: if a device is in a low-power state for a long time, it indicates that the user's battery life needs are low, so a lower peak capacity can be set to avoid the battery pack storing high power for a long time. Conversely, if the device's low-power state lasts for a short time, it indicates that the user may have certain battery life needs, so a higher peak capacity should be set.
[0095] For example, the mapping relationship between the number of consecutive periods and the peak capacity can be achieved using a piecewise function:
[0096] In addition to the discrete mapping method using piecewise functions mentioned above, continuous functions (such as linearly decreasing functions, exponential decay functions, etc.) or look-up tables can also be used to establish the mapping relationship between the number of consecutive periods and the peak capacity, so as to achieve smoother or more precise dynamic adjustments. The specific function form, parameters, or look-up table content can be flexibly set according to the actual application scenario, battery component characteristics, and other factors, and this application does not limit them.
[0097] In this embodiment, the charging device determines the peak capacity by counting the number of consecutive periods during which power consumption is less than a third preset threshold, and based on the negative correlation between the number of consecutive periods and the peak capacity. This achieves refined management of long-term idle equipment. The longer the number of consecutive periods, the longer the equipment has been idle. The charging device automatically reduces the peak capacity, effectively avoiding aging and safety risks caused by long-term full-charge storage of the battery, and extending the battery's lifespan.
[0098] Figure 5 This is a flowchart illustrating the fifth embodiment of the intelligent battery charging method provided in this application. Based on Figure 2 , Figure 2 Step S203 can be further refined into steps S501 to S502, which will combine Figure 5 The steps shown are explained.
[0099] Step S501: Determine the power consumption characteristic value for the third preset cycle period based on the power consumption situation.
[0100] In this embodiment, the third preset period represents the time window used to calculate the power consumption characteristic value, and can be set to different values according to different application scenarios. For example, the third preset period can be set to the most recent 7 days, the most recent 2 days, or the most recent 3 days, etc.
[0101] Power consumption characteristic values are feature parameters obtained by statistically analyzing the power consumption of each period within a third preset period of the charging device, used to reflect the user's daily electricity consumption level. Power consumption characteristic values may include, but are not limited to: median power consumption, average power consumption, weighted average power consumption, etc.
[0102] Using the median as the power consumption characteristic value has better anti-interference ability than the average value, and can effectively eliminate the influence of abnormally high or low power consumption days, thus more accurately reflecting the user's normal power consumption habits.
[0103] If there is no valid power consumption data for a certain period within the third preset period (e.g., when the device is first used), the charging device can choose to exclude these periods from the statistics or use the default value (e.g., 100%) to supplement them.
[0104] Step S502: Determine the peak capacity of the battery module based on the power consumption characteristic value; wherein the power consumption characteristic value and the peak capacity are positively correlated.
[0105] In this embodiment of the application, a positive correlation means that the larger the power consumption characteristic value, the higher the set peak capacity; and the smaller the power consumption characteristic value, the lower the set peak capacity.
[0106] The design principle behind this positive correlation is as follows: the larger the power consumption characteristic value, the higher the user's daily power demand, and a higher peak capacity should be set to ensure battery life; the smaller the power consumption characteristic value, the lower the user's daily power demand, and a lower peak capacity can be set to extend battery life while meeting battery life requirements.
[0107] The mapping relationship between power consumption characteristics and peak capacity includes a piecewise function. For example:
[0108] The threshold and corresponding peak capacity of the above piecewise function can be dynamically adjusted according to the actual application scenario, battery characteristics and user feedback, and this application does not limit this.
[0109] In addition to the discrete mapping method using piecewise functions mentioned above, continuous functions (such as linearly decreasing functions, exponential decay functions, etc.) or look-up tables can also be used to establish the mapping relationship between power consumption characteristics and peak capacity within the third preset period, in order to achieve smoother or more precise dynamic adjustments. The specific function form, parameters, or look-up table content can be flexibly set according to actual application scenarios, battery characteristics, and other factors, and this application does not impose any limitations on this.
[0110] In this embodiment, the charging device calculates the power consumption characteristic value within a third preset period and determines the peak capacity based on the positive correlation between the power consumption characteristic value and the peak capacity, thus achieving intelligent charging control based on the user's daily power consumption level. Compared with a fixed peak capacity scheme, this application can dynamically match the user's battery life needs, maximizing battery life while ensuring user experience.
[0111] Figure 6 This is a schematic diagram of an embodiment of the high and low temperature charging control logic provided in this application. Based on Figures 1 to 5 Any embodiment will be combined with Figure 6 The schematic diagram of the illustrated embodiment will be used for explanation.
[0112] In this embodiment, battery temperature is a crucial factor affecting battery charging safety and efficiency. Both excessively high and low temperatures can damage the battery; therefore, the charging device needs to monitor the battery temperature in real time during charging and adjust the charging strategy accordingly.
[0113] The preset temperature thresholds include a low-temperature threshold and a high-temperature threshold, which are used to define the safe operating temperature range of the battery. For example, the low-temperature threshold can be set to 15°C and the high-temperature threshold can be set to 45°C.
[0114] When the battery temperature falls below a low-temperature threshold, battery charging efficiency decreases and battery performance may be damaged. Therefore, under low-temperature conditions, the charging device should reduce the charging current, suspend charging, or even shut down, resuming normal charging or powering on once the temperature rises. For example, in low-temperature scenarios, as the temperature gradually decreases from a suitable range to 15°C, the charging current will be limited (e.g., reduced to 650mA); when the temperature further drops to 0°C, the charging device will stop charging. To prevent irreversible damage to the battery from extreme low temperatures, the charging device will shut down when the temperature drops below -20°C.
[0115] When the battery temperature exceeds the high-temperature threshold, the rate of chemical reactions inside the battery accelerates, potentially leading to overheating and increased safety risks. Therefore, under high-temperature conditions, the charging device should limit the charging current, suspend charging, or even shut down, resuming normal charging or powering on only after the temperature decreases. For example, as the temperature gradually rises and exceeds 45°C, the charging device will limit the charging current (e.g., reduce it to 1000mA); when the temperature continues to rise to 50°C, the charging device will stop charging regardless of the smart charging stage. To ensure device safety in extreme conditions, the charging device will shut down when the temperature reaches 60°C.
[0116] In this embodiment, in response to the battery temperature being outside a preset temperature threshold, the charging device first performs temperature protection control, suspending or limiting the charging operation. Once the battery temperature returns to a safe range, the charging device then performs intelligent charging based on the peak capacity, according to the battery parameters and peak capacity. The change in charging current with temperature fluctuations can be linear or non-linear, and this application does not impose specific limitations on this.
[0117] To prevent frequent switching of charging states caused by temperature fluctuations around a preset temperature threshold, the charging device can be set with a temperature hysteresis value. For example, charging is paused when the battery temperature exceeds the high temperature threshold of 50°C, but charging is only resumed when the temperature drops below 47°C (a hysteresis value of 3°C).
[0118] In this embodiment, temperature protection control has a higher priority than peak capacity-based intelligent charging control. That is, regardless of the peak capacity setting, as long as the temperature exceeds the safe range, the charging device will prioritize temperature protection to ensure battery safety.
[0119] In this embodiment, the charging device monitors the battery temperature in real time and only performs intelligent charging based on peak capacity when the temperature meets safe conditions, thus achieving an organic combination of temperature protection and peak capacity management. This extends battery life, ensures the safety of the charging process, and improves the reliability and practicality of the intelligent battery charging method.
[0120] Figure 7 This is a flowchart illustrating an embodiment of the intelligent battery charging strategy provided in this application. Figure 8 This is a schematic diagram of state transitions for an embodiment of the intelligent battery charging strategy provided in this application. Figure 9 This is a schematic diagram of the power management path function provided in this application.
[0121] Specifically, such as Figure 7 , Figure 8 As shown in the embodiments of this application, the charging and discharging control logic mainly includes three states: rapid discharge state, battery self-discharge state, and normal charging state.
[0122] In this embodiment, the charging device automatically switches between three states based on the comparison between the current power parameters and the charging termination threshold and the recharging threshold.
[0123] Specifically, in this embodiment of the application, when the charging device detects that the power parameter of the battery component is higher than the charging termination threshold, it will enter a rapid discharge state.
[0124] Entering rapid discharge mode typically occurs after a change in a user's power consumption habits, causing the system to lower its peak capacity from a higher value to a lower value. In this state, the charging device actively controls the battery pack to discharge to the system load of the electronic device, thus allowing the battery level to decrease smoothly. This discharge process is controlled and gradual, designed to return the battery level to a healthy level matching the new peak capacity as quickly as possible without affecting the user's normal experience. When the battery level drops to the charging termination threshold, the charging device exits rapid discharge mode and switches to battery self-discharge mode. For example, if the battery is currently at 90% charge, and the system updates the peak capacity to 80% based on the user's recent light usage habits, the charge level is higher than the peak capacity, so the charging device initiates active discharge until the charge level drops to 80%, after which it switches to the new state.
[0125] In this embodiment, when the power parameter equals the charging termination threshold, the charging device enters a battery self-discharge state. If the electronic device is connected to an external power source, such as a charger, at this time, a power supply bypass mechanism will be activated. Figure 9 As shown, the power management path can directly supply the current from the charger to the system load and the battery module respectively. Therefore, the power management path can directly supply the current from the charger to the system load, thereby bypassing the battery module and allowing the external power supply to meet the device's operating power consumption while suspending all charging activities of the battery module.
[0126] When a battery module is in a self-discharge state, it neither charges nor actively discharges; its charge is only lost naturally and very slowly due to its inherent chemical properties—this is self-discharge. The core design of the power supply bypass is to effectively prevent the battery from remaining in a high-voltage, fully charged or near-fully charged state after reaching its charging target. This is crucial for slowing battery aging and extending its cycle life. Over time, when the battery charge slowly decreases to the recharge threshold due to self-discharge, the system determines that the battery has moved beyond a high-charge state and reached a suitable range, requiring recharging. Therefore, it automatically transitions from the self-discharge state to the normal charging state.
[0127] In this embodiment, when the power parameter is lower than or equal to the recharge threshold, the charging device enters the normal charging state. At this time, the current from the external power supply will simultaneously supply the system load and charge the battery components, causing the power parameter to steadily recover until it reaches the charging termination threshold again. Once this threshold is reached, the charging process stops, and the charging device switches from the normal charging state back to the battery self-discharge state.
[0128] In this embodiment, by cycling and switching between these three states, the application can maintain the battery charge in a healthy, non-fully charged range between the recharge threshold and the charging termination threshold for a long time, avoiding the battery from being fully charged for a long time and effectively extending the battery life.
[0129] It should be noted that, in this embodiment of the application, in order to provide a good user experience and avoid confusion for users due to peak capacity settings, the charging device maps the actual power parameters to the power displayed on the system interface.
[0130] In this embodiment of the application, when the power parameter is the actual capacity, the calculation formula for power mapping is:
[0131] In other embodiments, when the power parameter is the actual power level, the power mapping calculation formula is:
[0132] For example, if the peak capacity equals the actual capacity or the amount of charge to be made equals the actual amount of charge, the interface displays the battery level as 100%. In this way, when the battery is charged to its peak capacity, the user will see the battery level displayed as 100% on the system interface, consistent with the traditional charging experience.
[0133] When the peak capacity changes, the displayed battery level may fluctuate due to the altered mapping relationship. To reduce user confusion, the charging device can explain the reason for the battery level change to the user through system notifications or on-screen prompts when the peak capacity changes.
[0134] In this embodiment, the power mapping process can be implemented by the system's battery management service (such as the healthd service of the Android system) or by the power display module of the application layer. This application does not limit the implementation of this process.
[0135] Figure 10 A flowchart illustrating a specific embodiment of the peak capacity setting logic provided in this application.
[0136] like Figure 10 As shown, the specific steps are as follows: In the embodiments of this application, the charging device follows a priority logic judgment when determining the peak capacity. First, the charging device determines whether there is a control command from an external management device (such as an enterprise device management platform or data acquisition station). If it receives a command from an external management device containing a specified peak capacity, the charging device will directly use the specified value as the peak capacity and will not execute subsequent analysis processes based on user habits. This design enables enterprises or institutions to perform unified battery health management of devices, meeting centralized management needs.
[0137] In the embodiments of this application, if no instruction is received from an external management device, the charging device will then check whether the user has issued a single full charge instruction through interface interaction (e.g., settings options or shortcut buttons). If the user triggers this instruction, the charging device will temporarily set the peak capacity to 100% to perform a complete charging process. After the charging task is completed, the charging device will clear the single full charge instruction marker, and subsequent charging cycles will revert to setting the peak capacity based on user habit analysis results. This approach provides users with high flexibility, ensuring that in scenarios with special battery life requirements, users can temporarily obtain maximum battery life without affecting the daily smart charging strategy.
[0138] In the embodiments of this application, without external or user-initiated commands, the charging device analyzes the device's usage status, first determining whether the device has been in a long-term unused state. The charging device counts the number of consecutive days with power consumption below 10%. Based on the length of these consecutive days, the peak capacity is set in stages. For example, if the consecutive days exceed 30, the peak capacity is set to 60%, and the long-term unused flag is set to true. If the consecutive days exceed 15, the peak capacity is set to 80%, and the long-term unused flag is set to true. If the consecutive days exceed 7, the peak capacity is set to 90%, and the long-term unused flag is also set to true. Reducing the peak capacity for devices that have been unused for a long time effectively avoids battery aging and potential safety risks caused by prolonged high-charge storage.
[0139] If the conditions for long-term inactivity mentioned above are not met, the charging device will set the long-term inactivity flag to false and further determine the short-term inactivity situation. Specifically, when the number of consecutive days with low power consumption exceeds 3 days, the peak capacity will be set to 95%.
[0140] In addition, the charging device will also identify scenarios where the device is resuming active use from an idle state. Specifically, it will determine whether the power consumption in the most recent day is greater than 50%, and whether the daily power consumption in the preceding continuous period (3 days) is less than 10%. If this condition is met, it indicates that the device is resuming high-intensity use from a long-term inactivity state, and the user may need higher battery life. In this case, the charging device will set the peak capacity to the maximum value of 100%.
[0141] If none of the above special conditions are met, and the user has enabled the intelligent peak capacity function, the charging device will determine the battery life requirement based on the user's daily power consumption. The charging device will calculate the median daily power consumption over a preset period (the last 7 days). Based on this median value, the user's battery life requirement will be categorized. Specifically, if the median value is not less than 80%, the user is considered a high-battery-life-requirement user, and the peak capacity is set to 100%. If the median value is between 60% and 80%, the user is considered a medium-battery-life-requirement user, and the peak capacity is set to 90%. If the median value is less than 60%, the user is considered a low-battery-life-requirement user, and the peak capacity is set to 80%.
[0142] By default, when the user has not enabled the smart peak capacity function, or when the previous logic judgment has not matched any specific conditions, the charging device will set the peak capacity to 100% to provide a traditional charging experience.
[0143] Through the above series of priority logic judgments, the charging device can comprehensively consider external management needs, temporary user needs, equipment usage status, and user daily habits, and intelligently determine the most suitable peak capacity, thus achieving a good balance between flexibility and intelligence.
[0144] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0145] To implement the above-mentioned intelligent battery charging method, this application also proposes a charging device, which can be found in the following details. Figure 11 , Figure 11 This is a schematic diagram of an embodiment of the charging device provided in this application.
[0146] The charging device 400 in this embodiment includes a processor 41, a memory 42, an input / output device 43, and a bus 44.
[0147] The processor 41, memory 42, and input / output device 43 are respectively connected to the bus 44. The memory 42 stores program data, and the processor 41 is used to execute the program data to implement the intelligent battery charging method described in the above embodiments.
[0148] In this embodiment, processor 41 can also be referred to as a CPU (Central Processing Unit). Processor 41 may be an integrated circuit chip with signal processing capabilities. Processor 41 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or processor 41 can be any conventional processor.
[0149] This application also provides a computer storage medium; please refer to the following: Figure 12 , Figure 12 This is a schematic diagram of a computer storage medium according to an embodiment of the present application. The computer storage medium 600 stores a computer program 61, which, when executed by a processor, is used to implement the battery intelligent charging method of the above embodiment.
[0150] When the embodiments of this application are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0151] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A smart battery charging method, characterized in that, The intelligent battery charging method includes: Obtain the battery power parameters of the electronic device and historical power consumption data within the first preset period; Based on the historical electricity consumption data, the peak capacity of the battery module is determined; Based on the power parameters and the peak capacity, intelligent charging is performed on the battery assembly.
2. The intelligent battery charging method according to claim 1, characterized in that, The power parameters are the actual capacity; The step of performing intelligent charging on the battery assembly based on the power parameters and the peak capacity includes: When the actual capacity is less than the peak capacity, intelligent charging is performed on the battery assembly.
3. The intelligent battery charging method according to claim 1, characterized in that, The power parameters are the actual power levels; After determining the peak capacity of the battery module based on the historical electricity consumption data, the intelligent battery charging method further includes: The amount of electricity to be charged is determined based on the peak capacity and the parameters of the battery assembly; When the actual battery level is less than the battery level to be charged, intelligent charging is performed on the battery assembly.
4. The intelligent battery charging method according to claim 1, characterized in that, Determining the peak capacity of the battery module based on the historical electricity consumption data includes: Based on the historical electricity consumption data, the power consumption of the battery module in each second preset cycle is determined; Determine the power consumption status of the power consumption in a continuous cycle; The peak capacity of the battery module is determined based on the power consumption.
5. The intelligent battery charging method according to claim 4, characterized in that, Determining the peak capacity of the battery module based on the power consumption includes: Based on the power consumption, if it is determined that the power consumption of the battery module is less than a first preset threshold in consecutive cycles, and the power consumption in the most recent cycle is greater than a second preset threshold, then the peak capacity of the battery module is set to the maximum value.
6. The intelligent battery charging method according to claim 4, characterized in that, Determining the peak capacity of the battery module based on the power consumption includes: Based on the power consumption, determine the number of consecutive periods during which the power consumption of the battery assembly is less than a third preset threshold. The peak capacity of the battery module is determined based on the number of consecutive cycle periods. The number of consecutive cycle days is negatively correlated with the peak capacity.
7. The intelligent battery charging method according to claim 4, characterized in that, Determining the peak capacity of the battery module based on the power consumption includes: Based on the power consumption situation, determine the power consumption characteristic value for the third preset period; The peak capacity of the battery assembly is determined based on the power consumption characteristic value. The power consumption characteristic value is positively correlated with the peak capacity.
8. The intelligent battery charging method according to claim 1, characterized in that, The intelligent battery charging method further includes: In response to the battery temperature of the battery assembly being lower than a preset temperature threshold, intelligent charging is performed on the battery assembly based on the power parameters and the peak capacity.
9. A charging device, characterized in that, The charging device includes a memory and a processor coupled to the memory; The memory is used to store program instructions, and the processor is used to execute the program instructions to implement the battery intelligent charging method as described in any one of claims 1 to 8.
10. A computer storage medium, characterized in that, The computer storage medium is used to store program data, which, when executed by the computer, is used to implement the battery intelligent charging method as described in any one of claims 1 to 8.