Disclosure of Invention
Aiming at the technical problems in the prior art, the invention provides a mobile phone power consumption analysis system.
The utility model provides a cell-phone consumption analytic system, includes power consumption static parameter analysis module, power consumption dynamic parameter analysis module, power consumption parameter setting module, wherein:
the power consumption static parameter analysis module is used for reading static power consumption parameters of the mobile phone to be tested and the benchmark mobile phone, and respectively storing the static power consumption parameters into an Excel table in a classified manner for showing;
the power consumption dynamic parameter analysis module is used for acquiring programs of interfaces of the mobile phone to be tested and the benchmark mobile phone and names of corresponding interfaces, respectively recording dynamic power consumption parameters of the mobile phone to be tested and the benchmark mobile phone after entering different interfaces, and displaying the dynamic power consumption parameters in a suspension window mode;
the power consumption parameter setting module is used for adjusting the mobile phone parameters influencing the static power consumption parameters and the dynamic power consumption parameters so as to achieve the purpose that the mobile phone parameters of the mobile phone to be tested are the same as the mobile phone parameters of the benchmark mobile phone.
Further, the power consumption static parameter analysis module reads static power consumption parameters of the mobile phone to be tested and the benchmark mobile phone through the file node, the software interface and the configuration file.
Further, the power consumption static parameter analysis module is also used for marking the static power consumption parameters of the important attributes in the Excel table.
Furthermore, the power consumption dynamic parameter analysis module is further configured to set a threshold of a dynamic power consumption parameter of the important attribute, and to remind the user when the dynamic power consumption parameter of the important attribute exceeds the threshold.
Furthermore, the power consumption dynamic parameter analysis module is also used for refreshing the dynamic power consumption parameters at regular time through a timer and storing the dynamic power consumption parameters in a Log format file.
Further, the static power consumption parameters include some or all of CPU architecture information, CPU platform information, CPU operating mode, CPU minimum operating frequency, CPU maximum operating frequency, CPU core number, CPU bit number, CPU frequency voltage configuration table, CPU scene configuration information, screen size, screen resolution, screen density, battery capacity, system information, camera pixels, and power saving attributes, where:
the maximum working frequency of the CPU, the core number of the CPU, a CPU frequency voltage configuration table, the screen size, the battery capacity and the power saving attribute are static power consumption parameters of important attributes.
Further, the dynamic power consumption parameters include some or all of the parameters of the CPU core number, the CPU operating frequency, the CPU load factor, the GPU frame rate, the GPU resolution, the GPU operating frequency, the CPU temperature, the GPU temperature, the battery temperature, the mobile phone brightness, the mobile phone sound, the network condition, the mobile phone memory, the mobile phone available storage space, the battery power, the battery load current, and the battery voltage, wherein:
the CPU load rate, the CPU temperature, the GPU temperature, the battery temperature, the network condition, the mobile phone memory and the mobile phone available storage space are dynamic power consumption parameters of important attributes, and the power consumption dynamic parameter analysis module sets the threshold values of the CPU load rate, the CPU temperature, the GPU temperature, the battery temperature, the network condition, the mobile phone memory and the mobile phone available storage space.
Further, the dynamic power parameter analysis module reminds the dynamic power consumption parameter exceeding the threshold value through color font display.
Further, the mobile phone parameters include a part of or all of the parameters in the minimum operating frequency of the CPU, the maximum operating frequency of the CPU, the core number of the CPU, the operating mode of the CPU, the frame rate of the GPU, the resolution of the GPU, the brightness of the mobile phone, the sound of the mobile phone, and the memory cleaning of the mobile phone.
Further, when adjusting part of the parameters of the mobile phone, the power consumption parameter setting module first determines whether the mobile phone is root, if so, the mobile phone is adjusted, and if not, the mobile phone cannot be adjusted.
According to the mobile phone power consumption analysis system, by the combination of the power consumption static parameter analysis module, the power consumption dynamic parameter analysis module and the power consumption parameter setting module, the power consumption of the mobile phone to be tested and the benchmark mobile phone is comprehensively analyzed by an analyst, the analyst can conveniently and accurately find out the difference between the mobile phone to be tested and the benchmark mobile phone, the advantage of the benchmark mobile phone is adopted, and then the defect of the mobile phone to be tested is improved in a targeted manner, so that the performance of the mobile phone to be tested is improved; meanwhile, the analysis system is suitable for various types of mobile phones to be tested, and provides the most suitable power consumption endurance optimization direction and strategy for various mobile phones to be tested.
A method for analyzing power consumption of a mobile phone comprises the following steps:
setting the mobile phone parameters of the mobile phone to be tested and the benchmark mobile phone to be the same or similar;
reading static power consumption parameters through file nodes, software interfaces and configuration files of the mobile phone to be tested and the benchmark mobile phone, and marking the static power consumption parameters with important attributes as color fonts;
storing the static power consumption parameters into an Excel table in a classified manner for displaying;
acquiring the affiliated programs of the interfaces of the mobile phone to be tested and the benchmark mobile phone and the names of the corresponding interfaces, selecting dynamic power consumption parameters and setting the threshold values of the dynamic power consumption parameters with important attributes;
acquiring dynamic power consumption parameters of a mobile phone to be tested and a benchmark mobile phone after entering different interfaces at regular time, and storing the parameters in a Log format file;
and displaying the dynamic power consumption parameters in a floating window form, marking the dynamic power consumption parameters of the important attributes exceeding the threshold value as color fonts and keeping the color fonts for a period of time for displaying.
According to the method for analyzing the power consumption of the mobile phone, on the premise that the mobile phone parameters of the mobile phone to be tested are the same as or similar to the mobile phone parameters of the benchmark mobile phone, the static power consumption parameters and the dynamic power consumption parameters are acquired and displayed, so that an analyst can comprehensively analyze the power consumption of the mobile phone to be tested and the benchmark mobile phone, the analyst can conveniently and accurately find out the difference between the mobile phone to be tested and the benchmark mobile phone, the advantages of the benchmark mobile phone are adopted, and then the defects of the mobile phone to be tested are improved in a targeted manner, so that the performance of the mobile phone to be tested is improved.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a mobile phone power consumption analysis system, which includes a power consumption static parameter analysis module 1, a power consumption dynamic parameter analysis module 2, and a power consumption parameter setting module 3, where: the power consumption static parameter analysis module 1 is used for reading static power consumption parameters of the mobile phone to be tested and the benchmark mobile phone, and respectively storing the static power consumption parameters into an Excel table in a classified manner for showing; the power consumption dynamic parameter analysis module 2 is used for acquiring the program of the interface of the mobile phone to be tested and the benchmark mobile phone and the name of the corresponding interface, respectively recording the dynamic power consumption parameters of the mobile phone to be tested and the benchmark mobile phone after entering different interfaces, and displaying the dynamic power consumption parameters in a suspended window mode; the power consumption parameter setting module 3 is used for adjusting the mobile phone parameters influencing the static power consumption parameters and the dynamic power consumption parameters so as to achieve the purpose that the mobile phone parameters of the mobile phone to be tested are the same as the mobile phone parameters of the benchmark mobile phone. In this embodiment, the power consumption static parameter analysis module 1 stores static power consumption parameters into the Excel table in a classified manner, so as to facilitate export, viewing and comparison by a worker. The power consumption dynamic parameter analysis module 2 records dynamic power parameters of the mobile phone to be tested and the benchmark mobile phone when the mobile phone and the benchmark mobile phone enter different interfaces, and the dynamic power parameters are displayed in a suspended window mode and are convenient for workers to check. The power consumption parameter setting module 3 adjusts the parameters of the mobile phone, keeps the same or similar to the parameters of the mobile phone of the benchmark mobile phone as much as possible, so that the power consumption conditions of the mobile phone to be tested and the benchmark mobile phone can be compared more uniformly, and the design advantages of the benchmark mobile phone can be extracted to improve the performance of the mobile phone to be tested.
Specifically, the static power consumption parameter in this embodiment includes some or all of CPU architecture information, CPU platform information, CPU operating mode, CPU minimum operating frequency, CPU maximum operating frequency, CPU core count, CPU bit number, CPU frequency-voltage configuration table, CPU scene configuration information, screen size, screen resolution, screen density, battery capacity, system information, camera pixel, and power saving attribute. The system information may include system version, ROM size, RAM size, etc.; the camera pixels may include front camera pixels and rear camera pixels; the power saving attributes may include whether to turn on AAL, whether to turn on Doze mode, whether to turn on its wake-up, etc. In order to analyze the static power consumption of the mobile phone more accurately, static power consumption parameters are selected as much as possible, and some of the static power consumption parameters have a large influence on the static power consumption of the mobile phone and can be used as the static power consumption parameters of important attributes, so that the static power consumption parameters of the important attributes in the Excel form are marked by the power consumption static parameter analysis module, and a worker can check and analyze the static power consumption parameters in a targeted manner. In this embodiment, the static power consumption parameter of the important attribute may be a maximum operating frequency of the CPU, a core count of the CPU, a CPU frequency/voltage configuration table, a screen size, a battery capacity, whether to start the AAL in the power saving attribute, or not. The division of the static power consumption parameter may be performed from a CPU, a screen or a GPU, battery information, system information, camera pixels, power saving attributes, and the like, the battery information including battery capacity. See table 1 for details:
TABLE 1 static Power consumption parameters
In this embodiment, for the selection of the benchmark mobile phone, the static power consumption parameters should be considered, taking parameters such as CPU, screen size, and battery capacity as main consideration factors, and it is better to select the benchmark mobile phone with the same or similar static power consumption parameters as the above three types of mobile phones to be tested. Preferably, the power consumption static parameter analysis module 1 in this embodiment marks the static power consumption parameters of the above important attributes, and may use a color font to perform intuitive display, so as to implement visual distinction from other static power consumption parameters, where the specific font color is not limited, and may be red, green, blue purple, and the like.
Specifically, the power consumption static parameter analysis module 1 reads static power consumption parameters of the mobile phone to be tested and the benchmark mobile phone through the file node, the software interface and the configuration file. For example, the relevant information of the CPU is mainly read by reading a file node, and the battery information is read by a Java reflection mechanism. The embodiment of the invention can also obtain the power consumption static parameters in other modes, and for the technical field, the required power consumption static parameters can be obtained.
Specifically, the dynamic power consumption parameters of the embodiment of the present invention include some or all of the parameters of the number of CPU cores, the CPU operating frequency, the CPU load rate, the GPU frame rate, the GPU resolution, the GPU operating frequency, the CPU temperature, the GPU temperature, the battery temperature, the mobile phone brightness, the mobile phone sound, the network condition, the mobile phone memory, the mobile phone available storage space, the battery power, the battery load current, and the battery voltage. The displayed mobile phone brightness and the mobile phone sound are both current values; the network condition comprises parameters such as data downloading, data uploading, mobile phone signal strength, WiFi signal strength and the like; the mobile phone memory is an available memory configured by hardware; the available storage space of the mobile phone is the available storage space of the mobile phone during operation, and the size of the available storage space is different from the available internal memory of the mobile phone internal memory. In order to show the dynamic power consumption parameters more clearly, preferably, the power consumption dynamic parameter analysis module 2 further sets a threshold of the dynamic power consumption parameter of the important attribute, and reminds when the dynamic power consumption parameter of the important attribute exceeds the threshold, the dynamic power consumption parameter of the important attribute in this embodiment may be a CPU load rate, a CPU temperature, a GPU temperature, a battery temperature, a mobile phone signal strength and a WiFi signal strength in a network condition, a mobile phone memory, a mobile phone available storage space, and the like, after the power consumption dynamic parameter analysis module 2 sets the thresholds of the CPU load rate, the CPU temperature, the GPU temperature, the battery temperature, a network condition, the mobile phone memory, and the mobile phone available storage space, if the above parameters exceed the set threshold during the operation of the mobile phone, the staff is reminded, and the embodiment of the threshold of the dynamic power consumption parameter is not specifically limited, for example: the threshold values of the CPU temperature, the GPU temperature, and the battery temperature are set to 40 degrees celsius, and the threshold value of the mobile phone signal strength is set to half of the number of signal grids. In this embodiment, the manner of reminding after the dynamic power consumption parameter of the important attribute exceeds the threshold is not limited, and only the attention of the worker needs to be called, for example, in a form of marking with a color font, the color marked by the dynamic power consumption parameter in this embodiment should be distinguished from the color marked by the static power consumption parameter in the above embodiments. In this embodiment, the time of the reminder may also be set, for example, 5 seconds, and when the dynamic power consumption parameter of the important attribute exceeds the threshold value within 5 seconds, the partial font is displayed in the set color, and the color of the original font is restored after 5 seconds. The dynamic power consumption parameters can be divided from a CPU, a GPU, a temperature, a mobile phone brightness, a mobile phone sound, a network condition, a mobile phone memory, a mobile phone available storage space, a battery, and the like, and specifically, see table 2:
TABLE 2 dynamic Power consumption parameters
The core purpose of the power consumption dynamic parameter analysis module 2 in this embodiment is to record the change of dynamic power consumption parameters before and after the mobile phone enters different interfaces so as to analyze the power consumption of the mobile phone. Early mobile phones usually control the power consumption of the mobile phones in a power-saving management or power-saving optimization mode, but these modes control the hardware switches or software settings such as WIFI, GPRS, GPS, brightness, CPU core number, CPU frequency and the like in all scenes of the mobile phones to achieve the purpose of optimizing power-consumption endurance, but with the higher requirement of user experience comfort, the current power-consumption endurance optimization tends to implement different strategies to achieve power saving in a scene-type power saving mode or in different scenes of machine learning. For example, in a temple escape game in a game scene, in a welcome interface and a jump interface which needs finger sliding, the welcome interface is characterized in that the interface is static and has little interactivity, while the jump interface has constantly changed pictures and frequent gesture interaction, and under the mode of power saving optimization, the frame rate of the static interface can be properly reduced, for example 50fps, and the dynamic interface can be kept unchanged, for example 60fps, so that the resources of the system are reasonably utilized, but not integrally adjusted. Thus, the problems of heat generation and power consumption of the mobile phone can be improved well. As can be seen from the above, the dynamic parameter information of a certain interface of the mobile phone is very important, and the parameters cannot be perceived by naked eyes of the user, and must be acquired in real time to further implement analysis. In order to enable an analyst to visually see the change of the dynamic power consumption parameters before and after the mobile phone enters different interfaces, the dynamic power consumption parameters are refreshed by a timer in a suspension window mode and displayed, and meanwhile, the dynamic power consumption parameters are stored in a Log format file, so that the analyst can conveniently export and view the dynamic power consumption parameters. The Log format is adopted for storing the file in the embodiment, so that the efficiency of storing the original data can be improved, and the technical personnel in the field can also adopt other formats for storing.
Specifically, in the power consumption parameter setting module 3 according to the embodiment of the present invention, the mobile phone parameters may include a part of or all of parameters in the minimum operating frequency of the CPU, the maximum operating frequency of the CPU, the number of cores of the CPU, the operating mode of the CPU, the frame rate of the GPU, the resolution of the GPU, the brightness of the mobile phone, the sound of the mobile phone, and the memory cleaning of the mobile phone. Preferably, when adjusting part of the parameters of the mobile phone, the power consumption parameter setting module 3 first determines whether the mobile phone is root, if so, the mobile phone is adjusted, and if not, the mobile phone cannot be adjusted. The purpose of the power consumption parameter setting module 3 of this embodiment is mainly to debug the parameters of the mobile phone, and an analyst may also perform one-key recovery or restart operation on the mobile phone to recover the parameters of the mobile phone. The mobile phone parameters of this embodiment may be divided from CPU, GPU, mobile phone brightness, mobile phone sound, mobile phone memory cleaning, and the like, and specifically, see table 3:
TABLE 3 handset parameters
The core of the power consumption parameter setting module 3 of this embodiment is to adjust the parameters of the mobile phone that affect the static power consumption parameter and the dynamic power consumption parameter, for example, the GPU frame rates of the mobile phone to be tested and the benchmark mobile phone in the same game interface are 60fps and 50fps, respectively, the GPU frame rate of the mobile phone to be tested is adjusted to 50fps, the GPU frame rates are kept the same as those of the benchmark mobile phone, and then the power consumption analysis is performed, so that the difference between the mobile phone to be tested and the benchmark mobile phone is found more easily.
In the mobile phone power consumption analysis system of the embodiment of the invention, the power consumption static parameter analysis module reads static power consumption parameters of a mobile phone to be tested and a benchmark mobile phone, and respectively stores the static power consumption parameters in an Excel table in a classified manner for showing; the power consumption dynamic parameter analysis module acquires programs of interfaces of the mobile phone to be tested and the benchmark mobile phone and names of corresponding interfaces, respectively records dynamic power consumption parameters of the mobile phone to be tested and the benchmark mobile phone after entering different interfaces, and displays the dynamic power consumption parameters in a suspension window mode; the power consumption parameter setting module adjusts the mobile phone parameters influencing the static power consumption parameters and the dynamic power consumption parameters so as to achieve the purpose that the mobile phone parameters of the mobile phone to be tested are the same as the mobile phone parameters of the benchmark mobile phone; through the combination of the power consumption static parameter analysis module, the power consumption dynamic parameter analysis module and the power consumption parameter setting module, the power consumption of the mobile phone to be tested and the benchmark mobile phone is comprehensively analyzed by an analyst, so that the analyst can accurately find out the difference between the mobile phone to be tested and the benchmark mobile phone, the advantages of the benchmark mobile phone are adopted, and then the defects of the mobile phone to be tested are improved in a targeted manner, so that the performance of the mobile phone to be tested is improved; meanwhile, the analysis system is suitable for various types of mobile phones to be tested, and provides the most suitable power consumption endurance optimization direction and strategy for various mobile phones to be tested.
The invention also provides a method for analyzing the power consumption of the mobile phone, as shown in fig. 2, the method comprises the following steps:
s101: and setting the mobile phone parameters of the mobile phone to be tested and the benchmark mobile phone to be the same or similar. In this embodiment, the reason why the mobile phone parameters of the to-be-tested mobile phone and the benchmark mobile phone are set to be the same or similar is to obtain a more accurate result when comparing the energy consumption of the to-be-tested mobile phone and the benchmark mobile phone, and in the selection process of the benchmark mobile phone, the mobile phone parameters which are the same as or closer to those of the to-be-tested mobile phone should be selected for analysis. The mobile phone parameters in this embodiment may be some or all of the parameters in the minimum operating frequency of the CPU, the maximum operating frequency of the CPU, the core number of the CPU, the CPU operating mode, the GPU frame rate, the GPU resolution, the mobile phone brightness, the mobile phone sound, and the mobile phone memory cleaning, and the mobile phone parameters selected in the specific analysis are not specifically limited in this embodiment.
S102: and reading the static power consumption parameters through file nodes, software interfaces and configuration files of the mobile phone to be tested and the benchmark mobile phone, and marking the static power consumption parameters with important attributes as color fonts. In the analysis method of this embodiment, static power consumption parameters may also be obtained from other files or interfaces of the to-be-tested mobile phone and the benchmark mobile phone, where the static power consumption parameters may be part or all of parameters in CPU architecture information, CPU platform information, CPU operating mode, CPU minimum operating frequency, CPU maximum operating frequency, CPU core number, CPU bit number, CPU frequency-voltage configuration table, CPU scene configuration information, screen size, screen resolution, screen density, battery capacity, system information, camera pixels, and power saving attribute, and are specifically selected according to specific analysis scenarios, and this embodiment is not limited herein. In this embodiment, parameters such as the maximum operating frequency of the CPU, the number of CPU cores, the CPU frequency-voltage configuration table, the screen size, the battery capacity, whether to start the AAL in the power saving attributes, and the like may be used as the static power consumption parameters of the important attributes, and the marking color is not specifically limited, and may be red, green, blue, and the like.
S103: and storing the static power consumption parameters into an Excel table in a classified manner for displaying. In the embodiment, the static power consumption parameters are stored in the Excel table, so that an analyst can conveniently check and analyze the static power consumption parameters.
S104: collecting the program of the interface of the mobile phone to be tested and the benchmark mobile phone and the name of the corresponding interface, selecting the dynamic power consumption parameter and setting the threshold value of the dynamic power consumption parameter with important attributes. The program names and types of the mobile phone to be tested and the post mobile phone participating in the analysis are not specifically limited in this embodiment, the dynamic power consumption parameters include part or all of the parameters of the CPU core number, the CPU operating frequency, the CPU load rate, the GPU frame rate, the GPU resolution, the GPU operating frequency, the CPU temperature, the GPU temperature, the battery temperature, the mobile phone brightness, the mobile phone sound, the network condition, the mobile phone memory, the mobile phone available storage space, the battery power, the battery load current, and the battery voltage, wherein the CPU load rate, the CPU temperature, the GPU temperature, the battery temperature, the mobile phone signal intensity and the WiFi signal intensity in the network condition, the mobile phone memory, the mobile phone available storage space, and the like, which can be set as dynamic power consumption parameters of important attributes, and set threshold values of the dynamic power consumption parameters of important attributes.
S105: and acquiring dynamic power consumption parameters of the mobile phone to be tested and the benchmark mobile phone after entering different interfaces at regular time, and storing the dynamic power consumption parameters in a Log format file. In this embodiment, the time for acquiring the dynamic power consumption parameters may be 1 second, and when the mobile phone to be tested and the post mobile phone are simultaneously operated, the dynamic power consumption parameters of the mobile phone to be tested and the post mobile phone are acquired every second after entering different interfaces and are simultaneously stored. The format of the stored file is not specifically limited, and is preferably a Log format, the storage of the Log format file can improve the efficiency of storing the original data, and an analyst can set other formats for storage, which is not limited here.
S106: and displaying the dynamic power consumption parameters in a floating window form, marking the dynamic power consumption parameters of the important attributes exceeding the threshold value as color fonts and keeping the color fonts for a period of time for displaying. Through the display in the form of the floating window, an analyst can observe and analyze the dynamic power consumption parameters at a glance, and simultaneously, the dynamic power consumption parameters of the important attributes exceeding the threshold value are marked with color fonts, such as red, green, blue, yellow and the like, but need to be distinguished from the colors of the marked static power consumption parameters. The dynamic power consumption parameter of the important attribute exceeding the threshold is maintained for a certain time to be displayed, so that an analyst can observe the parameter, and the time for maintaining the display of the parameter is not limited in the embodiment and can be 2 seconds, 3 seconds, 5 seconds or the like.
In the method for analyzing the power consumption of the mobile phone according to the embodiment, the content disclosed in the system for analyzing the power consumption of the mobile phone according to the previous embodiment is implemented in an auxiliary manner, and specific details of this embodiment are not described herein again.
According to the mobile phone power consumption analysis method provided by the embodiment of the invention, on the premise that the mobile phone parameters of the mobile phone to be tested are the same as or similar to the mobile phone parameters of the benchmark mobile phone, the static power consumption parameters and the dynamic power consumption parameters are acquired and displayed, so that the power consumption of the mobile phone to be tested and the benchmark mobile phone is comprehensively analyzed by an analyst, the difference between the mobile phone to be tested and the benchmark mobile phone can be conveniently and accurately found by the analyst, the advantages of the benchmark mobile phone are adopted, and the defects of the mobile phone to be tested are improved in a targeted manner, so that the cruising ability of the mobile phone to be tested is improved.
The present invention has been further described with reference to specific embodiments, but it should be understood that the detailed description should not be construed as limiting the spirit and scope of the present invention, and various modifications made to the above-described embodiments by those of ordinary skill in the art after reading this specification are within the scope of the present invention.