Power consumption information statistical method and device, electronic equipment and readable storage medium

By conducting fine-grained statistics and displaying the power consumption of applications and devices running on the front desk, the problem of insufficient power consumption information in the existing technology is solved, and high power consumption time and proportion analysis is provided to help users optimize power use. Improved user experience.

CN119149342APending Publication Date: 2024-12-17VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411294722.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The prior art cannot provide finer granular power statistics, making it difficult for users to understand the power consumption of mobile phones, and cannot intuitively reflect the switching trajectory and specific power consumption reasons for the application.

Method used

By obtaining the power consumption of each front-end running application and its devices in a specified time period, and counting and displaying it based on the high power consumption time and proportion, providing finer-grained power statistics and optimization prompt information.

Benefits of technology

It realizes fine-grained statistics and display of power consumption of applications and devices, helping users understand the specific reasons for power consumption, reduce battery life anxiety, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149342A_ABST
    Figure CN119149342A_ABST
Patent Text Reader

Abstract

The invention discloses a power consumption information statistical method and device, electronic equipment and a readable storage medium, and belongs to the technical field of electronic equipment. The power consumption information statistical method comprises the following steps: for each first application program running in a foreground in a first time period, acquiring first power consumption of the first application program in the foreground running time period and second power consumption of each device of the first application program in the foreground running time period; and displaying power consumption information of the electronic equipment in the first time period according to the foreground running duration, the first power consumption and the second power consumption of each first application program in the first time period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of electronic equipment, and in particular, relates to a method and device for counting power consumption information, an electronic device, and a readable storage medium. Background Art

[0002] Currently, more and more users are paying attention to the battery life of mobile phones. At present, the battery power statistics provided by major manufacturers only count the power consumption from one dimension of application or hardware. The statistical dimension of this solution is rough, and users cannot understand the power consumption in a more fine-grained manner. Summary of the invention

[0003] The embodiments of the present application provide a method, device, electronic device and readable storage medium for counting power consumption information, which can achieve more fine-grained power statistics and display.

[0004] In order to solve the above technical problems, this application is implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a method for collecting power consumption information, including:

[0006] For each first application running in the foreground during a first time period, obtaining a first power consumption of the first application during the foreground running time period, and a second power consumption of each component of the first application during the foreground running time period;

[0007] The power consumption information of the electronic device in the first time period is displayed according to the foreground running time, the first power consumption and the second power consumption of each first application in the first time period.

[0008] Optionally, obtaining a first power consumption of the first application program during a foreground running time period includes:

[0009] A first power consumption of the first application program in the foreground running time period is determined according to the remaining battery capacity at the start time and the remaining battery capacity at the end time of the foreground running time period.

[0010] Optionally, obtaining the second power consumption of each component of the first application during the foreground running time period includes:

[0011] Acquire the third power consumption of each component of the electronic device during the foreground operation time period;

[0012] Taking the first power consumption as a reference, processing the third power consumption of each device in the foreground operation time period to obtain the second power consumption of each device in the foreground operation time period;

[0013] The sum of the second power consumption of each component after processing in the foreground operation time period is equal to the first power consumption.

[0014] Optionally, the power consumption information includes at least one of the following:

[0015] The first power consumption of any first application during the foreground running time period;

[0016] a second power consumption of each component of any first application program during a foreground running time period;

[0017] a fourth power consumption of any first application in the first time period;

[0018] the fifth power consumption of each device of any first application in the first time period;

[0019] a sixth power consumption of any first application within a specified running time period;

[0020] a seventh power consumption of each component of any first application within a specified running time period;

[0021] The eighth power consumption of the electronic device during the specified time period.

[0022] Optionally, the method further includes:

[0023] Obtaining high power consumption duration of each device of the first application in the first time period;

[0024] Displaying high power consumption information according to the high power consumption duration;

[0025] The high power consumption information includes at least one of the following:

[0026] The duration of high power consumption of each device in the first time period;

[0027] The proportion of high power consumption time of each device in the first time period;

[0028] The high power consumption duration of each device during the foreground running time period of the first application;

[0029] The proportion of high power consumption time of each device during the foreground running time period of the first application.

[0030] Optionally, the method further includes:

[0031] Display power optimization prompt information according to the high power consumption information.

[0032] In a second aspect, an embodiment of the present application provides a power consumption information statistics device, including:

[0033] A first acquisition module is used to acquire, for each first application running in the foreground within a first time period, a first power consumption of the first application within the foreground running time period, and a second power consumption of each component of the first application within the foreground running time period;

[0034] The first display module is used to display the power consumption information of the electronic device in the first time period according to the foreground running time of each first application in the first time period, the first power consumption and the second power consumption.

[0035] Optionally, the first acquisition module includes:

[0036] A first acquisition unit, configured to acquire a third power consumption of each component of the electronic device during the foreground operation time period;

[0037] a processing unit, configured to process a third power consumption of each device in the foreground operation time period based on the first power consumption, so as to obtain a second power consumption of each device in the foreground operation time period;

[0038] The sum of the second power consumption of each component after processing in the foreground operation time period is equal to the first power consumption.

[0039] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the above-mentioned power consumption information statistics method.

[0040] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the above-mentioned power consumption information statistics method are implemented.

[0041] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0042] In a sixth aspect, an embodiment of the present application provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the method described in the first aspect.

[0043] In an embodiment of the present application, for each first application running in the foreground during a first time period, a first power consumption of the first application during the foreground running time period and a second power consumption of each component of the first application during the foreground running time period are obtained; based on the foreground running time, the first power consumption and the second power consumption of each first application during the first time period, the power consumption information of the electronic device during the first time period is displayed, thereby enabling statistics on power consumption of each component dimension based on the application during the foreground running time period, and achieving more fine-grained power statistics and display. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 is a flowchart of a power consumption information statistics method according to an embodiment of the present application;

[0045] Figure 2 It is a schematic diagram of the actual application implementation process of the embodiment of the present application;

[0046] Figure 3 It is a schematic diagram of the specific implementation process of data statistics;

[0047] Figure 4 This is a schematic diagram of the battery power usage page;

[0048] Figure 5 This is a schematic diagram of the application power consumption drop-down list display box;

[0049] Figure 6 This is a schematic diagram of the application power consumption details interface;

[0050] Figure 7 This is a schematic diagram of the device power consumption drop-down list display box;

[0051] Figure 8 This is a schematic diagram of the power consumption suggestion interface;

[0052] Fig. 9 It is a module schematic diagram of a power consumption information statistics device according to an embodiment of the present application;

[0053] Fig.10 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

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

[0055] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0056] The power consumption information statistics method, device, electronic device and readable storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0057] like Figure 1 As shown, an embodiment of the present application provides a method for counting power consumption information, which is applied to an electronic device, including:

[0058] Step 101, for each first application running in the foreground during a first time period, obtaining a first power consumption of the first application during the foreground running time period, and a second power consumption of each component of the first application during the foreground running time period;

[0059] Optionally, the first time period refers to a cycle of power statistics, and power consumption statistics are performed within a cycle of power statistics, and power consumption statistics are performed again in the next cycle of power statistics; for example, the first time period can be set to 24 hours, and the power consumption information is cleared and counted again every 24 hours.

[0060] Optionally, the first application running in the foreground in the embodiment of the present application can be understood as the application currently running on the display interface of the electronic device, that is, the display interface of the electronic device displays the application interface of the application.

[0061] Optionally, the devices mentioned in the embodiments of the present application may include but are not limited to at least one of the following: a screen, a processor, a WLAN module, a mobile data module, an audio playback module, a Bluetooth module, a positioning module, a sensor, a graphics processor (GPU), a memory, and a standby module.

[0062] It should be noted here that, except for the standby module, the above-mentioned devices are all real hardware contained in the electronic device. Optionally, the standby module is only the module corresponding to the electronic device when the screen is off. Although it is called the standby module in this application, it actually corresponds to a series of hardware involved in the electronic device when the screen is off. For the convenience of description, the series of hardware involved in the electronic device when the screen is off is called the standby module.

[0063] Step 102, displaying power consumption information of the electronic device in the first time period according to the foreground running time, the first power consumption, and the second power consumption of each first application in the first time period;

[0064] Optionally, the foreground running time duration may be determined by the time length corresponding to the foreground running time period.

[0065] It should be noted that, in an embodiment of the present application, for each first application running in the foreground during a first time period, the first power consumption of the first application during the foreground running time period and the second power consumption of each component of the first application during the foreground running time period are obtained; based on the foreground running time, the first power consumption and the second power consumption of each first application during the first time period, the power consumption information of the electronic device during the first time period is displayed, thereby enabling statistics on power consumption of each component dimension based on the application during the foreground running time period, and achieving more fine-grained power statistics and display.

[0066] Optionally, in one implementation, after the power consumption information is determined, the power consumption information may be displayed to facilitate the user to view the power consumption information.

[0067] It should be noted that, since the first application may not be running continuously in the foreground, that is, the foreground running time period is not a continuous time period, that is to say, the foreground running time period may be composed of multiple scattered time periods; for example, by splitting the first time period using preset time units (which can be understood as the statistical period within the first time period), the power consumption in each preset time unit is counted separately, so that the power consumption in the foreground running time period can be determined, that is, the power consumption in the foreground running time period is determined by the sum of the power consumption in multiple preset time units.

[0068] Optionally, it should also be noted that, in the case where there is no switching of the first application running in the foreground, the preset time unit is a preset fixed duration (for example, 1 minute). If the switching of the first application running in the foreground occurs within the fixed duration, the preset time unit corresponding to the switching of the first application running in the foreground is only the duration from the end of the previous fixed duration to the switching of the first application running in the foreground, that is, the length of the preset time unit in this case is less than the preset fixed duration. In this case, the foreground running time period of the first application is composed of all preset time units corresponding to the first application in the first time period.

[0069] For example, taking the preset time unit as 1 minute for statistics, a piece of data is recorded every 1 minute. If the first application running in the foreground is switched or the screen is turned off, and the recording time is less than 1 minute (for example, 30 seconds), the data will also be counted as one record data.

[0070] Optionally, in one implementation, the power consumption information includes at least one item from A11 to A15:

[0071] A11, a first power consumption of any first application during a foreground running time period;

[0072] That is to say, in the embodiment of the present application, the power consumption of each first application running in the foreground during the foreground running time period can be statistically obtained.

[0073] A12, a second power consumption of each component of any first application program during a foreground running time period;

[0074] It should be noted that, by counting the second power consumption of each component of any first application during the foreground running time period, the user can clearly understand the power consumption of each component when different first applications are running.

[0075] A13, the fourth power consumption of any first application in the first time period;

[0076] It should be noted that in the embodiment of the present application, the power consumption of the first application in the foreground running time period is counted during the first time period, so the fourth power consumption of the first application in the first time period is equivalent to the first power consumption of the first application in the foreground running time period.

[0077] A14, the fifth power consumption of each device of any first application in the first time period;

[0078] It should be noted that in the embodiment of the present application, what is counted during the first time period is the power consumption of each component of the first application during the foreground running time period. Therefore, the fifth power consumption of each component of the first application during the first time period is equivalent to the second power consumption of each component of the first application during the foreground running time period.

[0079] A15, the sixth power consumption of any first application within a specified running time period;

[0080] Optionally, the designated running time period refers to a time period selected by the user. If the user only wants to view the power consumption of a certain application within a period of time, the user can select the time period he wants to view within the first time period. Based on the first power consumption of the application in the foreground running time period within the first time period, the sixth power consumption of the application in the designated running time period can be determined.

[0081] For example, the first time period is 00:00-23:59. If the user wants to view the power consumption of application A during the time period of 12:00-14:00 in the afternoon, the user can directly obtain the statistical data of the two hours from 12:00 to 14:00 in the statistical data, and then filter out the statistical data of application A in the foreground during these two hours, and then calculate the power consumption.

[0082] A16, the seventh power consumption of each component of any first application within a specified running time period;

[0083] Optionally, if the user only wants to view the power consumption of each component of a certain application within a period of time, the user can select the time period he wants to view within the first time period. Based on the second power consumption of each component of the application in the foreground running time period within the first time period, the seventh power consumption of each component of the application in the specified running time period can be determined.

[0084] For example, the first time period is 00:00-23:59. If the user wants to view the power consumption of each device of application B during the time period of 12:00-14:00 in the noon, the user can directly obtain the statistical data of the two hours from 12:00 to 14:00 in the statistical data, and then filter out the statistical data of each device in which application A is running in the foreground during these two hours, and then calculate the power consumption.

[0085] A17, the eighth power consumption of the electronic device during the specified time period;

[0086] Optionally, if the user only wants to view the power consumption of the electronic device within a certain period of time, the user can select the time period he wants to view within the first time period. Based on the first power consumption of each application in the foreground running time period within the first time period, the eighth power consumption of the electronic device in the specified running time period can be generated.

[0087] For example, the first time period is 00:00-23:59. If the user wants to view the power consumption of the electronic device during the time period of 12:00-14:00 in the noon, the user can directly obtain the statistical data of the two hours from 12:00-14:00 in the statistical data, and then filter out the statistical data within these two hours, and then calculate the power consumption.

[0088] Optionally, when displaying power consumption information, the foreground running time period of the first application can also be displayed. It should be noted that different first applications are distinguished by identification boxes with different characteristics, which may be color characteristics, fill characteristics, etc.; that is, the foreground running time periods of different first applications are identified by different characteristics, so that the user can clearly understand the switching status of the first application used by the user within the preset time period.

[0089] Optionally, the remaining power corresponding to any preset time unit can also be displayed in the embodiment of the present application; it should be noted that compared with the current display method with hours as the granularity, the preset time unit in the embodiment of the present application can be a feature of minutes and seconds, that is, the length of the preset time unit is less than 1 hour. Through the display of finer-grained time, the user can clearly understand the remaining power at a fine granularity.

[0090] Optionally, when displaying the power consumption information, the power consumption of each device may also be displayed, that is, in this case, the total power consumption of each device in the first time period is directly displayed.

[0091] Optionally, in one implementation, the specific implementation of obtaining the first power consumption of the first application during the foreground running time period includes:

[0092] A first power consumption of the first application program in the foreground running time period is determined according to the remaining battery capacity at the start time and the remaining battery capacity at the end time of the foreground running time period.

[0093] It should be noted here that, from the above description, it can be seen that the foreground operation time period may be composed of multiple scattered preset time units. Therefore, when performing power consumption statistics, the remaining battery capacity at the start time and the remaining battery capacity at the end time of each preset time unit should be determined first. The power consumption within the preset time unit can be determined by subtracting the remaining battery capacity at the end time of the preset time unit from the remaining battery capacity at the start time of the preset time unit. The first power consumption within the foreground operation time period can be obtained by adding the power consumption corresponding to all preset time units within the foreground operation time period.

[0094] Optionally, the first power consumption of the first application in the foreground running time period can be understood as the power consumption of the battery end in the foreground running time period.

[0095] Optionally, for the first application, in addition to counting the above-mentioned first power consumption and foreground running time, the percentage of power consumption at the battery end may also be counted.

[0096] It should be noted that in the embodiment of the present application, no distinction is made between applications running in the background, and only the power consumption of the first application running in the foreground is counted.

[0097] Optionally, in one implementation, the specific implementation of the second power consumption of each component of the first application in the foreground running time period includes the following steps:

[0098] Step 11, obtaining the third power consumption of each component of the electronic device during the foreground operation time period;

[0099] It should be noted that this step is based on the statistics of power consumption of each device.

[0100] Optionally, the power consumption of the device can be determined based on the working time of the device and the working current of the device. For example, the power consumption of the device can be obtained by multiplying the working time of the device by the working current of the device. It should be noted here that for the working current of the device, different operating systems have solutions for counting the device current. This is not a problem concerned by the embodiments of the present application and will not be explained in detail here.

[0101] Optionally, the amount of data counted for different devices usually includes not only power consumption, but also some other parameters corresponding to these devices. For example, for the screen, parameters such as the screen running time, screen off display time, screen brightness, etc. can also be counted; for the processor, parameters such as usage time and processor load at different frequencies can also be counted; for the WLAN module and mobile data module, parameters such as traffic flow, download time, signal strength, etc. can also be counted; for the audio playback module, the playback time at different volumes can also be counted; for the Bluetooth module, parameters such as operating time can also be counted; for the standby module, parameters such as duration can also be counted.

[0102] Step 12: Based on the first power consumption, the third power consumption of each device in the foreground operation time period is processed to obtain the second power consumption of each device in the foreground operation time period;

[0103] It should be noted here that, in the embodiment of the present application, it should be ensured that the sum of the second power consumption of each device after processing in the foreground running time period is equal to the first power consumption; because in the embodiment of the present application, the power consumption of the first application and the power consumption of the device are separately counted, it may not be possible to ensure that the sum of the third power consumption of all devices is equal to the first power consumption within the preset time unit, and therefore the third power consumption needs to be processed. In the embodiment of the present application, the first power consumption is used as a reference, and the third power consumption of the device is processed so that the sum of the third power consumption of all devices after processing is equal to the first power consumption, so as to ensure that after the processing is completed, the sum of the second power consumption of each device in the foreground running time period is equal to the first power consumption.

[0104] Optionally, in the embodiment of the present application, the method for processing the third power consumption can be to amplify the value of the third power consumption, that is, multiply the value corresponding to the third power consumption by a multiple value; or it can be to reduce the value of the third power consumption, that is, divide the value corresponding to the third power consumption by a multiple value.

[0105] It should be noted here that, from the above description, it can be seen that the foreground running time period may be composed of multiple scattered preset time units. Therefore, when performing specific processing, it is also based on each preset time unit, that is, based on the power consumption of the first application in the preset time unit, the power consumption of each device in the preset time unit is processed to obtain the power consumption of each device in the preset time unit period.

[0106] For example, the statistics of power consumption of each device during the running of application A within a preset time unit are shown in the original data column in Table 1. In order to make the sum of the power consumption of each device equal to the power consumption of the battery end corresponding to application A, the power consumption of each device needs to be uniformly amplified by 54 / 43 times. The adjusted power consumption of each device is shown in the column after geometric scaling in Table 1.

[0107] Table 1 Comparison table of power consumption before and after alignment

[0108]

[0109]

[0110] It should be noted that, through the above processing, the power consumption data can be kept consistent and the statistical reliability of the power consumption data can be guaranteed.

[0111] Optionally, in one implementation, the method further includes:

[0112] Step 21, obtaining the high power consumption duration of each device of the first application in the first time period;

[0113] Optionally, the high power consumption duration can be understood as the duration of the high power consumption feature; optionally, the high power consumption feature can be pre-set based on different devices. Usually, different devices correspond to different high power consumption features.

[0114] For example, for the screen, highlight (for example, brightness greater than or equal to the first preset value) can be set as a high power consumption feature; for the processor, high frequency (for example, frequency greater than the second preset value, it should be noted here that for different types of processors, the value of the second preset value may be different) can be set as a high power consumption feature; for the WLAN module, weak signal (for example, signal level less than or equal to the third preset value or the first preset range) can be set as a high power consumption feature; for the mobile data module, weak signal (for example, signal level less than or equal to the fourth preset value or the second preset range) can be set as a high power consumption feature; for the audio playback module, high external volume (for example, external volume greater than or equal to the fifth preset value) can be set as a high power consumption feature; for the standby module, audio playback, network download, screen-off display, Bluetooth operation, etc. can be set as high power consumption features.

[0115] It should be noted that the specific values ​​of the preset values ​​or preset ranges mentioned above are set individually based on different characteristics. For example, the unit of the preset value corresponding to the external speaker volume is orders, and the unit of the preset value corresponding to the frequency is GHz.

[0116] Step 22: displaying high power consumption information according to the high power consumption duration;

[0117] The high power consumption information includes at least one item from A21 to A23:

[0118] A21, the duration of high power consumption of each device in the first time period;

[0119] A22, the proportion of high power consumption time of each device in the first time period;

[0120] Optionally, the high power consumption duration ratio in this case is the ratio of the high power consumption duration of each device in the first time period to the total duration of the first time period.

[0121] A23, the duration of high power consumption of each device during the foreground running time of the first application;

[0122] A24, the proportion of high power consumption time of each device during the foreground running time of the first application;

[0123] Optionally, the high power consumption duration ratio in this case is the ratio of the high power consumption duration in the foreground running time period of the first application to the total duration of the foreground running time period of the first application.

[0124] It should be noted that statistics and display of the proportion of high power consumption duration can help users determine how long the high power consumption feature lasts, so that users can optimize power consumption.

[0125] Optionally, in one implementation, the method further includes:

[0126] Display power optimization prompt information according to the high power consumption information.

[0127] Optionally, power optimization prompt information is provided based on high power consumption information, so that power optimization recommendations can be made to users, thereby improving the convenience of users' power saving operations.

[0128] Optionally, the embodiments of the present application can solve the following problems:

[0129] Problem 1: It cannot intuitively reflect the switching track of user application usage at any time;

[0130] In the embodiment of the present application, problem 1 can be solved by displaying the foreground running time period of each first application running in the foreground.

[0131] Problem 2: Users cannot arbitrarily select data from a precise period of time for statistics and display;

[0132] In the embodiment of the present application, the power consumption in any time period can be displayed through fine-grained power consumption statistics.

[0133] Problem 3: It is impossible to give the specific reason why the application consumes power;

[0134] In the embodiment of the present application, by statistics and display of the power consumption of each device in the foreground running time period corresponding to each first application, the proportion of high power consumption time of each device and / or the proportion of high power consumption time of each device in the foreground running time period corresponding to each first application, the user can determine the specific cause of power consumption and facilitate the user's energy-saving operation.

[0135] The specific application of the embodiments of the present application in practical applications is illustrated below with examples.

[0136] like Figure 2 As shown, the main implementation process of the embodiment of the present application includes:

[0137] Step 201, data statistics;

[0138] For example, this step mainly counts the data shown in Table 2, the statistical period (i.e., the preset time unit) is 1 minute, and 1 data record is recorded for each period; if the application running in the foreground is switched or the screen is turned off for less than 1 minute, the data is recorded as a single data period:

[0139] Table 2 Data statistics of devices within a statistical period

[0140]

[0141] It should be noted that in addition to the statistical information in Table 1, it is also necessary to count the relevant information of the application running in the foreground. The screen-off period is recorded as the screen-off standby application. The specific statistical information is shown in Table 3.

[0142] Table 3 Data statistics of applications running in the foreground within a statistical period

[0143]

[0144] Step 202, data processing;

[0145] Alternatively, if Figure 3 As shown, the specific implementation process of data statistics in the embodiment of the present application includes:

[0146] Step 301, after each statistical cycle ends, retrieve the data corresponding to 101-107 in Table 2 and Table 3;

[0147] Step 302: Based on the start and end time of the data corresponding to 107 in Table 2, merge the data 101 to 106 in Table 2 into the data corresponding to 107 in Table 2 to form a merged table containing all device data and data of the application program running in the foreground;

[0148] For example, the record corresponding to 107 in Table 3 is shown in Table 4, the record data corresponding to 101 in Table 2 is shown in Table 5, and the combined statistical data is shown in Table 6:

[0149] Table 4 Detailed record data of the application running in the foreground

[0150]

[0151] Table 5 Detailed record data of the screen

[0152]

[0153] Table 6 Combined statistical data

[0154]

[0155]

[0156] Step 303, scaling the power consumption of each device in each statistical period in geometric proportion so that the sum of the power consumption of each device equals the power consumption of the battery terminal in each statistical period;

[0157] It should be noted that the purpose of doing this is to make the sum of the energy consumption of the devices equal to the power consumption of the battery end so that the power data remains consistent.

[0158] For example, the power consumption of each device and the battery terminal during 2024-07-10 04:10:00 to 2024-07-10 04:11:00 is shown in the original data column in Table 1. In order to make the sum of the power consumption of each device equal to the power consumption of the battery terminal, the power consumption of each device needs to be uniformly amplified by 54 / 43 times. The data is shown in the column after geometric scaling in Table 1.

[0159] Step 304: Count the duration of the high power consumption feature of each device in each statistical period;

[0160] For example, the statistics of different devices are shown in Table 7:

[0161] Table 7 Statistics of usage and high power consumption characteristics of each device

[0162]

[0163]

[0164] Step 305: merge the preprocessed data into the historical data set for backup.

[0165] It should be noted that the merging here can be understood as merging the data in the current statistical period with the data in the previous statistical period, that is, summing up the relevant data such as power consumption.

[0166] Step 203, displaying power usage;

[0167] It should be noted that the operating logic of the power usage display is: after the user enters the "Settings"-"Battery" interface, the electronic device displays the following Figure 4 The battery power usage page 401 shown in the figure mainly includes the following functions:

[0168] Time selection area 402, the user can enter the time period that he wants to view, and then the battery usage curve 403 of the corresponding time period is displayed on this interface;

[0169] The foreground running application and battery percentage display area 404, optionally, the foreground running application and battery percentage display area 404 can display the foreground running application and battery percentage corresponding to any statistical period in the currently displayed time period based on the user's selection;

[0170] The foreground application running indicator axis 405 displays identification boxes of foreground application running in different time periods, and the different identification boxes can be used to conveniently track the application usage track; for example, Figure 4 Different filling shapes are used to distinguish the logo frames to distinguish different applications. Of course, different filling colors can also be used to distinguish the logo frames.

[0171] The power consumption display area 406 provides a detailed display of two dimensions: application power consumption and hardware power consumption. The application power consumption and the hardware power consumption have corresponding drop-down menus.

[0172] One-touch power optimization button 407, which can recommend power optimization suggestions for high power consumption features and user settings.

[0173] Optionally, the user clicks Figure 4 The drop-down menu corresponding to the application power consumption in the power consumption display area 406 in the display area 406 is displayed as follows: Figure 5 The application power consumption drop-down list display box 500 shown in the figure mainly provides the following functions:

[0174] The identification box 501 corresponding to the application running in the foreground is Figure 4The application running in the foreground is consistent with the corresponding identification box of the application on the indicator axis 405; the identification box 501 indicates that it is convenient for the user to check when the application is used;

[0175] The power consumption display area 502 of the application program displays the total power consumption percentage of the application and the power consumption of different components.

[0176] Optionally, the user clicks Figure 5 If an application is selected, the following is displayed: Figure 6 The application power consumption details interface 600 shown, optionally, can implement the following functions:

[0177] The power consumption display area 601 of the device, different devices correspond to a power consumption display area 601 respectively, and the power consumption, usage and high power consumption time ratio of the device are displayed in the power consumption display area 601.

[0178] Optionally, the user clicks Figure 4 The drop-down menu corresponding to the device power consumption in the power consumption display area 406 in the display is displayed as follows: Figure 7 The device power consumption drop-down list display interface 700 shown in the figure mainly provides the following functions:

[0179] The power consumption display area 701 of the device, different devices correspond to a power consumption display area 701 respectively, and the power consumption, usage and high power consumption time ratio of the device are displayed in the power consumption display area 701.

[0180] Optionally, Figure 4 The corresponding control of one-key optimization of power consumption can be realized through the button control. Click the button to enter the following Figure 8 The power consumption suggestion interface 800 shown displays some power consumption suggestions recommended for the user. Each suggestion item corresponds to an optimized button space. If the user clicks the corresponding button control, the electronic device performs the corresponding power saving optimization operation.

[0181] It should be noted that the embodiments of the present application can improve the convenience and user experience of users in obtaining power consumption information, reduce users' battery life anxiety, and thus improve the user experience.

[0182] like Fig. 9 As shown, at least one embodiment of the present application further provides a power consumption information statistics device, which is applied to an electronic device, including:

[0183] A first acquisition module 901 is used to acquire, for each first application running in the foreground in a first time period, a first power consumption of the first application in the foreground running time period, and a second power consumption of each component of the first application in the foreground running time period;

[0184] The first display module 902 is used to display the power consumption information of the electronic device in the first time period according to the foreground running time, the first power consumption and the second power consumption of each first application in the first time period.

[0185] Optionally, the first acquisition module 901 includes:

[0186] A first acquisition unit, configured to acquire a third power consumption of each component of the electronic device during the foreground operation time period;

[0187] a processing unit, configured to process a third power consumption of each device in the foreground operation time period based on the first power consumption, so as to obtain a second power consumption of each device in the foreground operation time period;

[0188] The sum of the second power consumption of each component after processing in the foreground operation time period is equal to the first power consumption.

[0189] Optionally, the first acquisition module 901 includes:

[0190] The second acquisition unit is used to determine the first power consumption of the first application in the foreground running time period according to the battery remaining capacity at the start time and the battery remaining capacity at the end time of the foreground running time period.

[0191] Optionally, the power consumption information includes at least one of the following:

[0192] The first power consumption of any first application during the foreground running time period;

[0193] a second power consumption of each component of any first application program during a foreground running time period;

[0194] a fourth power consumption of any first application in the first time period;

[0195] the fifth power consumption of each device of any first application in the first time period;

[0196] a sixth power consumption of any first application within a specified running time period;

[0197] a seventh power consumption of each component of any first application within a specified running time period;

[0198] The eighth power consumption of the electronic device during the specified time period.

[0199] Optionally, the device further comprises:

[0200] A second acquisition module, used to acquire a high power consumption duration of each device of the first application in the first time period;

[0201] A second display module, used for displaying high power consumption information according to the high power consumption duration;

[0202] The high power consumption information includes at least one of the following:

[0203] The duration of high power consumption of each device in the first time period;

[0204] The proportion of high power consumption time of each device in the first time period;

[0205] The high power consumption duration of each device during the foreground running time period of the first application;

[0206] The proportion of high power consumption time of each device during the foreground running time period of the first application.

[0207] Optionally, the device further comprises:

[0208] The third display module is used to display power optimization prompt information according to the high power consumption information.

[0209] It should be noted that the device embodiment corresponds to the above method, and all implementation methods in the above method embodiment are applicable to the device embodiment and can achieve the same technical effect.

[0210] The power consumption information statistics device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0211] The power consumption information statistics device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0212] The power consumption information statistics device provided in the embodiment of the present application can achieve Figure 1 The various processes implemented by the method embodiment and achieving the same technical effect are not described here to avoid repetition.

[0213] The embodiment of the present application further provides an electronic device, including a processor and a communication interface, wherein the processor is used to obtain, for each first application running in the foreground in a first time period, a first power consumption of the first application in the foreground running time period, and a second power consumption of each component of the first application in the foreground running time period;

[0214] The power consumption information of the electronic device in the first time period is displayed according to the foreground running time, the first power consumption and the second power consumption of each first application in the first time period.

[0215] Optionally, the processor is configured to:

[0216] A first power consumption of the first application program in the foreground running time period is determined according to the remaining battery capacity at the start time and the remaining battery capacity at the end time of the foreground running time period.

[0217] Optionally, the processor is configured to:

[0218] Acquire the third power consumption of each component of the electronic device during the foreground operation time period;

[0219] Taking the first power consumption as a reference, processing the third power consumption of each device in the foreground operation time period to obtain the second power consumption of each device in the foreground operation time period;

[0220] The sum of the second power consumption of each component after processing in the foreground operation time period is equal to the first power consumption.

[0221] Optionally, the power consumption information includes at least one of the following:

[0222] The first power consumption of any first application during the foreground running time period;

[0223] a second power consumption of each component of any first application program during a foreground running time period;

[0224] a fourth power consumption of any first application in the first time period;

[0225] the fifth power consumption of each device of any first application in the first time period;

[0226] a sixth power consumption of any first application within a specified running time period;

[0227] a seventh power consumption of each component of any first application within a specified running time period;

[0228] The eighth power consumption of the electronic device during the specified time period.

[0229] Optionally, the processor is further configured to:

[0230] Obtaining high power consumption duration of each device of the first application in the first time period;

[0231] Displaying high power consumption information according to the high power consumption duration;

[0232] The high power consumption information includes at least one of the following:

[0233] The duration of high power consumption of each device in the first time period;

[0234] The proportion of high power consumption time of each device in the first time period;

[0235] The high power consumption duration of each device during the foreground running time period of the first application;

[0236] The proportion of high power consumption time of each device during the foreground running time period of the first application.

[0237] Optionally, the processor is further configured to:

[0238] Display power optimization prompt information according to the high power consumption information.

[0239] Preferably, the embodiment of the present application also provides an electronic device, including a processor, a memory, and a program or instruction stored in the memory and executable on the processor, which implements each process of the above-mentioned power consumption information statistics method embodiment when executed by the processor, and can achieve the same technical effect. Specifically, Fig.10 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0240] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009 and at least some of the components of a processor 1010.

[0241] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.10 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0242] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static image or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0243] In the embodiment of the present application, after receiving downlink data from the access network device, the radio frequency unit 1001 can transmit the data to the processor 1010 for processing; in addition, the radio frequency unit 1001 can send uplink data to the network side device. Generally, the radio frequency unit 1001 includes but is not limited to an antenna, an amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc.

[0244] The memory 1009 can be used to store software programs or instructions and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instruction required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0245] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.

[0246] The processor 1010 is used for:

[0247] For each first application running in the foreground during a first time period, obtaining a first power consumption of the first application during the foreground running time period, and a second power consumption of each component of the first application during the foreground running time period;

[0248] The power consumption information of the electronic device in the first time period is displayed according to the foreground running time, the first power consumption and the second power consumption of each first application in the first time period.

[0249] Optionally, the processor 1010 is configured to:

[0250] A first power consumption of the first application program in the foreground running time period is determined according to the remaining battery capacity at the start time and the remaining battery capacity at the end time of the foreground running time period.

[0251] Optionally, the processor 1010 is configured to:

[0252] Acquire the third power consumption of each component of the electronic device during the foreground operation time period;

[0253] Taking the first power consumption as a reference, processing the third power consumption of each device in the foreground operation time period to obtain the second power consumption of each device in the foreground operation time period;

[0254] The sum of the second power consumption of each component after processing in the foreground operation time period is equal to the first power consumption.

[0255] Optionally, the power consumption information includes at least one of the following:

[0256] The first power consumption of any first application during the foreground running time period;

[0257] a second power consumption of each component of any first application program during a foreground running time period;

[0258] a fourth power consumption of any first application in the first time period;

[0259] the fifth power consumption of each device of any first application in the first time period;

[0260] a sixth power consumption of any first application within a specified running time period;

[0261] a seventh power consumption of each component of any first application within a specified running time period;

[0262] The eighth power consumption of the electronic device during the specified time period.

[0263] Optionally, the processor 1010 is further configured to:

[0264] Obtaining high power consumption duration of each device of the first application in the first time period;

[0265] Displaying high power consumption information according to the high power consumption duration;

[0266] The high power consumption information includes at least one of the following:

[0267] The duration of high power consumption of each device in the first time period;

[0268] The proportion of high power consumption time of each device in the first time period;

[0269] The high power consumption duration of each device during the foreground running time period of the first application;

[0270] The proportion of high power consumption time of each device during the foreground running time period of the first application.

[0271] Optionally, the processor 1010 is further configured to:

[0272] Display power optimization prompt information according to the high power consumption information.

[0273] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned power consumption information statistics method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0274] The readable storage medium may be non-volatile or non-transient. The readable storage medium may include a computer-readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0275] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned power consumption information statistics method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0276] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0277] The embodiment of the present application further provides a computer program / program product, which is stored in a storage medium. The computer program / program product is executed by at least one processor to implement the various processes of the above-mentioned power consumption information statistics method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0278] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0279] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0280] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for statistically analyzing power consumption information, characterized in that: include: For each first application running in the foreground during a first time period, obtaining a first power consumption of the first application during the foreground running time period, and a second power consumption of each component of the first application during the foreground running time period; The power consumption information of the electronic device in the first time period is displayed according to the foreground running time, the first power consumption and the second power consumption of each first application in the first time period.

2. The method according to claim 1, characterized in that: The obtaining of the first power consumption of the first application during the foreground running time period includes: A first power consumption of the first application program in the foreground running time period is determined according to the remaining battery capacity at the start time and the remaining battery capacity at the end time of the foreground running time period.

3. The method according to claim 1, characterized in that: Acquiring the second power consumption of each component of the first application during the foreground running time period includes: Acquire the third power consumption of each component of the electronic device during the foreground operation time period; Taking the first power consumption as a reference, processing the third power consumption of each device in the foreground operation time period to obtain the second power consumption of each device in the foreground operation time period; The sum of the second power consumption of each component after processing in the foreground operation time period is equal to the first power consumption.

4. The method according to claim 1, characterized in that: The power consumption information includes at least one of the following: The first power consumption of any first application during the foreground running time period; a second power consumption of each component of any first application program during a foreground running time period; a fourth power consumption of any first application in the first time period; the fifth power consumption of each device of any first application in the first time period; a sixth power consumption of any first application within a specified running time period; a seventh power consumption of each component of any first application within a specified running time period; The eighth power consumption of the electronic device during the specified time period.

5. The method according to claim 1, characterized in that Also includes: Obtaining high power consumption duration of each device of the first application in the first time period; Displaying high power consumption information according to the high power consumption duration; The high power consumption information includes at least one of the following: The duration of high power consumption of each device in the first time period; The proportion of high power consumption time of each device in the first time period; The high power consumption duration of each device during the foreground running time period of the first application; The proportion of high power consumption time of each device during the foreground running time period of the first application.

6. The method according to claim 5, characterized in that Also includes: Display power optimization prompt information according to the high power consumption information.

7. A device for collecting power consumption information, characterized in that: include: A first acquisition module is used to acquire, for each first application running in the foreground within a first time period, a first power consumption of the first application within the foreground running time period, and a second power consumption of each component of the first application within the foreground running time period; The first display module is used to display the power consumption information of the electronic device in the first time period according to the foreground running time of each first application in the first time period, the first power consumption and the second power consumption.

8. The device according to claim 7, characterized in that The first acquisition module includes: A first acquisition unit, configured to acquire a third power consumption of each component of the electronic device during the foreground operation time period; a processing unit, configured to process a third power consumption of each device in the foreground operation time period based on the first power consumption, so as to obtain a second power consumption of each device in the foreground operation time period; The sum of the second power consumption of each component after processing in the foreground operation time period is equal to the first power consumption.

9. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the power consumption information statistics method as described in any one of claims 1 to 6.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the power consumption information statistics method according to any one of claims 1 to 6 are implemented.