Power display method and related device

By using the step-down gear and cycle number before the battery meter chip gets the aging coefficient from the AP, the problem of difference in power display after the electronic device is restarted is solved, and the user experience is improved.

CN117707879BActive Publication Date: 2024-11-19HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310952141.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-28
Publication Date
2024-11-19
Estimated Expiration
2043-07-28

AI Technical Summary

Technical Problem

There is a large difference in the power displayed before and after the electronic device restarts, which affects the user experience.

Method used

Before the battery meter chip obtains the aging coefficient from the AP, the power calculation is performed through the step-down gear and the number of cycles to ensure that the power display is related to the aging degree and reduce the probability of the power jump before and after restarting.

Benefits of technology

It effectively reduces the jump in the power display before and after the electronic device restarts, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117707879B_ABST
    Figure CN117707879B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method for displaying power and a related device, which are applied to the field of terminal technology. The method is applied to an electronic device, which includes an application processor AP and a power meter chip, and the AP is provided with an aging coefficient of the electronic device. The method includes: at a first moment, the electronic device is turned on, and the power meter chip obtains a first power, which is related to the number of cycles of the battery and the voltage reduction gear of the electronic device, and has nothing to do with the aging coefficient; at a second moment, the power meter chip transmits the first power to the AP, so that the electronic device displays the first power; at a third moment, the power meter chip obtains a second power; the second power is related to the aging coefficient, and the aging coefficient is obtained by the power meter chip from the AP between the first moment and the third moment; at a fourth moment, the power meter chip transmits the second power to the AP, so that the electronic device displays the second power. In this way, the probability of a jump in the power displayed before and after the electronic device is restarted can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a power display method and related devices. Background Art

[0002] Some electronic devices can display the power level. The power level displayed by the electronic device indicates the remaining power level of the electronic device. In a possible implementation, when a user restarts the electronic device, the power level displayed before the electronic device restarts is significantly different from the power level displayed after the electronic device restarts.

[0003] The jump in the battery level displayed before and after the electronic device is restarted may reduce the user's experience of using the electronic device. Summary of the invention

[0004] The embodiment of the present application provides a power display method and related devices, which are applied to the field of terminal technology. Before the power meter chip obtains the aging coefficient from the AP, the power calculation is performed on the voltage reduction gear and the number of cycles. Since the voltage reduction gear and the number of cycles can also reflect the aging degree of the battery, the calculated power is related to the aging degree. Before the electronic device is restarted, the power displayed by the electronic device is related to the aging coefficient. The aging coefficient can reflect the aging degree of the battery of the electronic device. In this way, the power displayed before and after the electronic device is restarted is related to the aging degree, thereby making the difference between the power displayed before and after the electronic device is restarted smaller, reducing the probability of a jump in the power displayed before and after the electronic device is restarted.

[0005] In a first aspect, an embodiment of the present application proposes a method for displaying power, which is applied to an electronic device. The electronic device includes an application processor AP and a power meter chip. The AP is provided with an aging coefficient of the electronic device. The method includes: at a first moment, the electronic device is turned on, and the power meter chip obtains a first power. The first power is related to the number of cycles of the battery and the voltage reduction gear of the electronic device, and has nothing to do with the aging coefficient of the electronic device set in the AP. At a second moment, the power meter chip transmits the first power to the AP, so that the electronic device displays the first power. The second moment is later than the first moment. At a third moment, the power meter chip obtains a second power. The second power is related to the aging coefficient of the electronic device set in the AP, and the aging coefficient is obtained by the power meter chip from the AP between the first moment and the third moment. The third moment is later than the second moment. At a fourth moment, the power meter chip transmits the second power to the AP, so that the electronic device displays the second power. The fourth moment is later than the third moment.

[0006] In this way, when the electronic device is turned on, before the fuel gauge chip obtains the aging coefficient from the AP, the fuel gauge chip cannot obtain the aging coefficient because there is no aging coefficient in the register. The fuel gauge chip can only obtain the power according to the number of battery cycles and the voltage reduction gear of the electronic device. The first power obtained by the fuel gauge chip can be as followsFigure 4 The UI displayed power calculation 3211 in the embodiment obtains the UI displayed power, and the number of battery cycles and the voltage reduction gear of the electronic device can reflect the degree of aging of the battery. Therefore, the first power is related to the degree of aging of the battery, but has nothing to do with the aging coefficient. The first power is also irrelevant to the aging coefficient of the electronic device set in the AP. Because the power displayed by the electronic device is obtained based on the aging coefficient before the electronic device is turned off, when the electronic device is turned on, the power is obtained based on the number of battery cycles and the voltage reduction gear of the electronic device before the power meter chip obtains the aging coefficient from the AP for display in subsequent electronic devices, which can reduce the probability of power jumps before and after the electronic device is restarted. After the power meter chip obtains the aging coefficient from the AP, the power meter chip can obtain the power based on the aging coefficient, and the second power obtained by the power meter chip can be as follows. Figure 6 In the embodiment, the UI displayed power calculation 3211 obtains the UI displayed power, and the aging coefficient also reflects the degree of battery aging. In this way, the probability of a jump in the power displayed on the electronic device before and after the power meter chip obtains the aging coefficient from the AP can be reduced, and the probability of a jump in the power displayed on the electronic device after the electronic device is turned on can be reduced. Therefore, the power display method provided in this embodiment can reduce the probability of a jump in the power before and after the electronic device is restarted, and can also reduce the probability of a jump in the power displayed on the electronic device after the electronic device is turned on, thereby improving the user experience of the electronic device.

[0007] In a possible implementation, the first power is calculated based on the target result and the actual power of the electronic device. The target result characterizes the degree of aging of the battery, and the target result satisfies the following conditions: when the voltage reduction gear of the electronic device is the first voltage reduction gear, the target result is a first value, and the first value is a fixed value. When the voltage reduction gear of the electronic device is the second voltage reduction gear, the target result is a second value. The first value is greater than the second value, and the second value is a value that changes in the second voltage reduction gear according to the increase in the number of cycle periods, and the number of cycle periods of the second voltage reduction gear is greater than the number of cycle periods of the first voltage reduction gear.

[0008] In this way, it is possible to use the target result to correct the actual power and obtain the power displayed by the electronic device. Since the number of cycles of the second step-down gear is greater than that of the first step-down gear, when the electronic device is in the first step-down gear, the number of cycles of the electronic device is relatively small, indicating that the battery aging degree is low and the impact on the battery charging is relatively small. The correction of the actual power can be corrected with a fixed value, so the target result can be a fixed value. As the number of cycles of the electronic device increases, the degree of battery aging becomes higher and higher, and the impact on the battery charging increases. Therefore, when the electronic device is in the second step-down gear, the target result changes with the increase of the number of cycles in the second step-down gear, and the correction amplitude of the actual power corrected by using the target result also changes with the increase of the number of cycles, which can improve the user experience of the electronic device.

[0009] In a possible implementation, the second value is related to the minimum number of cycles corresponding to the second step-down gear, the aging value of the minimum number of cycles corresponding to the second step-down gear, the ratio value of the second step-down gear, and the number of cycles of the electronic device. The aging value represents the aging degree of the battery, and the ratio value of the second step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycles in the second step-down gear.

[0010] In this way, in the second voltage reduction gear, according to the minimum number of cycles corresponding to the second voltage reduction gear, the number of cycles of the electronic device, the aging value of the minimum number of cycles corresponding to the second voltage reduction gear, and the aging degree change rate of the battery, a target result matching the aging degree change rate can be obtained. The actual power level is corrected using the target result, which can improve the user experience of the electronic device.

[0011] In a possible implementation, the second value satisfies the following formula:

[0012] ε 1,p =ε1-k1×(c p -c1)

[0013] Among them, ε 1,p is the second value, ε1 is the aging value of the minimum number of cycles corresponding to the second voltage reduction gear, k1 is the proportional value of the second voltage reduction gear, c p is the cycle number of the electronic device, and c1 is the minimum cycle number corresponding to the second step-down gear.

[0014] In this way, in the second step-down gear, the target result is positively correlated with the aging value of the minimum number of cycles corresponding to the second step-down gear and the minimum number of cycles corresponding to the second step-down gear, and the target result is negatively correlated with the number of cycles of the electronic device and the rate of change of the aging degree of the battery in the second gear.

[0015] In a possible implementation, ε1 satisfies the following formula:

[0016] ε1=ε0-k0×(c1-c0)

[0017] Among them, k0 is the proportional value of the first step-down gear, k0 represents the rate at which the aging degree of the battery deepens with the increase of the number of cycle cycles in the first step-down gear, ε0 is the aging value of the minimum number of cycle cycles corresponding to the first step-down gear, ε0 is equal to the first value, and c0 is the minimum number of cycle cycles corresponding to the first step-down gear.

[0018] In this way, in the second step-down gear, the aging value of the minimum number of cycle periods corresponding to the second step-down gear is negatively correlated with the aging value of the minimum number of cycle periods corresponding to the previous step-down gear of the electronic device (i.e., the first step-down gear) and the minimum number of cycle periods corresponding to the previous step-down gear of the electronic device, and the aging value of the minimum number of cycle periods corresponding to the second step-down gear is negatively correlated with the rate of change of the aging degree of the electronic device in the previous step-down gear and the minimum number of cycle periods corresponding to the second step-down gear.

[0019] From the above, it can be seen that in the second voltage reduction gear, the target result can be matched with the aging degree of the battery, thereby reducing the probability of the display power jump before and after the electronic device is restarted, and reducing the probability of the display power jump of the electronic device after the electronic device is restarted.

[0020] In a possible implementation, when the voltage reduction gear of the electronic device is the third voltage reduction gear, the target result is a third value. The second value is greater than the third value, the third value is a value that changes in the third voltage reduction gear according to an increase in the number of cycles, and the number of cycles of the third voltage reduction gear is greater than the number of cycles of the second voltage reduction gear.

[0021] In this way, as the number of cycles of the electronic device continues to increase, the degree of battery aging becomes higher and higher, and the impact on the battery charging increases. Therefore, when the electronic device is in the third step-down gear, the target result changes with the increase of the number of cycles in the third step-down gear. In this way, the correction amplitude of the actual power using the target result also changes with the increase of the number of cycles, which can improve the user experience of the electronic device.

[0022] In a possible implementation, the third value is related to the minimum number of cycles corresponding to the third step-down gear, the aging value of the minimum number of cycles corresponding to the third step-down gear, the ratio value of the third step-down gear, and the number of cycles of the electronic device. Among them, the aging value of the minimum number of cycles corresponding to the third step-down gear is related to the aging value of the minimum number of cycles corresponding to the second step-down gear, the aging value of the minimum number of cycles corresponding to the first step-down gear, the ratio value of the first step-down gear, the minimum number of cycles corresponding to the second step-down gear, the minimum number of cycles corresponding to the first step-down gear, the ratio value of the second step-down gear, and the minimum number of cycles corresponding to the third step-down gear. The aging value represents the aging degree of the battery, the proportional value of the third step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycle cycles in the third step-down gear, the proportional value of the first step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycle cycles in the first step-down gear, the proportional value of the second step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycle cycles in the second step-down gear, and the aging value of the first step-down gear corresponding to the minimum number of cycle cycles is equal to the first value.

[0023] In this way, in the third step-down gear, the target result can be obtained based on the aging value of the minimum number of cycles corresponding to the third step-down gear, the minimum number of cycles corresponding to the third step-down gear, the number of cycles of the electronic device and the aging degree change rate of the battery in the third step-down gear, without using the aging coefficient, and then the power related to the aging degree is obtained, reducing the probability of power jumps displayed before and after the electronic device is restarted.

[0024] In a possible implementation, the third value satisfies the following formula:

[0025]

[0026] Among them, ε1 is the aging value of the minimum number of cycles corresponding to the second step-down gear, ε0 is the aging value of the minimum number of cycles corresponding to the first step-down gear, k0 is the proportional value of the first step-down gear, ε0 is equal to the first value, c1 is the minimum number of cycles corresponding to the second step-down gear, c0 is the minimum number of cycles corresponding to the first step-down gear, k1 is the proportional value of the second step-down gear, ε 2,p is the third value, ε2 is the aging value of the minimum number of cycles corresponding to the third step-down gear, k2 is the proportional value of the third step-down gear, c p is the cycle number of the electronic device, and c2 is the minimum cycle number corresponding to the third step-down gear.

[0027] In this way, in the third voltage reduction gear, the target result is positively correlated with the aging value of the minimum number of cycles corresponding to the third voltage reduction gear and the minimum number of cycles corresponding to the third voltage reduction gear, and the target result is negatively correlated with the number of cycles of the electronic device and the rate of change of the aging degree of the battery in the third voltage reduction gear, wherein, in the third voltage reduction gear, the aging value of the minimum number of cycles corresponding to the third voltage reduction gear is negatively correlated with the aging value of the minimum number of cycles corresponding to the previous voltage reduction gear (i.e., the second voltage reduction gear) of the electronic device and the minimum number of cycles corresponding to the previous voltage reduction gear of the electronic device, and the aging value of the minimum number of cycles corresponding to the third voltage reduction gear is negatively correlated with the rate of change of the aging degree in the previous voltage reduction gear of the electronic device and the minimum number of cycles corresponding to the third voltage reduction gear, thereby achieving that in the third voltage reduction gear, the target result matches the aging degree of the battery, thereby reducing the probability of a jump in the displayed power before and after the electronic device is restarted, and reducing the probability of a jump in the displayed power after the electronic device is restarted.

[0028] In a possible implementation, when the voltage reduction gear of the electronic device is the fourth voltage reduction gear, the target result is a fourth value. The third value is greater than the fourth value, the fourth value is a value that changes in the fourth voltage reduction gear according to the increase of the number of cycles, and the number of cycles of the fourth voltage reduction gear is greater than the number of cycles of the third voltage reduction gear. When the voltage reduction gear of the electronic device is the fifth voltage reduction gear, the target result is a fifth value. The fourth value is greater than the fifth value, the fifth value is a fixed value, and the number of cycles of the fifth voltage reduction gear is greater than the number of cycles of the fourth voltage reduction gear.

[0029] In this way, as the number of cycles of the electronic device increases, the degree of battery aging becomes higher and higher, and the impact on battery charging increases. Therefore, when the electronic device is in the fourth step-down gear, the target result changes with the increase of the number of cycles in the fourth step-down gear. In this way, the correction amplitude of the target result used to correct the actual power also changes with the increase of the number of cycles. As the number of cycles of the electronic device continues to increase, the degree of battery aging reaches the limit, and the battery aging tends to stabilize. The target result can be a fixed value. For example, when the step-down gear of the electronic device is the fifth step-down gear, the fifth value is a fixed value, so that the target result matches the degree of battery aging, thereby reducing the probability of a jump in the displayed power before and after the electronic device is restarted, and reducing the probability of a jump in the displayed power after the electronic device is restarted, thereby improving the user experience of the electronic device.

[0030] In a possible implementation, the fourth value is related to the minimum number of cycles corresponding to the fourth step-down gear, the aging value of the minimum number of cycles corresponding to the fourth step-down gear, the ratio of the fourth step-down gear, and the number of cycles of the electronic device. Among them, the aging value of the minimum number of cycles corresponding to the fourth step-down gear is related to the aging value of the minimum number of cycles corresponding to the third step-down gear, the ratio of the third step-down gear, the minimum number of cycles corresponding to the fourth step-down gear, the minimum number of cycles corresponding to the third step-down gear, the aging value of the minimum number of cycles corresponding to the second step-down gear, the aging value of the minimum number of cycles corresponding to the first step-down gear, the ratio of the first step-down gear, the minimum number of cycles corresponding to the second step-down gear, the minimum number of cycles corresponding to the first step-down gear, and the ratio of the second step-down gear. The aging value represents the aging degree of the battery, the proportional value of the fourth step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycle cycles in the fourth step-down gear, the proportional value of the third step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycle cycles in the third step-down gear, the proportional value of the first step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycle cycles in the first step-down gear, the proportional value of the second step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycle cycles in the second step-down gear, and the aging value of the first step-down gear corresponding to the minimum number of cycle cycles is equal to the first value.

[0031] In this way, in the fourth step-down gear, the target result can be obtained based on the aging value of the minimum number of cycles corresponding to the fourth step-down gear, the minimum number of cycles corresponding to the fourth step-down gear, the number of cycles of the electronic device and the aging degree change rate of the battery in the fourth step-down gear, without using the aging coefficient, and then the power related to the aging degree is obtained, reducing the probability of power jumps displayed before and after the electronic device is restarted.

[0032] In a possible implementation, at a fifth moment, the power meter chip transmits the voltage reduction gear of the electronic device to the AP. The fifth moment is later than the first moment. At a sixth moment, the AP transmits the aging coefficient corresponding to the voltage reduction gear of the electronic device to the power meter chip. The sixth moment is later than the fifth moment, and the sixth moment is earlier than the third moment.

[0033] In this way, the power meter chip can calculate the power according to the aging coefficient corresponding to the voltage reduction gear of the electronic device to display the power of the subsequent electronic device.

[0034] In a possible implementation, the electronic device further includes a register, and the method further includes: at a seventh moment, the power meter chip stores the voltage reduction gear of the electronic device in the register, and stores the aging coefficient corresponding to the voltage reduction gear in a static storage area of ​​the memory. The seventh moment is earlier than the first moment. At an eighth moment, the electronic device is turned off, and the static storage area does not contain the aging coefficient corresponding to the voltage reduction gear. The eighth moment is later than the seventh moment, and the eighth moment is earlier than the first moment.

[0035] In this way, when the available memory space of the register is small, the fuel meter chip obtains the step-down gear and the aging coefficient corresponding to the step-down gear from the AP. The fuel meter chip can store the step-down gear of the electronic device in the register, and store the aging coefficient corresponding to the step-down gear in the static storage area of ​​the memory. In this way, as long as the electronic device is not turned off, the fuel meter chip can calculate the power according to the aging coefficient corresponding to the step-down gear of the electronic device. If the electronic device is turned off, the aging coefficient in the static storage area is destroyed. Therefore, when the electronic device is turned off, the static storage area does not contain the aging coefficient corresponding to the step-down gear.

[0036] In a second aspect, an embodiment of the present application provides a method for displaying a power level, which is applied to an electronic device, wherein the electronic device includes an application processor AP, a power meter chip, and a register, wherein an aging coefficient of the electronic device is set in the AP, and a voltage reduction gear of the electronic device is stored in the register, and the method includes: at the ninth moment, the electronic device is turned on, and the electronic device displays a third power level. Starting from the ninth moment, within a preset duration, the voltage reduction gear stored in the register changes, and the electronic device displays a fourth power level. Starting from the ninth moment, after a preset duration, the voltage reduction gear stored in the register changes, and the electronic device displays a fourth power level. At the tenth moment, the electronic device is turned off. The tenth moment is later than the ninth moment. At the eleventh moment, the electronic device is turned on, and the electronic device displays a fifth power level. The eleventh moment is later than the tenth moment. Starting from the eleventh moment, within a preset duration, the voltage reduction gear stored in the register does not change, and the electronic device displays a fifth power level. Starting from the eleventh moment, after a preset duration, the voltage reduction gear stored in the register changes, and the electronic device displays a fifth power level.

[0037] In this way, at the ninth moment, the electronic device is turned on, and the electronic device displays the third power level, which is related to the voltage reduction gear of the electronic device and the number of cycles of the electronic device. It can be understood that the voltage reduction gear of the electronic device is stored in the register, and the third power level is also related to the voltage reduction gear stored in the register. Starting from the ninth moment, within the preset time, the power meter chip does not obtain the aging coefficient from the AP, then the power level displayed by the electronic device is related to the voltage reduction gear stored in the register. If the voltage reduction gear stored in the register changes, the power level also changes accordingly. Therefore, starting from the ninth moment, within the preset time, the voltage reduction gear stored in the register changes, and the electronic device displays the fourth power level. Starting from the ninth moment, within the preset time, if the voltage reduction gear stored in the register changes, for example, the voltage reduction gear stored in the register changes from voltage reduction gear A to voltage reduction gear B, the power meter chip can change the voltage reduction gear according to Figure 6 In the embodiment, steps S601-S603 transmit the voltage reduction gear (i.e., voltage reduction gear B) stored in the register to the AP, and the power meter chip can Figure 6 In the embodiment, steps S604-S606 obtain the aging coefficient corresponding to the voltage reduction gear B from the AP. Starting from the ninth moment, after a preset time, if the voltage reduction gear stored in the register changes, for example, the voltage reduction gear stored in the register changes from the voltage reduction gear B to the voltage reduction gear C, the power meter chip still calculates the power according to the aging coefficient obtained from the AP. The process of obtaining the power is as follows: Figure 6 As shown in steps S607-S610 of the embodiment, the aging coefficient obtained by the power meter chip from the AP is only related to the voltage reduction gear B transmitted by the power meter chip to the AP. In this way, the power obtained by the power meter chip is independent of the voltage reduction gear C stored in the register after the power meter chip transmits the voltage reduction gear to the AP. Therefore, after the power meter chip transmits the voltage reduction gear to the AP, if the voltage reduction gear stored in the register changes, the electronic device can still obtain the fourth power according to the obtained aging coefficient. The fourth power can be Figure 6 The UI in the embodiment displays the power level, so that the electronic device can Figure 6Steps S611-S615 in the embodiment display the fourth power level. Starting from the ninth moment, after a preset time, after the power meter chip obtains the aging coefficient corresponding to the voltage reduction gear stored in the register from the AP, the power meter chip can store the aging coefficient corresponding to the voltage reduction gear in the general storage space of the register. At the tenth moment, the electronic device is turned off, and the aging coefficient stored in the static storage area is destroyed. At the eleventh moment, the electronic device is turned on, and the electronic device can display the fifth power level, which is related to the voltage reduction gear stored in the register. Starting from the eleventh moment, within the preset time, the power meter chip does not obtain the aging coefficient from the AP, and the power level displayed by the electronic device is still related to the voltage reduction gear stored in the register. If the voltage reduction gear stored in the register does not change, the electronic device can still display the fifth power level. Starting from the eleventh moment, after a preset time, after the power meter chip transmits the voltage reduction gear stored in the register to the AP, if the voltage reduction gear stored in the register changes, the electronic device can still display the fifth power level.

[0038] In a third aspect, an embodiment of the present application further provides a method for displaying a power level, which is applied to an electronic device, wherein the electronic device includes an application processor AP, a power meter chip, and a register, wherein an aging coefficient of the electronic device is set in the AP, and a voltage reduction gear of the electronic device is stored in the register. The method may include: at the twelfth moment, the electronic device is turned on, and the electronic device displays the sixth power level. Starting from the twelfth moment, within the preset duration, the voltage reduction gear stored in the register changes, and the electronic device displays the seventh power level. Starting from the twelfth moment, after the preset duration, the voltage reduction gear stored in the register changes, and the electronic device displays the sixth power level. At the thirteenth moment, the electronic device is turned off. The thirteenth moment is later than the twelfth moment. At the fourteenth moment, the electronic device is turned on, and the electronic device displays the eighth power level. The fourteenth moment is later than the thirteenth moment. Starting from the fourteenth moment, within the preset duration, the voltage reduction gear stored in the register does not change, and the electronic device displays the eighth power level. Starting from the fourteenth moment, after the preset duration, the voltage reduction gear stored in the register changes, and the electronic device displays the eighth power level.

[0039] Thus, starting from the twelfth moment, within the preset time, the fuel gauge chip can Figure 6 In the embodiment, steps S601-S603 transmit the voltage reduction gear (e.g., voltage reduction gear A) stored in the register to the AP, so that the power meter chip can be based on Figure 6In the embodiment, steps S604-S606 obtain the aging coefficient corresponding to the voltage reduction gear A from the AP. Starting from the twelfth moment, within the preset time, after the power meter chip transmits the voltage reduction gear A to the AP, if the voltage reduction gear stored in the register changes, for example, the voltage reduction gear stored in the register changes from the voltage reduction gear A to the voltage reduction gear B, and starting from the twelfth moment, after the preset time, if the voltage reduction gear stored in the register changes again, for example, the voltage reduction gear stored in the register changes from the voltage reduction gear B to the voltage reduction gear C, the power meter chip still calculates the power according to the aging coefficient obtained from the AP, and the process of obtaining the power is as follows: Figure 6 As shown in steps S607-S610 of the embodiment, the aging coefficient obtained by the power meter chip from the AP is only related to the voltage reduction gear A transmitted by the power meter chip to the AP. In this way, the power obtained by the power meter chip is independent of the voltage reduction gear stored in the register after the power meter chip transmits the voltage reduction gear to the AP. Therefore, after the power meter chip transmits the voltage reduction gear to the AP, if the voltage reduction gear stored in the register changes, the electronic device can still obtain the sixth power according to the obtained aging coefficient. The sixth power can be Figure 6 The UI in the embodiment displays the power level, so that the electronic device can Figure 6 Steps S611-S615 in the embodiment display the fourth power. Starting from the fourteenth moment, after a preset time, after the power meter chip transmits the voltage reduction gear to the AP, if the voltage reduction gear stored in the register changes, the electronic device can still display the eighth power. Starting from the fourteenth moment, after a preset time, the voltage reduction gear stored in the register changes, and the specific implementation principle of the electronic device displaying the eighth power is similar to the specific implementation principle of the electronic device displaying the eighth power from the fourteenth moment, within the preset time, the voltage reduction gear stored in the register does not change, and the electronic device displays the eighth power, which will not be repeated.

[0040] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory. The memory stores computer-executable instructions. The processor is configured to execute the computer-executable instructions stored in the memory, so that the electronic device performs the method of the first aspect, or the method of the second aspect or the third aspect.

[0041] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method of the first aspect, or when the computer program is executed by a processor, it implements the method of the second aspect or the third aspect.

[0042] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed, enables a computer to execute the method of the first aspect, or enables a computer to execute a method of the second aspect or the third aspect.

[0043] In a seventh aspect, an embodiment of the present application provides a chip, which is used to call a computer program in a memory to execute the steps performed by the power meter chip in the method of the first aspect, or to execute the steps performed by the AP in the method of the first aspect.

[0044] It should be understood that the fourth to seventh aspects of the present application correspond to the technical solutions of the first, second or third aspects of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A hardware schematic diagram of an electronic device in a possible implementation;

[0046] Figure 2 A comparison chart of the power display before and after the electronic device is restarted in a possible implementation;

[0047] Figure 3 A software architecture diagram of an electronic device provided in an embodiment of the present application;

[0048] Figure 4 A module interaction flow chart provided for an embodiment of the present application;

[0049] Figure 5 A schematic diagram of the corresponding relationship between the number of cycle periods and the target result provided in the embodiment of the present application;

[0050] Figure 6 Another module interaction flow chart provided for an embodiment of the present application;

[0051] Figure 7 A comparison chart of the power display before and after the electronic device is restarted provided in an embodiment of the present application;

[0052] Figure 8 A schematic diagram of the power display process provided in an embodiment of the present application;

[0053] Fig. 9 A schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:

[0055] 1. Electronic equipment

[0056] The electronic device of the embodiment of the present application may include a handheld device, a vehicle-mounted device, etc. with an image processing function. For example, some electronic devices are: mobile phones, tablet computers, PDAs, laptop computers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices (such as vehicle computers), wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks (public land mobile The embodiments of the present application do not limit this.

[0057] As an example but not limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as hearing aids, glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.

[0058] In addition, in the embodiments of the present application, the electronic device can also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network that interconnects people and machines and things.

[0059] The electronic devices in the embodiments of the present application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.

[0060] In an embodiment of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux operating systems, Unix operating systems, Android operating systems, iOS operating systems, or Windows operating systems. The application layer includes applications such as cameras, browsers, address books, word processing software, and instant messaging software.

[0061] 2. Number of full charge and discharge cycles of the battery

[0062] In the embodiment of the present application, the number of full charge and discharge cycles of the battery is also referred to as the number of cycles of the battery. The number of cycles can be represented by a cycle value, and the cycle value can be increased by 1 each time the battery completes a full charge and discharge cycle. When the cumulative charge power of the battery is equal to 100% of the power, and the cumulative discharge power of the battery is equal to 100% of the power, it can be determined that the battery has completed a full charge and discharge cycle.

[0063] For example, during the use of an electronic device, 70% of the battery power is used on the first day, and 30% of the battery power is used on the second day. The cumulative discharge power of the battery on the first and second days is equal to 100%. After the power is used up, the battery is charged 50% on the third day, and the battery is charged another 50% on the fourth day. The cumulative charge power of the battery on the third and fourth days is equal to 100%. The above process can be considered as a full charge and discharge of the battery.

[0064] 3. Charging cut-off power

[0065] In the embodiment of the present application, the charging cut-off power can be understood as the total power charged into the battery when charging of the battery is stopped.

[0066] It can be understood that the charging cut-off capacity is related to the charging cut-off current and / or the charging cut-off voltage, wherein the charging cut-off capacity may increase with an increase in the charging cut-off voltage, and may increase with a decrease in the charging cut-off current; conversely, the charging cut-off capacity may decrease with a decrease in the charging cut-off voltage, and may decrease with an increase in the charging cut-off current.

[0067] 4. Battery aging safe policy (BASP).

[0068] The BASP strategy can refer to lowering the charging cut-off voltage for aging batteries to reduce the probability of battery swelling.

[0069] It is understandable that during the use of electronic devices, the battery will age. The degree of battery aging can be reflected by the number of cycles, i.e., the cycle value. The larger the cycle value, the higher the degree of battery aging. The smaller the cycle value, the lower the degree of battery aging.

[0070] The higher the degree of battery aging, the lower the charge cut-off voltage can be and the higher the charge cut-off current can be. When charging a battery with a lower degree of aging, the charge cut-off voltage can be higher and the charge cut-off current can be lower. When charging an old battery with a higher degree of aging, the charge cut-off voltage can be lower and the charge cut-off current can be higher.

[0071] When charging a battery with a high degree of aging, if the charge cut-off voltage is large and / or the charge cut-off current is small, the probability of battery bulging is high.

[0072] In order to reduce the probability of battery bulging, in a possible implementation, the electronic device will adopt a BASP strategy so that when the number of battery cycles is large, the battery's charging cut-off voltage is small.

[0073] Exemplarily, the BASP strategy may include multiple depressurization gears, each of which may correspond to the number of cycles in a section. The depressurization gear may also be referred to as a depressurization level. For example, the BASP strategy may include depressurization gear 0, depressurization gear 1, depressurization gear 2, depressurization gear 3, and depressurization gear 4. The number of cycles in a section may include a minimum number of cycles and a maximum number of cycles.

[0074] As the battery is used, the number of battery cycles increases, and the step-down level of the electronic device can be adjusted from 0→1→2→3→4.

[0075] For example, when the number of cycles of the battery reaches the minimum number of cycles corresponding to the voltage reduction level 0, the voltage reduction level of the electronic device is 0.

[0076] As the number of battery cycles continues to increase, when the number of battery cycles reaches the minimum number of cycles corresponding to the voltage reduction level 1, the voltage reduction level of the electronic device is adjusted from 0 to 1.

[0077] The voltage reduction gear of the electronic device is 1. As the cycle number of the battery continues to increase, when the cycle number of the battery reaches the minimum cycle number corresponding to the voltage reduction gear 2, the voltage reduction gear of the electronic device is adjusted from 1 to 2.

[0078] The voltage reduction gear of the electronic device is 2. As the cycle number of the battery continues to increase, when the cycle number of the battery reaches the minimum cycle number corresponding to the voltage reduction gear 3, the voltage reduction gear of the electronic device is adjusted from 2 to 3.

[0079] The voltage reduction gear of the electronic device is 3. As the cycle number of the battery continues to increase, when the cycle number of the battery reaches the minimum cycle number corresponding to the voltage reduction gear 4, the voltage reduction gear of the electronic device is adjusted from 3 to 4.

[0080] Each voltage reduction gear has its own configuration parameters, which may include an aging coefficient, a charging cut-off voltage, and / or a voltage reduction gear identification.

[0081] The aging coefficient can reflect the aging degree of the battery. The higher the aging degree of the battery, the higher the voltage reduction level, and the smaller the aging coefficient of the battery. For example, the aging coefficient corresponding to voltage reduction level 0> the aging coefficient corresponding to voltage reduction level 1> the aging coefficient corresponding to voltage reduction level 2> the aging coefficient corresponding to voltage reduction level 3> the aging coefficient corresponding to voltage reduction level 4.

[0082] The higher the battery aging degree, the higher the voltage reduction level, and the lower the charging cut-off voltage. For example, the charging cut-off voltage corresponding to voltage reduction level 0> the charging cut-off voltage corresponding to voltage reduction level 1> the charging cut-off voltage corresponding to voltage reduction level 2> the charging cut-off voltage corresponding to voltage reduction level 3> the charging cut-off voltage corresponding to voltage reduction level 4.

[0083] In this way, when the number of battery cycles is large, the charging cut-off voltage of the battery is small, which can reduce the probability of battery bulging.

[0084] In electronic devices using the BASP strategy, the electronic devices can calculate the power according to the battery voltage, battery temperature and the aging coefficient corresponding to the voltage reduction gear.

[0085] Exemplarily, the electronic device can determine the actual power level corresponding to the battery voltage and battery temperature from the preset correspondence between voltage and temperature and power level, and divide the actual power level by the aging coefficient corresponding to the voltage reduction gear of the electronic device to obtain the power level that will be subsequently displayed on the electronic device.

[0086] It is understandable that as the voltage reduction gear increases, the charging cut-off voltage of the electronic device will decrease. The decrease in the charging cut-off voltage will cause the actual battery power to fall short of 100%. The aging coefficient is a value less than 1. Dividing the aging coefficient corresponding to the voltage reduction gear of the electronic device by the actual power can make the subsequent power displayed on the electronic device reach 100%, showing the user that the battery of the electronic device is fully charged.

[0087] It is understandable that the voltage reduction gear 0, voltage reduction gear 1, voltage reduction gear 2, voltage reduction gear 3 and voltage reduction gear 4 are merely examples of the voltage reduction gears included in the BASP strategy, rather than limiting the voltage reduction gears included in the BASP strategy. In possible implementations, the voltage reduction gears may include more or fewer gears.

[0088] 5. Electronic equipment startup stage

[0089] The power-on stage of an electronic device may include power-on self-test, starting a boot loader, starting a Linux kernel, starting an operating system, and loading a user interface.

[0090] The power reporting of the electronic device can be performed during the operating system startup phase. During the operating system startup phase, the electronic device can obtain power information to display the power.

[0091] 6. Other terms

[0092] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0093] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0094] It should be noted that the "at..." in the embodiment of the present application can be the instant when a certain situation occurs, or a period of time after a certain situation occurs, and the embodiment of the present application does not specifically limit this. In addition, the display interface provided in the embodiment of the present application is only an example, and the display interface can also include more or less content.

[0095] Figure 1 A hardware schematic diagram of an electronic device in a possible implementation is shown.

[0096] like Figure 1 As shown, the electronic device may include an applications processor (AP) 11 and an audio digital signal processor (ADSP) 12. The ADSP 12 may include an integrated circuit (IC) 121 and a register 122. The register 122 may be a register available to the fuel gauge.

[0097] Combine the following Figure 1 , the module interaction of electronic devices using BASP strategy is explained.

[0098] Take the voltage reduction gear 3 as an example. Figure 1 As shown, when the AP 11 obtains that the cycle number of the battery reaches the minimum cycle number corresponding to the voltage reduction gear 3, the AP 11 can transmit the voltage reduction gear 3 and the configuration parameters corresponding to the voltage reduction gear 3 to the fuel gauge chip 121.

[0099] The fuel gauge chip 121 can write the step-down gear 3 and the configuration parameters corresponding to the step-down gear 3 to the register 122. The configuration parameters corresponding to the step-down gear 3 may include the aging coefficient corresponding to the step-down gear 3, etc. It should be noted that due to the performance limitation of the ADSP, there may be a situation where the space of the register 122 is small, the aging coefficient cannot be stored in the register 122, or the aging coefficient cannot be written into the register 122. The fuel gauge chip 121 can store the aging coefficient in the static storage area of ​​the memory. In this way, the fuel gauge chip 121 can calculate the power according to the battery voltage, the battery temperature and the aging coefficient corresponding to the step-down gear 3.

[0100] However, when the electronic device is turned off, the aging coefficient stored in the static storage area is destroyed. When the electronic device is restarted, the power meter chip 121 cannot obtain the aging coefficient from the AP 11. In addition, when the electronic device is restarted, the execution step of the AP 11 transmitting the aging coefficient corresponding to the voltage reduction gear to the power meter chip 121 is usually later than the execution step of the power meter chip 121 calculating the power for the first time. As a result, when the power meter chip 121 calculates the power for the first time, it cannot calculate based on the aging coefficient, but can only calculate the real power based on the battery voltage and battery temperature. Before the electronic device is restarted, the power displayed by the electronic device is the power obtained by dividing the real power by the aging coefficient. In this way, the power displayed by the electronic device jumps before and after the electronic device is restarted.

[0101] For example, Figure 2 A comparison chart of the power display before and after the electronic device is restarted in a possible implementation is shown.

[0102] Before the electronic device is restarted, the power meter chip 121 calculates the power according to the battery voltage, battery temperature and the aging coefficient corresponding to the voltage reduction gear 3, and the user interface (UI) of the electronic device can be displayed as follows: Figure 2 The interface shown in a. Figure 2 The interface shown in a in FIG. 1 includes a power icon 201. The power icon 201 is used to display the power. Figure 2 The interface shown in a in FIG. 1 shows that when the time is 03:32, the power level displayed by the power icon 201 is 100%.

[0103] In such Figure 2 Based on the interface shown in a in FIG. 1 , if the electronic device is restarted, the UI of the electronic device may be displayed as follows Figure 2 The interface shown in b in the figure. Figure 2 The interface shown in b in FIG. 1 includes a power icon 201 . Figure 2 The interface shown in b in FIG. 1 shows that when the time is 03:33, the power level displayed by the power icon 201 is 90%.

[0104] That is to say, from Figure 2 As shown in a and b, the battery level displayed on the UI before the electronic device is restarted is 100%, and the battery level displayed on the UI after the electronic device is restarted jumps to 90%. This will cause the user to clearly experience the battery level jump, resulting in a poor experience.

[0105] In view of this, an embodiment of the present application proposes a method for displaying power. Before the power meter chip obtains the aging coefficient from the AP, the power calculation is performed on the voltage reduction gear and the number of cycles. Since the voltage reduction gear and the number of cycles can also reflect the degree of aging of the battery, the calculated power is related to the degree of aging, thereby reducing the difference between the power displayed on the UI before and after the electronic device is restarted.

[0106] The power display method proposed in this application is described below in conjunction with some embodiments.

[0107] Figure 3 A software architecture diagram of an electronic device provided in an embodiment of the present application is shown.

[0108] like Figure 3 As shown, the electronic device may include an AP 31 and an ADSP 32. The AP 31 is divided into an application layer, an application framework layer, a system runtime layer (native), and a kernel layer from top to bottom. The ADSP 32 may include an electric meter chip (IC) 321 and a register 322. The register 322 is a register available for the electric meter.

[0109] The application layer may include a series of application packages, which may include system manager 311, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0110] The system manager 311 can be used to transmit the voltage reduction gear to the lower layer according to the number of cycle periods, and can also be used to display the power according to the power uploaded by the lower layer.

[0111] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer may include some predefined functions.

[0112] The application framework layer may include a battery service 312 .

[0113] The native layer may include a healthd layer monitor 313 and a hardware abstraction layer (HAL), etc. The HAL layer may include a power interface 314. The power interface 314 may be used to transmit the number of battery cycles.

[0114] The kernel layer may include power reporting 315, AP-side power meter driver 316, AP-side power meter interface 317, and the like.

[0115] The electric meter chip 321 may include a UI display electric quantity calculation 3211 , an electric meter driver 3212 , an electric meter interface 3213 , etc. The electric meter chip 321 may obtain the cycle number of the battery.

[0116] like Figure 3 As shown, the communication channel between the AP 31 and the ADSP 32 of the electronic device may include a channel between the AP-side power meter interface 317 and the power meter interface 3213, and may also include a channel between the power reporting 315 and the UI display power calculation 3211. The channel between the AP-side power meter interface 317 and the power meter interface 3213, and the channel between the power reporting 315 and the UI display power calculation 3211, may both be channels of the glink communication protocol.

[0117] The channel between the AP-side electricity meter interface 317 and the electricity meter interface 3213 can be used to transmit configuration parameters such as aging coefficients.

[0118] The channel between the power reporting 315 and the UI display power calculation 3211 can be used to transmit power.

[0119] During the power-on process of the electronic device, the channel between the power reporting 315 and the UI display power calculation 3211 is established earlier than the channel between the AP side power meter interface 317 and the power meter interface 3213 .

[0120] The following example uses BASP strategy for electronic devices. Figure 4-Figure 7 ,right Figure 3 The interaction of the modules shown is explained.

[0121] When the system manager 311 obtains that the cycle number of the battery reaches the minimum cycle number corresponding to the voltage reduction gear, the system manager 311 may transmit the voltage reduction gear to the AP-side power meter driver 316 through the power interface 314 .

[0122] The AP side power meter driver 316 reads the configuration parameters corresponding to the voltage reduction gear from the configuration file pre-stored in the AP side power meter driver 316. The configuration file may be a device tree source include (DTSI) file. The configuration file includes the correspondence between the voltage reduction gear and the configuration parameters.

[0123] The AP-side electricity meter driver 316 transmits the voltage reduction gear and the configuration parameters corresponding to the voltage reduction gear to the electricity meter chip 321 through the channel between the AP-side electricity meter interface 317 and the electricity meter interface 3213 .

[0124] The configuration parameters corresponding to the step-down gear include the identification and aging coefficient of the step-down gear. The power meter chip 321 stores the aging coefficient in the configuration parameters corresponding to the step-down gear in the static storage area of ​​the memory. The power meter chip 321 also writes the step-down gear and other parameters corresponding to the step-down gear to the register 322. The other parameters are non-aging coefficients.

[0125] When the electronic device is not turned off, the power meter chip 321 can obtain the aging coefficient from the static storage area. The power meter chip 321 can calculate the power according to the aging coefficient to obtain the power to be displayed on the electronic device later. If the electronic device is restarted, the electronic device may enter the following two stages in succession.

[0126] In the first stage, the AP 11 cannot transmit the aging coefficient corresponding to the voltage reduction gear to the power meter chip 121 .

[0127] In stage 2, the AP 11 may transmit the aging coefficient corresponding to the voltage reduction gear to the power meter chip 121. For example, the AP 11 may transmit the aging coefficient corresponding to the voltage reduction gear to the power meter chip 121 through the channel between the AP-side power meter interface 317 and the power meter interface 3213.

[0128] For electronic devices in stage 1, Figure 4 A module interaction flow chart provided in an embodiment of the present application is shown. Figure 4 As shown, when the electronic device is in stage one, the electronic device can calculate the power for the first time according to S400-S409 as follows, and display the power after the first power calculation.

[0129] S400. The electronic device is restarted.

[0130] S401 , the UI display power calculation 3211 requests the power meter driver 3212 for the current power.

[0131] S402, the power meter driver 3212 calculates the current power according to the voltage reduction gear and the number of cycles.

[0132] For example, the fuel gauge driver 3212 can obtain the real power of the electronic device through the battery voltage and battery temperature. The fuel gauge driver 3212 can also obtain the aging result according to the voltage reduction gear of the electronic device and the number of cycles of the electronic device. The aging result can be a value less than 1. In this way, the fuel gauge driver 3212 can divide the real power by the aging result to obtain the power Q p1 .

[0133] Exemplarily, the fuel gauge driver 3212 may call a preset function, obtain a target result according to the voltage reduction gear of the electronic device and the number of cycles of the electronic device, and obtain an aging result according to the target result. The target result may reflect the aging degree of the battery, for example, the aging result may be a percentage obtained by dividing the target result by 100.

[0134] Exemplarily, the fuel gauge driver 3212 can calculate the target result corresponding to the voltage reduction gear of the electronic device and the number of cycles of the electronic device according to the ratio value of the voltage reduction gear of the electronic device, the aging value corresponding to the minimum number of cycles corresponding to the voltage reduction gear of the electronic device, the voltage reduction gear of the electronic device and the number of cycles of the electronic device. Among them, the aging value can reflect the aging degree of the battery, and the ratio value of the voltage reduction gear of the electronic device can reflect the change ratio of the aging value in the gear interval corresponding to the voltage reduction gear of the electronic device.

[0135] For example, Figure 5 The figure shows the corresponding relationship between the number of cycles and the aging value provided in the embodiment of the present application. Figure 5 As shown, c0 can be the minimum cycle number corresponding to the step-down gear 0, c1 can be the minimum cycle number corresponding to the step-down gear 1, c2 can be the minimum cycle number corresponding to the step-down gear 2, c3 can be the minimum cycle number corresponding to the step-down gear 3, c4 can be the minimum cycle number corresponding to the step-down gear 4, and the interval from c1 to c2 can be the gear interval of the step-down gear 1. Within the gear interval of the step-down gear 1, the aging value can change according to the line segment corresponding to the interval from c1 to c2. It can be understood that the proportional value of the step-down gear 1 can reflect the change ratio of the aging value within the gear interval of the step-down gear 1, which can also reflect the following. Figure 5 The slope of the line segment in the gear range corresponding to the medium voltage reduction gear 1. In particular, the proportional value of the voltage reduction gear 0 can reflect the following: Figure 5 The slope of the dotted line segment in the gear range of the step-down gear 0 (or the range from c0 to c1) is shown.

[0136] In a possible implementation, the ratio value of the voltage reduction gear of the electronic device is preset. The aging value corresponding to the minimum number of cycles corresponding to the initial voltage reduction gear of the electronic device is also preset. The initial voltage reduction gear of the electronic device, for example, voltage reduction gear 0. The aging value corresponding to the minimum number of cycles corresponding to the voltage reduction gear of the electronic device is calculated based on the ratio value of each voltage reduction gear before the voltage reduction gear of the electronic device, the minimum number of cycles corresponding to each voltage reduction gear before the voltage reduction gear of the electronic device, the minimum number of cycles corresponding to the voltage reduction gear of the electronic device, and the aging value of the initial voltage reduction gear of the electronic device.

[0137] In another possible implementation, the aging value corresponding to the minimum number of cycles corresponding to the voltage reduction gear of the electronic device is preset. The proportional value of the voltage reduction gear of the electronic device is calculated based on the aging value corresponding to the minimum number of cycles corresponding to the voltage reduction gear of the electronic device, the aging value corresponding to the minimum number of cycles corresponding to the next voltage reduction gear of the electronic device, the minimum number of cycles corresponding to the voltage reduction gear of the electronic device, and the minimum number of cycles corresponding to the next voltage reduction gear of the voltage reduction gear of the electronic device.

[0138] For example, in one possible implementation described above, the calculation logic of the aging value and the target result corresponding to the minimum number of cycles corresponding to the voltage reduction gear of the electronic device is as follows:

[0139]

[0140]

[0141] Among them, aging_factor is the target result, cycle is the number of cycles of the electronic device; aging_index is the voltage reduction gear of the electronic device; c is the proportional value; cycle_buffer is the cache value, and the cache value can be the minimum number of cycles corresponding to each voltage reduction gear; c and cycle_buffer can be variables, cycle_buffer[i] can represent the i-th cache value, c[i] can represent the i-th proportional value, and i is an integer. For example, c[0] can be the proportional value of the step-down gear 0, c[1] can be the proportional value of the step-down gear 1, c[2] can be the proportional value of the step-down gear 2, c[3] can be the proportional value of the step-down gear 3, and c[4] can be the proportional value of the step-down gear 4. cycle_buffer[0] can be the minimum cycle number corresponding to the step-down gear 0, cycle_buffer[1] can be the minimum cycle number corresponding to the step-down gear 1, cycle_buffer[2] can be the minimum cycle number corresponding to the step-down gear 2, cycle_buffer[3] can be the minimum cycle number corresponding to the step-down gear 3, and cycle_buffer[4] can be the minimum cycle number corresponding to the step-down gear 4.

[0142] For example, as shown in the above possible implementation, the calculation logic of the aging value and the target result corresponding to the minimum number of cycles corresponding to the voltage reduction gear of the electronic device is as follows: if the voltage reduction gear j of the electronic device is 0, the target result is the maximum value of 100.

[0143] If the voltage reduction level j of the electronic device is 4, the target result is the minimum value 90.

[0144] If the voltage reduction level j of the electronic device is 1, 2 or 3, the target result is determined as follows:

[0145] According to i=0, i=1, ..., i=j, it is judged in turn whether the cycle number (cycle) of the electronic device is greater than cycle_buffer[i+1]. Each time it is judged, it is calculated once according to the judgment result as follows:

[0146] If the judgment result is yes, the polling result is calculated according to the formula result = temp - c [i] * (cycle_buffer [i + 1] - cycle_buffer [i]. Wherein, temp is the polling result calculated last time, and the polling result is the aging value corresponding to the minimum number of cycles corresponding to the step-down gear. When i = 0, temp = 100, and temp = 100 can represent the aging value corresponding to the minimum number of cycles corresponding to the step-down gear 0.

[0147] If the judgment result is no, the target result is calculated according to the formula result = temp - c[i] * (cycle - cycle_buffer[i]).

[0148] The following describes in detail the calculation logic of the aging value and target result corresponding to the minimum number of cycles corresponding to the voltage reduction gear of the electronic device, taking voltage reduction gear 1, voltage reduction gear 2 and voltage reduction gear 3 as examples.

[0149] For example, when the voltage reduction gear of the electronic device is 1, the power meter driver 3212 may determine whether the cycle is greater than cycle_buffer[0+1].

[0150] If the power meter driver 3212 determines that cycle is greater than cycle_buffer[0+1], the power meter driver 3212 can obtain the first polling result. The first polling result temp[1] satisfies the following formula (1):

[0151] temp[1]=100- c[0]*(cycle_buffer[0+1]- cycle_buffer[0]) (1).

[0152] The fuel gauge driver 3212 can continue to determine c p Is it greater than cycle_buffer[1+1]? If the power meter driver 3212 determines that cycle is not greater than cycle_buffer[1+1], the power meter driver 3212 obtains the target result (result) according to the first polling result. The target result satisfies the following formula (2):

[0153] result=temp[1]-c[1]*(cycle-cycle_buffer[1]) (2).

[0154] Similarly, when the voltage reduction gear of the electronic device is 2, the power meter driver 3212 can determine whether cycle is greater than cycle_buffer[0+1]. If the power meter driver 3212 determines that cycle is greater than cycle_buffer[0+1], the power meter driver 3212 can obtain the first polling result temp[1].

[0155] The fuel gauge driver 3212 may continue to determine whether cycle is greater than cycle_buffer[1+1].

[0156] If the power meter driver 3212 determines that cycle is greater than cycle_buffer[1+1], the power meter driver 3212 obtains a second polling result based on the first polling result. The second polling result temp2 satisfies the following formula (3):

[0157] temp[2]=temp[1]- c[1]*(cycle_buffer[1+1]- cycle_buffer[1]) (3).

[0158] The fuel gauge driver 3212 may continue to determine whether cycle is greater than cycle_buffer[2+1].

[0159] If the power meter driver 3212 determines that cycle is not greater than cycle_buffer[2+1], the power meter driver 3212 obtains the target result according to the second polling result. The target result satisfies the following formula (4), and the target result can be the result in formula (4):

[0160] result=temp[2]-c[2]*(cycle-cycle_buffer[2]) (4).

[0161] After the fuel gauge driver 3212 continues to determine whether cycle is greater than cycle_buffer[1+1], if the fuel gauge driver 3212 determines that cycle is not greater than cycle_buffer[1+1], for example, cycle=cycle_buffer[1+1], the fuel gauge driver 3212 can obtain a target result based on the first polling result. The target result satisfies the following formula (5), and the target result can be the result in formula (5):

[0162] result=temp[1]- c[1]*(cycle- cycle_buffer[1]) (5).

[0163] Similarly, when the voltage reduction gear of the electronic device is 3, the power meter driver 3212 can determine whether cycle is greater than cycle_buffer[0+1]. If the power meter driver 3212 determines that cycle is greater than cycle_buffer[0+1], the power meter driver 3212 can obtain the first polling result temp[1].

[0164] The fuel gauge driver 3212 continues to determine whether cycle is greater than cycle_buffer[1+1].

[0165] If the power meter driver 3212 determines that cycle is greater than cycle_buffer[1+1], the power meter driver 3212 obtains a second polling result according to the first polling result.

[0166] The fuel gauge driver 3212 may continue to determine whether cycle is greater than cycle_buffer[2+1].

[0167] If the power meter driver 3212 determines that cycle is greater than cycle_buffer[2+1], the power meter driver 3212 obtains a third polling result based on the second polling result. The third polling result temp[3] satisfies the following formula (6):

[0168] temp[3]=temp2- c[2]*( cycle_buffer[2+1]- cycle_buffer[2]) (6).

[0169] The fuel gauge driver 3212 may continue to determine whether cycle is greater than cycle_buffer[3+1].

[0170] If the power meter driver 3212 determines that cycle is not greater than cycle_buffer[3+1], the power meter driver 3212 obtains the target result according to the third polling result. The target result satisfies the following formula (7), and the target result can be result in formula (7):

[0171] result=temp[3]-c[3]*(cycle-cycle_buffer[3]) (7).

[0172] After the fuel gauge driver 3212 continues to determine whether cycle is greater than cycle_buffer[2+1], if the fuel gauge driver 3212 determines that cycle is not greater than cycle_buffer[2+1], for example, cycle=cycle_buffer[2+1], the fuel gauge driver 3212 can obtain a target result based on the second polling result. The target result satisfies the following formula (8), and the target result can be the result in formula (8):

[0173] result=temp[2]-c[2]*(cycle-cycle_buffer[2]) (8).

[0174] It can be understood that temp[0] can represent the aging value corresponding to the minimum number of cycles corresponding to the step-down gear 0, temp[1] can represent the aging value corresponding to the minimum number of cycles corresponding to the step-down gear 1, temp[2] can represent the aging value corresponding to the minimum number of cycles corresponding to the step-down gear 2, temp[3] can represent the aging value corresponding to the minimum number of cycles corresponding to the step-down gear 3, and temp[4] can represent the aging value corresponding to the minimum number of cycles corresponding to the step-down gear 4. temp[0] = 100, temp[4] = 90. When cycle = cycle_buffer[1], the target result is the same as temp[1]. When cycle = cycle_buffer[2], the target result is the same as temp[2]. When cycle = cycle_buffer[3], the target result is the same as temp[3]. In this way, Figure 5 The solid line segments shown in can represent the corresponding relationship between the number of cycle periods and the target result.

[0175] For example, in another possible implementation, the ratio value c[i] of the voltage reduction gear of the electronic device satisfies the following formula (9):

[0176] c[i]=(temp[i]- temp[i+1]) / (cycle_buffer[i+1]- cycle_buffer[i]) (9).

[0177] S403 , the power meter driver 3212 displays the power calculation 3211 to the UI and returns the power calculated by the power meter driver 3212 .

[0178] Exemplarily, the power meter driver 3212 transmits the power Q to the UI display power calculation 3211. p1 .

[0179] S404, UI displays power calculation 3211 and performs power smoothing processing.

[0180] Exemplarily, the power meter driver 3212 may calculate the power multiple times according to step S402, and transmit the calculated power to the UI display power calculation 3211 according to step S403. The UI display power calculation 3211 may obtain multiple power. The UI display power calculation 3211 may calculate the average of multiple power to obtain the UI display power.

[0181] Optionally, the UI display power calculation 3211 may also perform smoothing on multiple power levels in accordance with other smoothing methods to obtain the UI display power levels.

[0182] S405 , the power reporting 315 requests the UI to display the power calculation 3211 .

[0183] The UI displayed power belongs to the upper layer power. The UI displayed power can be called UI power.

[0184] S406 , the UI display power calculation 3211 returns the UI display power to the power reporting 315 .

[0185] S407 , the power reporting 315 transmits the UI display power to the healthd layer monitoring 313 .

[0186] S408, the healthd layer monitor 313 transmits the UI display power to the battery service 312. The UI display power transmitted by the healthd layer monitor 313 can represent the battery status monitored by the healthd layer monitor 313. The battery service 312 receives the UI display power and broadcasts a battery broadcast message to notify the apk (such as the system manager 311) to display the power. The battery broadcast message includes the UI display power.

[0187] S409 , the application 311 (or the system manager 311 ) receives the battery broadcast message and displays the battery level in the UI.

[0188] In the power display method provided in this embodiment, when the electronic device is restarted and the power meter chip 321 does not obtain the aging coefficient from the AP 31, the power meter driver 3212 can calculate the power according to the voltage reduction gear and the number of cycles. Since the voltage reduction gear and the number of cycles can reflect the aging degree of the battery, the calculated power is related to the aging degree of the battery, which can reduce the difference between the power displayed on the UI before and after the electronic device is restarted, reduce the probability of a jump in the power displayed on the electronic device before and after the electronic device is restarted, and improve the user experience of the electronic device.

[0189] exist Figure 4 Based on the embodiment, when the electronic device enters stage 2, Figure 6 Another module interaction flow chart provided in an embodiment of the present application is shown.

[0190] Electronic devices can be Figure 6 Steps S601-S615 in the above embodiment are used to calculate and display the power.

[0191] S601 , the electricity meter driver 3212 transmits the voltage reduction gear to the electricity meter interface 3213 .

[0192] Exemplarily, the fuel gauge driver 3212 may obtain the voltage reduction gear position from the register 322. The fuel gauge driver 3212 transmits the voltage reduction gear position to the fuel gauge interface 3213.

[0193] Optionally, step S601 may be performed with Figure 4 Step S402 in the embodiment is executed concurrently.

[0194] S602 : The electricity meter interface 3213 transmits the voltage reduction gear to the AP-side electricity meter interface 317 .

[0195] S603 , the AP-side electricity meter interface 317 transmits the voltage reduction gear to the AP-side electricity meter driver 316 , and notifies the AP-side electricity meter driver 316 to analyze the parameters corresponding to the voltage reduction gear.

[0196] Exemplarily, when the AP side completes printing of adsp_fg_probe, the AP side power meter driver 316 may parse the parameters corresponding to the voltage reduction gear to return the parsed parameters to the AP side power meter interface 317 .

[0197] The completion of printing of adsp_fg_probe on the AP side may indicate that the initialization of the AP side power meter driver 316 is completed.

[0198] S604 , the AP-side electricity meter driver 316 returns the parsed parameters to the AP-side electricity meter interface 317 .

[0199] Exemplarily, the AP-side power meter driver 316 reads configuration parameters corresponding to the voltage reduction gear from a configuration file, such as a DTSI file.

[0200] The AP-side electricity meter driver 316 returns the configuration parameters corresponding to the voltage reduction gear to the AP-side electricity meter interface 317 .

[0201] S605 . The AP-side electricity meter interface 317 transmits configuration parameters corresponding to the voltage reduction gear to the electricity meter interface 3213 .

[0202] Exemplarily, the AP-side electricity meter interface 317 transmits configuration parameters corresponding to the voltage reduction gear to the electricity meter interface 3213. The configuration parameters include the identification and aging coefficient of the voltage reduction gear.

[0203] S606 , the electricity meter interface 3213 transmits the identification of the voltage reduction gear and the aging coefficient to the electricity meter driver 3212 .

[0204] S607 , the UI display power calculation 3211 requests the power meter driver 3212 for the current power.

[0205] Exemplarily, the UI display power calculation 3211 may request the current power from the power meter driver 3212 at a preset frequency.

[0206] The preset frequency may be a frequency at which the power display is updated. The preset frequency may be, for example, updating the power display once every 10 seconds or once every 10 minutes, which is not specifically limited in this embodiment.

[0207] S608 , the power meter driver 3212 calculates the current power.

[0208] Exemplarily, when the fuel meter driver 3212 receives the voltage reduction gear identifier and aging coefficient transmitted by the fuel meter interface 3213, the fuel meter driver 3212 may write the voltage reduction gear identifier to the register 322, and the fuel meter driver 3212 also stores the aging coefficient in the static storage area.

[0209] The power meter driver 3212 can calculate the power according to the aging coefficient to obtain the power Q p2 .

[0210] For example, the fuel gauge driver 3212 may divide the actual power corresponding to the battery voltage and the battery temperature by the aging coefficient to obtain the power Q p2 .

[0211] S609 , the power meter driver 3212 displays the power calculation 3211 to the UI and returns the power calculated by the power meter driver 3212 .

[0212] Exemplarily, the power meter driver 3212 transmits the power Q to the UI display power calculation 3211. p2 .

[0213] S610, UI display power calculation 3211 performs power smoothing processing.

[0214] Exemplarily, the power meter driver 3212 may calculate the power for multiple times according to step S608 , and transmit the calculated power to the UI display power calculation 3211 in step S609 .

[0215] The UI display power calculation 3211 can obtain multiple power. The UI display power calculation 3211 can calculate the average of multiple power to obtain the UI display power.

[0216] Optionally, the UI display power calculation 3211 may also perform smoothing on multiple power levels in accordance with other smoothing methods to obtain the UI display power levels.

[0217] S611, the power reporting 315 requests the UI to display the power calculation 3211.

[0218] S612, UI display power calculation 3211 returns UI display power to power reporting 315.

[0219] S613, power reporting 315 transmits the UI display power to the healthd layer monitor 313.

[0220] S614, the healthd layer monitor 313 transmits the UI display power to the battery service 312. The battery service 312 receives the UI display power and broadcasts a battery broadcast message to notify the apk (such as the system manager 311) to display the power.

[0221] Optionally, the healthd layer monitor 313 can determine whether the UI displayed power level transmitted by the power report 315 is the same as the UI displayed power level transmitted by the last power report 315. If they are the same, the UI displayed power level may not be transmitted to the battery service 312. If they are different, the UI displayed power level transmitted by the power report 315 may be transmitted to the battery service 312.

[0222] S615. The application 311 (or the system manager 311) receives the battery broadcast message and displays the battery level in the UI.

[0223] From steps S601-S615, it can be seen that when the power meter chip 321 can obtain the aging coefficient transmitted by AP 31, the power displayed by the electronic device is related to the aging coefficient. The aging coefficient can reflect the aging degree of the electronic device, that is, when the power meter chip 321 can obtain the aging coefficient transmitted by AP 31, the power displayed by the electronic device is related to the aging degree. Figure 4 In the embodiment, it can be seen that before the power meter chip 321 obtains the aging coefficient transmitted by the AP 31, the power displayed by the electronic device is related to the aging degree of the battery. In this way, the probability of the power displayed by the electronic device jumping before and after the power meter chip 321 obtains the aging coefficient transmitted by the AP 31 can be reduced, which can improve the user experience of the electronic device.

[0224] When the electronic device is not turned off, the display of the power level can be performed according to steps S607-S615.

[0225] For example, Figure 7 A comparison chart of the power display before and after restarting the electronic device provided by an embodiment of the present application is shown.

[0226] Before the electronic device is restarted, the power meter chip 121 calculates the power according to the battery voltage, battery temperature and the aging coefficient corresponding to the voltage reduction gear, and the UI of the electronic device can display the following: Figure 7 The interface shown in a. Figure 7 The interface shown in a in FIG. 1 includes a power icon 701. The power icon 701 is used to display the power. Figure 7 The interface shown in a in FIG. 1 shows that when the time is 07:52, the power level displayed by the power icon 701 is 98%.

[0227] In such Figure 7 Based on the power level shown in a in FIG. 1 , if the electronic device is restarted, the UI of the electronic device may display the following Figure 7 The interface shown in b in the figure. Figure 7 The interface shown in b in FIG. 7 includes a power icon 701 . Figure 7 The interface shown in b in FIG. 1 shows that when the time is 07:53, the power level displayed by the power icon 701 is 98%.

[0228] That is to say, Figure 7 As shown in a and b, the power level displayed before the electronic device is restarted is 98%, and the power level displayed after the electronic device is restarted is 98%. The power level displayed before and after the electronic device is restarted remains consistent.

[0229] Figure 4-Figure 7 The power display method proposed in the embodiment shown is that when the electronic device is not shut down, the power meter chip 321 can obtain the aging coefficient transmitted by AP 31, and the power meter driver 3212 can calculate the power according to the aging coefficient, so that the power displayed by the electronic device is related to the aging coefficient. When the electronic device is restarted, the power meter chip 321 does not obtain the aging coefficient from AP 31, and the power meter driver 3212 can calculate the power according to the step-down gear and the number of cycles, so that the power displayed by the electronic device is related to the aging degree of the battery. In this way, the probability of a jump in the power displayed by the electronic device before and after the electronic device is restarted can be reduced. Since after the electronic device is restarted, if the power meter chip 321 can obtain the aging coefficient transmitted by AP 31, the power meter driver 3212 can calculate the power according to the aging coefficient, thereby reducing the probability of a jump in the power displayed by the electronic device after the electronic device is restarted, and improving the user's experience of the electronic device.

[0230] It can be understood that the charging architecture of the electronic device in the embodiment of the present application can be an ADSP architecture.

[0231] The power display method provided in the embodiments of the present application is described below in combination with some embodiments.

[0232] Figure 8A schematic diagram of the power display process provided in an embodiment of the present application is shown.

[0233] like Figure 8 As shown, the power display method provided in this embodiment is applied to an electronic device, the electronic device includes an application processor (AP) and a power meter chip, the AP is provided with an aging coefficient of the electronic device, and the method includes:

[0234] S801. At a first moment, the electronic device is turned on, and the power meter chip obtains a first power level. The first power level is related to the number of cycles of the battery and the voltage reduction level of the electronic device, and has nothing to do with an aging coefficient of the electronic device set in the AP.

[0235] S802: At a second moment, the power meter chip transmits the first power to the AP, so that the electronic device displays the first power. The second moment is later than the first moment.

[0236] Exemplarily, the process from the power meter chip transmitting the first power to the AP to the electronic device displaying the first power can be as follows: Figure 4 As shown in steps S405-S409 in the embodiment.

[0237] S803, at a third moment, the power meter chip obtains a second power; the second power is related to an aging coefficient of the electronic device set in the AP, and the aging coefficient is obtained by the power meter chip from the AP between the first moment and the third moment. The third moment is later than the second moment.

[0238] S804, at a fourth moment, the power meter chip transmits the second power to the AP, so that the electronic device displays the second power. The fourth moment is later than the third moment.

[0239] Exemplarily, the process from the power meter chip transmitting the second power to the AP to the electronic device displaying the second power can be as follows: Figure 6 As shown in steps S611-S615 in the embodiment.

[0240] In the power display method provided in this embodiment, when the electronic device is turned on, before the power meter chip obtains the aging coefficient from the AP, since there is no aging coefficient in the register, the power meter chip cannot obtain the aging coefficient. The power meter chip can only obtain the power according to the number of cycles of the battery and the voltage reduction gear of the electronic device. The first power obtained by the power meter chip can be as follows Figure 4The UI display power calculation 3211 in the embodiment obtains the UI display power, and the number of battery cycles and the voltage reduction gear of the electronic device can reflect the aging degree of the battery. Therefore, the first power is related to the aging degree of the battery, but has nothing to do with the aging coefficient, and the first power is also irrelevant to the aging coefficient of the electronic device set in the AP. Because the power displayed by the electronic device is obtained based on the aging coefficient before the electronic device is turned off, the electronic device is turned on and the power meter chip obtains the power based on the number of battery cycles and the voltage reduction gear of the electronic device before obtaining the aging coefficient from the AP, which is used for the subsequent display of the electronic device, which can reduce the probability of power jump before and after the electronic device is restarted.

[0241] After the power meter chip obtains the aging coefficient from the AP, the power meter chip can obtain the power according to the aging coefficient. The second power obtained by the power meter chip can be as follows: Figure 6 In the embodiment, the UI displayed power obtained by UI displayed power calculation 3211 and the aging coefficient also reflect the degree of battery aging. In this way, the probability of a jump in the power displayed by the electronic device before and after the power meter chip obtains the aging coefficient from the AP can be reduced, and the probability of a jump in the power displayed by the electronic device after the electronic device is turned on can also be reduced.

[0242] Therefore, the power display method provided in this embodiment can not only reduce the probability of power jumps before and after the electronic device is restarted, but also reduce the probability of power jumps displayed by the electronic device after the electronic device is turned on, thereby improving the user experience of the electronic device.

[0243] The power display method provided by this embodiment will be described below.

[0244] Optionally, the first power is calculated based on the target result and the actual power of the electronic device. The target result represents the aging degree of the battery, and the target result satisfies the following conditions:

[0245] When the voltage reduction gear of the electronic device is the first voltage reduction gear, the target result is a first value, and the first value is a fixed value.

[0246] When the voltage reduction gear of the electronic device is the second voltage reduction gear, the target result is the second value. The first value is greater than the second value, and the second value is a value that changes in the second voltage reduction gear according to the increase of the cycle number, and the cycle number of the second voltage reduction gear is greater than the cycle number of the first voltage reduction gear.

[0247] Exemplarily, the first power quantity can be obtained as follows: Figure 4 As shown in steps S400-S404 in the embodiment. The first voltage reduction gear can be Figure 4 The voltage reduction gear in the embodiment is 0. The first value can be Figure 4In the embodiment, temp[0], and the first value may be 100, ε0=100. The second voltage reduction gear may be Figure 4 The voltage reduction gear 1 in the embodiment.

[0248] In this way, it is possible to use the target result to correct the actual power and obtain the power displayed by the electronic device. Since the number of cycles of the second step-down gear is greater than that of the first step-down gear, when the electronic device is in the first step-down gear, the number of cycles of the electronic device is relatively small, indicating that the battery aging degree is low and the impact on the battery charging is relatively small. The correction of the actual power can be corrected with a fixed value, so the target result can be a fixed value. As the number of cycles of the electronic device increases, the degree of battery aging becomes higher and higher, and the impact on the battery charging increases. Therefore, when the electronic device is in the second step-down gear, the target result changes with the increase of the number of cycles in the second step-down gear. In this way, the correction amplitude of the actual power corrected by using the target result also changes with the increase of the number of cycles, which can improve the user experience of the electronic device.

[0249] Optionally, the second value is related to the minimum number of cycles corresponding to the second step-down gear, the aging value of the minimum number of cycles corresponding to the second step-down gear, the proportional value of the second step-down gear and the number of cycles of the electronic device; the aging value represents the degree of aging of the battery, and the proportional value of the second step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycles in the second step-down gear.

[0250] In this way, in the second voltage reduction gear, according to the minimum number of cycles corresponding to the second voltage reduction gear, the number of cycles of the electronic device, the aging value of the minimum number of cycles corresponding to the second voltage reduction gear, and the aging change rate of the battery, a target result matching the aging change rate can be obtained. The actual power is corrected using the target result, which can improve the user experience of the electronic device.

[0251] Exemplarily, the second value satisfies the following formula (10):

[0252] ε 1,p =ε1-k1×(c p -c1) (10)

[0253] Among them, ε 1,p is the second value, ε1 is the aging value of the minimum number of cycles corresponding to the second voltage reduction gear, k1 is the proportional value of the second voltage reduction gear, c p is the cycle number of the electronic device, and c1 is the minimum cycle number corresponding to the second step-down gear.

[0254] For example, ε 1,p Can be Figure 5The aging value of the line segment corresponding to the gear interval of the medium voltage reduction gear 1. ε 1,p Can be Figure 4 The result, ε1 in formula (2) of the embodiment can be Figure 4 In the embodiment, temp[1], k1 can be Figure 4 c[1], c in the embodiment p Can be Figure 4 In the embodiment, cycle, c1 can be Figure 4 cycle_buffer[1] in the embodiment.

[0255] In this way, in the second step-down gear, the target result is positively correlated with the aging value of the minimum number of cycles corresponding to the second step-down gear and the minimum number of cycles corresponding to the second step-down gear, and the target result is negatively correlated with the number of cycles of the electronic device and the rate of change of the aging degree of the battery in the second gear.

[0256] Exemplarily, ε1 satisfies the following formula (11):

[0257] ε1=ε0-k0×(c1-c0) (11)

[0258] Among them, k0 is the proportional value of the first step-down gear, k0 represents the rate at which the aging degree of the battery deepens with the increase of the number of cycle cycles in the first step-down gear, ε0 is the aging value of the minimum number of cycle cycles corresponding to the first step-down gear, ε0 is equal to the first value, and c0 is the minimum number of cycle cycles corresponding to the first step-down gear.

[0259] For example, k0 can be Figure 4 In the embodiment, c[0], c0 can be Figure 4 cycle_buffer[0] in the embodiment.

[0260] In this way, in the second step-down gear, the aging value of the minimum number of cycle periods corresponding to the second step-down gear is negatively correlated with the aging value of the minimum number of cycle periods corresponding to the previous step-down gear of the electronic device (i.e., the first step-down gear) and the minimum number of cycle periods corresponding to the previous step-down gear of the electronic device, and the aging value of the minimum number of cycle periods corresponding to the second step-down gear is negatively correlated with the rate of change of the aging degree of the electronic device in the previous step-down gear and the minimum number of cycle periods corresponding to the second step-down gear.

[0261] From the above, it can be seen that in the second voltage reduction gear, the target result can be matched with the aging degree of the battery, thereby reducing the probability of the display power jump before and after the electronic device is restarted, and reducing the probability of the display power jump of the electronic device after the electronic device is restarted.

[0262] Optionally, when the voltage reduction gear of the electronic device is the third voltage reduction gear, the target result is a third value. The second value is greater than the third value, the third value is a value that changes in the third voltage reduction gear according to the increase of the cycle number, and the cycle number of the third voltage reduction gear is greater than the cycle number of the second voltage reduction gear.

[0263] For example, the third step-down gear may be Figure 4 The voltage reduction gear 2 in the embodiment. The third value can be as follows Figure 5 The aging value of the line segment corresponding to the gear range of the medium voltage reduction gear 2.

[0264] In this way, as the number of cycles of the electronic device continues to increase, the degree of battery aging becomes higher and higher, and the impact on the battery charging increases. Therefore, when the electronic device is in the third step-down gear, the target result changes with the increase of the number of cycles in the third step-down gear. In this way, the correction amplitude of the actual power using the target result also changes with the increase of the number of cycles, which can improve the user experience of the electronic device.

[0265] Exemplarily, the third value is related to the minimum number of cycles corresponding to the third voltage reduction gear, the aging value of the minimum number of cycles corresponding to the third voltage reduction gear, the ratio value of the third voltage reduction gear, and the number of cycles of the electronic device.

[0266] Among them, the aging value of the minimum number of cycles corresponding to the third step-down gear is related to the aging value of the minimum number of cycles corresponding to the second step-down gear, the aging value of the minimum number of cycles corresponding to the first step-down gear, the proportional value of the first step-down gear, the minimum number of cycles corresponding to the second step-down gear, the minimum number of cycles corresponding to the first step-down gear, the proportional value of the second step-down gear and the minimum number of cycles corresponding to the third step-down gear; the aging value represents the aging degree of the battery, the proportional value of the third step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycles in the third step-down gear, the proportional value of the first step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycles in the first step-down gear, the proportional value of the second step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycles in the second step-down gear, and the aging value of the minimum number of cycles corresponding to the first step-down gear is equal to the first value.

[0267] Exemplarily, the third value satisfies the following formula (12):

[0268]

[0269] Among them, ε1 is the aging value of the minimum number of cycles corresponding to the second step-down gear, ε0 is the aging value of the minimum number of cycles corresponding to the first step-down gear, ε0 is equal to the first value, k0 is the proportional value of the first step-down gear, c1 is the minimum number of cycles corresponding to the second step-down gear, c0 is the minimum number of cycles corresponding to the first step-down gear, k1 is the proportional value of the second step-down gear, ε 2,p is the third value, ε2 is the aging value of the minimum number of cycles corresponding to the third step-down gear, k2 is the proportional value of the third step-down gear, c p is the cycle number of the electronic device, and c2 is the minimum cycle number corresponding to the third step-down gear.

[0270] For example, ε 2,p Can be Figure 4 The result in formula (4) of the embodiment. p = c2, ε 2,p Can be Figure 4 The result in formula (5) of the embodiment. ε2 can be Figure 4 temp[2] in the embodiment. k2 can be Figure 4 c[2] in the embodiment. c2 can be Figure 4 buffer[2] in the embodiment.

[0271] In this way, in the third step-down gear, the target result is positively correlated with the aging value of the minimum number of cycles corresponding to the third step-down gear and the minimum number of cycles corresponding to the third step-down gear, and the target result is negatively correlated with the number of cycles of the electronic device and the rate of change of the aging degree of the battery in the third step-down gear.

[0272] Among them, in the third voltage reduction gear, the aging value of the minimum number of cycle periods corresponding to the third voltage reduction gear is negatively correlated with the aging value of the minimum number of cycle periods corresponding to the previous voltage reduction gear (i.e., the second voltage reduction gear) of the electronic device and the minimum number of cycle periods corresponding to the previous voltage reduction gear of the electronic device, and the aging value of the minimum number of cycle periods corresponding to the third voltage reduction gear is negatively correlated with the rate of change of the aging degree of the electronic device in the previous voltage reduction gear and the minimum number of cycle periods corresponding to the third voltage reduction gear.

[0273] Thus, in the third step-down gear, the target result matches the aging degree of the battery, thereby reducing the probability of a power jump displayed before and after the electronic device is restarted, and reducing the probability of a power jump displayed on the electronic device after the electronic device is restarted.

[0274] Optionally, when the voltage reduction gear of the electronic device is the fourth voltage reduction gear, the target result is a fourth value; the third value is greater than the fourth value, the fourth value is a value that changes in the fourth voltage reduction gear according to an increase in the number of cycles, and the number of cycles of the fourth voltage reduction gear is greater than the number of cycles of the third voltage reduction gear;

[0275] When the voltage reduction gear of the electronic device is the fifth voltage reduction gear, the target result is the fifth value; the fourth value is greater than the fifth value, the fifth value is a fixed value, and the cycle number of the fifth voltage reduction gear is greater than the cycle number of the fourth voltage reduction gear.

[0276] For example, the fourth step-down gear may be Figure 4 The fourth value can be as follows: Figure 5 The aging value of the line segment corresponding to the gear interval of the middle voltage reduction gear 2. The fifth voltage reduction gear can be Figure 4 The step-down gear in the embodiment is 4. The fifth value can be as follows Figure 5 temp[4] in , and is equal to 90.

[0277] In this way, as the number of cycles of the electronic device increases, the degree of battery aging becomes higher and higher, and the impact on battery charging increases. Therefore, when the electronic device is in the fourth step-down gear, the target result changes with the increase of the number of cycles in the fourth step-down gear. In this way, the correction amplitude of the target result used to correct the actual power also changes with the increase of the number of cycles. As the number of cycles of the electronic device continues to increase, the degree of battery aging reaches the limit, and the battery aging tends to stabilize. The target result can be a fixed value. For example, when the step-down gear of the electronic device is the fifth step-down gear, the fifth value is a fixed value, so that the target result matches the degree of battery aging, thereby reducing the probability of a jump in the displayed power before and after the electronic device is restarted, and reducing the probability of a jump in the displayed power after the electronic device is restarted, thereby improving the user experience of the electronic device.

[0278] Exemplarily, the fourth value is related to the minimum number of cycles corresponding to the fourth voltage reduction gear, the aging value of the minimum number of cycles corresponding to the fourth voltage reduction gear, the ratio value of the fourth voltage reduction gear, and the number of cycles of the electronic device.

[0279] Among them, the aging value of the minimum number of cycles corresponding to the fourth step-down gear is related to the aging value of the minimum number of cycles corresponding to the third step-down gear, the ratio value of the third step-down gear, the minimum number of cycles corresponding to the fourth step-down gear, the minimum number of cycles corresponding to the third step-down gear, the aging value of the minimum number of cycles corresponding to the second step-down gear, the aging value of the minimum number of cycles corresponding to the first step-down gear, the ratio value of the first step-down gear, the minimum number of cycles corresponding to the second step-down gear, and the ratio value of the minimum number of cycles corresponding to the first step-down gear and the second step-down gear; the aging value represents the aging degree of the battery, and the The proportional values ​​of the four step-down gears represent the rate at which the battery aging degree deepens with the increase of the number of cycle cycles in the fourth step-down gear, the proportional value of the third step-down gear represents the rate at which the battery aging degree deepens with the increase of the number of cycle cycles in the third step-down gear, the proportional value of the first step-down gear represents the rate at which the battery aging degree deepens with the increase of the number of cycle cycles in the first step-down gear, the proportional value of the second step-down gear represents the rate at which the battery aging degree deepens with the increase of the number of cycle cycles in the second step-down gear, and the aging value of the first step-down gear corresponding to the minimum number of cycle cycles is equal to the first value.

[0280] Exemplarily, the fourth value satisfies the following formula (13):

[0281]

[0282] Among them, ε1 is the aging value of the minimum number of cycles corresponding to the second step-down gear, ε0 is the aging value of the minimum number of cycles corresponding to the first step-down gear, k0 is the proportional value of the first step-down gear, ε0 is equal to the first value, c1 is the minimum number of cycles corresponding to the second step-down gear, c0 is the minimum number of cycles corresponding to the first step-down gear, k1 is the proportional value of the second step-down gear, ε2 is the aging value of the minimum number of cycles corresponding to the third step-down gear, k2 is the proportional value of the third step-down gear, c p is the number of cycles of the electronic device, c2 is the minimum number of cycles corresponding to the third step-down gear, c3 is the minimum number of cycles corresponding to the fourth step-down gear, ε 3,p is the fourth value, ε3 is the aging value of the minimum number of cycles corresponding to the fourth voltage reduction gear, and k3 is the proportional value of the fourth voltage reduction gear.

[0283] For example, ε 3,p Can be Figure 4 The result in formula (7) in the embodiment. p = c3, ε 3,p Can be Figure 4 The result in formula (8) of the embodiment. c3 can be Figure 4 In the embodiment, cycle_buffer[3]. ε3 can be Figure 4temp[3] in the embodiment. k3 can be Figure 4 c[3] in the embodiment.

[0284] In this way, in the fourth step-down gear, the target result is positively correlated with the aging value of the minimum number of cycles corresponding to the fourth step-down gear and the minimum number of cycles corresponding to the fourth step-down gear, and the target result is negatively correlated with the number of cycles of the electronic device and the rate of change of the aging degree of the battery in the fourth step-down gear.

[0285] Among them, in the fourth voltage reduction gear, the aging value of the minimum number of cycle periods corresponding to the fourth voltage reduction gear is negatively correlated with the aging value of the minimum number of cycle periods corresponding to the previous voltage reduction gear (i.e., the third voltage reduction gear) of the electronic device and the minimum number of cycle periods corresponding to the previous voltage reduction gear of the electronic device, and the aging value of the minimum number of cycle periods corresponding to the fourth voltage reduction gear is negatively correlated with the rate of change of the aging degree of the electronic device in the previous voltage reduction gear and the minimum number of cycle periods corresponding to the fourth voltage reduction gear.

[0286] Thereby, in the fourth step-down gear, the target result matches the aging degree of the battery, thereby reducing the probability of a power jump displayed before and after the electronic device is restarted, and reducing the probability of a power jump displayed on the electronic device after the electronic device is restarted.

[0287] Optionally, at a fifth moment, the power meter chip transmits the voltage reduction level of the electronic device to the AP. The fifth moment is later than the first moment.

[0288] At the sixth moment, the AP transmits the aging coefficient corresponding to the voltage reduction level of the electronic device to the power meter chip. The sixth moment is later than the fifth moment, and the sixth moment is earlier than the third moment.

[0289] For example, Figure 6 As shown in steps S601-S602, the power meter chip transmits the voltage reduction level of the electronic device to the AP. Figure 6 As shown in steps S603-S605, the AP obtains the configuration parameters corresponding to the voltage reduction gear of the electronic device, the configuration parameters including the identification and aging coefficient of the voltage reduction gear of the electronic device, and the AP transmits the configuration parameters including the aging coefficient corresponding to the voltage reduction gear of the electronic device to the power meter chip.

[0290] In this way, the power meter chip can calculate the power according to the aging coefficient corresponding to the voltage reduction gear of the electronic device to display the power of the subsequent electronic device.

[0291] Optionally, the electronic device further comprises a register, which may be Figure 3 The register 322 in the embodiment. The power display method provided in this embodiment also includes:

[0292] At the seventh moment, the power meter chip stores the voltage reduction gear of the electronic device in the register, and stores the aging coefficient corresponding to the voltage reduction gear in the static storage area of ​​the memory. The seventh moment is earlier than the first moment.

[0293] At the eighth moment, the electronic device is turned off, and the static storage area does not contain the aging coefficient corresponding to the voltage reduction gear. The eighth moment is later than the seventh moment, and the eighth moment is earlier than the first moment.

[0294] Exemplarily, when the available memory space of the register is small, the fuel meter chip obtains the voltage reduction gear and the aging coefficient corresponding to the voltage reduction gear from the AP. The fuel meter chip can store the voltage reduction gear of the electronic device in the register, and store the aging coefficient corresponding to the voltage reduction gear in the static storage area of ​​the memory. In this way, as long as the electronic device is not turned off, the fuel meter chip can calculate the power according to the aging coefficient corresponding to the voltage reduction gear of the electronic device. If the electronic device is turned off, the aging coefficient in the static storage area is destroyed. Therefore, when the electronic device is turned off, the static storage area does not contain the aging coefficient corresponding to the voltage reduction gear.

[0295] The present application also provides a method for displaying power, which is applied to an electronic device, wherein the electronic device includes an application processor AP, a power meter chip, and a register, wherein the AP is provided with an aging coefficient of the electronic device, and the register stores a voltage reduction gear of the electronic device. The method for displaying power provided in this embodiment may include the following S901-S907:

[0296] S901. At a ninth moment, the electronic device is turned on and displays a third power level.

[0297] S902: Starting from the ninth moment, within a preset time period, the voltage reduction gear stored in the register changes, and the electronic device displays a fourth power level.

[0298] S903: Starting from the ninth moment, after a preset time, the voltage reduction gear stored in the register changes, and the electronic device displays a fourth power level.

[0299] S904: At the tenth time, the electronic device is turned off. The tenth time is later than the ninth time.

[0300] S905, at the eleventh moment, the electronic device is turned on, and the electronic device displays the fifth power level. The eleventh moment is later than the tenth moment.

[0301] S906: Starting from the eleventh moment, within the preset time period, the voltage reduction gear stored in the register does not change, and the electronic device displays the fifth power level.

[0302] S907: Starting from the eleventh moment, after a preset time, the voltage reduction gear stored in the register changes, and the electronic device displays the fifth power level.

[0303] For example, at the ninth moment, the electronic device is turned on and displays a third power level, where the third power level may be Figure 4 The UI in the embodiment displays the power level, and the third power level may be the amount of power that the electronic device performs. Figure 4 The steps S400-S404 in the embodiment are obtained, and it can be known that the third power is related to the voltage reduction gear of the electronic device and the number of cycles of the electronic device. It can be understood that the voltage reduction gear of the electronic device is stored in the register, and the third power is also related to the voltage reduction gear stored in the register.

[0304] From the ninth moment on, if the power meter chip does not obtain the aging coefficient from the AP within the preset time, the power displayed by the electronic device can be Figure 4 The UI in the embodiment displays the power level, such as Figure 4 As shown in steps S400-S404 of the embodiment, the power level is related to the voltage reduction gear stored in the register. If the voltage reduction gear stored in the register changes, the power level also changes accordingly. Therefore, starting from the ninth moment, within the preset time period, the voltage reduction gear stored in the register changes, and the electronic device can display the fourth power level.

[0305] Starting from the ninth moment, within the preset time, if the voltage reduction gear stored in the register changes, for example, the voltage reduction gear stored in the register changes from voltage reduction gear A to voltage reduction gear B, the power meter chip can be used according to Figure 6 In the embodiment, steps S601-S603 transmit the voltage reduction gear (i.e., voltage reduction gear B) stored in the register to the AP, and the power meter chip can Figure 6 In the embodiment, steps S604-S606 obtain the aging coefficient corresponding to the voltage reduction gear B from the AP. Starting from the ninth moment, after a preset time, if the voltage reduction gear stored in the register changes, for example, the voltage reduction gear stored in the register changes from the voltage reduction gear B to the voltage reduction gear C, the power meter chip still calculates the power according to the aging coefficient obtained from the AP. The process of obtaining the power is as follows: Figure 6 As shown in steps S607-S610 of the embodiment, the aging coefficient obtained by the power meter chip from the AP is only related to the voltage reduction gear B transmitted by the power meter chip to the AP. In this way, the power obtained by the power meter chip is independent of the voltage reduction gear C stored in the register after the power meter chip transmits the voltage reduction gear to the AP. Therefore, after the power meter chip transmits the voltage reduction gear to the AP, if the voltage reduction gear stored in the register changes, the electronic device can still obtain the fourth power according to the obtained aging coefficient. The fourth power can be Figure 6 The UI in the embodiment displays the power level, so that the electronic device can Figure 6 In the embodiment, steps S611 - S615 display the fourth power level.

[0306] Starting from the ninth moment, after a preset time, the fuel gauge chip obtains the aging coefficient corresponding to the voltage reduction gear stored in the register from the AP, and the fuel gauge chip can store the aging coefficient corresponding to the voltage reduction gear in the general storage space of the register.

[0307] At the tenth moment, the electronic device is turned off and the aging coefficient stored in the static storage area is destroyed.

[0308] At the eleventh moment, the electronic device is turned on and displays the fifth power level. The fifth power level is related to the voltage reduction gear stored in the register. The principle of obtaining the fifth power level is similar to the principle of obtaining the third power level, which will not be described in detail.

[0309] Starting from the eleventh moment, within the preset time, the power meter chip does not obtain the aging coefficient from the AP, and the power displayed by the electronic device is still related to the voltage reduction gear stored in the register. If the voltage reduction gear stored in the register does not change, the electronic device can still display the fifth power.

[0310] Starting from the eleventh moment, after the preset time, after the power meter chip transmits the voltage reduction gear stored in the register to the AP, if the voltage reduction gear stored in the register changes, the electronic device can still display the fifth power. Starting from the eleventh moment, after the preset time, the voltage reduction gear stored in the register changes, and the specific implementation principle of the electronic device displaying the fifth power is similar to the specific implementation principle of the electronic device displaying the fourth power after the voltage reduction gear stored in the register changes from the ninth moment and the preset time, and will not be repeated.

[0311] The present application also provides a method for displaying power, which is applied to an electronic device, wherein the electronic device includes an application processor AP, a power meter chip, and a register, wherein the AP is provided with an aging coefficient of the electronic device, and the register stores a voltage reduction gear of the electronic device. The method for displaying power provided in this embodiment may include the following S1001-S1007:

[0312] S1001. At the twelfth moment, the electronic device is turned on and displays a sixth power level.

[0313] S1002. Starting from the twelfth moment, within a preset time period, the voltage reduction gear stored in the register changes, and the electronic device displays the seventh power level.

[0314] S1003: Starting from the twelfth moment, after a preset time, the voltage reduction gear stored in the register changes, and the electronic device displays a sixth power level.

[0315] S1004: At the thirteenth moment, the electronic device is turned off. The thirteenth moment is later than the twelfth moment.

[0316] S1005, at the fourteenth moment, the electronic device is turned on, and the electronic device displays the eighth power level. The fourteenth moment is later than the thirteenth moment.

[0317] S1006. Starting from the fourteenth moment, within the preset time period, the voltage reduction level stored in the register does not change, and the electronic device displays the eighth power level.

[0318] S1007. Starting from the fourteenth moment, after a preset time, the voltage reduction gear stored in the register changes, and the electronic device displays the eighth power level.

[0319] By way of example, the specific implementation principles of S1001 and S901 are similar and will not be described in detail.

[0320] The specific implementation principles of S1002 and S902 are similar and will not be repeated here.

[0321] From the twelfth moment on, within the preset time, the fuel gauge chip can Figure 6 In the embodiment, steps S601-S603 transmit the voltage reduction gear (e.g., voltage reduction gear A) stored in the register to the AP, so that the power meter chip can be based on Figure 6 In the embodiment, steps S604-S606 obtain the aging coefficient corresponding to the voltage reduction gear A from the AP. Starting from the twelfth moment, within the preset time, after the power meter chip transmits the voltage reduction gear A to the AP, if the voltage reduction gear stored in the register changes, for example, the voltage reduction gear stored in the register changes from the voltage reduction gear A to the voltage reduction gear B, and starting from the twelfth moment, after the preset time, if the voltage reduction gear stored in the register changes again, for example, the voltage reduction gear stored in the register changes from the voltage reduction gear B to the voltage reduction gear C, the power meter chip still calculates the power according to the aging coefficient obtained from the AP, and the process of obtaining the power is as follows: Figure 6 As shown in steps S607-S610 of the embodiment, the aging coefficient obtained by the power meter chip from the AP is only related to the voltage reduction gear A transmitted by the power meter chip to the AP. In this way, the power obtained by the power meter chip is independent of the voltage reduction gear stored in the register after the power meter chip transmits the voltage reduction gear to the AP. Therefore, after the power meter chip transmits the voltage reduction gear to the AP, if the voltage reduction gear stored in the register changes, the electronic device can still obtain the sixth power according to the obtained aging coefficient. The sixth power can be Figure 6 The UI in the embodiment displays the power level, so that the electronic device can Figure 6 In the embodiment, steps S611 - S615 display the fourth power level.

[0322] The specific implementation principles of S1004 and S904 are similar and will not be repeated here.

[0323] The specific implementation principles of S1005 and S905 are similar and will not be repeated here.

[0324] The specific implementation principles of S1006 and S906 are similar and will not be repeated here.

[0325] Starting from the fourteenth moment, after the preset time, after the power meter chip transmits the voltage reduction gear to the AP, if the voltage reduction gear stored in the register changes, the electronic device can still display the eighth power. Starting from the fourteenth moment, after the preset time, the voltage reduction gear stored in the register changes, and the specific implementation principle of the electronic device displaying the eighth power is similar to the specific implementation principle of the electronic device displaying the eighth power from the fourteenth moment, within the preset time, the voltage reduction gear stored in the register does not change, and the electronic device displays the eighth power, which will not be repeated.

[0326] From the above embodiments, it can be seen that when the power meter chip does not obtain the aging coefficient from the AP, the power displayed by the electronic device is not related to the aging coefficient in the AP, but is related to the voltage reduction gear stored in the register. When the power meter chip can obtain the aging coefficient from the AP, the power displayed by the electronic device is related to the aging coefficient obtained from the AP, but is not related to the voltage reduction gear stored in the register.

[0327] Since the voltage reduction gear can reflect the degree of battery aging, the power display method provided in the above embodiment can also reduce the probability of power jump before and after the electronic device is restarted.

[0328] It can be understood that the first moment, the second moment, the third moment, ... in the embodiments of the present application are intended to indicate the timing of the steps rather than to limit specific moments.

[0329] In order to better understand the embodiments of the present application, Fig. 9 , the structure of the electronic device in the embodiment of the present application is described.

[0330] Fig. 9 A schematic structural diagram of an electronic device 100 provided in an embodiment of the present application is shown.

[0331] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0332] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0333] The power display method provided in the embodiment of the present application can be applied to electronic devices with communication functions. The electronic devices include terminal devices, and the specific device form of the terminal devices can refer to the above related descriptions, which will not be repeated here.

[0334] The power display method of the embodiment of the present application has been described above, and the device for executing the above method provided by the embodiment of the present application is described below. Those skilled in the art can understand that the method and the device can be combined and referenced with each other, and the relevant device provided by the embodiment of the present application can execute the steps in the above method.

[0335] An embodiment of the present application provides an electronic device, which includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the above method.

[0336] The present application embodiment provides a chip. The chip is used to call a computer program in a memory to execute the steps executed by the fuel gauge chip in the above embodiment, or to execute the steps executed by the AP in the above embodiment. Its implementation principle and technical effect are similar to those of the above related embodiments, and will not be repeated here.

[0337] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. The above method is implemented when the computer program is executed by the processor. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.

[0338] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, disk storage or other magnetic storage devices, or any other medium that is intended to carry or store the required program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to transmit software from a website, server or other remote source, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disks and optical disks as used herein include optical disks, laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer-readable media.

[0339] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the above method.

[0340] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0341] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for displaying electric quantity, characterized in that: Applied to an electronic device, the electronic device includes an application processor AP and a power meter chip, the AP is provided with an aging coefficient of the electronic device, and the method includes: At a first moment, the electronic device is turned on, and the power meter chip obtains a first power quantity, where the first power quantity is related to the number of cycles of the battery and the voltage reduction gear of the electronic device, and has nothing to do with the aging coefficient of the electronic device set in the AP; At a second moment, the power meter chip transmits the first power to the AP, so that the electronic device displays the first power; the second moment is later than the first moment; At a third moment, the power meter chip obtains a second power; the second power is related to an aging coefficient of the electronic device set in the AP, and the aging coefficient is obtained by the power meter chip from the AP between the first moment and the third moment; the third moment is later than the second moment; At a fourth moment, the power meter chip transmits the second power level to the AP, so that the electronic device displays the second power level; the fourth moment is later than the third moment.

2. The method according to claim 1, characterized in that The first power is calculated according to the target result and the actual power of the electronic device; the target result represents the aging degree of the battery, and the target result satisfies the following conditions: When the voltage reduction gear of the electronic device is the first voltage reduction gear, the target result is a first value, and the first value is a fixed value; When the voltage reduction gear of the electronic device is the second voltage reduction gear, the target result is a second value; the first value is greater than the second value, the second value is a value that changes in the second voltage reduction gear according to the increase of the number of cycle periods, and the number of cycle periods of the second voltage reduction gear is greater than the number of cycle periods of the first voltage reduction gear.

3. The method according to claim 2, characterized in that The second value is related to the minimum number of cycles corresponding to the second step-down gear, the aging value of the minimum number of cycles corresponding to the second step-down gear, the proportional value of the second step-down gear and the number of cycles of the electronic device; the aging value represents the aging degree of the battery, and the proportional value of the second step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycles in the second step-down gear.

4. The method according to claim 3, characterized in that The second value satisfies the following formula: e 1,p =ε1-k1×(c p -c1) Among them, the ε 1,p is the second value, ε1 is the aging value of the minimum number of cycles corresponding to the second voltage reduction gear, k1 is the proportional value of the second voltage reduction gear, and c p is the number of cycles of the electronic device, and c1 is the minimum number of cycles corresponding to the second voltage reduction gear.

5. The method according to claim 4, characterized in that The ε1 satisfies the following formula: ε1=ε0-k0×(c1-c0) Among them, k0 is the proportional value of the first step-down gear, k0 represents the rate at which the aging degree of the battery deepens with the increase of the number of cycle cycles in the first step-down gear, ε0 is the aging value of the minimum number of cycle cycles corresponding to the first step-down gear, ε0 is equal to the first value, and c0 is the minimum number of cycle cycles corresponding to the first step-down gear.

6. The method according to any one of claims 2 to 5, characterized in that: When the voltage reduction gear of the electronic device is the third voltage reduction gear, the target result is a third value; the second value is greater than the third value, and the third value is a value that changes in the third voltage reduction gear according to the increase of the number of cycle periods, and the number of cycle periods of the third voltage reduction gear is greater than the number of cycle periods of the second voltage reduction gear.

7. The method according to claim 6, characterized in that The third value is related to the minimum number of cycles corresponding to the third voltage reduction gear, the aging value of the minimum number of cycles corresponding to the third voltage reduction gear, the ratio value of the third voltage reduction gear and the number of cycles of the electronic device; Among them, the aging value of the minimum number of cycles corresponding to the third step-down gear is related to the aging value of the minimum number of cycles corresponding to the second step-down gear, the aging value of the minimum number of cycles corresponding to the first step-down gear, the proportional value of the first step-down gear, the minimum number of cycles corresponding to the second step-down gear, the minimum number of cycles corresponding to the first step-down gear, the proportional value of the second step-down gear, and the minimum number of cycles corresponding to the third step-down gear; the aging value represents the aging degree of the battery, the proportional value of the third step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycles in the third step-down gear, the proportional value of the first step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycles in the first step-down gear, the proportional value of the second step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycles in the second step-down gear, and the aging value of the first step-down gear corresponding to the minimum number of cycles is equal to the first value.

8. The method according to claim 7, characterized in that The third value satisfies the following formula: Wherein, ε1 is the aging value of the minimum number of cycles corresponding to the second step-down gear, ε0 is the aging value of the minimum number of cycles corresponding to the first step-down gear, k0 is the proportional value of the first step-down gear, ε0 is equal to the first value, c1 is the minimum number of cycles corresponding to the second step-down gear, c0 is the minimum number of cycles corresponding to the first step-down gear, k1 is the proportional value of the second step-down gear, and ε 2,p is the third value, ε2 is the aging value of the minimum number of cycles corresponding to the third voltage reduction gear, k2 is the proportional value of the third voltage reduction gear, and c p is the cycle number of the electronic device, and c2 is the minimum cycle number corresponding to the third voltage reduction gear.

9. The method according to any one of claims 2-5, 7-8, characterized in that: When the voltage reduction gear of the electronic device is the fourth voltage reduction gear, the target result is a fourth value; the third value is greater than the fourth value, the fourth value is a value that changes in the fourth voltage reduction gear according to an increase in the number of cycles, and the number of cycles of the fourth voltage reduction gear is greater than the number of cycles of the third voltage reduction gear; When the voltage reduction gear of the electronic device is the fifth voltage reduction gear, the target result is the fifth value; the fourth value is greater than the fifth value, the fifth value is a fixed value, and the number of cycles of the fifth voltage reduction gear is greater than the number of cycles of the fourth voltage reduction gear.

10. The method according to claim 9, characterized in that The fourth value is related to the minimum number of cycles corresponding to the fourth voltage reduction gear, the aging value of the minimum number of cycles corresponding to the fourth voltage reduction gear, the ratio value of the fourth voltage reduction gear and the number of cycles of the electronic device; Among them, the aging value of the minimum number of cycles corresponding to the fourth step-down gear is related to the aging value of the minimum number of cycles corresponding to the third step-down gear, the ratio value of the third step-down gear, the minimum number of cycles corresponding to the fourth step-down gear, the minimum number of cycles corresponding to the third step-down gear, the aging value of the minimum number of cycles corresponding to the second step-down gear, the aging value of the minimum number of cycles corresponding to the first step-down gear, the ratio value of the first step-down gear, the minimum number of cycles corresponding to the second step-down gear, and the ratio value of the minimum number of cycles corresponding to the first step-down gear and the second step-down gear; the aging value represents the aging degree of the battery, and the The proportional value of the fourth step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycles in the fourth step-down gear, the proportional value of the third step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycles in the third step-down gear, the proportional value of the first step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycles in the first step-down gear, the proportional value of the second step-down gear represents the rate at which the aging degree of the battery deepens with the increase of the number of cycles in the second step-down gear, and the aging value of the first step-down gear corresponding to the minimum number of cycles is equal to the first value.

11. The method according to any one of claims 1-5, 7-8, and 10, characterized in that: At a fifth moment, the power meter chip transmits the voltage reduction gear of the electronic device to the AP; the fifth moment is later than the first moment; At a sixth moment, the AP transmits an aging coefficient corresponding to the voltage reduction gear of the electronic device to the power meter chip; the sixth moment is later than the fifth moment, and the sixth moment is earlier than the third moment.

12. The method according to any one of claims 1-5, 7-8, and 10, characterized in that: The electronic device further includes a register, and the method further includes: At a seventh moment, the electricity meter chip stores the voltage reduction gear of the electronic device in the register, and stores the aging coefficient corresponding to the voltage reduction gear in a static storage area of ​​the memory; the seventh moment is earlier than the first moment; At the eighth moment, the electronic device is turned off, and the static storage area does not contain the aging coefficient corresponding to the voltage reduction gear; the eighth moment is later than the seventh moment, and the eighth moment is earlier than the first moment.

13. A method for displaying electric quantity, characterized in that: Applied to an electronic device, the electronic device includes an application processor AP, a power meter chip and a register, the AP is provided with an aging coefficient of the electronic device, the register stores a voltage reduction gear of the electronic device, and the method includes: At the ninth moment, the electronic device is turned on and displays a third power level, wherein the third power level is related to the voltage reduction gear of the electronic device and has nothing to do with the aging coefficient of the electronic device; Starting from the ninth moment, within a preset time period, the voltage reduction gear stored in the register changes, and the electronic device displays a fourth electrical quantity related to the voltage reduction gear and unrelated to the aging coefficient; Starting from the ninth moment, after the preset time period, the voltage reduction gear stored in the register changes, and the electronic device displays the fourth power level that is related to the aging coefficient in the AP and is unrelated to the voltage reduction gear; At the tenth moment, the electronic device is turned off; the static storage area does not include the aging coefficient corresponding to the voltage reduction gear, and the tenth moment is later than the ninth moment; At the eleventh moment, the electronic device is turned on and displays a fifth power level; the fifth power level is related to the voltage reduction gear of the electronic device and has nothing to do with the aging coefficient of the electronic device. The eleventh moment is later than the tenth moment; Starting from the eleventh moment, within the preset time period, the voltage reduction gear stored in the register does not change, and the electronic device displays the fifth power level; Starting from the eleventh moment, after the preset time period, the voltage reduction gear stored in the register changes, and the electronic device displays the fifth power level.

14. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor is used to execute the computer-executable instructions stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 12, or the electronic device executes the method according to claim 13.

15. 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 12 is implemented; or, when the computer program is executed by a processor, the method according to claim 13 is implemented.

16. A computer program product, characterized in that The method comprises a computer program, which, when being executed, enables a computer to execute the method according to any one of claims 1 to 12, or enables a computer to execute the method according to claim 13.

17. A chip, characterized in that: The chip is used to call a computer program in a memory to execute the steps executed by the fuel gauge chip in the method according to any one of claims 1-13, or to execute the steps executed by the AP in the method according to any one of claims 1-13.