Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for detecting power consumption of functions in mobile terminal applications

A mobile terminal and application technology, applied in error detection/correction, electrical digital data processing, climate sustainability, etc., can solve the problem of deviation in power data, inaccurate power data, and inability to locate application code or corresponding functions and other issues to achieve the effect of easy implementation and improved accuracy

Active Publication Date: 2020-04-28
TENCENT TECH (SHENZHEN) CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The existing technology for detecting the power consumption of applications can be completed by hardware, that is, connect the mobile terminal to a power monitor (PM for short), run the app on the mobile terminal, and the power monitor can display the power of the mobile terminal in real time Consumption, this detection method is relatively simple, and can detect the total power consumption of the mobile terminal in a fixed scene, but if a scene with high power is encountered, this method cannot locate the specific code or corresponding function of the application, and, If the specific function is called concurrently through multiple threads, the power data obtained by the power detector will be inaccurate
[0004] In addition, when using the above method to test the power consumption of the app in the Android mobile phone, you need to have Root authority. For the Android application to be tested, you need to know the specific class (class) and function name (method) in order to pass the script to the specific function. The execution time period is recorded, which increases the difficulty of detection, and the detected power data is biased

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for detecting power consumption of functions in mobile terminal applications
  • Method and device for detecting power consumption of functions in mobile terminal applications
  • Method and device for detecting power consumption of functions in mobile terminal applications

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0029] The present invention provides a method for detecting the power consumption of a function in an application program of a mobile terminal. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and, although A logical order is shown in the flowcharts, but in some cases the steps shown or described may be performed in an order different from that shown or described herein.

[0030] The overall test environment of the embodiment of the present invention is as follows:

[0031] A device for obtaining power data of mobile terminals. The device can be a power monitor (PowerMonitor, PM for short). The power monitor can supply power to any mobile device with a power supply voltage less than 4V, and can be combined with its own monitoring software. During the power supply process, the power data of the mobile device is monitored within a specified period of time...

Embodiment 2

[0053] Figure 4 It is a flow chart of the method for detecting power consumption of a function in this embodiment, and the method will be described in detail below in conjunction with specific test products and test scenarios.

[0054] The test product is the mobile phone security application SafeTest.apk, which is used to conduct security scans on the applications on the mobile phone and determine whether there are risks in the application (calculate the MD5 value of all applications, and then send the MD5 to the server to check whether it is a dangerous application). The application has a specific function APKsMD5Cal(), which is used to calculate the MD5 value of all installed applications in the mobile phone.

[0055] Test scenario: install 50 apps on an android phone, run SafeTest.apk, and scan all the apps, assuming that the scan takes 30 seconds.

[0056] The methods include:

[0057] S401. Establish a time axis with a certain moment as a starting point.

[0058] Spe...

Embodiment 3

[0073] Figure 5 It is a flow chart of the function power consumption detection method of this embodiment, and the method includes:

[0074] S501. Acquire power data of the mobile terminal within a preset time period, and monitor the start execution time and end execution time of functions in the application program within the preset time period.

[0075] Specifically, a preset time period is predetermined, the power data of the mobile terminal within the preset time period is acquired, and the start execution time and end execution time of the function in the application program are monitored within the preset time period. Wherein, the preset time period includes at least a specific starting moment and a time length.

[0076] S502. Establish a time axis.

[0077] Specifically, a time axis is established with 0 as the starting point.

[0078] S503. Load the power data onto the time axis.

[0079] Since the time axis starts from 0, the time point in the power data can corre...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the technical field of application program power consumption detection, in particular to a method and device for detecting power consumption of a function in a mobile terminal application program. The method comprises the steps that electric quantity data of a mobile terminal in a preset time period is obtained, and a starting execution moment and a finishing execution moment of the function in the mobile terminal application program in the preset time period are monitored; according to the positions corresponding to the electric quantity data, the starting execution moment and the finishing execution moment on a time axis, the power consumption of the function in the time period from the starting execution moment and the finishing execution moment is determined. Under the situation that an application program to be detected is not modified or recompiled, detection of the power consumption of a specific function in the application program at the angle of third party is achieved.

Description

technical field [0001] The invention relates to the technical field of power consumption detection of application programs, in particular to a method and device for detecting power consumption of functions in mobile terminal application programs. Background technique [0002] With the development of mobile terminals, the number of APP applications has increased sharply. While application software brings convenience to users, it has become a headache for users due to more and more power consumption. [0003] The existing technology for detecting the power consumption of applications can be completed by hardware, that is, connect the mobile terminal to a power monitor (PM for short), run the app on the mobile terminal, and the power monitor can display the power of the mobile terminal in real time Consumption, this detection method is relatively simple, and can detect the total power consumption of the mobile terminal in a fixed scene, but if a scene with high power is encount...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/30
CPCG06F11/3062Y02D10/00
Inventor 王玥陈珊珊
Owner TENCENT TECH (SHENZHEN) CO LTD