Movatterモバイル変換


[0]ホーム

URL:


CN104516806B - The testing result methods of exhibiting and system of the power consumption information of mobile terminal - Google Patents

The testing result methods of exhibiting and system of the power consumption information of mobile terminal
Download PDF

Info

Publication number
CN104516806B
CN104516806BCN201410832106.8ACN201410832106ACN104516806BCN 104516806 BCN104516806 BCN 104516806BCN 201410832106 ACN201410832106 ACN 201410832106ACN 104516806 BCN104516806 BCN 104516806B
Authority
CN
China
Prior art keywords
power consumption
program
mobile terminal
power
consumption information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410832106.8A
Other languages
Chinese (zh)
Other versions
CN104516806A (en
Inventor
王胜
晁沛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co LtdfiledCriticalBeijing Qihoo Technology Co Ltd
Priority to CN201410832106.8ApriorityCriticalpatent/CN104516806B/en
Publication of CN104516806ApublicationCriticalpatent/CN104516806A/en
Application grantedgrantedCritical
Publication of CN104516806BpublicationCriticalpatent/CN104516806B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明实施例提供了一种移动终端的耗电信息的检测结果展示方法及系统,所述方法包括:获得所述移动终端的操作系统的系统权限;在所述系统权限下从所述操作系统获取电池状态服务所记录的数据;从获取的数据中,提取出所述移动终端的各程序的耗电信息;将所述各程序依照各自的耗电信息进行排序后,将排序结果进行展示。本发明的技术方案中,利用系统权限获取电池状态服务所记录的数据,从中提取出移动终端的各程序的耗电信息,并排序展示给用户。从而使得用户在使用高版本的操作系统时,仍然可以有效地获知比较耗电的程序,加以省电优化,以延长移动终端的续航时间,提高用户的体验。

Embodiments of the present invention provide a method and system for displaying detection results of power consumption information of a mobile terminal. The method includes: obtaining the system authority of the operating system of the mobile terminal; Acquiring the data recorded by the battery status service; extracting the power consumption information of each program of the mobile terminal from the acquired data; sorting the programs according to their respective power consumption information, and displaying the sorting results. In the technical solution of the present invention, the data recorded by the battery status service is obtained by using the system authority, from which the power consumption information of each program of the mobile terminal is extracted, and displayed to the user in sequence. Therefore, when the user is using a high-version operating system, he can still effectively learn about relatively power-consuming programs, and perform power-saving optimization, so as to prolong the battery life of the mobile terminal and improve user experience.

Description

Translated fromChinese
移动终端的耗电信息的检测结果展示方法及系统Method and system for displaying detection results of power consumption information of mobile terminals

技术领域technical field

本发明涉及移动终端领域,具体而言,本发明涉及移动终端的耗电信息的检测结果展示方法及系统。The present invention relates to the field of mobile terminals, in particular, the present invention relates to a method and system for displaying detection results of power consumption information of mobile terminals.

背景技术Background technique

随着通信技术和计算机技术的发展,移动终端中安装运行的程序的数量越来越多,而移动终端中的移动电源(例如电池)的容量增加有限,远远跟不上移动终端中程序增加的速率;使用过多的程序容易导致移动电源的电量加速消耗,缩短了移动终端的续航时间,导致用户需要频繁为移动电源充电。因此,有必要关闭冗余的或者耗电量较大的等程序,以降低移动电源的耗电速率,降低充电频率,延长移动终端的续航时间。With the development of communication technology and computer technology, the number of programs installed and running in mobile terminals is increasing, and the capacity of mobile power sources (such as batteries) in mobile terminals has limited increase, which cannot keep up with the increase in programs in mobile terminals. The rate; using too many programs will easily lead to accelerated power consumption of the mobile power supply, shortening the battery life of the mobile terminal, and causing users to frequently charge the mobile power supply. Therefore, it is necessary to close redundant or large power consumption programs to reduce the power consumption rate of the mobile power supply, reduce the charging frequency, and prolong the battery life of the mobile terminal.

目前,现有的解决方法通常是第三方应用程序从操作系统的存放有移动终端运行数据的系统文件中,直接读取各程序的耗电信息,例如单位时间耗电量、运行时间、唤醒次数等;将获取的各程序的耗电信息进行排列后,将排列后的各耗电信息对应各自的程序构成耗电排行榜进行显示;以供用户刷选出耗电量较大的程序后,进行关闭、禁止自行启动或者卸载等操作;从而降低移动终端的电量消耗,延长移动终端的续航时间。At present, the existing solution is usually that the third-party application program directly reads the power consumption information of each program from the system file of the operating system that stores the operating data of the mobile terminal, such as power consumption per unit time, running time, and wake-up times. etc.; after arranging the acquired power consumption information of each program, display the power consumption ranking list of each power consumption information corresponding to each program; for the user to swipe and select the program with larger power consumption, Perform operations such as shutting down, prohibiting self-starting, or uninstalling; thereby reducing the power consumption of the mobile terminal and extending the battery life of the mobile terminal.

然而,本发明的发明人发现,随着移动终端中的操作系统的升级,第三方应用程序,无法从很多高版本的操作系统(例如安卓4.4系统)的系统文件中直接读取数据,只能对移动终端当前运行的程序所占用的处理器的处理时间、以及内存的空间大小进行统计;将统计结果作为该程序的耗电量,进而进行排行展示。显然,这种方法无法获取当前没有运行的程序的耗电量,造成展示给用户的程序的耗电量较为偏面,很容易让用户误解为:未运行的程序比较省电,而运行中的程序比较耗电;从而无法有效地引导用户进行省电优化;从而导致移动终端的续航时间大大降低,降低了用户的体验。However, the inventors of the present invention have found that with the upgrade of the operating system in the mobile terminal, the third-party application program cannot directly read data from the system files of many high-version operating systems (such as Android 4.4 system), and can only The processing time of the processor and the size of the memory space occupied by the program currently running on the mobile terminal are counted; the statistical results are used as the power consumption of the program, and then the ranking is displayed. Obviously, this method cannot obtain the power consumption of programs that are not currently running, resulting in a biased power consumption of programs displayed to the user. It is easy for users to misunderstand that programs that are not running are more power-efficient, while running programs The program consumes more power; thus, the user cannot be effectively guided to optimize power saving; thus, the battery life of the mobile terminal is greatly reduced, and the user experience is reduced.

因此,有必要提供一种移动终端的耗电信息的检测结果展示方法及系统,使得用户在对移动终端的操作系统进行升级后,仍然可以有效地获知比较耗电的程序,加以省电优化,以延长移动终端的续航时间,提高用户的体验。Therefore, it is necessary to provide a method and system for displaying detection results of power consumption information of a mobile terminal, so that after upgrading the operating system of the mobile terminal, the user can still effectively know the programs that consume more power, and optimize power saving. In order to prolong the battery life of the mobile terminal and improve user experience.

发明内容Contents of the invention

本发明针对现有技术方案的缺点,提出一种移动终端的耗电信息的检测结果展示方法和系统,用以解决移动终端的操作系统进行升级后无法获取移动终端的耗电信息的问题。Aiming at the shortcomings of the existing technical solutions, the present invention proposes a detection result display method and system of power consumption information of a mobile terminal to solve the problem that the power consumption information of the mobile terminal cannot be obtained after the operating system of the mobile terminal is upgraded.

本发明根据一个方面,提供了一种移动终端的耗电信息的检测结果展示方法,包括:According to one aspect, the present invention provides a method for displaying detection results of power consumption information of a mobile terminal, including:

获得所述移动终端的操作系统的系统权限;obtaining the system authority of the operating system of the mobile terminal;

在所述系统权限下从所述操作系统获取电池状态服务所记录的数据;Obtaining the data recorded by the battery status service from the operating system under the system authority;

从获取的数据中,提取出所述移动终端的各程序的耗电信息;Extracting power consumption information of each program of the mobile terminal from the acquired data;

将所述各程序依照各自的耗电信息进行排序后,将排序结果进行展示。After sorting the programs according to their power consumption information, the sorting results are displayed.

较佳地,所述从所述操作系统获取电池状态服务所记录的数据,具体包括:Preferably, the obtaining the data recorded by the battery status service from the operating system specifically includes:

创建一个基于系统权限的进程;Create a process based on system privileges;

由所述进程读取所述电池状态服务所记录的数据后,存储到电量数据库中;以及After the data recorded by the battery status service is read by the process, it is stored in the power database; and

所述从获取的数据中,提取出所述移动终端的各程序的耗电信息,具体包括:The extracting the power consumption information of each program of the mobile terminal from the acquired data specifically includes:

从所述电量数据库的数据中,提取出所述移动终端的各程序的耗电信息。The power consumption information of each program of the mobile terminal is extracted from the data in the power database.

较佳地,所述程序的耗电信息具体包括:该程序的单位时间耗电量;以及Preferably, the power consumption information of the program specifically includes: the power consumption per unit time of the program; and

所述将所述各程序依照各自的耗电信息进行排序,具体包括:The ordering of the programs according to their respective power consumption information specifically includes:

根据各程序的耗电信息,统计出每个程序的单位时间耗电量占比;According to the power consumption information of each program, the proportion of power consumption per unit time of each program is calculated;

根据各程序的单位时间耗电量占比的大小,对各程序进行排序;以及Sort each program according to the proportion of power consumption per unit time of each program; and

所述将排序结果进行展示,具体包括:The display of the sorting results includes:

在程序耗电排行榜显示界面中,显示各程序的单位时间耗电量占比。In the display interface of the program power consumption leaderboard, the proportion of power consumption per unit time of each program is displayed.

进一步,在所述统计出每个程序的单位时间耗电量占比后,还包括:Further, after the statistics of the proportion of power consumption per unit time of each program, it also includes:

对于每个程序,根据该程序的单位时间耗电量占比,确定相应的省电策略;For each program, determine the corresponding power saving strategy according to the proportion of power consumption per unit time of the program;

在程序耗电排行榜显示界面中,还显示各程序的省电策略的链接。In the display interface of the program power consumption leaderboard, the links of the power saving policies of each program are also displayed.

较佳地,所述根据该程序的单位时间耗电量占比,确定相应的省电策略,具体包括:Preferably, according to the proportion of power consumption per unit time of the program, the corresponding power saving strategy is determined, specifically including:

根据该程序的单位时间耗电量占比的大小,确定该程序的耗电级别;Determine the power consumption level of the program according to the proportion of power consumption per unit time of the program;

将与该耗电级别对应的省电策略作为所述相应的省电策略。The power saving policy corresponding to the power consumption level is used as the corresponding power saving policy.

较佳地,所述耗电级别具体为耗电超高级别,则与之对应的省电策略具体为卸载;或者,Preferably, the power consumption level is specifically an ultra-high power consumption level, and the corresponding power saving strategy is specifically unloading; or,

所述耗电级别具体为耗电较高级别,则与之对应的省电策略具体为禁止自启;或者,The power consumption level is specifically a higher level of power consumption, and the corresponding power saving strategy is specifically to prohibit self-starting; or,

所述耗电级别具体为耗电一般级别,则与之对应的省电策略具体为建议关闭;或者,The power consumption level is specifically a general power consumption level, and the power saving strategy corresponding to it is specifically recommended to close; or,

所述耗电级别具体为耗电较低级别,则与之对应的省电策略具体为保持现状;或者,The power consumption level is specifically a low power consumption level, and the corresponding power saving strategy is specifically to maintain the status quo; or,

所述耗电级别具体为耗电极低级别,则与之对应的省电策略具体为适合长期运行。The power consumption level is specifically an extremely low power consumption level, and the corresponding power saving strategy is specifically suitable for long-term operation.

进一步,所述耗电信息的检测结果展示方法,还包括:Further, the detection result display method of the power consumption information also includes:

若接收到用户针对所述卸载省电策略的点击事件后,显示该程序的卸载界面;若通过所述卸载界面接收到用户输入的卸载点击事件,则卸载该程序;或者If the click event of the user for the uninstallation power-saving strategy is received, the uninstall interface of the program is displayed; if the uninstall click event input by the user is received through the uninstall interface, the program is uninstalled; or

若接收到用户针对所述禁止自启省电策略的点击事件后,禁止该程序自启,并在所述程序耗电排行榜显示界面中对应该程序显示已禁止。After receiving the user's click event on the prohibition of self-starting power saving policy, the program is prohibited from starting itself, and the program is displayed as prohibited in the program power consumption list display interface.

进一步,所述从获取的数据中,提取出所述移动终端的各程序的耗电信息时,还包括:Further, when extracting the power consumption information of each program of the mobile terminal from the acquired data, it also includes:

从获取的数据中,提取出所述移动终端的各硬件的耗电信息;以及Extracting power consumption information of each hardware of the mobile terminal from the acquired data; and

所述将所述各程序依照各自的耗电信息进行排序时,还包括:When sorting the programs according to their respective power consumption information, it also includes:

将所述各硬件依照各自的耗电信息进行排序。The hardware is sorted according to its power consumption information.

本发明根据另一个方面,还提供了一种移动终端的耗电信息的检测结果展示系统,包括:According to another aspect, the present invention also provides a detection result display system for power consumption information of a mobile terminal, including:

系统权限获取模块,用于获得所述移动终端的操作系统的系统权限;A system authority obtaining module, configured to obtain the system authority of the operating system of the mobile terminal;

服务数据获取模块,用于在所述系统权限获取模块获得的系统权限下,从所述操作系统获取电池状态服务所记录的数据;A service data acquisition module, configured to acquire the data recorded by the battery status service from the operating system under the system authority obtained by the system authority acquisition module;

耗电信息提取模块,用于从所述获取的数据中,提取出所述移动终端的各程序的耗电信息;A power consumption information extraction module, configured to extract the power consumption information of each program of the mobile terminal from the acquired data;

排序展示模块,用于将所述各程序依照各自的耗电信息进行排序后,将排序结果进行展示。The sorting display module is configured to sort the programs according to their respective power consumption information, and then display the sorting results.

较佳地,所述服务数据获取模块具体用于创建一个基于系统权限的进程;由所述进程读取所述电池状态服务所记录的数据后,存储到电量数据库中,并发送数据提取通知;以及Preferably, the service data acquisition module is specifically used to create a process based on system authority; after the process reads the data recorded by the battery status service, store it in the power database, and send a data extraction notification; as well as

所述耗电信息提取模块具体用于接收到所述数据提取通知后,从所述电量数据库的数据中,提取出所述移动终端的各程序的耗电信息。The power consumption information extraction module is specifically configured to extract the power consumption information of each program of the mobile terminal from the data in the power database after receiving the data extraction notification.

本发明的技术方案中,利用系统权限获取电池状态服务所记录的数据,从中提取出移动终端的各程序的耗电信息,并排序展示给用户。从而使得用户在使用高版本的操作系统时,仍然可以有效地获知比较耗电的程序,加以省电优化,以延长移动终端的续航时间,提高用户的体验。In the technical solution of the present invention, the data recorded by the battery status service is obtained by using the system authority, and the power consumption information of each program of the mobile terminal is extracted therefrom, and displayed to the user in sequence. Therefore, when the user is using a high-version operating system, he can still effectively learn about relatively power-consuming programs and perform power-saving optimization, so as to prolong the battery life of the mobile terminal and improve user experience.

而且,该技术方案中,还将确定出的各程序的省电策略展示给用户,有利于用户根据省电策略进行省电优化。Moreover, in this technical solution, the determined power-saving strategies of each program are displayed to the user, which is beneficial for the user to optimize power-saving according to the power-saving strategy.

本发明附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in part in the description which follows, and will become apparent from the description, or may be learned by practice of the invention.

附图说明Description of drawings

本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and easy to understand from the following description of the embodiments in conjunction with the accompanying drawings, wherein:

图1a为本发明实施例的移动终端的耗电信息的检测结果展示方法的流程示意图;FIG. 1a is a schematic flowchart of a method for displaying detection results of power consumption information of a mobile terminal according to an embodiment of the present invention;

图1b为本发明实施例的程序耗电排行榜显示界面示意图;FIG. 1b is a schematic diagram of a display interface of a program power consumption leaderboard according to an embodiment of the present invention;

图1c、图1d都为本发明实施例的省电策略相关的示意图;Both Fig. 1c and Fig. 1d are schematic diagrams related to the power saving strategy of the embodiment of the present invention;

图2为本发明实施例的移动终端的耗电信息的检测结果展示系统的框架示意图。FIG. 2 is a schematic framework diagram of a system for displaying detection results of power consumption information of a mobile terminal according to an embodiment of the present invention.

具体实施方式detailed description

下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.

本技术领域云端服务器可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。Cloud servers in the technical field can understand that unless otherwise stated, the singular forms "a", "an", "the" and "the" used herein may also include plural forms. It should be further understood that the word "comprising" used in the description of the present invention refers to the presence of said features, integers, steps, operations, elements and/or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Additionally, "connected" or "coupled" as used herein may include wireless connection or wireless coupling. The expression "and/or" used herein includes all or any elements and all combinations of one or more associated listed items.

本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which this invention belongs. It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have meanings consistent with their meaning in the context of the prior art, and unless specifically defined as herein, are not intended to be idealized or overly Formal meaning to explain.

本技术领域技术人员可以理解,这里所使用的“终端”、“终端设备”既包括无线信号接收器的设备,其仅具备无发射能力的无线信号接收器的设备,又包括接收和发射硬件的设备,其具有能够在双向通信链路上,进行双向通信的接收和发射硬件的设备。这种设备可以包括:蜂窝或其他通信设备,其具有单线路显示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备;PCS(Personal Communications Service,个人通信系统),其可以组合语音、数据处理、传真和/或数据通信能力;PDA(Personal Digital Assistant,个人数字助理),其可以包括射频接收器、寻呼机、互联网/内联网访问、网络浏览器、记事本、日历和/或GPS(Global Positioning System,全球定位系统)接收器;常规膝上型和/或掌上型计算机或其他设备,其具有和/或包括射频接收器的常规膝上型和/或掌上型计算机或其他设备。这里所使用的“终端”、“终端设备”可以是便携式、可运输、安装在交通工具(航空、海运和/或陆地)中的,或者适合于和/或配置为在本地运行,和/或以分布形式,运行在地球和/或空间的任何其他位置运行。这里所使用的“终端”、“终端设备”还可以是通信终端、上网终端、音乐/视频播放终端,例如可以是PDA、MID(Mobile Internet Device,移动互联网设备)和/或具有音乐/视频播放功能的移动电话,也可以是智能电视、机顶盒等设备。Those skilled in the art can understand that the "terminal" and "terminal equipment" used here not only include wireless signal receiver equipment, which only has wireless signal receiver equipment without transmission capabilities, but also include receiving and transmitting hardware. A device having receive and transmit hardware capable of bi-directional communication over a bi-directional communication link. Such equipment may include: cellular or other communication equipment, which has a single-line display or a multi-line display or a cellular or other communication equipment without a multi-line display; PCS (Personal Communications Service, personal communication system), which can combine voice, data Processing, facsimile and/or data communication capabilities; PDA (Personal Digital Assistant, Personal Digital Assistant), which may include radio frequency receiver, pager, Internet/Intranet access, web browser, notepad, calendar and/or GPS (Global Positioning System (Global Positioning System) receiver; a conventional laptop and/or palmtop computer or other device having and/or including a radio frequency receiver. As used herein, a "terminal", "terminal device" may be portable, transportable, installed in a vehicle (air, sea, and/or land), or adapted and/or configured to operate locally, and/or In distributed form, the operation operates at any other location on Earth and/or in space. The "terminal" and "terminal equipment" used here can also be communication terminals, Internet terminals, music/video playback terminals, such as PDAs, MIDs (Mobile Internet Devices, mobile Internet devices) and/or with music/video playback terminals. Functional mobile phones, smart TVs, set-top boxes and other devices.

在此需要说明的是,本实施例中所述的便携式终端可以是任何的可以脱离交流电源能够依靠自身或外置电池电量运行其操作系统的终端设备。其包括但不限于智能手机、平板电脑、笔记本电脑、PDA(个人数字助理,Personal Digital Assistant)。操作系统包括但不限于安卓(android)系统、苹果IOS、window系统、window phone系统、黑莓(BlackBerry)OS系统以及web OS系统。本实施例中以安卓系统为例进行说明。It should be noted here that the portable terminal described in this embodiment may be any terminal device that can operate its operating system by itself or by an external battery without an AC power supply. It includes, but is not limited to, smartphones, tablet computers, notebook computers, and PDAs (Personal Digital Assistants). The operating system includes but not limited to Android system, Apple IOS, window system, window phone system, Blackberry (BlackBerry) OS system and web OS system. In this embodiment, the Android system is taken as an example for description.

本发明的发明人考虑到,移动终端的操作系统升级后,通过电池状态服务记录本移动终端中各软硬件的耗电数据;因此,可以在系统权限下获取电池状态服务所记录的数据,从而使得第三方软件可以从获取的数据中提取出各程序的耗电信息,并展示给用户,以供用户进行省电优化,例如禁止自启,有利于延长移动终端的续航时间,提高用户的体验。The inventor of the present invention considers that after the operating system of the mobile terminal is upgraded, the power consumption data of each software and hardware in the mobile terminal is recorded through the battery status service; therefore, the data recorded by the battery status service can be obtained under the system authority, thereby The third-party software can extract the power consumption information of each program from the acquired data, and display it to the user for power saving optimization, such as prohibiting self-starting, which is beneficial to prolong the battery life of the mobile terminal and improve the user experience .

本领域技术人员应当可以预见,由于本发明所揭示的技术涉及到对Android系统级别资源的调用,因而,在实施本发明前需要为以本发明实例化的应用程序的运行获取Root权限。Those skilled in the art should be able to foresee that since the technology disclosed in the present invention involves the calling of Android system-level resources, it is necessary to obtain Root permission for the running of the application program instantiated by the present invention before implementing the present invention.

众所周知,Root权限是指Unix类操作系统(包括Linux、Android)的系统管理员权限,类似于Windows(视窗)系统中的Administrator(管理员)权限;Root权限可以访问和修改用户的移动设备中几乎所有的文件(Android系统文件及用户文件,不包括ROM)。但是,由于目前移动终端系统对于Root权限的管理是非常严格的,通常情况下多数应用或程序都不具备Root权限,因此对于某些需要具备Root权限的操作就无法执行,例如安装或卸载应用等操作;同时,此类操作调用进程每次执行相应操作时都需要向系统申请Root权限,但如果此时其他应用进程正在使用Root权限进行相关操作,则此调用进程的Root权限申请便无法成功;更甚者,如果用户在系统中设置了禁用Root权限的操作,则相关调用进程便无法进行相关操作。As we all know, Root authority refers to the system administrator authority of Unix-like operating systems (including Linux, Android), similar to the Administrator (administrator) authority in Windows (Windows) system; Root authority can access and modify almost All files (Android system files and user files, excluding ROM). However, because the current mobile terminal system is very strict about the management of Root permissions, most applications or programs do not have Root permissions usually, so some operations that require Root permissions cannot be performed, such as installing or uninstalling applications, etc. At the same time, the calling process of this type of operation needs to apply for root permission from the system every time it performs the corresponding operation, but if other application processes are using the root permission to perform related operations at this time, the root permission application of the calling process cannot be successful; What's more, if the user sets the operation of disabling the Root permission in the system, the relevant calling process cannot perform the relevant operation.

基于此,本发明提出只需要向系统发送一次Root权限获取请求,具体可通过调用系统内置的SU(Super User,超级用户)命令获取Root权限,或者通过获取具有Root权限的shell获取Root权限并在shell中启动进程,然后在获取所述系统的Root权限授权后,即可使后续其他调用进程需执行相关操作时无需重复申请Root权限;具体Root权限获取过程可参照现有技术的Root权限调用函数,本发明在此不再赘述。Based on this, the present invention only needs to send a Root permission acquisition request to the system, specifically, the Root permission can be obtained by calling the built-in SU (Super User, super user) command of the system, or by obtaining a shell with Root permission to obtain the Root permission and then Start the process in the shell, and then after obtaining the Root authority authorization of the system, it is not necessary to repeatedly apply for Root authority when other subsequent calling processes need to perform related operations; the specific Root authority acquisition process can refer to the Root authority call function of the prior art , the present invention will not be described in detail here.

可以看出,Root权限的获取方式,从权限作用的生命周期来看,包括永久Root权限和临时Root权限,顾名思义,永久Root权限情况下,应用程序一经Root授权,以后可不必再进行Root提权操作;而临时Root权限情况下,权限作用的生命周期只是操作系统的一次从开机到关机的过程,下次开机依然需要进行Root。本发明的实现不受这种分类限制。It can be seen that, from the perspective of the life cycle of permissions, the way to obtain root permissions includes permanent root permissions and temporary root permissions. As the name implies, in the case of permanent root permissions, once the application is authorized by root, there is no need to upgrade root permissions in the future. In the case of temporary root authority, the life cycle of the authority is only a process from booting to shutting down of the operating system, and rooting is still required for the next boot. The implementation of the present invention is not limited by this classification.

下面结合附图具体介绍本发明实施例的技术方案。The technical solutions of the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.

本发明实施例提供的移动终端的耗电信息的检测结果展示方法的流程示意图,如图1a所示,包括如下步骤:The flow diagram of the method for displaying the detection result of the power consumption information of the mobile terminal provided by the embodiment of the present invention, as shown in FIG. 1a, includes the following steps:

S101:获得移动终端的操作系统的系统权限。S101: Obtain the system authority of the operating system of the mobile terminal.

具体地,提示用户需要获取系统权限,即root(超级用户)权限;接收到用户输入的获取系统权限的指令后,获取操作系统的系统权限。Specifically, the user is prompted that the user needs to acquire the system authority, that is, the root (super user) authority; after receiving the instruction for obtaining the system authority entered by the user, the system authority of the operating system is acquired.

S102:在系统权限下从操作系统获取电池状态服务所记录的数据。S102: Obtain the data recorded by the battery status service from the operating system under the system authority.

具体地,利用上述步骤中获取的系统权限,创建一个基于系统权限的进程;由该进程读取电池状态服务所记录的数据后,存储到电量数据库中。Specifically, use the system authority obtained in the above steps to create a process based on the system authority; after the process reads the data recorded by the battery status service, it is stored in the power database.

例如,利用root权限,创建一个系统层的root进程,由root进程读取BatteryState Service所记录的数据后,存储到作为电量数据库的应用层的数据文件中。For example, use the root authority to create a root process at the system level, and the root process reads the data recorded by the BatteryState Service and stores it in the data file of the application layer as the power database.

其中,电池状态服务是由操作系统提供的系统服务之一,用于收集并记录移动终端中所有的程序和硬件的耗电数据。Wherein, the battery status service is one of the system services provided by the operating system, and is used to collect and record power consumption data of all programs and hardware in the mobile terminal.

较佳地,基于系统权限的进程可以从电池状态服务所记录的数据或系统文件中,读取移动终端中各感应器的功率和处于开启状态的时间、处理器的运行时间和功率、屏幕的总耗电量、各种网络流量及单位流量的耗电电量,以及每个程序的运行时间(即占用处理器的时间)和对处理器的占比、调用感应器的时间、所产生的网络流量和单位流量所耗费的电量等耗电信息,并将读取的各种耗电信息存储到电量数据库中。Preferably, the process based on the system authority can read the power of each sensor in the mobile terminal and the time it is in the open state, the running time and power of the processor, the Total power consumption, various network traffic and power consumption per unit traffic, as well as the running time of each program (that is, the time occupied by the processor) and the proportion of the processor, the time for calling the sensor, and the generated network Power consumption information such as flow rate and power consumption per unit flow rate, and store various power consumption information read in the power database.

处理器的运行时间中可以包括处理器的前台时间(即处理器被程序占用的时间)和后台时间(处理器空闲时间)。The running time of the processor may include the processor's foreground time (that is, the time when the processor is occupied by the program) and background time (the processor's idle time).

在本实施例中,系统信息可包括多种信息,例如:In this embodiment, the system information may include various information, such as:

定时器记录的计时信息、锁屏通知信息、进程运行信息。Timing information, lock screen notification information, and process running information recorded by the timer.

其中,进程运行信息包括该进程的运行状态以及进程的类型,进程的类型按照其优先级可以分为:前台进程、后台进程、系统进程等。Wherein, the process running information includes the running state of the process and the type of the process, and the type of the process can be divided into: a foreground process, a background process, a system process, etc. according to its priority.

而其中的后台进程,即为优先级低于预设值的进程。The background process is a process whose priority is lower than a preset value.

其中,上述不重要的后台程序也即在操作系统中正在运行的进程中,优先级低于预设数值的程序。以在安卓操作系统中为例,通过这些程序的pid,找到对应的proc/pid/oom_adj文件,读取文件中的数值,即可作为判断优先级的标准以及阀值,或者通过获取安卓程序中正在运行的程序,通过获取到的RunningAppProcessInfo实例,通过其importance属性的数值,作为判断优先级的标准以及阀值。Wherein, the above-mentioned unimportant background programs are programs whose priority is lower than a preset value among the running processes in the operating system. Taking the Android operating system as an example, through the pid of these programs, find the corresponding proc/pid/oom_adj file, and read the value in the file, which can be used as the standard and threshold for judging the priority, or by obtaining the The running program uses the obtained RunningAppProcessInfo instance and the value of its importance attribute as the criterion and threshold for judging the priority.

为了便于说明,本实施例中将这些可清理掉的进程定义为后台进程,下面具体说明其获取方式:For the convenience of description, these processes that can be cleaned up are defined as background processes in this embodiment, and the acquisition method is specifically described below:

可通过操作系统的API(Application Programming Interface,应用程序编程接口),实现对操作系统中正在运行的全部进程的优先级的进行遍历。API是操作系统留给应用程序的一个调用接口,应用程序通过调用操作系统的API而使操作系统去执行应用程序的命令(动作)。可采用中断机制实现对API监听。The traversal of the priorities of all processes running in the operating system can be implemented through an API (Application Programming Interface, application programming interface) of the operating system. The API is a call interface left by the operating system to the application program, and the application program makes the operating system execute the command (action) of the application program by calling the API of the operating system. The interrupt mechanism can be used to monitor the API.

本发明实施例中app层与framework层之间的交互可以理解为:注入系统服务程序,替换系统服务内的用于接受进程间通讯数据的句柄(变量)为app层的假句柄(变量),那么假句柄(变量)就会优先于系统服务收到来自第三方程序的控制请求,假句柄(内存变量)会在被调用的时候执行进程控制的逻辑,并且可以按照用户设置的规则,执行相应操作。The interaction between the app layer and the framework layer in the embodiment of the present invention can be understood as: injecting the system service program, replacing the handle (variable) used to accept inter-process communication data in the system service with a fake handle (variable) of the app layer, Then the fake handle (variable) will receive the control request from the third-party program prior to the system service, and the fake handle (memory variable) will execute the process control logic when it is called, and can execute the corresponding program according to the rules set by the user. operate.

具体的,确定进程优先级的方式可以有多种。Specifically, there may be multiple manners for determining the priority of a process.

(1)第一种方式为:通过各个应用程序的进程标识,查找到各个应用程序的进程重要性指数,根据进程重要性指数,确定每个应用程序的进程优先级。(1) The first method is: find the process importance index of each application program through the process identification of each application program, and determine the process priority of each application program according to the process importance index.

具体的,在安卓系统中,通过程序的PID,找到对应的PROC/PID/oom_adj文件,读取文件中的数值,作为判断优先级的标准以及阀值。其中,PID(Process Identifier)是各进程的身份标识,程序一运行系统就会自动分配给进程一个独一无二的。可通过应用程序的PID,查找到应用程序对应的oom_adj。Specifically, in the Android system, the corresponding PROC/PID/oom_adj file is found through the PID of the program, and the value in the file is read as a criterion and a threshold for judging the priority. Among them, PID (Process Identifier) is the identity of each process, and the system will automatically assign a unique one to the process as soon as the program runs. The oom_adj corresponding to the application can be found through the PID of the application.

Android将程序分成以下几类,例如,按照重要性依次降低的顺序:Android divides programs into the following categories, for example, in order of decreasing importance:

FOREGROUD_APP,oom_adj=0,表示前台程序,可以理解为正在使用的程序;FOREGROUD_APP, oom_adj=0, means the foreground program, which can be understood as the program in use;

VISIBLE_APP,oom_adj=1,表示用户可见的程序;VISIBLE_APP, oom_adj=1, means the program visible to the user;

SECONDARY_SERVER,oom_adj=2,表示后台服务,比如说QQ会在后台运行服务;SECONDARY_SERVER, oom_adj=2, means background service, for example, QQ will run the service in the background;

HOME_APP,oom_adj=4,表示HOME,就是主界面;HOME_APP, oom_adj=4, means HOME, which is the main interface;

HIDDEN_APP,oom_adj=7,表示被隐藏的程序;HIDDEN_APP, oom_adj=7, means hidden program;

CONTENT_PROVIDER,oom_adj=14,表示内容提供者;CONTENT_PROVIDER, oom_adj=14, means the content provider;

EMPTY_APP,oom_adj=15,表示空程序,既不提供服务,也不提供内容。EMPTY_APP, oom_adj=15, means an empty program, neither providing service nor content.

(2)第二种方式为:获取系统正在运行的应用程序进程信息,通过正在运行的应用程序进程信息中的重要性属性的数值,确定每个应用程序的进程优先级。(2) The second method is: obtain the process information of the application program running in the system, and determine the process priority of each application program through the value of the importance attribute in the process information of the running application program.

具体的,通过获取安卓程序中正在运行的程序,通过获取到的RunningAppProcessInfo对象,通过其importance属性的数值,作为判断优先级的标准以及阀值。Specifically, by obtaining the running program in the Android program, by obtaining the RunningAppProcessInfo object, and by using the value of its importance attribute as the criterion and threshold for judging the priority.

在安卓系统中,RunningAppProcessInfo(正在运行的应用程序进程信息)里面的常量IMOPORTANCE(重要性属性)表示这个app进程的重要性,因为系统回收时候,会根据IMOPORTANCE来回收进程的。例如:In the Android system, the constant IMOPORTANCE (importance attribute) in RunningAppProcessInfo (running application process information) indicates the importance of the app process, because when the system recycles, it will recycle the process according to IMOPORTANCE. E.g:

public static final int IMPORTANCE_BACKGROUND=400表示后台程序;public static final int IMPORTANCE_BACKGROUND=400 means background program;

public static final int IMPORTANCE_EMPTY=500表示空进程;public static final int IMPORTANCE_EMPTY=500 means empty process;

public static final int IMPORTANCE_FOREGROUND=100表示在屏幕最前端、可获取到焦点的程序;public static final int IMPORTANCE_FOREGROUND=100 means the program that is at the forefront of the screen and can get the focus;

public static final int IMPORTANCE_SERVICE=300表示在服务中的程序;public static final int IMPORTANCE_SERVICE=300 indicates the program in service;

public static final int IMPORTANCE_VISIBLE=200表示在屏幕前端、获取不到焦点的程序。public static final int IMPORTANCE_VISIBLE=200 indicates that the program is at the front of the screen and cannot get the focus.

具体的,获取RunningAppProcessInfo对象的importance属性值的例子如下:Specifically, an example of obtaining the importance attribute value of the RunningAppProcessInfo object is as follows:

首先要获取ActivityManager的对象实例,通过调用getSystemService(ACTIVITY_SERVICE),将返回一个ActivityManager的实例;在获取该实例后,调用其getRunningAppProcesses()方法,可以返回一个List,该List中存放的数据类型为ActivityManager.RunningAppProcessInfo。那么,对该List进行遍历,从List中的每项RunningAppProcessInfo中可以获取尽享相关的信息。First, get the object instance of ActivityManager. By calling getSystemService(ACTIVITY_SERVICE), an instance of ActivityManager will be returned; after getting the instance, call its getRunningAppProcesses() method to return a List, and the data type stored in the List is ActivityManager. RunningAppProcessInfo. Then, the List is traversed, and information related to enjoyment can be obtained from each item of RunningAppProcessInfo in the List.

例如,使用一个ListAdapter来绑定到一个ListView当中进行显示,实现代码如下:For example, to use a ListAdapter to bind to a ListView for display, the implementation code is as follows:

可见,通过上述代码中“public int importance”(进程在系统中的重要级别)就是即能获取进程的优先级,从而得知其是否为后台进程。It can be seen that through the "public int importance" (important level of the process in the system) in the above code, the priority of the process can be obtained, so as to know whether it is a background process.

例如,基于系统权限的进程获取GPS(Global Positioning System,全球定位系统)收发器的运行时间、WiFi(Wireless Fidelity,无线局域网)收发器的扫描时间和运行时间、处理器的运行时间、屏幕的总耗电量;从power profile(能量描述)文件中读取处理器的功率、GPS收发器的功率、WiFi收发器的扫描功率和运行功率,功率具体可以是毫安值。基于系统权限的进程获取WiFi收发器、2G(2nd-Generation wireless telephonetechnology,第二代手机通信技术)收发器、3G(3rd-Generation wireless telephonetechnology,第三代手机通信技术)收发器和GPS收发器等各自产生的流量,以及流量中每个字节所耗费的平均电量。For example, the process based on the system authority acquires the running time of the GPS (Global Positioning System, Global Positioning System) transceiver, the scan time and running time of the WiFi (Wireless Fidelity, Wireless Local Area Network) transceiver, the running time of the processor, the total Power consumption: read the power of the processor, the power of the GPS transceiver, the scanning power and the operating power of the WiFi transceiver from the power profile (energy description) file, and the specific power can be a milliampere value. Processes based on system permissions acquire WiFi transceivers, 2G (2nd-Generation wireless telephone technology, second-generation mobile phone communication technology) transceivers, 3G (3rd-Generation wireless telephone technology, third-generation mobile phone communication technology) transceivers, and GPS transceivers, etc. The traffic generated by each, and the average power consumption per byte in the traffic.

更优的,通过解析便携式终端操作系统中电池数据文件,还可以获取待运行的应用程序的运行频率等信息;由操作系统的应用程序接口获取电池数据文件。More preferably, by analyzing the battery data file in the portable terminal operating system, information such as the operating frequency of the application program to be run can also be obtained; the battery data file is obtained through the application program interface of the operating system.

更进一步,通过定期扫描系统当前已经安装的应用程序,并获取其运行时的参数,并定期分析系统中对应用程序使用电池资源的统计数据,建立应用程序的电池数据文件。Furthermore, the battery data file of the application is established by regularly scanning the currently installed application in the system, obtaining its runtime parameters, and periodically analyzing the statistical data of the battery resources used by the application in the system.

S103:从获取的数据中,提取出移动终端的各程序的耗电信息。S103: Extract power consumption information of each program of the mobile terminal from the acquired data.

较佳地,对于安装于移动终端中的每个程序,从电量数据库的数据中,读取该程序的运行时间和对处理器的占比、处理器的功率,计算出该程序对应的处理器耗电量。Preferably, for each program installed in the mobile terminal, read the running time of the program, the proportion of the processor, and the power of the processor from the data in the power database, and calculate the processor corresponding to the program. power consumption.

对于安装于移动终端中的每个程序,从电量数据库的数据中,调用安卓对应的接口读取该程序调用各感应器的时间、以及各感应器的功率和处于开启状态的时间,计算出该程序对应的感应器耗电量。For each program installed in the mobile terminal, from the data in the power database, call the interface corresponding to Android to read the time when the program calls each sensor, as well as the power of each sensor and the time it is in the open state, and calculate the The power consumption of the sensor corresponding to the program.

例如,读取程序调用GPS收发器的时间,以及GPS收发器的功率和运行时间,计算出该程序对应的GPS收发器耗电量。For example, read the time when the program calls the GPS transceiver, and the power and running time of the GPS transceiver, and calculate the power consumption of the GPS transceiver corresponding to the program.

对于安装于移动终端中的每个程序,从电量数据库的数据中,读取该程序所产生的网络流量,以及单位流量所耗费的电量,计算出该程序对应的网络流量耗电量。For each program installed in the mobile terminal, read the network traffic generated by the program and the power consumption per unit traffic from the data in the power database, and calculate the power consumption of the network traffic corresponding to the program.

例如,读取程序通过WiFi交互所产生的流量,以及每个字节的平均电量,计算出该程序对应的WiFi流量耗电量。For example, read the traffic generated by the program through WiFi interaction, and the average power of each byte, and calculate the power consumption of the WiFi traffic corresponding to the program.

以Andriod系统为例,可以向操作系统广播注册接口(RegisterReceiver)发送请求,要求在发生网络连接的切换事件时发送发生切换事件的通知,Andriod系统通过ConnectivityManager接口监听网络状态变化,第一次连接网络时会收到一个Broadcast广播通知,后续进行网络切换时也会接收到相应通知,例如,从GPRS到WIFI,程序至少会收到3个Broadcast,第一个Broadcast是连接到WIFI,第二个Broadcast是断开GPRS,第三个Broadcast是连接到WIFI,由此可知移动终端当前连接WIFI网络。Taking the Andriod system as an example, you can send a request to the operating system broadcast registration interface (RegisterReceiver), requesting to send a notification of the switching event when the switching event of the network connection occurs. The Andriod system monitors the network status change through the ConnectivityManager interface. The first time you connect to the network It will receive a Broadcast broadcast notification, and it will also receive a corresponding notification when the network is switched. For example, from GPRS to WIFI, the program will receive at least 3 Broadcasts. The first Broadcast is connected to WIFI, and the second Broadcast is connected to WIFI. It is to disconnect GPRS, and the third Broadcast is to connect to WIFI, so it can be known that the mobile terminal is currently connected to the WIFI network.

本发明实施例中,在监控移动终端所连接的网络制式的同时,可以在所述移动终端的系统日志中,读取应用程序在不同的网络制式下总共消耗的数据流量,实现对各个应用程序所消耗的数据流量分别进行监控,从而读取程序通过WiFi交互所产生的流量。In the embodiment of the present invention, while monitoring the network standard connected to the mobile terminal, the system log of the mobile terminal can be used to read the total data traffic consumed by the application program under different network standards, so as to realize the monitoring of the network standard of each application program The data traffic consumed is monitored separately, so as to read the traffic generated by the program interacting through WiFi.

本发明实施例中,移动终端记录了各个应用程序消耗的数据流量,针对某一应用程序,此处记录的数据流量为该应用程序在各种网络制式下总共消耗的数据流量。In the embodiment of the present invention, the mobile terminal records the data traffic consumed by each application program. For a certain application program, the data traffic recorded here is the total data traffic consumed by the application program under various network standards.

各个应用层序具备相应的唯一标识符,用于唯一标识对应的应用程序,通过唯一标识符可以将一个应用程序与其他的一个应用程序进行区分。以Android系统为例,由于Android是单用户系统,不需要支持多用户登陆,因此传统的终端标识系统就失去了原来的意义,Android的开发者修改了终端标识的含义,将其用于应用程序的标识,采用UID对应用程序进行管理,每个应用程序对应一个UID作为唯一标识符。Each application layer sequence has a corresponding unique identifier, which is used to uniquely identify the corresponding application program, and an application program can be distinguished from another application program through the unique identifier. Taking the Android system as an example, because Android is a single-user system and does not need to support multi-user login, the traditional terminal identification system loses its original meaning. Android developers modify the meaning of the terminal identification and use it for application programs. UID is used to manage applications, and each application corresponds to a UID as a unique identifier.

应用程序的数据流量以该应用程序的唯一标识符作标记,根据唯一标识符,通过所述移动终端的流量状态获取接口(android.net.TrafficStats),该接口提供了多种静态方法,可以直接调用获取该应用程序对应的数据流量。The data flow of the application program is marked with the unique identifier of the application program. According to the unique identifier, the traffic status acquisition interface (android.net.TrafficStats) of the mobile terminal is provided. This interface provides a variety of static methods, which can directly Call to get the data traffic corresponding to the application.

在提取数据流量之前,首先获取应用程序的唯一标识符,唯一标识符保存在移动终端,可以通过预先设置的调用函数获取,以Andriod系统为例,通过ActivityManager我们可以获得系统里正在运行的activities,包括进程(Process)等、应用程序/包、服务(Service)、任务(Task)信息,使用ActivityManager的getRunningAppProces(获取正在运行的进程信息)方法获得RunningAppProcessInfo(正在运行的进程信息),在RunningAppProcessInfo里面会有唯一标识符UID。Before extracting the data flow, first obtain the unique identifier of the application, which is stored in the mobile terminal and can be obtained through a pre-set call function. Taking the Andriod system as an example, we can obtain the running activities in the system through the ActivityManager. Including process (Process), application program/package, service (Service), task (Task) information, use ActivityManager's getRunningAppProces (get running process information) method to get RunningAppProcessInfo (running process information), in RunningAppProcessInfo will There is a unique identifier UID.

通过上述方式,从而读取程序通过WiFi交互所产生的流量。Through the above method, the traffic generated by the program through WiFi interaction can be read.

本发明实施例中,从电量数据库的数据中,读取处理器的运行时间和屏幕的总耗电量;从处理器的运行时间中分离出前台时间和后台时间;由于通常情况下,处理器处于前台时间时屏幕处于亮屏状态,处理器处于后台时间时屏幕处于黑屏状态,因此根据屏幕的总耗电量、以及处理器的运行时间和前台时间,可以计算出屏幕亮屏时的耗电量。统计出在前台时间占用处理器的程序数量和每个程序的处理器占比后,将屏幕亮屏时的耗电量分摊给各程序,得到每个程序对应的屏幕耗电量。屏幕的黑屏时的耗电量可以包括:屏幕控制芯片的待机耗电量、漏电量引起的耗电量等。对于安装于移动终端中的每个程序,根据计算出的该程序对应的处理器耗电量、感应器耗电量、网络流量耗电量和屏幕耗电量,统计出该程序的耗电量;将该程序的运行时间和耗电量一并作为该程序的耗电信息。In the embodiment of the present invention, the running time of the processor and the total power consumption of the screen are read from the data in the power database; the foreground time and the background time are separated from the running time of the processor; When the screen is in the foreground time, the screen is in a bright state, and when the processor is in the background time, the screen is in a black screen state. Therefore, according to the total power consumption of the screen, as well as the running time of the processor and the foreground time, the power consumption when the screen is on can be calculated. quantity. After counting the number of programs that occupy the processor in the foreground time and the processor ratio of each program, the power consumption when the screen is on is allocated to each program to obtain the screen power consumption corresponding to each program. The power consumption when the screen is black may include: standby power consumption of the screen control chip, power consumption caused by power leakage, and the like. For each program installed in the mobile terminal, according to the calculated power consumption of the processor, sensor power consumption, network traffic power consumption and screen power consumption corresponding to the program, the power consumption of the program is calculated ; Use the running time and power consumption of the program as the power consumption information of the program.

例如,电量数据库中存储的数据,通常是序列化后的数据;将电量数据库中的数据进行反序列化后,还原出移动终端被记录的所有的耗电信息,并从中提取出移动终端的各程序的耗电信息。序列化和反序列化为本领域云端服务器的惯用技术手段,此处不再赘述。For example, the data stored in the power database is usually serialized data; after the data in the power database is deserialized, all the power consumption information recorded by the mobile terminal is restored, and each information of the mobile terminal is extracted from it. Program's power consumption information. Serialization and deserialization are common technical means of cloud servers in this field, and will not be repeated here.

更优的,可以从电量数据库的数据中,提取出移动终端的各硬件的耗电信息。硬件的耗电信息至少包括:语言通话及信号待机相关硬件的耗电量、处理器空闲时的耗电量或者屏幕黑屏时的耗电量。More preferably, the power consumption information of each hardware of the mobile terminal can be extracted from the data in the power database. The power consumption information of the hardware includes at least: the power consumption of hardware related to voice calls and signal standby, the power consumption of the processor when it is idle, or the power consumption when the screen is black.

S104:将移动终端中的各程序依照各自的耗电信息进行排序后,将排序结果进行展示。S104: After sorting the programs in the mobile terminal according to their respective power consumption information, display the sorting results.

具体地,根据步骤S103中提取得到的移动终端中各程序的耗电信息,统计出所有程序的单位时间耗电量和每个程序的单位时间耗电量,进而统计出每个程序的单位时间耗电量占比;根据统计出的各程序的单位时间耗电量占比的大小,对各程序进行排序,例如依照单位时间耗电量占比从大到小的顺利,对各程序进行排序。之后,在程序耗电排行榜显示界面中,显示各程序的单位时间耗电量占比。Specifically, according to the power consumption information of each program in the mobile terminal extracted in step S103, the power consumption per unit time of all programs and the power consumption per unit time of each program are counted, and then the power consumption per unit time of each program is counted. Proportion of power consumption; according to the proportion of power consumption per unit time of each program, sort the programs, for example, sort the programs according to the proportion of power consumption per unit time from large to small . Afterwards, in the display interface of the program power consumption leaderboard, the proportion of power consumption per unit time of each program is displayed.

较佳地,对于每个程序,根据该程序的单位时间耗电量占比,确定相应的省电策略;例如,对于每个程序,根据该程序的单位时间耗电量占比的大小,确定该程序的耗电级别;并将与该耗电级别对应的省电策略作为相应的省电策略。Preferably, for each program, a corresponding power saving strategy is determined according to the proportion of power consumption per unit time of the program; for example, for each program, according to the proportion of power consumption per unit time of the program, determine The power consumption level of the program; and the power saving policy corresponding to the power consumption level is used as the corresponding power saving policy.

之后,在程序耗电排行榜显示界面中,还显示各程序的省电策略的链接。用户点击某一程序的省电策略的链接后,移动终端在程序耗电排行榜显示界面中显示该程序的省电策略。例如,如图1b所示的程序耗电排行榜显示界面中,显示有程序“微信”的单位时间耗电量占比“3.2%”、以及作为省电策略的链接的下拉箭头;用户点击下拉箭头后,移动终端在该显示界面中展开显示“微信”的省电策略“卸载”、“禁止自启”。较佳地,各程序的耗电级别和省电策略都是预先设定的。Afterwards, in the display interface of the program power consumption leaderboard, the links of the power saving policies of each program are also displayed. After the user clicks the link of the power saving strategy of a certain program, the mobile terminal displays the power saving strategy of the program on the program power consumption list display interface. For example, in the display interface of the program power consumption list shown in Figure 1b, the power consumption ratio per unit time of the program "WeChat" is displayed as "3.2%" and the drop-down arrow as a link to the power saving strategy; the user clicks the drop-down arrow After the arrow, the mobile terminal expands and displays the “WeChat” power saving policy “uninstall” and “prohibit self-starting” in the display interface. Preferably, the power consumption level and the power saving policy of each program are preset.

例如,程序的单位时间耗电占比不小于5%,该程序的耗电级别具体为耗电超高级别,则与之对应的省电策略具体为卸载、禁止自启或建议关闭。For example, if the program consumes no less than 5% of the power per unit time, and the program’s power consumption level is specifically high power consumption level, then the corresponding power saving policy is specifically to uninstall, prohibit self-starting, or recommend closing.

或者,程序的单位时间耗电占比不小于3%且小于5%,该程序的耗电级别具体为耗电较高级别,则与之对应的省电策略具体为禁止自启或卸载。Alternatively, the proportion of power consumption per unit time of the program is not less than 3% and less than 5%, and the power consumption level of the program is specifically a high level of power consumption, and the corresponding power saving policy is specifically prohibiting self-starting or uninstalling.

或者,程序的单位时间耗电占比不小于2%且小于3%,该程序的耗电级别具体为耗电一般级别,则与之对应的省电策略具体为建议关闭。Alternatively, the proportion of power consumption per unit time of the program is not less than 2% and less than 3%, and the power consumption level of the program is specifically the general level of power consumption, and the corresponding power saving policy is specifically recommended to be closed.

或者,程序的单位时间耗电占比不小于1%且小于2%,该程序的耗电级别具体为耗电较低级别,则与之对应的省电策略具体为保持现状。Alternatively, the proportion of power consumption per unit time of the program is not less than 1% and less than 2%, and the power consumption level of the program is specifically a low level of power consumption, and the corresponding power saving strategy is specifically maintaining the status quo.

或者,程序的单位时间耗电占比小于1%,该程序的耗电级别具体为耗电极低级别,则与之对应的省电策略具体为适合长期运行。Alternatively, the proportion of power consumption per unit time of the program is less than 1%, and the power consumption level of the program is specifically an extremely low power consumption level, and the corresponding power saving strategy is specifically suitable for long-term operation.

更优的,移动终端若接收到用户针对某一程序的卸载省电策略的点击事件后,显示该程序的卸载界面;若通过该卸载界面接收到用户输入的卸载点击事件,则卸载该程序。More preferably, if the mobile terminal receives a user's click event for uninstalling the power saving strategy of a certain program, it displays the program's uninstall interface; if it receives the user's uninstall click event through the uninstall interface, it uninstalls the program.

其中,界面提示的方式可以包括多种,例如显示提示、语音提示等。在本实施例中,提示的方式也可以采用悬浮窗的形式在移动终端上显示,具体的,可以通过调用操作系统中窗口管理器系统服务将其构造的悬浮操作板以悬浮窗的形式显示。具体地,用户可以通过自启管理UI(用户界面,User Interface)产生对于各程序的自启管理行为。例如,在本发明的一种应用示例中,自启管理UI可以在每个程序的附近区域展示允许按钮和禁止按钮,当用户点击禁止按钮后,程序的自启管理状态变成禁止状态,当用户点击允许按钮后,程序的自启管理状态变成允许状态;当然上述允许按钮和禁止按钮只是作为示例,本发明实施例对具体的自启管理UI不加以限制。Wherein, the manners of interface prompts may include various methods, such as display prompts, voice prompts, and the like. In this embodiment, the prompt can also be displayed on the mobile terminal in the form of a floating window. Specifically, the constructed floating operation panel can be displayed in the form of a floating window by calling the window manager system service in the operating system. Specifically, the user can generate a self-starting management behavior for each program through a self-starting management UI (User Interface, User Interface). For example, in an application example of the present invention, the self-starting management UI can display a permission button and a prohibition button in the vicinity of each program. When the user clicks the prohibition button, the self-starting management state of the program becomes a prohibited state. After the user clicks the allow button, the self-start management state of the program becomes the allow state; of course, the above-mentioned allow button and prohibit button are only examples, and the embodiment of the present invention does not limit the specific self-start management UI.

需要说明的是,本实施例中,对于进程的关闭可采用多种触发条件,是否达到进程关闭条件可通过系统信息进行判断。因此,上述系统信息并不需要全部获取得到,而由进程关闭条件决定。It should be noted that, in this embodiment, various trigger conditions may be used for closing the process, and whether the closing condition of the process is met can be judged through system information. Therefore, the above system information does not need to be obtained in full, but is determined by the process shutdown condition.

例如,上述进程关闭条件可以设定为如下的任意一种方式:For example, the above process shutdown conditions can be set in any of the following ways:

每隔一个小时进行一次进程关闭;或者,Process shutdown every hour; or,

每次锁屏时进行一次进程关闭。A process shutdown is performed each time the screen is locked.

或者,进一步的,本发明实施例的禁止自启,在安卓系统中,程序的自启需要一定的条件,除了开机时自启外,安卓系统中应用程序还有可能随着一些敏感事件的启动而自启,这些敏感事件具体可以包括:充电事件、网络状态变化事件(如Wifi联网事件等)、定时器事件、GPS(全球定位系统,Global Positioning System)事件和关联程序启动事件等等,这里的关联程序启动事件是指当程序之间存在关联关系时某应用程序会随着所关联程序的启动而启动。例如,如果微信与QQ之间存在关联关系,那么,即使用户通过自启管理界面禁止了微信,当QQ启动时微信也会自启。又如,如果购物客户端与支付宝钱包之间存在关联关系,那么,当京东启动时支付宝钱包也会关联启动以提供支付环境。再如,如果某应用程序客户端与微博之间存在关联关系,那么,当该应用程序客户端启动时微博也会关联启动以使用微博账号登陆该应用程序客户端。Or, further, the prohibition of self-starting in the embodiment of the present invention, in the Android system, the self-starting of the program requires certain conditions. And self-starting, these sensitive events may specifically include: charging events, network state change events (such as Wifi networking events, etc.), timer events, GPS (Global Positioning System, Global Positioning System) events and associated program start events, etc., here The associated program start event means that when there is an associated relationship between programs, an application will start with the associated program starting. For example, if there is an association relationship between WeChat and QQ, even if the user disables WeChat through the self-start management interface, WeChat will start automatically when QQ starts. As another example, if there is an associated relationship between the shopping client and the Alipay wallet, then when JD.com starts, the Alipay wallet will also be associated with it to provide a payment environment. For another example, if there is an association relationship between a certain application client and Weibo, then when the application client is started, Weibo will also be associated and started so as to use the Weibo account to log in to the application client.

本步骤执行广播禁用的技术实现,可由一服务进程来执行,该服务进程通过调用setComponentEnabledSetting函数,向其传递需要禁用的广播组件的组件名称如前述的SystemRecerver和常量COMPONENT_ENABLED_STATE_ENABLED,由其将相应的广播组件设置为不可用状态,即可实现对该广播组件的禁用。This step implements the technical implementation of broadcast disabling, which can be performed by a service process. The service process passes the component name of the broadcast component to be disabled by calling the setComponentEnabledSetting function, such as the aforementioned SystemRecerver and the constant COMPONENT_ENABLED_STATE_ENABLED, which will set the corresponding broadcast component Set it to unavailable to disable the broadcast component.

解禁目标应用的广播组件,同理通过调用setComponentEnabledSetting函数实现,通过向该函数传递需要禁用的广播组件的组件名称如前述的SystemRecerver和常量COMPONENT_ENABLED_STATE_DISABLED,便可由该函数将相应的广播组件设置为可用状态,从而实现对该广播组件的禁用。Unbanning the broadcast component of the target application is similarly achieved by calling the setComponentEnabledSetting function. By passing the component name of the broadcast component to be disabled, such as the aforementioned SystemRecerver and the constant COMPONENT_ENABLED_STATE_DISABLED, the function can set the corresponding broadcast component to an available state. In this way, the broadcast component is disabled.

在具体实现中,可以记录用户对于程序的自启管理行为,并依据用户最后一次产生的对于程序的自启管理行为确定程序的自启管理状态。In a specific implementation, the user's self-starting management behavior for the program can be recorded, and the self-starting management status of the program can be determined according to the user's last self-starting management behavior for the program.

其中,针对所述禁止状态对应程序,阻止其接收到所注册敏感事件的广播消息,从而使其失去自动启动的功能,并做具体解释如下:Among them, for the program corresponding to the prohibited state, it is prevented from receiving the broadcast message of the registered sensitive event, so that it loses the function of automatic startup, and the specific explanation is as follows:

依据上述敏感事件自启的原理,程序在接收到敏感事件的广播消息后,才可以通过将自己唤起等方式进行响应,这样,本发明实施例采用阻止程序接收到所注册敏感事件的广播消息的方式,能够实现禁止程序自启的目的;并且,本发明实施例阻止程序接收到所注册敏感事件的广播消息所针对的程序范围包括禁止状态对应程序也即用户不希望自启的程序,因此,能够在尊重用户意愿的情况下禁止程序自启,从而能够提升操作系统的运行速度,节省电子设备的耗电量。According to the above-mentioned principle of self-activation of sensitive events, the program can respond by evoking itself after receiving the broadcast message of the sensitive event. In this way, the purpose of prohibiting the self-starting of the program can be realized; moreover, the scope of the program for preventing the program from receiving the broadcast message of the registered sensitive event in the embodiment of the present invention includes the program corresponding to the prohibited state, that is, the program that the user does not want to be self-starting. Therefore, The self-starting of the program can be prohibited under the condition of respecting the wishes of the user, so that the running speed of the operating system can be improved and the power consumption of the electronic device can be saved.

本发明实施例可以提供如下针对所述禁止状态对应程序,阻止其接收到所注册敏感事件的广播消息的阻止接收方案:The embodiment of the present invention can provide the following scheme for preventing the program from receiving the broadcast message of the registered sensitive event for the program corresponding to the forbidden state:

阻止接收方案一:Block receiving option one:

阻止接收方案一停止所述禁止状态对应程序的进程;由于停止了所述禁止状态对应程序的进程,故所述禁止状态对应程序就无法接收到所注册敏感事件的广播消息,或者,即使接收到所注册敏感事件的广播消息,也无法启动。Prevent receiving scheme one: Stop the process of the program corresponding to the prohibited state; because the process of the program corresponding to the prohibited state is stopped, the program corresponding to the prohibited state cannot receive the broadcast message of the registered sensitive event, or, even if it receives Broadcast messages for registered sensitive events cannot be started either.

例如,在安卓系统中,可以采用android.os.killProcess接口以停止给定ID的进程。For example, in the Android system, the android.os.killProcess interface can be used to stop a process with a given ID.

又如,还可以采用ActivityManager中的killBackgroundProcesses接口来停止进程优先级低于SERVICE_ADJ的进程;需要说明的是,使用该接口需要声明KILL_BACKGROUND_PROCESSES权限,另外,该接口为ActivityManager中的公开接口,不需要任何权限,也即无需获得ROOT权限。As another example, you can also use the killBackgroundProcesses interface in the ActivityManager to stop processes whose process priority is lower than SERVICE_ADJ; it should be noted that to use this interface, you need to declare the KILL_BACKGROUND_PROCESSES permission. In addition, this interface is a public interface in the ActivityManager and does not require any permissions. , that is, there is no need to obtain ROOT privileges.

阻止接收方案二:Block receiving option two:

阻止接收方案二强制停止所述禁止状态对应程序的进程,使其包状态为停止状态;由于被标记为停止(stopped)状态的程序是不能接收广播的,因此能够阻止其接收到所注册敏感事件的广播消息。Prevent receiving scheme 2. Forcibly stop the process of the program corresponding to the forbidden state, so that its package state is stopped; since the program marked as stopped (stopped) state cannot receive broadcasts, it can prevent it from receiving the registered sensitive events broadcast message.

在安卓系统中,可以采用forceStopPackage接口强制停止所述禁止状态对应程序的进程,使其包状态为停止状态;需要说明的是,在使用forceStopPackage接口时需要声明FORCE_STOP_PACKAGES权限,并且,forceStopPackage是一个隐藏接口,需要通过反射等手段实现调用,另外,使用forceStopPackage接口需要系统签名,因此需要预先获得ROOT权限,并且,使用forceStopPackage接口可能会清空定时器,因此可以适用于定时器事件。In the Android system, the forceStopPackage interface can be used to forcibly stop the process of the program corresponding to the prohibited state, so that the package state is stopped; it should be noted that the FORCE_STOP_PACKAGES permission needs to be declared when using the forceStopPackage interface, and forceStopPackage is a hidden interface , the call needs to be implemented through reflection and other means. In addition, the use of the forceStopPackage interface requires a system signature, so ROOT permissions must be obtained in advance, and the use of the forceStopPackage interface may clear the timer, so it can be applied to timer events.

阻止接收方案三:Block receiving option three:

阻止接收方案三禁用所述禁止状态对应程序的组件;对于程序而言,广播消息是通过其广播接收器来接收的,而广播接收器作为程序中的应用组件,拥有“android:enable”属性,如果能够通过“android:enable”属性禁止程序的组件,那么程序将无法接收到所述敏感事件的广播消息。Block reception scheme three disable the components of the program corresponding to the prohibited state; for the program, the broadcast message is received through its broadcast receiver, and the broadcast receiver, as an application component in the program, has the "android:enable" attribute, If the components of the program can be disabled through the "android:enable" attribute, the program will not be able to receive the broadcast message of the sensitive event.

在具体实现中,可以通过调用setComponentEnabledSetting和setApplicationEnabledSetting接口将程序中的所有组件置为disable状态;其中,In the specific implementation, all components in the program can be set to the disabled state by calling the setComponentEnabledSetting and setApplicationEnabledSetting interfaces; among them,

Public void setComponentEnabledSetting(ComponentNamePublic void setComponentEnabledSetting(ComponentName

componentName,int newState,int flags)componentName, int newState, int flags)

componentName:组件名称,也即所述禁止状态对应程序的广播接收器componentName: component name, that is, the broadcast receiver of the program corresponding to the prohibited state

newState:组件新的状态,可以设置三个值,分别是如下:newState: The new state of the component. Three values can be set, which are as follows:

不可用状态:COMPONENT_ENABLED_STATE_DISABLEDUnavailable state: COMPONENT_ENABLED_STATE_DISABLED

可用状态:COMPONENT_ENABLED_STATE_ENABLEDAvailable state: COMPONENT_ENABLED_STATE_ENABLED

默认状态:COMPONENT_ENABLED_STATE_DEFAULTDefault state: COMPONENT_ENABLED_STATE_DEFAULT

flags:行为标签,值可以是DONT_KILL_APP或者0。0说明杀死包含该组件的apppublic int getComponentEnabledSetting(ComponentName componentName)获取组件的状态flags: Behavior label, the value can be DONT_KILL_APP or 0. 0 means kill the app containing the component public int getComponentEnabledSetting(ComponentName componentName) to get the status of the component

使用setComponentEnabledSetting接口必须是system程序并具有system签名;因此,在未获得system权限但获得了ROOT权限的情况下,可以使用“pm disable”命令。To use the setComponentEnabledSetting interface, you must be a system program and have a system signature; therefore, you can use the "pm disable" command if you have not obtained system permission but obtained ROOT permission.

阻止接收方案四:Block receiving option four:

阻止接收方案四先于所述禁止状态对应程序接收到其注册敏感事件的广播消息,并拦截该广播消息,以使所述禁止状态对应程序无法接收到所注册敏感事件的广播消息。Blocking the receiving scheme 4. Before the prohibited state corresponding program receives the broadcast message of the registered sensitive event, and intercepts the broadcast message, so that the prohibited state corresponding program cannot receive the registered sensitive event broadcast message.

在本发明的一种应用示例中,假设所述敏感事件的广播消息为有序广播,有序广播是按照接收者声明的优先级别,被接收者依次接收广播消息。如:A的级别高于B,B的级别高于C,那么,广播消息先传给A,再传给B,最后传给C。优先级别声明在intent-filter元素的android:priority属性中,数越大优先级别越高,取值范围:-1000到1000。因此,在具体实现中,可以设置比所述禁止状态对应程序更高的优先级,先于其接收其所注册敏感事件的广播消息,并通过BroadcastReceiver.abortBroadcast()来终止广播消息,由于广播消息被前面的接收者终止,后面的接收者就再也无法获取到广播消息,因此能够使所述禁止状态对应程序无法接收到所注册敏感事件的广播消息。In an application example of the present invention, it is assumed that the broadcast message of the sensitive event is an ordered broadcast, and the ordered broadcast means that the recipients receive the broadcast message sequentially according to the priority declared by the receiver. For example: the level of A is higher than that of B, and the level of B is higher than that of C. Then, the broadcast message is transmitted to A first, then to B, and finally to C. The priority level is declared in the android:priority attribute of the intent-filter element. The larger the number, the higher the priority level. The value range: -1000 to 1000. Therefore, in a specific implementation, you can set a higher priority than the program corresponding to the prohibited state, receive the broadcast message of the registered sensitive event before it, and terminate the broadcast message through BroadcastReceiver.abortBroadcast(), because the broadcast message If it is terminated by the previous receiver, the latter receiver will no longer be able to obtain the broadcast message, so that the program corresponding to the prohibited state cannot receive the broadcast message of the registered sensitive event.

本发明实施例中,再检测到应用属于耗电应用后,对该类应用进行广播组件的禁用对于目标应用的广播接收功能而言是根本性的,目标应用由此将无法通过获取系统广播实现开机自启动、后台自启动等目的,从而便可加快移动终端的开机速度,并且使内存余量更高,使移动终端具有更优的用户体验。In the embodiment of the present invention, after the application is detected to be a power-consuming application, disabling the broadcast component of this type of application is fundamental to the broadcast receiving function of the target application, and the target application will not be able to obtain the system broadcast. Self-starting at power-on, background self-starting, etc., so as to speed up the booting speed of the mobile terminal, and increase the memory margin, so that the mobile terminal has a better user experience.

例如,用户点击图1b中程序“书旗小说”的省电策略“卸载”,移动终端确认接收到用户针对“书旗小说”卸载省电策略的点击事件;之后,显示如图1c所示的“书旗小说”的卸载界面;若用户点击该卸载界面中的“卸载”,移动终端确认接收到用户输入的卸载点击事件,将“书旗小说”卸载。For example, when the user clicks "Uninstall" on the power saving policy of the program "Shuqi Novels" in Figure 1b, the mobile terminal confirms that it has received the user's click event on "Shuqi Novels" to uninstall the power saving policies; after that, it displays the screen shown in Figure 1c. The uninstallation interface of "Shuqi Novel"; if the user clicks "Uninstall" on the uninstallation interface, the mobile terminal will confirm the receipt of the uninstall click event input by the user, and uninstall "Shuqi Novel".

更优的,移动终端若接收到用户针对某一程序的禁止自启省电策略的点击事件后,禁止该程序自启,并在程序耗电排行榜显示界面中显示该程序已禁止。More preferably, if the mobile terminal receives the user's click event on a certain program forbidding the self-starting power-saving policy, the program is prohibited from starting automatically, and the program is displayed on the display interface of the program power consumption list that the program is prohibited.

例如,用户点击图1b中程序“书旗小说”的省电策略“禁止自启”,移动终端确认接收到用户针对“书旗小说”禁止自启省电策略的点击事件;之后,禁止“书旗小说”自启,并在如图1d所示的程序耗电排行榜显示界面中,对应“书旗小说”显示“已禁止”,并在原省电策略处显示“恢复自启”替换“禁止自启”。若用户点击“恢复自启”,则恢复“书旗小说”自启。For example, when the user clicks the power-saving policy "Prohibit self-starting" of the program "Shuqi Novels" in Figure 1b, the mobile terminal confirms that it has received the user's click event on the prohibition of self-starting power-saving policies for "Shuqi Novels"; Banner Novel” starts automatically, and in the program power consumption list display interface shown in Figure 1d, “Disabled” is displayed corresponding to “Book Banner Novel”, and “Resume Auto-start” is displayed instead of “Prohibited” at the original power saving policy. Self-start". If the user clicks "Resume Autostart", the autostart of "Shuqi Novels" will resume.

更优的,可以根据步骤S103中提取得到的移动终端的各硬件的耗电信息,统计出每个硬件的单位时间耗电量占比;根据统计出的各硬件的单位时间耗电量占比的大小,对各硬件进行排序;之后,在硬件耗电排行榜显示界面中,显示各硬件的单位时间耗电量占比。More preferably, according to the power consumption information of each hardware of the mobile terminal extracted in step S103, the proportion of power consumption per unit time of each hardware can be calculated; according to the proportion of power consumption per unit time of each hardware calculated The size of each hardware is sorted; after that, in the display interface of the hardware power consumption leaderboard, the proportion of power consumption per unit time of each hardware is displayed.

更进一步,对于每个硬件,确定该硬件相应的省电策略;例如,处理器的省电策略为降低运行频率或者减少运行核心,屏幕的省电策略为降低亮度或者减少背光时间;之后,在硬件耗电排行榜显示界面中,还显示各硬件的省电策略的链接。Furthermore, for each piece of hardware, determine the corresponding power-saving strategy of the hardware; for example, the power-saving strategy of the processor is to reduce the operating frequency or reduce the number of operating cores, and the power-saving strategy of the screen is to reduce the brightness or reduce the backlight time; after that, in In the display interface of the hardware power consumption leaderboard, links to the power saving strategies of each hardware are also displayed.

更优地,若进一步判断移动终端的当前电量小于设定电量阈值,则在显示界面上显示当前电量下移动终端剩余使用时间时,还可显示关闭耗电应用的提示。其中,所述耗电应用可以包括:蓝牙应用、和/或GPS应用、和/或wifi应用、和/或网络应用。More preferably, if it is further determined that the current power of the mobile terminal is less than the set power threshold, when the remaining usage time of the mobile terminal under the current power is displayed on the display interface, a prompt to close power-consuming applications can also be displayed. Wherein, the power consumption application may include: a Bluetooth application, and/or a GPS application, and/or a wifi application, and/or a network application.

更优地,若进一步判断移动终端的当前电量小于设定电量阈值,则在显示界面上显示当前电量下移动终端剩余使用时间时,还可显示当前开启的应用中,耗电排名前n个应用的名称;其中,n为预先设定的自然数。More preferably, if it is further judged that the current power of the mobile terminal is less than the set power threshold, when the remaining usage time of the mobile terminal under the current power is displayed on the display interface, the top n power consumption ranking applications among the currently opened applications can also be displayed. The name of ; where n is a preset natural number.

例如,当前开启的应用包括:地图应用、定位应用、wifi应用、微信应用、qq应用等;对当前开启的应用的耗电由大到小排序后,wifi应用耗电最大,之后依次为:地图应用、定位应用;则可以在显示界面上显示耗电排名前e的应用:wifi应用、地图应用、定位应用。For example, the currently opened applications include: map application, positioning application, wifi application, WeChat application, qq application, etc.; after sorting the power consumption of the currently opened applications in descending order, the wifi application consumes the most power, followed by: map application, positioning application; then the applications with the highest power consumption can be displayed on the display interface: wifi application, map application, and positioning application.

更优地,还可以在显示界面上显示省电按键,以及当前开启的应用中建议关闭的应用的名称;并在接收到所述省电按键的点击事件后,将所述建议关闭的应用停止运行。More preferably, the power saving button and the name of the application recommended to be closed among the currently open applications can also be displayed on the display interface; and after receiving the click event of the power saving button, the application suggested to be closed is stopped run.

例如,当前开启的应用包括:地图应用、定位应用、wifi应用、微信应用、qq应用等;而其中wifi应用为系统设置的建议关闭的应用,则在显示界面中显示有建议关闭的应用:wifi应用;并在接收到所述省电按键的点击事件后,将wifi应用关闭。For example, the currently opened applications include: map application, positioning application, wifi application, WeChat application, qq application, etc.; and among them, the wifi application is an application recommended to be closed by the system setting, and the application recommended to be closed is displayed in the display interface: wifi application; and after receiving the click event of the power saving button, close the wifi application.

本发明实施例中,事实上,安装于移动终端中的一个程序同时可能涉及到一些隐私行为,所涉及的隐私权限可以包括如下权限中的一个或者多个:读取短信记录、读取联系人信息、读取通话记录、拨打电话、发送短信、获取位置信息、使用话筒录音/通话录音、打开摄像头、打开移动网络开关、读取已安装应用列表、打开WiFi(Wireless Local AreaNetworks,无线局域网)开关、打开蓝牙开关、获取设备信息等等。In the embodiment of the present invention, in fact, a program installed in the mobile terminal may involve some privacy behaviors at the same time, and the privacy rights involved may include one or more of the following rights: read SMS records, read contacts Information, read call records, make calls, send text messages, obtain location information, use microphone recording/call recording, turn on the camera, turn on the mobile network switch, read the list of installed applications, turn on the WiFi (Wireless Local Area Networks, wireless local area network) switch , turn on the Bluetooth switch, obtain device information, etc.

本发明实施例中,隐私权限的建议值可以包括:建议允许、建议禁止或者建议提醒。In the embodiment of the present invention, the suggested value of the privacy right may include: suggested to allow, suggested to prohibit, or suggested to remind.

事实上,本发明的实施例在服务器的权限建议数据库中所记载的程序的隐私权限的建议值可以采用多种方法获取得到。In fact, the suggested value of the privacy permission of the program recorded in the permission suggestion database of the server according to the embodiment of the present invention can be obtained by various methods.

其中,程序的隐私权限的建议值的一种获取方法,具体包括:服务器通过多种途径(例如手机助手、应用市场等)获取各种各样的程序;在本服务器中创建沙箱,以生成程序的运行环境;安装并运行获取的程序,在程序运行过程中,模拟用户操作,利用沙箱技术,记录下每个程序的隐私权限;为每个程序的隐私权限配置合适的建议值;根据安装运行的程序的名称、记录的程序的隐私权限及与之相匹配的建议值,生成权限建议数据库。Among them, a method for obtaining the recommended value of the privacy authority of the program includes: the server obtains various programs through various channels (such as mobile assistants, application markets, etc.); creating a sandbox in the server to generate The operating environment of the program; install and run the obtained program, simulate user operations during the running of the program, and use sandbox technology to record the privacy permissions of each program; configure appropriate recommended values for the privacy permissions of each program; The name of the program to be installed and run, the privacy permission of the recorded program and the corresponding suggested value to generate a permission suggestion database.

众多的移动终端在监控到有程序安装到本移动终端中时,获取用户对该程序的隐私权限的设定值,并引导用户将该程序的名称、该程序的隐私权限及隐私权限的设定值携带于隐私权限报告中上传至服务器;服务器将上传的隐私权限报告中的隐私权限的设定值作为隐私权限的建议值;根据隐私权限的建议值,以及隐私权限报告中程序的名称和隐私权限,生成隐私权限数据库。When a large number of mobile terminals monitor that a program is installed in the mobile terminal, they obtain the user's setting value of the privacy authority of the program, and guide the user to the name of the program, the privacy authority of the program and the setting of the privacy authority The value is carried in the privacy permission report and uploaded to the server; the server uses the setting value of the privacy permission in the uploaded privacy permission report as the recommended value of the privacy permission; according to the suggested value of the privacy permission, and the name and privacy of the program in the privacy permission report Permissions to generate a privacy permission database.

较佳地,云端服务器可以为上传的程序的隐私权限配置合适的建议值。Preferably, the cloud server can configure an appropriate suggested value for the privacy permission of the uploaded program.

更优的,云端服务器可以对多种程序进行分类。例如,将系统程序或预装的程序划分为系统程序;将被用户、系统或安全程序识别为信任的程序划分为信任程序;将用户安装的且被识别为信任的程序划分为用户程序。之后,云端服务器可以将系统程序和信任程序的隐私权限的建议值都设置为建议允许。云端服务器可以将程序的类别对应该程序的名称增加到权限建议数据库中。More preferably, the cloud server can classify various programs. For example, classify system programs or preinstalled programs as system programs; classify programs identified as trusted by users, system or security programs as trusted programs; classify programs installed by users and identified as trusted programs as user programs. Afterwards, the cloud server can set the suggested values of the privacy permissions of the system program and the trusted program as suggested to allow. The cloud server may add the category of the program corresponding to the name of the program to the permission suggestion database.

更优的,云端服务器还可以将各隐私权限进行分类。例如,将读取短信记录、读取联系人信息和读取通话记录划分为绝密隐私权限;将拨打电话、发送短信、获取位置信息、使用话筒录音/通话录音、打开摄像头和打开移动网络开关划分为重要隐私权限;将读取已安装应用列表、打开WiFi开关、打开蓝牙开关、获取设备信息划分为普通隐私权限。云端服务器可以将隐私权限的类别对应该隐私权限增加到权限建议数据库中。More preferably, the cloud server can also classify each privacy permission. For example, read text message records, read contact information, and read call records are divided into top-secret privacy permissions; make calls, send text messages, obtain location information, use microphone recording/call recording, turn on the camera, and turn on the mobile network switch It is an important privacy permission; reading the list of installed applications, turning on the WiFi switch, turning on the Bluetooth switch, and obtaining device information are divided into ordinary privacy permissions. The cloud server may add the category of the privacy permission corresponding to the privacy permission to the permission suggestion database.

这样的话,在上述禁止耗电应用的过程中,当检测到服务端查询结果为耗电应用,结合隐私权限的建议值来进行综合判断,如果同时属于耗电应用,且建议值存在风险,则禁止该应用自启动。In this case, in the above-mentioned process of prohibiting power-consuming applications, when it is detected that the query result of the server is a power-consuming application, a comprehensive judgment is made based on the recommended value of the privacy permission. Prevents the app from launching itself.

基于上述移动终端的耗电信息的检测结果展示方法,本发明实施例提供了一种移动终端的耗电信息的检测结果展示系统,该系统的内部结构的框架示意图如图2所示,包括:系统权限获取模块201、服务数据获取模块202、耗电信息提取模块203、排序模块204和显示模块205。Based on the above method for displaying detection results of power consumption information of mobile terminals, an embodiment of the present invention provides a system for displaying detection results of power consumption information of mobile terminals. A schematic diagram of the internal structure of the system is shown in FIG. 2 , including: A system authority acquisition module 201 , a service data acquisition module 202 , a power consumption information extraction module 203 , a sorting module 204 and a display module 205 .

其中,系统权限获取模块201用于获得移动终端的操作系统的系统权限。Wherein, the system authority obtaining module 201 is used for obtaining the system authority of the operating system of the mobile terminal.

服务数据获取模块202用于在系统权限获取模块201获得的系统权限下,从操作系统获取电池状态服务所记录的数据;具体地,服务数据获取模块202利用系统权限,创建一个基于系统权限的进程;由该进程读取电池状态服务所记录的数据后,存储到电量数据库中,并发送数据提取通知。The service data acquisition module 202 is used to obtain the data recorded by the battery status service from the operating system under the system authority obtained by the system authority acquisition module 201; specifically, the service data acquisition module 202 uses the system authority to create a process based on the system authority ; After the process reads the data recorded by the battery status service, store it in the power database, and send a data extraction notification.

耗电信息提取模块203用于从获取的数据中,提取出移动终端的各程序的耗电信息;具体地,耗电信息提取模块203接收到数据提取通知后,从电量数据库的数据中,提取出移动终端的各程序的耗电信息。The power consumption information extraction module 203 is used to extract the power consumption information of each program of the mobile terminal from the acquired data; specifically, after receiving the data extraction notification, the power consumption information extraction module 203 extracts from the data in the power database Display the power consumption information of each program of the mobile terminal.

排序模块204用于将各程序依照各自的耗电信息进行排序;具体地,排序展示模块204根据耗电信息提取模块203提取出的移动终端中各程序的耗电信息,统计出每个程序的单位时间耗电量占比;根据统计出的各程序的单位时间耗电量占比的大小,对各程序进行排序,得到排序结果。The sorting module 204 is used to sort the programs according to their respective power consumption information; specifically, the sorting display module 204 calculates the power consumption information of each program in the mobile terminal extracted by the power consumption information extraction module 203, and calculates the power consumption of each program. Proportion of power consumption per unit time; according to the statistics of the proportion of power consumption per unit time of each program, the programs are sorted to obtain the sorting result.

显示模块205用于将排序模块204的得到的排序结果进行展示;具体地,显示模块205在程序耗电排行榜显示界面中,显示各程序的单位时间耗电量占比。较佳地,如图2所示,移动终端的耗电信息获取系统,还包括:省电策略确定模块206。The display module 205 is used to display the sorting results obtained by the sorting module 204; specifically, the display module 205 displays the proportion of power consumption per unit time of each program in the program power consumption list display interface. Preferably, as shown in FIG. 2 , the system for acquiring power consumption information of a mobile terminal further includes: a power saving policy determination module 206 .

省电策略确定模块206用于对于每个程序,根据排序模块204统计出的该程序的单位时间耗电量占比,确定相应的省电策略。The power saving strategy determining module 206 is used for determining a corresponding power saving strategy for each program according to the power consumption ratio per unit time of the program calculated by the sorting module 204 .

显示模块205还用于在程序耗电排行榜显示界面中,显示各程序的省电策略的链接。The display module 205 is further configured to display the links of the power saving policies of each program in the program power consumption leaderboard display interface.

上述系统权限获取模块201、服务数据获取模块202、耗电信息提取模块203、排序模块204、显示模块205和省电策略确定模块206功能的具体实现方法,可以参考上述如图1a所示的方法流程步骤的具体内容,此处不再赘述。For the specific implementation methods of the functions of the above-mentioned system authority acquisition module 201, service data acquisition module 202, power consumption information extraction module 203, sorting module 204, display module 205 and power saving policy determination module 206, please refer to the above method as shown in Figure 1a The specific content of the process steps will not be repeated here.

本发明实施例的技术方案中,利用系统权限获取电池状态服务所记录的数据,从中提取出移动终端的各程序的耗电信息,并排序展示给用户。从而使得用户在使用高版本的操作系统时,仍然可以有效地获知比较耗电的程序,加以省电优化,以延长移动终端的续航时间,提高用户的体验。In the technical solution of the embodiment of the present invention, the data recorded by the battery status service is obtained by using the system authority, and the power consumption information of each program of the mobile terminal is extracted therefrom, and displayed to the user in order. Therefore, when the user is using a high-version operating system, he can still effectively learn about relatively power-consuming programs and perform power-saving optimization, so as to prolong the battery life of the mobile terminal and improve user experience.

而且,该技术方案中,还将确定出的各程序的省电策略展示给用户,有利于用户根据省电策略进行省电优化。Moreover, in this technical solution, the determined power-saving strategies of each program are displayed to the user, which is beneficial for the user to optimize power-saving according to the power-saving strategy.

本技术领域云端服务器可以理解,本发明包括涉及用于执行本申请中所述操作中的一项或多项的设备。这些设备可以为所需的目的而专门设计和制造,或者也可以包括通用计算机中的已知设备。这些设备具有存储在其内的计算机程序,这些计算机程序选择性地激活或重构。这样的计算机程序可以被存储在设备(例如,计算机)可读介质中或者存储在适于存储电子指令并分别耦联到总线的任何类型的介质中,所述计算机可读介质包括但不限于任何类型的盘(包括软盘、硬盘、光盘、CD-ROM、和磁光盘)、ROM(Read-Only Memory,只读存储器)、RAM(Random Access Memory,随即存储器)、EPROM(Erasable ProgrammableRead-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically ErasableProgrammable Read-Only Memory,电可擦可编程只读存储器)、闪存、磁性卡片或光线卡片。也就是,可读介质包括由设备(例如,计算机)以能够读的形式存储或传输信息的任何介质。Cloud servers in the technical field can understand that the present invention includes devices for performing one or more of the operations described in this application. These devices may be specially designed and fabricated for the required purposes, or they may include known devices found in general purpose computers. These devices have computer programs stored therein that are selectively activated or reconfigured. Such a computer program can be stored in a device (e.g., computer) readable medium, including but not limited to any type of medium suitable for storing electronic instructions and respectively coupled to a bus. Types of disks (including floppy disks, hard disks, CDs, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory, read-only memory), RAM (Random Access Memory, random access memory), EPROM (Erasable Programmable Read-Only Memory, Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical card. That is, a readable medium includes any medium that stores or transmits information in a form readable by a device (eg, a computer).

本技术领域云端服务器可以理解,可以用计算机程序指令来实现这些结构图和/或框图和/或流图中的每个框以及这些结构图和/或框图和/或流图中的框的组合。本技术领域云端服务器可以理解,可以将这些计算机程序指令提供给通用计算机、专业计算机或其他可编程数据处理方法的处理器来实现,从而通过计算机或其他可编程数据处理方法的处理器来执行本发明公开的结构图和/或框图和/或流图的框或多个框中指定的方案。Cloud servers in the technical field can understand that computer program instructions can be used to implement each block in these structural diagrams and/or block diagrams and/or flow diagrams and combinations of blocks in these structural diagrams and/or block diagrams and/or flow diagrams . Cloud servers in the technical field can understand that these computer program instructions can be provided to general-purpose computers, professional computers, or processors of other programmable data processing methods for implementation, so that the computer or processors of other programmable data processing methods can execute the present invention. A scheme specified in a block or blocks of a structure diagram and/or a block diagram and/or a flow diagram of the invention disclosure.

本技术领域云端服务器可以理解,本发明中已经讨论过的各种操作、方法、流程中的步骤、措施、方案可以被交替、更改、组合或删除。进一步地,具有本发明中已经讨论过的各种操作、方法、流程中的其他步骤、措施、方案也可以被交替、更改、重排、分解、组合或删除。进一步地,现有技术中的具有与本发明中公开的各种操作、方法、流程中的步骤、措施、方案也可以被交替、更改、重排、分解、组合或删除。The cloud server in the technical field can understand that the various operations, methods, and steps, measures, and solutions in the processes that have been discussed in the present invention can be replaced, changed, combined, or deleted. Further, other steps, measures, and schemes in the various operations, methods, and processes that have been discussed in the present invention may also be replaced, changed, rearranged, decomposed, combined, or deleted. Further, steps, measures, and schemes in the prior art that have operations, methods, and processes disclosed in the present invention can also be alternated, changed, rearranged, decomposed, combined, or deleted.

以上所述仅是本发明的部分实施方式,应当指出,对于本技术领域的普通云端服务器来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above descriptions are only some implementations of the present invention. It should be pointed out that for common cloud servers in the technical field, some improvements and modifications can also be made without departing from the principles of the present invention. It should be regarded as the protection scope of the present invention.

Claims (9)

Translated fromChinese
1.一种移动终端的耗电信息的检测结果展示方法,其特征在于,包括:1. A detection result display method of power consumption information of a mobile terminal, characterized in that, comprising:获得所述移动终端的操作系统的系统权限,包括:提示用户需要获取系统权限;接收到所述用户输入的获取系统权限的指令后,获取所述操作系统的系统权限;Obtaining the system authority of the operating system of the mobile terminal includes: prompting the user to obtain the system authority; obtaining the system authority of the operating system after receiving the instruction for obtaining the system authority input by the user;在所述系统权限下从所述操作系统获取电池状态服务所记录的数据;Obtaining the data recorded by the battery status service from the operating system under the system authority;从获取的数据中,提取出所述移动终端的各程序的耗电信息;Extracting power consumption information of each program of the mobile terminal from the acquired data;将所述各程序依照各自的耗电信息进行排序后,将排序结果进行展示;根据每个程序的单位时间耗电量占比,确定相应的省电策略;在程序耗电排行榜显示界面中,显示各程序的省电策略的链接。After sorting the programs according to their respective power consumption information, display the sorting results; determine the corresponding power saving strategy according to the proportion of power consumption per unit time of each program; in the program power consumption list display interface to display links to the power saving policies for each program.2.根据权利要求1所述的方法,其特征在于,所述从所述操作系统获取电池状态服务所记录的数据,具体包括:2. The method according to claim 1, wherein the obtaining the data recorded by the battery status service from the operating system specifically comprises:创建一个基于系统权限的进程;Create a process based on system privileges;由所述进程读取所述电池状态服务所记录的数据后,存储到电量数据库中;以及After the data recorded by the battery status service is read by the process, it is stored in the power database; and所述从获取的数据中,提取出所述移动终端的各程序的耗电信息,具体包括:The extracting the power consumption information of each program of the mobile terminal from the acquired data specifically includes:从所述电量数据库的数据中,提取出所述移动终端的各程序的耗电信息。The power consumption information of each program of the mobile terminal is extracted from the data in the power database.3.根据权利要求1或2所述的方法,其特征在于,所述程序的耗电信息具体包括:该程序的单位时间耗电量;以及3. The method according to claim 1 or 2, wherein the power consumption information of the program specifically includes: power consumption per unit time of the program; and所述将所述各程序依照各自的耗电信息进行排序,具体包括:The ordering of the programs according to their respective power consumption information specifically includes:根据各程序的耗电信息,统计出每个程序的单位时间耗电量占比;According to the power consumption information of each program, the proportion of power consumption per unit time of each program is calculated;根据各程序的单位时间耗电量占比的大小,对各程序进行排序;以及Sort each program according to the proportion of power consumption per unit time of each program; and所述将排序结果进行展示,具体包括:The display of the sorting results includes:在程序耗电排行榜显示界面中,显示各程序的单位时间耗电量占比。In the display interface of the program power consumption leaderboard, the proportion of power consumption per unit time of each program is displayed.4.根据权利要求1所述的方法,其特征在于,所述根据该程序的单位时间耗电量占比,确定相应的省电策略,具体包括:4. The method according to claim 1, characterized in that, according to the proportion of power consumption per unit time of the program, the corresponding power saving strategy is determined, specifically comprising:根据该程序的单位时间耗电量占比的大小,确定该程序的耗电级别;Determine the power consumption level of the program according to the proportion of power consumption per unit time of the program;将与该耗电级别对应的省电策略作为所述相应的省电策略。The power saving policy corresponding to the power consumption level is used as the corresponding power saving policy.5.根据权利要求4所述的方法,其特征在于,所述耗电级别具体为耗电超高级别,则与之对应的省电策略具体为卸载;或者,5. The method according to claim 4, wherein the power consumption level is specifically an ultra-high power consumption level, and the corresponding power saving strategy is specifically unloading; or,所述耗电级别具体为耗电较高级别,则与之对应的省电策略具体为禁止自启;或者,The power consumption level is specifically a higher level of power consumption, and the corresponding power saving strategy is specifically to prohibit self-starting; or,所述耗电级别具体为耗电一般级别,则与之对应的省电策略具体为建议关闭;或者,The power consumption level is specifically a general power consumption level, and the power saving strategy corresponding to it is specifically recommended to close; or,所述耗电级别具体为耗电较低级别,则与之对应的省电策略具体为保持现状;或者,The power consumption level is specifically a low power consumption level, and the corresponding power saving strategy is specifically to maintain the status quo; or,所述耗电级别具体为耗电极低级别,则与之对应的省电策略具体为适合长期运行。The power consumption level is specifically an extremely low power consumption level, and the corresponding power saving strategy is specifically suitable for long-term operation.6.根据权利要求5所述的方法,其特征在于,还包括:6. The method according to claim 5, further comprising:若接收到用户针对所述卸载省电策略的点击事件后,显示该程序的卸载界面;若通过所述卸载界面接收到用户输入的卸载点击事件,则卸载该程序;或者If the click event of the user for the uninstallation power-saving strategy is received, the uninstall interface of the program is displayed; if the uninstall click event input by the user is received through the uninstall interface, the program is uninstalled; or若接收到用户针对所述禁止自启省电策略的点击事件后,禁止该程序自启,并在所述程序耗电排行榜显示界面中对应该程序显示已禁止。After receiving the user's click event on the prohibition of self-starting power saving policy, the program is prohibited from starting itself, and the program is displayed as prohibited in the program power consumption list display interface.7.根据权利要求1或2所述的方法,其特征在于,所述从获取的数据中,提取出所述移动终端的各程序的耗电信息时,还包括:7. The method according to claim 1 or 2, wherein, when extracting the power consumption information of each program of the mobile terminal from the acquired data, further comprising:从获取的数据中,提取出所述移动终端的各硬件的耗电信息;以及Extracting power consumption information of each hardware of the mobile terminal from the acquired data; and所述将所述各程序依照各自的耗电信息进行排序时,还包括:When sorting the programs according to their respective power consumption information, it also includes:将所述各硬件依照各自的耗电信息进行排序。The hardware is sorted according to its power consumption information.8.一种移动终端的耗电信息的检测结果展示系统,其特征在于,包括:8. A detection result display system for power consumption information of a mobile terminal, characterized in that it comprises:系统权限获取模块,用于获得所述移动终端的操作系统的系统权限,包括:提示用户需要获取系统权限;接收到所述用户输入的获取系统权限的指令后,获取所述操作系统的系统权限;The system authority acquisition module is used to obtain the system authority of the operating system of the mobile terminal, including: prompting the user to obtain the system authority; after receiving the instruction for obtaining the system authority input by the user, acquiring the system authority of the operating system ;服务数据获取模块,用于在所述系统权限获取模块获得的系统权限下,从所述操作系统获取电池状态服务所记录的数据;A service data acquisition module, configured to acquire the data recorded by the battery status service from the operating system under the system authority obtained by the system authority acquisition module;耗电信息提取模块,用于从所述获取的数据中,提取出所述移动终端的各程序的耗电信息;A power consumption information extraction module, configured to extract the power consumption information of each program of the mobile terminal from the acquired data;排序模块,用于将所述各程序依照各自的耗电信息进行排序,得到排序结果;A sorting module, configured to sort the programs according to their respective power consumption information to obtain a sorting result;省电策略确定模块,用于根据所述排序模块统计出的每个程序的单位时间耗电量占比,确定相应的省电策略;A power saving strategy determination module, configured to determine a corresponding power saving strategy according to the proportion of power consumption per unit time of each program calculated by the sorting module;显示模块,用于将所述排序结果进行展示;在程序耗电排行榜显示界面中,显示各程序的省电策略的链接。The display module is configured to display the sorting results; on the program power consumption list display interface, display the links of the power saving strategies of each program.9.根据权利要求8所述的系统,其特征在于,9. The system of claim 8, wherein:所述服务数据获取模块具体用于创建一个基于系统权限的进程;由所述进程读取所述电池状态服务所记录的数据后,存储到电量数据库中,并发送数据提取通知;以及The service data acquisition module is specifically used to create a process based on system authority; the process reads the data recorded by the battery status service, stores it in the power database, and sends a data extraction notification; and所述耗电信息提取模块具体用于接收到所述数据提取通知后,从所述电量数据库的数据中,提取出所述移动终端的各程序的耗电信息。The power consumption information extraction module is specifically configured to extract the power consumption information of each program of the mobile terminal from the data in the power database after receiving the data extraction notification.
CN201410832106.8A2014-12-262014-12-26The testing result methods of exhibiting and system of the power consumption information of mobile terminalActiveCN104516806B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201410832106.8ACN104516806B (en)2014-12-262014-12-26The testing result methods of exhibiting and system of the power consumption information of mobile terminal

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201410832106.8ACN104516806B (en)2014-12-262014-12-26The testing result methods of exhibiting and system of the power consumption information of mobile terminal

Publications (2)

Publication NumberPublication Date
CN104516806A CN104516806A (en)2015-04-15
CN104516806Btrue CN104516806B (en)2017-12-08

Family

ID=52792152

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201410832106.8AActiveCN104516806B (en)2014-12-262014-12-26The testing result methods of exhibiting and system of the power consumption information of mobile terminal

Country Status (1)

CountryLink
CN (1)CN104516806B (en)

Families Citing this family (31)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104991851A (en)*2015-06-262015-10-21小米科技有限责任公司Method and apparatus for monitoring electric quantity of terminal
CN105072290B (en)*2015-07-232017-11-10广东欧珀移动通信有限公司The screen brightness regulation method and device of a kind of terminal
CN105138104A (en)*2015-07-312015-12-09北京金山安全软件有限公司Power-saving processing method and device, mobile terminal and cloud server
CN106469089A (en)*2015-08-212017-03-01百度在线网络技术(北京)有限公司For making the nonsystematic in terminal apply method and device, the terminal realizing system level interface interchange
CN105302684B (en)*2015-11-132018-07-10北京金山安全软件有限公司Standby power consumption testing method and device for electronic equipment and electronic equipment
CN105553963B (en)*2015-12-102019-11-29小米科技有限责任公司The control method and device of positioning service
CN105573891B (en)*2015-12-152019-03-08北京奇虎科技有限公司 An Android application power consumption statistics method and device
CN105373482A (en)*2015-12-232016-03-02北京金山安全软件有限公司Method and device for detecting abnormal power consumption of application program and electronic equipment
CN105677141A (en)*2015-12-292016-06-15深圳市金立通信设备有限公司Application program management method and terminal
CN106951050B (en)*2016-01-062020-11-06北京小米移动软件有限公司Method and device for determining power consumption of terminal
WO2017128066A1 (en)*2016-01-262017-08-03陈学良Method for pushing information when power consumption of mobile phone program is measured and detection system
CN105828424B (en)*2016-03-112019-12-13北京奇虎科技有限公司 Intelligent terminal and energy consumption quantitative control method
US10635510B2 (en)2016-03-302020-04-28Huawei Technologies Co., Ltd.Broadcast control method and apparatus, and terminal
CN105975305B (en)*2016-04-292019-03-22北京小米移动软件有限公司OS Events processing method, device and terminal
CN106055406A (en)*2016-05-202016-10-26深圳天珑无线科技有限公司Program operation method and terminal
CN106789443A (en)*2017-01-132017-05-31百度在线网络技术(北京)有限公司The method and apparatus of network access request analysis result is presented
CN106936826B (en)*2017-03-102020-01-14Oppo广东移动通信有限公司Registration method and device of broadcast receiver and terminal equipment
CN107220160B (en)*2017-05-272021-01-15北京奇虎科技有限公司Method and device for determining electric quantity consumption of application program
CN107291211A (en)*2017-06-052017-10-24北京奇虎科技有限公司The electric quantity consumption of application program determines method and device
CN107291592A (en)*2017-06-162017-10-24北京奇虎科技有限公司The electric quantity consumption of application program determines method and device
CN107357703B (en)*2017-06-162020-09-29奇安信科技集团股份有限公司Terminal application power consumption detection method and server
CN107391241A (en)*2017-06-222017-11-24努比亚技术有限公司Using quick start method, terminal and computer-readable recording medium
CN107197103B (en)*2017-07-062020-07-31三星电子(中国)研发中心 Power-saving operation control method and device for intelligent terminal
CN108419131B (en)*2017-09-212020-05-19荆书光Device for preventing children myopia
CN108419127B (en)*2017-09-212020-07-21苗娟Method for preventing myopia of children
CN109726088A (en)*2018-05-172019-05-07平安科技(深圳)有限公司Management method, device, equipment and the readable storage medium storing program for executing of electricity data
CN108960817B (en)*2018-07-112022-01-25深圳市银联金融网络有限公司Electronic payment platform based on electric quantity detection
CN110070468A (en)*2019-03-302019-07-30程慧玲A kind of cell phone software behavioral data extraction system
CN110264184B (en)*2019-06-282021-07-23Oppo(重庆)智能科技有限公司Payment control method and related product
CN113051128B (en)*2019-12-272022-06-28Oppo广东移动通信有限公司Power consumption detection method and device, electronic equipment and storage medium
CN116760875B (en)*2023-08-232023-10-20龙岩煜联信息技术有限公司Information system integrated service system and terminal based on Internet of things

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101697562A (en)*2009-10-292010-04-21中兴通讯股份有限公司Mobile terminal and method for displaying power consumption rate thereof
CN102129287A (en)*2011-03-172011-07-20宇龙计算机通信科技(深圳)有限公司Mobile terminal and power supply management method for application program thereof
CN102325219A (en)*2011-09-052012-01-18北京百纳威尔科技有限公司Method and device for processing electric quantity of mobile terminal
WO2013167022A2 (en)*2013-02-222013-11-14中兴通讯股份有限公司Method and device for achieving mobile terminal power saving and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101697562A (en)*2009-10-292010-04-21中兴通讯股份有限公司Mobile terminal and method for displaying power consumption rate thereof
CN102129287A (en)*2011-03-172011-07-20宇龙计算机通信科技(深圳)有限公司Mobile terminal and power supply management method for application program thereof
CN102325219A (en)*2011-09-052012-01-18北京百纳威尔科技有限公司Method and device for processing electric quantity of mobile terminal
WO2013167022A2 (en)*2013-02-222013-11-14中兴通讯股份有限公司Method and device for achieving mobile terminal power saving and mobile terminal

Also Published As

Publication numberPublication date
CN104516806A (en)2015-04-15

Similar Documents

PublicationPublication DateTitle
CN104516806B (en)The testing result methods of exhibiting and system of the power consumption information of mobile terminal
US11200101B2 (en)Managing applications for power conservation
CN104199669B (en)The method and device being managed to the process of application program
CN104199731B (en)The method and device being managed to the process of application program
CN104462952B (en)A kind of method and device forbidden using self-starting
CN104221445B (en) Method and terminal for waking up terminal system
CN104375869B (en)Self-starting application control method and device
CN106844026B (en)Method and system for cleaning terminal equipment process
CN107943269B (en) Scheduling operation control method, device, terminal device and storage medium
CN104462980A (en)Authority management method, device and system of application programs and mobile terminal
US20200396325A1 (en)Application switching method and terminal
CN105388990A (en) Power saving processing method and device for terminal equipment
CN106256116A (en) A method and terminal for controlling an application program
CN107748698A (en) Control method, device, storage medium and terminal for starting application in broadcast mode
CN104680060A (en)Procedure self-starting management method and procedure self-starting management device
US11816200B2 (en)Terminal and method for managing launch of an application of a terminal
CN106406944A (en)Control method and system for forbidding self-starting of application
CN105335146A (en) Method for managing software data traffic and portable electronic device
CN106020426B (en)Method and device for releasing wake-up lock
US10878078B2 (en)System notification service control method, apparatus, terminal device, and storage medium
Lee et al.CAS: Context-aware background application scheduling in interactive mobile systems
CN116049820A (en) Rogue application detection method, electronic device and communication system
CN106484482A (en)A kind of application management method of attending to anything else opened in application, device and intelligent terminal more
CN107943268A (en)Scheduling job control method, device, terminal equipment and storage medium
SutterSimple spyware: Androids invisible foreground services and how to (ab) use them

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
TR01Transfer of patent right

Effective date of registration:20220728

Address after:Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after:BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before:100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before:BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before:Qizhi software (Beijing) Co.,Ltd.

TR01Transfer of patent right

[8]ページ先頭

©2009-2025 Movatter.jp