Battery capacity display processing method and device, electronic equipment and storage medium
By forcibly displaying the preset capacity percentage when the battery is fully charged and smoothing it when the actual capacity percentage is less than the threshold, the problem of the battery being unable to charge and the capacity display jumps within the full charge state to the preset percentage range, improving the user experience.
Patent Information
- Application Number
- CN202510309690.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-04-29
AI Technical Summary
In the prior art, the battery cannot be charged within the full charge state to the preset percentage range, causing the user to misunderstand the battery to have problems, and the capacity display may cause the RSOC to jump.
A battery capacity display processing method is provided, and if the target battery starts to discharge in a full charge state, the actual capacity percentage is obtained. If the actual capacity percentage is greater than or equal to the preset threshold, force the preset display capacity percentage; if the actual capacity percentage is less than the threshold, smooth the display remaining capacity corresponding to the preset display capacity percentage to obtain the display capacity percentage at the current moment.
It avoids users' misjudgment of battery failure, reduces customer complaints, improves user experience, and avoids jumps in battery capacity display.
Smart Images

Figure CN119902099A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of battery technology, and in particular to a battery capacity display processing method, device, electronic device and storage medium. Background Art
[0002] Capacity display refers to the function or interface used to indicate the current remaining battery capacity on power-consuming devices (such as mobile phones, laptops, smart watches, etc.). This display is very important for users because it helps them understand the battery life of the device, thereby avoiding the device shutting down due to exhaustion at a critical moment.
[0003] In current technology, the actual remaining capacity percentage (Relative State of Charge, RSOC) is displayed on the device. The battery cannot be charged when it is fully charged to a preset percentage range. For example, the battery cannot be charged between 100% RSOC and 94% RSOC. This can easily cause customers to misunderstand and think that there is a problem with the battery, resulting in customer complaints. In addition, the current capacity display may cause the RSOC displayed to jump during the discharge process. Summary of the invention
[0004] The purpose of this application is to provide a battery capacity display processing method, device, electronic device and storage medium to improve user experience in view of the deficiencies in the above-mentioned prior art.
[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0006] In a first aspect, an embodiment of the present application provides a battery capacity display processing method, the method comprising:
[0007] If the target battery is in a fully charged state and starts to discharge at the current moment, obtain the actual capacity percentage of the target battery at the current moment;
[0008] In the case where the actual capacity percentage is greater than or equal to a preset threshold, determining the display capacity percentage at the current moment as a preset display capacity percentage, and displaying the preset display capacity percentage;
[0009] When the actual capacity percentage is less than a preset threshold, the preset displayed remaining capacity corresponding to the preset displayed capacity percentage is smoothed to obtain the displayed capacity percentage at the current moment, and the battery capacity is displayed based on the displayed capacity percentage at the current moment.
[0010] Optionally, the smoothing of the preset display remaining capacity corresponding to the preset display capacity percentage to obtain the display capacity percentage at the current moment includes:
[0011] Obtaining a first displayed remaining capacity corresponding to a displayed capacity percentage at a previous moment of the current moment, a current actual remaining capacity corresponding to an actual capacity percentage at the current moment, and a current accumulated capacity at the current moment;
[0012] Determine the smoothing time according to the average current of the target battery during the last discharge process;
[0013] The display capacity percentage at the current moment is determined according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current accumulated capacity, and the smoothing time.
[0014] Optionally, determining the smoothing time according to an average current of the target battery in a previous discharge process includes:
[0015] If the average current of the target battery in the last discharge process is greater than a first preset current threshold, determining the smoothing time to be a first duration;
[0016] If the average current of the target battery in the last discharge process is less than or equal to the first preset current threshold and greater than the second preset current threshold, determine the smoothing time to be a second duration;
[0017] If the average current of the target battery during the last discharge process is less than or equal to the second preset current threshold, the smoothing time is determined to be a third duration, wherein the first duration is less than the second duration, and the second duration is less than the third duration.
[0018] Optionally, determining the display capacity percentage at the current moment according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current cumulative capacity, and the smoothing time includes:
[0019] determining a second display remaining capacity according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current cumulative capacity, and the smoothing time;
[0020] The displayed capacity percentage at the current moment is determined according to the second displayed remaining capacity and the displayed fully charged capacity.
[0021] Optionally, determining the second display remaining capacity according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current cumulative capacity and the smoothing time includes:
[0022] Calculate the difference between the displayed remaining capacity corresponding to the preset displayed capacity percentage and the current actual remaining capacity to obtain a first parameter;
[0023] Dividing the first parameter by the smoothing time to obtain a second parameter;
[0024] The first displayed remaining capacity is subtracted from the second parameter to obtain a third parameter, and the third parameter is subtracted from the current accumulated capacity to obtain the second displayed remaining capacity.
[0025] Optionally, determining the display capacity percentage at the current moment according to the second display remaining capacity and the display fully charged capacity includes:
[0026] The second displayed remaining capacity is divided by the displayed full charge capacity to obtain the displayed capacity percentage at the current moment.
[0027] In a second aspect, an embodiment of the present application further provides a battery capacity display processing device, the device comprising:
[0028] An acquisition module, used for acquiring the actual capacity percentage of the target battery at the current moment if the target battery is in a fully charged state and starts to discharge at the current moment;
[0029] a determination module, configured to determine, when the actual capacity percentage is greater than or equal to a preset threshold, that the display capacity percentage at the current moment is a preset display capacity percentage, and display the preset display capacity percentage;
[0030] A smoothing processing module is used to smooth the preset displayed remaining capacity corresponding to the preset displayed capacity percentage when the actual capacity percentage is less than a preset threshold value, obtain the displayed capacity percentage at the current moment, and display the battery capacity based on the displayed capacity percentage at the current moment.
[0031] Optionally, the smoothing processing module includes:
[0032] A first acquisition unit, used to acquire a first displayed remaining capacity corresponding to a displayed capacity percentage at a previous moment of the current moment, a current actual remaining capacity corresponding to an actual capacity percentage at the current moment, and a current accumulated capacity at the current moment;
[0033] A first determining unit, configured to determine a smoothing time according to an average current of the target battery during a previous discharge process;
[0034] The second determining unit is used to determine the display capacity percentage at the current moment according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current accumulated capacity and the smoothing time.
[0035] Optionally, the first determining unit is specifically configured to:
[0036] If the average current of the target battery in the last discharge process is greater than a first preset current threshold, determining the smoothing time to be a first duration;
[0037] If the average current of the target battery in the last discharge process is less than or equal to the first preset current threshold and greater than the second preset current threshold, determine the smoothing time to be a second duration;
[0038] If the average current of the target battery during the last discharge process is less than or equal to the second preset current threshold, the smoothing time is determined to be a third duration, wherein the first duration is less than the second duration, and the second duration is less than the third duration.
[0039] Optionally, the second determining unit is specifically configured to:
[0040] determining a second display remaining capacity according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current cumulative capacity, and the smoothing time;
[0041] The displayed capacity percentage at the current moment is determined according to the second displayed remaining capacity and the displayed fully charged capacity.
[0042] Optionally, the second determining unit is specifically configured to:
[0043] Calculate the difference between the displayed remaining capacity corresponding to the preset displayed capacity percentage and the current actual remaining capacity to obtain a first parameter;
[0044] Dividing the first parameter by the smoothing time to obtain a second parameter;
[0045] The first displayed remaining capacity is subtracted from the second parameter to obtain a third parameter, and the third parameter is subtracted from the current accumulated capacity to obtain the second displayed remaining capacity.
[0046] Optionally, the second determining unit is specifically configured to:
[0047] The second displayed remaining capacity is divided by the displayed full charge capacity to obtain the displayed capacity percentage at the current moment.
[0048] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when an application is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to execute the steps of the battery capacity display processing method described in the first aspect above.
[0049] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is read and executes the steps of the battery capacity display processing method described in the first aspect above.
[0050] In a fifth aspect, an embodiment of the present application further provides an electrical device, including the electronic device described in the third aspect.
[0051] The beneficial effects of this application are:
[0052] The present application provides a battery capacity display processing method, device, electronic device and storage medium. When the actual capacity percentage is greater than or equal to the preset threshold, the display capacity percentage at the current moment is determined to be the preset display capacity percentage, and the preset display capacity percentage is displayed. That is, when the display capacity percentage at the current moment is different from the actual capacity percentage at the current moment, the preset display capacity percentage is forcibly displayed. This can avoid the user's misjudgment that the target battery cannot be charged at the actual capacity percentage, and mistakenly think that the target battery has a fault. If not, the preset display remaining capacity corresponding to the preset display capacity percentage is smoothed to obtain the display capacity percentage at the current moment, and the battery capacity is displayed based on the display capacity percentage at the current moment. The battery remaining capacity can be smoothed, thereby displaying the smoothed capacity percentage, avoiding the target battery capacity percentage displayed to the user during the discharge process from jumping, affecting the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0054] Figure 1 A flowchart of a battery capacity display processing method provided in an embodiment of the present application;
[0055] Figure 2A schematic diagram of a flow chart of another battery capacity display processing method provided in an embodiment of the present application;
[0056] Figure 3 A flowchart of another battery capacity display processing method provided in an embodiment of the present application;
[0057] Figure 4 A flowchart of another battery capacity display processing method provided in an embodiment of the present application;
[0058] Figure 5 A schematic diagram of a device for a battery capacity display processing method provided in an embodiment of the present application;
[0059] Figure 6 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0061] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0062] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0063] Optionally, the battery capacity display processing method provided in the embodiment of the present application is applied to an electronic device, which may be a terminal device with computing and display capabilities, such as a mobile phone, a tablet computer, a laptop computer, a PDA, a desktop computer, or a server. Specifically, it may be applied to an application in a terminal device, such as an application (APP) in a mobile phone, an application system on a computer, etc.
[0064] The specific implementation process of the battery capacity display processing provided in the embodiment of the present application is explained in detail below.
[0065] Figure 1 The present invention provides a flow chart of a battery capacity display processing method provided in an embodiment of the present invention, wherein the execution subject of the method is the aforementioned electronic device. Figure 1 As shown, the method includes:
[0066] S101. If the target battery is in a fully charged state and starts to discharge at the current moment, obtain the actual capacity percentage of the target battery at the current moment.
[0067] The target battery may be a laptop battery, a mobile phone battery, a tablet battery, etc.
[0068] The True Relative State of Charge (True RSOC) refers to the ratio of the True Reserve Capacity (True RC) of the target battery to the True Full Charge Capacity (True FCC) of the target battery. When the target battery is in a fully charged state, the True Relative State of Charge (True RSOC) of the target battery is 100%.
[0069] Optionally, when the target battery is in a fully charged state, the actual full charge capacity of the target battery during this charge and discharge can be obtained. When the target battery starts to discharge from a fully charged state, the actual remaining capacity at the current moment can be obtained, and the ratio of the actual remaining capacity at the current moment to the actual full charge capacity of the target battery during this charge and discharge is used as the actual capacity percentage at the current moment. The current moment refers to any moment when the target battery starts to discharge from the fully charged state.
[0070] S102: When the actual capacity percentage is greater than or equal to a preset threshold, determine the display capacity percentage at the current moment as a preset display capacity percentage, and display the preset capacity percentage.
[0071] The preset threshold value may be, for example, 95%, or other percentages, which are set according to actual conditions. The preset display capacity percentage may be 100%.
[0072] Among them, the display capacity percentage refers to the capacity percentage of the target battery displayed to the user on the display screen. The actual capacity percentage at the current moment and the display capacity percentage displayed to the user at the current moment may be the same or different. Among them, the display capacity percentage (Display Relative State of Charge, DisRSOC) refers to the ratio of the display remaining capacity (Display Reserve Capacity, TrueRC, DisRC) of the target battery to the display full charge capacity (True Full Charge Capacity, DisFCC) of the target battery. Among them, the display full charge capacity of the target battery is the same as the actual full charge capacity of the target battery.
[0073] Specifically, if the actual capacity percentage at the current moment is greater than or equal to the preset threshold, the display capacity percentage at the current moment is determined to be the preset display capacity percentage, and the preset display capacity percentage is displayed on the display screen.
[0074] Exemplarily, if the actual capacity percentage at the current moment is greater than or equal to the preset threshold, that is, TrueRSOC ≥ 95%, then the display capacity percentage at the current moment is determined to be 100%, that is, DisRSOC = 100%. In other words, when TrueRSOC ≥ 95%, the display capacity percentage is kept at 100%. For example, when the current moment is 97%, that is, TrueRSOC = 97%, the display capacity percentage displayed to the user on the display screen is 100%, that is, DisRSOC = 100%. If the actual capacity percentage at the current moment is 94%, that is, TrueRSOC = 94%, the display capacity percentage displayed to the user on the display screen is not 100%.
[0075] Compared with the prior art, when the actual capacity percentage is displayed, the target battery cannot be charged between 100% and 95%, causing the user to misjudge that the target battery is faulty, resulting in customer complaints. In this application, when the target battery starts to discharge when it is fully charged, before the actual capacity percentage drops to the preset threshold, the displayed capacity percentage displayed to the user is always the preset displayed capacity percentage, that is, the displayed capacity percentage is always 100%, so that the target battery is still displayed to the user at 100% to 95%. It avoids the user's misjudgment caused by the inability to charge within the actual capacity percentage range, reduces user complaints, and improves the user experience.
[0076] S103. When the actual capacity percentage is less than a preset threshold, smooth the preset displayed remaining capacity corresponding to the preset displayed capacity percentage to obtain the displayed capacity percentage at the current moment, and display the battery capacity based on the displayed capacity percentage at the current moment.
[0077] Optionally, the displayed capacity percentage is a ratio of the displayed remaining capacity to the displayed fully charged capacity. For a displayed capacity percentage corresponding to a displayed remaining capacity, a preset displayed capacity percentage also corresponds to a pre-displayed remaining capacity.
[0078] For example, if the actual capacity percentage at the current moment is 94%, that is, TrueRSOC = 94%, then the actual capacity percentage at the current moment is less than the preset threshold value of 95%, and the preset display remaining capacity corresponding to the preset display capacity percentage needs to be smoothed. For example, if the preset display capacity percentage is 100%, the displayed remaining capacity is equal to the displayed full charge capacity. If the displayed full charge capacity is 10Ah, the preset display remaining capacity corresponding to the preset display capacity percentage is also 10Ah. Then the preset display remaining capacity 10Ah is smoothed to obtain the display capacity percentage at the current moment, and the display capacity percentage at the current moment is displayed on the display screen.
[0079] In this embodiment, when the actual capacity percentage is greater than or equal to the preset threshold, the current display capacity percentage is determined to be the preset display capacity percentage, and the preset display capacity percentage is displayed. That is to say, when the current display capacity percentage is different from the actual capacity percentage at the current moment, the preset display capacity percentage is forcibly displayed, which can avoid the target battery being unable to charge at the actual capacity percentage, causing the user to misjudge that the target battery is faulty. If not, the preset display remaining capacity corresponding to the preset display capacity percentage is smoothed to obtain the current display capacity percentage, and the battery capacity is displayed based on the current display capacity percentage, which can realize the smoothing of the battery remaining capacity, thereby displaying the smoothed capacity percentage, and avoiding the jump of the capacity percentage of the target battery displayed to the user during the discharge process, which affects the user experience.
[0080] Figure 2 A flowchart of another battery capacity display processing method provided in an embodiment of the present application is shown as follows: Figure 2 As shown, in the above S103, the preset display remaining capacity corresponding to the preset display capacity percentage is smoothed to obtain the display capacity percentage at the current moment, which may include:
[0081] S201, obtaining a first displayed remaining capacity corresponding to a displayed capacity percentage at a previous moment of the current moment, a current actual remaining capacity corresponding to an actual capacity percentage at the current moment, and a current accumulated capacity at the current moment.
[0082] Optionally, as can be seen from the above, the displayed capacity percentage is the ratio of the displayed remaining capacity to the displayed fully charged capacity, and the displayed capacity percentage at each moment can correspond to the displayed remaining capacity at that moment. Similarly, the actual capacity percentage at each moment can also correspond to the actual remaining capacity at that moment. The current cumulative capacity can be directly obtained from the target battery.
[0083] Optionally, when the actual capacity percentage determined at the current moment for the first time is less than a preset threshold, that is, when the actual capacity percentage determined at the current moment for the first time is less than 95%, the display capacity at the previous moment of the current moment is the preset display capacity percentage, and the first displayed remaining capacity is the preset display remaining capacity corresponding to the preset display capacity percentage, that is, the displayed remaining capacity corresponding to the display capacity percentage of 100%, that is, the displayed full charge capacity. For other current moments after the first time, the first displayed remaining capacity is the display capacity percentage corresponding to the previous moment of the current moment, and the displayed remaining capacity at the previous moment is obtained by calculation.
[0084] The first displayed remaining capacity may be represented by, for example, lastRC, the current actual remaining capacity may be represented by, for example, current TrueRC, and the current accumulated capacity may be represented by, for example, accumulatedRC.
[0085] S202: Determine a smoothing time according to an average current of the target battery in the last discharge process.
[0086] Optionally, the target battery will obtain an average current in the discharge process each time from full charge to discharge. Specifically, the discharge current of the target battery in the discharge process can be collected at a preset interval, and then the average of the collected discharge currents is taken to obtain the average current in the discharge process. The average current can be represented by Average I Last Run, for example.
[0087] Optionally, the smoothing time is determined using a preset method according to the average current of the target battery in the last discharge process, and the determined smoothing time refers to the time for smoothing the preset displayed remaining capacity this time.
[0088] S203: Determine the display capacity percentage at the current moment according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current accumulated capacity, and the smoothing time.
[0089] Specifically, according to the preset display capacity percentage, the first remaining display capacity, the current actual remaining capacity, the current cumulative capacity, and the smoothing time T, the preset method can be used to determine the display capacity percentage at the current moment. Among them, the display capacity percentage at the current moment is represented by current DisRSOC.
[0090] Among them, the smoothing time refers to the time for smoothing the preset remaining display capacity corresponding to the preset display capacity percentage, that is, within this smoothing time, the smoothing of the preset remaining display capacity corresponding to the preset display capacity percentage is completed.
[0091] In this embodiment, when the actual capacity percentage of the target battery drops to the preset threshold, the preset remaining display capacity is smoothed, and the preset display capacity percentage is smoothed to the actual capacity percentage, avoiding the jump of the display capacity percentage and affecting the user experience.
[0092] In the above S202, determining the smoothing time according to the average current of the target battery during the previous discharge process may include:
[0093] If the average current of the target battery during the previous discharge process is greater than the first preset current threshold, the smoothing time is determined to be the first duration. Among them, the first preset current threshold can be, for example, 0.8C, and the first duration can be, for example, 120s. Then, if the average current of the target battery during the previous discharge process is greater than 0.8C, that is, Average I Last Run > 0.8C, the smoothing time is 120s, that is, it takes 120s to smooth the preset display capacity percentage to the actual capacity percentage of the target battery.
[0094] If the average current of the target battery during the previous discharge process is less than or equal to the first preset current threshold and greater than the second preset current threshold, the smoothing time is determined to be the second duration. Among them, the second preset current threshold can be, for example, 0.5C, and the second duration can be, for example, 300s. Then, if the average current of the target battery during the previous discharge process is 0.5C < Average I Last Run ≤ 0.8C, the smoothing time is 300s, that is, it takes 300s to smooth the preset display capacity percentage to the actual capacity percentage of the target battery. Among them, the first preset current threshold is greater than the second preset current threshold.
[0095] If the average current of the target battery during the last discharge process is less than or equal to the second preset current threshold, the smoothing time is determined to be the third duration. The third duration can be, for example, 600s. If the average current of the target battery during the last discharge process is 0.5C≤Average I Last Run, the smoothing time is 600s, that is, 600s is used to smooth the preset display capacity percentage to the actual capacity percentage of the target battery. Among them, the first duration is less than the second duration, and the second duration is less than the third duration.
[0096] Figure 3 A flowchart of another battery capacity display processing method provided in an embodiment of the present application is shown as follows: Figure 3 As shown, the above S203, determining the display capacity percentage at the current moment according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current accumulated capacity and the smoothing time, may include:
[0097] S301, determining a second display remaining capacity according to a preset display capacity percentage, a first display remaining capacity, a current actual remaining capacity, a current cumulative capacity and a smoothing time.
[0098] The second displayed remaining capacity refers to the displayed remaining capacity at the current moment.
[0099] Specifically, the second display remaining capacity can be determined according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current accumulated capacity and the smoothing time using a preset method. That is, the current DisRC can be determined according to the preset display capacity percentage, lastRC, current TrueRC, accumulatedRC and T using a preset method.
[0100] S302: Determine the display capacity percentage at the current moment according to the second display remaining capacity and the display full charge capacity.
[0101] Specifically, after determining the second displayed remaining capacity at the current moment in the above S301, the displayed capacity percentage at the current moment can be determined using a preset method according to the second displayed remaining capacity and the displayed full charge capacity. The displayed full charge capacity refers to the displayed remaining capacity corresponding to the displayed capacity percentage of 100%.
[0102] Among them, the displayed full charge capacity is the same as the actual full charge capacity, both of which refer to the full charge capacity during the current target battery charging and discharging, and can be obtained when the current target battery is in a fully charged state.
[0103] Figure 4 A flowchart of another battery capacity display processing method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, the above S301, determining the second display remaining capacity according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current cumulative capacity and the smoothing time, may include:
[0104] S401. Calculate the difference between the displayed remaining capacity corresponding to the preset displayed capacity percentage and the current actual remaining capacity to obtain a first parameter.
[0105] Optionally, since the preset display capacity percentage is 100%, the displayed remaining capacity corresponding to the preset display capacity percentage is the displayed full charge capacity, and the displayed full charge capacity is DisFCC.
[0106] Specifically, the first parameter=DisFCC-current TrueRC, wherein DisFCC is the displayed remaining capacity corresponding to the preset display capacity percentage, and current TrueRC is the current actual remaining capacity.
[0107] S402: Divide the first parameter by the smoothing time to obtain a second parameter.
[0108] The first parameter is obtained by the aforementioned step S401, specifically, the first parameter is DisFCC-currentTrueRC, and the second parameter is obtained by dividing the first parameter by the smoothing time, specifically, the second parameter = (DisFCC-current TrueRC) / T. T is the smoothing time, DisFCC is the displayed remaining capacity corresponding to the preset display capacity percentage, and current TrueRC is the current actual remaining capacity.
[0109] S403: Subtract the second parameter from the first displayed remaining capacity to obtain a third parameter, and subtract the current accumulated capacity from the third parameter to obtain a second displayed remaining capacity.
[0110] Specifically, the third parameter = last DisRC-(DisFCC-current TrueRC) / T, where last DisRC is the first displayed remaining capacity. It is worth noting that when it is determined for the first time that the current displayed capacity percentage is less than the preset threshold, the first displayed remaining capacity corresponding to the display capacity percentage of the previous moment of the current moment is the displayed full capacity, that is, DisFCC. For other display capacity percentages of the previous moment of the current moment after the first time, the first displayed remaining capacity corresponding to the display capacity percentage is the displayed remaining capacity at the previous moment calculated by the following formula (I).
[0111] current DisRC=last DisRC-(DisFCC-current TrueRC) / T-accumulatedRC formula (1)
[0112] Among them, current DisRC is the second display remaining capacity, last DisRC is the first display remaining capacity corresponding to the previous moment, DisFCC is the display remaining capacity corresponding to the preset display capacity percentage, current TrueRC is the current actual remaining capacity, T is the smoothing time, and accumulatedRC is the current accumulated capacity.
[0113] For example, if the smoothing time is 120 seconds, the above formula (I) can be used to smooth the preset display capacity percentage of 100% within 120 seconds to the actual capacity percentage at the time of 120 seconds.
[0114] For example, if the smoothing time is 300 seconds, the above formula (I) can be used to smooth the preset display capacity percentage 100% within 300 seconds to the actual capacity percentage at the 300th second.
[0115] For example, if the smoothing time is 600 seconds, the above formula (I) can be used to smooth the preset display capacity percentage 100% within 600 seconds to the actual capacity percentage at the 600th second.
[0116] In this embodiment, when the actual capacity percentage of the target battery is less than a preset threshold, the preset display capacity percentage is smoothed within a smoothing time so that the preset display capacity percentage can be smoothly displayed to the actual capacity percentage of the target battery within the smoothing time, thereby avoiding a jump in the display capacity percentage of the target battery, thereby affecting the user experience.
[0117] Optionally, the above S302, determining the display capacity percentage at the current moment according to the second display remaining capacity and the display fully charged capacity, may include:
[0118] Specifically, the second displayed remaining capacity is divided by the displayed full charge capacity to obtain the displayed capacity percentage at the current moment. The second displayed remaining capacity can be obtained according to the above step S301, and the displayed full charge capacity refers to the displayed remaining capacity corresponding to the displayed capacity percentage of 100%, that is, DisFCC. After obtaining the second displayed remaining capacity at the current moment, the value of the second displayed remaining capacity divided by DisFCC is used as the displayed capacity percentage at the current moment. After obtaining the displayed capacity percentage at the current moment, the displayed capacity percentage can be displayed on the display screen of the electrical device.
[0119] Figure 5 A schematic diagram of a battery capacity display processing method provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the device comprises:
[0120] An acquisition module 501 is used to acquire the actual capacity percentage of the target battery at the current moment if the target battery is in a fully charged state and starts to discharge at the current moment;
[0121] A determination module 502, configured to determine, when the actual capacity percentage is greater than or equal to a preset threshold, that the display capacity percentage at the current moment is a preset display capacity percentage, and display the preset display capacity percentage;
[0122] The smoothing processing module 503 is used to smooth the preset displayed remaining capacity corresponding to the preset displayed capacity percentage when the actual capacity percentage is less than the preset threshold value, obtain the displayed capacity percentage at the current moment, and display the battery capacity based on the displayed capacity percentage at the current moment.
[0123] Optionally, the smoothing processing module 503 includes:
[0124] The first acquisition unit 5031 is used to acquire the first displayed remaining capacity corresponding to the displayed capacity percentage at the previous moment of the current moment, the current actual remaining capacity corresponding to the actual capacity percentage at the current moment, and the current accumulated capacity at the current moment;
[0125] A first determining unit 5032, configured to determine a smoothing time according to an average current of the target battery in a previous discharge process;
[0126] The second determining unit 5033 is used to determine the display capacity percentage at the current moment according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current cumulative capacity and the smoothing time. Optionally, the first determining unit 5032 is specifically used to:
[0127] If the average current of the target battery in the last discharge process is greater than a first preset current threshold, determining the smoothing time to be a first duration;
[0128] If the average current of the target battery in the last discharge process is less than or equal to the first preset current threshold and greater than the second preset current threshold, determine the smoothing time to be a second duration;
[0129] If the average current of the target battery during the last discharge process is less than or equal to the second preset current threshold, the smoothing time is determined to be a third duration, wherein the first duration is less than the second duration, and the second duration is less than the third duration.
[0130] Optionally, the second determining unit 5033 is specifically configured to:
[0131] determining a second display remaining capacity according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current cumulative capacity, and the smoothing time;
[0132] The displayed capacity percentage at the current moment is determined according to the second displayed remaining capacity and the displayed fully charged capacity.
[0133] Optionally, the second determining unit 5033 is specifically configured to:
[0134] Calculate the difference between the displayed remaining capacity corresponding to the preset displayed capacity percentage and the current actual remaining capacity to obtain a first parameter;
[0135] Dividing the first parameter by the smoothing time to obtain a second parameter;
[0136] The first displayed remaining capacity is subtracted from the second parameter to obtain a third parameter, and the third parameter is subtracted from the current accumulated capacity to obtain the second displayed remaining capacity.
[0137] Optionally, the second determining unit 5033 is specifically configured to:
[0138] The second displayed remaining capacity is divided by the displayed full charge capacity to obtain the displayed capacity percentage at the current moment.
[0139] Figure 6 This is a structural frame of an electronic device 600 provided in an embodiment of the present application. Figure 6 As shown, the electronic device may include: a processor 601 and a memory 602. Optionally, a bus 603 may also be included, wherein the memory 602 is used to store machine-readable instructions executable by the processor 601. When the electronic device 600 is running, the processor 601 communicates with the memory 602 through the bus 603, and when the machine-readable instructions are executed by the processor 601, the method steps in the above method embodiment are executed.
[0140] The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method steps in the above-mentioned battery capacity display processing method embodiment are executed.
[0141] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0142] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function 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-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.
[0143] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A battery capacity display processing method, characterized in that: The method comprises: If the target battery is in a fully charged state and starts to discharge at the current moment, obtain the actual capacity percentage of the target battery at the current moment; In the case where the actual capacity percentage is greater than or equal to a preset threshold, determining the display capacity percentage at the current moment as a preset display capacity percentage, and displaying the preset display capacity percentage; When the actual capacity percentage is less than a preset threshold, the preset displayed remaining capacity corresponding to the preset displayed capacity percentage is smoothed to obtain the displayed capacity percentage at the current moment, and the battery capacity is displayed based on the displayed capacity percentage at the current moment.
2. The battery capacity display processing method according to claim 1, characterized in that: The smoothing of the preset display remaining capacity corresponding to the preset display capacity percentage to obtain the display capacity percentage at the current moment includes: Obtaining a first displayed remaining capacity corresponding to a displayed capacity percentage at a previous moment of the current moment, a current actual remaining capacity corresponding to an actual capacity percentage at the current moment, and a current accumulated capacity at the current moment; Determine the smoothing time according to the average current of the target battery during the last discharge process; The display capacity percentage at the current moment is determined according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current accumulated capacity, and the smoothing time.
3. The battery capacity display processing method according to claim 2, characterized in that: The step of determining the smoothing time according to the average current of the target battery in the last discharge process includes: If the average current of the target battery in the last discharge process is greater than a first preset current threshold, determining the smoothing time to be a first duration; If the average current of the target battery in the last discharge process is less than or equal to the first preset current threshold and greater than the second preset current threshold, determine the smoothing time to be a second duration; If the average current of the target battery during the last discharge process is less than or equal to the second preset current threshold, the smoothing time is determined to be a third duration, wherein the first duration is less than the second duration, and the second duration is less than the third duration.
4. The battery capacity display processing method according to claim 2, characterized in that: The determining the display capacity percentage at the current moment according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current cumulative capacity, and the smoothing time includes: determining a second display remaining capacity according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current cumulative capacity, and the smoothing time; The displayed capacity percentage at the current moment is determined according to the second displayed remaining capacity and the displayed fully charged capacity.
5. The battery capacity display processing method according to claim 4, characterized in that: The determining the second display remaining capacity according to the preset display capacity percentage, the first display remaining capacity, the current actual remaining capacity, the current cumulative capacity and the smoothing time includes: Calculate the difference between the displayed remaining capacity corresponding to the preset displayed capacity percentage and the current actual remaining capacity to obtain a first parameter; Dividing the first parameter by the smoothing time to obtain a second parameter; The first displayed remaining capacity is subtracted from the second parameter to obtain a third parameter, and the third parameter is subtracted from the current accumulated capacity to obtain the second displayed remaining capacity.
6. The battery capacity display processing method according to claim 4, characterized in that: The determining the display capacity percentage at the current moment according to the second display remaining capacity and the display full charge capacity includes: The second displayed remaining capacity is divided by the displayed full charge capacity to obtain the displayed capacity percentage at the current moment.
7. A battery capacity display processing device, characterized in that: include: An acquisition module, used for acquiring the actual capacity percentage of the target battery at the current moment if the target battery is in a fully charged state and starts to discharge at the current moment; a determination module, which determines the display capacity percentage at the current moment as a preset display capacity percentage when the actual capacity percentage is greater than or equal to a preset threshold value, and displays the preset display capacity percentage; A smoothing processing module is used to smooth the preset displayed remaining capacity corresponding to the preset displayed capacity percentage when the actual capacity percentage is less than a preset threshold value, obtain the displayed capacity percentage at the current moment, and display the battery capacity based on the displayed capacity percentage at the current moment.
8. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program executable by the processor, and the processor implements the steps of the battery capacity display processing method according to any one of claims 1 to 6 when executing the computer program.
9. An electrical device, characterized in that: The electronic device comprising the electronic device described in claim 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the battery capacity display processing method according to any one of claims 1 to 6 are executed.