CN106557147B - Method and device for comparing power consumption of application program package and terminal - Google Patents
Method and device for comparing power consumption of application program package and terminal Download PDFInfo
- Publication number
- CN106557147B CN106557147B CN201510629093.9A CN201510629093A CN106557147B CN 106557147 B CN106557147 B CN 106557147B CN 201510629093 A CN201510629093 A CN 201510629093A CN 106557147 B CN106557147 B CN 106557147B
- Authority
- CN
- China
- Prior art keywords
- screen locking
- power consumption
- consumption information
- time period
- screen
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Telephone Function (AREA)
Abstract
The embodiment of the invention discloses a method, a device and a terminal for comparing power consumption of application packages. The method comprises the following steps: acquiring screen locking power consumption information of the electronic equipment before and after package stopping within a preset screen locking time period; calculating a credible interval of the screen locking power consumption information by using the acquired screen locking power consumption information and a preset credibility; calculating the mean value of the screen locking power consumption information of the electronic equipment in the trusted screen locking power consumption information interval before the package is stopped and the mean value of the screen locking power consumption information of the electronic equipment in the screen locking time interval after the package is stopped; and calculating a screen locking power consumption comparison optimization value of the screen locking power consumption information credible interval by using the screen locking power consumption information mean value in the screen locking time period before the packet is stopped and the screen locking power consumption information mean value in the screen locking time period after the packet is stopped. By applying the invention, the packet stopping efficiency of the user can be improved, and the power saving efficiency of the electronic equipment can be optimized.
Description
Technical Field
The invention relates to a computer energy-saving technology, in particular to a method, a device and a terminal for comparing power consumption of an application program package.
Background
With the development of communication technology, more and more application packages are installed in electronic equipment, and the functions of the electronic equipment are more and more powerful, so that great convenience is brought to users. For example, existing application packages installed in electronic devices include, but are not limited to: the system comprises a chat social tool, a game tool, a graphic and text editing tool, an online payment tool, a disk cleaning tool, a virus prevention tool, a global positioning tool, a shooting application tool and the like, and can almost realize all functions in daily life and work without leaving home.
With the continuous upgrade of the user experience of the electronic device, the user not only requires the electronic device to provide as many application functions as possible, but also requires the electronic device to have as long a cruising ability as possible. When a plurality of application packages installed in the electronic equipment run, a large amount of electric energy needs to be consumed, so that the multi-application function and the cruising ability of the electronic equipment cannot be considered at the same time.
In the prior art, under the condition that the power supply capacity of a battery of an electronic device is relatively constant and the battery is not considered to be optimally designed, in order to reduce the power consumption of the electronic device, a user is generally prompted or the user is prompted to use the electronic device for a long time according to experience of the user, and when the electronic device is in a standby state or a use state, for some unnecessary application packages running in a background, namely the unnecessary application packages which the user does not need to use any more, the unnecessary application packages are set to be in an inactive state, namely the unnecessary application packages are subjected to package stop processing, so that the power consumption of the unnecessary application packages in the standby state or the use state can be effectively reduced, and the energy-saving optimization of the electronic device is realized.
However, according to the method for reducing the power consumption of the electronic equipment by executing the preset power saving optimization strategy and setting the application program package running in the background to be in the inactive state, the power saving optimization condition cannot be obtained by quantizing the power saving function index according to the power consumption related information of the electronic equipment before and after the package stopping processing, so that a user does not have visual feeling of specific power saving information before and after the package stopping, the package stopping idea is not strong, the package stopping efficiency is not high, and the power saving optimization efficiency of the electronic equipment is low.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, and a terminal for comparing power consumptions of application packages, so as to improve package stopping efficiency of a user and optimize power saving efficiency of an electronic device.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in one aspect, an embodiment of the present invention provides a method for comparing power consumptions of application packages, including:
acquiring screen locking power consumption information of the electronic equipment before and after package stopping within a preset screen locking time period;
calculating a credible interval of the screen locking power consumption information by using the acquired screen locking power consumption information and a preset credibility;
calculating the mean value of the screen locking power consumption information of the electronic equipment in the trusted screen locking power consumption information interval before the package is stopped and the mean value of the screen locking power consumption information of the electronic equipment in the screen locking time interval after the package is stopped;
and calculating a screen locking power consumption comparison optimization value of the screen locking power consumption information credible interval by using the screen locking power consumption information mean value in the screen locking time period before the packet is stopped and the screen locking power consumption information mean value in the screen locking time period after the packet is stopped.
Optionally, the calculating a mean value of the screen locking power consumption information of the electronic device located in the trusted screen locking power consumption information interval in the screen locking time period before the package is stopped and a mean value of the screen locking power consumption information of the electronic device located in the trusted screen locking time period after the package is stopped includes:
dividing the screen locking power consumption information credible interval into a plurality of credible subintervals according to a preset division strategy, and calculating a subinterval screen locking power consumption information mean value of the electronic equipment in each credible subinterval in a screen locking time period before packet stopping and a subinterval screen locking power consumption information mean value of the electronic equipment in the screen locking time period after packet stopping;
the calculating of the lock screen power consumption comparison optimization value in the lock screen power consumption information credible interval by using the lock screen power consumption information average value in the lock screen time period before the packet stop and the lock screen power consumption information average value in the lock screen time period after the packet stop comprises:
and obtaining a screen locking power consumption comparison optimization value of each credible subinterval according to the calculated average value of the subinterval screen locking power consumption information of the electronic equipment in the screen locking time period before the packet is stopped and the calculated average value of the subinterval screen locking power consumption information of the electronic equipment in the screen locking time period after the packet is stopped.
Optionally, the calculating the lock screen power consumption comparison optimization value in the lock screen power consumption information trusted interval by using the lock screen power consumption information average value in the lock screen time period before the packet stop and the lock screen power consumption information average value in the lock screen time period after the packet stop includes:
calculating the mean difference value of the screen locking power consumption information mean value in the screen locking time period before the packet is stopped and the screen locking power consumption information mean value in the screen locking time period after the packet is stopped;
and calculating the average value difference value to be divided by the average value of the screen locking power consumption information in the screen locking time period before the packet stop, so as to obtain a screen locking power consumption comparison optimization value in the screen locking power consumption information credible interval.
Optionally, the average value of the power consumption information of the sub-interval screen locking in the screen locking time period of the electronic device before the packet stop is calculated by using the following formula:
in the formula (I), the compound is shown in the specification,
Ψ1jthe screen locking power consumption information mean value of the electronic equipment in the jth credible subinterval in the screen locking time period before the package stopping;
Ψ1jiscreen locking power consumption information of the ith electronic equipment in a screen locking time period before package stopping in the jth credible subinterval;
ljand the number of the electronic equipment with the screen locking power consumption information difference value in the jth credible sub-interval is determined.
Optionally, the lock screen power consumption information includes: screen locking power consumption and screen locking power consumption rate; the screen locking time period preset before and after package stopping comprises: the first screen locking time period before the package stopping and the second screen locking time period after the package stopping.
Optionally, the acquiring power consumption information of the electronic device before and after the package stopping within the preset screen locking time period includes:
the method comprises the steps that a preset number of electronic devices are set to operate an application program package with a first threshold value in a background, and screen locking power consumption information of the preset number of electronic devices in a first screen locking time period before package stopping is obtained in the set first screen locking time period;
and setting the application program packages of the preset number of electronic devices to run a second threshold value in the background, and acquiring screen locking power consumption information of the preset number of electronic devices in a second screen locking time period in the set second screen locking time period, wherein the running application program packages of the second threshold value and the running application program packages of the first threshold value are in a relation of containing and being contained.
Optionally, the first screen-lock period includes: a first lock screen period starting time point and a first lock screen period ending time point; the screen locking power consumption information is screen locking power consumption, and the acquiring of the screen locking power consumption information of the electronic equipment with the preset number in the first screen locking time period comprises the following steps:
acquiring a first residual capacity of the electronic equipment with the preset quantity at a starting time point of a first screen locking time period;
acquiring second residual capacity of the preset quantity of electronic equipment at the ending time point of the first screen locking time period;
and calculating the difference value of the first residual electric quantity and the second residual electric quantity to obtain the screen locking power consumption in the first screen locking time period.
Optionally, the first screen-lock period includes: the method comprises the following steps that a first screen locking time period starting time point and a first screen locking time period ending time point are obtained, the screen locking power consumption information is a screen locking power consumption rate, and the obtaining of the screen locking power consumption information of the electronic equipment with the preset number in the first screen locking time period comprises the following steps:
acquiring a first residual capacity of the electronic equipment with the preset quantity at a starting time point of a first screen locking time period;
acquiring second residual capacity of the preset quantity of electronic equipment at the ending time point of the first screen locking time period;
and calculating a difference value between the first residual capacity and the second residual capacity, and dividing the difference value by the first screen locking time period to obtain the screen locking power consumption rate in the first screen locking time period.
Optionally, the acquiring power consumption information of the electronic device before and after the package stopping within the preset screen locking time period includes:
extracting screen locking power consumption information of the electronic equipment in a first screen locking time period and a first number of application program packages running in a background;
extracting screen locking power consumption information of the electronic equipment in a second screen locking time period and a second number of application program packages running in the background;
if the first number of application packages and the second number of application packages are in an inclusion-to-inclusion relationship;
and respectively taking the screen locking power consumption information in the first screen locking time period and the screen locking power consumption information in the second screen locking time period as the screen locking power consumption information of the electronic equipment before and after the package stop in the preset screen locking time period.
Optionally, the calculating a lock screen power consumption information confidence interval by using the acquired lock screen power consumption information and a predetermined confidence level includes:
calculating a screen locking power consumption information difference value of screen locking power consumption information in a first screen locking time period and screen locking power consumption information in a second screen locking time period of the electronic equipment;
summing and averaging the screen locking power consumption information difference values of the electronic equipment to obtain a screen locking power consumption information mean value;
and calculating a screen locking power consumption information variance according to the screen locking power consumption information difference and the screen locking power consumption information mean, and identifying a screen locking power consumption information credible interval according to the screen locking power consumption information mean and the screen locking power consumption information variance.
Optionally, after obtaining the screen locking power consumption information of the electronic device before and after the packet stopping and before calculating the screen locking power consumption information confidence interval by using the obtained screen locking power consumption information and the predetermined confidence level, the method further includes:
and rejecting abnormal screen locking power consumption information in the acquired screen locking power consumption information according to a preset data exception handling strategy.
Optionally, before the calculating a mean value of the screen locking power consumption information of the electronic device located in the trusted interval of the screen locking power consumption information in the screen locking time period before the packet is stopped, the method further includes:
and filtering the screen locking power consumption information which is not in the screen locking power consumption information credible interval.
Optionally, the filtering the screen locking power consumption information that is not within the screen locking power consumption information trusted interval includes:
traversing all the electronic equipment, and extracting a screen locking power consumption information difference value of each electronic equipment;
judging whether the extracted difference value of the power consumption information of the screen locking is in the credible interval of the power consumption information of the screen locking, if not, deleting the power consumption information of the screen locking in the first screen locking time period and the power consumption information of the screen locking in the second screen locking time period which correspond to the extracted difference value of the power consumption information of the screen locking.
According to the method for comparing the power consumption of the application program package, the screen locking power consumption information of the electronic equipment before and after package stopping in the preset screen locking time period is obtained, the credible interval of the screen locking power consumption information is calculated by using the obtained screen locking power consumption information and the preset credibility, and the mean value of the screen locking power consumption information in the screen locking time period before and after package stopping is calculated in the credible interval of the screen locking power consumption information, so that the screen locking power consumption comparison optimization value in the interval is calculated. Therefore, the optimized power consumption comparison value of the lock screen can visually indicate the optimized effect of the package stopping processing on the power saving of the electronic equipment, so that a user group can visually feel specific power saving information before and after package stopping and the power saving optimized effect, the package stopping awareness of the user on unnecessary application packages is improved, the package stopping efficiency of the user is improved, and the power saving efficiency of the electronic equipment is optimized.
In another aspect, an embodiment of the present invention provides an apparatus for comparing power consumption of an application package, including: a screen locking power consumption information acquisition module, a credible interval determination module, a mean value statistic module and a comparison optimization value calculation module, wherein,
the screen locking power consumption information acquisition module is used for acquiring screen locking power consumption information of the electronic equipment before and after package stopping within a preset screen locking time period;
the credibility interval determining module is used for calculating a credibility interval of the screen locking power consumption information by using the acquired screen locking power consumption information and a preset credibility;
the mean value statistics module is used for calculating a screen locking power consumption information mean value of the electronic equipment in the screen locking time period before the screen locking power consumption information is stopped and a screen locking power consumption information mean value in the screen locking time period after the screen locking power consumption information is stopped;
and the comparison optimization value calculation module is used for calculating the lock screen power consumption comparison optimization value in the lock screen power consumption information credible interval by using the lock screen power consumption information mean value in the lock screen time period before the package stop and the lock screen power consumption information mean value in the lock screen time period after the package stop.
Optionally, the average value statistics module calculates an average value of power consumption information of a sub-interval screen locking in a screen locking time period of the electronic device before packet stop by using the following formula:
in the formula (I), the compound is shown in the specification,
Ψ1jthe screen locking power consumption information mean value of the electronic equipment in the jth credible subinterval in the screen locking time period before the package stopping;
Ψ1jifor the jth trusted subintervalThe screen locking power consumption information of the ith electronic equipment in the screen locking time period before the package stopping;
ljand the number of the electronic equipment with the screen locking power consumption information difference value in the jth credible sub-interval is determined.
Optionally, the lock screen power consumption information includes: screen locking power consumption and screen locking power consumption rate; the screen locking time period preset before and after package stopping comprises: the first screen locking time period before the package stopping and the second screen locking time period after the package stopping.
Optionally, the lock screen power consumption information obtaining module includes: a screen locking power consumption information acquisition unit before stopping the package and a screen locking power consumption information acquisition unit after stopping the package, wherein,
the device comprises a screen locking power consumption information acquisition unit before package stopping, wherein the screen locking power consumption information acquisition unit is used for setting a preset number of electronic equipment to operate an application program package with a first threshold value in a background, and acquiring screen locking power consumption information of the preset number of electronic equipment in a first screen locking time period before the set package stopping;
and the screen locking power consumption information acquisition unit is used for setting the application program packages of the preset number of electronic devices running a second threshold value in the background, and acquiring the screen locking power consumption information of the preset number of electronic devices in the second screen locking time period in the set second screen locking time period, wherein the running application program packages of the second threshold value and the running application program packages of the first threshold value are in a relation of containing and being contained.
Optionally, the first screen-lock period includes: a first lock screen period starting time point and a first lock screen period ending time point; the screen locking power consumption information is screen locking power consumption, and the acquiring of the screen locking power consumption information of the electronic equipment with the preset number in the first screen locking time period comprises the following steps:
acquiring a first residual capacity of the electronic equipment with the preset quantity at a starting time point of a first screen locking time period;
acquiring second residual capacity of the preset quantity of electronic equipment at the ending time point of the first screen locking time period;
and calculating the difference value of the first residual electric quantity and the second residual electric quantity to obtain the screen locking power consumption in the first screen locking time period.
Optionally, the first screen-lock period includes: the method comprises the following steps that a first screen locking time period starting time point and a first screen locking time period ending time point are obtained, the screen locking power consumption information is a screen locking power consumption rate, and the obtaining of the screen locking power consumption information of the electronic equipment with the preset number in the first screen locking time period comprises the following steps:
acquiring a first residual capacity of the electronic equipment with the preset quantity at a starting time point of a first screen locking time period;
acquiring second residual capacity of the preset quantity of electronic equipment at the ending time point of the first screen locking time period;
and calculating a difference value between the first residual capacity and the second residual capacity, and dividing the difference value by the first screen locking time period to obtain the screen locking power consumption rate in the first screen locking time period.
Optionally, the lock screen power consumption information obtaining module includes: a first extraction unit, a second extraction unit and a judgment unit, wherein,
the electronic equipment comprises a first extraction unit, a second extraction unit and a third extraction unit, wherein the first extraction unit is used for extracting screen locking power consumption information of the electronic equipment in a first screen locking time period and a first number of application program packages running in a background;
the second extraction unit is used for extracting screen locking power consumption information of the electronic equipment in a second screen locking time period and a second number of application program packages running in the background;
the judging unit is used for judging whether the first number of application program packages and the second number of application program packages are in the relation of inclusion and inclusion, if so, screen locking power consumption information in the first screen locking time period and screen locking power consumption information in the second screen locking time period are respectively used as screen locking power consumption information of the electronic equipment before and after the package stop in the preset screen locking time period respectively; if not, the flow ends.
Optionally, the trusted interval determining module includes: a difference value calculation unit, a mean value calculation unit, a variance calculation unit, and a confidence interval determination unit, wherein,
the difference value calculating unit is used for calculating the difference value of the screen locking power consumption information in the first screen locking time period and the screen locking power consumption information in the second screen locking time period of the electronic equipment;
the mean value calculating unit is used for summing and averaging the screen locking power consumption information difference values of the electronic equipment to obtain a screen locking power consumption information mean value;
the variance calculating unit is used for calculating the variance of the screen locking power consumption information according to the screen locking power consumption information difference value and the screen locking power consumption information mean value;
and the credible interval determining unit is used for identifying the credible interval of the screen locking power consumption information by using the mean value of the screen locking power consumption information and the variance of the screen locking power consumption information.
Optionally, the apparatus further comprises:
and the exception handling module is used for eliminating abnormal screen locking power consumption information in the acquired screen locking power consumption information according to a preset data exception handling strategy.
Optionally, the apparatus further comprises:
and the filtering module is used for filtering the screen locking power consumption information which is not in the screen locking power consumption information credible interval.
Optionally, the filtration module comprises: a traversing unit, a judging unit and a deleting unit, wherein,
the traversing unit is used for traversing all the electronic equipment and extracting the screen locking power consumption information difference value of each electronic equipment;
the judging unit is used for judging whether the extracted screen locking power consumption information difference value is within the credible interval of the screen locking power consumption information or not, and if not, the deleting unit is informed; if yes, no treatment is carried out;
and the deleting unit is used for receiving a notification and deleting the screen locking power consumption information in the first screen locking time period and the screen locking power consumption information in the second screen locking time period corresponding to the extracted screen locking power consumption information difference.
Optionally, the contrast optimization value calculation module includes: a mean difference value calculating unit and a comparison optimization value calculating unit, wherein,
the average difference value calculating unit is used for calculating the average value difference value of the screen locking power consumption information in the screen locking time period before the packet is stopped and the screen locking power consumption information in the screen locking time period after the packet is stopped;
and the comparison optimization value calculating unit is used for calculating the mean value difference value to be divided by the mean value of the screen locking power consumption information in the screen locking time period before the packet stop to obtain the screen locking power consumption comparison optimization value in the screen locking power consumption information credible interval.
Optionally, the mean statistic module includes: a sub-interval dividing unit and a sub-interval lock screen power consumption information mean value calculating unit, wherein,
the subinterval dividing unit is used for dividing the screen locking power consumption information credible interval into a plurality of credible subintervals according to a preset dividing strategy;
the subinterval screen locking power consumption information mean value calculating unit is used for calculating a subinterval screen locking power consumption information mean value of the electronic equipment in each credible subinterval in the screen locking time period before the package is stopped and a subinterval screen locking power consumption information mean value in the screen locking time period after the package is stopped;
the comparison optimization value calculation module is further used for obtaining the lock screen power consumption comparison optimization value of each credible subinterval according to the calculated average value of the subinterval lock screen power consumption information in the lock screen time period before the electronic equipment stops the package and the calculated average value of the subinterval lock screen power consumption information in the lock screen time period after the electronic equipment stops the package.
A terminal, comprising:
one or more processors;
a memory;
one or more modules stored in the memory that, when executed by the one or more processors, perform operations comprising:
acquiring screen locking power consumption information of the electronic equipment before and after package stopping within a preset screen locking time period;
calculating a credible interval of the screen locking power consumption information by using the acquired screen locking power consumption information and a preset credibility;
calculating the mean value of the screen locking power consumption information of the electronic equipment in the trusted screen locking power consumption information interval before the package is stopped and the mean value of the screen locking power consumption information of the electronic equipment in the screen locking time interval after the package is stopped;
and calculating a screen locking power consumption comparison optimization value of the screen locking power consumption information credible interval by using the screen locking power consumption information mean value in the screen locking time period before the packet is stopped and the screen locking power consumption information mean value in the screen locking time period after the packet is stopped.
According to the device for comparing power consumption of the application program package, provided by the embodiment of the invention, the lock screen power consumption information acquisition module acquires lock screen power consumption information of electronic equipment in a preset lock screen time period before and after package stop, the confidence interval determination module calculates the confidence interval of the lock screen power consumption information by using the acquired lock screen power consumption information and a preset confidence level, the mean value statistics module calculates the mean value of the lock screen power consumption information in the lock screen time period before and after package stop in the confidence interval of the lock screen power consumption information, and the comparison optimization value calculation module calculates the comparison optimization value of the lock screen power consumption in the interval based on the calculated mean value. Therefore, the optimized power consumption comparison value of the lock screen can visually indicate the optimized effect of the package stopping processing on the power saving of the electronic equipment, so that a user group can visually feel specific power saving information before and after package stopping and the power saving optimized effect, the package stopping awareness of the user on unnecessary application packages is improved, the package stopping efficiency of the user is improved, and the power saving efficiency of the electronic equipment is optimized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a method for comparing power consumption of application packages according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a process of acquiring screen locking power consumption information of a predetermined number of electronic devices in the first screen locking period according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of acquiring screen locking power consumption information of a predetermined number of electronic devices in the first screen locking time period according to a second embodiment of the present invention;
FIG. 4 is a schematic diagram of an apparatus for comparing power consumption of application packages according to an embodiment of the present invention;
FIG. 5 is a block diagram illustrating a trusted zone determination module according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all 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.
Fig. 1 is a flowchart illustrating a method for comparing power consumption of application packages according to an embodiment of the present invention. Referring to fig. 1, the method includes:
in this step, since the user may randomly perform activation or deactivation (packet stop) processing on the application package in the non-screen locking time period, in order to avoid subjective deviation caused by the user actively performing a packet stop operation on the application package, in the embodiment of the present invention, the screen locking power consumption information is acquired in the screen locking time period.
As an alternative embodiment, the lock screen power consumption information includes but is not limited to: lock screen power consumption and lock screen power consumption rate.
In the embodiment of the invention, the number of the electronic devices needing to acquire the lock screen power consumption information can be set according to actual needs, and the number is a natural number which is greater than or equal to 1. Preferably, the number of the electronic devices can be set by comprehensively considering the calculation resources required for subsequently calculating the lock screen power consumption information and the number of samples required for calculating the reliability of the result.
In the embodiment of the invention, the preset screen locking time periods before and after package stopping comprise: the method comprises the steps of obtaining screen locking power consumption information of the electronic equipment before package stopping in the first screen locking time period and obtaining screen locking power consumption information of the electronic equipment after package stopping in the second screen locking time period. The two screen locking time periods can be adjacent screen locking time periods or discontinuous screen locking time periods. Currently, in practical applications, the preset screen locking time periods before and after packet stopping may further include a plurality of time periods such as a third screen locking time period after packet stopping.
As an optional embodiment, the acquiring the screen locking power consumption information of the electronic device before and after the packet stop in the preset screen locking time period includes:
a1, setting a preset number of electronic devices to run an application package with a first threshold value in the background, and acquiring screen locking power consumption information of the preset number of electronic devices in a first screen locking time period before set package stopping;
in this step, in the first screen locking time period, the user does not perform the package stopping processing on the electronic device, and the screen locking power consumption information of the electronic device in the first screen locking time period is the screen locking power consumption information of the user group who does not stop packaging in the first screen locking time period. As an alternative embodiment, the first lock period may be set to one or more weeks.
In an embodiment of the present invention, the first screen locking period includes: the first screen locking time period starting time point and the first screen locking time period ending time point, the second screen locking time period includes: a second screen locking period start time point and a second screen locking period end time point.
As an optional embodiment, the screen locking power consumption information is screen locking power consumption. Fig. 2 is a schematic flowchart of a process of acquiring screen locking power consumption information of a predetermined number of electronic devices in the first screen locking time period according to an embodiment of the present invention. Referring to fig. 2, the process includes:
a11, acquiring a first residual capacity of the electronic equipment with the preset number at the starting time point of a first lock screen time period;
a12, acquiring a second residual capacity of the preset number of electronic devices at the end time point of the first screen locking time period;
and A13, calculating a difference value between the first residual capacity and the second residual capacity to obtain the screen locking power consumption in the first screen locking time period.
In this step, since the operation is performed on the plurality of electronic devices, before obtaining the screen locking power consumption in the first screen locking time period after calculating the difference between the first remaining power and the second remaining power, the method may further include:
and summing and averaging the difference values in the first screen locking time period of each electronic device.
In this step, the average value of the difference values in the first screen locking time period of each electronic device is used as the screen locking power consumption in the first screen locking time period.
In the embodiment of the invention, the power consumption of the lock screen can be arranged in the order from large to small, the earlier the sequence is, the more power is saved after the package stopping is indicated, and the package stopping processing is carried out on the application program packages under the condition that a user does not need the application program packages, so that more power can be saved for the electronic equipment.
As another alternative, the screen lock power consumption information is a screen lock power consumption rate. Fig. 3 is a schematic flowchart of a process of acquiring screen locking power consumption information of a predetermined number of electronic devices in the first screen locking time period according to a second embodiment of the present invention. Referring to fig. 2, the process includes:
a21, acquiring a first residual capacity of the electronic equipment with the preset number at the starting time point of a first lock screen time period;
a22, acquiring a second residual capacity of the preset number of electronic devices at the end time point of the first screen locking time period;
and A23, calculating a difference value between the first residual capacity and the second residual capacity, and dividing the difference value by the first screen locking time period to obtain the screen locking power consumption rate in the first screen locking time period.
In this step, the power consumption rate of the screen locking in unit time in the first screen locking time period can be obtained by using the power consumption of the screen locking in the first screen locking time period and the first screen locking time period.
As an optional embodiment, before obtaining the screen locking power consumption rate in the first screen locking time period after dividing the difference by the first screen locking time period, the method may further include:
and summing and averaging quotient values obtained by dividing the difference value by the first screen locking time period in the first screen locking time period of each electronic device.
And A2, setting the application packages of the preset number of electronic devices to run at a second threshold in the background, and acquiring screen locking power consumption information of the preset number of electronic devices in a second screen locking time period in the set second screen locking time period, wherein the running application packages of the second threshold and the running application packages of the first threshold are in a relation of containing and being contained.
In this step, if the screen locking power consumption information is screen locking power consumption, preferably, the time lengths included in the first screen locking time period and the second screen locking time period are equal. If the screen locking power consumption information is the screen locking power consumption rate, the set time lengths included in the first screen locking time period and the second screen locking time period can be equal or unequal.
In the embodiment of the present invention, for a plurality of electronic devices, the screen locking power consumption information in the second screen locking time period is an average value of the screen locking power consumption information of the plurality of electronic devices in the second screen locking time period.
As another optional embodiment, the acquiring the screen locking power consumption information of the electronic device before and after the packet stop in the preset screen locking time period includes:
b1, extracting screen locking power consumption information of the electronic equipment in a first screen locking time period and a first number of application packages running in the background;
b2, extracting screen locking power consumption information of the electronic equipment in a second screen locking time period and a second number of application packages running in the background;
b3, if the first number of application packages and the second number of application packages are in a containing and contained relationship;
in this step, the relationship between the first number of application packages and the second number of application packages as containing and contained includes: the first number of application packages comprises a second number of application packages, or the second number of application packages comprises the first number of application packages.
And B4, taking the screen locking power consumption information in the first screen locking time period and the screen locking power consumption information in the second screen locking time period as the screen locking power consumption information of the electronic equipment before and after the package stop in the preset screen locking time periods respectively.
In this step, the screen locking power consumption information in the first screen locking period is the screen locking power consumption information of the electronic device before the package is stopped, and the screen locking power consumption information in the second screen locking period is the screen locking power consumption information of the electronic device after the package is stopped.
As an alternative embodiment, since the operation is performed on a plurality of electronic devices, between step B3 and step B4, the method may further include:
c1, summing and averaging the screen locking power consumption information in the first screen locking time period of each electronic device; and the number of the first and second groups,
and C2, summing and averaging the screen locking power consumption information in the second screen locking time periods of the electronic devices.
In this step, the summed average screen locking power consumption information in the first screen locking time period and the summed average screen locking power consumption information in the second screen locking time period are respectively used as the screen locking power consumption information of the electronic devices before and after the packet stop in the preset screen locking time period respectively.
102, calculating a credible interval of the screen locking power consumption information by using the acquired screen locking power consumption information and a preset credibility;
in this step, as an optional embodiment, the reliability adopts the reliability of normal distribution. Preferably, the confidence level is a 3-fold mean square error (3dev) confidence level, although other multiples of mean square error confidence levels may be used, such as a 2-fold mean square error confidence level or a 5-fold mean square error confidence level; alternatively, other distributions of confidence may be employed, such as a poisson distribution, for example.
As an optional embodiment, calculating the lock screen power consumption information confidence interval by using the acquired lock screen power consumption information and a predetermined confidence level includes:
d1, calculating a screen locking power consumption information difference value of the screen locking power consumption information in the first screen locking time period and the screen locking power consumption information in the second screen locking time period of the electronic equipment;
in this step, the calculation formula of the power consumption difference value of the lock screen is as follows:
Δi=Ψ1i-Ψ2i
in the formula (I), the compound is shown in the specification,
Δithe lock screen power consumption information difference value of the ith electronic equipment is obtained;
Ψ1iscreen locking power consumption information in a first screen locking time period of the ith electronic equipment;
Ψ2iand the screen locking power consumption information is screen locking power consumption information in the second screen locking time period of the ith electronic equipment.
In the embodiment of the invention, if the preset screen locking time period further comprises a plurality of time periods such as a third screen locking time period after packet stopping, the difference value between the screen locking power consumption information in the first screen locking time period and the screen locking power consumption information in the plurality of time periods after packet stopping is calculated.
D2, summing and averaging the calculated screen locking power consumption information difference values of the electronic equipment to obtain a screen locking power consumption information mean value;
in this step, the average value calculation formula of the lock screen power consumption information is as follows:
in the formula (I), the compound is shown in the specification,
Δavgthe average value of the power consumption information of the lock screen is obtained;
and n is the number of electronic devices.
D3, calculating a screen locking power consumption information variance according to the screen locking power consumption information difference and the screen locking power consumption information mean, and identifying a screen locking power consumption information credible interval by the screen locking power consumption information mean and the screen locking power consumption information variance.
In this step, the variance of the power consumption information of the lock screen is calculated by using the following formula:
in the formula (I), the compound is shown in the specification,
and sigma is the variance of the power consumption information of the lock screen.
In the embodiment of the present invention, as an optional embodiment, the lock screen power consumption information trusted interval may be represented as:
Δavg±3σ。
in the embodiment of the present invention, for the acquired lock screen power consumption information, there may be some abnormal lock screen power consumption information, and in order to improve reliability of the analysis result, as an optional embodiment, before the electronic device before and after the stop packet is acquired and after the lock screen power consumption information in the preset lock screen time period is respectively acquired, and before the lock screen power consumption information confidence interval is calculated by using the acquired lock screen power consumption information and the predetermined confidence level, the method may further include:
and rejecting abnormal screen locking power consumption information in the acquired screen locking power consumption information according to a preset data exception handling strategy.
In this step, the data exception handling policy may be set according to actual needs, for example, taking screen locking power consumption as an example, if the acquired screen locking power consumption exceeds a preset screen locking power consumption threshold interval, the screen locking power consumption is rejected.
103, calculating a screen locking power consumption information mean value of the electronic equipment in the screen locking time period before the package is stopped and a screen locking power consumption information mean value in the screen locking time period after the package is stopped;
in this step, the average value of the screen locking power consumption information of the electronic device in the screen locking time period before the package stop is calculated by using the following formula:
in the formula (I), the compound is shown in the specification,
Ψ1and the average value of the screen locking power consumption information of the electronic equipment in the screen locking time period before the package stopping.
Calculating the average value of the screen locking power consumption information of the electronic equipment in the screen locking time period after the package is stopped by using the following formula:
in the formula (I), the compound is shown in the specification,
Ψ2and the average value of the screen locking power consumption information of the electronic equipment in the screen locking time period after the package stopping.
In this embodiment, as an optional embodiment, before the calculating a screen locking power consumption information average value of the electronic device located in the trusted interval of the screen locking power consumption information in the screen locking time period before the packet is stopped, the method further includes:
and filtering the screen locking power consumption information which is not in the screen locking power consumption information credible interval.
In this step, as an optional embodiment, the filtering the screen locking power consumption information that is not within the screen locking power consumption information trusted interval includes:
e1, traversing all the electronic devices, and extracting the screen locking power consumption information difference value of each electronic device;
e2, judging whether the extracted screen locking power consumption information difference value is within the screen locking power consumption information credible interval, and if not, deleting the screen locking power consumption information in the first screen locking time period and the screen locking power consumption information in the second screen locking time period corresponding to the extracted screen locking power consumption information difference value.
In this step, if Δi (Δavg± 3 σ), the lock screen power consumption information related to the electronic device is filtered (deleted).
And 104, calculating a screen locking power consumption comparison optimization value of the screen locking power consumption information credible interval by using the screen locking power consumption information average value in the screen locking time period before the packet stop and the screen locking power consumption information average value in the screen locking time period after the packet stop.
In this step, as an optional embodiment, calculating a lock screen power consumption comparison optimization value in the lock screen power consumption information trusted interval by using the lock screen power consumption information average value in the lock screen time period before the packet stop and the lock screen power consumption information average value in the lock screen time period after the packet stop includes:
f1, calculating the average value difference value of the screen locking power consumption information average value in the screen locking time period before the package stop and the screen locking power consumption information average value in the screen locking time period after the package stop;
f2, calculating the average difference value to be divided by the average value of the screen locking power consumption information in the screen locking time period before the package stop, and obtaining a screen locking power consumption comparison optimization value in the screen locking power consumption information credible interval.
In this step, the screen locking power consumption comparison optimization value of the screen locking power consumption information credible interval is calculated by using the following formula:
in the formula (I), the compound is shown in the specification,
Ψ1and comparing the lock screen power consumption of the lock screen power consumption information credible interval with an optimized value.
In the embodiment of the invention, the lock screen power consumption comparison optimization value in the lock screen power consumption information credible interval is obtained by calculating the difference value between the lock screen power consumption information mean value in the lock screen time period before the package stop and the lock screen power consumption information mean value in the lock screen time period after the package stop and dividing the difference value by the lock screen power consumption information mean value in the lock screen time period before the package stop, and the larger the lock screen power consumption comparison optimization value is, the more remarkable the power saving effect of the package stop processing on the electronic equipment is. Therefore, through the direct display of the power consumption comparison optimization value of the lock screen, the user can have visual feeling on the specific power saving amount information before and after package stopping, the package stopping awareness of the user on unnecessary application packages is improved, and the power saving optimization efficiency of the electronic equipment is improved.
In the embodiment of the invention, the credible interval of the screen locking power consumption information can be divided into sub-intervals, and the comparison optimization value of the screen locking power consumption of each sub-interval is calculated. Therefore, as another optional embodiment, calculating a mean value of the screen locking power consumption information of the electronic device located in the trusted screen locking power consumption information interval before the screen locking period is stopped and a mean value of the screen locking power consumption information of the electronic device located in the trusted screen locking power consumption information interval after the screen locking period is stopped includes:
g1, dividing the lock screen power consumption information credible interval into a plurality of credible sub-intervals according to a preset division strategy, and calculating the sub-interval lock screen power consumption information mean value of the electronic equipment in each credible sub-interval in the lock screen time period before the package is stopped and the sub-interval lock screen power consumption information mean value in the lock screen time period after the package is stopped;
in this step, the partition strategy may be determined according to actual needs, for example, as an optional embodiment, the trusted interval [ Δ ] of the screen locking power consumption information may be determined according to the variance gradient of the screen locking power consumption informationavg-3σ,Δavg+3σ]Dividing the data into 6 credible subintervals, which are respectively as follows:
[Δavg-3σ,Δavg-2σ]、(Δavg-2σ,Δavg-σ]、(Δavg-σ,Δavg]、(Δavg,Δavg+σ]、(Δavg+σ,Δavg+2σ]and (Δ)avg+2σ,Δavg+3σ]。
As another alternative, the trusted subintervals may be divided by 10%, 20%, 30%, etc. of the most power consumed, e.g., 10%, 20%, 30%, …, 3100% of 6 σ into 10 trusted subintervals.
In this step, the following formula is used to calculate the average value of the power consumption information of the electronic device during the sub-interval screen locking time period before the packet is stopped:
in the formula (I), the compound is shown in the specification,
Ψ1jfor the lock of the electronic equipment in the jth credible subinterval in the screen locking time period before packet stoppingAverage value of screen power consumption information;
Ψ1jiscreen locking power consumption information of the ith electronic equipment in a screen locking time period before package stopping in the jth credible subinterval;
ljand the number of the electronic equipment with the screen locking power consumption information difference value in the jth credible sub-interval is determined.
Calculating the average value of the sub-interval screen locking power consumption information of the electronic equipment in the screen locking time period after the package is stopped by using the following formula:
in the formula (I), the compound is shown in the specification,
Ψ2jthe method comprises the steps that the average value of screen locking power consumption information of a sub-interval of the electronic equipment in a screen locking time period after packet stopping is obtained;
Ψ1jiand screen locking power consumption information of the ith electronic equipment in the screen locking time period after the package is stopped in the jth credible subinterval.
Calculating a screen locking power consumption comparison optimization value of the screen locking power consumption information credible interval by using the screen locking power consumption information mean value in the screen locking time period before the packet stop and the screen locking power consumption information mean value in the screen locking time period after the packet stop, wherein the screen locking power consumption comparison optimization value comprises the following steps:
g2, obtaining the lock screen power consumption comparison optimization value of each credible subinterval according to the calculated average value of the subinterval lock screen power consumption information of the electronic equipment in the lock screen time period before the package is stopped and the calculated average value of the subinterval lock screen power consumption information of the electronic equipment in the lock screen time period after the package is stopped.
In this step, the lock screen power consumption comparison optimization value of the credible subinterval is calculated by using the following formula:
in the formula, ξjAnd comparing the lock screen power consumption of the jth credible subinterval with the optimized value.
That is to say, the screen locking power consumption comparison optimization value of each trusted subinterval is a quotient obtained by dividing the difference between the screen locking power consumption information mean value of the electronic equipment which does not stop packaging and the screen locking power consumption information mean value of the electronic equipment which stops packaging in the trusted subinterval by the screen locking power consumption comparison optimization value of the electronic equipment which does not stop packaging.
In view of the above, in the method for comparing power consumptions of application packages according to the embodiment of the present invention, screen locking power consumption information of the electronic devices before and after package stopping within the preset screen locking time period is obtained; calculating a credible interval of the screen locking power consumption information by using the acquired screen locking power consumption information and a preset credibility; calculating the mean value of the screen locking power consumption information of the electronic equipment in the trusted screen locking power consumption information interval before the package is stopped and the mean value of the screen locking power consumption information of the electronic equipment in the screen locking time interval after the package is stopped; and calculating a screen locking power consumption comparison optimization value of the screen locking power consumption information credible interval by using the screen locking power consumption information mean value in the screen locking time period before the packet is stopped and the screen locking power consumption information mean value in the screen locking time period after the packet is stopped. Therefore, the larger the power consumption comparison optimization value of the lock screen is, the more remarkable the power saving effect of the package stopping processing on the electronic equipment is shown, and the size of the power consumption comparison optimization value of the lock screen can visually show the power saving optimization effect of the package stopping processing on the electronic equipment, so that the power saving function index of a user group can be obtained through the package stopping data of the user and quantized, when the package stopping processing is carried out on a single electronic equipment, the power saving function index of the user can be obtained, the user or the user group can have visual perception on specific power saving amount information and the power saving optimization effect before and after package stopping, the package stopping awareness of the user on unnecessary application packages is improved, and the power saving efficiency of the electronic equipment is optimized.
Fig. 4 is a schematic structural diagram of an apparatus for comparing power consumption of application packages according to an embodiment of the present invention. Referring to fig. 4, the apparatus includes: a screen locking power consumption information obtaining module 201, a credible interval determining module 202, a mean value statistical module 203, and a comparison optimization value calculating module 204, wherein,
a screen locking power consumption information acquiring module 201, configured to acquire screen locking power consumption information of the electronic devices before and after packet stop within a preset screen locking time period;
in this embodiment of the present invention, as an optional embodiment, the lock screen power consumption information includes: screen locking power consumption and screen locking power consumption rate; the screen locking time period preset before and after package stopping comprises: the first screen locking time period before the package stopping and the second screen locking time period after the package stopping.
In this embodiment of the present invention, as an optional embodiment, the lock screen power consumption information obtaining module 201 includes: a screen locking power consumption information acquiring unit before stopping the package, and a screen locking power consumption information acquiring unit after stopping the package (not shown in the figure), wherein,
the device comprises a screen locking power consumption information acquisition unit before package stopping, wherein the screen locking power consumption information acquisition unit is used for setting a preset number of electronic equipment to operate an application program package with a first threshold value in a background, and acquiring screen locking power consumption information of the preset number of electronic equipment in a first screen locking time period before the set package stopping;
in an embodiment of the present invention, the first screen locking period includes: a first lock period start time point and a first lock period end time point.
As an optional embodiment, the screen locking power consumption information is screen locking power consumption, and the acquiring the screen locking power consumption information of the predetermined number of electronic devices in the first screen locking time period includes:
acquiring a first residual capacity of the electronic equipment with the preset quantity at a starting time point of a first screen locking time period;
acquiring second residual capacity of the preset quantity of electronic equipment at the ending time point of the first screen locking time period;
and calculating the difference value of the first residual electric quantity and the second residual electric quantity to obtain the screen locking power consumption in the first screen locking time period.
As another optional embodiment, the screen locking power consumption information is a screen locking power consumption rate, and the obtaining of the screen locking power consumption information of the predetermined number of electronic devices in the first screen locking time period includes:
acquiring a first residual capacity of the electronic equipment with the preset quantity at a starting time point of a first screen locking time period;
acquiring second residual capacity of the preset quantity of electronic equipment at the ending time point of the first screen locking time period;
and calculating a difference value between the first residual capacity and the second residual capacity, and dividing the difference value by the first screen locking time period to obtain the screen locking power consumption rate in the first screen locking time period.
And the screen locking power consumption information acquisition unit is used for setting the application program packages of the preset number of electronic devices running a second threshold value in the background, and acquiring the screen locking power consumption information of the preset number of electronic devices in the second screen locking time period in the set second screen locking time period, wherein the running application program packages of the second threshold value and the running application program packages of the first threshold value are in a relation of containing and being contained.
As another alternative embodiment, the lock screen power consumption information obtaining module 201 includes: a first extraction unit, a second extraction unit and a judgment unit (not shown in the figure),
the electronic equipment comprises a first extraction unit, a second extraction unit and a third extraction unit, wherein the first extraction unit is used for extracting screen locking power consumption information of the electronic equipment in a first screen locking time period and a first number of application program packages running in a background;
the second extraction unit is used for extracting screen locking power consumption information of the electronic equipment in a second screen locking time period and a second number of application program packages running in the background;
the judging unit is used for judging whether the first number of application program packages and the second number of application program packages are in the relation of inclusion and inclusion, if so, screen locking power consumption information in the first screen locking time period and screen locking power consumption information in the second screen locking time period are respectively used as screen locking power consumption information of the electronic equipment before and after the package stop in the preset screen locking time period respectively; if not, the flow ends.
A trusted interval determining module 202, configured to calculate a trusted interval of the screen locking power consumption information by using the acquired screen locking power consumption information and a predetermined confidence level;
in the embodiment of the present invention, as an optional embodiment, fig. 5 is a schematic structural diagram of a trusted interval determining module in the embodiment of the present invention. Referring to fig. 5, the trusted interval determination module 202 includes: a difference value calculation unit 51, a mean value calculation unit 52, a variance calculation unit 53, and a confidence interval determination unit 54, wherein,
a difference value calculating unit 51, configured to calculate a difference value between screen locking power consumption information in a first screen locking time period and screen locking power consumption information in a second screen locking time period of the electronic device;
the mean value calculating unit 52 is configured to sum and average the calculated screen locking power consumption information difference values of the electronic devices to obtain a screen locking power consumption mean value;
a variance calculating unit 53, configured to calculate a variance of the screen locking power consumption information according to the screen locking power consumption information difference and the screen locking power consumption information mean;
and a trusted interval determining unit 54, configured to identify a trusted interval of the screen locking power consumption information by using the screen locking power consumption information mean and the screen locking power consumption information variance.
The mean value statistics module 203 is configured to calculate a mean value of screen locking power consumption information of the electronic device in the screen locking time period before the screen locking power consumption information is stopped and a mean value of screen locking power consumption information of the electronic device in the screen locking time period after the screen locking power consumption information is stopped;
in the embodiment of the present invention, as an optional embodiment, the following formula is used to calculate an average value of power consumption information of a sub-interval screen locking in a screen locking time period before a packet is stopped of the electronic device:
in the formula (I), the compound is shown in the specification,
Ψ1jthe screen locking power consumption information mean value of the electronic equipment in the jth credible subinterval in the screen locking time period before the package stopping;
Ψ1jiscreen locking power consumption information of the ith electronic equipment in a screen locking time period before package stopping in the jth credible subinterval;
ljand the number of the electronic equipment with the screen locking power consumption information difference value in the jth credible sub-interval is determined.
And the comparison optimization value calculating module 204 is configured to calculate a screen locking power consumption comparison optimization value in the screen locking power consumption information credible interval by using the screen locking power consumption information average value in the screen locking time period before the packet is stopped and the screen locking power consumption information average value in the screen locking time period after the packet is stopped.
In this embodiment of the present invention, as an optional embodiment, the comparison optimization value calculating module 204 includes: a mean difference value calculation unit and a contrast optimization value calculation unit (not shown), wherein,
the average difference value calculating unit is used for calculating the average value difference value of the screen locking power consumption information in the screen locking time period before the packet is stopped and the screen locking power consumption information in the screen locking time period after the packet is stopped;
and the comparison optimization value calculating unit is used for calculating the mean value difference value to be divided by the mean value of the screen locking power consumption information in the screen locking time period before the packet stop to obtain the screen locking power consumption comparison optimization value in the screen locking power consumption information credible interval.
In this embodiment of the present invention, as an optional embodiment, the mean value statistics module 203 includes: a sub-interval dividing unit and a sub-interval lock screen power consumption information average calculating unit (not shown), wherein,
the subinterval dividing unit is used for dividing the screen locking power consumption information credible interval into a plurality of credible subintervals according to a preset dividing strategy;
the subinterval screen locking power consumption information mean value calculating unit is used for calculating a subinterval screen locking power consumption information mean value of the electronic equipment in each credible subinterval in the screen locking time period before the package is stopped and a subinterval screen locking power consumption information mean value in the screen locking time period after the package is stopped;
the comparison optimization value calculation module 204 is further configured to obtain a screen locking power consumption comparison optimization value of each trusted subinterval according to the calculated average value of the subinterval screen locking power consumption information in the screen locking time period before the electronic device stops the packet and the calculated average value of the subinterval screen locking power consumption information in the screen locking time period after the electronic device stops the packet.
As an alternative embodiment, the apparatus may further include:
and the exception handling module 205 is configured to remove abnormal screen locking power consumption information from the acquired screen locking power consumption information according to a preset data exception handling policy.
As still another alternative, the apparatus may further include:
and the filtering module 206 is configured to filter the screen locking power consumption information that is not within the screen locking power consumption information trusted interval.
In the embodiment of the present invention, preferably, the filtering module includes: a traversal unit, a determination unit, and a deletion unit (not shown), wherein,
the traversing unit is used for traversing all the electronic equipment and extracting the screen locking power consumption information difference value of each electronic equipment;
the judging unit is used for judging whether the extracted screen locking power consumption information difference value is within the credible interval of the screen locking power consumption information or not, and if not, the deleting unit is informed; if yes, no treatment is carried out;
and the deleting unit is used for receiving a notification and deleting the screen locking power consumption information in the first screen locking time period and the screen locking power consumption information in the second screen locking time period corresponding to the extracted screen locking power consumption information difference.
An embodiment of the present invention further provides a terminal, referring to fig. 6, where fig. 6 is a schematic structural diagram of the terminal according to the embodiment of the present invention, and the terminal may include:
one or more processors 61;
a memory 62;
one or more modules 63, the one or more modules 63 stored in the memory 62, when executed by the one or more processors 61, to:
acquiring screen locking power consumption information of the electronic equipment before and after package stopping within a preset screen locking time period;
calculating a credible interval of the screen locking power consumption information by using the acquired screen locking power consumption information and a preset credibility;
calculating the mean value of the screen locking power consumption information of the electronic equipment in the trusted screen locking power consumption information interval before the package is stopped and the mean value of the screen locking power consumption information of the electronic equipment in the screen locking time interval after the package is stopped;
and calculating a screen locking power consumption comparison optimization value of the screen locking power consumption information credible interval by using the screen locking power consumption information mean value in the screen locking time period before the packet is stopped and the screen locking power consumption information mean value in the screen locking time period after the packet is stopped.
The embodiment of the invention also provides a storage medium for storing the application program, and the application program is used for executing the method for comparing the power consumption of the application program package provided by the embodiment of the invention.
The embodiment of the invention also provides an application program, which is used for executing the method for comparing the power consumption of the application program package provided by the embodiment of the invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or terminal, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or terminal and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or terminal. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
For convenience of description, the above devices are described separately in terms of functional division into various units/modules. Of course, the functionality of the units/modules may be implemented in one or more software and/or hardware implementations of the invention.
From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (27)
1. A method for comparing power consumption of application packages, the method comprising:
acquiring screen locking power consumption information of the electronic equipment before and after package stopping within a preset screen locking time period;
calculating a credible interval of the screen locking power consumption information by using the acquired screen locking power consumption information and a preset credibility;
calculating the mean value of the screen locking power consumption information of the electronic equipment in the trusted screen locking power consumption information interval before the package is stopped and the mean value of the screen locking power consumption information of the electronic equipment in the screen locking time interval after the package is stopped;
and calculating a screen locking power consumption comparison optimization value of the screen locking power consumption information credible interval by using the screen locking power consumption information mean value in the screen locking time period before the packet is stopped and the screen locking power consumption information mean value in the screen locking time period after the packet is stopped.
2. The method of claim 1, wherein the calculating a mean value of the screen locking power consumption information of the electronic device located in the screen locking power consumption information trusted interval in the screen locking time period before the packet is stopped and a mean value of the screen locking power consumption information of the electronic device located in the screen locking time period after the packet is stopped comprises:
dividing the screen locking power consumption information credible interval into a plurality of credible subintervals according to a preset division strategy, and calculating a subinterval screen locking power consumption information mean value of the electronic equipment in each credible subinterval in a screen locking time period before packet stopping and a subinterval screen locking power consumption information mean value of the electronic equipment in the screen locking time period after packet stopping;
the calculating of the lock screen power consumption comparison optimization value in the lock screen power consumption information credible interval by using the lock screen power consumption information average value in the lock screen time period before the packet stop and the lock screen power consumption information average value in the lock screen time period after the packet stop comprises:
and obtaining a screen locking power consumption comparison optimization value of each credible subinterval according to the calculated average value of the subinterval screen locking power consumption information of the electronic equipment in the screen locking time period before the packet is stopped and the calculated average value of the subinterval screen locking power consumption information of the electronic equipment in the screen locking time period after the packet is stopped.
3. The method according to claim 1, wherein the calculating the lock screen power consumption comparison optimization value of the lock screen power consumption information confidence interval by using the lock screen power consumption information mean value in the lock screen time period before the packet stop and the lock screen power consumption information mean value in the lock screen time period after the packet stop comprises:
calculating the mean difference value of the screen locking power consumption information mean value in the screen locking time period before the packet is stopped and the screen locking power consumption information mean value in the screen locking time period after the packet is stopped;
and calculating the average value difference value to be divided by the average value of the screen locking power consumption information in the screen locking time period before the packet stop, so as to obtain a screen locking power consumption comparison optimization value in the screen locking power consumption information credible interval.
4. The method of claim 1, wherein the average value of the sub-interval screen locking power consumption information of the electronic device in the screen locking period before the packet is stopped is calculated by using the following formula:
in the formula (I), the compound is shown in the specification,
Ψ1jthe screen locking power consumption information mean value of the electronic equipment in the jth credible subinterval in the screen locking time period before the package stopping;
Ψ1jiscreen locking power consumption information of the ith electronic equipment in a screen locking time period before package stopping in the jth credible subinterval;
ljand the number of the electronic equipment with the screen locking power consumption information difference value in the jth credible sub-interval is determined.
5. The method of any of claims 1 to 4, wherein the lock screen power consumption information comprises: screen locking power consumption and screen locking power consumption rate; the screen locking time period preset before and after package stopping comprises: the first screen locking time period before the package stopping and the second screen locking time period after the package stopping.
6. The method according to claim 5, wherein the obtaining of the screen locking power consumption information of the electronic devices before and after the packet stop within the preset screen locking time period comprises:
the method comprises the steps that a preset number of electronic devices are set to operate an application program package with a first threshold value in a background, and screen locking power consumption information of the preset number of electronic devices in a first screen locking time period before package stopping is obtained in the set first screen locking time period;
and setting the application program packages of the preset number of electronic devices to run a second threshold value in the background, and acquiring screen locking power consumption information of the preset number of electronic devices in a second screen locking time period in the set second screen locking time period, wherein the running application program packages of the second threshold value and the running application program packages of the first threshold value are in a relation of containing and being contained.
7. The method of claim 6, wherein the first lock period comprises: a first lock screen period starting time point and a first lock screen period ending time point; the screen locking power consumption information is screen locking power consumption, and the acquiring of the screen locking power consumption information of the electronic equipment with the preset number in the first screen locking time period comprises the following steps:
acquiring a first residual capacity of the electronic equipment with the preset quantity at a starting time point of a first screen locking time period;
acquiring second residual capacity of the preset quantity of electronic equipment at the ending time point of the first screen locking time period;
and calculating the difference value of the first residual electric quantity and the second residual electric quantity to obtain the screen locking power consumption in the first screen locking time period.
8. The method of claim 6, wherein the first lock period comprises: a first lock screen period starting time point and a first lock screen period ending time point;
the screen locking power consumption information is a screen locking power consumption rate, and the acquiring of the screen locking power consumption information of the predetermined number of electronic devices in the first screen locking time period includes:
acquiring a first residual capacity of the electronic equipment with the preset quantity at a starting time point of a first screen locking time period;
acquiring second residual capacity of the preset quantity of electronic equipment at the ending time point of the first screen locking time period;
and calculating a difference value between the first residual capacity and the second residual capacity, and dividing the difference value by the first screen locking time period to obtain the screen locking power consumption rate in the first screen locking time period.
9. The method according to claim 5, wherein the obtaining of the screen locking power consumption information of the electronic devices before and after the packet stop within the preset screen locking time period comprises:
extracting screen locking power consumption information of the electronic equipment in a first screen locking time period and a first number of application program packages running in a background;
extracting screen locking power consumption information of the electronic equipment in a second screen locking time period and a second number of application program packages running in the background;
if the first number of application packages and the second number of application packages are in an inclusion-to-inclusion relationship;
and respectively taking the screen locking power consumption information in the first screen locking time period and the screen locking power consumption information in the second screen locking time period as the screen locking power consumption information of the electronic equipment before and after the package stop in the preset screen locking time period.
10. The method according to claim 5, wherein the calculating a lock screen power consumption information confidence interval by using the acquired lock screen power consumption information and a predetermined confidence level comprises:
calculating a screen locking power consumption information difference value of screen locking power consumption information in a first screen locking time period and screen locking power consumption information in a second screen locking time period of the electronic equipment;
summing and averaging the screen locking power consumption information difference values of the electronic equipment to obtain a screen locking power consumption information mean value;
and calculating a screen locking power consumption information variance according to the screen locking power consumption information difference and the screen locking power consumption information mean, and identifying a screen locking power consumption information credible interval according to the screen locking power consumption information mean and the screen locking power consumption information variance.
11. The method according to any one of claims 1 to 4, wherein after obtaining the screen locking power consumption information of the electronic devices before and after the stop packet in the preset screen locking time period, respectively, and before calculating the screen locking power consumption information confidence interval by using the obtained screen locking power consumption information and a predetermined confidence level, the method further comprises:
and rejecting abnormal screen locking power consumption information in the acquired screen locking power consumption information according to a preset data exception handling strategy.
12. The method according to any one of claims 1 to 4, wherein before the calculating a mean value of the screen locking power consumption information of the electronic device located in the screen locking time period before the screen locking power consumption information trusted interval is stopped, the method further comprises:
and filtering the screen locking power consumption information which is not in the screen locking power consumption information credible interval.
13. The method of claim 12, wherein the filtering power consumption information that is not within the power consumption information confidence interval comprises:
traversing all the electronic equipment, and extracting a screen locking power consumption information difference value of each electronic equipment;
judging whether the extracted difference value of the power consumption information of the screen locking is in the credible interval of the power consumption information of the screen locking, if not, deleting the power consumption information of the screen locking in the first screen locking time period and the power consumption information of the screen locking in the second screen locking time period which correspond to the extracted difference value of the power consumption information of the screen locking.
14. An apparatus for power consumption comparison of an application package, the apparatus comprising: a screen locking power consumption information acquisition module, a credible interval determination module, a mean value statistic module and a comparison optimization value calculation module, wherein,
the screen locking power consumption information acquisition module is used for acquiring screen locking power consumption information of the electronic equipment before and after package stopping within a preset screen locking time period;
the credibility interval determining module is used for calculating a credibility interval of the screen locking power consumption information by using the acquired screen locking power consumption information and a preset credibility;
the mean value statistics module is used for calculating a screen locking power consumption information mean value of the electronic equipment in the screen locking time period before the screen locking power consumption information is stopped and a screen locking power consumption information mean value in the screen locking time period after the screen locking power consumption information is stopped;
and the comparison optimization value calculation module is used for calculating the lock screen power consumption comparison optimization value in the lock screen power consumption information credible interval by using the lock screen power consumption information mean value in the lock screen time period before the package stop and the lock screen power consumption information mean value in the lock screen time period after the package stop.
15. The apparatus of claim 14, wherein the average statistics module calculates the average value of the sub-interval lock screen power consumption information of the electronic device during the lock screen time period before the packet is stopped by using the following formula:
in the formula (I), the compound is shown in the specification,
Ψ1jthe screen locking power consumption information mean value of the electronic equipment in the jth credible subinterval in the screen locking time period before the package stopping;
Ψ1ji isScreen locking power consumption information of the ith electronic equipment in a screen locking time period before package stopping in the jth credible subinterval;
ljand the number of the electronic equipment with the screen locking power consumption information difference value in the jth credible sub-interval is determined.
16. The apparatus of claim 14, wherein the lock screen power consumption information comprises: screen locking power consumption and screen locking power consumption rate; the screen locking time period preset before and after package stopping comprises: the first screen locking time period before the package stopping and the second screen locking time period after the package stopping.
17. The apparatus of claim 14, wherein the lock screen power consumption information obtaining module comprises: a screen locking power consumption information acquisition unit before stopping the package and a screen locking power consumption information acquisition unit after stopping the package, wherein,
the device comprises a screen locking power consumption information acquisition unit before package stopping, wherein the screen locking power consumption information acquisition unit is used for setting a preset number of electronic equipment to operate an application program package with a first threshold value in a background, and acquiring screen locking power consumption information of the preset number of electronic equipment in a first screen locking time period before the set package stopping;
and the screen locking power consumption information acquisition unit is used for setting the application program packages of the preset number of electronic devices running a second threshold value in the background, and acquiring the screen locking power consumption information of the preset number of electronic devices in the second screen locking time period in the set second screen locking time period, wherein the running application program packages of the second threshold value and the running application program packages of the first threshold value are in a relation of containing and being contained.
18. The apparatus of claim 17, wherein the first lock period comprises: a first lock screen period starting time point and a first lock screen period ending time point; the screen locking power consumption information is screen locking power consumption, and the acquiring of the screen locking power consumption information of the electronic equipment with the preset number in the first screen locking time period comprises the following steps:
acquiring a first residual capacity of the electronic equipment with the preset quantity at a starting time point of a first screen locking time period;
acquiring second residual capacity of the preset quantity of electronic equipment at the ending time point of the first screen locking time period;
and calculating the difference value of the first residual electric quantity and the second residual electric quantity to obtain the screen locking power consumption in the first screen locking time period.
19. The apparatus of claim 17, wherein the first lock period comprises: a first lock screen period starting time point and a first lock screen period ending time point; the screen locking power consumption information is a screen locking power consumption rate, and the acquiring of the screen locking power consumption information of the predetermined number of electronic devices in the first screen locking time period includes:
acquiring a first residual capacity of the electronic equipment with the preset quantity at a starting time point of a first screen locking time period;
acquiring second residual capacity of the preset quantity of electronic equipment at the ending time point of the first screen locking time period;
and calculating a difference value between the first residual capacity and the second residual capacity, and dividing the difference value by the first screen locking time period to obtain the screen locking power consumption rate in the first screen locking time period.
20. The apparatus of claim 14, wherein the lock screen power consumption information obtaining module comprises: a first extraction unit, a second extraction unit and a judgment unit, wherein,
the electronic equipment comprises a first extraction unit, a second extraction unit and a third extraction unit, wherein the first extraction unit is used for extracting screen locking power consumption information of the electronic equipment in a first screen locking time period and a first number of application program packages running in a background;
the second extraction unit is used for extracting screen locking power consumption information of the electronic equipment in a second screen locking time period and a second number of application program packages running in the background;
the judging unit is used for judging whether the first number of application program packages and the second number of application program packages are in the relation of inclusion and inclusion, if so, screen locking power consumption information in the first screen locking time period and screen locking power consumption information in the second screen locking time period are respectively used as screen locking power consumption information of the electronic equipment before and after the package stop in the preset screen locking time period respectively; if not, the flow ends.
21. The apparatus of claim 14, wherein the trusted interval determination module comprises: a difference value calculation unit, a mean value calculation unit, a variance calculation unit, and a confidence interval determination unit, wherein,
the difference value calculating unit is used for calculating the difference value of the screen locking power consumption information in the first screen locking time period and the screen locking power consumption information in the second screen locking time period of the electronic equipment;
the mean value calculating unit is used for summing and averaging the screen locking power consumption information difference values of the electronic equipment to obtain a screen locking power consumption information mean value;
the variance calculating unit is used for calculating the variance of the screen locking power consumption information according to the screen locking power consumption information difference value and the screen locking power consumption information mean value;
and the credible interval determining unit is used for identifying the credible interval of the screen locking power consumption information by using the mean value of the screen locking power consumption information and the variance of the screen locking power consumption information.
22. The apparatus of any one of claims 14 to 21, further comprising:
and the exception handling module is used for eliminating abnormal screen locking power consumption information in the acquired screen locking power consumption information according to a preset data exception handling strategy.
23. The apparatus of any one of claims 14 to 21, further comprising:
and the filtering module is used for filtering the screen locking power consumption information which is not in the screen locking power consumption information credible interval.
24. The apparatus of claim 23, wherein the filtration module comprises: a traversing unit, a judging unit and a deleting unit, wherein,
the traversing unit is used for traversing all the electronic equipment and extracting the screen locking power consumption information difference value of each electronic equipment;
the judging unit is used for judging whether the extracted screen locking power consumption information difference value is within the credible interval of the screen locking power consumption information or not, and if not, the deleting unit is informed; if yes, no treatment is carried out;
and the deleting unit is used for receiving a notification and deleting the screen locking power consumption information in the first screen locking time period and the screen locking power consumption information in the second screen locking time period corresponding to the extracted screen locking power consumption information difference.
25. The apparatus of claim 14, wherein the contrast optimization value calculation module comprises: a mean difference value calculating unit and a comparison optimization value calculating unit, wherein,
the average difference value calculating unit is used for calculating the average value difference value of the screen locking power consumption information in the screen locking time period before the packet is stopped and the screen locking power consumption information in the screen locking time period after the packet is stopped;
and the comparison optimization value calculating unit is used for calculating the mean value difference value to be divided by the mean value of the screen locking power consumption information in the screen locking time period before the packet stop to obtain the screen locking power consumption comparison optimization value in the screen locking power consumption information credible interval.
26. The apparatus of claim 14, wherein the mean statistics module comprises: a sub-interval dividing unit and a sub-interval lock screen power consumption information mean value calculating unit, wherein,
the subinterval dividing unit is used for dividing the screen locking power consumption information credible interval into a plurality of credible subintervals according to a preset dividing strategy;
the subinterval screen locking power consumption information mean value calculating unit is used for calculating a subinterval screen locking power consumption information mean value of the electronic equipment in each credible subinterval in the screen locking time period before the package is stopped and a subinterval screen locking power consumption information mean value in the screen locking time period after the package is stopped;
the comparison optimization value calculation module is further used for obtaining the lock screen power consumption comparison optimization value of each credible subinterval according to the calculated average value of the subinterval lock screen power consumption information in the lock screen time period before the electronic equipment stops the package and the calculated average value of the subinterval lock screen power consumption information in the lock screen time period after the electronic equipment stops the package.
27. A terminal, comprising:
one or more processors;
a memory;
one or more modules stored in the memory that, when executed by the one or more processors, perform operations comprising:
acquiring screen locking power consumption information of the electronic equipment before and after package stopping within a preset screen locking time period;
calculating a credible interval of the screen locking power consumption information by using the acquired screen locking power consumption information and a preset credibility;
calculating the mean value of the screen locking power consumption information of the electronic equipment in the trusted screen locking power consumption information interval before the package is stopped and the mean value of the screen locking power consumption information of the electronic equipment in the screen locking time interval after the package is stopped;
and calculating a screen locking power consumption comparison optimization value of the screen locking power consumption information credible interval by using the screen locking power consumption information mean value in the screen locking time period before the packet is stopped and the screen locking power consumption information mean value in the screen locking time period after the packet is stopped.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510629093.9A CN106557147B (en) | 2015-09-28 | 2015-09-28 | Method and device for comparing power consumption of application program package and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510629093.9A CN106557147B (en) | 2015-09-28 | 2015-09-28 | Method and device for comparing power consumption of application program package and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106557147A CN106557147A (en) | 2017-04-05 |
CN106557147B true CN106557147B (en) | 2020-04-17 |
Family
ID=58417034
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510629093.9A Active CN106557147B (en) | 2015-09-28 | 2015-09-28 | Method and device for comparing power consumption of application program package and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106557147B (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7260487B2 (en) * | 2005-11-29 | 2007-08-21 | International Business Machines Corporation | Histogram difference method and system for power/performance measurement and management |
CN103914365B (en) * | 2012-12-31 | 2017-03-15 | 北京金山安全软件有限公司 | Method and device for acquiring power consumption of mobile terminal application |
CN104237789B (en) * | 2013-06-09 | 2017-12-01 | 腾讯科技(深圳)有限公司 | The method and device that battery life is estimated |
CN104281510A (en) * | 2013-07-05 | 2015-01-14 | 贝壳网际(北京)安全技术有限公司 | Method and system for obtaining power consumption degree of application program and energy-saving method and system |
-
2015
- 2015-09-28 CN CN201510629093.9A patent/CN106557147B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN106557147A (en) | 2017-04-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109597685A (en) | Method for allocating tasks, device and server | |
CN104850460A (en) | Service program thread management method | |
CN107273182B (en) | Method and system for dynamically expanding virtual machine resources | |
CN111062503B (en) | Power grid monitoring alarm processing method, system, terminal and storage medium | |
CN106020722A (en) | Method, device and system for deduplication of repeated data of cloud storage system | |
CN112001659A (en) | Shared task allocation method and device, computer equipment and computer readable medium | |
CN107766160A (en) | Queue message processing method and terminal device | |
CN110221936A (en) | Database alert processing method, device, equipment and computer readable storage medium | |
CN111858031B (en) | Cluster distributed resource scheduling method, device, equipment and storage medium | |
CN111125222B (en) | Data testing method and device | |
CN115904656A (en) | State control method, device and equipment applied to chip and storage medium | |
CN106708746B (en) | Online memory defragmentation method and device | |
CN106095290B (en) | The method for closing and device of sensor call function | |
CN105843675B (en) | Thread exit method and device | |
CN106557147B (en) | Method and device for comparing power consumption of application program package and terminal | |
CN109462510B (en) | CDN node quality evaluation method and device | |
US11204634B2 (en) | Power monitoring and reduction | |
CN106855824B (en) | Task stopping method and device and electronic equipment | |
CN113992378A (en) | Safety monitoring method and device, electronic equipment and storage medium | |
CN103684875A (en) | Overload protection method and device overload protection device | |
CN104572291A (en) | Calling method of processors, and electronic equipment | |
CN107463416A (en) | Application program management method, application program management device and intelligent terminal | |
CN112994976A (en) | Gateway testing method and device, electronic equipment and storage medium | |
CN106557397B (en) | Method and device for comparing power consumption of application program package and terminal | |
CN111210103A (en) | Emergency supervision method, system, terminal and storage medium based on electric quantity working condition |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |