WO2019237751A1 - Method and system for detecting power consumption of mobile application - Google Patents

Method and system for detecting power consumption of mobile application Download PDF

Info

Publication number
WO2019237751A1
WO2019237751A1 PCT/CN2019/073516 CN2019073516W WO2019237751A1 WO 2019237751 A1 WO2019237751 A1 WO 2019237751A1 CN 2019073516 W CN2019073516 W CN 2019073516W WO 2019237751 A1 WO2019237751 A1 WO 2019237751A1
Authority
WO
WIPO (PCT)
Prior art keywords
power consumption
mobile application
phase
screen
running
Prior art date
Application number
PCT/CN2019/073516
Other languages
French (fr)
Chinese (zh)
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 WO2019237751A1 publication Critical patent/WO2019237751A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3612Software analysis for verifying properties of programs by runtime analysis

Definitions

  • the present invention relates to a power consumption detection method, in particular to a power consumption detection method for a mobile application, and to a power consumption detection system adopting the mobile application power consumption detection method.
  • the technical problem to be solved by the present invention is to provide a mobile application that can more effectively detect whether a mobile application is Whether there is a power consumption detection method for the power consumption problem; and further provides a power consumption detection system using the power consumption detection method of the mobile application.
  • the present invention provides a method for detecting power consumption of a mobile application, including the following steps:
  • Step S1 generating test inputs and operating environment parameters
  • Step S2 run a mobile application under the test input and operating environment parameters, and collect power consumption information of the mobile application under the test input and operating environment parameters;
  • Step S3 analyzing the power consumption information to identify whether there is a power consumption problem
  • the test input and operating environment parameters are parameters in a state where the wireless signal is shielded; the state where the wireless signal is shielded includes a network fault state and a flight mode state.
  • a further improvement of the present invention is that, in the step S1, a test input and a running environment parameter are generated in a random or problem trigger mode.
  • test input and the running environment parameters are generated by automatically generating a random user input sequence, and the user input sequence includes an input sequence corresponding to a touch screen and a swipe screen.
  • a further improvement of the present invention is that the problem trigger mode includes at least one of a travel positioning background operation trigger mode, a browser background operation trigger mode, and a multimedia playback failure trigger mode.
  • step S3 includes the following sub-steps:
  • Step S301 analyze the power consumption information of the mobile application under the test input and operating environment parameters, and determine whether there is a power consumption problem, otherwise return to step S1, and if so, skip to step S302;
  • Step S302 recording the power consumption problem, and analyzing and judging whether the power consumption problem belongs to a new problem trigger mode, if otherwise, return to step S1, and if yes, go to step S303;
  • Step S303 Record the power consumption problem in the problem trigger mode.
  • a further improvement of the present invention is that in the step S301, analyzing the power consumption information of the mobile application under the test input and operating environment parameters includes analyzing a lock screen state phase, a screen opening phase, an application running phase, The power consumption information is placed in the background phase and the screen-standby phase, and then the power consumption information of the five phases satisfies a preset power consumption range, thereby determining whether there is a power consumption problem.
  • a further improvement of the present invention is that the preset power consumption range is set to a normal distribution of power consumption of the test case of the mobile application, and by determining whether the power consumption information of the five stages is equal to the power consumption Normal distribution It is consistent, if otherwise, it is determined that there is a power consumption problem in the foreground operation.
  • a further improvement of the present invention is to determine whether there is a power consumption problem running in the background by analyzing the relationship between the average power consumption in the screen-on stage and the average power consumption in the background stage. If the average power consumption in the background stage is more than 40% higher than the average power consumption in the screen-on stage, it is determined that there is a power consumption problem running in the background.
  • a further improvement of the present invention is to determine whether there is a power consumption problem of running in the background by analyzing the relationship between the average power consumption in the screen-standby state phase and the average power consumption in the lock-screen state phase. If the average power consumption in the standby state of the screen is more than 50% higher than the average power consumption in the state of the lock screen, it is determined that the mobile application has a problem of power consumption without sleep.
  • the present invention also provides a power consumption detection system for a mobile application, which adopts the power consumption detection method for a mobile application as described above.
  • the present invention has the beneficial effects of: simulating a special operating environment such as a network component failure by generating the test input and operating environment parameters, and then operating under this special operating environment And testing mobile applications, we can find more hidden deep power consumption problems; after testing, it is found that 84% of the power consumption problems detected by the present invention are not detected by the prior art, and these power consumption problems are repaired , Can extend the battery life of smart terminals such as mobile phones to about twice the existing technology.
  • FIG. 1 is a schematic diagram of a work flow according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of analyzing power consumption information of a mobile application in five stages according to an embodiment of the present invention.
  • this example provides a method for detecting power consumption of a mobile application, including the following steps: [0028] Step S1, generating test inputs and operating environment parameters;
  • Step S2 running a mobile application under the test input and operating environment parameters, and collecting power consumption information of the mobile application under the test input and operating environment parameters;
  • Step S3 analyzing the power consumption information to identify whether there is a power consumption problem
  • the test input and operating environment parameters are parameters in a state where the wireless signal is shielded; the state where the wireless signal is shielded includes a network fault state and a flight mode state.
  • test input and operating environment parameters are generated by using a random or problem trigger mode.
  • a pressure test is applied to the mobile application, that is, a large number of test cases are used to test the target mobile application.
  • test input and operating environment are different. These test inputs and running environments may be randomly generated, or generated according to the problem trigger mode, as described below.
  • This example uses Monkey to automatically generate a random user input sequence.
  • the Monkey is an Android application testing tool developed by Google.
  • the user input sequence includes the corresponding sequences for touch screen and swipe screen respectively.
  • this example also designed two special operating environments, namely Network Fail and Flight Mode. In the Network Fail operating environment, the wireless network signals are extremely weak, and the transmission delay of the data packet is 451
  • the smart mobile terminal such as a mobile phone is placed in a wireless signal shielding room to implement the test, and then it can be run and tested in the operating environment of Network Fail and Flight Mode.
  • the software layer is closed.
  • a test input and a running environment parameter can be generated by automatically generating a random user input sequence, and the user input sequence includes an input sequence corresponding to a touch screen and a swipe screen.
  • the problem trigger mode described in this example includes at least one of a travel positioning background operation trigger mode, a browser background operation trigger mode, and a multimedia playback fault trigger mode.
  • the travel positioning runs in the background
  • the implementation of the trigger mode includes the following steps: Turn on the GPS component in the mobile application, place the mobile application in the background, and then make the screen go out automatically.
  • the implementation of the browser background trigger mode includes the following steps:
  • the plug-in webpage will run the browser in the background; that is, the webpage requires a flash plug-in program.
  • the implementation of the multimedia playback fault trigger mode includes the following conditions: When playing a streaming media, a network fault occurs.
  • the problem trigger mode described in this example refers to common test inputs and operating environment parameters that can trigger power consumption problems. For example, for streaming media applications, the network suddenly fails during streaming media playback. This situation (problem trigger mode) can easily trigger power consumption problems.
  • the operating environment parameters described in this example refer to the special operating environment when the application is running, including situations where the signals of WiFi and cellular networks are extremely weak, situations where GPS signals are extremely weak, and mobile devices.
  • the failure of the WiFi and cellular network components and the failure of the GPS components, etc., are parameters in a state where the wireless signal is shielded.
  • step S3 in this example includes the following sub-steps:
  • Step S301 analyze the power consumption information of the mobile application under the test input and operating environment parameters, and determine whether there is a power consumption problem, if not, return to step S1, and if yes, skip to step S302;
  • Step S302 recording the power consumption problem, and analyzing and judging whether the power consumption problem belongs to a new problem trigger mode, if not, return to step S1, and if yes, go to step S303;
  • Step S303 Record the power consumption problem in the problem trigger mode.
  • the problem trigger mode described in this example refers to a process that may trigger a power consumption problem, and includes at least one of a travel positioning background operation trigger mode, a browser background operation trigger mode, and a multimedia playback fault trigger mode.
  • this example designs a specific input sequence to apply the corresponding operating environment to achieve the corresponding problem trigger mode.
  • the criterion for determining the problem trigger mode is: The problem trigger mode has triggered one or more power consumption problems in the test. This guarantees that the problem trigger mode is more likely to trigger power consumption problems than normal, because it has already triggered one or more power consumption problems. And the problem trigger mode can be implemented in the test case, because the test case is based on user input and operating environment. For those power consumption issues that need to be modified by source code, the test case in this example cannot be covered. . [0045] After the test input and the running environment are determined, this example will run the application software with the input sequence under the running environment. During the test, the power consumption information of the device is recorded in real time using the power consumption detector.
  • Step S3 in this example is a step in the data analysis phase.
  • this example will determine whether the use case has a power consumption problem by analyzing the power consumption information. If there is a power consumption problem, record the power consumption problem and analyze whether the problem is triggered by the new problem trigger mode; if the power consumption problem is triggered by the new problem trigger mode, record the power consumption problem Problem trigger mode.
  • the recorded content includes the user input information and operating environment information required to trigger the power consumption problem. If no power consumption problem is identified or the problem is not triggered by the new "problem trigger mode", the entire test is restarted. Process.
  • step S3 If no power consumption problem or a problem not triggered by the new problem trigger mode is identified in step S3, it is preferred to automatically restart the entire detection process, that is, return to step S1 to facilitate real-time monitoring of the running status of the mobile application .
  • analyzing the power consumption information of the mobile application under the test input and operating environment parameters includes analyzing a lock screen state (PRE-OFF) and turning on the screen.
  • Phase I DLE
  • application operation phase EXECUTION
  • BACKGROUND background phase
  • SCREEN-OFF screen standby state phase
  • the lock screen state phase in this example is also referred to as PRE-OFF, which refers to the stage where the mobile phone is in the lock screen state.
  • PRE-OFF refers to the stage where the mobile phone is in the lock screen state.
  • the phone enters the IDLE phase, that is, the screen phase is turned on.
  • the EXECUTION phase that is, the application running phase.
  • the test case entered the BACKGROUND phase, which is the background phase.
  • the screen goes through a standby state, the screen is automatically screened. After the screen is closed, the use case enters the final phase, the SCREEN-OFF phase, which is the screen standby mode.
  • This example divides the test cases into five stages to help us identify three types of power consumption problems: foreground operation problems, background operation problems, and no sleep problems.
  • this example In order to identify the foreground operation problem, this example considers the power consumption of all test cases of each application as a normal distribution, and marks test cases that are two standard deviations larger than the average power consumption as possible power consumption problems. Use example. Finally, this example analyzes these test cases to determine if they really have power issues.
  • the preset power consumption range is set to a normal distribution of power consumption of the test case of the mobile application, and by determining whether the power consumption information of the five stages is consistent with the normal distribution of power consumption It is consistent, if otherwise, it is determined that there is a power consumption problem in the foreground operation.
  • This example determines whether there is a power consumption problem running in the background by analyzing the relationship between the average power consumption in the screen-on stage and the average power consumption in the background stage. If the average power consumption is more than 40% higher than the average power consumption in the screen-on phase, it is determined that there is a power consumption problem running in the background. In practical applications, the value of 40% can be adaptively adjusted according to customer needs, such as the first power consumption threshold set by the user. When the average power consumption in the background stage is greater than the screen opening stage, If the average power consumption is as high as the first power consumption threshold, it is determined that there is a power consumption problem running in the background.
  • This example determines whether there is a power consumption problem running in the background by analyzing the relationship between the average power consumption in the screen-standby state phase and the average power consumption in the lock-screen state phase.
  • the average power consumption in the state phase is more than 50% higher than the average power consumption in the lock screen state phase, it is determined that the mobile application has a power consumption problem without sleep.
  • this value of 50% can be adaptively adjusted according to customer needs, such as a second power consumption threshold set by the user.
  • the average power consumption during the standby state of the screen is greater than the lock screen, If the average power consumption in the state phase is as high as the second power consumption threshold, it is determined that there is a power consumption problem without sleep.
  • This example also provides a power consumption detection system for a mobile application, which uses the power consumption detection method for a mobile application as described above.
  • this example simulates a special operating environment such as a network component failure by generating the test inputs and operating environment parameters, and then running and testing mobile applications in this special operating environment can find more Hidden deeper power consumption problems; after testing, it is found that 84% of the power consumption problems detected by the present invention are not detected by the prior art, and repairing these power consumption problems can replace the battery of smart terminals such as mobile phones The battery life is extended to about twice that of the prior art.

Abstract

Provided are a method and system for detecting the power consumption of a mobile application. The method for detecting the power consumption of a mobile application comprises the following steps: step S1, generating test input and running environment parameters; step S2, running a mobile application under the test input and running environment parameters, and simultaneously collecting power consumption information of the mobile application under the test input and running environment parameters; and step S3, analyzing the power consumption information to recognize whether there is a power consumption problem. According to the present invention, by means of generating the test input and running environment parameters, then simulating special running environments, such as an environment where a network component has a failure, and then running and testing a mobile application in the special running environments, more deeply hidden power consumption problems can be found; and through testing, it is found that 84% of the power consumption problems detected in the present invention are not detected in the prior art, and by solving these power consumption problems, the battery life of a mobile terminal can be prolonged to about twice the current battery life.

Description

一种移动应用的功耗检测方法及系统 技术领域  Method and system for detecting power consumption of mobile applications
[0001] 本发明涉及一种功耗检测方法, 尤其涉及一种移动应用的功耗检测方法, 并涉 及采用了该移动应用的功耗检测方法的功耗检测系统。  [0001] The present invention relates to a power consumption detection method, in particular to a power consumption detection method for a mobile application, and to a power consumption detection system adopting the mobile application power consumption detection method.
背景技术  Background technique
[0002] 近十几年, 移动设备的用户数量的增长是爆炸式的。 在 2014年初, 智能移动设 备以 17亿台的市场占有量超过了台式和便携式电脑; 到 2017年, 智能移动设备 的市场占有量超过了 19亿台。 伴随着移动设备的市场占有量越来越高, 人们对 电子设备的使用习惯也发生了变化, 即使移动设备并没有完全取代其他电子设 备, 但是用户花在移动设备上的时间越来越多, 到 2015年, 移动设备的使用时 间已经超过了其他设备的总和。 [0002] In the past ten years, the growth of the number of users of mobile devices has exploded. At the beginning of 2014, the market share of smart mobile devices exceeded desktop and portable computers with 1.7 billion units; by 2017, the market share of smart mobile devices exceeded 1.9 billion units. With the increasing market share of mobile devices, people ’s use habits of electronic devices have also changed. Even though mobile devices have not completely replaced other electronic devices, users spend more and more time on mobile devices. By 2015, the usage time of mobile devices has exceeded the total of other devices.
[0003] 但是, 移动设备的电池电量非常有限, 低功耗已经是移动应用的最重要设计指 标之一, 在大部分情况下, 正常使用的智能手机, 续航时间却很难超过 24小时 。 我们随机抽取了 89个高质量移动应用, 发现超过三分之一的应用存在严重的 功耗问题; 这些功耗问题可以在几小时内将电池消耗殆尽, 很多用户甚至因此 决定永久不再使用这些应用了。  [0003] However, the battery power of mobile devices is very limited, and low power consumption is already one of the most important design indicators for mobile applications. In most cases, the battery life of a smartphone in normal use is difficult to exceed 24 hours. We randomly selected 89 high-quality mobile applications and found that more than a third of the applications have serious power consumption problems; these power consumption problems can drain the battery in a few hours, and many users have even decided not to use it permanently. These applications are up.
[0004] 目前大部分关于移动设备的功耗优化的研究都是专注于单个部件, 其实, 虽然 各个硬件部件也在耗电, 但移动应用通过软件控制硬件, 因此, 如果能够做到 软件优化就可以节约 50%到 80%的整体电能, 这是单个硬件优化难以达到的效果 , 所以, 如果能很好地发现移动应用的功耗问题, 其实是未来修复功耗问题的 根本先决条件。  [0004] At present, most of the research on power consumption optimization of mobile devices is focused on a single component. In fact, although each hardware component is also consuming power, mobile applications control hardware through software. Therefore, if software optimization can be achieved, It can save 50% to 80% of the overall power, which is difficult to achieve with a single hardware optimization. Therefore, if the power consumption problem of mobile applications can be found well, it is actually a fundamental prerequisite to repair the power consumption problem in the future.
发明概述  Summary of invention
技术问题  technical problem
问题的解决方案  Problem solution
技术解决方案  Technical solutions
[0005] 本发明所要解决的技术问题是需要提供一种能够更加有效地检测出移动应用是 否存在功耗问题的功耗检测方法; 并进一步提供采用了该移动应用的功耗检测 方法的功耗检测系统。 [0005] The technical problem to be solved by the present invention is to provide a mobile application that can more effectively detect whether a mobile application is Whether there is a power consumption detection method for the power consumption problem; and further provides a power consumption detection system using the power consumption detection method of the mobile application.
[0006] 对此, 本发明提供一种移动应用的功耗检测方法, 包括以下步骤:  [0006] In this regard, the present invention provides a method for detecting power consumption of a mobile application, including the following steps:
[0007] 步骤 S1, 生成测试输入和运行环境参数;  [0007] Step S1, generating test inputs and operating environment parameters;
[0008] 步骤 S2, 在所述测试输入和运行环境参数下运行移动应用, 同时收集所述移动 应用在所述测试输入和运行环境参数下的功耗信息;  [0008] Step S2, run a mobile application under the test input and operating environment parameters, and collect power consumption information of the mobile application under the test input and operating environment parameters;
[0009] 步骤 S3 , 分析功耗信息以识别是否存在功耗问题;  [0009] Step S3, analyzing the power consumption information to identify whether there is a power consumption problem;
[0010] 其中, 所述步骤 S1中, 所述测试输入和运行环境参数为无线信号被屏蔽状态下 的参数; 所述无线信号被屏蔽的状态包括网络故障状态和飞行模式状态。  [0010] Wherein, in the step S1, the test input and operating environment parameters are parameters in a state where the wireless signal is shielded; the state where the wireless signal is shielded includes a network fault state and a flight mode state.
[0011] 本发明的进一步改进在于, 所述步骤 S 1中, 通过随机或是问题触发模式生成测 试输入和运行环境参数。  [0011] A further improvement of the present invention is that, in the step S1, a test input and a running environment parameter are generated in a random or problem trigger mode.
[0012] 本发明的进一步改进在于, 通过自动生成随机的用户输入序列来生成测试输入 和运行环境参数, 所述用户输入序列包括触屏和划屏所对应的输入序列。  [0012] A further improvement of the present invention is that the test input and the running environment parameters are generated by automatically generating a random user input sequence, and the user input sequence includes an input sequence corresponding to a touch screen and a swipe screen.
[0013] 本发明的进一步改进在于, 所述问题触发模式包括旅行定位后台运行触发模式 、 浏览器后台运行触发模式和多媒体播放故障触发模式中的至少一种。  [0013] A further improvement of the present invention is that the problem trigger mode includes at least one of a travel positioning background operation trigger mode, a browser background operation trigger mode, and a multimedia playback failure trigger mode.
[0014] 本发明的进一步改进在于, 所述步骤 S3包括以下子步骤:  [0014] A further improvement of the present invention is that the step S3 includes the following sub-steps:
[0015] 步骤 S301, 分析所述移动应用在所述测试输入和运行环境参数下的功耗信息, 并判断是否存在功耗问题, 若否则返回步骤 S1, 若是则跳转至步骤 S302;  [0015] Step S301, analyze the power consumption information of the mobile application under the test input and operating environment parameters, and determine whether there is a power consumption problem, otherwise return to step S1, and if so, skip to step S302;
[0016] 步骤 S302, 记录所述功耗问题, 并分析和判断所述功耗问题是否属于新的问题 触发模式, 若否则返回步骤 S1, 若是则跳转至步骤 S303 ;  [0016] Step S302, recording the power consumption problem, and analyzing and judging whether the power consumption problem belongs to a new problem trigger mode, if otherwise, return to step S1, and if yes, go to step S303;
[0017] 步骤 S303 , 将所述功耗问题记录至所述问题触发模式中。  [0017] Step S303: Record the power consumption problem in the problem trigger mode.
[0018] 本发明的进一步改进在于, 所述步骤 S301中, 分析所述移动应用在所述测试输 入和运行环境参数下的功耗信息包括分析锁屏状态阶段、 开启屏幕阶段、 应用 运行阶段、 置于后台阶段以及息屏待机状态阶段共五个阶段的功耗信息, 然后 通过判断所述五个阶段的功耗信息是否分别满足预设功耗范围, 进而判断是否 存在功耗问题。  [0018] A further improvement of the present invention is that in the step S301, analyzing the power consumption information of the mobile application under the test input and operating environment parameters includes analyzing a lock screen state phase, a screen opening phase, an application running phase, The power consumption information is placed in the background phase and the screen-standby phase, and then the power consumption information of the five phases satisfies a preset power consumption range, thereby determining whether there is a power consumption problem.
[0019] 本发明的进一步改进在于, 所述预设功耗范围设置为所述移动应用的测试用例 的耗电正态分布, 通过判断所述五个阶段的功耗信息是否与所述耗电正态分布 相符合, 若否则判断为存在前台运行的功耗问题。 [0019] A further improvement of the present invention is that the preset power consumption range is set to a normal distribution of power consumption of the test case of the mobile application, and by determining whether the power consumption information of the five stages is equal to the power consumption Normal distribution It is consistent, if otherwise, it is determined that there is a power consumption problem in the foreground operation.
[0020] 本发明的进一步改进在于, 通过分析所述开启屏幕阶段的平均功耗和所述置于 后台阶段的平均功耗之间的关系来判断是否存在后台运行的功耗问题, 若所述 置于后台阶段的平均功耗比所述开启屏幕阶段的平均功耗高 40%以上, 则判定为 存在后台运行的功耗问题。  [0020] A further improvement of the present invention is to determine whether there is a power consumption problem running in the background by analyzing the relationship between the average power consumption in the screen-on stage and the average power consumption in the background stage. If the average power consumption in the background stage is more than 40% higher than the average power consumption in the screen-on stage, it is determined that there is a power consumption problem running in the background.
[0021] 本发明的进一步改进在于, 通过分析所述息屏待机状态阶段的平均功耗和所述 锁屏状态阶段的平均功耗之间的关系来判断是否存在后台运行的功耗问题, 若 所述息屏待机状态阶段的平均功耗比所述锁屏状态阶段的平均功耗高 50%以上, 则判定为所述移动应用存在无睡眠的功耗问题。  [0021] A further improvement of the present invention is to determine whether there is a power consumption problem of running in the background by analyzing the relationship between the average power consumption in the screen-standby state phase and the average power consumption in the lock-screen state phase. If the average power consumption in the standby state of the screen is more than 50% higher than the average power consumption in the state of the lock screen, it is determined that the mobile application has a problem of power consumption without sleep.
[0022] 本发明还提供一种移动应用的功耗检测系统, 采用了如上所述的移动应用的功 耗检测方法。  [0022] The present invention also provides a power consumption detection system for a mobile application, which adopts the power consumption detection method for a mobile application as described above.
发明的有益效果  The beneficial effects of the invention
有益效果  Beneficial effect
[0023] 与现有技术相比, 本发明的有益效果在于: 通过生成所述测试输入和运行环境 参数进而模拟出网络部件出现故障等特殊的运行环境, 进而在这种特殊的运行 环境下运行和测试移动应用, 能够发现更多的隐藏较深的功耗问题; 经测试发 现, 本发明所检测出来的 84%的功耗问题是现有技术所没有检测出来的, 而修复 这些功耗问题, 可以将手机等智能终端的电池续航时间延长至大约为现有技术 的两倍左右。  [0023] Compared with the prior art, the present invention has the beneficial effects of: simulating a special operating environment such as a network component failure by generating the test input and operating environment parameters, and then operating under this special operating environment And testing mobile applications, we can find more hidden deep power consumption problems; after testing, it is found that 84% of the power consumption problems detected by the present invention are not detected by the prior art, and these power consumption problems are repaired , Can extend the battery life of smart terminals such as mobile phones to about twice the existing technology.
对附图的简要说明  Brief description of the drawings
附图说明  BRIEF DESCRIPTION OF THE DRAWINGS
[0024] 图 1是本发明一种实施例的工作流程示意图;  [0024] FIG. 1 is a schematic diagram of a work flow according to an embodiment of the present invention;
[0025] 图 2是本发明一种实施例分析移动应用共五个阶段的功耗信息的示意图。  [0025] FIG. 2 is a schematic diagram of analyzing power consumption information of a mobile application in five stages according to an embodiment of the present invention.
发明实施例  Invention Examples
本发明的实施方式  Embodiments of the invention
[0026] 下面结合附图, 对本发明的较优的实施例作进一步的详细说明。  [0026] The preferred embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0027] 如图 1所示, 本例提供一种移动应用的功耗检测方法, 包括以下步骤: [0028] 步骤 Sl, 生成测试输入和运行环境参数; [0027] As shown in FIG. 1, this example provides a method for detecting power consumption of a mobile application, including the following steps: [0028] Step S1, generating test inputs and operating environment parameters;
[0029] 步骤 S2, 在所述测试输入和运行环境参数下运行移动应用, 同时收集所述移动 应用在所述测试输入和运行环境参数下的功耗信息;  [0029] Step S2, running a mobile application under the test input and operating environment parameters, and collecting power consumption information of the mobile application under the test input and operating environment parameters;
[0030] 步骤 S3 , 分析功耗信息以识别是否存在功耗问题;  [0030] Step S3, analyzing the power consumption information to identify whether there is a power consumption problem;
[0031] 其中, 所述步骤 S1中, 所述测试输入和运行环境参数为无线信号被屏蔽状态下 的参数; 所述无线信号被屏蔽的状态包括网络故障状态和飞行模式状态。  [0031] Wherein, in the step S1, the test input and operating environment parameters are parameters in a state where the wireless signal is shielded; the state where the wireless signal is shielded includes a network fault state and a flight mode state.
[0032] 申请人通过在手机的应用市场随机选择了 89个移动应用, 并阅读了它们的开发 文档, 发现 94.8%的功耗问题都是在特殊运行环境下引发的, 比如网络部件出现 故障的情况。 即, 在特殊环境下, 能够更有效地检测出移动应用的功耗问题。 本例所述步骤 S1中, 通过随机或是问题触发模式生成测试输入和运行环境参数  [0032] The applicant randomly selected 89 mobile applications in the mobile phone application market, and read their development documents, and found that 94.8% of power consumption problems were caused under special operating environments, such as network component failures. Happening. That is, under special circumstances, power consumption problems of mobile applications can be detected more effectively. In step S1 described in this example, test input and operating environment parameters are generated by using a random or problem trigger mode.
[0033] 本例在所述步骤 S1和步骤 S2的数据采集阶段, 对移动应用施加压力测试, 即通 过大量的测试用例去测试目标的移动应用。 对于每一个测试用例, 其测试输入 以及运行环境都是不同的。 这些测试输入和运行环境, 可以是随机产生的, 或 者是根据所述问题触发模式而生成的, 具体如下所述。 [0033] In this example, during the data acquisition phase of steps S1 and S2, a pressure test is applied to the mobile application, that is, a large number of test cases are used to test the target mobile application. For each test case, its test input and operating environment are different. These test inputs and running environments may be randomly generated, or generated according to the problem trigger mode, as described below.
[0034] 本例使用了 Monkey来自动生成随机的用户输入序列, 所述 Monkey是一个 Googl e公司自己开发的 Android应用测试工具。 用户输入序列包括触屏和划屏所分别 对应的序列。 同时, 本例还设计了两种的特殊运行环境, 分别为网络故障状态 (Network Fail) 和飞行模式状态 (Flight Mode) 。 在网络故障状态 (Network Fail) 运行环境中, 无线网络信号都极弱, 数据包的传输延迟 451  [0034] This example uses Monkey to automatically generate a random user input sequence. The Monkey is an Android application testing tool developed by Google. The user input sequence includes the corresponding sequences for touch screen and swipe screen respectively. At the same time, this example also designed two special operating environments, namely Network Fail and Flight Mode. In the Network Fail operating environment, the wireless network signals are extremely weak, and the transmission delay of the data packet is 451
ms , 下载速度 21KB/S; 而在正常运行环境中, 数据包的传输延迟为 36 ms, 下载 速度为 3.2MB/S。 因此, 本例通过将手机等智能移动终端放置在无线信号屏蔽室 中实现测试, 进而能够在网络故障状态 (Network Fail) 和飞行模式状态 (Flight Mode) 的运行环境中运行和测试, 网络部件在软件层被关闭。  ms, download speed 21KB / S; and under normal operating environment, the data packet transmission delay is 36 ms, and the download speed is 3.2MB / S. Therefore, in this example, the smart mobile terminal such as a mobile phone is placed in a wireless signal shielding room to implement the test, and then it can be run and tested in the operating environment of Network Fail and Flight Mode. The software layer is closed.
[0035] 也就是说, 本例可以通过自动生成随机的用户输入序列来生成测试输入和运行 环境参数, 所述用户输入序列包括触屏和划屏所对应的输入序列。  [0035] That is, in this example, a test input and a running environment parameter can be generated by automatically generating a random user input sequence, and the user input sequence includes an input sequence corresponding to a touch screen and a swipe screen.
[0036] 本例所述问题触发模式包括旅行定位后台运行触发模式、 浏览器后台运行触发 模式和多媒体播放故障触发模式中的至少一种。 其中, 所述旅行定位后台运行 触发模式的实现包括以下步骤: 在移动应用中开启 GPS部件, 将移动应用置于后 台运行, 然后使得屏幕自动熄灭。 所述浏览器后台运行触发模式的实现包括以 下步骤: 打开有 flash [0036] The problem trigger mode described in this example includes at least one of a travel positioning background operation trigger mode, a browser background operation trigger mode, and a multimedia playback fault trigger mode. Wherein, the travel positioning runs in the background The implementation of the trigger mode includes the following steps: Turn on the GPS component in the mobile application, place the mobile application in the background, and then make the screen go out automatically. The implementation of the browser background trigger mode includes the following steps:
plug-in的网页, 将浏览器置于后台运行; 即网页要求是有 flash插件程序的。 所述 多媒体播放故障触发模式的实现包括以下条件: 在播放流媒体的时候, 出现网 络故障。  The plug-in webpage will run the browser in the background; that is, the webpage requires a flash plug-in program. The implementation of the multimedia playback fault trigger mode includes the following conditions: When playing a streaming media, a network fault occurs.
[0037] 本例所述问题触发模式是指可以触发功耗问题的常见测试输入和运行环境参数 。 比如对于流媒体应用, 在流媒体播放时, 网络突然出现故障, 这种情况 (问 题触发模式) 就很容易触发功耗问题。  [0037] The problem trigger mode described in this example refers to common test inputs and operating environment parameters that can trigger power consumption problems. For example, for streaming media applications, the network suddenly fails during streaming media playback. This situation (problem trigger mode) can easily trigger power consumption problems.
[0038] 需要特别指出的是, 本例所述运行环境参数, 是指应用运行时的特殊运行环 境, 包括了 WiFi和蜂窝网络的信号极弱的情况、 GPS信号极弱的情况、 移动设备 里 WiFi和蜂窝网络部件出现故障以及 GPS部件出现故障等情况等等, 即为无线信 号被屏蔽状态下的参数。  [0038] It should be particularly pointed out that the operating environment parameters described in this example refer to the special operating environment when the application is running, including situations where the signals of WiFi and cellular networks are extremely weak, situations where GPS signals are extremely weak, and mobile devices. The failure of the WiFi and cellular network components and the failure of the GPS components, etc., are parameters in a state where the wireless signal is shielded.
[0039] 如图 1所示, 本例所述步骤 S3包括以下子步骤:  [0039] As shown in FIG. 1, step S3 in this example includes the following sub-steps:
[0040] 步骤 S301, 分析所述移动应用在所述测试输入和运行环境参数下的功耗信息, 并判断是否存在功耗问题, 若否则返回步骤 S1, 若是则跳转至步骤 S302;  [0040] Step S301, analyze the power consumption information of the mobile application under the test input and operating environment parameters, and determine whether there is a power consumption problem, if not, return to step S1, and if yes, skip to step S302;
[0041] 步骤 S302, 记录所述功耗问题, 并分析和判断所述功耗问题是否属于新的问题 触发模式, 若否则返回步骤 S1, 若是则跳转至步骤 S303 ;  [0041] Step S302, recording the power consumption problem, and analyzing and judging whether the power consumption problem belongs to a new problem trigger mode, if not, return to step S1, and if yes, go to step S303;
[0042] 步骤 S303 , 将所述功耗问题记录至所述问题触发模式中。  [0042] Step S303: Record the power consumption problem in the problem trigger mode.
[0043] 本例所述问题触发模式是指, 有可能触发功耗问题的过程, 包括旅行定位后台 运行触发模式、 浏览器后台运行触发模式和多媒体播放故障触发模式中的至少 一种。 对于具体的移动应用, 本例设计出具体的输入序列以施加相应的运行环 境来实现相应的问题触发模式。  [0043] The problem trigger mode described in this example refers to a process that may trigger a power consumption problem, and includes at least one of a travel positioning background operation trigger mode, a browser background operation trigger mode, and a multimedia playback fault trigger mode. For specific mobile applications, this example designs a specific input sequence to apply the corresponding operating environment to achieve the corresponding problem trigger mode.
[0044] 判断为问题触发模式的标准是: 该问题触发模式在测试中已经触发过一个或者 多个功耗问题。 这一点保证了该问题触发模式比一般情况更容易触发功耗问题 , 因为它已经触发过一个或者多个功耗问题。 而且该问题触发模式是可以在测 试用例中实现的, 因为测试用例是基于用户输入以及运行环境的, 对于那些需 要修改源代码才可以触发的功耗问题, 本例的测试用例是覆盖不到的。 [0045] 当确定了测试输入和运行环境之后, 本例将在该运行环境下以该输入序列去运 行应用软件。 在测试过程中, 全程使用功耗检测仪实时记录设备的功耗信息。 [0044] The criterion for determining the problem trigger mode is: The problem trigger mode has triggered one or more power consumption problems in the test. This guarantees that the problem trigger mode is more likely to trigger power consumption problems than normal, because it has already triggered one or more power consumption problems. And the problem trigger mode can be implemented in the test case, because the test case is based on user input and operating environment. For those power consumption issues that need to be modified by source code, the test case in this example cannot be covered. . [0045] After the test input and the running environment are determined, this example will run the application software with the input sequence under the running environment. During the test, the power consumption information of the device is recorded in real time using the power consumption detector.
[0046] 本例所述步骤 S3为数据分析阶段的步骤, 在该阶段, 本例将通过分析功耗信息 , 确定该用例是不是存在功耗问题。 如果存在功耗问题, 就将该功耗问题记录 下来, 并分析该问题是不是由新的问题触发模式触发的; 如果是由新的问题触 发模式所触发的该功耗问题, 就记录下该问题触发模式, 记录的内容包括了触 发该功耗问题所需的用户输入信息以及运行环境信息; 如果没有识别出功耗问 题或者不是由新的“问题触发模式”触发的问题, 就重启整个检测流程。  [0046] Step S3 in this example is a step in the data analysis phase. At this stage, this example will determine whether the use case has a power consumption problem by analyzing the power consumption information. If there is a power consumption problem, record the power consumption problem and analyze whether the problem is triggered by the new problem trigger mode; if the power consumption problem is triggered by the new problem trigger mode, record the power consumption problem Problem trigger mode. The recorded content includes the user input information and operating environment information required to trigger the power consumption problem. If no power consumption problem is identified or the problem is not triggered by the new "problem trigger mode", the entire test is restarted. Process.
[0047] 如果在所述步骤 S3中没有识别出功耗问题或者不是由新的问题触发模式所触发 的问题, 优选为自动重启整个检测流程, 即返回步骤 S1, 便于实时监测移动应 用的运行状态。  [0047] If no power consumption problem or a problem not triggered by the new problem trigger mode is identified in step S3, it is preferred to automatically restart the entire detection process, that is, return to step S1 to facilitate real-time monitoring of the running status of the mobile application .
[0048] 如图 2所示, 本例所述步骤 S301中, 分析所述移动应用在所述测试输入和运行 环境参数下的功耗信息包括分析锁屏状态阶段 (PRE-OFF) 、 开启屏幕阶段 (I DLE) 、 应用运行阶段 (EXECUTION) 、 置于后台阶段 (BACKGROUND) 以 及息屏待机状态阶段 (SCREEN-OFF) 共五个阶段的功耗信息, 然后通过判断 所述五个阶段的功耗信息是否分别满足预设功耗范围, 进而判断是否存在功耗 问题。  [0048] As shown in FIG. 2, in step S301 in the example, analyzing the power consumption information of the mobile application under the test input and operating environment parameters includes analyzing a lock screen state (PRE-OFF) and turning on the screen. Phase (I DLE), application operation phase (EXECUTION), placed in the background phase (BACKGROUND) and the screen standby state phase (SCREEN-OFF) a total of five phases of power consumption information, and then judge the power of the five phases Whether the power consumption information respectively meets a preset power consumption range, and then determine whether there is a power consumption problem.
[0049] 本例所述锁屏状态阶段也称 PRE-OFF, 是指手机处于锁屏状态的阶段。 当用户 开启屏幕时, 手机进入 IDLE阶段, 即开启屏幕阶段。 当用户打开目标应用并在 相应的运行环境下以相应的用户输入运行该应用时, 便进入 EXECUTION阶段, 即应用运行阶段。 在 EXECUTION阶段后, 我们通过输入“HOME”键将应用置于 后台, 此时, 测试用例进入了 BACKGROUND阶段, 即置于后台阶段。 当屏幕 经过一段待机状态, 自动息屏, 息屏后用例进入最后一个阶段, SCREEN-OFF 阶段, 即息屏待机状态阶段。  [0049] The lock screen state phase in this example is also referred to as PRE-OFF, which refers to the stage where the mobile phone is in the lock screen state. When the user turns on the screen, the phone enters the IDLE phase, that is, the screen phase is turned on. When the user opens the target application and runs the application with corresponding user input under the corresponding running environment, the user enters the EXECUTION phase, that is, the application running phase. After the EXECUTION phase, we put the application in the background by entering the "HOME" key. At this time, the test case entered the BACKGROUND phase, which is the background phase. When the screen goes through a standby state, the screen is automatically screened. After the screen is closed, the use case enters the final phase, the SCREEN-OFF phase, which is the screen standby mode.
[0050] 本例把测试用例分为五个阶段是为了帮助我们识别出三类功耗问题: 前台运行 问题、 后台运行问题和无睡眠问题。  [0050] This example divides the test cases into five stages to help us identify three types of power consumption problems: foreground operation problems, background operation problems, and no sleep problems.
[0051] 为了识别出前台运行问题, 本例把每个应用的所有测试用例的耗电量看作正态 分布, 将大于平均耗电量两个标准差的测试用例标注为可能存在功耗问题的用 例。 最后, 本例通过分析这些测试用例, 确定他们是否真的有功耗问题。 [0051] In order to identify the foreground operation problem, this example considers the power consumption of all test cases of each application as a normal distribution, and marks test cases that are two standard deviations larger than the average power consumption as possible power consumption problems. Use example. Finally, this example analyzes these test cases to determine if they really have power issues.
[0052] 也就是说, 所述预设功耗范围设置为所述移动应用的测试用例的耗电正态分布 , 通过判断所述五个阶段的功耗信息是否与所述耗电正态分布相符合, 若否则 判断为存在前台运行的功耗问题。  [0052] That is, the preset power consumption range is set to a normal distribution of power consumption of the test case of the mobile application, and by determining whether the power consumption information of the five stages is consistent with the normal distribution of power consumption It is consistent, if otherwise, it is determined that there is a power consumption problem in the foreground operation.
[0053] 本例通过分析所述开启屏幕阶段的平均功耗和所述置于后台阶段的平均功耗之 间的关系来判断是否存在后台运行的功耗问题, 若所述置于后台阶段的平均功 耗比所述开启屏幕阶段的平均功耗高 40%以上, 则判定为存在后台运行的功耗问 题。 在实际应用中, 40%这个数值可以根据客户的需求进行适应性调整, 比如调 整为用户自定义设置的第一功耗阈值, 当所述置于后台阶段的平均功耗比所述 开启屏幕阶段的平均功耗高达第一功耗阈值, 则判定为存在后台运行的功耗问 题。  [0053] This example determines whether there is a power consumption problem running in the background by analyzing the relationship between the average power consumption in the screen-on stage and the average power consumption in the background stage. If the average power consumption is more than 40% higher than the average power consumption in the screen-on phase, it is determined that there is a power consumption problem running in the background. In practical applications, the value of 40% can be adaptively adjusted according to customer needs, such as the first power consumption threshold set by the user. When the average power consumption in the background stage is greater than the screen opening stage, If the average power consumption is as high as the first power consumption threshold, it is determined that there is a power consumption problem running in the background.
[0054] 本例通过分析所述息屏待机状态阶段的平均功耗和所述锁屏状态阶段的平均功 耗之间的关系来判断是否存在后台运行的功耗问题, 若所述息屏待机状态阶段 的平均功耗比所述锁屏状态阶段的平均功耗高 50%以上, 则判定为所述移动应用 存在无睡眠的功耗问题。 在实际应用中, 50%这个数值可以根据客户的需求进行 适应性调整, 比如调整为用户自定义设置的第二功耗阈值, 当所述息屏待机状 态阶段的平均功耗比所述锁屏状态阶段的平均功耗高达第二功耗阈值, 则判定 为存在无睡眠的功耗问题。  [0054] This example determines whether there is a power consumption problem running in the background by analyzing the relationship between the average power consumption in the screen-standby state phase and the average power consumption in the lock-screen state phase. When the average power consumption in the state phase is more than 50% higher than the average power consumption in the lock screen state phase, it is determined that the mobile application has a power consumption problem without sleep. In practical applications, this value of 50% can be adaptively adjusted according to customer needs, such as a second power consumption threshold set by the user. When the average power consumption during the standby state of the screen is greater than the lock screen, If the average power consumption in the state phase is as high as the second power consumption threshold, it is determined that there is a power consumption problem without sleep.
[0055] 本例还提供一种移动应用的功耗检测系统, 采用了如上所述的移动应用的功耗 检测方法。  [0055] This example also provides a power consumption detection system for a mobile application, which uses the power consumption detection method for a mobile application as described above.
[0056] 综上, 本例通过生成所述测试输入和运行环境参数进而模拟出网络部件出现故 障等特殊的运行环境, 进而在这种特殊的运行环境下运行和测试移动应用, 能 够发现更多的隐藏较深的功耗问题; 经测试发现, 本发明所检测出来的 84%的功 耗问题是现有技术所没有检测出来的, 而修复这些功耗问题, 可以将手机等智 能终端的电池续航时间延长至大约为现有技术的两倍左右。  [0056] In summary, this example simulates a special operating environment such as a network component failure by generating the test inputs and operating environment parameters, and then running and testing mobile applications in this special operating environment can find more Hidden deeper power consumption problems; after testing, it is found that 84% of the power consumption problems detected by the present invention are not detected by the prior art, and repairing these power consumption problems can replace the battery of smart terminals such as mobile phones The battery life is extended to about twice that of the prior art.
[0057] 以上内容是结合具体的优选实施方式对本发明所作的进一步详细说明, 不能认 定本发明的具体实施只局限于这些说明。 对于本发明所属技术领域的普通技术 人员来说, 在不脱离本发明构思的前提下, 还可以做出若干简单推演或替换, 都应当视为属于本发明的保护范围。 [0057] The above content is a further detailed description of the present invention in combination with specific preferred embodiments, and it cannot be considered that the specific implementation of the present invention is limited to these descriptions. For those of ordinary skill in the technical field to which the present invention pertains, without deviating from the concept of the present invention, several simple deductions or replacements can also be made. All should be regarded as belonging to the protection scope of the present invention.

Claims

权利要求书 Claim
[权利要求 1] 一种移动应用的功耗检测方法, 其特征在于, 包括以下步骤:  [Claim 1] A method for detecting power consumption of a mobile application, comprising the following steps:
步骤 S1, 生成测试输入和运行环境参数;  Step S1, generating test inputs and operating environment parameters;
步骤 S2, 在所述测试输入和运行环境参数下运行移动应用, 同时收集 所述移动应用在所述测试输入和运行环境参数下的功耗信息; 步骤 S3 , 分析功耗信息以识别是否存在功耗问题; 其中, 所述步骤 S1中, 所述测试输入和运行环境参数为无线信号被屏 蔽状态下的参数; 所述无线信号被屏蔽的状态包括网络故障状态和飞 行模式状态。  Step S2: Run the mobile application under the test input and operating environment parameters, and collect power consumption information of the mobile application under the test input and operating environment parameters; Step S3, analyze power consumption information to identify whether power exists Power consumption problem; wherein, in the step S1, the test input and operating environment parameters are parameters in a state where the wireless signal is shielded; the state where the wireless signal is shielded includes a network fault state and a flight mode state.
[权利要求 2] 根据权利要求 1所述的移动应用的功耗检测方法, 其特征在于, 所述 步骤 S1中, 通过随机或是问题触发模式生成测试输入和运行环境参数  [Claim 2] The method for detecting power consumption of a mobile application according to claim 1, wherein in step S1, a test input and a running environment parameter are generated by a random or a problem trigger mode.
[权利要求 3] 根据权利要求 2所述的移动应用的功耗检测方法, 其特征在于, 通过 自动生成随机的用户输入序列来生成测试输入和运行环境参数, 所述 用户输入序列包括触屏和划屏所对应的输入序列。 [Claim 3] The method for detecting power consumption of a mobile application according to claim 2, wherein a test input and a running environment parameter are generated by automatically generating a random user input sequence, and the user input sequence includes a touch screen and The input sequence corresponding to the swipe.
[权利要求 4] 根据权利要求 2所述的移动应用的功耗检测方法, 其特征在于, 所述 问题触发模式包括旅行定位后台运行触发模式、 浏览器后台运行触发 模式和多媒体播放故障触发模式中的至少一种。  [Claim 4] The method for detecting power consumption of a mobile application according to claim 2, wherein the problem trigger mode includes a travel positioning background operation trigger mode, a browser background operation trigger mode, and a multimedia playback fault trigger mode. At least one.
[权利要求 5] 根据权利要求 1至 4任意一项所述的移动应用的功耗检测方法, 其特征 在于, 所述步骤 S3包括以下子步骤:  [Claim 5] The power consumption detection method for a mobile application according to any one of claims 1 to 4, wherein the step S3 includes the following sub-steps:
步骤 S301, 分析所述移动应用在所述测试输入和运行环境参数下的功 耗信息, 并判断是否存在功耗问题, 若否则返回步骤 S1, 若是则跳转 至步骤 S302;  Step S301, analyzing the power consumption information of the mobile application under the test input and operating environment parameters, and determining whether there is a power consumption problem, if not, return to step S1, and if yes, skip to step S302;
步骤 S302, 记录所述功耗问题, 并分析和判断所述功耗问题是否属于 新的问题触发模式, 若否则返回步骤 S1, 若是则跳转至步骤 S303 ; 步骤 S303 , 将所述功耗问题记录至所述问题触发模式中。  Step S302, recording the power consumption problem, and analyzing and judging whether the power consumption problem belongs to a new problem trigger mode, if not, return to step S1, and if yes, go to step S303; step S303, the power consumption problem Record to the problem trigger mode.
[权利要求 6] 根据权利要求 5所述的移动应用的功耗检测方法, 其特征在于, 所述 步骤 S301中, 分析所述移动应用在所述测试输入和运行环境参数下的 功耗信息包括分析锁屏状态阶段、 开启屏幕阶段、 应用运行阶段、 置 于后台阶段以及息屏待机状态阶段共五个阶段的功耗信息, 然后通过 判断所述五个阶段的功耗信息是否分别满足预设功耗范围, 进而判断 是否存在功耗问题。 [Claim 6] The method for detecting power consumption of a mobile application according to claim 5, characterized in that, in the step S301, analyzing the mobile application under the test input and operating environment parameters The power consumption information includes analyzing power consumption information in five phases including the lock screen state phase, the screen opening phase, the application running phase, the background phase and the screen standby status phase, and then determining whether the power consumption information of the five phases is The preset power consumption ranges are respectively satisfied, and then it is determined whether there is a power consumption problem.
[权利要求 7] 根据权利要求 6所述的移动应用的功耗检测方法, 其特征在于, 所述 预设功耗范围设置为所述移动应用的测试用例的耗电正态分布, 通过 判断所述五个阶段的功耗信息是否与所述耗电正态分布相符合, 若否 则判断为存在前台运行的功耗问题。  [Claim 7] The method for detecting power consumption of a mobile application according to claim 6, wherein the preset power consumption range is set to a normal distribution of power consumption of a test case of the mobile application, Whether the power consumption information of the five stages described is consistent with the normal distribution of power consumption; if otherwise, it is determined that there is a power consumption problem running in the foreground.
[权利要求 8] 根据权利要求 6所述的移动应用的功耗检测方法, 其特征在于, 通过 分析所述开启屏幕阶段的平均功耗和所述置于后台阶段的平均功耗之 间的关系来判断是否存在后台运行的功耗问题, 若所述置于后台阶段 的平均功耗比所述开启屏幕阶段的平均功耗高 40%以上, 则判定为存 在后台运行的功耗问题。  [Claim 8] The power consumption detection method for a mobile application according to claim 6, characterized by analyzing the relationship between the average power consumption in the screen-on stage and the average power consumption in the background stage To determine whether there is a power consumption problem in the background operation, if the average power consumption in the background phase is more than 40% higher than the average power consumption in the screen-on phase, it is determined that there is a power consumption problem in the background operation.
[权利要求 9] 根据权利要求 6所述的移动应用的功耗检测方法, 其特征在于, 通过 分析所述息屏待机状态阶段的平均功耗和所述锁屏状态阶段的平均功 耗之间的关系来判断是否存在后台运行的功耗问题, 若所述息屏待机 状态阶段的平均功耗比所述锁屏状态阶段的平均功耗高 50%以上, 则 判定为所述移动应用存在无睡眠的功耗问题。  [Claim 9] The method for detecting power consumption of a mobile application according to claim 6, characterized in that, by analyzing the average power consumption in the standby state phase of the screen and the average power consumption in the lock screen phase To determine whether there is a power consumption problem running in the background. If the average power consumption in the standby state phase of the screen is more than 50% higher than the average power consumption in the lock screen phase, it is determined that the mobile application has no power consumption. Sleep power issues.
[权利要求 10] 一种移动应用的功耗检测系统, 其特征在于, 采用了如权利要求 1至 9 任意一项所述的移动应用的功耗检测方法。  [Claim 10] A power consumption detection system for a mobile application, characterized by using the power consumption detection method for a mobile application according to any one of claims 1 to 9.
PCT/CN2019/073516 2018-06-13 2019-01-28 Method and system for detecting power consumption of mobile application WO2019237751A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810606865.0 2018-06-13
CN201810606865.0A CN108829598B (en) 2018-06-13 2018-06-13 A kind of consumption detection method and system of mobile application

Publications (1)

Publication Number Publication Date
WO2019237751A1 true WO2019237751A1 (en) 2019-12-19

Family

ID=64145049

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/073516 WO2019237751A1 (en) 2018-06-13 2019-01-28 Method and system for detecting power consumption of mobile application

Country Status (2)

Country Link
CN (1) CN108829598B (en)
WO (1) WO2019237751A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108829598B (en) * 2018-06-13 2019-11-29 深圳大学 A kind of consumption detection method and system of mobile application

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103179241A (en) * 2013-03-08 2013-06-26 百度在线网络技术(北京)有限公司 Method and system for automatically testing power consumption of mobile terminal
CN105373482A (en) * 2015-12-23 2016-03-02 北京金山安全软件有限公司 Method and device for detecting abnormal power consumption of application program and electronic equipment
CN105512041A (en) * 2015-12-23 2016-04-20 北京金山安全软件有限公司 Method and device for testing application program performance and electronic equipment
CN106569942A (en) * 2015-10-08 2017-04-19 阿里巴巴集团控股有限公司 Test method and apparatus
CN106681916A (en) * 2016-12-20 2017-05-17 广东小天才科技有限公司 Method, device and system for testing application power consumption
CN108829598A (en) * 2018-06-13 2018-11-16 深圳大学 A kind of consumption detection method and system of mobile application

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9569876B2 (en) * 2006-12-21 2017-02-14 Brian Mark Shuster Animation control method for multiple participants
CN102999419B (en) * 2011-09-13 2016-03-16 百度在线网络技术(北京)有限公司 A kind of Android test incident record back method and device
CN103516559A (en) * 2012-12-13 2014-01-15 Tcl集团股份有限公司 Method and system for testing application compatibility of intelligent terminal
CN103475790B (en) * 2013-09-06 2016-03-30 中国科学院计算技术研究所 A kind of intelligent mobile terminal power consumption management
CN105159816B (en) * 2015-08-04 2018-11-16 广东欧珀移动通信有限公司 A kind of method, mobile terminal and system reducing equipment power dissipation
CN107305516A (en) * 2016-04-18 2017-10-31 展讯通信(上海)有限公司 Terminal power consumption method of testing and device
CN205942334U (en) * 2016-08-09 2017-02-08 深圳大学 Consumption detection device and system
CN106771562B (en) * 2017-02-23 2019-10-18 上海与德信息技术有限公司 A kind of power consumption test method and device of terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103179241A (en) * 2013-03-08 2013-06-26 百度在线网络技术(北京)有限公司 Method and system for automatically testing power consumption of mobile terminal
CN106569942A (en) * 2015-10-08 2017-04-19 阿里巴巴集团控股有限公司 Test method and apparatus
CN105373482A (en) * 2015-12-23 2016-03-02 北京金山安全软件有限公司 Method and device for detecting abnormal power consumption of application program and electronic equipment
CN105512041A (en) * 2015-12-23 2016-04-20 北京金山安全软件有限公司 Method and device for testing application program performance and electronic equipment
CN106681916A (en) * 2016-12-20 2017-05-17 广东小天才科技有限公司 Method, device and system for testing application power consumption
CN108829598A (en) * 2018-06-13 2018-11-16 深圳大学 A kind of consumption detection method and system of mobile application

Also Published As

Publication number Publication date
CN108829598B (en) 2019-11-29
CN108829598A (en) 2018-11-16

Similar Documents

Publication Publication Date Title
US11563663B2 (en) Methods and apparatus to credit background applications
US9292685B2 (en) Techniques for autonomic reverting to behavioral checkpoints
Kim et al. Detecting energy-greedy anomalies and mobile malware variants
US9244682B2 (en) Idle detection
US9916442B2 (en) Real-time recording and monitoring of mobile applications
CA2547708A1 (en) System and method for privilege management and revocation
US9910766B2 (en) Whitebox network fuzzing
CN105491054A (en) Method and apparatus for determining malicious access, and method and apparatus for intercepting malicious access
CN109726821B (en) Data equalization method and device, computer readable storage medium and electronic equipment
US20200136988A1 (en) Resource optimization and update method, server, and device
CN105160251A (en) Analysis method and device of APK (Android Packet) application software behavior
CN113903389A (en) Slow disk detection method and device and computer readable and writable storage medium
US20100083375A1 (en) Detection accuracy tuning for security
US20210120015A1 (en) DYNAMIC DETECTION OF HTTP-BASED DDoS ATTACKS USING ESTIMATED CARDINALITY
WO2019237751A1 (en) Method and system for detecting power consumption of mobile application
CN103618786A (en) Playing error processing method and server
CN107819944A (en) Delet method, device, equipment and the storage medium of short message
TW201626228A (en) System and method for detecting abnormal power consumption during standby
CN114297017A (en) Exception handling method and device, electronic equipment and storage medium
US10853462B2 (en) Authorizing file access with user I/O and hardware usage patterns
CN110601905A (en) Fault detection method and device
CN106251371A (en) Black frame detection method and device
JPWO2019229883A1 (en) Inspection device, inspection method, and inspection program
Chao et al. Research on Personal Privacy Security Detection Technology for Android Application
CN111274585B (en) Method, device, equipment and medium for detecting unauthorized vulnerability of Web application

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: 19820093

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: 19820093

Country of ref document: EP

Kind code of ref document: A1