Electric quantity display method and device, electronic equipment and computer readable storage medium

By obtaining the battery target current and the change speed of the battery capacity and adjusting the displayed capacity, the problem of abnormal battery capacity display is solved and the user experience is improved.

CN120490805APending Publication Date: 2025-08-15GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510560261.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In existing electronic devices, there is an abnormality in the battery residual battery display, resulting in a decrease in user experience. Especially when the battery material changes and the ambient temperature changes, the battery meter calculation is inaccurate, resulting in abnormal battery display.

Method used

By obtaining the target current of the battery, determine the speed of the change of the display power, and adjust the display power according to the current display power and the change speed, avoiding abnormal data of the battery meter, and using the battery current to predict the change of the power to adjust the display power.

Benefits of technology

When the remaining battery power is abnormal, avoid abnormal battery power, ensure that the display power changes according to normal levels, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120490805A_ABST
    Figure CN120490805A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of batteries, and discloses an electric quantity display method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: obtaining a target current corresponding to a battery if the remaining electric quantity reported by the battery meets an electric quantity abnormal condition; according to the target current corresponding to the battery, the electric quantity change speed of the displayed electric quantity is determined; and determining a second display electric quantity according to the current first display electric quantity and the electric quantity change speed, and displaying the second display electric quantity. By implementing the embodiment of the invention, the abnormal display electric quantity can be corrected according to the current of the battery, so that the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of battery technology, and specifically to a method and device for displaying power, an electronic device, and a computer-readable storage medium. Background Art

[0002] Current electronic devices can display the remaining power on a display screen based on the remaining power fed back by a built-in battery for user reference.

[0003] However, in practice, it has been found that the remaining power displayed by electronic devices today is abnormal, which reduces the user experience. Summary of the Invention

[0004] The embodiments of the present application disclose a method and device for displaying power, an electronic device, and a computer-readable storage medium, which can correct abnormal displayed power according to the current of the battery, thereby improving the user experience.

[0005] In a first aspect, an embodiment of the present application discloses a method for displaying power, the method comprising:

[0006] If the remaining power reported by the battery meets the power abnormality condition, obtain the target current corresponding to the battery;

[0007] Determining a rate of change of the displayed electrical quantity according to the target current;

[0008] The second displayed power level is determined according to the current first displayed power level and the power level change speed, and the second displayed power level is displayed.

[0009] A second aspect of an embodiment of the present application discloses a power display device, comprising:

[0010] A first acquiring unit is configured to acquire a target current corresponding to the battery when the remaining power reported by the battery meets a power abnormality condition;

[0011] a first determining unit, configured to determine a rate of change of the displayed power according to the target current;

[0012] The second determining unit is configured to determine a second displayed power level according to the current first displayed power level and the power level change speed, and to display the second displayed power level.

[0013] The third aspect of an embodiment of the present application discloses an electronic device, comprising: a memory storing executable program code; a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute the power display method disclosed in the first aspect of the embodiment of the present application.

[0014] A fourth aspect of an embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the power display method disclosed in the first aspect of the embodiment of the present application.

[0015] The fifth aspect of the embodiments of the present application discloses a computer program product. When the computer program product is run on a computer, the computer is caused to execute part or all of the steps of any one of the methods of the first aspect of the embodiments of the present application.

[0016] The sixth aspect of the embodiments of the present application discloses an application publishing platform, which is used to publish a computer program product. When the computer program product runs on a computer, the computer executes part or all of the steps of any one of the methods of the first aspect of the embodiments of the present application.

[0017] Compared with the related art, the embodiments of the present application have the following beneficial effects:

[0018] In the embodiment of the present application, when the remaining power reported by the battery meets the power abnormality condition, the target current corresponding to the battery can be obtained; and the power change speed of the displayed power can be determined based on the target current of the battery; and then the second displayed power can be determined for display based on the current first displayed power and the power change speed. It can be seen that in the embodiment of the present application, when it is determined that the remaining power reported by the battery is abnormal, the displayed power can no longer be determined based on the remaining current reported by the battery, thereby avoiding abnormal display power; in addition, the power change speed of the displayed power can be predicted based on the battery power, and then the displayed power can be adjusted according to the power change speed of the displayed power, so that when the remaining power reported by the battery is abnormal, the displayed power changes according to a normal level, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0020] Figure 1 This is a schematic structural diagram of a battery pack disclosed in an embodiment of the present application;

[0021] Figure 2 This is a schematic diagram of an abnormal remaining power report of a power meter disclosed in an embodiment of the present application;

[0022] Figure 3 This is a flow chart of a method for displaying power quantity disclosed in an embodiment of the present application;

[0023] Figure 4 This is a flow chart of another method for displaying power in accordance with an embodiment of the present application;

[0024] Figure 5 This is a flow chart of another method for displaying power in accordance with an embodiment of the present application;

[0025] Figure 6 This is a flow chart of a method for displaying power in a charging state disclosed in an embodiment of the present application;

[0026] Figure 7 This is a flow chart of a method for displaying power in a discharge state disclosed in an embodiment of the present application;

[0027] Figure 8 This is a schematic structural diagram of a power display device disclosed in an embodiment of the present application;

[0028] Figure 9 This is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0030] It should be noted that the terms "first," "second," "third," and "fourth" in the specification and claims of this application are used to distinguish different objects rather than to describe a specific order. The terms "including" and "having," as well as any variations thereof, in the embodiments of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or are inherent to these processes, methods, products, or apparatuses.

[0031] The embodiments of the present application disclose a method and device for displaying power, an electronic device, and a computer-readable storage medium, which can correct abnormal displayed power according to the current of the battery, thereby improving the user experience.

[0032] The technical solution of this application will be described in detail below with reference to specific embodiments.

[0033] In order to more clearly introduce the method disclosed in the embodiment of the present application, the battery in the related art is first introduced.

[0034] A mobile terminal is usually provided with an integrated circuit of a fuel gauge for managing the power of the mobile terminal. Optionally, the battery pack architecture with an integrated fuel gauge can be as follows: Figure 1 As shown, Figure 1 This is a schematic structural diagram of a battery pack disclosed in an embodiment of the present application.

[0035] Optionally, the battery pack may include: battery cells 110, a fuel meter 120, a primary protection integrated circuit 130, a secondary protection integrated circuit 140, a fuse 150, a charging switch 160, a discharging switch 170, a thermistor 180 and a current detection resistor 190, etc., which are not limited here.

[0036] Fuel gauge 120 manages battery cells 110 by collecting battery voltage, current, and temperature, and using algorithms to estimate the battery's remaining state of charge (SOC) based on the collected data. Fuel gauge 120 implements high-precision sampling, low-power operation, communication, and data processing in hardware, as well as accurate battery modeling and firmware-based algorithmic programming, data processing, and computational computation.

[0037] The fuel gauge 120 can report the remaining power to the electronic device, which can then display the reported remaining power as a displayed power level on the electronic device's display screen for user reference. In some display schemes, the electronic device smoothes the battery power between empty and full. For example, when the battery is empty, the displayed power level is at least 1% and 0 is not displayed. When the battery is fully charged, even if the remaining power reported by the fuel gauge is not 100%, the displayed power level will slide up to 100%.

[0038] In practice, it has been found that factors such as ambient temperature and battery material mismatches resulting from power calculation model incompatibility can lead to inaccurate remaining power calculations by fuel gauges. Current electronic devices' displayed power levels are overly dependent on fuel gauge calculations, and their smoothing logic is relatively simple. Therefore, when the fuel gauge's remaining power calculation is abnormal, the electronic device's displayed power level will also be abnormal, reducing the user experience.

[0039] For example, electronic devices usually use batteries with lithium cobalt oxide as the positive electrode material, but in recent years, with cost reduction and safety considerations, batteries with mixed ternary materials as the positive electrode have also begun to be used. "Ternary" refers to the three elements of nickel, manganese and cobalt mixed in different proportions to form the positive electrode material. Mixed ternary batteries do not contain cobalt or only contain a small amount of cobalt, and the cost of raw materials is relatively low. It also improves safety performance to a certain extent and can reduce the risk of thermal runaway. However, the change in battery materials means that the fuel gauge calculation model originally established for old batteries cannot be well adapted, which leads to inaccurate remaining power calculated by the fuel gauge.

[0040] In addition, the ambient temperature also has a great influence on the calculation results of the fuel gauge, especially in low temperature environments. Figure 2 , Figure 2 This is a schematic diagram of an abnormal remaining power report of a power meter disclosed in an embodiment of the present application. Figure 2 At least the following three issues are reflected:

[0041] (1) When the electronic device is charged in the temperature range of 0-5°C and 5-12°C, the remaining power reported by the fuel gauge is 0 for a long time, resulting in the displayed power being 1% for a long time.

[0042] (2) Since the remaining capacity reported by the fuel gauge is accurate in non-low temperature environments, when charging is switched from non-low temperature to low temperature, the remaining capacity reported by the fuel gauge will jump from the accurate value to zero. For example, when the temperature drops from 20 degrees Celsius to 2 degrees Celsius, the remaining capacity reported by the fuel gauge may jump from the original accurate 13% to 0, causing the displayed capacity to also suddenly drop.

[0043] (3) In low temperatures, the battery level is displayed as 5%. The moment charging begins, the remaining battery level reported by the battery meter jumps to zero. When the battery level drops below 12 degrees Celsius and switches to charging mode, the remaining battery level reported by the battery meter also jumps.

[0044] Depend on Figure 2 It can be seen that when charging the battery in a low-temperature environment, there is a problem that the power level does not increase for a long time or drops to zero.

[0045] The embodiment of the present application discloses a method for displaying power, which can obtain the target current corresponding to the battery when the remaining power reported by the battery meets the power abnormality condition; and determine the power change rate of the displayed power according to the target current of the battery; and then determine the second displayed power for display according to the current first displayed power and the power change rate. It can be seen that the power display method disclosed in the embodiment of the present application, when it is determined that the remaining power reported by the battery is abnormal, can no longer determine the displayed power according to the remaining current reported by the battery, thereby avoiding the situation where the displayed power is also abnormal; in addition, the power change rate of the displayed power can be predicted based on the battery power, and then the displayed power can be adjusted according to the power change rate of the displayed power, so that the displayed power changes according to the normal level, avoiding the bad experience brought to the user by the abnormal displayed power.

[0046] It should be noted that the power display method disclosed in the embodiment of the present application can not only solve the problem mentioned above that the power of the mixed ternary battery does not increase for a long time or the power jumps to zero when charging in a low-temperature scene, but may also be used to solve the abnormal power display problem of other batteries such as silicon negative electrode batteries, as well as the problem of abnormal remaining power reported by the power meter such as power jump caused by long-term non-calibration of the power meter. The embodiment of the present application is not limited to this.

[0047] Based on this, the power display method and device, electronic device, and computer-readable storage medium disclosed in the embodiments of the present application are introduced below.

[0048] See also Figure 3 , Figure 3 This is a flow chart of a method for displaying power level disclosed in an embodiment of the present application. Optionally, the method can be applied to various electronic devices, without limitation herein. Optionally, the method can include the following steps:

[0049] 302. If the remaining power reported by the battery meets the power abnormality condition, obtain the target current corresponding to the battery.

[0050] In an embodiment of the present application, the battery meter in the battery can report the remaining battery power to the electronic device (eg, the central processing unit of the electronic device), and the electronic device can then determine whether the reported remaining power meets the power abnormality condition.

[0051] In an optional embodiment, the abnormal power condition may include one or more of the following:

[0052] (1) When the battery is in charging state, the remaining power currently reported by the battery is less than the remaining power reported by the battery last time.

[0053] It is understandable that when the battery is in a charging state, the remaining power currently reported by the battery should be greater than the remaining power last reported by the battery. For example, the remaining power last reported was 5%, and since it is in a charging state, the remaining power currently reported may be 6%.

[0054] In this regard, when the battery is in a charging state, if the remaining power currently reported by the battery is less than the remaining power reported by the battery last time, it means that the remaining power reported by the battery has undergone an abnormal downward jump. In this regard, the electronic device can determine that the remaining power reported by the battery meets the abnormal power condition.

[0055] (2) When the battery is in a charging state, multiple remaining capacities reported by the battery within the first time period are all 0.

[0056] As previously mentioned, when a battery is charging, the remaining power reported by the battery should be greater than the remaining power reported by the battery last time; that is, the remaining power reported by the battery should gradually increase. If the remaining power reported by the battery during the first period is all 0, that is, the remaining power reported by the battery does not increase, the electronic device can determine that the remaining power reported by the battery meets the abnormal power condition.

[0057] Optionally, the first duration may be set by the developer based on a large amount of development experience, and typical values may include: 2 minutes, 3 minutes, etc., which are not limited here.

[0058] (3) When the battery switches from a charging state to a discharging state, the remaining power currently reported by the battery is less than the current first displayed power.

[0059] It is understood that under normal circumstances, the currently displayed first displayed power level should be equal to the remaining power level currently reported by the battery. If the remaining power level currently reported by the battery is less than the currently displayed first displayed power level, it means that the battery has experienced an abnormal condition in which the remaining power level reported by the battery has jumped downward while the battery is charging. In this case, the electronic device can determine that the remaining power level reported by the battery meets the power abnormality condition.

[0060] By implementing the above method, the electronic device can determine that the remaining power reported by the battery meets the abnormal power condition when the remaining power reported by the battery jumps downward and does not increase for a long time, or the reported remaining power is not equal to the displayed power. Therefore, it can subsequently smoothly optimize the abnormal situations such as the remaining power reported by the battery jumps downward and does not increase for a long time, or the reported remaining power is not equal to the displayed power, so that the displayed power changes according to the normal level, thereby avoiding the bad experience brought to the user by the abnormal displayed power.

[0061] In the embodiment of the present application, the target current corresponding to the battery may include: charging current and / or discharging current. The charging current is the current on the battery circuit collected when the battery is in a charging state; the discharging current is the current on the battery circuit collected when the battery is in a discharging state.

[0062] Please refer again Figure 1 Optionally, the electronic device can obtain the target current of the battery pair through the current detection resistor 190 in the battery pack, which is not limited here.

[0063] 304. Determine a rate of change of the displayed power level according to a target current corresponding to the battery.

[0064] In an embodiment of the present application, if the electronic device determines that the remaining power reported by the battery meets the abnormal power condition, the electronic device may no longer determine the displayed power level based on the abnormal remaining power reported by the battery. In an embodiment of the present application, the electronic device may predict the rate of change of the displayed power level based on the target current corresponding to the battery, and then adjust the displayed power level based on the rate of change of the power level.

[0065] The rate of change in the displayed charge level is typically correlated with the target current in the battery circuit. For example, according to the formula: Charging Time = Battery Capacity (mAh) / Charging Current (mA), we can see that charging time and charging current are negatively correlated. Furthermore, the rate of charge increase is negatively correlated with charging time, indicating a positive correlation between the rate of charge increase and the charging current.

[0066] Based on this, the electronic device determines the battery charge increase rate based on the battery charging current, and further determines the charge increase rate of the displayed charge based on the battery charge increase rate. Similarly, the battery charge decrease rate can be determined based on the discharge current, and further determines the charge decrease rate of the displayed charge based on the battery charge decrease rate. This will not be further described here.

[0067] 306. Determine a second displayed power level according to the current first displayed power level and the power level change speed, and display the second displayed power level.

[0068] In the embodiment of the present application, the power change rate may refer to the time required for each unit of power to change, for example, the time required for each 1% increase in power or the time required for each 1% decrease in power, which is not limited here.

[0069] Optionally, the electronic device may determine a target duration for each unit power change based on the power change rate; and then determine a second displayed power based on the current first displayed power and unit power for each target duration.

[0070] For example, assuming that the rate of change of power is: it takes 10 minutes for each 1% increase in power, and the current first displayed power is 2%, the electronic device can use 3% as the second displayed power after 10 minutes, and 4% as the second displayed power after 20 minutes, and so on, which will not be repeated here.

[0071] As an optional implementation, the electronic device may continue to display the first displayed power level before displaying the second displayed power level.

[0072] It is understandable that the electronic device has determined that the remaining power reported by the battery meets the abnormal power condition. In this case, the electronic device can no longer determine the displayed power based on the abnormal remaining power reported by the battery, but instead maintain the currently displayed first displayed power to avoid abnormal jumps in the displayed power.

[0073] In addition, the displayed power level of an electronic device usually does not change frequently in a short period of time. When the above method is implemented, the electronic device maintains the first displayed power level unchanged before displaying the second displayed power level, and the user will not feel abnormal. The power display method disclosed in the embodiment of the present application can be implemented without the user noticing, avoiding the adverse experience brought to the user by abnormal jumps in the displayed power level, thereby improving the user's usage experience.

[0074] In an embodiment of the present application, when the electronic device determines that the remaining power reported by the battery does not meet the abnormal power condition, it can update the displayed power according to the remaining power reported by the battery in real time.

[0075] It is understandable that if the remaining power reported by the battery does not meet the conditions for abnormal power, it means that the remaining power reported by the battery is accurate. The displayed power can be updated according to the remaining power reported by the battery in real time, thereby reducing the calculation amount of the electronic device and saving the power consumption of the electronic device.

[0076] As another optional implementation, after displaying the second displayed power level, the electronic device can obtain the next reported remaining power level of the battery; if the next reported remaining power level is greater than or equal to the second displayed power level, the electronic device can update the displayed power level according to the next reported remaining power level.

[0077] As described above, the abnormality of the reported residual current transmission usually includes a downward jump or jump to zero of the reported residual power, etc. For example, if the current displayed power is 3%, and the next reported residual power jumps down to 0%, it indicates an abnormality.

[0078] Correspondingly, if the remaining power reported next time is greater than or equal to the second displayed power, it means that there is no abnormality in the remaining power reported by the battery. The electronic device can update the displayed power according to the remaining power reported next time.

[0079] By implementing the above method, the electronic device updates the displayed power level according to the remaining power reported by the battery next time when determining that the remaining power reported by the battery next time is accurate, thereby reducing the calculation amount of the electronic device and saving the power consumption of the electronic device.

[0080] By implementing the methods disclosed in the above embodiments, when the remaining power reported by the battery meets the power abnormality condition, the target current corresponding to the battery can be obtained; and the power change rate of the displayed power can be determined based on the target current of the battery; and then the second displayed power can be determined for display based on the current first displayed power and the power change rate. It can be seen that in the embodiments of the present application, when it is determined that the remaining power reported by the battery is abnormal, the displayed power can no longer be determined based on the remaining current reported by the battery, thereby avoiding abnormal display of power; in addition, the power change rate of the displayed power can be predicted based on the battery power, and then the displayed power can be adjusted according to the power change rate of the displayed power, so that the displayed power changes according to the normal level, avoiding the bad experience brought to the user by the abnormal displayed power.

[0081] See also Figure 4 , Figure 4 This is a flow chart of another method for displaying power level disclosed in an embodiment of the present application. Optionally, the method can be applied to various electronic devices, without limitation herein. Optionally, the method can include the following steps:

[0082] 402. When the battery is in a charging state, if the remaining power reported by the battery meets the power abnormality condition, obtain the actual charging current corresponding to the battery.

[0083] Please refer again Figure 2 The remaining power reported by the battery in the charging state is prone to abnormalities. In this case, when the battery is in the charging state, if the remaining power reported by the battery meets the abnormal power condition, the displayed power can no longer be determined based on the abnormal remaining power reported by the battery, but step 402 can be executed.

[0084] Please refer again Figure 2 In low temperature conditions such as 0 to 5 degrees Celsius or 5 to 12 degrees Celsius, the battery is prone to abnormal reported remaining power. As an optional embodiment, when the battery is in a charging state and the battery temperature is less than a temperature threshold, the electronic device may no longer determine the displayed power based on the abnormal remaining power reported by the battery, but may execute step 402.

[0085] Optionally, the temperature threshold may be set by a developer based on a large amount of development experience. Typical values may include: 0 to 5 degrees Celsius, 5 to 12 degrees Celsius, etc., which are not limited here.

[0086] By implementing the above method, when the battery is in a charging state and the battery temperature is lower than a temperature threshold, which is a situation where the reported remaining power is prone to abnormality, the electronic device can no longer determine the displayed power based on the abnormal remaining power reported by the battery, so as to avoid the bad experience brought to the user by the abnormal displayed power.

[0087] Please refer again Figure 2 The battery is at low temperatures and the current displayed power level is low, which is likely to cause abnormalities in the reported remaining power. Alternatively, when the battery is in a charging state, the current displayed power level of the battery is less than a power threshold, and the battery temperature is less than a temperature threshold, the electronic device can obtain the actual charging current corresponding to the battery.

[0088] The power threshold may be set by developers based on a large amount of development experience, and typical values may include 2%, 5%, etc., which are not limited here.

[0089] In the embodiment of the present application, the actual charging current corresponding to the battery can be the real-time charging current currently collected, thereby increasing the speed of obtaining the actual charging current.

[0090] In another optional embodiment, the actual charging current corresponding to the battery can be determined based on multiple historical charging currents collected historically. Optionally, the electronic device can obtain multiple historical charging currents collected within the second time period and calculate the average of the multiple historical charging currents as the actual charging current, thereby improving the accuracy of the obtained actual charging current.

[0091] Optionally, the electronic device may round the actual charging current obtained to an integer multiple. For example, assuming the actual charging current obtained is 349.5 mA, it may be rounded to an integer multiple of 50, i.e., 350 mA, thereby facilitating subsequent calculations and improving the implementation efficiency of the method.

[0092] 404. Determine a rate of increase of the displayed power level according to an actual charging current corresponding to the battery.

[0093] As an optional implementation, the electronic device may determine the unit charging time according to the actual charging current and the available capacity of the battery. The unit charging time is the time required to charge the battery with a unit amount of electricity.

[0094] Since the battery temperature or the ambient temperature will affect the available capacity of the battery, optionally, the electronic device can determine the available capacity of the battery based on the current battery temperature of the battery.

[0095] The present application embodiment is described by taking the battery temperature equal to the ambient temperature as an example, which should not be construed as limiting the present application embodiment. In other optional embodiments, the electronic device can also use the ambient temperature around the battery to replace the battery temperature for calculation, which is not limited here.

[0096] In an optional embodiment, the electronic device can determine the available capacity of the battery based on the battery's design capacity and battery temperature. The design capacity is the capacity of the battery when it is within a normal temperature range. For example, a battery with a design capacity of 5000mAh at room temperature may only have an available capacity of 4000mAh in the 0-5°C range, which is not limited here.

[0097] Optionally, the electronic device may divide the available capacity of the battery by the second value to obtain a first calculation result; multiply the first calculation result by the third value to obtain a second calculation result; and then divide the second calculation result by the actual charging current to obtain a unit charging time.

[0098] Optionally, the second value may include 100, and then the available capacity of the battery is divided by 100, and the first calculation result is 1% of the battery capacity; the third value may include 60, that is, the second calculation result is "mA·min".

[0099] For example, assuming the battery's available capacity is 4000mAh and the actual charging current is 350mA, the unit charging time is: 4000mAh / 100*60 / 350mA=6.857min, which means that when charging in the range of 0-5°C, it takes 6.857min to charge the battery 1%.

[0100] The above calculation result is only the theoretical length of time required for the battery to charge each unit of electricity. In fact, for different battery temperatures, the battery is usually set with a corresponding preset charging current. In order to make the predicted rate of increase in electricity more consistent with the actual situation, the preset charging current should also be taken into account. Optionally, the electronic device can determine the preset charging current based on the battery temperature of the battery. Optionally, the preset charging current can be greater than the actual charging current. For example, in the range of 0 to 5°C, the actual charging current is 350mA, and the preset charging current can be 500mA.

[0101] Furthermore, the electronic device can determine the rate of increase of the displayed power level according to the preset charging current, the actual charging current and the unit charging time.

[0102] Optionally, the electronic device can calculate the preset charging current divided by the actual charging current to obtain a third calculation result; and then calculate the third calculation result and multiply it by the unit charging time to obtain the displayed power increase rate.

[0103] For example, assuming that in the range of 0 to 5°C, the preset charging current can be 500mA, the actual charging current is 350mA, and the unit charging time is calculated as 6.857min in the previous text, then the speed at which the displayed power increases can be: 500 / 350*6.857=9.795min.

[0104] In one embodiment, the electronic device may round up the rate at which the battery level increases. For example, 9.795 minutes may be rounded up to 10 minutes, indicating that the displayed battery level may increase by 1% every 10 minutes.

[0105] By implementing the above method, the electronic device can combine multiple factors such as the battery's preset charging current, actual charging current and unit charging time to predict the rate of increase of the displayed power level, thereby improving the accuracy of the determined rate of increase of power level. As a result, even if the remaining power reported by the battery is abnormal, the displayed power level can still increase at a normal level, thereby improving the user experience.

[0106] 406. Determine a second displayed power level based on the current first displayed power level and the power level increase rate, and display the second displayed power level.

[0107] In the embodiment of the present application, the electronic device can increase the unit power at intervals of a third time based on the first displayed power level according to the power increase rate. The third time is the time required for each unit power increase determined according to the power increase rate.

[0108] By implementing the methods disclosed in the above embodiments, when it is determined that the remaining power reported by the battery is abnormal, the displayed power can no longer be determined based on the remaining current reported by the battery, thereby avoiding abnormal displayed power. In addition, the power change rate of the displayed power can be predicted based on the battery power, and then the displayed power can be adjusted according to the power change rate of the displayed power, so that when the remaining power reported by the battery is abnormal, the displayed power changes according to a normal level, thereby improving the user experience. Moreover, when the battery is in a charging state and the battery temperature of the battery is less than a temperature threshold, which is prone to abnormal reported remaining power, the electronic device can no longer determine the displayed power based on the abnormal remaining power reported by the battery, thereby avoiding the adverse experience caused to the user by the abnormal displayed power. Furthermore, the electronic device can predict the power increase rate of the displayed power based on multiple factors such as the preset charging current, actual charging current and unit charging time of the battery, thereby improving the accuracy of the determined power increase rate, and thus making it possible for the displayed power to still increase according to a normal level when the remaining power reported by the battery is abnormal, thereby improving the user experience.

[0109] See also Figure 5 , Figure 5 This is a flow chart of another method for displaying power level disclosed in an embodiment of the present application. Optionally, the method can be applied to various electronic devices, without limitation herein. Optionally, the method can include the following steps:

[0110] 502. When the battery is in a discharging state, if the remaining power reported by the battery meets the power abnormality condition, obtain the corresponding discharge current of the battery.

[0111] In an embodiment of the present application, abnormal power conditions may also include: when the battery is in a discharging state, multiple remaining powers reported by the battery are 0; or when the battery is in a discharging state, the remaining power currently reported by the battery is greater than the remaining power reported by the battery last time; and as mentioned above: when the battery switches from a charging state to a discharging state, the remaining power currently reported by the battery is less than the current first displayed power, etc., which are not limited here.

[0112] The embodiment of the present application is illustrated by taking the abnormal power condition of "when the battery switches from a charging state to a discharging state, the remaining power currently reported by the battery is less than the current first displayed power" as an example, which should not constitute a limitation on the embodiment of the present application.

[0113] It should be noted that when the battery switches from a charging state to a discharging state, the remaining power currently reported by the battery is still less than the current first displayed power. This indicates that when the battery was in the charging state, the remaining power reported by the battery was abnormal, resulting in the reported remaining current not catching up with the displayed power. If the displayed power is determined according to the remaining current reported by the battery at this time, the displayed power will suddenly jump downward, giving the user an abnormal feeling of rapid power loss.

[0114] Optionally, when the battery is in a discharging state, if the remaining power reported by the battery meets the above-mentioned abnormal power condition, the electronic device may no longer determine the displayed power based on the abnormal remaining power reported by the battery.

[0115] Compared with the above-mentioned method of determining the rising speed of the displayed power level according to the charging current of the battery, the embodiment of the present application will introduce determining the falling speed of the displayed power level according to the discharge current of the battery when the battery is in a discharging state.

[0116] 504. Determine a rate of decrease of the displayed power level according to the discharge current corresponding to the battery.

[0117] As an optional implementation, the electronic device may determine the unit discharge time according to the unit power and discharge current of the battery; wherein the unit discharge time indicates the time required for the battery to discharge a unit power under a unit load;

[0118] The electronic device can then determine the rate at which the displayed power level decreases based on the unit discharge time and the current displayed power level.

[0119] Optionally, the battery's unit capacity can be set by the developer based on extensive development experience. Typical values include 1% and 10%, but are not limited here. Discharge current refers to the current in the battery circuit when the battery is discharging. The discharge current can be detected by the current sense resistor described above, but is not limited here. The unit load can be set by the developer based on extensive development experience. Typical values include 1A and 10A, but are not limited here.

[0120] Optionally, the discharge current may be a current collected in real time. In another optional embodiment, the discharge current may be determined based on multiple historical discharge currents collected within a first historical time period. The first historical time period may be set by the developer based on extensive development experience. Typical values may include 20 seconds, 30 seconds, etc., and are not limited here.

[0121] Optionally, the electronic device may calculate a target average value based on multiple historical discharge currents and determine the target average value as the discharge current corresponding to the battery. In another optional embodiment, if the target average value is greater than a fourth value, the fourth value may be multiplied by a fifth value to obtain a fourth calculation result, and the fourth calculation result may be determined as the discharge current corresponding to the battery. If the target average value is less than or equal to the fourth value, the fourth value may be determined as the discharge current corresponding to the battery.

[0122] Optionally, the fourth value can be set by the developer based on their extensive development experience, and typical values may include 500mA, 600mA, etc., which are not limited here. The fifth value can be set by the developer based on their extensive development experience, and typical values may include 2, 3, etc., which are not limited here.

[0123] For example, for a battery with a design capacity of 5000mAh at room temperature, a second load current (equivalent to 4V), and a unit capacity of 50mAh, if the average load current sampled is 659mA, the average voltage is 3.348V, and the displayed capacity is 6%, then the discharge current is 659*3.348 / 4=551mA. 551mAd is greater than 500mA, so the discharge current can be 500mA*2=1000mA.

[0124] In one embodiment, the electronic device may divide the unit power of the battery by the discharge current to obtain the unit discharge duration. Alternatively, the electronic device may multiply the unit discharge duration by a sixth value to obtain a fifth calculation result; and further divide the fifth calculation result by a seventh value to obtain the power decline rate. The seventh value is the difference between the current displayed power and the unit power.

[0125] For example, a battery with a design capacity of 5000mAh at room temperature, a second-level load current (equivalent to 4V), and a unit capacity of 50mAh, if the average load current sampled at this time is 659mA, the average voltage is 3.348V, and the displayed capacity is 6%. The discharge current is 659*3.348 / 4=551mA. 551mAd is greater than 500mA, so 1000mA is taken. Then the rate of power decline is: unit capacity / discharge current*3600 / X (X is the current display circuit - 1) = 50 / 1000*3600 / 5=36s. In this case, the electronic device can smoothly display the power by decreasing by 1% every 36 seconds until the displayed power drops to 1%, and the smooth catch-up logic of the displayed power ends.

[0126] Optionally, after determining the battery decrease rate of the displayed battery level, the electronic device can determine whether the battery decrease rate is greater than a speed threshold; if it is greater than the speed threshold, the second displayed battery level is determined based on the current first displayed battery level and the battery decrease rate; if it is less than the speed threshold, the speed threshold is updated to the new battery decrease rate, thereby avoiding the displayed battery decrease rate being too obvious, thereby improving the user experience.

[0127] Optionally, the speed threshold may be set by the developer based on a large amount of development experience. Typical values may include a decrease in unit power every 15 seconds, a decrease in unit power every 20 seconds, etc., which are not limited here.

[0128] For example, if the battery decrease rate is: unit battery / discharge current*3600 / X (X is the current display circuit-1) = 50 / 1000*3600 / 5 = 36s>15s, it can be smoothed according to the battery decrease rate of 36s; if the battery decrease rate is 10s<15s, it can be smoothed according to the battery decrease rate of 15s, which is not limited here.

[0129] By implementing the above method, the electronic device can combine multiple factors such as the battery's unit power, discharge current and current displayed power to predict the rate of power decline of the displayed power, thereby improving the accuracy of the determined power decline rate, and then allowing the displayed power to decline according to normal levels, improving the user experience.

[0130] Optionally, the electronic device may obtain a first battery voltage of the battery; if the first battery voltage corresponding to the battery is less than or equal to a voltage threshold, the electronic device may determine a rate of decrease of the displayed power level according to a discharge current corresponding to the battery.

[0131] It should be noted that the first battery voltage corresponding to the battery is less than or equal to the voltage threshold, indicating that the current battery voltage is relatively low. At this time, the battery voltage is close to the shutdown voltage of the electronic device.

[0132] If the displayed battery level drops too quickly, users will perceive the battery drain as rapid, resulting in a poor user experience. If the displayed battery level drops too slowly, the battery voltage may fall below the shutdown voltage before the displayed battery level drops to 1%, triggering a forced shutdown due to low voltage, also resulting in a poor user experience. By implementing the above method, when the battery voltage is low, the electronic device can determine the appropriate rate of battery level drop based on a combination of factors, including the battery's unit capacity, discharge current, and the current displayed capacity. This allows the displayed capacity to drop at a normal level, improving the user experience.

[0133] In another optional embodiment, when the battery is in a discharging state, if the first battery voltage corresponding to the battery is greater than the voltage threshold, the electronic device can determine the target power decrease rate of the displayed power corresponding to the power interval to which the current first displayed power belongs; and then the electronic device can determine the third displayed power based on the first displayed power and the target power decrease rate, and display the third displayed power.

[0134] Optionally, the target battery level decrease rate may be negatively correlated with the target battery level value corresponding to the battery level interval to which the first displayed battery level belongs. That is, the smaller the battery level value corresponding to the battery level interval, the faster the target battery level decreases; the larger the battery level value corresponding to the battery level interval, the slower the target battery level decreases. Optionally, the target battery level value corresponding to the battery level interval may be a value reflecting the overall battery level of the battery level interval, such as the upper limit, lower limit, average value, and median value of the battery level interval, which are not limited here.

[0135] Exemplarily, the power interval to which the first displayed power level belongs may include: =100%, [95%, 99%), [60%, 95%), [1%, 60%), etc.

[0136] Among them: the target power decrease rate corresponding to =100% can be: 1% every 5 minutes; the target power decrease rate corresponding to [95%, 99%) can be: 1% every 2.5 minutes; the target power decrease rate corresponding to [60%, 95%) can be: 1% every 1 minute; the target power decrease rate corresponding to [1%, 60%) can be: 1% every 40 seconds, and there is no limitation here.

[0137] When the above method is implemented, the first battery voltage corresponding to the battery is greater than the voltage threshold, indicating that the battery voltage is still relatively high and will not trigger shutdown immediately. In this case, the electronic device can display the power smoothly according to a fixed power drop rate, so that the user will not perceive obvious power jumps, thereby improving the user experience.

[0138] Optionally, the voltage threshold is the sum of the second battery voltage and the target voltage, the second battery voltage is the battery voltage when the electronic device corresponding to the battery is turned off, the target voltage is the voltage corresponding to when the remaining power of the battery is the target power, and the target power is the sum of the power corresponding to the second battery voltage and the unit power.

[0139] For example, the second battery voltage Termvolt may be the zero voltage reported by the fuel gauge and also the shutdown voltage of the entire device. The target voltage Delta_V is a voltage obtained by increasing the capacity by 1% on the basis of Termvolt.

[0140] Optionally, the target voltage can be determined based on the number of cycles of the battery. Optionally, the target voltage can be positively correlated with the number of cycles of the battery. For example, if the cycle number is 0-400 cycles, the target voltage Delta_V can be 50mV; if the cycle number is 400-1000 cycles, the target voltage Delta_V can be 80mV; if the cycle number is greater than 1000 cycles, the target voltage Delta_V can be 120mV, without limitation.

[0141] By implementing the above method, the voltage threshold can be determined according to the zero voltage and unit capacity of the battery, so that the determined voltage threshold can be used as a standard for determining whether the battery is on the verge of shutdown.

[0142] 506. Determine a second displayed power level according to the current first displayed power level and the power level decrease rate, and display the second displayed power level.

[0143] As an optional implementation, the electronic device may obtain the currently displayed target power level; if the target power level is less than or equal to the power threshold, the displayed power level is updated according to the remaining current reported by the battery in real time.

[0144] Optionally, the power threshold may be set by the developer based on a large amount of development experience, and typical values may include 1% or 2% of the battery capacity, etc., which are not limited here.

[0145] For example, as described above, the electronic device will smooth the two endpoint values of battery charge, empty and full. For example, in the empty state, the minimum displayed charge is 1%, and 0 is not displayed. When the target displayed charge is 1%, the displayed charge will not drop any further, and there will be no jump. The displayed charge can be updated according to the remaining current reported by the battery in real time.

[0146] When implementing the above method, if the target displayed power level is less than or equal to the power threshold, the displayed power level of the battery will generally not drop any further, and there will be no jump. The displayed power level can be updated according to the residual current reported by the battery in real time, thereby reducing the calculation amount of the electronic device and further reducing the power consumption of the electronic device.

[0147] By implementing the methods disclosed in the above embodiments, when it is determined that the remaining power reported by the battery is abnormal, the displayed power level can no longer be determined based on the remaining current reported by the battery, thereby avoiding abnormal situations in the displayed power level; in addition, the power change rate of the displayed power level can be predicted based on the battery power level, and then the displayed power level can be adjusted according to the power change rate of the displayed power level, so that when the remaining power reported by the battery is abnormal, the displayed power level changes according to a normal level, thereby improving the user experience; and the electronic device can combine multiple factors such as the unit power level of the battery, the discharge current and the current displayed power level to predict the power decrease rate of the displayed power level, thereby improving the accuracy of the determined power decrease rate, and then the displayed power level can decrease according to a normal level, thereby improving the user experience; and, when the battery voltage is low, the electronic device can combine the unit power level of the battery, the discharge current and the current displayed power level to predict the power decrease rate of the displayed power level, thereby improving the accuracy of the determined power decrease rate, and then the displayed power level can decrease according to a normal level, thereby improving the user experience; The appropriate rate of power decrease is determined based on multiple factors such as the displayed power level, so that the displayed power level can decrease according to the normal level, thereby improving the user experience; and, the first battery voltage corresponding to the battery is greater than the voltage threshold, indicating that the battery voltage is still relatively high and will not trigger shutdown immediately. For this, the electronic device can smooth the displayed power level at a fixed rate of power decrease, so that the user will not perceive obvious power jumps, thereby improving the user experience; and, the voltage threshold can be determined based on the battery's zero voltage and unit capacity, so that the voltage threshold can be used as a standard for determining whether the battery is on the verge of shutdown; and, if the target displayed power level is less than or equal to the power threshold, the displayed power level of the battery will generally not decrease anymore, and there will be no jump. For this, the displayed power level can be updated based on the residual current reported by the battery in real time, thereby reducing the amount of calculation of the electronic device and thus reducing the power consumption of the electronic device.

[0148] In order to more clearly introduce the method of displaying the power level of the battery under charging status. Figure 6 An optional embodiment is introduced. Figure 6 , Figure 6 This is a flow chart of a method for displaying the amount of electricity in a charging state disclosed in an embodiment of the present application.

[0149] 602. The battery is charging.

[0150] 604. Is the battery temperature less than the temperature threshold? If so, execute step 606; if not, execute step 604 again.

[0151] 606. Is the currently reported remaining capacity (Gauge_SOC[i+1]) less than the last reported remaining capacity (Gauge_SOC[i]) of the battery? If so, proceed to step 608; if not, proceed to step 616.

[0152] 608. Keep displaying the first displayed power level unchanged.

[0153] 610. Is the battery in a charging state? If so, go to step 606; if not, go to step 612.

[0154] 612. Is the next reported remaining power (Gauge_SOC) greater than the second displayed power (UI_SOC)? If so, execute step 614; if not, end the process.

[0155] 614. A method flow for displaying power in a discharging state.

[0156] 616. Is the difference between the currently reported remaining capacity (Gauge_SOC[i+1]) and the last reported remaining capacity (Gauge_SOC[i]) of the battery zero, and has this difference lasted for more than 2 minutes? If so, proceed to step 618; if not, proceed to step 606.

[0157] 618. Determine a rate of change of power according to the battery temperature and target current corresponding to the battery, and smooth the displayed power according to the rate of change of power.

[0158] 620. Is the battery in a charging state? If so, go to step 622; if not, go to step 612.

[0159] 622. Is the next reported remaining power (Gauge_SOC) equal to the second displayed power (UI_SOC)? If so, end the process; if not, execute step 618.

[0160] In order to more clearly introduce the method of displaying the power level of the battery in the discharge state. Figure 7 An optional embodiment is introduced. Figure 7 , Figure 7 This is a flow chart of a method for displaying power in a discharge state disclosed in an embodiment of the present application.

[0161] 702. The battery switches from a charging state to a discharging state.

[0162] 704. Is the first battery voltage (Vbat) corresponding to the battery greater than the voltage threshold (Termvolt+Delta_V)? If so, go to step 706; if not, go to step 708.

[0163] 706 : Determine, based on the power range to which the current first displayed power level belongs, a target power level decreasing speed of the displayed power level corresponding to the power range.

[0164] Optionally, during the process of executing step 706 , if the first battery voltage corresponding to the battery is greater than the voltage threshold, step 708 may be executed.

[0165] 708. Determine a rate of decrease of the displayed power level based on the discharge current and the current displayed power level.

[0166] 710. Is the battery charge decrease rate (Tsmooth) less than or equal to a rate threshold (e.g., 15 seconds)? If so, execute steps 712-714; if not, execute steps 716-718.

[0167] 712. Determine a second displayed power level according to the speed threshold and the current first displayed power level.

[0168] 714. Is the currently displayed target displayed power (UI_SOC) less than the power threshold? If so, end this process; if not, execute step 712.

[0169] 716. Determine a second displayed power level according to the power level decrease rate and the current first displayed power level.

[0170] 718. Is the currently displayed target displayed power (UI_SOC) less than the power threshold (e.g., 1%)? If so, end this process; if not, execute step 716.

[0171] See also Figure 8 , Figure 8 Schematic diagram of a power display device disclosed in an embodiment of the present application. Optionally, the device can be applied to various electronic devices, which is not limited here. Optionally, the device may include a first acquisition unit 802, a first determination unit 804, and a second determination unit 806, wherein:

[0172] The first acquisition unit 802 is configured to acquire a target current corresponding to the battery when the remaining power reported by the battery meets an abnormal power condition;

[0173] A first determining unit 804 is configured to determine a speed of change of the displayed power according to a target current;

[0174] The second determining unit 806 is configured to determine a second displayed power level according to the current first displayed power level and the power level change speed, and display the second displayed power level.

[0175] By implementing the above device, when the remaining power reported by the battery meets the power abnormality condition, the target current corresponding to the battery can be obtained; and the power change rate of the displayed power can be determined based on the target current of the battery; and then the second displayed power can be determined for display based on the current first displayed power and the power change rate. It can be seen that in the embodiment of the present application, when it is determined that the remaining power reported by the battery is abnormal, the displayed power can no longer be determined based on the remaining current reported by the battery, thereby avoiding abnormal display power; in addition, the power change rate of the displayed power can be predicted based on the battery power, and then the displayed power can be adjusted according to the power change rate of the displayed power, so that when the remaining power reported by the battery is abnormal, the displayed power changes according to a normal level, thereby improving the user experience.

[0176] As an optional implementation, the abnormal power condition includes one or more of the following:

[0177] When the battery is in charging state, the remaining power currently reported by the battery is less than the remaining power reported by the battery last time;

[0178] When the battery is in a charging state, multiple remaining capacities reported by the battery within the first time period are all 0;

[0179] When the battery switches from a charging state to a discharging state, the remaining power currently reported by the battery is less than the current first displayed power.

[0180] By implementing the above-mentioned device, the electronic device can determine that the remaining power reported by the battery meets the abnormal power condition when the remaining power reported by the battery jumps downward and does not increase for a long time, or the reported remaining power is not equal to the displayed power. Therefore, it can subsequently smoothly optimize the abnormal situations such as the remaining power reported by the battery jumps downward and does not increase for a long time, or the reported remaining power is not equal to the displayed power, so that the displayed power changes according to the normal level, thereby avoiding the bad experience brought to the user by the abnormal displayed power.

[0181] As an optional implementation, the first acquisition unit 802 is also used to obtain the target current corresponding to the battery if the remaining power reported by the battery meets the power abnormality condition when the battery is in a charging state and the battery temperature is less than a temperature threshold.

[0182] By implementing the above device, when the battery is in a charging state and the battery temperature is lower than a temperature threshold, which is a situation where the reported remaining power is prone to abnormality, the electronic device can no longer determine the displayed power based on the abnormal remaining power reported by the battery, so as to avoid the bad experience brought to the user by the abnormal displayed power.

[0183] As an optional implementation, when the battery is in a charging state, the target current includes the actual charging current, and the charge change rate includes the charge increase rate.

[0184] As an optional implementation, the first determination unit 804 is also used to determine the unit charging time based on the actual charging current and the available capacity of the battery. The unit charging time is the time required for the battery to be charged with a unit amount of electricity; and to determine the rate of increase of the displayed electricity level based on the preset charging current, the actual charging current and the unit charging time.

[0185] By implementing the above-mentioned device, the electronic device can combine multiple factors such as the battery's preset charging current, actual charging current and unit charging time to predict the rate of increase of the displayed power level, thereby improving the accuracy of the determined rate of increase of power level. As a result, even if the remaining power reported by the battery is abnormal, the displayed power level can still increase at a normal level, thereby improving the user experience.

[0186] As an optional implementation manner, the available capacity of the battery and the preset charging current are determined according to the battery temperature of the battery.

[0187] The implementation of the above device can improve the accuracy of the determined available capacity and preset charging current, thereby improving the accuracy of the subsequently determined charge increase rate.

[0188] As an optional implementation, Figure 8 The device shown may further include a display unit (not shown), wherein:

[0189] The display unit is configured to keep displaying the first displayed power level before displaying the second displayed power level.

[0190] By implementing the above-mentioned device, the electronic device maintains the first displayed power level unchanged before displaying the second displayed power level, and the user will not feel abnormal. The power display method disclosed in the embodiment of the present application can be implemented without the user noticing, avoiding the bad experience brought to the user by abnormal jumps in the displayed power level, thereby improving the user's usage experience.

[0191] As an optional implementation, Figure 8 The device shown may further include a first updating unit (not shown), wherein:

[0192] The first updating unit is used to obtain the remaining power reported by the battery next time after displaying the second displayed power level; and if the remaining power reported next time is greater than or equal to the second displayed power level, update the displayed power level according to the remaining current reported next time.

[0193] By implementing the above device, the electronic device updates the displayed power level according to the next reported remaining power level of the battery when determining that the next reported remaining power level of the battery is accurate, thereby reducing the calculation workload of the electronic device and saving the power consumption of the electronic device.

[0194] As an optional implementation, when the battery is in a discharging state, the target current includes the discharging current, and the charge change rate includes the charge decrease rate.

[0195] As an optional implementation, the first determining unit 804 is further configured to determine a rate of decrease of the displayed power level according to the discharge current and the current displayed power level when the first battery voltage corresponding to the battery is less than or equal to the voltage threshold.

[0196] By implementing the above device, when the battery voltage of the electronic device is low, the electronic device can determine the appropriate rate of power reduction by combining multiple factors such as the battery's unit power, discharge current and the current displayed power, so that the displayed power can be reduced to a normal level, thereby improving the user experience.

[0197] As an optional implementation, the first determination unit 804 is also used to determine the unit discharge time based on the unit power and discharge current of the battery, where the unit discharge time indicates the time required for the battery to release unit power under unit load; and determine the power decrease rate of the displayed power based on the unit discharge time and the current displayed power.

[0198] By implementing the above-mentioned device, the electronic device can combine multiple factors such as the unit power of the battery, the discharge current and the current displayed power to predict the power decrease rate of the displayed power, thereby improving the accuracy of the determined power decrease rate, and then allowing the displayed power to decrease according to the normal level, improving the user experience.

[0199] As an optional implementation, Figure 8 The device shown may further include a second updating unit (not shown), wherein:

[0200] The second update unit is used to determine the power decrease rate of the displayed power according to the discharge current and the current displayed power, and if the power decrease rate is greater than the speed threshold, determine the second displayed power according to the current first displayed power and the power decrease rate; and if the power decrease rate is less than or equal to the speed threshold, update the power decrease rate to the speed threshold.

[0201] By implementing the above device, the electronic device can determine whether the power decrease rate of the displayed power is greater than the speed threshold after determining the power decrease rate; if it is greater than the speed threshold, the second displayed power is determined based on the current first displayed power and the power decrease rate; if it is less than the speed threshold, the speed threshold is updated to the new power decrease rate, thereby avoiding the display power decrease rate being too obvious, thereby improving the user experience.

[0202] As an optional implementation, Figure 8 The device shown may also include a lowering unit (not shown), wherein:

[0203] The decreasing unit is used to determine the target power decrease rate of the displayed power corresponding to the power interval to which the current first displayed power belongs, if the first battery voltage corresponding to the battery is greater than the voltage threshold when the battery is in a discharging state; determine the third displayed power according to the first displayed power and the target power decrease rate, and display the third displayed power.

[0204] When the above device is implemented, the first battery voltage corresponding to the battery is greater than the voltage threshold, indicating that the battery voltage is still relatively high and will not trigger shutdown immediately. In this case, the electronic device can display the power smoothly according to a fixed power drop rate, so that the user will not perceive obvious power jumps, thereby improving the user experience.

[0205] As an optional implementation, the voltage threshold is the sum of the second battery voltage and the target voltage, the second battery voltage is the battery voltage when the electronic device corresponding to the battery is turned off, the target voltage is the voltage corresponding to when the remaining power of the battery is the target power, and the target power is the sum of the power corresponding to the second battery voltage and the unit power.

[0206] By implementing the above device, the voltage threshold can be determined according to the zero voltage and unit capacity of the battery, so that the determined voltage threshold can be used as a standard for whether the battery is on the verge of shutdown.

[0207] As an optional implementation, Figure 8 The device shown may further include a third updating unit (not shown), wherein:

[0208] The third updating unit is configured to obtain a target displayed power level currently displayed; and if the target displayed power level is less than or equal to a power threshold, update the displayed power level according to the remaining current reported by the battery in real time.

[0209] When the above device is implemented, if the target displayed power level is less than or equal to the power threshold, the displayed power level of the battery will generally not drop any further, and there will be no jump. The displayed power level can be updated according to the residual current reported by the battery in real time, thereby reducing the calculation amount of the electronic device and further reducing the power consumption of the electronic device.

[0210] See also Figure 9 , Figure 9 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. Figure 9 As shown, the electronic device may include: a memory 901 storing executable program code; a processor 902 coupled to the memory 901; wherein the processor 902 calls the executable program code stored in the memory 901 to execute the power display method disclosed in the above embodiments.

[0211] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the power display method disclosed in the above embodiments.

[0212] An embodiment of the present application further discloses an application publishing platform, wherein the application publishing platform is used to publish a computer program product, wherein when the computer program product runs on a computer, the computer executes part or all of the steps of the method in the above method embodiments.

[0213] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required for the present application.

[0214] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0215] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Some or all of these units may be selected based on actual needs to achieve the objectives of this embodiment.

[0216] In addition, the functional units in the embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0217] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present application, 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. The computer software product is stored in a memory and includes several requests for a computer device (which can be a personal computer, server or network device, etc., specifically a processor in a computer device) to execute some or all of the steps of the above-mentioned methods of various embodiments of the present application.

[0218] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0219] The above is a detailed introduction to the power display method and device, electronic device, and computer-readable storage medium disclosed in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for displaying electric quantity, characterized in that: The method comprises: If the remaining power reported by the battery meets the power abnormality condition, obtain the target current corresponding to the battery; Determining a rate of change of the displayed electrical quantity according to the target current; The second displayed power level is determined according to the current first displayed power level and the power level change speed, and the second displayed power level is displayed.

2. The method according to claim 1, characterized in that The abnormal power conditions include one or more of the following: When the battery is in a charging state, the remaining power currently reported by the battery is less than the remaining power last reported by the battery; When the battery is in a charging state, multiple remaining capacities reported by the battery within a first time period are all 0; When the battery switches from a charging state to a discharging state, the remaining power currently reported by the battery is less than the current first displayed power.

3. The method according to claim 1, characterized in that If the remaining power reported by the battery meets the power abnormality condition, obtaining the target current corresponding to the battery includes: When the battery is in a charging state and the battery temperature of the battery is less than a temperature threshold, if the remaining power reported by the battery meets a power abnormality condition, a target current corresponding to the battery is obtained.

4. The method according to claim 1, wherein When the battery is in a charging state, the target current includes an actual charging current, and the charge change rate includes a charge increase rate.

5. The method according to claim 4, characterized in that The step of determining a rate of change of the displayed power according to the target current includes: Determine a unit charging time according to the actual charging current and the available capacity of the battery, where the unit charging time is the time required for the battery to be charged with a unit amount of electricity; The speed at which the displayed power level increases is determined according to the preset charging current, the actual charging current, and the unit charging time.

6. The method according to claim 5, characterized in that The available capacity of the battery and the preset charging current are determined according to a battery temperature of the battery.

7. The method according to any one of claims 1 to 6, characterized in that Before displaying the second displayed power level, the method further includes: The first displayed power level is kept displayed.

8. The method according to any one of claims 1 to 6, characterized in that After displaying the second displayed power level, the method further includes: Obtain the remaining power of the battery reported next time; If the remaining power reported next time is greater than or equal to the second displayed power, the displayed power is updated according to the remaining current reported next time.

9. The method according to claim 1, characterized in that When the battery is in a discharging state, the target current includes a discharging current, and the charge change rate includes a charge decrease rate.

10. The method according to claim 9, characterized in that The step of determining a rate of change of the displayed power according to the target current includes: If the first battery voltage corresponding to the battery is less than or equal to the voltage threshold, the power decrease rate of the displayed power is determined according to the discharge current and the current displayed power.

11. The method according to claim 9 or 10, characterized in that The step of determining a rate of change of the displayed power according to the target current includes: Determining a unit discharge time according to the unit charge of the battery and the discharge current, where the unit discharge time represents the time required for the battery to discharge the unit charge under a unit load; The power decrease rate of the displayed power is determined according to the unit discharge time and the current displayed power.

12. The method according to claim 9 or 10, characterized in that After determining the rate of decrease of the displayed power level according to the discharge current, the method further includes: If the power level decrease rate is greater than the speed threshold, determining the second power level displayed based on the current first power level displayed and the power level decrease rate; If the battery power decrease speed is less than or equal to the speed threshold, the battery power decrease speed is updated to the speed threshold.

13. The method according to claim 1, wherein The method further comprises: When the battery is in a discharging state, if a first battery voltage corresponding to the battery is greater than a voltage threshold, determining a target power decrease rate of the displayed power corresponding to the power interval to which the current first displayed power belongs according to the power interval to which the first displayed power belongs; A third displayed power level is determined according to the first displayed power level and the target power level decreasing speed, and the third displayed power level is displayed.

14. The method according to claim 10 or 13, characterized in that The voltage threshold is the sum of a second battery voltage and a target voltage, the second battery voltage is the battery voltage when the electronic device corresponding to the battery is turned off, the target voltage is the voltage corresponding to when the remaining power of the battery is the target power, and the target power is the sum of the power corresponding to the second battery voltage and the unit power.

15. The method according to any one of claims 9 to 10 and 13, characterized in that The method further comprises: Get the current target display power; If the target displayed power level is less than or equal to the power threshold, the displayed power level is updated according to the remaining current reported by the battery in real time.

16. A power display device, characterized in that: The device comprises: A first acquiring unit is configured to acquire a target current corresponding to the battery when the remaining power reported by the battery meets a power abnormality condition; a first determining unit, configured to determine a rate of change of the displayed power according to the target current; The second determining unit is configured to determine a second displayed power level according to the current first displayed power level and the power level change speed, and to display the second displayed power level.

17. An electronic device, characterized in that: The method comprises a memory storing executable program code and a processor coupled to the memory; wherein the processor calls the executable program code stored in the memory to execute the method according to any one of claims 1 to 15.

18. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 15 is implemented.