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

A method and device for counting power consumption of Android applications

A statistical method and Android technology, applied in the computer field, can solve problems such as inability to access power statistics related information, abnormal reminders, and cumbersome operation processes

Active Publication Date: 2019-03-08
BEIJING QIHOO TECH CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Now for systems below Android 4.4, you can extract the power consumption mechanism code of Android itself, and more accurately count the power consumption of each APP, but for Android 4.4 and above systems, they all have authority verification, including power consumption Statistical information has been authorized. For non-system access, an exception will be reminded, so it is impossible to access power statistics related information. At present, the power consumption statistics scheme commonly used by various APP power consumption statistics software is based on the CPU usage of each APP from startup to the current moment. time and occupied memory to build an empirical value algorithm, but the accuracy of the power consumption statistics of this solution is not high, and the operation process is relatively cumbersome

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
  • A method and device for counting power consumption of Android applications
  • A method and device for counting power consumption of Android applications
  • A method and device for counting power consumption of Android applications

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0060] refer to figure 1 , which shows a flow chart of the steps of an embodiment of a method for counting power consumption of Android applications according to an embodiment of the present invention, which may specifically include the following steps:

[0061]In step 110, the first process accesses the system power consumption service for an application, and triggers a call to a permission verification function.

[0062] The applications (APP, Application) include applications that can run in the Android system, such as 360 Security Guard, 360 Security Browser, and the like.

[0063] The existing Android system itself has a power consumption service, which can separately count the power consumption of each hardware component by each application in the system in real time. The Android power consumption service will read the power consumption of each hardware component, and then record it in the power_profile.xml configuration file. This configuration file stipulates in the A...

Embodiment 2

[0086] refer to figure 2 , which shows a flow chart of the steps of an embodiment of a method for counting power consumption of Android applications according to an embodiment of the present invention, which may specifically include the following steps:

[0087] Step 210, inject the hook function into the first process, and register the private class with the system.

[0088] In the embodiment of the present invention, the hook function is used to intercept the authority verification result returned by the authority verification function, and at the same time execute the logical process of returning the authority verification result indicating that the verification has passed to the system. Therefore, the embodiment of the present invention needs to inject the hook function into each first process first.

[0089] In the embodiment of the present invention, in order to record the power consumption of different APPs respectively, a private class can be registered in the Androi...

Embodiment 3

[0131] refer to image 3 , which shows a structural block diagram of an embodiment of an Android application power consumption statistics device according to an embodiment of the present invention, which may specifically include the following modules:

[0132] The triggering module 310 is adapted to allow the first process to access the system power consumption service for an application, and trigger the calling of the authority verification function.

[0133] The interception module 320 is adapted to intercept calls to the authority verification function through a hook function.

[0134] The power consumption obtaining module 330 is adapted to call a preset private class of power consumption statistics to obtain the power consumption of the application.

[0135] In the embodiment of the present invention, the first process can access the system power consumption service for an application, trigger the call to the permission verification function, and intercept the call to th...

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 embodiment of the invention provides an Android application electricity consumption statistics method, and relates to the technical field of a computer. The method comprises the following steps of accessing system electricity consumption service by a first process by aiming at an application, and triggering the calling for a permission validation function; intercepting the calling for the permission validation function through a hook function; and calling a preset electricity consumption private class, and obtaining the electricity consumption quantity of the application. The method solves the problems that in the prior art, the electricity consumption information of each application in Android 4.4 systems or higher systems cannot be accessed; the precision of the common use electricity consumption statistics scheme is not high; and the operation is complicated, and the like. The method has the beneficial effects that the electricity consumption information of each application in the Android systems including the Android 4.4 systems or higher systems in any version can be obtained; the operation is fast and convenient; and the accuracy of the obtained electricity consumption is improved.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a method for counting power consumption of Android applications and a device for counting power consumption of Android applications. Background technique [0002] With the development of smartphones, various systems supporting smartphones have emerged. Such as Android (Android) system. Android is an open source operating system based on Linux, which is mainly used in mobile terminals such as mobile phones. Android platform consists of operating system, middleware, user interface and application software. [0003] As the market share of the Android system increases, more and more developers develop APPs (Applications) based on the Android system, making it more convenient for users to use Android phones. [0004] For developers, it is necessary to count the power consumption of each APP, so as to further improve the performance of the corresponding APP. Now for syste...

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 BEIJING QIHOO TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More