WO2017028628A1 - 一种终端内设备功耗数据获取的方法及装置 - Google Patents

一种终端内设备功耗数据获取的方法及装置 Download PDF

Info

Publication number
WO2017028628A1
WO2017028628A1 PCT/CN2016/087590 CN2016087590W WO2017028628A1 WO 2017028628 A1 WO2017028628 A1 WO 2017028628A1 CN 2016087590 W CN2016087590 W CN 2016087590W WO 2017028628 A1 WO2017028628 A1 WO 2017028628A1
Authority
WO
WIPO (PCT)
Prior art keywords
power consumption
difference
statistical
duration
period
Prior art date
Application number
PCT/CN2016/087590
Other languages
English (en)
French (fr)
Inventor
古幼鹏
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017028628A1 publication Critical patent/WO2017028628A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones

Definitions

  • This document relates to, but is not limited to, the field of communications, and in particular, to a method and apparatus for acquiring power consumption data of devices in a terminal.
  • typical device such as mobile phone
  • the general process is as follows: 1) Get the parameters of the smart phone, select the central processing unit (CPU, Central Processing Unit), random access memory (RAM, Random-Access Memory), screen, WiFi module, telephone, third The parameters of the mobile communication technology (3G, 3rd-Generation) card, Secure Digital Memory Card (SD) card and audio (Audio) module are used as input variables of the model; 2) Hardware WiFi with tail power consumption , 3G and telephone, for tail power processing, can get the corresponding tail power consumption value of hardware WiFi, 3G and telephone (Phone) in three time periods; 3) input the parameters of the smartphone acquired in step 1 to In the model fitting tool, the fitting equation is obtained according to each parameter of the fitting result, that is, the smart phone power consumption model is built based on the hardware
  • Power model based on added hardware WiFi, 3G and Phone three tail power consumption value corresponding to the time period power consumption can be obtained smartphone model.
  • the above scheme to acquire the parameters and model fitting process of the smartphone requires dedicated equipment and time, and finally the model effect and parameter selection method and fitting algorithm, measurement accuracy and processing of each parameter (for example, the tail Power consumption processing) and so on. Therefore, the power consumption model of the mobile phone obtained in this way is time-consuming and laborious, and the accuracy cannot be guaranteed; in addition, different mobile phones have different hardware parameter differences, acquisition parameters and parameter processing methods, and the steps and methods for generating the mobile phone power consumption model are generated. The difference is also great.
  • the device power consumption model obtained by the above method is time-consuming and laborious, and the accuracy cannot be guaranteed; in addition, the steps and methods for generating the device power consumption model are different due to differences in hardware parameters, acquisition parameters, and parameter processing methods of different devices. The difference is also great.
  • Embodiments of the present invention provide a method and an apparatus for acquiring power consumption data of a device in a terminal, which can improve the accuracy of power consumption data of the device in the computing terminal.
  • a method for acquiring power consumption data of an in-terminal device including: in all statistical periods in which statistics are used by all devices in a preset duration, the difference in usage duration of the specified device is selected.
  • the preset value, and the difference between the usage time of other devices does not reach the two statistical periods of the preset value; respectively calculate the power consumption of the specified device in the two statistical periods filtered; according to the power consumption of the specified device in two statistical periods
  • the difference and the length of the statistical period calculate the power consumption data of the specified device.
  • the statistics period includes a period divided according to a preset period duration, and the method further includes:
  • the preset cycle duration is decreased. Decrease the statistical period of the preset period duration, and use the statistics of the preset duration for all devices according to the statistical period of the reduced preset period duration;
  • the difference in the usage duration of the specified device reaches the preset value, and the difference in the usage duration of other devices does not reach the two statistical periods of the preset value.
  • the specified device includes: the same device at different power consumption levels.
  • the specified device includes two or more different devices in the terminal, and the method further includes:
  • the usage time difference of the specified device is re-screened in the statistics of the preset duration of all the other one or more time periods, and the other device is used.
  • the foregoing method further includes:
  • the usage time of the specified device is re-screened in the statistics of the preset duration of all the other one or more time periods to reach the preset value, and the duration of the other devices is used. Calculating the difference between the power consumption of the specified device in the two statistical periods corresponding to each other time period, and calculating each of the two statistical periods corresponding to each other time period in which the difference does not reach the preset value Power consumption data of a corresponding specified device for another time period;
  • the power consumption data corresponding to all time segments of the specified device is averaged, and the obtained average value is used as power consumption data of the specified device.
  • an apparatus for acquiring power consumption data of an in-terminal device including:
  • the first screening module is configured to filter out the difference between the specified device usage duration and the preset value when all devices use the preset duration statistics in all the statistical periods, and the difference in the usage duration of other devices does not reach the preset value. statistical period;
  • the first calculating module is configured to separately calculate power consumption of the specified device in the two statistical periods that are filtered out;
  • the second calculating module is configured to calculate the power consumption data of the designated device according to the difference between the power consumption of the specified device in the two statistical periods and the duration of the statistical period.
  • the device further includes: the dividing module is configured to: before the two statistical periods in which the difference in the usage time of the specified device reaches the preset value, and the difference in the usage time of other devices does not reach the preset value, all devices are preset.
  • the statistical data of the duration is divided into preset statistical periods to obtain the statistical period;
  • the adjustment module is configured to reduce the pre-determination if the difference in the usage duration of the specified device does not reach the preset value in the statistical period after the division, and the difference in the usage duration of other devices does not reach the two statistical periods of the preset value.
  • Set the period length to get the statistical period of reducing the preset period duration, for all
  • the device uses the statistics of the preset duration to be divided according to the statistical period of the reduced preset period duration;
  • the second screening module is configured to: in the statistical period according to the division of the preset period duration, select the difference in the usage duration of the specified device to reach a preset value, and the difference in the usage duration of other devices does not reach the preset value. Two statistical periods.
  • the specified device includes: the same device at different power consumption levels.
  • the specified device includes two or more different devices in the terminal, and the device further includes:
  • the third screening module is configured to: after calculating the power consumption data of the specified device, re-screening the difference in the usage duration of the specified device in the statistics of the preset duration of all the devices in the other one or more time periods The two statistical periods corresponding to each other time period in which the difference in usage time of other devices does not reach the preset value is reached;
  • the third calculation module is configured to separately calculate a difference between the power consumption of the specified device in the two statistical periods corresponding to each other time period;
  • the fourth calculation module is configured to calculate the designation according to a difference between power consumption in the two statistical periods of the specified device corresponding to each time period, power consumption data of the specified device, and duration of the statistical period. Power consumption data for each device in the device.
  • the foregoing apparatus further includes:
  • the fifth calculation module is configured to: after calculating the power consumption data of the specified device, re-screening the difference in the usage time of the specified device in the statistics of the preset duration of all the devices in the other one or more time periods The two statistical periods corresponding to each other time period in which the value of the other device usage time does not reach the preset value are respectively calculated, and the power consumption of the specified device in each of the two statistical periods corresponding to each other time period is calculated respectively. The difference, and calculate the power consumption data of the corresponding specified device for each other time period;
  • the sixth calculation module is configured to average the power consumption data corresponding to all the time segments of the specified device, and use the obtained average value as the power consumption data of the designated device.
  • the solution provided by the embodiment of the present invention includes: using preset time statistics on all devices In all the statistics periods, the two statistical periods in which the difference in the usage time of the specified device reaches the preset value and the difference in the usage time of other devices does not reach the preset value are filtered out.
  • Power consumption Calculate the power consumption data of the specified device according to the difference between the power consumption of the specified device in two statistical periods and the duration of the statistical period; other devices include: devices other than the specified device in the terminal.
  • the embodiment of the invention does not need to establish a mathematical model (for example, a tail power consumption model) in advance, and uses the power consumption data of the statistical device to perform calculation, thereby improving the accuracy of the calculated power consumption data.
  • FIG. 1 is a flowchart of a method for acquiring power consumption data of a device in a terminal according to Embodiment 1 of the present invention
  • Embodiment 2 is a flowchart of an algorithm for power consumption data provided by Embodiment 2 of the present invention
  • FIG. 3 is a flowchart of a first power consumption data algorithm according to Embodiment 3 of the present invention.
  • FIG. 5 is a structural block diagram of an apparatus for acquiring power consumption data of a device in a terminal according to Embodiment 4 of the present invention.
  • FIG. 1 is a flowchart of the method. As shown in FIG. 1 , the method is used to calculate and calculate power consumption data of a device in a terminal, as shown in FIG. 1 . As shown, the following steps are included:
  • Step 101 In all the statistical periods in the statistical data of the preset duration of all the devices, the two statistical periods in which the difference in the usage time of the specified device reaches the preset value and the difference in the usage duration of other devices does not reach the preset value are filtered out; Other devices include devices other than the specified device in the terminal.
  • the device involved in the embodiment includes a hardware device disposed inside the terminal, such as a CPU, a RAM, a screen, a WiFi module, a phone, a 3G card, an SD card, and an Audio audio module;
  • the designated device may also include the same device at different power consumption levels, for example, when a device can operate at three different power consumption levels, the device is considered to be three devices.
  • Step 102 Calculate power consumption of the specified device in the two statistical periods that are filtered out.
  • Step 103 Calculate the power consumption data of the specified device according to the difference between the power consumption of the specified device in two statistical periods and the duration of the statistical period.
  • two statistical periods in which the difference in the usage time of the specified device reaches the preset value and the difference in the usage duration of other devices does not reach the preset value are selected; in other words, the two statistical periods obtained here include: simultaneously satisfying the designation.
  • the difference in the usage time of the device reaches the preset value and the difference between the usage time of other devices does not reach the preset two statistical periods.
  • the difference in the usage duration is obtained by traversing the calculation by selecting two statistical periods each time from all statistical periods.
  • the difference in power consumption of the terminal in the two statistical periods is similar to the power consumption of the specified device in one statistical period. Therefore, in step 103, according to the power consumption of the terminal in the two statistical periods selected by the terminal.
  • the difference can be used to calculate the power consumption data of the specified device.
  • the calculation of the difference value of the usage duration of the specified device may be calculated by using a time ratio method; for example, if the length of the device A device used in the selected two statistical periods is T1 and T2, respectively, In the cycle, its difference in usage duration is (T1-T2)/T1 (Formula 1); or (T1-T2)/T2 (Formula 2), if the calculation result is negative, its absolute value is taken. All devices select the same calculation formula when calculating, that is, either select Equation 1, or select Equation 2. There are two preset values. One is a device for judging the difference in usage time. It is called preset value 1.
  • One is a device for judging the difference in usage time, which is called preset value 2. Then, the two selected statistical periods satisfy the following conditions: the difference in the usage duration of one device is greater than or equal to the preset value of 1, and the difference in the usage duration of all other devices is less than or equal to the preset value of 2.
  • the statistics period includes a period that is divided according to a preset period of time; if the statistics period is too small, the difference in the usage time of the specified device cannot be selected in the divided statistical period to reach a preset value. If the difference between the usage times of other devices does not reach the preset two statistics periods, the statistics period may be appropriately reduced. Based on this, the method further includes: if the specified device usage time difference is not selected in the divided statistical period If the value of the other device does not reach the preset value of the two statistical periods, the duration of the preset period is decreased, and the period of the preset period is reduced, and the preset period is used for all devices.
  • the statistical data is divided according to the statistical period of the reduced preset period duration; in the division according to the reduction of the preset period duration During the counting period, the difference between the usage durations of the specified devices reaches the preset value, and the difference between the usage durations of other devices does not reach the two statistical periods of the preset value.
  • the manner of reducing the preset period duration may be implemented according to the set duration unit as the unit for reducing the adjustment, or the preset duration may be used as the duration step to adjust the preset. Cycle duration.
  • the preset period duration of the statistical period may be increased, or the usage duration difference of the two statistical periods that reach the preset value according to the difference in the usage duration of the specified device, and/or other
  • the difference in the usage duration of the two statistical periods in which the difference in the usage time of the device does not reach the preset value, and the two statistical periods in which the difference in the usage duration of the two statistical periods in which the difference in the usage duration of the specified device reaches the preset value is the largest, or
  • the two statistical periods in which the difference in the usage duration of the two statistical periods in which the difference in the usage time of other devices does not reach the preset value is the smallest, or the two other statistical periods in combination with the two selections can be implemented in combination with the analysis and experience of the
  • the multiple devices when calculating the device power consumption data, if two or more devices in the terminal are currently selected to meet the above conditions in the difference of the usage durations of the two statistical periods, the multiple devices are regarded as one
  • the device that is, the specified device mentioned above, obtains the power consumption relationship of the specified device, and calculates the power consumption data of each device by combining the power consumption relationships of the multiple devices obtained in different time periods.
  • the method of the embodiment of the present invention further includes: after calculating the power consumption data of the specified device, after calculating the power consumption data of the specified device, in one or more other time periods
  • the statistics of the preset duration of all the devices in the device are re-screened out to the preset value of the specified device when the difference in the usage time reaches the preset value, and the other device uses the corresponding two statistical periods for each other time period in which the difference in the usage time does not reach the preset value; Calculating the difference between the power consumption of the specified device in the two statistical periods corresponding to each other time period separately; according to the corresponding designation of each time period When the difference in length of the two statistical power in the standby period, the power consumption and statistical data specifying device specified period computing device power consumption data for each device.
  • the power consumption data of the specified device calculated based on the device power consumption statistics of different time segments may be weighted and averaged.
  • the method further includes: calculating the specified device After the power consumption data is re-screened in the statistics of the preset duration of all the devices in one or more other time periods, the difference in the usage time of the specified device reaches the preset value, and the difference in the usage duration of other devices does not reach the preset value.
  • the two statistical periods respectively calculate the difference of the power consumption of the designated device in the two statistical periods corresponding to each other time period, and calculate the power consumption data of the corresponding designated device in each other time period;
  • the power consumption data corresponding to all time segments of the device is averaged, and the average value obtained is used as the power consumption data of the specified device.
  • time periods herein include: a time period consisting of using the preset time length of step 103 and the other one or more time periods mentioned above.
  • the method for acquiring power consumption data of the device in the terminal in the embodiment of the present invention may be implemented by a terminal or implemented by a device connected or communicating with the terminal;
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the method for acquiring power consumption data of the device in the terminal.
  • This embodiment describes a method for acquiring power consumption data of an in-terminal device provided by an embodiment of the present invention by disclosing more technical content.
  • the method provided by the embodiment of the present invention utilizes statistics related to power supply operations collected by the operating system of the terminal, and obtains power consumption parameters of devices in the terminal by mining associations between the statistics.
  • the requirements for statistical data in the embodiment of the present invention include the following points: 1) information about the time of use of the hardware device in the terminal (device usage time, hardware devices that can run on multiple power consumption levels, For example, the CPU can operate on different frequencies, can be considered as different devices, can also include the time of use of the device at different power consumption levels, and terminal battery power change data.
  • the information about the device usage time may be direct statistical data, or may be inferred from the statistical data (for example, the statistical data only records the start time and the end use time of each device, and may be reduced by the end use time.
  • the power consumption data parameters of each hardware device are obtained by the following methods: finding a time period (statistical period) in which the usage time difference of other devices is small except that the device usage time is greatly different. , the difference in total power consumption of the mobile phone during these two time periods can be considered as a certain The difference caused by the power consumption of the device can be calculated according to the difference in the usage time of the device in two time periods.
  • the method for acquiring power consumption data of the device in the terminal may include the following processing:
  • the power consumption data parameter of the device D is P/T.
  • An Android (Android) system is used as an example to describe an implementation example of the algorithm in the embodiment of the present invention.
  • the power operation statistics in Android are based on events, that is, the statistical data format is as follows: ⁇ event occurrence time, event content>. For example: ⁇ 10000, STATE_GPS_ON_FLAG>, indicating that the GPS open event occurred at 10000 milliseconds.
  • Android statistics as shown in Table 1 below.
  • the previous number represents time
  • the unit is second
  • the mobile phone boot time is 0, followed by the event information description
  • POWER: 95% means that the mobile phone power is now changed to 95%
  • GPS: ON and GPS :OFF indicates that GPS is turned on/off
  • WiFi: ON and WiFi: OFF indicate that WiFi is turned on/off.
  • POWER: 95% 130 GPS: ON 1300, WiFi: ON 1600, GPS: OFF 1700, POWER: 94% 1900, GPS: ON 2000, WiFi: OFF 2100, POWER: 91% 2200, WiFi: ON 2300, GPS: OFF 2900, GPS: ON 2950, WiFi: OFF 3000, POWER: 90% 3300,: GPS OFF 3600, GPS: ON 3800, GPS: OFF 4200, POWER: 89%
  • the algorithm for calculating power consumption data is shown in Figure 2.
  • the calculation result is: in the statistical period 1, the GPS uses 1670 seconds, and the WiFi uses 700 seconds.
  • the difference in total power consumption between the two statistical periods is caused by the difference in GPS usage duration.
  • the Wifi usage time difference may be 50/700 approximately equal to 7%
  • the GPS usage duration difference may be 930/1670 approximately equal to 56%
  • the preset value 1 is 50%
  • the preset value 2 is 10 %. Then the two statistical periods meet the requirements, and the difference in total power consumption between the two statistical periods is caused by GPS; 4) the total power consumption difference between the two statistical periods is calculated according to the mobile phone power event and the battery capacity, and then divided by GPS.
  • the accuracy of the algorithm may be increased in the following manner.
  • the difference in the usage time of a certain device reaches the preset value in the above step 2), the difference in the usage time of other devices does not reach the preset value, and the statistical period may be reduced after the statistical period is reduced. Or you can get bigger, as long as you can find the statistical period that meets the conditions, then try again, as shown in Figure 3. You can find out the combination of two or more devices whose usage time difference reaches the preset value, and treat these device collections as one virtual device (as a designated device), then you can get the power consumption data of the virtual device through the other one.
  • more than one period of power consumption statistics can obtain a plurality of power consumption data of the virtual device, based on which, the power consumption data of each actual device included in the virtual device can be obtained by solving the equation, as shown in FIG. 4 .
  • 1) calculate the usage duration of each device in each statistical period; 2) analyze the difference in the usage duration of each device; 3) treat the device collection of devices containing the same usage duration difference as a virtual device, and obtain The power consumption data of the virtual device; 4) the equation of each device included in the virtual device is established according to the power consumption data of the virtual device; here, the virtual device power consumption data can be expressed as an equation: device A* device A usage duration + Device B* device B usage time virtual device power consumption; for the same virtual device, calculate at least two different power consumption data 5) a computing device each virtual device, comprising a power consumption data according to the established equations (linear equations solution group).
  • the device combination needs to obtain three power consumption data to obtain the actual power consumption data of each device.
  • the embodiment provides a device for acquiring power consumption data of a hardware device in a terminal, where the device is used to implement the method for acquiring power consumption data of the hardware device in the terminal
  • FIG. 5 is a structural block diagram of the device 50, as shown in FIG.
  • the device 50 includes the following components: the first screening module 51 is configured to filter out the difference in the usage time of the specified device to a preset value in all the statistical periods in the statistics of all the devices using the preset duration, and the other devices use The difference in duration does not reach the two statistical periods of the preset value; wherein the specified device includes: the same device at different power consumption levels.
  • the first calculating module 52 is configured to separately calculate power consumption of the specified device in the two statistical periods that are filtered out;
  • the second calculating module 53 is configured to calculate the power consumption data of the designated device according to the difference between the power consumption of the specified device in the two statistical periods and the duration of the statistical period.
  • the device 50 further includes: the dividing module is configured to filter the preset device usage time to reach a preset value, and before using the two statistical periods that the difference in the usage time of the other device does not reach the preset value, all the devices use the preset duration.
  • the statistics of the statistics are obtained according to the preset period of time.
  • the adjustment module is set to: if the difference in the usage time of the specified device is not selected in the statistical period after the division, the difference in the usage time of other devices does not reach the preset. For the two statistical periods of the value, the preset period duration is decreased, and the statistics period of the preset period duration is reduced.
  • the statistics of the preset duration are used for all devices according to the statistical period of the reduced preset period duration.
  • the second screening module is configured to filter out the difference in the usage duration of the specified device to a preset value in a statistical period according to the division of the preset period duration, and the difference in the usage duration of other devices does not reach the preset value.
  • the two statistical periods are configured to filter out the difference in the usage duration of the specified device to a preset value in a statistical period according to the division of the preset period duration, and the difference in the usage duration of other devices does not reach the preset value.
  • the device specified above includes two or more different devices in the terminal, and the device 50 further includes:
  • the third screening module is configured to: after calculating the power consumption data of the specified device, re-screening the specified data in the statistics of the preset duration of all the other one or more time periods.
  • the difference in the length of use of the device reaches a preset value, and the difference in the length of use of other devices does not reach the corresponding two statistical periods of each other time period of the preset value;
  • the third calculation module is configured to separately calculate a difference between power consumption of the specified device in two statistical periods corresponding to each other time period;
  • the fourth calculation module is configured to calculate the power consumption of each device in the specified device according to the difference between the power consumption in the two statistical periods of the specified device corresponding to each time period, the power consumption data of the specified device, and the duration of the statistical period. data.
  • the device 50 further includes:
  • the fifth calculation module is configured to: after calculating the power consumption data of the specified device, re-screening the difference in the usage time of the specified device in the statistics of the preset duration of all the devices in the other one or more time periods Set the value of the power consumption of the specified device in the two statistical periods corresponding to each other time period by setting the two statistical periods corresponding to each other time period in which the difference in the usage time of other devices does not reach the preset value. And calculating power consumption data of the corresponding designated device for each other time period;
  • the sixth calculation module is configured to average the power consumption data corresponding to all the time segments of the specified device, and use the obtained average value as the power consumption data of the specified device.
  • the embodiment of the present invention deduces the power consumption parameter of each device by analyzing the device power consumption data to the statistical data, and does not require additional hardware devices and test methods, thereby reducing the input cost.
  • the embodiment of the present invention does not need to be established in advance.
  • Mathematical models (such as the tail power model) are derived from actual statistics and have better adaptability.
  • many hardware devices vary in power consumption parameters depending on usage patterns and usage times, based on The power consumption data calculated by the preset model will have large error fluctuations, and the analysis based on statistical data of the present invention will automatically adapt to such changes.
  • the above technical solution improves the accuracy of the calculated power consumption data of the device in the terminal.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Remote Monitoring And Control Of Power-Distribution Networks (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

一种终端内设备功耗数据获取方法及装置,包括:在所有设备使用预设时长的统计数据中的所有统计周期中,筛选出指定设备使用时长差异达到预设值,且其他设备使用时长差异未达到预设值的两个统计周期;分别计算指定设备在筛选出的两个统计周期内的功耗;根据指定设备在两个统计周期内功耗的差值以及统计周期的时长计算出指定设备的功耗数据。本发明实施例方案,提高了计算得出的终端内设备耗电数据的准确性。

Description

一种终端内设备功耗数据获取的方法及装置 技术领域
本文涉及但不限于通讯领域,尤其涉及一种终端内设备功耗数据获取的方法及装置。
背景技术
目前,典型的设备(例如手机)功耗数据是基于测试标定和模型的方法,通过人工选取和测量参数为变量建立一个模型,依靠建立的模型,实时获取比较精确的评估功耗值,以致能手机为例,一般流程如下:1)获取智能手机的参数,选取中央处理器(CPU,Central Processing Unit)、随机存取存储器(RAM,Random-Access Memory)、屏幕、WiFi模块、电话、第三代移动通信技术(3G,3rd-Generation)卡、安全数码(SD,Secure Digital Memory Card/SD)卡和音频(Audio)模块的参数作为模型的输入变量;2)对存在尾功耗的硬件WiFi、3G和电话,进行尾功耗处理,即可得出硬件WiFi、3G和电话(Phone)在三个时间段内对应的尾功耗值;3)将步骤1获取的智能手机的参数输入到模型拟合工具中,根据拟合结果的每一项参数得出拟合方程,即基于硬件使用率构建智能手机功耗模型,在基于硬件使用率的智能手机功耗模型的基础上,加入硬件WiFi、3G和Phone在三个时间段内对应的尾功耗值,即可得到智能手机功耗模型。采用上述方案在获取智能手机的参数和模型拟合过程需要投入专用的设备和时间,而且最终得到的模型效果与参数选取方法和拟合算法、每个参数的测量准确度和处理(例如对尾功耗的处理)等有关。所以用这种方式获取的手机功耗模型耗时费力,且准确性无法保证;另外,不同手机由于硬件参数差异、获取参数和参数处理的方法也不同,造成产生手机功耗模型的步骤与方法差异也很大。
综上,上述方法获取的设备功耗模型耗时费力,且准确性无法保证;另外,不同设备由于硬件参数差异、获取参数和参数处理的方法也不同,造成产生设备功耗模型的步骤与方法差异也很大。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本发明实施例提供一种终端内设备功耗数据获取的方法及装置,能够提高计算终端内设备的耗电数据的准确性。
根据本发明实施例的一个方面,提供了一种终端内设备功耗数据获取的方法,包括:在所有设备使用预设时长的统计数据中的所有统计周期中,筛选出指定设备使用时长差异达到预设值,且其他设备使用时长差异未达到预设值的两个统计周期;分别计算指定设备在筛选出的两个统计周期内的功耗;根据指定设备在两个统计周期内功耗的差值以及统计周期的时长计算出指定设备的功耗数据。
可选的,所述统计周期包括按照预设周期时长划分的周期,本方法还包括:
如果在划分后的统计周期中未筛选出指定设备使用时长差异达到预设值,其他设备使用时长差异未达到预设值的所述两个统计周期,则减小所述预设周期时长,得到减小预设周期时长的统计周期,对所有设备使用预设时长的统计数据按照减小的预设周期时长的统计周期进行划分;
在按照减小预设周期时长的划分的统计周期中,筛选出所述指定设备的使用时长差异达到预设值,其他设备使用时长差异未达到预设值的所述两个统计周期。
可选的,上述指定设备包括:处于不同功耗等级下的同一设备。
可选的,所述指定设备包括终端内的两个或两个以上不同的设备,所述方法还包括:
在计算出所述指定设备的功耗数据之后,在其他一个或一个以上时间段的所有设备的使用预设时长的统计数据中重新筛选出指定设备的在使用时长差异达到预设值,其他设备使用时长差异未达到预设值的每一其它时间段相应的所述两个统计周期;
分别计算每一其他时间段对应的所述两个统计周期内所述指定设备功耗的差值;
根据每一个时间段对应的指定设备的所述两个统计周期内的功耗的差值、所述指定设备的功耗数据以及所述统计周期的时长计算所述指定设备中每一个设备的功耗数据。
可选的,上述方法还包括:
在计算出所述指定设备的功耗数据之后,在其他一个或一个以上时间段的所有设备的使用预设时长的统计数据中重新筛选出指定设备使用时长差异达到预设值、其他设备使用时长差异未达到预设值的每一其它时间段相对应的所述两个统计周期,分别计算每一个其它时间段对应的两个统计周期内所述指定设备的功耗的差值,并计算每一个其他时间段的相应的指定设备的功耗数据;
对所述指定设备的所有时间段对应的功耗数据求平均值,将得到的所述平均值作为所述指定设备的功耗数据。
根据本发明实施例的另一个方面,提供了一种终端内设备功耗数据获取的装置,包括:
第一筛选模块设置为,在所有设备使用预设时长的统计数据中的所有统计周期中,筛选出指定设备使用时长差异达到预设值,且其他设备使用时长差异未达到预设值的两个统计周期;
第一计算模块设置为,分别计算所述指定设备在筛选出的所述两个统计周期内的功耗;
第二计算模块设置为,根据所述指定设备在所述两个统计周期内功耗的差值以及所述统计周期的时长计算出所述指定设备的功耗数据。
可选的,上述装置还包括:划分模块设置为,所述筛选指定设备使用时长差异达到预设值,其他设备使用时长差异未达到预设值的两个统计周期之前,将所有设备使用预设时长的统计数据按预设周期时长划分获得所述统计周期;
调整模块设置为,如果在划分后的统计周期中未筛选出指定设备使用时长差异达到预设值,其他设备使用时长差异未达到预设值的所述两个统计周期,则减小所述预设周期时长,得到减小预设周期时长的统计周期,对所有 设备使用预设时长的统计数据按照减小的预设周期时长的统计周期进行划分;
第二筛选模块设置为,在按照减小预设周期时长的划分的统计周期中,筛选出所述指定设备的使用时长差异达到预设值,其他设备使用时长差异未达到预设值的所述两个统计周期。
可选的,上述指定设备包括:处于不同功耗等级下的同一设备。
可选的,所述指定设备包括终端内的两个或两个以上不同的设备,所述装置还包括:
第三筛选模块设置为,在计算出所述指定设备的功耗数据之后,在其他一个或一个以上时间段的所有设备的使用预设时长的统计数据中重新筛选出指定设备的在使用时长差异达到预设值,其他设备使用时长差异未达到预设值的每一其它时间段相应的所述两个统计周期;
第三计算模块设置为,分别计算每一其他时间段对应的所述两个统计周期内所述指定设备功耗的差值;
第四计算模块设置为,根据每一个时间段对应的指定设备的所述两个统计周期内的功耗的差值、所述指定设备的功耗数据以及所述统计周期的时长计算所述指定设备中每一个设备的功耗数据。
可选的,上述装置还包括:
第五计算模块设置为,在计算出所述指定设备的功耗数据之后,在其他一个或一个以上时间段的所有设备的使用预设时长的统计数据中重新筛选出指定设备使用时长差异达到预设值、其他设备使用时长差异未达到预设值的每一其它时间段相对应的所述两个统计周期,分别计算每一个其它时间段对应的两个统计周期内所述指定设备的功耗的差值,并计算每一个其他时间段的相应的指定设备的功耗数据;
第六计算模块设置为,对所述指定设备的所有时间段对应的功耗数据求平均值,将得到的所述平均值作为所述指定设备的功耗数据。
本发明有益效果如下:
本发明实施例提供的方案,包括:在所有设备使用预设时长的统计数据 中的所有统计周期中,筛选出指定设备使用时长差异达到预设值,且其他设备使用时长差异未达到预设值的两个统计周期;分别计算指定设备在筛选出的两个统计周期内的功耗;根据指定设备在两个统计周期内功耗的差值以及统计周期的时长计算出指定设备的功耗数据;其他设备包括:终端内除指定设备以外的设备。本发明实施例不需要预先建立数学模型(例如尾功耗模型),采用统计的设备的功耗数据进行计算,提高了计算得到的功耗数据的准确性。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1是本发明实施例1提供的终端内设备功耗数据获取的方法的流程图;
图2是本发明实施例2提供的功耗数据的算法流程图;
图3是本发明实施例3提供的第一种功耗数据算法的流程图;
图4是本发明实施例3提供的第二种功耗数据算法的流程图;
图5是本发明实施例4提供的终端内设备功耗数据获取的装置的结构框图。
本发明的实施方式
下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
实施例1
本实施例提供了一种终端内设备功耗数据获取方法,图1是该方法的流程图,如图1所示,该方法用于统计并计算出终端内设备的功耗数据,如图1所示,包括如下步骤:
步骤101:在所有设备使用预设时长的统计数据中的所有统计周期中,筛选出指定设备使用时长差异达到预设值,且其他设备使用时长差异未达到预设值的两个统计周期;这里,其他设备包括终端内除指定设备以外的设备。
其中,本实施例中所涉及到的设备包括设置于终端内部的硬件设备,例如,CPU、RAM、屏幕、WiFi模块、电话、3G卡、SD卡和Audio音频模块; 此外,可选的,指定设备还可以包括处于不同功耗等级下的同一设备,例如,当某一设备可以在三种不同功耗等级下运作时,该设备被认为是三种设备。
步骤102:分别计算指定设备在筛选出的两个统计周期内的功耗;
步骤103:根据指定设备在两个统计周期内功耗的差值以及统计周期的时长计算出指定设备的功耗数据。
在该实施例中,筛选出指定设备使用时长差异达到预设值、其他设备使用时长差异未达到预设值的两个统计周期;换句话说,这里获得的两个统计周期包括:同时满足指定设备使用时长差异达到预设值和其他设备使用时长差异未达到预设值的两个统计周期,使用时长差异通过从所有的统计周期中每次选择两个统计周期进行遍历计算获得。这里终端在这两个统计周期内耗电的差值就近似于指定设备在一个统计周期内的耗电量,故,在步骤103中,根据终端在筛选出的两个统计周期内的功耗差值,结合统计周期的时长,即可以算出指定设备的功耗数据。可选的,指定设备的使用时长差异值的计算可以采用时间比的方法计算;比如、指定设备A设备在选择的两个统计周期中使用的时长分别为T1和T2,则在这两个统计周期中,它的使用时长差异值为(T1-T2)/T1(式1);或者(T1-T2)/T2(式2),如果计算结果为负值则取其绝对值。所有设备在计算时都选择相同的计算式,即要么都选择式1,或者都选择式2。预设值有两个,一个是用于判断使用时长差异比较大的设备,称为预设值1,一个是用于判断使用时长差异比较小的设备,称为预设值2。则选取的两个统计周期要满足以下条件:只有一个设备的使用时长差异大于等于预设值1,其它所有设备的使用时长差异要小于等于预设值2。
可选的,本发明实施例中,统计周期包括按照预设周期时长划分的周期;如果上述统计周期过小,导致无法在划分后的统计周期内筛选出指定设备使用时长差异达到预设值,其他设备使用时长差异未达到预设值的两个统计周期,则可以适当减小统计周期,基于此,上述方法还包括:如果在划分后的统计周期中未筛选出指定设备使用时长差异达到预设值,其他设备使用时长差异未达到预设值的所述两个统计周期,则减小所述预设周期时长,得到减小预设周期时长的统计周期,对所有设备使用预设时长的统计数据按照减小的预设周期时长的统计周期进行划分;在按照减小预设周期时长的划分的统 计周期中,筛选出指定设备的使用时长差异达到预设值,其他设备使用时长差异未达到预设值的所述两个统计周期。
需要说明的是,这里,减小预设周期时长的方式可以按照设定的时长单位作为减小调整的单位实施本发明实施例,也可以按照预先设定的其他时长作为时长步长调整预设周期时长。另外,如果包含多组两个统计周期,则可以增长统计周期的预设周期时长,或者,按照指定设备的使用时长差异达到预设值的两个统计周期的使用时长差异大小、和/或其他设备使用时长差异未达到预设值的所述两个统计周期的使用时长差异大小,选择指定设备的使用时长差异达到预设值的两个统计周期的使用时长差异最大的两个统计周期、或其他设备使用时长差异未达到预设值的两个统计周期的使用时长差异最小的两个统计周期,或者结合两个选择其他的两个统计周期,实施时,可以结合技术人员的分析及经验进行选择。
可选地,在计算设备功耗数据时,如果当前同时筛选出终端内的两个或两个以上设备在两个统计周期的使用时长差异均满足上述条件,则将该多个设备视为一个设备,即上述所提到的指定设备,得到该指定设备的功耗关系,结合过在不同时间段得到的多个设备的功耗关系来计算每一个设备的功耗数据,基于此,在指定设备为多个不同的设备的情况下,本发明实施例上述方法还包括:在计算出指定设备的功耗数据之后,在计算出指定设备的功耗数据之后,在其他一个或一个以上时间段的所有设备的使用预设时长的统计数据中重新筛选出指定设备的在使用时长差异达到预设值,其他设备使用时长差异未达到预设值的每一其它时间段相应的两个统计周期;分别计算每一其他时间段对应的两个统计周期内指定设备功耗的差值;根据每一个时间段对应的指定设备的两个统计周期内的功耗的差值、指定设备的功耗数据以及统计周期的时长计算指定设备中每一个设备的功耗数据。
为了保证设备功耗数据的精度,可以将基于不同时间段的设备功耗统计数据计算得到的指定设备的功耗数据进行加权求平均值,基于此,上述方法还包括:在计算出指定设备的功耗数据之后,在其他一个或一个以上时间段的所有设备的使用预设时长的统计数据中重新筛选出指定设备使用时长差异达到预设值、其他设备使用时长差异未达到预设值的每一其它时间段相对应 的所述两个统计周期,分别计算每一个其它时间段对应的两个统计周期内指定设备的功耗的差值,并计算每一个其他时间段的相应的指定设备的功耗数据;对指定设备的所有时间段对应的功耗数据求平均值,将得到的平均值作为指定设备的功耗数据。
需要说明的是,这里所有时间段包括:由步骤103的使用预设时长构成的时间段和上述其他一个或一个以上时间段。
另外,本发明实施例终端内设备功耗数据获取的方法可以由终端实施,或者与终端连接或通信的装置实施;
本发明实施例还提供一种计算机存储介质,计算机存储介质中存储有计算机可执行指令,计算机可执行指令用于执行上述终端内设备功耗数据获取的方法。
实施例2
本实施例通过公开更多的技术内容来对本发明实施例提供的终端内设备功耗数据获取方法进行说明。
本发明实施例所提供的方法利用了终端的操作系统收集的与电源操作有关的统计数据,通过挖掘这些统计数据间的关联得到终端内设备的耗电参数。基于此,本发明实施例对统计数据的要求包括以下几点:1)要有能记录终端中硬件设备使用时间的信息(设备使用时间、对于可以运行在多个功耗级别上的硬件设备,例如,CPU可以运行在不同频率上,可以视为不同的设备,还可以包含该设备在不同功耗级别上的使用时间)和终端电池电量变化数据。其中,设备使用时间的信息即可以是直接的统计数据,也可以是从统计数据中推断出(例如,统计数据只记录每个设备的开始使用时间和结束使用时间,则可以通过结束使用时间减去开始使用时间得到设备的使用时间)。在统计数据满足以上要求的情况下,通过以下方法得到每个硬件设备的功耗数据参数:找出除了设备使用时间有较大差异外,其它设备使用时间差异较小的时间段(统计周期),则这两个时间段内手机总的耗电量差异就可以认为是某 个设备功耗所引起的差异,再根据这个设备在两个时间段内的使用时长差异,就可以算出这个设备的功耗参数了。
基于上述构思,本实施例提供的终端内设备功耗数据获取方法可以包括以下处理:
把终端内设备的功耗统计数据按照预设周期时长划分为统计周期(即对统计数据按照统计周期进行划分);
计算每个统计周期内的设备的使用时间;
寻找两个统计周期,除了某个设备使用时长有较大差异外,其它设备使用时长差异较小。假设这个使用时长有较大差异为设备为D,使用时长差异为T秒;
分别计算这两个统计周期内终端总的耗电量,假设这两个统计周期的耗电量差异为P,则设备D的功耗数据参数为P/T;
对于那些可以处于不同功耗级别上运行的硬件设备,在不同级别上运行时把它视为不同的设备。例如,假设一个CPU设备可以运行在100兆赫兹(MHZ)、200MHZ、300MHZ,则本算法中就有三种CPU设备,分别对应运行在100MHZ、200MHZ、300MHZ的CPU设备。
以下以一个实例来对本发明实施例提供的方案进行阐述:
此处以安卓(Android)系统为例介绍本发明实施例算法的一个实施例子,Android中电源操作统计数据是以事件为基本元素的,即统计数据格式如下:<事件发生时间,事件内容>。例如:<10000,STATE_GPS_ON_FLAG>,表示在10000毫秒时,发生了GPS打开的事件。假设有如下表1所示的Android统计数据。其中,前面的数字代表时间,单位为秒,以手机开机时间为0,后面就是发生的事件信息描述,POWER:95%表示手机电量现在变动为95%,其它以此类推,GPS:ON和GPS:OFF分别表示打开/关闭GPS,WiFi:ON和WiFi:OFF分别表示打开/关闭WiFi。
表1
0,POWER:95%
130,GPS:ON
1300,WiFi:ON
1600,GPS:OFF
1700,POWER:94%
1900,GPS:ON
2000,WiFi:OFF
2100,POWER:91%
2200,WiFi:ON
2300,GPS:OFF
2900,GPS:ON
2950,WiFi:OFF
3000,POWER:90%
3300,:GPS OFF
3600,GPS:ON
3800,GPS:OFF
4200,POWER:89%
根据上表的统计数据,计算功耗数据的算法如图2所示。1)把以上数据分成两个相等统计周期;2)计算每个统计周期内每一种设备的使用时长,计算结果为:在统计周期1中,GPS使用1670秒,WiFi使用700秒,在统计周期2中,GPS使用700秒,WiFi使用750秒,3)比较两个统计周期设备使用时长差异,WiFi使用时长差异50秒,GPS使用时长差异为930秒,假设使用时长差异的预定值为大于50秒和小于930秒的一个数值,可以认为两个统计周期的WiFi使用时长差异未达到预设值,GPS使用时长差异达到预设值,两个统计周期总耗电差异就是GPS使用时长差异造成的;本发明实施例,Wifi使用时长差异可以为50/700约等于7%,GPS使用时长差异可以为930/1670约等于56%,取预设值1为50%,预设值2为10%。则这两个统计周期满足要求,认为两个统计周期的总耗电量差异就是GPS引起的;4)根据手机电量事件和电池容量计算两个统计周期手机总耗电量差异,再除以GPS使用时长差异就可以得到GPS耗电数据为154mA;可以包括:计算两个统计周期总耗电差异:统计周期1总耗电为95%-91%=4%,统计周期1总耗 电为91%-89%=2%,两个统计周期总耗电差异为4%-2%=2%;计算GPS功耗数据:2%/930.假设电池电量为2000毫安时(mAH),则获得的GPS功耗数据为2%*2000/930=154mA。
实施例3
本实施例在基于上述设备耗电数据的算法基础上,还可以采用以下方式增加本算法的准确性。
如果在上述步骤2)中找不出除了某个设备使用时长差异达到预设值,其它设备使用时长差异未达到预设值,可以尝试把统计周期减小后,本发明实施例统计周期做缩小或者变大都可以,只要能够找出满足条件的统计周期即可,再做尝试,如图3所示。可以找出使用时长差异达到预设值的两个或两个以上设备的组合,把这些设备集合看成一个虚拟设备(作为指定设备),那么就可以得到虚拟设备的耗电数据,通过其他一个或一个以上时间段的耗电统计数据可以得到这个虚拟设备的多个耗电数据,基于此,可以通过解方程的方式得到这个虚拟设备包含的每个实际设备的功耗数据了,如图4所示,1)计算每个统计周期内每一个设备的使用时长;2)分析得到每一个设备的使用时长差异;3)把包含相同使用时长差异的设备的设备集合看成一个虚拟设备,获得虚拟设备的功耗数据;4)根据虚拟设备的功耗数据建立虚拟设备中包含的每一个设备的方程;这里,虚拟设备功耗数据可以表示成一个方程:设备A*设备A的使用时长+设备B*设备B的使用时长=虚拟设备的功耗;对同一个虚拟设备,至少算出两个不同的功耗数据;5)根据建立的方程计算虚拟设备中包含的每一个设备的功耗数据(解二元一次方程组)。例如,假设能分析中得到设备A和设备B的组合两个功耗数据,其中第一个功耗数据中,设备组合耗电为P1,设备A使用T1时间、设备B使用T2时间;第二个功耗数据中,设备组合耗电为P2,设备A使用T3时间、设备B使用T4时间;则解以下二元一次方程组可以分别得到设备A和设备B的功耗数据。
A*T1+B*T2=P1;
A*T3+B*T4=P2;
对于设备组合中包含的三个设备的情况依次类推,这样的设备组合需要得到三个耗电数据才能得到其中每个设备的实际功耗数据。
如果对同一设备(无论是实际设备或者是虚拟设备)得到了多个功耗数据,可以把这些功耗数据进行平均来作为这个设备的最终功耗数据,减小偶然性误差。
实施例4
本实施例提供了一种终端内硬件设备功耗数据获取的装置,该装置用于实现上述终端内硬件设备功耗数据获取的方法,图5是该装置50的结构框图,如图5所示,该装置50包括如下组成部分:第一筛选模块51设置为,在所有设备使用预设时长的统计数据中的所有统计周期中,筛选出指定设备使用时长差异达到预设值,且其他设备使用时长差异未达到预设值的两个统计周期;其中,指定设备包括:处于不同功耗等级下的同一设备。
第一计算模块52设置为,分别计算所述指定设备在筛选出的所述两个统计周期内的功耗;
第二计算模块53设置为,根据指定设备在两个统计周期内功耗的差值以及统计周期的时长计算出指定设备的功耗数据。
可选的,上述装置50还包括:划分模块设置为,筛选指定设备使用时长差异达到预设值,其他设备使用时长差异未达到预设值的两个统计周期之前,将所有设备使用预设时长的统计数据按预设周期时长划分获得所述统计周期;调整模块设置为,如果在划分后的统计周期中未筛选出指定设备使用时长差异达到预设值,其他设备使用时长差异未达到预设值的所述两个统计周期,则减小预设周期时长,得到减小预设周期时长的统计周期,对所有设备使用预设时长的统计数据按照减小的预设周期时长的统计周期进行划分;第二筛选模块设置为,在按照减小预设周期时长的划分的统计周期中,筛选出所述指定设备的使用时长差异达到预设值,其他设备使用时长差异未达到预设值的所述两个统计周期。
其中,上述指定设备包括终端内的两个或两个以上不同的设备,上述装置50还包括:
第三筛选模块设置为,在计算出指定设备的功耗数据之后,在其他一个或一个以上时间段的所有设备的使用预设时长的统计数据中重新筛选出指定 设备的在使用时长差异达到预设值,其他设备使用时长差异未达到预设值的每一其它时间段相应的所述两个统计周期;
第三计算模块设置为,分别计算每一其他时间段对应的两个统计周期内指定设备功耗的差值;
第四计算模块设置为,根据每一个时间段对应的指定设备的两个统计周期内的功耗的差值、指定设备的功耗数据以及统计周期的时长计算指定设备中每一个设备的功耗数据。
可选的,上述装置50还包括:
第五计算模块设置为,在计算出所述指定设备的功耗数据之后,在其他一个或一个以上时间段的所有设备的使用预设时长的统计数据中重新筛选出指定设备使用时长差异达到预设值、其他设备使用时长差异未达到预设值的每一其它时间段相对应的两个统计周期,分别计算每一个其它时间段对应的两个统计周期内指定设备的功耗的差值,并计算每一个其他时间段的相应的指定设备的功耗数据;
第六计算模块设置为,对所述指定设备的所有时间段对应的功耗数据求平均值,将得到的平均值作为所述指定设备的功耗数据。
本发明实施例通过对设备功耗数据到统计数据进行分析推导出每个设备的功耗参数,不需要额外的硬件设备和测试方法,减少了投入成本;另外,本发明实施例不需要预先建立数学模型(例如尾功耗模型),是从实际统计数据中得出的,具有更好的适应性;最后,很多硬件设备随着使用模式和使用时间不同,其耗电参数会发生变化,基于预设模型计算的耗电数据就会有较大误差的波动,而本发明基于统计数据的分析会自动适应这种变化。
尽管为示例目的,已经公开了本发明的可选实施例,本领域的技术人员将意识到的改进、增加和取代也是可能的,因此,本发明的范围应当不限于上述实施例。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储 介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的每个模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储于存储器中的程序/指令来实现其相应功能。本发明不限制于任何特定形式的硬件和软件的结合。
虽然本申请所揭露的实施方式如上,但所述的内容仅为便于理解本申请而采用的实施方式,并非用以限定本申请,如本发明实施方式中的具体的实现方法。任何本申请所属领域内的技术人员,在不脱离本申请所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本申请的专利保护范围,仍须以所附的权利要求书所界定的范围为准。
工业实用性
上述技术方案提高了计算得出的终端内设备耗电数据的准确性。

Claims (10)

  1. 一种终端内设备功耗数据获取的方法,所述方法包括:
    在所有设备使用预设时长的统计数据中的所有统计周期中,筛选出指定设备使用时长差异达到预设值,且其他设备使用时长差异未达到预设值的两个统计周期;
    分别计算所述指定设备在筛选出的所述两个统计周期内的功耗;
    根据所述指定设备在所述两个统计周期内功耗的差值以及所述统计周期的时长计算出所述指定设备的功耗数据。
  2. 根据权利要求1所述的方法,所述统计周期包括按照预设周期时长划分的周期,所述方法还包括:
    如果在划分后的统计周期中未筛选出指定设备使用时长差异达到预设值,其他设备使用时长差异未达到预设值的所述两个统计周期,则减小所述预设周期时长,得到减小预设周期时长的统计周期,对所有设备使用预设时长的统计数据按照减小的预设周期时长的统计周期进行划分;
    在按照减小预设周期时长的划分的统计周期中,筛选出所述指定设备的使用时长差异达到预设值,其他设备使用时长差异未达到预设值的所述两个统计周期。
  3. 根据权利要求1所述的方法,其中,所述指定设备包括:
    处于不同功耗等级下的同一设备。
  4. 根据权利要求1所述的方法,所述指定设备包括终端内的两个或两个以上不同的设备,所述方法还包括:
    在计算出所述指定设备的功耗数据之后,在其他一个或一个以上时间段的所有设备的使用预设时长的统计数据中重新筛选出指定设备的在使用时长差异达到预设值,其他设备使用时长差异未达到预设值的每一其它时间段相应的所述两个统计周期;
    分别计算每一其他时间段对应的所述两个统计周期内所述指定设备功耗的差值;
    根据每一个时间段对应的指定设备的所述两个统计周期内的功耗的差值、所述指定设备的功耗数据以及所述统计周期的时长计算所述指定设备中每一个设备的功耗数据。
  5. 根据权利要求1至4任意一项所述的方法,所述方法还包括:
    在计算出所述指定设备的功耗数据之后,在其他一个或一个以上时间段的所有设备的使用预设时长的统计数据中重新筛选出指定设备使用时长差异达到预设值、其他设备使用时长差异未达到预设值的每一其它时间段相对应的所述两个统计周期,分别计算每一个其它时间段对应的两个统计周期内所述指定设备的功耗的差值,并计算每一个其他时间段的相应的指定设备的功耗数据;
    对所述指定设备的所有时间段对应的功耗数据求平均值,将得到的所述平均值作为所述指定设备的功耗数据。
  6. 一种终端内设备功耗数据获取的装置,所述装置包括:
    第一筛选模块设置为,在所有设备使用预设时长的统计数据中的所有统计周期中,筛选出指定设备使用时长差异达到预设值,且其他设备使用时长差异未达到预设值的两个统计周期;
    第一计算模块设置为,分别计算所述指定设备在筛选出的所述两个统计周期内的功耗;
    第二计算模块设置为,根据所述指定设备在所述两个统计周期内功耗的差值以及所述统计周期的时长计算出所述指定设备的功耗数据。
  7. 根据权利要求6所述的装置,所述装置还包括:
    划分模块设置为,所述筛选指定设备使用时长差异达到预设值,其他设备使用时长差异未达到预设值的两个统计周期之前,将所有设备使用预设时长的统计数据按预设周期时长划分获得所述统计周期;
    调整模块设置为,如果在划分后的统计周期中未筛选出指定设备使用时长差异达到预设值,其他设备使用时长差异未达到预设值的所述两个统计周期,则减小所述预设周期时长,得到减小预设周期时长的统计周期,对所有设备使用预设时长的统计数据按照减小的预设周期时长的统计周期进行划 分;
    第二筛选模块设置为,在按照减小预设周期时长的划分的统计周期中,筛选出所述指定设备的使用时长差异达到预设值,其他设备使用时长差异未达到预设值的所述两个统计周期。
  8. 根据权利要求6所述的装置,其中,所述指定设备包括:
    处于不同功耗等级下的同一设备。
  9. 根据权利要求6所述的装置,所述指定设备包括终端内的两个或两个以上不同的设备,所述装置还包括:
    第三筛选模块设置为,在计算出所述指定设备的功耗数据之后,在其他一个或一个以上时间段的所有设备的使用预设时长的统计数据中重新筛选出指定设备的在使用时长差异达到预设值,其他设备使用时长差异未达到预设值的每一其它时间段相应的所述两个统计周期;
    第三计算模块设置为,分别计算每一其他时间段对应的所述两个统计周期内所述指定设备功耗的差值;
    第四计算模块设置为,根据每一个时间段对应的指定设备的所述两个统计周期内的功耗的差值、所述指定设备的功耗数据以及所述统计周期的时长计算所述指定设备中每一个设备的功耗数据。
  10. 根据权利要求6至9任意一项所述的装置,所述装置还包括:
    第五计算模块设置为,在计算出所述指定设备的功耗数据之后,在其他一个或一个以上时间段的所有设备的使用预设时长的统计数据中重新筛选出指定设备使用时长差异达到预设值、其他设备使用时长差异未达到预设值的每一其它时间段相对应的所述两个统计周期,分别计算每一个其它时间段对应的两个统计周期内所述指定设备的功耗的差值,并计算每一个其他时间段的相应的指定设备的功耗数据;
    第六计算模块设置为,对所述指定设备的所有时间段对应的功耗数据求平均值,将得到的所述平均值作为所述指定设备的功耗数据。
PCT/CN2016/087590 2015-08-19 2016-06-29 一种终端内设备功耗数据获取的方法及装置 WO2017028628A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510512241.9 2015-08-19
CN201510512241.9A CN106470266B (zh) 2015-08-19 2015-08-19 一种终端内设备功耗数据获取方法及装置

Publications (1)

Publication Number Publication Date
WO2017028628A1 true WO2017028628A1 (zh) 2017-02-23

Family

ID=58051215

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/087590 WO2017028628A1 (zh) 2015-08-19 2016-06-29 一种终端内设备功耗数据获取的方法及装置

Country Status (2)

Country Link
CN (1) CN106470266B (zh)
WO (1) WO2017028628A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111291061A (zh) * 2020-01-16 2020-06-16 北京旷视科技有限公司 数据统计方法、装置和电子系统
US11292130B2 (en) 2014-12-05 2022-04-05 Broetje-Automation Gmbh Method for motion simulation of a manipulator

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103701970A (zh) * 2013-12-04 2014-04-02 中国科学院深圳先进技术研究院 一种移动终端的耗电提示方法、装置及移动终端
WO2014183455A1 (en) * 2013-05-17 2014-11-20 Tencent Technology (Shenzhen) Company Limited Method, device and computer storage medium for detecting power consumption of an application
CN104281513A (zh) * 2013-07-05 2015-01-14 贝壳网际(北京)安全技术有限公司 一种应用程序耗电量检测方法及系统
CN104461846A (zh) * 2014-12-02 2015-03-25 百度在线网络技术(北京)有限公司 检测应用程序耗电量的方法和装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508761B (zh) * 2011-11-17 2015-11-25 宇龙计算机通信科技(深圳)有限公司 终端电量的管理方法和终端
CN102591766B (zh) * 2011-12-31 2015-12-09 惠州Tcl移动通信有限公司 移动设备及其程序耗电量提示处理方法、系统
JP2014183665A (ja) * 2013-03-19 2014-09-29 Panasonic Corp 電力管理装置、プログラム
CN104237789B (zh) * 2013-06-09 2017-12-01 腾讯科技(深圳)有限公司 电池续航时间预估的方法及装置
CN104023149A (zh) * 2014-06-19 2014-09-03 深圳市中兴移动通信有限公司 一种移动终端及其共享电源资源状态异常提示方法
CN104268370A (zh) * 2014-09-01 2015-01-07 国家电网公司 一种电网设备全寿命周期的能耗计算方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014183455A1 (en) * 2013-05-17 2014-11-20 Tencent Technology (Shenzhen) Company Limited Method, device and computer storage medium for detecting power consumption of an application
CN104281513A (zh) * 2013-07-05 2015-01-14 贝壳网际(北京)安全技术有限公司 一种应用程序耗电量检测方法及系统
CN103701970A (zh) * 2013-12-04 2014-04-02 中国科学院深圳先进技术研究院 一种移动终端的耗电提示方法、装置及移动终端
CN104461846A (zh) * 2014-12-02 2015-03-25 百度在线网络技术(北京)有限公司 检测应用程序耗电量的方法和装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11292130B2 (en) 2014-12-05 2022-04-05 Broetje-Automation Gmbh Method for motion simulation of a manipulator
CN111291061A (zh) * 2020-01-16 2020-06-16 北京旷视科技有限公司 数据统计方法、装置和电子系统
CN111291061B (zh) * 2020-01-16 2023-06-13 北京旷视科技有限公司 数据统计方法、装置和电子系统

Also Published As

Publication number Publication date
CN106470266B (zh) 2021-01-22
CN106470266A (zh) 2017-03-01

Similar Documents

Publication Publication Date Title
CN108255653A (zh) 一种产品的测试方法及其终端
CN104994204B (zh) 降低终端显示屏干扰的方法和系统
CN104011626B (zh) 通过在运行时期间配置功率管理参数的用于高能效和节能的系统、方法和装置
TW201405305A (zh) 一種終端設備及其運行方法
CN104615415B (zh) 一种信息处理方法及电子设备
CN108964789B (zh) 射频干扰处理方法、装置、存储介质及电子设备
CN105677482B (zh) 一种频率调节方法及电子设备
CN104199764A (zh) 终端性能的测试方法及装置
WO2019119326A1 (zh) 充电方法、装置、终端设备及计算机可读存储介质
CN104424156A (zh) 处理器的核处理方法、装置及终端
WO2017028628A1 (zh) 一种终端内设备功耗数据获取的方法及装置
CN105022686A (zh) 安卓平台上进程的cpu占用率确定方法和装置
CN104219747B (zh) 一种根据电量信息调整唤醒时间的方法、装置及终端
CN109870172B (zh) 计步检测方法、装置、设备及存储介质
CN113626200A (zh) 任务负载计算方法、装置、存储介质以及终端
CN110222409B (zh) 电热水器剩余用水时间检测方法、装置、设备与存储介质
WO2015154391A1 (zh) 无线网络接入的功耗处理方法及装置
CN107181601B (zh) 一种流量提醒方法及装置
CN105573458B (zh) 一种信息处理方法及电子设备
CN110806908A (zh) 应用软件预启动方法、终端及计算机可读存储介质
CN111036314A (zh) 温湿度试验箱的控制方法、装置、介质及温湿度试验箱
CN103747131A (zh) 监控移动终端的电源状态的方法及移动终端
CN107239345A (zh) 数据处理方法及装置
US9746894B1 (en) Dynamic threshold voltage compensation
CN109698696A (zh) 时钟分频方法、装置、系统、片上系统及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16836492

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16836492

Country of ref document: EP

Kind code of ref document: A1