




技术领域technical field
本发明实施例涉及移动终端技术领域,尤其涉及耗电异常诊断方法、移动终端和计算机可读存储介质。Embodiments of the present invention relate to the technical field of mobile terminals, and in particular, to a method for diagnosing abnormal power consumption, a mobile terminal, and a computer-readable storage medium.
背景技术Background technique
智能移动终端的使用场景越来越多。随着硬件功能日益强大,移动终端的功能也越来越丰富,但是功能强大所带来的功耗问题和发热问题也日益严重。There are more and more usage scenarios of smart mobile terminals. With the increasingly powerful hardware functions, the functions of the mobile terminal are also becoming more and more abundant, but the power consumption and heating problems brought about by the powerful functions are also becoming more and more serious.
随着用户在移动终端上不断安装各种应用程序,和各种环境因素的变化,因耗电快而导致的发热现象也越来越多,用户却很难得知耗电异常的原因。由于耗电异常出现时的情况无法再现,因此,分析解决功耗和发热问题的难度很大,并且难以考虑到所有影响因素,更难以准确地诊断出耗电异常的原因。As users continue to install various application programs on mobile terminals and various environmental factors change, more and more heat generation occurs due to fast power consumption, but it is difficult for users to know the cause of abnormal power consumption. Since the situation when the abnormal power consumption occurs cannot be reproduced, it is very difficult to analyze and solve the problem of power consumption and heat generation, and it is difficult to consider all the influencing factors, and it is even more difficult to accurately diagnose the cause of the abnormal power consumption.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种耗电异常的诊断方法、移动终端和存储介质,在耗电快或设备发热的情况发生时,分析出耗电异常的原因,解决了因设备运行情况无法复现导致的耗电异常分析困难的问题。Embodiments of the present invention provide a method for diagnosing abnormal power consumption, a mobile terminal, and a storage medium, which can analyze the cause of abnormal power consumption when the power consumption is fast or the device is overheated, and solve the problem of the failure of reproducing the operation of the device. The problem of abnormal power consumption analysis is difficult.
第一方面,提供了一种耗电异常的诊断方法,所述方法包括:In a first aspect, a method for diagnosing abnormal power consumption is provided, the method comprising:
获取至少一个硬件模块的耗电量;Get the power consumption of at least one hardware module;
确定耗电量满足预设条件的硬件模块作为目标硬件模块;Determine the hardware module whose power consumption meets the preset condition as the target hardware module;
获取应用程序的运行参数,所述应用程序调用所述目标硬件模块;Obtain the running parameters of the application program, and the application program calls the target hardware module;
判断所述应用程序的运行参数是否超出预设参数范围;Determine whether the operating parameters of the application program exceed the preset parameter range;
若是,则确定所述应用程序导致耗电异常;若否,则确定所述目标硬件模块导致耗电异常。If so, it is determined that the application program causes abnormal power consumption; if not, it is determined that the target hardware module causes abnormal power consumption.
第二方面,提供了一种移动终端,包括:In a second aspect, a mobile terminal is provided, including:
耗电量获取模块,用于获取至少一个硬件模块的耗电量;a power consumption acquisition module for acquiring the power consumption of at least one hardware module;
目标硬件确定模块,用于确定耗电量满足预设条件的硬件模块作为目标硬件模块;A target hardware determination module, used for determining a hardware module whose power consumption satisfies a preset condition as a target hardware module;
参数获取模块,用于获取应用程序的运行参数,所述应用程序调用所述目标硬件模块;a parameter acquisition module, used for acquiring the running parameters of an application program that calls the target hardware module;
参数判断模块,用于判断所述应用程序的运行参数是否超出预设参数范围;A parameter judgment module for judging whether the running parameters of the application program exceed the preset parameter range;
异常确定模块,用于若是,则确定所述应用程序导致耗电异常;若否,则确定所述目标硬件模块导致耗电异常。An abnormality determination module, configured to determine if the application program causes abnormal power consumption; if not, determine that the target hardware module causes abnormal power consumption.
第三方面,提供了一种移动终端,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的耗电异常的诊断程序,所述耗电异常的诊断程序被所述处理器执行时实现本发明中任意一种耗电异常的诊断方法的步骤。In a third aspect, a mobile terminal is provided, including: a memory, a processor, and a diagnostic program for abnormal power consumption stored on the memory and executable on the processor, wherein the diagnostic program for abnormal power consumption is The processor implements the steps of any of the methods for diagnosing abnormal power consumption in the present invention when executed.
第四方面,提供了一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有耗电异常的诊断程序,所述耗电异常的诊断程序被处理器执行时实现本发明中任意一种耗电异常的诊断方法的步骤。In a fourth aspect, a computer-readable storage medium is provided, wherein a diagnostic program for abnormal power consumption is stored on the computer-readable storage medium, and the diagnostic program for abnormal power consumption is executed by a processor. The steps of any one of the methods for diagnosing abnormal power consumption in the invention.
这样,本发明实施例中,通过获取至少一个硬件模块的耗电量,确定耗电量满足预设条件的硬件模块作为目标硬件模块,获取应用程序的运行参数,所述应用程序调用所述目标硬件模块,判断所述应用程序的运行参数是否超出预设参数范围,若是,则确定所述应用程序导致耗电异常,若否,则确定所述目标硬件模块导致耗电异常,使得可以在耗电快或设备发热的情况发生时,分析出耗电异常的原因,解决了因设备运行情况无法复现导致的耗电异常原因分析困难的问题。In this way, in this embodiment of the present invention, by acquiring the power consumption of at least one hardware module, a hardware module whose power consumption meets a preset condition is determined as a target hardware module, and running parameters of an application program are acquired, and the application program calls the target hardware module. The hardware module determines whether the running parameters of the application program exceed the preset parameter range. If so, determine that the application program causes abnormal power consumption. If not, determine that the target hardware module causes abnormal power consumption, so that the power consumption can be abnormal. When the power is too fast or the equipment is overheated, the cause of the abnormal power consumption is analyzed, which solves the problem of difficulty in analyzing the cause of the abnormal power consumption caused by the inability to reproduce the operation of the equipment.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the drawings that are used in the description of the embodiments of the present invention. Obviously, the drawings in the following description are only some embodiments of the present invention. , for those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative labor.
图1是根据本发明一个实施例的一种耗电异常的诊断方法的流程图;1 is a flowchart of a method for diagnosing abnormal power consumption according to an embodiment of the present invention;
图2是根据本发明另一个实施例的一种耗电异常的诊断方法的流程图;2 is a flowchart of a method for diagnosing abnormal power consumption according to another embodiment of the present invention;
图3是根据本发明又一个实施例的一种移动终端的框图;3 is a block diagram of a mobile terminal according to yet another embodiment of the present invention;
图4是本发明又一个实施例的移动终端的框图;4 is a block diagram of a mobile terminal according to another embodiment of the present invention;
图5是本发明又一个实施例的移动终端的结构示意图。FIG. 5 is a schematic structural diagram of a mobile terminal according to another embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
参照图1,示出了根据本发明一个实施例的一种耗电异常的诊断方法的流程图,具体可以包括如下步骤:1 , a flowchart of a method for diagnosing abnormal power consumption according to an embodiment of the present invention is shown, which may specifically include the following steps:
步骤101,获取至少一个硬件模块的耗电量。Step 101: Obtain power consumption of at least one hardware module.
在本发明实施例中,硬件模块包括移动终端上需要用电的多种硬件,例如,处理器、图形处理器、显示器、无线网卡、移动网络芯片等,或者其他任意适用的硬件模块,本发明实施例对此不做限制。耗电量包括硬件模块在一定时间段内所消耗的电能。In this embodiment of the present invention, the hardware module includes a variety of hardware that needs to use electricity on the mobile terminal, for example, a processor, a graphics processor, a display, a wireless network card, a mobile network chip, etc., or any other applicable hardware modules. The embodiment does not limit this. Power consumption includes the power consumed by hardware modules over a certain period of time.
移动终端上各个硬件模块的耗电量可以根据各个硬件模块工作的电流值计算得到,也可以通过监测耗电的硬件设备监测得到,或者其他任意适用的方式,本发明实施例对此不做限制。The power consumption of each hardware module on the mobile terminal can be calculated according to the current value of the work of each hardware module, or can be obtained by monitoring a hardware device that monitors power consumption, or any other applicable method, which is not limited in this embodiment of the present invention .
步骤102,确定耗电量满足预设条件的硬件模块作为目标硬件模块。
在本发明实施例中,各个硬件模块的耗电量会受多种因素影响,具体可以包括移动终端当前执行的任务、硬件模块的工作环境、硬件模块的自身状态等中至少一种。设定条件用于判断耗电过快的一个或多个目标硬件模块,具体可以包括一定时间段内,占总耗电量的比例最高的至少一个硬件模块、一定时间段内,耗电量超出设定耗电阈值的至少一个硬件模块、一定时间段内,占总耗电量的比例超出硬件设备对应的预设比例阈值的至少一个硬件模块等中至少一种,或者其他任意适用的条件,本发明实施例对此不做限制。In this embodiment of the present invention, the power consumption of each hardware module is affected by various factors, which may specifically include at least one of the tasks currently performed by the mobile terminal, the working environment of the hardware modules, and the state of the hardware modules. The set condition is used to determine one or more target hardware modules that consume too much power. Specifically, it can include at least one hardware module that accounts for the highest proportion of the total power consumption within a certain period of time, and that within a certain period of time, the power consumption exceeds the At least one of at least one hardware module that sets the power consumption threshold, at least one hardware module whose proportion of the total power consumption exceeds the preset proportion threshold corresponding to the hardware device within a certain period of time, etc., or any other applicable conditions, This embodiment of the present invention does not limit this.
步骤103,获取应用程序的运行参数。Step 103: Obtain the running parameters of the application.
在本发明实施例中,应用程序为调用所述目标硬件模块的应用程序,应用程序在运行时会调用移动终端上一个或多个硬件模块,同一个硬件模块也可以被几个应用程序调用。应用程序的运行参数用于表征应用程序对于移动终端的资源的占用情况,例如,处理器资源占比、控制显示器进行刷新的频率、下载数据的速度等,或者其他任意适用的运行参数,本发明实施例对此不做限制。In this embodiment of the present invention, the application program is an application program that calls the target hardware module. The application program calls one or more hardware modules on the mobile terminal when running, and the same hardware module can also be called by several application programs. The operating parameters of the application are used to represent the occupation of the resources of the mobile terminal by the application, for example, the proportion of processor resources, the frequency of controlling the display to refresh, the speed of downloading data, etc., or any other applicable operating parameters. The embodiment does not limit this.
调用目标硬件模块的应用程序可以有一个或多个,获取调用目标硬件模块的各个应用程序的运行参数,或者一定时间段内,获取调用目标硬件模块最多的至少一个应用程序的运行参数。There may be one or more applications calling the target hardware module, and the running parameters of each application calling the target hardware module are obtained, or the running parameters of at least one application calling the most target hardware modules within a certain period of time are obtained.
步骤104,判断所述应用程序的运行参数是否超出预设参数范围。
在本发明实施例中,预设参数范围表征运行参数是否在合理的范围,具体可以根据不同的运行参数对应设置任意适用的预设参数范围,本发明实施例对此不做限制。例如,应用程序对于处理器的资源占比达到90%,则应用程序对于处理器的资源占比可能是不合理的,会导致处理器耗电量过大,发热严重。In the embodiment of the present invention, the preset parameter range represents whether the operating parameter is within a reasonable range. Specifically, any applicable preset parameter range may be set correspondingly according to different operating parameters, which is not limited in the embodiment of the present invention. For example, if the resource ratio of the application to the processor reaches 90%, the resource ratio of the application to the processor may be unreasonable, which will lead to excessive power consumption of the processor and serious heat generation.
针对各个目标硬件模块,分别判断调用的各个应用程序的运行参数是否超出对应各个运行参数设置的预设参数范围,例如,判断应用程序占用处理器资源的比例是否超过预设参数范围的上限,或者判断应用程序控制显示器进行刷新的频率是否超过预设参数范围的上限。若是,则执行步骤105,若否,则执行步骤106。For each target hardware module, determine whether the running parameters of the called applications exceed the preset parameter ranges set corresponding to the respective running parameters, for example, determine whether the proportion of processor resources occupied by the applications exceeds the upper limit of the preset parameter range, or Determines whether the frequency that the application program controls the display to refresh exceeds the upper limit of the preset parameter range. If yes, go to step 105, if not, go to step 106.
步骤105,若是,则确定所述应用程序导致耗电异常。
在本发明实施例中,针对各个目标硬件设备,如果经过判断,有至少一个应用程序的运行参数超出对应设置的预设参数范围,则说明是应用程序导致耗电异常。In the embodiment of the present invention, for each target hardware device, if it is judged that the running parameters of at least one application program exceed the corresponding preset parameter range, it means that the application program causes abnormal power consumption.
步骤106,若否,则确定所述目标硬件模块导致耗电异常。
在本发明实施例中,如果经过判断,各个应用程序的运行参数均未超出对应各个运行参数设置的预设参数范围,说明各个应用程序并非导致目标硬件模块导致耗电异常的原因,而是目标硬件模块运行不正常,甚至出现故障,导致耗电异常。In the embodiment of the present invention, if it is judged that the operating parameters of each application program do not exceed the preset parameter range set corresponding to each operating parameter, it means that each application program is not the cause of abnormal power consumption caused by the target hardware module, but the target The hardware module does not operate normally, or even fails, resulting in abnormal power consumption.
这样,本发明实施例中,通过获取所述移动终端的至少一个硬件模块的耗电量,确定耗电量满足预设条件的硬件模块作为目标硬件模块,找到耗电高的目标硬件模块,继而对调用目标硬件模块的应用程序的运行参数进行比较判断,如果是应用程序的运行参数超过预设参数范围,则判定应用程序为导致耗电异常的原因,如果各个应用程序的运行参数都未超过预设参数范围,则判定导致耗电异常的是目标硬件模块,使得可以在耗电快或设备发热的情况发生时,分析出耗电异常的原因,解决了因设备运行情况无法复现导致的耗电异常原因分析困难的问题。In this way, in this embodiment of the present invention, by acquiring the power consumption of at least one hardware module of the mobile terminal, determining a hardware module whose power consumption meets a preset condition as a target hardware module, finding a target hardware module with high power consumption, and then Compare and judge the running parameters of the application calling the target hardware module. If the running parameters of the application exceed the preset parameter range, it is determined that the application is the cause of the abnormal power consumption. If the running parameters of each application do not exceed With the preset parameter range, it is determined that the abnormal power consumption is caused by the target hardware module, so that the cause of abnormal power consumption can be analyzed when the power consumption is fast or the device is overheating, and the problem caused by the inability to reproduce the operation of the device can be solved. It is difficult to analyze the cause of abnormal power consumption.
在本发明实施例中,可选地,获取至少一个硬件模块的耗电量的一种实现方式包括:获取至少一个硬件模块用电的电流值,根据设定时长的所述电流值,确定各个硬件模块的耗电量。In the embodiment of the present invention, optionally, an implementation manner of acquiring the power consumption of at least one hardware module includes: acquiring a current value of the power consumption of at least one hardware module, and determining each The power consumption of the hardware module.
获取至少一个硬件模块用电的电流值,为了确定各个硬件模块在一定时间长度的耗电量,用电流值对设定时长的时间进行积分。得到设定时长的时间段内各个硬件模块的耗电量。The current value of the power consumption of at least one hardware module is acquired, and in order to determine the power consumption of each hardware module for a certain period of time, the current value is used to integrate the time of the set period of time. Get the power consumption of each hardware module within the set time period.
在本发明实施例中,可选地,获取至少一个硬件模块用电的电流值的一种实现方式包括:根据所述各个硬件模块的使用情况信息,确定对应的硬件模块用电的电流值。In the embodiment of the present invention, optionally, an implementation manner of acquiring the current value of the power consumption of at least one hardware module includes: determining the current value of the power consumption of the corresponding hardware module according to the usage information of each hardware module.
使用情况信息用于表征硬件模块的工作情况,针对不同的硬件模块有不同的使用情况信息,例如,无线网卡、移动网络芯片等网络模块的下载量、下载速度等,处理器的工作频率、负载等。硬件模块用电的电流值可以根据该模块的使用情况信息确定,针对不同的设备,不同的型号,不同的性能,电流值和使用情况信息的关系可以根据实验数据确定,本发明实施例对此不做限制。根据移动终端的各个硬件模块的使用情况信息,确定对应的硬件模块用电时的电流值。Usage information is used to characterize the working conditions of hardware modules. There are different usage information for different hardware modules, such as the download volume and download speed of network modules such as wireless network cards and mobile network chips, and the operating frequency and load of the processor. Wait. The current value of the power consumption of the hardware module can be determined according to the usage information of the module. For different devices, different models, and different performances, the relationship between the current value and the usage information can be determined according to experimental data. No restrictions. According to the usage information of each hardware module of the mobile terminal, the current value when the corresponding hardware module is powered is determined.
在本发明实施例中,可选地,使用情况信息包括:网络模块的下载量、下载速度、信号强度、放大器状态等中至少一项,处理器的工作频率、工作负载等中至少一项,显示器的亮度、显示内容等中至少一项,或者其他任意适用的使用情况信息,本发明实施例对此不做限制。In this embodiment of the present invention, optionally, the usage information includes: at least one of the download amount, download speed, signal strength, amplifier state, etc. of the network module, at least one of the operating frequency and workload of the processor, and the like, At least one of the brightness of the display, display content, etc., or any other applicable usage information, is not limited in this embodiment of the present invention.
在本发明实施例中,可选地,运行参数包括:处理器资源占比、显示器的刷新频率、下载量、下载速度、内存占比等中至少一项,或者其他任意适用的运行参数,本发明实施例对此不做限制。In this embodiment of the present invention, optionally, the operating parameters include: at least one of processor resource ratio, display refresh rate, download amount, download speed, memory ratio, etc., or any other applicable operating parameters. This embodiment of the invention does not limit this.
参照图2,示出了根据本发明另一个实施例的一种耗电异常的诊断方法的流程图,具体可以包括如下步骤:Referring to FIG. 2 , a flowchart of a method for diagnosing abnormal power consumption according to another embodiment of the present invention is shown, which may specifically include the following steps:
步骤201,根据所述电池的放电电流超过第二预设电流阈值,对所述电池的放电电流进行实时监测。
在本发明实施例中,电池放电的电流值可以由电量计监测,系统软件会通过轮询的方式定期去调取电池放电的电流值。当放电电流超过第二预设电流阈值时,可以采用中断的方式对电池的放电电流进行实时的监测。根据实际需要可以设置任意适用的第二预设电流阈值,本发明实施例对此不做限制。In the embodiment of the present invention, the discharge current value of the battery can be monitored by a fuel gauge, and the system software periodically retrieves the discharge current value of the battery by polling. When the discharge current exceeds the second preset current threshold, the discharge current of the battery can be monitored in real time by means of interruption. Any applicable second preset current threshold may be set according to actual needs, which is not limited in this embodiment of the present invention.
步骤202,根据电池的放电电流超过第一预设电流阈值,确定端耗电异常。
在本发明实施例中,如果放电电流超过第一预设电流阈值,则确定耗电异常,具体可以根据实际需要设置任意适用的第一预设电流阈值,本发明实施例对此不做限制。In this embodiment of the present invention, if the discharge current exceeds the first preset current threshold, it is determined that the power consumption is abnormal. Specifically, any applicable first preset current threshold may be set according to actual needs, which is not limited in this embodiment of the present invention.
步骤203,获取至少一个硬件模块的耗电量。Step 203: Obtain the power consumption of at least one hardware module.
在本发明实施例中,此步骤的实现方式可以参见前述实施例中的描述,此处不另赘述。In this embodiment of the present invention, reference may be made to the descriptions in the foregoing embodiments for the implementation manner of this step, and details are not described herein.
步骤204,确定耗电量满足预设条件的硬件模块作为目标硬件模块。
在本发明实施例中,此步骤的实现方式可以参见前述实施例中的描述,此处不另赘述。In this embodiment of the present invention, reference may be made to the descriptions in the foregoing embodiments for the implementation manner of this step, and details are not described herein.
步骤205,获取应用程序的运行参数。
在本发明实施例中,此步骤的实现方式可以参见前述实施例中的描述,此处不另赘述。In this embodiment of the present invention, reference may be made to the descriptions in the foregoing embodiments for the implementation manner of this step, and details are not described herein.
步骤206,判断所述应用程序的运行参数是否超出预设参数范围。
在本发明实施例中,此步骤的实现方式可以参见前述实施例中的描述,此处不另赘述。若是,则执行步骤207,若否,则执行步骤208。In this embodiment of the present invention, reference may be made to the descriptions in the foregoing embodiments for the implementation manner of this step, and details are not described herein. If yes, go to step 207, if not, go to step 208.
步骤207,若是,则确定导致耗电异常的目标应用程序。
在本发明实施例中,目标应用程序的运行参数超出预设参数范围。调用目标硬件模块的多个应用程序中,如果有一个或多个应用程序的运行参数超出预设参数范围,则可以确定为目标应用程序,也即是导致耗电异常的原因,可以执行步骤209。In this embodiment of the present invention, the running parameters of the target application program exceed the preset parameter range. Among the multiple applications calling the target hardware module, if the running parameters of one or more applications exceed the preset parameter range, it can be determined as the target application, that is, the cause of the abnormal power consumption, and step 209 can be executed .
步骤208,若否,则确定所述目标硬件模块导致耗电异常。
在本发明实施例中,此步骤的实现方式可以参见前述实施例中的描述,此处不另赘述。如果各个应用程序的运行参数未超出预设参数范围,则确定目标硬件模块导致耗电异常,可以执行步骤210。In this embodiment of the present invention, reference may be made to the descriptions in the foregoing embodiments for the implementation manner of this step, and details are not described herein. If the running parameters of each application do not exceed the preset parameter range, it is determined that the target hardware module causes abnormal power consumption, and step 210 may be executed.
步骤209,关闭所述目标应用程序;或,通知用户所述目标应用程序耗电异常。
在本发明实施例中,如果是应用程序导致耗电异常,则关闭导致耗电异常的目标应用程序,或者发给用户通知,通知用户导致耗电异常的原因是目标应用程序。在关闭目标应用程序时,还可以先向用户发出提醒,待用户确认后再关闭目标应用程序。In this embodiment of the present invention, if the abnormal power consumption is caused by an application, the target application causing the abnormal power consumption is closed, or a notification is sent to the user, notifying the user that the cause of the abnormal power consumption is the target application. When closing the target application, a reminder can also be sent to the user first, and the target application can be closed after the user confirms.
如果目标应用程序为多个,还可以先关闭其中一个,如果耗电异常的情况消失,则可以不关闭其他的应用程序,如果关闭一个目标应用程序后,耗电异常的情况仍未停止,则再关闭另外的一个目标应用程序,直至耗电异常的情况消失。If there are multiple target applications, you can also close one of them first. If the abnormal power consumption disappears, you can not close other applications. If the abnormal power consumption does not stop after closing one target application, then Then close another target application until the abnormal power consumption disappears.
在通知用户时,如果目标应用程序为多个,可以根据目标应用程序的与运行参数超出预设参数范围的程度,确定目标应用程序的顺序,超出预设参数范围的程度最严重的首先通知用户,或者按照顺序通知给用户,以使用户得知各个目标应用程序导致耗电异常的程度。When notifying the user, if there are multiple target applications, the order of the target applications can be determined according to the degree to which the target application and the operating parameters exceed the preset parameter range, and the user is notified first if the degree of exceeding the preset parameter range is the most serious. , or notify the user in sequence, so that the user knows the degree of abnormal power consumption caused by each target application.
步骤210,更新所述目标硬件模块对应的系统;或,通知用户所述目标硬件模块发生故障。
在本发明实施例中,如果是目标硬件模块导致耗电异常,则可以更新目标硬件模块对应的系统,或者,向用户发出通知,通知用户目标硬件模块发生了故障。由于更新的目标硬件模块对应的系统可能解决了目标硬件模块耗电快的故障,所以可以在合适时更新系统,来解决耗电异常的问题。或者,目标硬件模块可能是反生了故障,无法正常的工作,可以提醒用户目标硬件模块发生了故障,可以去更换硬件模块以解决耗电异常的问题。In this embodiment of the present invention, if the target hardware module causes abnormal power consumption, the system corresponding to the target hardware module may be updated, or a notification may be sent to the user to notify the user that the target hardware module is faulty. Since the system corresponding to the updated target hardware module may solve the problem of fast power consumption of the target hardware module, the system can be updated at an appropriate time to solve the problem of abnormal power consumption. Or, the target hardware module may be faulty and cannot work normally, the user can be reminded that the target hardware module is faulty, and the hardware module can be replaced to solve the problem of abnormal power consumption.
这样,本发明实施例中,通过根据电池的放电电流超过第二预设电流阈值,对电池的放电电流进行实时监测,以使得当总的电流值达到一定值后,对电流进行更多的监测,避免在没有耗电问题时,耗费过多的资源去监测电流。In this way, in the embodiment of the present invention, the discharge current of the battery is monitored in real time according to the discharge current of the battery exceeding the second preset current threshold, so that when the total current value reaches a certain value, more current monitoring is performed , to avoid consuming too many resources to monitor the current when there is no power consumption problem.
进一步,根据电池的放电电流超过第一预设电流阈值,确定移动终端耗电异常,之后通过获取至少一个硬件模块的耗电量,根据上述各个硬件模块的耗电量,确定耗电量满足预设条件的目标硬件模块,找到耗电高的目标硬件模块,继而对调用目标硬件模块的应用程序的运行参数进行比较判断,如果是应用程序的运行参数超过预设参数范围,则判定应用程序为导致耗电异常的原因,如果各个应用程序的运行参数都未超过预设参数范围,则判定导致耗电异常的是目标硬件模块,使得可以在耗电快或设备发热的情况发生时,分析出耗电异常的原因,解决了因设备运行情况无法复现导致的耗电异常原因分析困难的问题。Further, according to the discharge current of the battery exceeding the first preset current threshold, it is determined that the power consumption of the mobile terminal is abnormal, and then the power consumption of the at least one hardware module is obtained, according to the power consumption of each hardware module, it is determined that the power consumption meets the predetermined power consumption. Set the target hardware module of the condition, find the target hardware module with high power consumption, and then compare and judge the running parameters of the application program calling the target hardware module. If the running parameters of the application program exceed the preset parameter range, the application program is judged as The cause of abnormal power consumption. If the operating parameters of each application do not exceed the preset parameter range, it is determined that the abnormal power consumption is caused by the target hardware module, so that it can be analyzed when the power consumption is fast or the device heats up. The cause of abnormal power consumption solves the problem of difficulty in analyzing the cause of abnormal power consumption due to the inability to reproduce the operation of the equipment.
参照图3,示出了根据本发明又一个实施例的一种移动终端的框图,图3所示的移动终端300包括耗电量获取模块301、目标硬件确定模块302、参数获取模块303。Referring to FIG. 3 , a block diagram of a mobile terminal according to another embodiment of the present invention is shown. The
耗电量获取模块301,用于获取至少一个硬件模块的耗电量;a power
目标硬件确定模块302,用于确定耗电量满足预设条件的硬件模块作为目标硬件模块;A target
参数获取模块303,用于获取应用程序的运行参数,所述应用程序调用所述目标硬件模块;A
参数判断模块304,用于判断所述应用程序的运行参数是否超出预设参数范围;The
异常确定模块305,用于若是,则确定所述应用程序导致耗电异常;若否,则确定所述目标硬件模块导致耗电异常。The
在本发明实施例中,优选地,所述耗电量获取模块包括:In the embodiment of the present invention, preferably, the power consumption acquisition module includes:
电流值获取子模块,用于获取至少一个硬件模块用电的电流值;The current value acquisition sub-module is used to acquire the current value of power consumption of at least one hardware module;
耗电量确定子模块,用于根据设定时长的所述电流值,确定各个硬件模块的耗电量。The power consumption determination sub-module is configured to determine the power consumption of each hardware module according to the current value of the set duration.
在本发明实施例中,优选地,所述电流值获取子模块,具体用于根据所述各个硬件模块的使用情况信息,确定对应的硬件模块用电的电流值。In the embodiment of the present invention, preferably, the current value acquisition sub-module is specifically configured to determine the current value of the power consumption of the corresponding hardware module according to the usage information of each hardware module.
在本发明实施例中,优选地,所述使用情况信息包括:网络模块的下载量、下载速度、信号强度、放大器状态中至少一项,处理器的工作频率、工作负载中至少一项,显示器的亮度、显示内容中至少一项。In the embodiment of the present invention, preferably, the usage information includes: at least one of the download amount, download speed, signal strength, and amplifier state of the network module, at least one of the operating frequency and workload of the processor, and the display. at least one of brightness and display content.
在本发明实施例中,优选地,所述运行参数包括:处理器资源占比、显示器的刷新频率、下载量、下载速度、内存占比中至少一项。In the embodiment of the present invention, preferably, the operating parameters include at least one of: processor resource ratio, display refresh frequency, download amount, download speed, and memory ratio.
在本发明实施例中,优选地,所述异常确定模块还包括:In the embodiment of the present invention, preferably, the abnormality determination module further includes:
目标应用程序确定子模块,用于确定导致耗电异常的目标应用程序,其中,所述目标应用程序的运行参数超出预设参数范围。The target application program determination sub-module is used for determining the target application program causing abnormal power consumption, wherein the running parameters of the target application program exceed the preset parameter range.
在本发明实施例中,优选地,所述移动终端还包括:In this embodiment of the present invention, preferably, the mobile terminal further includes:
第一异常处理模块,用于在所述确定导致耗电异常的目标应用程序之后,关闭所述目标应用程序;或,通知用户所述目标应用程序耗电异常。The first exception processing module is configured to close the target application program after determining the target application program causing abnormal power consumption; or, notify the user that the target application program has abnormal power consumption.
在本发明实施例中,优选地,所述移动终端还包括:In this embodiment of the present invention, preferably, the mobile terminal further includes:
第二异常处理模块,用于在所述确定所述目标硬件模块导致耗电异常之后,更新所述目标硬件模块对应的系统;或,通知用户所述目标硬件模块发生故障。The second exception processing module is configured to update the system corresponding to the target hardware module after the determination that the target hardware module causes abnormal power consumption; or, notify the user that the target hardware module is faulty.
在本发明实施例中,优选地,所述移动终端还包括:In this embodiment of the present invention, preferably, the mobile terminal further includes:
耗电异常确定模块,用于在所述获取至少一个硬件模块的耗电量之前,根据电池的放电电流超过第一预设电流阈值,确定耗电异常。The abnormal power consumption determination module is configured to determine the abnormal power consumption according to the discharge current of the battery exceeding the first preset current threshold before acquiring the power consumption of the at least one hardware module.
在本发明实施例中,优选地,所述移动终端还包括:In this embodiment of the present invention, preferably, the mobile terminal further includes:
实时监测模块,用于在所述确定耗电异常之前,根据所述电池的放电电流超过第二预设电流阈值,对所述电池的放电电流进行实时监测。A real-time monitoring module, configured to monitor the discharge current of the battery in real time according to the fact that the discharge current of the battery exceeds a second preset current threshold before the abnormal power consumption is determined.
移动终端300能够实现图1和图2的方法实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。综上所述,依据本发明实施例,通过获取所述移动终端的至少一个硬件模块的耗电量,确定耗电量满足预设条件的硬件模块作为目标硬件模块,找到耗电高的目标硬件模块,继而对调用目标硬件模块的应用程序的运行参数进行比较判断,如果是应用程序的运行参数超过预设参数范围,则判定应用程序为导致耗电异常的原因,如果各个应用程序的运行参数都未超过预设参数范围,则判定导致耗电异常的是目标硬件模块,使得可以在耗电快或设备发热的情况发生时,分析出耗电异常的原因,解决了因设备运行情况无法复现导致的耗电异常原因分析困难的问题。The
图4是本发明又一个实施例的移动终端的框图。图4所示的移动终端400包括:至少一个处理器401、存储器402、至少一个网络接口404和用户接口403。移动终端400中的各个组件通过总线系统405耦合在一起。可理解,总线系统405用于实现这些组件之间的连接通信。总线系统405除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图5中将各种总线都标为总线系统405。FIG. 4 is a block diagram of a mobile terminal according to still another embodiment of the present invention. The
其中,用户接口403可以包括显示器、键盘或者点击设备(例如,鼠标,轨迹球(trackball)、触感板或者触摸屏等。Among them, the
可以理解,本发明实施例中的存储器402可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-OnlyMemory,ROM)、可编程只读存储器(ProgrammableROM,PROM)、可擦除可编程只读存储器(ErasablePROM,EPROM)、电可擦除可编程只读存储器(ElectricallyEPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(RandomAccessMemory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(StaticRAM,SRAM)、动态随机存取存储器(DynamicRAM,DRAM)、同步动态随机存取存储器(SynchronousDRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(DoubleDataRateSDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(SynchlinkDRAM,SLDRAM)和直接内存总线随机存取存储器(DirectRambusRAM,DRRAM)。本发明实施例描述的系统和方法的存储器402旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the
在一些实施方式中,存储器402存储了如下的元素,可执行模块或者数据结构,或者他们的子集,或者他们的扩展集:操作系统4021和应用程序4022。In some embodiments,
其中,操作系统4021,包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序4022,包含各种应用程序,例如媒体播放器(MediaPlayer)、浏览器(Browser)等,用于实现各种应用业务。实现本发明实施例方法的程序可以包含在应用程序4022中。The
在本发明实施例中,通过调用存储器402存储的程序或指令,具体的,可以是应用程序4022中存储的程序或指令,处理器401用于:获取至少一个多个硬件模块的耗电量;In this embodiment of the present invention, by calling the program or instruction stored in the
确定耗电量满足预设条件的硬件模块作为目标硬件模块;Determine the hardware module whose power consumption meets the preset condition as the target hardware module;
获取应用程序的运行参数,所述应用程序调用所述目标硬件模块;Obtain the running parameters of the application program, and the application program calls the target hardware module;
判断所述应用程序的运行参数是否超出预设参数范围;Determine whether the operating parameters of the application program exceed the preset parameter range;
若是,则确定所述应用程序导致耗电异常;若否,则确定所述目标硬件模块导致耗电异常。If so, it is determined that the application program causes abnormal power consumption; if not, it is determined that the target hardware module causes abnormal power consumption.
上述本发明实施例揭示的方法可以应用于处理器401中,或者由处理器401实现。处理器401可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器401中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器401可以是通用处理器、数字信号处理器(DigitalSignalProcessor,DSP)、专用集成电路(ApplicationSpecific IntegratedCircuit,ASIC)、现成可编程门阵列(FieldProgrammableGateArray,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器402,处理器401读取存储器402中的信息,结合其硬件完成上述方法的步骤。The methods disclosed in the above embodiments of the present invention may be applied to the
可以理解的是,本发明实施例描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(ApplicationSpecificIntegratedCircuits,ASIC)、数字信号处理器(DigitalSignalProcessing,DSP)、数字信号处理设备(DSPDevice,DSPD)、可编程逻辑设备(ProgrammableLogicDevice,PLD)、现场可编程门阵列(Field-ProgrammableGateArray,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。It can be understood that the embodiments described in the embodiments of the present invention may be implemented by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), Programmable Logic Device (Programmable Logic Device, PLD) ), a Field-Programmable Gate Array (FPGA), a general-purpose processor, a controller, a microcontroller, a microprocessor, other electronic units for performing the functions described herein, or a combination thereof.
对于软件实现,可通过执行本发明实施例所述功能的模块(例如过程、函数等)来实现本发明实施例所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。For software implementation, the techniques described in the embodiments of the present invention may be implemented through modules (eg, procedures, functions, etc.) that perform the functions described in the embodiments of the present invention. Software codes may be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
可选地,处理器401还用于:所述获取至少一个硬件模块的耗电量包括:Optionally, the
获取至少一个硬件模块用电的电流值;Obtain the current value of power used by at least one hardware module;
根据设定时长的所述电流值,确定各个硬件模块的耗电量。According to the current value of the set duration, the power consumption of each hardware module is determined.
可选地,作为另一个实施例,处理器401还用于:所述获取至少一个硬件模块用电的电流值包括:Optionally, as another embodiment, the
根据所述各个硬件模块的使用情况信息,确定对应的硬件模块用电的电流值。According to the usage information of each hardware module, the current value of the power consumption of the corresponding hardware module is determined.
可选地,作为另一个实施例,处理器401还用于:所述使用情况信息包括:网络模块的下载量、下载速度、信号强度、放大器状态中至少一项,处理器的工作频率、工作负载中至少一项,显示器的亮度、显示内容中至少一项。Optionally, as another embodiment, the
可选地,作为另一个实施例,处理器401还用于:所述运行参数包括:处理器资源占比、显示器的刷新频率、下载量、下载速度、内存占比中至少一项。Optionally, as another embodiment, the
可选地,作为另一个实施例,处理器401还用于:所述确定所述应用程序导致耗电异常还包括:Optionally, as another embodiment, the
确定导致耗电异常的目标应用程序,其中,所述目标应用程序的运行参数超出预设参数范围。A target application program causing abnormal power consumption is determined, wherein the running parameters of the target application program exceed a preset parameter range.
可选地,作为另一个实施例,处理器401还用于:在所述确定导致耗电异常的目标应用程序之后,所述方法还包括:Optionally, as another embodiment, the
关闭所述目标应用程序;或,通知用户所述目标应用程序耗电异常。Close the target application; or, notify the user that the target application consumes abnormal power.
可选地,作为另一个实施例,处理器401还用于:在所述确定所述目标硬件模块导致耗电异常之后,所述方法还包括:Optionally, as another embodiment, the
更新所述目标硬件模块对应的系统;或,通知用户所述目标硬件模块发生故障。Update the system corresponding to the target hardware module; or notify the user that the target hardware module is faulty.
可选地,作为另一个实施例,处理器401还用于:在所述获取至少一个硬件模块的耗电量之前,所述方法还包括:Optionally, as another embodiment, the
根据电池的放电电流超过第一预设电流阈值,确定耗电异常。According to the discharge current of the battery exceeding the first preset current threshold, it is determined that the power consumption is abnormal.
可选地,作为另一个实施例,处理器401还用于:在所述确定耗电异常之前,所述方法还包括:Optionally, as another embodiment, the
根据所述电池的放电电流超过第二预设电流阈值,对所述电池的放电电流进行实时监测。According to the discharge current of the battery exceeding a second preset current threshold, the discharge current of the battery is monitored in real time.
移动终端400能够实现前述实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。综上所述,依据本发明实施例,通过获取所述移动终端的至少一个硬件模块的耗电量,确定耗电量满足预设条件的硬件模块作为目标硬件模块,找到耗电高的目标硬件模块,继而对调用目标硬件模块的应用程序的运行参数进行比较判断,如果是应用程序的运行参数超过预设参数范围,则判定应用程序为导致耗电异常的原因,如果各个应用程序的运行参数都未超过预设参数范围,则判定导致耗电异常的是目标硬件模块,使得可以在耗电快或设备发热的情况发生时,分析出耗电异常的原因,解决了因设备运行情况无法复现导致的耗电异常原因分析困难的问题。The
图5是本发明又一个实施例的移动终端的结构示意图。具体地,图5中的移动终端500可以为手机、平板电脑、个人数字助理(PersonalDigital Assistant,PDA)、或车载电脑等。FIG. 5 is a schematic structural diagram of a mobile terminal according to another embodiment of the present invention. Specifically, the mobile terminal 500 in FIG. 5 may be a mobile phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA), or a vehicle-mounted computer.
图5中的移动终端500包括射频(RadioFrequency,RF)电路510、存储器520、输入单元530、显示单元540、处理器560、音频电路570、WiFi(WirelessFidelity)模块580和电源590。The mobile terminal 500 in FIG. 5 includes a radio frequency (RF)
其中,输入单元530可用于接收用户输入的数字或字符信息,以及产生与移动终端500的用户设置以及功能控制有关的信号输入。具体地,本发明实施例中,该输入单元530可以包括触控面板531。触控面板531,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板531上的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板531可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给该处理器560,并能接收处理器560发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板531。除了触控面板531,输入单元530还可以包括其他输入设备532,其他输入设备532可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。Wherein, the
其中,显示单元540可用于显示由用户输入的信息或提供给用户的信息以及移动终端500的各种菜单界面。显示单元540可包括显示面板541,可选的,可以采用LCD或有机发光二极管(OrganicLight-EmittingDiode,OLED)等形式来配置显示面板541。The
应注意,触控面板531可以覆盖显示面板541,形成触摸显示屏,当该触摸显示屏检测到在其上或附近的触摸操作后,传送给处理器560以确定触摸事件的类型,随后处理器560根据触摸事件的类型在触摸显示屏上提供相应的视觉输出。It should be noted that the touch panel 531 may cover the display panel 541 to form a touch display screen. When the touch display screen detects a touch operation on or near it, it is transmitted to the
触摸显示屏包括应用程序界面显示区及常用控件显示区。该应用程序界面显示区及该常用控件显示区的排列方式并不限定,可以为上下排列、左右排列等可以区分两个显示区的排列方式。该应用程序界面显示区可以用于显示应用程序的界面。每一个界面可以包含至少一个应用程序的图标和/或widget桌面控件等界面元素。该应用程序界面显示区也可以为不包含任何内容的空界面。该常用控件显示区用于显示使用率较高的控件,例如,设置按钮、界面编号、滚动条、电话本图标等应用程序图标等。The touch screen includes the application program interface display area and the commonly used controls display area. The arrangement of the application program interface display area and the common control display area is not limited, and may be an arrangement that can distinguish the two display areas, such as up-down arrangement, left-right arrangement, or the like. The application program interface display area can be used to display the interface of the application program. Each interface may contain at least one application icon and/or interface elements such as widget desktop controls. The application program interface display area can also be an empty interface that does not contain any content. The commonly used control display area is used to display controls with high usage rate, such as setting buttons, interface numbers, scroll bars, phonebook icons and other application icons.
其中处理器560是移动终端500的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在第一存储器521内的软件程序和/或模块,以及调用存储在第二存储器522内的数据,执行移动终端500的各种功能和处理数据,从而对移动终端500进行整体监控。可选的,处理器560可包括一个或多个处理单元。The
在本发明实施例中,通过调用存储该第一存储器521内的软件程序和/或模块和/或该第二存储器522内的数据,处理器560用于:获取至少一个多个硬件模块的耗电量;In this embodiment of the present invention, by calling and storing software programs and/or modules in the first memory 521 and/or data in the second memory 522, the
确定耗电量满足预设条件的硬件模块作为目标硬件模块;Determine the hardware module whose power consumption meets the preset condition as the target hardware module;
获取应用程序的运行参数,所述应用程序调用所述目标硬件模块;Obtain the running parameters of the application program, and the application program calls the target hardware module;
判断所述应用程序的运行参数是否超出预设参数范围;Determine whether the operating parameters of the application program exceed the preset parameter range;
若是,则确定所述应用程序导致耗电异常;若否,则确定所述目标硬件模块导致耗电异常。If so, it is determined that the application program causes abnormal power consumption; if not, it is determined that the target hardware module causes abnormal power consumption.
可选地,处理器560还用于:所述获取至少一个硬件模块的耗电量包括:Optionally, the
获取至少一个硬件模块用电的电流值;Obtain the current value of power used by at least one hardware module;
根据设定时长的所述电流值,确定各个硬件模块的耗电量。According to the current value of the set duration, the power consumption of each hardware module is determined.
可选地,作为另一个实施例,处理器560还用于:Optionally, as another embodiment, the
所述获取至少一个硬件模块用电的电流值包括:The obtaining the current value of the power used by the at least one hardware module includes:
根据所述各个硬件模块的使用情况信息,确定对应的硬件模块用电的电流值。According to the usage information of each hardware module, the current value of the power consumption of the corresponding hardware module is determined.
可选地,作为另一个实施例,处理器560还用于:Optionally, as another embodiment, the
所述使用情况信息包括:网络模块的下载量、下载速度、信号强度、放大器状态中至少一项,处理器的工作频率、工作负载中至少一项,显示器的亮度、显示内容中至少一项。The usage information includes: at least one item of download amount, download speed, signal strength, and amplifier status of the network module, at least one item of operating frequency and workload of the processor, and at least one item of display brightness and display content.
可选地,作为另一个实施例,处理器560还用于:Optionally, as another embodiment, the
所述运行参数包括:处理器资源占比、显示器的刷新频率、下载量、下载速度、内存占比中至少一项。The operating parameters include at least one of: processor resource ratio, display refresh rate, download amount, download speed, and memory ratio.
可选地,作为另一个实施例,处理器560还用于:Optionally, as another embodiment, the
所述确定所述应用程序导致耗电异常还包括:The determining that the application program causes abnormal power consumption further includes:
确定导致耗电异常的目标应用程序,其中,所述目标应用程序的运行参数超出预设参数范围。A target application program causing abnormal power consumption is determined, wherein the running parameters of the target application program exceed a preset parameter range.
可选地,作为另一个实施例,处理器560还用于:Optionally, as another embodiment, the
在所述确定导致耗电异常的目标应用程序之后,所述方法还包括:After the determining of the target application causing the abnormal power consumption, the method further includes:
关闭所述目标应用程序;或,通知用户所述目标应用程序耗电异常。Close the target application; or, notify the user that the target application consumes abnormal power.
可选地,作为另一个实施例,处理器560还用于:Optionally, as another embodiment, the
在所述确定所述目标硬件模块导致耗电异常之后,所述方法还包括:After the determining that the target hardware module causes abnormal power consumption, the method further includes:
更新所述目标硬件模块对应的系统;或,通知用户所述目标硬件模块发生故障。Update the system corresponding to the target hardware module; or notify the user that the target hardware module is faulty.
可选地,作为另一个实施例,处理器560还用于:Optionally, as another embodiment, the
在所述获取至少一个硬件模块的耗电量之前,所述方法还包括:Before acquiring the power consumption of the at least one hardware module, the method further includes:
根据电池的放电电流超过第一预设电流阈值,确定耗电异常。According to the discharge current of the battery exceeding the first preset current threshold, it is determined that the power consumption is abnormal.
可选地,作为另一个实施例,处理器560还用于:Optionally, as another embodiment, the
在所述确定耗电异常之前,所述方法还包括:Before the determining of abnormal power consumption, the method further includes:
根据所述电池的放电电流超过第二预设电流阈值,对所述电池的放电电流进行实时监测。According to the discharge current of the battery exceeding a second preset current threshold, the discharge current of the battery is monitored in real time.
可见,移动终端500能够实现前述实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。综上所述,依据本发明实施例,通过获取所述移动终端的至少一个硬件模块的耗电量,确定耗电量满足预设条件的硬件模块作为目标硬件模块,找到耗电高的目标硬件模块,继而对调用目标硬件模块的应用程序的运行参数进行比较判断,如果是应用程序的运行参数超过预设参数范围,则判定应用程序为导致耗电异常的原因,如果各个应用程序的运行参数都未超过预设参数范围,则判定导致耗电异常的是目标硬件模块,使得可以在耗电快或设备发热的情况发生时,分析出耗电异常的原因,解决了因设备运行情况无法复现导致的耗电异常原因分析困难的问题。It can be seen that the mobile terminal 500 can implement each process implemented by the mobile terminal in the foregoing embodiments, and in order to avoid repetition, details are not repeated here. To sum up, according to the embodiment of the present invention, by acquiring the power consumption of at least one hardware module of the mobile terminal, determining the hardware module whose power consumption meets the preset condition as the target hardware module, and finding the target hardware with high power consumption module, and then compare and judge the running parameters of the application calling the target hardware module. If the running parameters of the application exceed the preset parameter range, the application is determined to be the cause of abnormal power consumption. If the running parameters of each application If it does not exceed the preset parameter range, it is determined that the abnormal power consumption is caused by the target hardware module, so that when the power consumption is fast or the device is overheating, the cause of the abnormal power consumption can be analyzed. It is difficult to analyze the cause of abnormal power consumption.
本发明实施例还提供了一种移动终端,包括:存储器、处理器及存储在所述存储器上并可在处理器上运行的耗电异常的诊断程序,耗电异常的诊断程序被处理器执行时实现本发明中任意一种耗电异常的诊断方法的步骤。An embodiment of the present invention further provides a mobile terminal, including: a memory, a processor, and a diagnostic program for abnormal power consumption that is stored in the memory and can be run on the processor, and the diagnostic program for abnormal power consumption is executed by the processor At the same time, the steps of any of the diagnosis methods for abnormal power consumption in the present invention are realized.
本发明实施例还提供了一种计算机可读存储介质,其特征在于,计算机可读存储介质上存储有耗电异常的诊断程序,耗电异常的诊断程序被处理器执行时实现本发明中任意一种耗电异常的诊断方法的步骤。An embodiment of the present invention further provides a computer-readable storage medium, characterized in that a diagnostic program for abnormal power consumption is stored on the computer-readable storage medium, and when the diagnostic program for abnormal power consumption is executed by a processor, any The steps of a method for diagnosing abnormal power consumption.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the apparatus embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for related parts.
在此提供的耗电异常的诊断方案不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造具有本发明方案的系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The diagnostic solutions for abnormal power consumption provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used with teaching based on this. The structure required to construct a system having the aspects of the present invention is apparent from the above description. Furthermore, the present invention is not directed to any particular programming language. It is to be understood that various programming languages may be used to implement the inventions described herein, and that the descriptions of specific languages above are intended to disclose the best mode for carrying out the invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. It will be understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it is to be understood that in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment, figure, or its description. This disclosure, however, should not be construed as reflecting an intention that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art will understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. The modules or units or components in the embodiments may be combined into one module or unit or component, and further they may be divided into multiple sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method so disclosed may be employed in any combination, unless at least some of such features and/or procedures or elements are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will appreciate that although some of the embodiments described herein include certain features, but not others, included in other embodiments, that combinations of features of different embodiments are intended to be within the scope of the invention within and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的耗电异常诊断方案中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components in the abnormal power consumption diagnosis solution according to the embodiment of the present invention. The present invention can also be implemented as apparatus or apparatus programs (eg, computer programs and computer program products) for performing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from Internet sites, or provided on carrier signals, or in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-described embodiments illustrate rather than limit the invention, and that alternative embodiments may be devised by those skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. do not denote any order. These words can be interpreted as names.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711046630.2ACN107832190B (en) | 2017-10-31 | 2017-10-31 | A method for diagnosing abnormal power consumption, mobile terminal and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711046630.2ACN107832190B (en) | 2017-10-31 | 2017-10-31 | A method for diagnosing abnormal power consumption, mobile terminal and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN107832190A CN107832190A (en) | 2018-03-23 |
| CN107832190Btrue CN107832190B (en) | 2020-09-22 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201711046630.2AActiveCN107832190B (en) | 2017-10-31 | 2017-10-31 | A method for diagnosing abnormal power consumption, mobile terminal and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN107832190B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109738694A (en)* | 2018-12-29 | 2019-05-10 | 出门问问信息科技有限公司 | A kind of chip power-consumption prediction technique, device, electronic equipment and storage medium |
| CN111464672A (en)* | 2019-01-18 | 2020-07-28 | 青岛海信移动通信技术股份有限公司 | Electronic equipment and charging method thereof |
| CN109901692A (en)* | 2019-03-04 | 2019-06-18 | 上海卓易科技股份有限公司 | Execution method, device, terminal and storage medium of target application |
| JP7415364B2 (en)* | 2019-08-02 | 2024-01-17 | 株式会社オートネットワーク技術研究所 | In-vehicle relay device, computer program and failure determination method |
| CN111475323B (en)* | 2020-03-30 | 2021-08-17 | 珠海格力电器股份有限公司 | Method, device, equipment and computer readable medium for diagnosing electric quantity consumption fault |
| CN111597194B (en)* | 2020-04-30 | 2023-05-05 | 广东良实机电工程有限公司 | Equipment energy consumption control method and device, terminal equipment and storage medium |
| CN111611254B (en)* | 2020-04-30 | 2023-05-09 | 广东良实机电工程有限公司 | Equipment energy consumption abnormality monitoring method and device, terminal equipment and storage medium |
| CN111611255B (en)* | 2020-04-30 | 2023-12-12 | 广东良实机电工程有限公司 | Equipment energy consumption energy-saving management method and device, terminal equipment and storage medium |
| CN113010004B (en)* | 2021-03-18 | 2024-07-09 | 维沃移动通信有限公司 | Abnormal power consumption processing method and device and electronic equipment |
| CN113282432B (en)* | 2021-05-21 | 2024-05-14 | 深圳优地科技有限公司 | Task management method, device, storage medium, and program product |
| CN113791951B (en)* | 2021-09-15 | 2024-02-02 | 北京百度网讯科技有限公司 | Electronic equipment power consumption acquisition device and method |
| CN113918337B (en)* | 2021-10-14 | 2024-11-08 | 深圳平安智慧医健科技有限公司 | Application program running method, device, terminal device and storage medium |
| CN115696529A (en)* | 2022-11-01 | 2023-02-03 | 深圳市信丰伟业科技有限公司 | Wireless routing terminal discharging authority management method, system, equipment and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104063316A (en)* | 2014-06-23 | 2014-09-24 | 百度在线网络技术(北京)有限公司 | Application testing method and device |
| CN104239196A (en)* | 2014-09-17 | 2014-12-24 | 北京金山安全软件有限公司 | Method and device for detecting abnormal operation of application program and mobile terminal |
| CN104298584A (en)* | 2013-07-19 | 2015-01-21 | 贝壳网际(北京)安全技术有限公司 | Method and device for acquiring application program with abnormal power consumption and mobile terminal |
| CN107291586A (en)* | 2016-04-01 | 2017-10-24 | 腾讯科技(深圳)有限公司 | The analysis method and device of a kind of application program |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6898731B2 (en)* | 2002-01-10 | 2005-05-24 | International Business Machines Corporation | System, method, and computer program product for preventing machine crashes due to hard errors in logically partitioned systems |
| CN104331357B (en)* | 2014-10-10 | 2018-07-10 | 北京金山安全软件有限公司 | Application program abnormity detection method and device and mobile terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104298584A (en)* | 2013-07-19 | 2015-01-21 | 贝壳网际(北京)安全技术有限公司 | Method and device for acquiring application program with abnormal power consumption and mobile terminal |
| CN104063316A (en)* | 2014-06-23 | 2014-09-24 | 百度在线网络技术(北京)有限公司 | Application testing method and device |
| CN104239196A (en)* | 2014-09-17 | 2014-12-24 | 北京金山安全软件有限公司 | Method and device for detecting abnormal operation of application program and mobile terminal |
| CN107291586A (en)* | 2016-04-01 | 2017-10-24 | 腾讯科技(深圳)有限公司 | The analysis method and device of a kind of application program |
| Publication number | Publication date |
|---|---|
| CN107832190A (en) | 2018-03-23 |
| Publication | Publication Date | Title |
|---|---|---|
| CN107832190B (en) | A method for diagnosing abnormal power consumption, mobile terminal and storage medium | |
| CN107565639B (en) | Charging reminding method and mobile terminal | |
| CN107566622B (en) | Temperature control method and mobile terminal | |
| US20190274184A1 (en) | Configuration method of discountinuous reception parameter, mobile terminal, and base station | |
| CN107145782B (en) | Abnormal application program identification method, mobile terminal and server | |
| CN106055369A (en) | Starting method for mobile terminal applications and mobile terminal | |
| CN107566624B (en) | Display method of power consumption and temperature of terminal, terminal and computer-readable storage medium | |
| CN107734143B (en) | Fault reminding method, mobile terminal and readable storage medium | |
| CN106648113A (en) | Message vibration prompting method and mobile terminal | |
| CN110188520A (en) | Application rights management method and mobile terminal | |
| CN106445074A (en) | Control method for application and mobile terminal | |
| CN107704149A (en) | The startup method and mobile terminal of a kind of application | |
| CN106648242A (en) | Control method of touch-control operation and mobile terminal | |
| CN106208206A (en) | A kind of wireless charging method and mobile terminal | |
| CN107612595A (en) | A kind of antenna switching method and mobile terminal | |
| CN106775738A (en) | The upgrade tip method and mobile terminal of application program | |
| CN107656746B (en) | Method and mobile terminal for program upgrading | |
| CN106055071B (en) | A kind of display control method and mobile terminal of notification message | |
| CN106776228B (en) | Safety protection method of mobile terminal and mobile terminal | |
| CN106527763B (en) | Method for adjusting position of display object and mobile terminal | |
| CN106786963A (en) | The charge protection method and mobile terminal of a kind of mobile terminal | |
| CN106528326A (en) | Base-band chip software switching method and mobile terminal | |
| CN107967203B (en) | Function judgment method and device based on executable file | |
| CN107665027B (en) | Temperature control method and mobile terminal | |
| CN107509237B (en) | Wireless network connection method, mobile terminal and readable storage medium |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |