技术领域technical field
本发明涉及计算机技术领域,特别是涉及一种CPU监测方法、装置、计算机可读存储介质和移动终端。The present invention relates to the field of computer technology, in particular to a CPU monitoring method, device, computer-readable storage medium and mobile terminal.
背景技术Background technique
随着智能移动终端的迅速发展,用户对智能移动终端的性能要求越来越高。在智能移动终端中,智能移动终端系统程序运行、第三方应用程序运行均需要消耗智能移动终端的系统资源,当智能移动终端的系统资源被大量消耗时,会影响智能移动终端的运行效率。With the rapid development of smart mobile terminals, users have higher and higher requirements on the performance of smart mobile terminals. In the smart mobile terminal, the operation of the smart mobile terminal system program and the operation of the third-party application program need to consume the system resources of the smart mobile terminal. When the system resources of the smart mobile terminal are consumed in large quantities, the operating efficiency of the smart mobile terminal will be affected.
发明内容Contents of the invention
本发明实施例提供一种CPU监测方法、装置、计算机可读存储介质和移动终端,可以监测移动终端中应用程序的CPU占用率。Embodiments of the present invention provide a CPU monitoring method, device, computer-readable storage medium and mobile terminal, which can monitor the CPU usage rate of application programs in the mobile terminal.
一种CPU监测方法,包括:A CPU monitoring method, comprising:
按照预设的第一时间间隔获取系统CPU占用率;Obtain the CPU usage rate of the system according to the preset first time interval;
若当前系统CPU占用率与相邻上一次系统CPU占用率的差值超过指定值,将所述当前系统CPU占用率作为第一CPU占用率;If the difference between the current system CPU occupancy rate and the adjacent last system CPU occupancy rate exceeds a specified value, the current system CPU occupancy rate is used as the first CPU occupancy rate;
若系统CPU占用率不小于所述第一CPU占用率的持续时长超过指定时长,获取各应用程序CPU占用率。If the system CPU usage rate is not less than the duration of the first CPU usage rate and exceeds a specified time period, the CPU usage rate of each application program is obtained.
一种CPU监测装置,包括:A CPU monitoring device, comprising:
第一获取模块,用于按照预设的第一时间间隔获取系统CPU占用率;The first acquisition module is configured to acquire the CPU usage of the system according to a preset first time interval;
差值模块,用于若当前系统CPU占用率与相邻上一次系统CPU占用率的差值超过指定值,将所述当前系统CPU占用率作为第一CPU占用率;A difference module, configured to use the current system CPU occupancy as the first CPU occupancy if the difference between the current system CPU occupancy rate and the adjacent last system CPU occupancy rate exceeds a specified value;
第二获取模块,用于若系统CPU占用率不小于所述第一CPU占用率的持续时长超过指定时长,获取各应用程序CPU占用率。The second acquiring module is configured to acquire the CPU usage of each application program if the system CPU usage is not less than the duration of the first CPU usage exceeds a specified duration.
一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行如上所述的CPU监测方法。One or more non-volatile computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the CPU monitoring method as described above .
一种移动终端,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行如上所述的CPU监测方法。A mobile terminal includes a memory and a processor, wherein computer-readable instructions are stored in the memory, and when the instructions are executed by the processor, the processor executes the CPU monitoring method as described above.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为一个实施例中移动终端的内部结构示意图;Fig. 1 is a schematic diagram of the internal structure of a mobile terminal in an embodiment;
图2为一个实施例中CPU监测方法的流程图;Fig. 2 is the flowchart of CPU monitoring method in an embodiment;
图3为另一个实施例中CPU监测方法的流程图;Fig. 3 is the flowchart of CPU monitoring method in another embodiment;
图4为另一个实施例中CPU监测方法的流程图;Fig. 4 is the flowchart of CPU monitoring method in another embodiment;
图5为另一个实施例中CPU监测方法的流程图;Fig. 5 is the flowchart of CPU monitoring method in another embodiment;
图6为另一个实施例中CPU监测方法的流程图;Fig. 6 is the flowchart of CPU monitoring method in another embodiment;
图7为另一个实施例中CPU监测方法的流程图;Fig. 7 is the flowchart of CPU monitoring method in another embodiment;
图8为一个实施例中CPU监测装置的结构框图;Fig. 8 is a structural block diagram of a CPU monitoring device in an embodiment;
图9为另一个实施例中CPU监测装置的结构框图;Fig. 9 is a structural block diagram of a CPU monitoring device in another embodiment;
图10为另一个实施例中CPU监测装置的结构框图;Fig. 10 is a structural block diagram of a CPU monitoring device in another embodiment;
图11为另一个实施例中CPU监测装置的结构框图;Fig. 11 is a structural block diagram of a CPU monitoring device in another embodiment;
图12为与本发明实施例提供的移动终端相关的手机的部分结构的框图。Fig. 12 is a block diagram of a partial structure of a mobile phone related to the mobile terminal provided by the embodiment of the present invention.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
可以理解,本发明所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本发明的范围的情况下,可以将第一获取模块称为第二获取模块,且类似地,可将第二获取模块称为第一获取模块。第一获取模块和第二获取模块两者都是获取模块,但其不是同一获取模块。It can be understood that the terms "first", "second" and the like used in the present invention can be used to describe various elements herein, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element. For example, a first acquisition module could be termed a second acquisition module, and, similarly, a second acquisition module could be termed a first acquisition module, without departing from the scope of the present invention. Both the first acquisition module and the second acquisition module are acquisition modules, but they are not the same acquisition module.
图1为一个实施例中移动终端的内部结构示意图。如图1所示,该移动终端包括通过系统总线连接的处理器、非易失性存储介质、内存储器、网络接口、显示屏和输入装置。其中,移动终端的非易失性存储介质存储有操作系统和计算机可读指令。该计算机可读指令被处理器执行时以实现一种CPU监测方法。该处理器用于提供计算和控制能力,支撑整个移动终端的运行。移动终端中的内存储器为非易失性存储介质中的计算机可读指令的运行提供环境。网络接口用于与服务器进行网络通信。移动终端的显示屏可以是液晶显示屏或者电子墨水显示屏等,输入装置可以是显示屏上覆盖的触摸层,也可以是移动终端外壳上设置的按键、轨迹球或触控板,也可以是外接的键盘、触控板或鼠标等。该移动终端可以是手机、平板电脑或者个人数字助理或穿戴式设备等。本领域技术人员可以理解,图1中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的移动终端的限定,具体的移动终端可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Fig. 1 is a schematic diagram of the internal structure of a mobile terminal in an embodiment. As shown in FIG. 1 , the mobile terminal includes a processor connected through a system bus, a non-volatile storage medium, an internal memory, a network interface, a display screen and an input device. Wherein, the non-volatile storage medium of the mobile terminal stores an operating system and computer-readable instructions. When the computer readable instructions are executed by the processor, a CPU monitoring method is realized. The processor is used to provide computing and control capabilities to support the operation of the entire mobile terminal. The internal memory in the mobile terminal provides an environment for the execution of computer-readable instructions stored in the non-volatile storage medium. The network interface is used for network communication with the server. The display screen of the mobile terminal can be a liquid crystal display screen or an electronic ink display screen, etc., and the input device can be a touch layer covered on the display screen, or a button, a trackball or a touch pad provided on the mobile terminal shell, or a External keyboard, touchpad or mouse etc. The mobile terminal may be a mobile phone, a tablet computer, a personal digital assistant, or a wearable device. Those skilled in the art can understand that the structure shown in Figure 1 is only a block diagram of a partial structure related to the solution of this application, and does not constitute a limitation on the mobile terminal to which the solution of this application is applied. The specific mobile terminal can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
图2为一个实施例中CPU监测方法的流程图。如图2所示,一种CPU监测方法,包括步骤202至步骤206。其中:Fig. 2 is a flowchart of a CPU monitoring method in an embodiment. As shown in FIG. 2 , a CPU monitoring method includes step 202 to step 206 . in:
步骤202,按照预设的第一时间间隔获取系统CPU占用率。Step 202, acquiring system CPU usage at a preset first time interval.
移动终端在运行时,移动终端内系统程序和第三方程序均会消耗移动终端内CPU(Central Processing Unit,中央处理器)资源。移动终端系统CPU占用率即为移动终端中运行的所有程序占用的CPU资源,包括系统运行程序和第三方运行程序。一般来说,系统CPU占用率越高、移动终端内运行的程序越多;系统CPU占用率越低、移动终端内运行的程序越少。移动终端可按照预设的第一时间间隔获取系统CPU占用率,预设的第一时间间隔可为用户设定的时间间隔,也可为根据历史采集时间得到的时间间隔。When the mobile terminal is running, both system programs and third-party programs in the mobile terminal will consume CPU (Central Processing Unit, central processing unit) resources in the mobile terminal. The CPU usage rate of the mobile terminal system refers to the CPU resources occupied by all programs running in the mobile terminal, including system running programs and third-party running programs. Generally speaking, the higher the CPU usage rate of the system, the more programs run in the mobile terminal; the lower the CPU usage rate of the system, the fewer programs run in the mobile terminal. The mobile terminal may obtain the CPU usage rate of the system according to a preset first time interval, and the preset first time interval may be a time interval set by a user, or may be a time interval obtained according to historical collection time.
移动终端获取系统CPU占用率的步骤可包括:移动终端按照预设的第一时间间隔采集系统CPU累计工作时长,获取连续两次采集的CPU累计工作时长中后一次CPU累计工作时长与前一次CPU累计工作时长的差值,上述差值即为系统CPU在预设的第一时间间隔内真正工作的时间,上述差值与预设的第一时间间隔的比值即在预设的第一时间间隔内系统CPU占用率。上述CPU累计工作时长为移动终端自启动到当前时刻CPU工作的总时长。上述预设的第一时间间隔可为5秒至20秒中任一时长,优选的,可为5秒。例如,移动终端每隔5秒采集一次系统CPU累计工作时长,若连续两次采集的CPU累计工作时长分别为60分03秒和60分04秒,则在这5秒的时间内系统CPU占用率为20%。The step for the mobile terminal to obtain the CPU usage rate of the system may include: the mobile terminal collects the cumulative working hours of the system CPU according to a preset first time interval, and obtains the difference between the cumulative working hours of the CPU in the last two consecutive collections and the cumulative working hours of the previous CPU. The difference between the cumulative working hours, the above difference is the real working time of the system CPU in the preset first time interval, the ratio of the above difference to the preset first time interval is the time in the preset first time interval CPU usage of the internal system. The cumulative working hours of the CPU above are the total working hours of the CPU from the start of the mobile terminal to the current moment. The aforementioned preset first time interval may be any length of time from 5 seconds to 20 seconds, preferably, it may be 5 seconds. For example, the mobile terminal collects the cumulative working hours of the system CPU every 5 seconds. If the cumulative working hours of the CPU collected twice in a row are 60 minutes 03 seconds and 60 minutes 04 seconds respectively, the system CPU usage during these 5 seconds 20%.
在Android系统中,可在/proc目录下读取系统CPU相关信息。其中,/proc目录下stat文件包含了系统CPU活动的所有信息,上述系统CPU活动的所有信息均为移动终端自启动到当前时刻CPU活动累计的时长。移动终端中CPU监控模块可定时读取/proc目录下系统CPU活动信息,再获取移动终端在采集时间内的系统CPU占用率。In the Android system, system CPU-related information can be read in the /proc directory. Among them, the stat file under the /proc directory contains all the information of the CPU activity of the system, and all the information of the CPU activity of the above system is the accumulated time of the CPU activity from the start of the mobile terminal to the current moment. The CPU monitoring module in the mobile terminal can regularly read the system CPU activity information in the /proc directory, and then obtain the system CPU usage rate of the mobile terminal within the collection time.
步骤204,若当前系统CPU占用率与相邻上一次系统CPU占用率的差值超过指定值,将当前系统CPU占用率作为第一CPU占用率。Step 204, if the difference between the current system CPU usage rate and the adjacent last system CPU usage rate exceeds a specified value, use the current system CPU usage rate as the first CPU usage rate.
移动终端在获取到当前系统CPU占用率后,会把当前系统CPU占用率与相邻上一次系统CPU占用率作差,获取系统CPU占用率差值。若上述系统CPU占用率差值超过指定值,则判定移动终端系统CPU占用率变化较大,移动终端内系统CPU占用率异常。一般情况下,上述指定值设定为正数,可为15%至20%任一数字,优选的可为20%。系统CPU占用率差值大于上述指定值,即移动终端系统CPU占用率突然增大,移动终端系统CPU占用率异常。将获取的当前系统CPU占用率作为第一CPU占用率,即异常CPU占用率。After obtaining the current system CPU usage rate, the mobile terminal will compare the current system CPU usage rate with the adjacent previous system CPU usage rate to obtain the system CPU usage rate difference. If the above-mentioned system CPU usage difference exceeds a specified value, it is determined that the mobile terminal system CPU usage rate changes greatly, and the system CPU usage rate in the mobile terminal is abnormal. Generally, the above specified value is set as a positive number, which can be any number from 15% to 20%, preferably 20%. The system CPU usage difference is greater than the specified value above, that is, the mobile terminal system CPU usage suddenly increases, and the mobile terminal system CPU usage is abnormal. The acquired current system CPU usage rate is used as the first CPU usage rate, that is, the abnormal CPU usage rate.
步骤206,若系统CPU占用率不小于第一CPU占用率的持续时长超过指定时长,获取各应用程序CPU占用率。Step 206 , if the system CPU usage rate is not less than the first CPU usage rate and the duration exceeds a specified duration, acquire the CPU usage rates of each application program.
在移动终端获取第一CPU占用率后,再次按照预设的第一时间间隔获取预设次数的移动终端中系统CPU占用率,并将获取的系统CPU占用率依次与第一CPU占用率作比较。若获取的系统CPU占用率均不小于第一CPU占用率,则系统CPU占用率不小于异常CPU占用率的持续时长超过指定时长,即移动终端中存在应用程序持续大量消耗CPU资源,获取移动终端中各应用程序的CPU占用率。上述预设的第一时间间隔可为5秒至30秒中任意时间,优选的,可为5秒。例如,移动终端连续两次采集的系统CPU占用率为20%和40%,系统CPU占用率差值大于指定值15%,则将系统CPU占用率为40%作为第一CPU占用率。按照预设的第一时间间隔每隔5秒采集一次系统CPU占用率,共采集4次系统CPU占用率,分别为42%、45%、47%、50%,上述4次系统CPU占用率均超过40%,即移动终端系统CPU占用率超过40%的持续时长达到20秒超过指定时长18秒,获取移动终端中各应用程序CPU占用率。After the mobile terminal acquires the first CPU occupancy rate, it acquires the system CPU occupancy rate of the mobile terminal for a preset number of times again according to the preset first time interval, and compares the acquired system CPU occupancy rate with the first CPU occupancy rate in sequence . If the acquired system CPU usage rates are not less than the first CPU usage rate, then the duration of the system CPU usage rate is not less than the abnormal CPU usage rate exceeds the specified duration, that is, there are applications in the mobile terminal that continue to consume a large amount of CPU resources, and obtain the mobile terminal The CPU usage of each application program in . The above preset first time interval may be any time between 5 seconds and 30 seconds, preferably, it may be 5 seconds. For example, if the system CPU occupancy rates collected by the mobile terminal are 20% and 40% for two consecutive times, and the difference between the system CPU occupancy rates is greater than a specified value of 15%, then the system CPU occupancy rate of 40% is taken as the first CPU occupancy rate. According to the preset first time interval, the CPU usage of the system is collected every 5 seconds. The CPU usage of the system is collected 4 times in total, which are 42%, 45%, 47%, and 50%. More than 40%, that is, the duration of the CPU usage of the mobile terminal system exceeding 40% reaches 20 seconds and exceeds the specified duration of 18 seconds to obtain the CPU usage of each application program in the mobile terminal.
移动终端获取各应用程序CPU占用率的步骤可包括:按照预设的第二时间间隔采集移动终端中正在运行的各个应用程序的占用CPU的累计时长,获取连续两次采集的应用程序的占用CPU的累计时长中后一次占用CPU的累计时长与前一次占用CPU的累计时长的差值,上述差值为应用程序在第二时间间隔内占用CPU的时间,上述差值与第二时间间隔的比值为在第二时间间隔应用程序CPU占用率。上述第一时间间隔和第二时间间隔可为相同值或不同值。The step for the mobile terminal to acquire the CPU occupancy rate of each application program may include: collecting the cumulative CPU usage time of each application program running in the mobile terminal according to a preset second time interval, and obtaining the CPU occupancy time of the application programs collected twice in a row. The difference between the accumulative duration of the last CPU occupation and the cumulative duration of the previous CPU occupation in the cumulative duration of , the above difference is the time that the application occupies the CPU in the second time interval, the ratio of the above difference to the second time interval CPU usage for the application during the second time interval. The above-mentioned first time interval and second time interval may be the same value or different values.
在Android系统中,/proc/pid目录下sats文件包含了应用程序对应的进程占用CPU的信息。上述应用程序对应的进程占用CPU的信息为应用程序自启动后占用CPU的累计时长。移动终端中CPU监控模块可定时读取/proc/pid目录下各应用程序占用CPU的累计时长,再获取应用程序在采集时间内应用程序CPU占用率。In the Android system, the sats file in the /proc/pid directory contains information about the CPU usage of the process corresponding to the application. The information about the CPU occupied by the process corresponding to the above application program is the accumulated time of the CPU occupied by the application program since it was started. The CPU monitoring module in the mobile terminal can regularly read the cumulative time of CPU usage of each application program in the /proc/pid directory, and then obtain the CPU usage rate of the application program within the collection time.
本发明实施例中CPU监测方法,按照预设的第一时间间隔采集系统CPU占用率,即移动终端中总CPU占用率,当检测到系统CPU占用率大幅度增大时且持续较长时间时,可判定移动终端中存在应用程序大量消耗CPU资源,则获取移动终端中当前运行的应用程序对应的应用程序CPU占用率。上述方法,在系统总CPU迅速增大时,能够及时获取应用程序对应的CPU占用率,有利于监控应用程序的CPU占用率,识别异常应用程序。In the CPU monitoring method in the embodiment of the present invention, the system CPU occupancy rate is collected according to the preset first time interval, that is, the total CPU occupancy rate in the mobile terminal, when it is detected that the system CPU occupancy rate increases significantly and lasts for a long time , it can be determined that there is an application program in the mobile terminal that consumes a large amount of CPU resources, and then the CPU usage rate of the application program corresponding to the application program currently running in the mobile terminal is acquired. The above method can timely obtain the CPU usage rate corresponding to the application program when the total CPU of the system increases rapidly, which is beneficial to monitor the CPU usage rate of the application program and identify abnormal application programs.
在一个实施例中,在获取各应用程序CPU占用率之前,上述CPU监测方法还包括:In one embodiment, before acquiring the CPU usage of each application program, the above CPU monitoring method further includes:
步骤302,查找上一次获取各应用程序CPU占用率的时刻。Step 302, look up the time when the CPU usage of each application program was acquired last time.
步骤304,若当前时刻与上一次获取各应用程序CPU占用率的时刻的时间差超过第一阈值,获取各应用程序CPU占用率。Step 304, if the time difference between the current time and the last time the CPU usage of each application program is obtained exceeds a first threshold, obtain the CPU usage of each application program.
移动终端在获取各应用程序对应的应用程序CPU占用率之前,会查找上一次获取各应用程序CPU占用率的时刻,获取当前时刻与上一次获取各应用程序CPU占用率时刻之间的时间差。若上述时间差超过预设的第一阈值,则获取应用程序CPU占用率。获取应用程序CPU占用率的步骤与步骤206中获取应用程序CPU占用率的步骤相同,在此不再赘述。若上述时间差未超过预设的第一阈值,则直接获取上一次采集的各应用程序CPU占用率作为当前各应用程序CPU占用率。上述第一阈值可为用户设定的值,也可为根据历史采集的各应用程序CPU占用率数据分析得到的数值,如30秒,1分钟等。Before obtaining the application CPU usage corresponding to each application, the mobile terminal will search for the last time the CPU usage of each application was obtained, and obtain the time difference between the current time and the last time the CPU usage of each application was obtained. If the above-mentioned time difference exceeds the preset first threshold, the CPU usage rate of the application program is obtained. The step of obtaining the CPU usage of the application program is the same as the step of obtaining the CPU usage of the application program in step 206, and will not be repeated here. If the above time difference does not exceed the preset first threshold, the CPU usage rate of each application program collected last time is directly acquired as the current CPU usage rate of each application program. The above-mentioned first threshold may be a value set by the user, or may be a value obtained by analyzing historically collected CPU usage data of each application program, such as 30 seconds, 1 minute, and so on.
移动终端中应用程序CPU占用率在短时间内不会发生变化,且获取各应用程序CPU占用率需要消耗一定的系统资源。本发明实施例中CPU监测方法,在接收到获取各应用程序对应的应用程序CPU占用率请求后,先获取当前时刻与上一次获取各应用程序对应的应用程序CPU占用率时刻的时间差,判断时间差与预设时长的关系,在时间差较短时,直接将上一次获取的各应用程序CPU占用率作为当前各应用程序CPU占用率,在时间差较长时,在重新获取各应用程序CPU占用率。既保证了获取个应用程序CPU占用率的准确性,有降低了系统功耗,节省了系统资源。The CPU usage rate of the application program in the mobile terminal does not change in a short period of time, and obtaining the CPU usage rate of each application program needs to consume certain system resources. In the CPU monitoring method in the embodiment of the present invention, after receiving the request for acquiring the CPU occupancy rate of the application program corresponding to each application program, first obtain the time difference between the current time and the time when the CPU occupancy rate of the application program corresponding to each application program was obtained last time, and determine the time difference The relationship with the preset time length, when the time difference is short, directly use the CPU usage rate of each application program obtained last time as the current CPU usage rate of each application program, and when the time difference is long, obtain the CPU usage rate of each application program again. It not only ensures the accuracy of obtaining the CPU usage rate of an application program, but also reduces system power consumption and saves system resources.
在一个实施例中,步骤202获取系统CPU占用率包括:In one embodiment, step 202 to obtain the system CPU usage includes:
(1)获取连续两次采集的系统CPU累计工作时长的差值作为第一差值。(1) Acquiring the difference between the accumulated working hours of the system CPU collected twice in a row as the first difference.
(2)根据第一差值和时间间隔获取系统CPU占用率。(2) Obtain the system CPU usage rate according to the first difference value and the time interval.
在Android系统中,可在/proc目录下读取系统CPU相关信息。其中,/proc目录下stat文件包含了系统CPU活动的所有信息,上述系统CPU活动的所有信息均为移动终端自启动到当前时刻CPU活动累计的时长。移动终端中CPU监控模块可定时读取/proc目录下系统CPU活动信息,再获取移动终端在采集时间内的系统CPU占用率。移动终端获取系统CPU占用率的步骤可包括:移动终端按照预设的第一时间间隔采集系统CPU累计工作时长,获取连续两次采集的CPU累计工作时长中后一次CPU累计工作时长与前一次CPU累计工作时长的差值,上述差值即为系统CPU在预设的第一时间间隔内真正工作的时间,上述差值与预设的第一时间间隔的比值即在预设的第一时间间隔内系统CPU占用率。上述CPU累计工作时长为移动终端自启动到当前时刻CPU工作的总时长。上述预设的第一时间间隔可为5秒至20秒中任一时长,优选的,可为5秒。In the Android system, system CPU-related information can be read in the /proc directory. Among them, the stat file under the /proc directory contains all the information of the CPU activity of the system, and all the information of the CPU activity of the above system is the accumulated time of the CPU activity from the start of the mobile terminal to the current moment. The CPU monitoring module in the mobile terminal can regularly read the system CPU activity information in the /proc directory, and then obtain the system CPU usage rate of the mobile terminal within the collection time. The step for the mobile terminal to obtain the CPU usage rate of the system may include: the mobile terminal collects the cumulative working hours of the system CPU according to a preset first time interval, and obtains the difference between the cumulative working hours of the CPU in the last two consecutive collections and the cumulative working hours of the previous CPU. The difference between the cumulative working hours, the above difference is the real working time of the system CPU in the preset first time interval, the ratio of the above difference to the preset first time interval is the time in the preset first time interval CPU usage of the internal system. The cumulative working hours of the CPU above are the total working hours of the CPU from the start of the mobile terminal to the current moment. The aforementioned preset first time interval may be any length of time from 5 seconds to 20 seconds, preferably, it may be 5 seconds.
在一个实施例中,上述CPU监测方法还包括:In one embodiment, the above-mentioned CPU monitoring method also includes:
步骤402,若检测到应用程序对应的CPU占用率超过第二阈值,检测应用程序是否满足预设规则。Step 402, if it is detected that the CPU usage rate corresponding to the application program exceeds the second threshold, check whether the application program satisfies a preset rule.
步骤404,若否,停止运行应用程序对应的进程。Step 404, if not, stop running the process corresponding to the application program.
移动终端在获取到各应用程序对应的CPU占用率后,依次比较各应用程序对应的CPU占用率是否超过预设的第二阈值,若超过预设的第二阈值,则表示应用程序CPU占用率过高,进一步检测上述应用程序是否满足预设规则。上述第二阈值可为用户设定的值,也可为根据历史获取的应用程序CPU占用率分析得到的值,如上述第二阈值可为20%。预设规则包括:系统白名单中应用程序、前台运行的应用程序、应用程序正在执行预设行为(包括下载文件、上传文件、应用程序更新等)、优先级较高的应用程序、播放音乐的应用程序等。上述预设规则可为用户设置的规则。当应用程序满足上述预设规则时,不对应用程序进行处理,如对用户设置的白名单中应用程序不进行处理、对用户设置的优先级前三的应用程序不进行处理。当应用程序不满足上述预设规则时,停止运行上述应用程序对应的进程。其中,停止运行上述应用程序对应的进程包括:关闭或挂起应用程序对应的进程等方式,其中,关闭应用程序对应的进程指的是终止(kill)应用程序对应的进程,挂起应用程序对应的进程指的是暂停应用程序对应的进程的运行,可将挂起的应用程序对应的进程加入等待队列中,当系统CPU占用率较低时,再恢复应用程序对应的进程的运行。After the mobile terminal obtains the CPU occupancy rate corresponding to each application program, it compares whether the CPU occupancy rate corresponding to each application program exceeds the preset second threshold in turn. If it exceeds the preset second threshold value, it means that the application program CPU occupancy rate If the value is too high, further check whether the above application meets the preset rules. The above-mentioned second threshold may be a value set by a user, or may be a value obtained by analyzing the CPU usage rate of an application obtained in history, for example, the above-mentioned second threshold may be 20%. Preset rules include: applications in the system whitelist, applications running in the foreground, applications that are performing preset behaviors (including downloading files, uploading files, application updates, etc.), applications with higher priority, applications that play music applications etc. The aforementioned preset rules may be rules set by the user. When the application meets the above preset rules, the application is not processed, for example, the application in the white list set by the user is not processed, and the application programs with the top three priorities set by the user are not processed. When the application program does not satisfy the above preset rule, stop running the process corresponding to the above application program. Wherein, stopping the process corresponding to the application above includes: closing or suspending the process corresponding to the application, etc., wherein closing the process corresponding to the application refers to terminating (killing) the process corresponding to the application, and suspending the process corresponding to the application The process refers to suspending the operation of the process corresponding to the application program. The process corresponding to the suspended application program can be added to the waiting queue. When the CPU usage of the system is low, the operation of the process corresponding to the application program can be resumed.
本发明实施例中CPU监测方法,在移动终端中应用程序CPU占用率较高时,检测应用程序是否为移动终端预设的不处理应用程序或用户设定的不处理应用程序。当不是不处理应用程序时,停止运行应用程序对应的进行,即对CPU占用率异常的应用程序进行查杀处理,避免了移动终端中异常应用程序大量耗费CPU资源,造成移动终端系统卡顿、发热等。其中,预设规则可以保证应用程序正常占用大量CPU资源的情况下,应用程序不被清理,提高了识别异常应用程序的精确度,查杀的异常应用程序更准确。In the CPU monitoring method in the embodiment of the present invention, when the CPU usage rate of the application program in the mobile terminal is high, it is detected whether the application program is a preset non-processing application program of the mobile terminal or a non-processing application program set by the user. When the application program is not not processed, stop running the application program correspondingly, that is, to check and kill the application program with abnormal CPU usage rate, so as to avoid the abnormal application program in the mobile terminal from consuming a large amount of CPU resources, causing the mobile terminal system to freeze, fever etc. Among them, the preset rules can ensure that the application program is not cleaned up when the application program normally occupies a large amount of CPU resources, which improves the accuracy of identifying abnormal application programs, and kills abnormal application programs more accurately.
在一个实施例中,上述CPU监测方法还包括:In one embodiment, the above-mentioned CPU monitoring method also includes:
步骤502,根据系统CPU占用率获取对应的CPU占用级别。In step 502, a corresponding CPU occupancy level is acquired according to the system CPU occupancy rate.
可预先划分多个CPU占用级别,每个占用级别可对应不同的占用率范围,例如,划分4个CPU占用级别,包括L1、L2、L3及L4,其中,L1占用级别对应的占用率范围为小于20%,L2占用级别对应的占用率范围为20%~40%,L3占用级别对应的占用率范围为40%~60%,L4占用级别对应的占用率范围为大于60%等,不限于此。移动终端按照预设的第一时间间隔采集系统CPU占用率,可确定采集的系统CPU占用率落入的占用率范围,并得到与该落入的占用率范围对应的CPU占用级别。例如,采集的系统CPU占用率为18%,则CPU占用级别为L1,系统CPU占用率为25%,则CPU占用级别为L2等。Multiple CPU occupancy levels can be divided in advance, and each occupancy level can correspond to a different occupancy rate range. For example, four CPU occupancy levels can be divided, including L1, L2, L3, and L4. Among them, the occupancy rate range corresponding to the L1 occupancy level is Less than 20%, the occupancy rate corresponding to the L2 occupancy level ranges from 20% to 40%, the occupancy rate corresponding to the L3 occupancy level ranges from 40% to 60%, and the occupancy rate corresponding to the L4 occupancy level ranges from more than 60%, etc., not limited to this. The mobile terminal collects the system CPU usage at a preset first time interval, determines the usage range that the collected system CPU usage falls into, and obtains the CPU usage level corresponding to the usage range. For example, if the collected system CPU usage rate is 18%, the CPU usage level is L1, and the system CPU usage rate is 25%, then the CPU usage level is L2, and so on.
步骤504,累计连续维持在占用级别的次数。Step 504, accumulating the number of times of continuous maintenance at the occupancy level.
移动终端可为每个CPU占用级别分配一个级别计数器,通过级别计数器记录CPU维持在对应的占用级别的连续次数,其中,CPU维持在某个占用级别,指的是CPU一直处于该占用级别或以上的占用级别,例如,CPU占用级别变化为L2占用级别、L3占用级别、L2占用级别,则可认为CPU维持在L2占用级别,连续次数为3。The mobile terminal can assign a level counter to each CPU occupancy level, and use the level counter to record the continuous number of times the CPU maintains the corresponding occupancy level, wherein, the CPU maintains a certain occupancy level, which means that the CPU has been at the occupancy level or above For example, if the CPU occupancy level changes to L2 occupancy level, L3 occupancy level, and L2 occupancy level, it can be considered that the CPU maintains the L2 occupancy level, and the number of consecutive times is 3.
在一个实施例中,移动终端按照预设的第一时间间隔采集系统CPU占用率,并确定CPU占用级别,可分别在该占用级别及以下的占用级别对应的级别计数器中加1,并将其他占用级别的级别计数器清零。例如,本次的CPU占用级别为L3,则将L1、L2及L3的级别计数器分别加1,L4的级别计数器清零,下一次的CPU占用级别为L2,则将L1、L2的级别计数器分别加1,L3、L4的级别计数器清零。In one embodiment, the mobile terminal collects the CPU occupancy rate of the system according to the preset first time interval, and determines the CPU occupancy level, and can respectively add 1 to the level counter corresponding to the occupancy level and the occupancy level below the occupancy level, and set other The level counter of the occupied level is cleared. For example, if the current CPU usage level is L3, the level counters of L1, L2, and L3 will be incremented by 1, and the level counter of L4 will be cleared. The next time the CPU usage level is L2, the level counters of L1 and L2 will be respectively Add 1, and the level counters of L3 and L4 are cleared.
在一个实施例中,可划分占用级别的类型,其中,类型可包括为空闲级别及繁忙级别,例如,将L1占用级别作为空闲级别,将L2、L3、L4占用级别作为繁忙级别,分别代表不同的繁忙程度。移动终端每隔预设的第一时间间隔采集系统CPU占用率,并计算CPU占用级别,可先确定对应的类型,再分别在该占用级别及以下的属于同一类型的占用级别对应的级别计数器中加1,并将其他占用级别的级别计数器清零。例如,本次的CPU占用级别为L1,属于空闲级别,则将L1的级别计数器加1,L2、L3及L4的级别计数器清零,下一次的CPU占用级别为L3,属于繁忙级别,则将L3以及同属于繁忙级别的L2的级别计数器分别加1,L1、L4的级别计数器清零。In one embodiment, the types of occupancy levels can be divided, wherein the types can include idle levels and busy levels, for example, the L1 occupancy level is used as the idle level, and the L2, L3, and L4 occupancy levels are used as the busy level, respectively representing different of busyness. The mobile terminal collects the CPU occupancy rate of the system every preset first time interval, and calculates the CPU occupancy level. The corresponding type can be determined first, and then the occupancy level and the occupancy level below the occupancy level of the same type correspond to the level counters. Increment by 1 and clear level counters for other occupied levels. For example, if the current CPU occupation level is L1, which belongs to the idle level, the level counter of L1 will be incremented by 1, and the level counters of L2, L3, and L4 will be cleared. The next time the CPU occupation level is L3, which belongs to the busy level, then the The level counters of L3 and L2 which belong to the same busy level are incremented by 1, and the level counters of L1 and L4 are cleared to zero.
步骤506,当次数达到占用级别对应的第三阈值时,确定与占用级别对应的繁忙程度。Step 506, when the number of times reaches the third threshold corresponding to the occupation level, determine the busyness corresponding to the occupation level.
可为每个CPU占用级别设定对应的第三阈值,该第三阈值可用于判断移动终端的CPU是否维持在对应占用级别的工作状态中。移动终端通过级别计数器累计CPU连续维持在各个占用级别的次数,当CPU连续维持在占用级别的次数达到与该占用级别对应的第三阈值时,则可认定CPU稳定在该占用级别的工作状态中。例如,对L1、L2、L3及L4,分别设定一个对应的第三阈值为c1、c2、c3及c4,当CPU连续维持在L1级别的次数达到c1,则认定CPU稳定在L1的工作状态中。进一步地,各占用级别对应的第三阈值,可随着占用级别的增大而减小,例如,L1、L2、L3及L4对应的第三阈值为c1、c2、c3及c4,其中,c1>c2>c3>c4,比如,c1为5次,c2为4次,c3为3次,c4为2次等,但不限于此。在一个实施例中,若同时存在多个连续维持的次数达到对应的第三阈值的占用级别,则选取最高级别的占用级别作为CPU稳定的工作状态。A corresponding third threshold can be set for each CPU occupancy level, and the third threshold can be used to determine whether the CPU of the mobile terminal is maintained in the working state of the corresponding occupancy level. The mobile terminal uses the level counter to accumulate the number of times the CPU is continuously maintained at each occupancy level. When the number of times the CPU is continuously maintained at the occupancy level reaches the third threshold corresponding to the occupancy level, it can be determined that the CPU is stable in the working state of the occupancy level. . For example, for L1, L2, L3, and L4, set a corresponding third threshold value to c1, c2, c3, and c4 respectively. When the number of times the CPU maintains the level of L1 reaches c1, it is determined that the CPU is stable in the working state of L1. middle. Further, the third threshold corresponding to each occupancy level may decrease as the occupancy level increases, for example, the third thresholds corresponding to L1, L2, L3, and L4 are c1, c2, c3, and c4, where c1 >c2>c3>c4, for example, c1 is 5 times, c2 is 4 times, c3 is 3 times, c4 is 2 times, etc., but not limited to this. In one embodiment, if there are multiple occupancy levels whose consecutive maintenance times reach the corresponding third threshold, the highest occupancy level is selected as the stable working state of the CPU.
本发明实施例中CPU监测方法,对CPU占用率设定不同的占用级别,根据维持在占用级别的次数确定移动终端的繁忙程度,有利于根据移动终端的繁忙程序对应用程序进行不同的处理,如在占用级别较高,系统较繁忙时,直接关闭异常应用程序对应的进程;在占用级别较低,系统较空闲时,挂起异常应用程序对应的进程,提高了处理异常应用程序的灵活性。In the CPU monitoring method in the embodiment of the present invention, different occupancy levels are set for the CPU occupancy rate, and the busyness of the mobile terminal is determined according to the number of times maintained at the occupancy level, which is conducive to different processing of the application program according to the busy program of the mobile terminal, For example, when the occupation level is high and the system is busy, the process corresponding to the abnormal application is directly closed; when the occupation level is low and the system is relatively idle, the process corresponding to the abnormal application is suspended, which improves the flexibility of handling abnormal applications .
在一个实施例中,在停止运行应用程序对应的进程之前,上述CPU监测方法还包括:In one embodiment, before stopping the process corresponding to the running application, the above CPU monitoring method further includes:
步骤602,在移动终端界面展示应用程序对应的异常信息、对应用程序的停止运行指令。Step 602, displaying abnormal information corresponding to the application program and an instruction to stop running the application program on the interface of the mobile terminal.
步骤604,若接收到对停止运行指令的触发操作,停止运行应用程序对应的进程。Step 604: Stop running the process corresponding to the application program if a trigger operation for the stop running instruction is received.
移动终端在停止运行应用程序对应的进程之前,还可在移动终端界面展示应用程序对应的异常信息。上述异常信息可包括:应用程序当前CPU占用率,应用程序当前程序行为(如后台下载文件等)、应用程序当前占用网速等。除展示应用程序的停止运行指令外,还可展示取消指令。若获取到对取消指令的触发操作,则对应用程序不进行处理;若获取到对停止运行指令的触发操作,则停止运行应用程序对应的进程。Before the mobile terminal stops running the process corresponding to the application program, the abnormal information corresponding to the application program can also be displayed on the interface of the mobile terminal. The above abnormal information may include: the current CPU usage rate of the application program, the current program behavior of the application program (such as downloading files in the background, etc.), the network speed currently occupied by the application program, and the like. In addition to showing a stop command for the application, a cancel command can also be shown. If the trigger operation of the cancel instruction is obtained, the application program is not processed; if the trigger operation of the stop operation instruction is obtained, the process corresponding to the application program is stopped.
本发明实施例中CPU监测方法,在检测出异常应用程序后,在移动终端界面展示应用程序对应的异常信息,接收到用户停止运行指令后在对应用程序对应的进程进行停止运行,可以避免对应用程序查杀的误操作,提高了应用程序查杀的精度。In the CPU monitoring method in the embodiment of the present invention, after detecting an abnormal application program, the abnormal information corresponding to the application program is displayed on the mobile terminal interface, and the process corresponding to the application program is stopped after receiving the user stop operation instruction, which can avoid The misoperation of application program killing improves the accuracy of application program killing.
图7为另一个实施例中CPU监测方法的流程图。如图7所示,一种CPU监测方法,包括步骤702至步骤714。其中:Fig. 7 is a flowchart of a CPU monitoring method in another embodiment. As shown in FIG. 7 , a CPU monitoring method includes step 702 to step 714 . in:
步骤702,按照预设的第一时间间隔获取系统CPU占用率。上述获取系统CPU占用率包括:Step 702, acquiring system CPU usage at a preset first time interval. The above acquisition of system CPU usage includes:
(1)获取连续两次采集的系统CPU累计工作时长的差值作为第一差值。(1) Acquiring the difference between the accumulated working hours of the system CPU collected twice in a row as the first difference.
(2)根据第一差值和时间间隔获取系统CPU占用率。(2) Obtain the system CPU usage rate according to the first difference value and the time interval.
获取系统CPU占用率的步骤与步骤202中获取系统CPU占用率的步骤相同,在此不再赘述。The step of obtaining the CPU usage of the system is the same as the step of obtaining the CPU usage of the system in step 202, and will not be repeated here.
步骤704,若当前系统CPU占用率与相邻上一次系统CPU占用率的差值超过指定值,将当前系统CPU占用率作为第一CPU占用率。Step 704, if the difference between the current system CPU usage rate and the adjacent last system CPU usage rate exceeds a specified value, use the current system CPU usage rate as the first CPU usage rate.
上述第一CPU占用率即为异常占用率。获取第一CPU占用率的步骤与步骤204中获取第一CPU占用率的步骤相同,在此不再赘述。The above-mentioned first CPU usage rate is the abnormal usage rate. The step of obtaining the first CPU usage rate is the same as the step of obtaining the first CPU usage rate in step 204, and details are not repeated here.
步骤706,若系统CPU占用率不小于第一CPU占用率的持续时长超过指定时长,查找上一次获取各应用程序CPU占用率的时刻。Step 706 , if the system CPU usage rate is not less than the first CPU usage rate and the duration exceeds the specified duration, search for the last time when the CPU usage rate of each application program was obtained.
查找上一次获取各应用程序CPU占用率的时刻的步骤与步骤302中查找上一次获取各应用程序CPU占用率的时刻的步骤相同,在此不再赘述。The step of finding the last time to obtain the CPU usage rate of each application program is the same as the step of finding the last time time to obtain the CPU usage rate of each application program in step 302 , and will not be repeated here.
步骤708,若当前时刻与上一次获取各应用程序CPU占用率的时刻的时间差超过第一阈值,获取各应用程序CPU占用率。Step 708, if the time difference between the current time and the last time the CPU usage of each application program is obtained exceeds a first threshold, obtain the CPU usage of each application program.
获取应用程序CPU占用率的步骤与步骤206中获取应用程序CPU占用率的步骤相同,在此不再赘述。The step of obtaining the CPU usage of the application program is the same as the step of obtaining the CPU usage of the application program in step 206, and will not be repeated here.
步骤710,若检测到应用程序对应的CPU占用率超过第二阈值,检测应用程序是否满足预设规则。Step 710, if it is detected that the CPU usage rate corresponding to the application program exceeds the second threshold, check whether the application program satisfies a preset rule.
检测应用程序对应的CPU占用率是否超过第二阈值,应用程序是否满足预设规则的步骤与步骤402中对应的步骤相同,在此不再赘述。The steps of detecting whether the CPU usage rate corresponding to the application program exceeds the second threshold and whether the application program satisfies the preset rule are the same as the corresponding steps in step 402, and will not be repeated here.
步骤712,若否,在移动终端界面展示应用程序对应的异常信息、对应用程序的停止运行指令。若接收到对停止运行指令的触发操作,停止运行应用程序对应的进程。Step 712, if not, display the abnormal information corresponding to the application program and the instruction to stop running the application program on the interface of the mobile terminal. If a trigger operation for the stop running instruction is received, stop running the process corresponding to the application program.
在移动终端展示应用程序对应的异常信息、对应用程序的停止运行指令步骤与图6中对应的步骤相同,在此不再赘述。停止运行应用程序对应的进程与步骤404中对应的步骤相同,在此不再赘述。The steps of displaying the abnormal information corresponding to the application program on the mobile terminal and instructing the application program to stop running are the same as the corresponding steps in FIG. 6 , and will not be repeated here. The process corresponding to stopping the running of the application program is the same as the corresponding step in step 404, and will not be repeated here.
步骤714,根据系统CPU占用率获取对应的CPU占用级别。累计连续维持在占用级别的次数。当次数达到占用级别对应的第三阈值时,确定与占用级别对应的繁忙程度。Step 714, obtain the corresponding CPU occupancy level according to the system CPU occupancy rate. Accumulates the number of times the occupancy level is continuously maintained. When the number of times reaches the third threshold corresponding to the occupancy level, determine the busyness corresponding to the occupancy level.
获取系统CPU占用率对应的CPU占用级别,确定与CPU占用界别对应的繁忙程度的步骤与图5中对应的步骤相同,在此不再赘述。The steps of obtaining the CPU occupancy level corresponding to the CPU occupancy rate of the system and determining the busyness corresponding to the CPU occupancy sector are the same as the corresponding steps in FIG. 5 , and will not be repeated here.
图8为一个实施例中CPU监测装置的结构框图。一种CPU监测装置,包括第一获取模块802、差值模块804和第二获取模块806。其中:Fig. 8 is a structural block diagram of a CPU monitoring device in an embodiment. A CPU monitoring device includes a first obtaining module 802 , a difference module 804 and a second obtaining module 806 . in:
第一获取模块802,用于按照预设的第一时间间隔获取系统CPU占用率。The first obtaining module 802 is configured to obtain the CPU usage of the system according to a preset first time interval.
差值模块804,用于若当前系统CPU占用率与相邻上一次系统CPU占用率的差值超过指定值,将当前系统CPU占用率作为第一CPU占用率。The difference module 804 is configured to use the current system CPU usage rate as the first CPU usage rate if the difference between the current system CPU usage rate and the adjacent previous system CPU usage rate exceeds a specified value.
第二获取模块806,用于若系统CPU占用率不小于第一CPU占用率的持续时长超过指定时长,获取各应用程序CPU占用率。The second obtaining module 806 is configured to obtain the CPU usage of each application program if the system CPU usage is not less than the first CPU usage and the duration exceeds a specified duration.
在一个实施例中,第二获取模块806还用于在获取各应用程序CPU占用率之前,查找上一次获取各应用程序CPU占用率的时刻。若当前时刻与上一次获取各应用程序CPU占用率的时刻的时间差超过第一阈值,获取各应用程序CPU占用率。In one embodiment, the second obtaining module 806 is further configured to search for the last time the CPU usage of each application was obtained before obtaining the CPU usage of each application. If the time difference between the current time and the last time the CPU usage of each application program is obtained exceeds the first threshold, the CPU usage of each application program is obtained.
在一个实施例中,第一获取模块802还用于获取连续两次采集的系统CPU工作时长的差值作为第一差值。根据第一差值和时间间隔获取系统CPU占用率。In one embodiment, the first acquiring module 802 is further configured to acquire a difference between two consecutive acquisitions of system CPU working hours as the first difference. The system CPU usage is acquired according to the first difference and the time interval.
图9为另一个实施例中CPU监测装置的结构框图。一种CPU监测装置,包括第一获取模块902、差值模块904、第二获取模块906和关闭模块908。其中第一获取模块902、差值模块904和第二获取模块906与图8中对应的模块功能相同。Fig. 9 is a structural block diagram of a CPU monitoring device in another embodiment. A CPU monitoring device includes a first acquiring module 902 , a difference module 904 , a second acquiring module 906 and a closing module 908 . The functions of the first obtaining module 902 , the difference module 904 and the second obtaining module 906 are the same as those of the corresponding modules in FIG. 8 .
关闭模块908,用于若检测到应用程序对应的CPU占用率超过第二阈值,检测应用程序是否满足预设规则。若否,停止运行应用程序对应的进程。The closing module 908 is configured to detect whether the application program meets a preset rule if it is detected that the CPU usage rate corresponding to the application program exceeds the second threshold. If not, stop running the process corresponding to the application program.
图10为另一个实施例中CPU监测装置的结构框图。一种CPU监测装置,包括第一获取模块1002、差值模块1004、第二获取模块1006、第三获取模块1008、累计模块1010和确定模块1012。其中第一获取模块1002、差值模块1004和第二获取模块1006与图8中对应的模块功能相同。Fig. 10 is a structural block diagram of a CPU monitoring device in another embodiment. A CPU monitoring device includes a first acquisition module 1002 , a difference module 1004 , a second acquisition module 1006 , a third acquisition module 1008 , an accumulation module 1010 and a determination module 1012 . The functions of the first acquiring module 1002 , the difference module 1004 and the second acquiring module 1006 are the same as those of the corresponding modules in FIG. 8 .
第三获取模块1008,用于根据系统CPU占用率获取对应的CPU占用级别。The third obtaining module 1008 is configured to obtain a corresponding CPU usage level according to the system CPU usage rate.
累计模块1010,用于累计连续维持在占用级别的次数。The accumulating module 1010 is used for accumulating the times of continuous maintenance at the occupancy level.
确定模块1012,用于当次数达到占用级别对应的第三阈值时,确定与占用级别对应的繁忙程度。The determining module 1012 is configured to determine the busyness corresponding to the occupation level when the number of times reaches the third threshold corresponding to the occupation level.
图11为另一个实施例中CPU监测装置的结构框图。一种CPU监测装置,包括第一获取模块1102、差值模块1104、第二获取模块1106、展示模块1108和关闭模块1110。其中第一获取模块1102、差值模块1104和第二获取模块1106与图8中对应的模块功能相同。关闭模块1110与图9中对应的模块功能相同。Fig. 11 is a structural block diagram of a CPU monitoring device in another embodiment. A CPU monitoring device includes a first obtaining module 1102 , a difference module 1104 , a second obtaining module 1106 , a display module 1108 and a closing module 1110 . The functions of the first acquiring module 1102 , the difference module 1104 and the second acquiring module 1106 are the same as those of the corresponding modules in FIG. 8 . The shutdown module 1110 has the same function as the corresponding module in FIG. 9 .
展示模块1108,用于在移动终端界面展示应用程序对应的异常信息、对应用程序的停止运行指令。The display module 1108 is configured to display abnormal information corresponding to the application program and an instruction to stop running the application program on the mobile terminal interface.
关闭模块1110还用于若接收到对停止运行指令的触发操作,停止运行应用程序对应的进程。The closing module 1110 is also configured to stop running the process corresponding to the application program if a trigger operation of the stop running command is received.
上述CPU监测装置中各个模块的划分仅用于举例说明,在其他实施例中,可将CPU监测装置按照需要划分为不同的模块,以完成上述CPU监测装置的全部或部分功能。The division of each module in the above CPU monitoring device is only for illustration. In other embodiments, the CPU monitoring device can be divided into different modules according to needs, so as to complete all or part of the functions of the above CPU monitoring device.
本发明实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当计算机可执行指令被一个或多个处理器执行时,使得处理器执行如上所述的CPU监测方法。The embodiment of the present invention also provides a computer-readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the CPU monitoring method as described above.
本发明实施例还提供了一种移动终端。如图12所示,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该移动终端可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等任意终端设备,以移动终端为手机为例:The embodiment of the present invention also provides a mobile terminal. As shown in FIG. 12 , for the convenience of description, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The mobile terminal can be any terminal device including mobile phone, tablet computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of Sales, sales terminal), vehicle-mounted computer, wearable device, etc., taking the mobile terminal as a mobile phone as an example :
图12为与本发明实施例提供的移动终端相关的手机的部分结构的框图。参考图12,手机包括:射频(Radio Frequency,RF)电路1210、存储器1220、输入单元1230、显示单元1240、传感器1250、音频电路1260、无线保真(wireless fidelity,WiFi)模块1270、处理器1280、以及电源1290等部件。本领域技术人员可以理解,图12所示的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Fig. 12 is a block diagram of a partial structure of a mobile phone related to the mobile terminal provided by the embodiment of the present invention. Referring to FIG. 12 , the mobile phone includes: a radio frequency (Radio Frequency, RF) circuit 1210, a memory 1220, an input unit 1230, a display unit 1240, a sensor 1250, an audio circuit 1260, a wireless fidelity (wireless fidelity, WiFi) module 1270, and a processor 1280 , and power supply 1290 and other components. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 12 is not limited to the mobile phone, and may include more or less components than shown in the figure, or combine some components, or arrange different components.
其中,RF电路1210可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器1280处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路1210还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System ofMobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband CodeDivision Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。Among them, the RF circuit 1210 can be used for sending and receiving information or receiving and sending signals during a call. After receiving the downlink information from the base station, it can be processed by the processor 1280; it can also send uplink data to the base station. Generally, an RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, and the like. In addition, RF circuitry 1210 may also communicate with networks and other devices via wireless communications. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
存储器1220可用于存储软件程序以及模块,处理器1280通过运行存储在存储器1220的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器1220可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据手机的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器1220可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 1220 can be used to store software programs and modules, and the processor 1280 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1220 . The memory 1220 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as an application program for a sound playback function, an application program for an image playback function, etc.); The data storage area can store data created according to the use of the mobile phone (such as audio data, address book, etc.) and the like. In addition, the memory 1220 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
输入单元1230可用于接收输入的数字或字符信息,以及产生与手机1200的用户设置以及功能控制有关的键信号输入。具体地,输入单元1230可包括触控面板1231以及其他输入设备1232。触控面板1231,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1231上或在触控面板1231附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,触控面板1231可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1280,并能接收处理器1280发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1231。除了触控面板1231,输入单元1230还可以包括其他输入设备1232。具体地,其他输入设备1232可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。The input unit 1230 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the mobile phone 1200 . Specifically, the input unit 1230 may include a touch panel 1231 and other input devices 1232 . The touch panel 1231, which can also be referred to as a touch screen, can collect touch operations of the user on or near it (for example, the user uses any suitable object or accessory such as a finger or a stylus on the touch panel 1231 or near the touch panel 1231 operation), and drive the corresponding connection device according to the preset program. In one embodiment, the touch panel 1231 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 1280, and can receive and execute commands sent by the processor 1280. In addition, the touch panel 1231 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1231 , the input unit 1230 may also include other input devices 1232 . Specifically, other input devices 1232 may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), and the like.
显示单元1240可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1240可包括显示面板1241。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1241。在一个实施例中,触控面板1231可覆盖显示面板1241,当触控面板1231检测到在其上或附近的触摸操作后,传送给处理器1280以确定触摸事件的类型,随后处理器1280根据触摸事件的类型在显示面板1241上提供相应的视觉输出。虽然在图12中,触控面板1231与显示面板1241是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板1231与显示面板1241集成而实现手机的输入和输出功能。The display unit 1240 may be used to display information input by or provided to the user and various menus of the mobile phone. The display unit 1240 may include a display panel 1241 . In one embodiment, the display panel 1241 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like. In one embodiment, the touch panel 1231 can cover the display panel 1241. When the touch panel 1231 detects a touch operation on or near it, it transmits to the processor 1280 to determine the type of the touch event, and then the processor 1280 according to the The type of touch event provides a corresponding visual output on the display panel 1241 . Although in FIG. 12 , the touch panel 1231 and the display panel 1241 are used as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 1231 and the display panel 1241 can be integrated to form a mobile phone. Realize the input and output functions of the mobile phone.
手机1200还可包括至少一种传感器1250,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1241的亮度,接近传感器可在手机移动到耳边时,关闭显示面板1241和/或背光。运动传感器可包括加速度传感器,通过加速度传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换)、振动识别相关功能(比如计步器、敲击)等;此外,手机还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。Cell phone 1200 may also include at least one sensor 1250, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1241 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 1241 and/or when the mobile phone is moved to the ear. or backlight. The motion sensor can include an acceleration sensor, through which the magnitude of acceleration in various directions can be detected, and the magnitude and direction of gravity can be detected when stationary, and can be used for applications that recognize the attitude of a mobile phone (such as switching between horizontal and vertical screens), vibration recognition related functions (such as pedometer, tap), etc.; in addition, the mobile phone can also be equipped with gyroscope, barometer, hygrometer, thermometer, infrared sensor and other sensors.
音频电路1260、扬声器1261和传声器1262可提供用户与手机之间的音频接口。音频电路1260可将接收到的音频数据转换后的电信号,传输到扬声器1261,由扬声器1261转换为声音信号输出;另一方面,传声器1262将收集的声音信号转换为电信号,由音频电路1260接收后转换为音频数据,再将音频数据输出处理器1280处理后,经RF电路1210可以发送给另一手机,或者将音频数据输出至存储器1220以便后续处理。Audio circuitry 1260, speaker 1261 and microphone 1262 may provide an audio interface between the user and the handset. The audio circuit 1260 can transmit the electrical signal converted from the received audio data to the speaker 1261, and the speaker 1261 converts it into an audio signal for output; After being received, it is converted into audio data, and after being processed by the output processor 1280, the audio data can be sent to another mobile phone through the RF circuit 1210, or the audio data can be output to the memory 1220 for subsequent processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块1270可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图12示出了WiFi模块1270,但是可以理解的是,其并不属于手机1200的必须构成,可以根据需要而省略。WiFi is a short-distance wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1270. It provides users with wireless broadband Internet access. Although FIG. 12 shows a WiFi module 1270, it can be understood that it is not an essential component of the mobile phone 1200 and can be omitted as required.
处理器1280是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1220内的软件程序和/或模块,以及调用存储在存储器1220内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。在一个实施例中,处理器1280可包括一个或多个处理单元。在一个实施例中,处理器1280可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1280中。The processor 1280 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and/or modules stored in the memory 1220, and calling data stored in the memory 1220, execution Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole. In one embodiment, processor 1280 may include one or more processing units. In one embodiment, the processor 1280 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, etc.; the modem processor mainly processes wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 1280 .
手机1200还包括给各个部件供电的电源1290(比如电池),优选的,电源可以通过电源管理系统与处理器1280逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone 1200 also includes a power supply 1290 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 1280 through the power management system, so that functions such as charging, discharging, and power consumption management can be realized through the power management system.
在一个实施例中,手机1200还可以包括摄像头、蓝牙模块等。In one embodiment, the mobile phone 1200 may also include a camera, a Bluetooth module, and the like.
在本发明实施例中,该移动终端所包括的处理器1280执行存储在存储器上的计算机程序时实现如上所述的CPU监测方法。In the embodiment of the present invention, the processor 1280 included in the mobile terminal implements the above CPU monitoring method when executing the computer program stored in the memory.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the programs can be stored in a non-volatile computer-readable storage medium. When the program is executed, it may include the procedures of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) and the like.
以上实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above examples only express several implementations of the present invention, and the description thereof is relatively specific and detailed, but should not be construed as limiting the patent scope of the present invention. It should be pointed out that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be based on the appended claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710648542.3ACN107368400B (en) | 2017-08-01 | 2017-08-01 | CPU monitoring method and device, computer readable storage medium and mobile terminal |
| PCT/CN2018/097535WO2019024804A1 (en) | 2017-08-01 | 2018-07-27 | Cpu monitoring method, computer readable storage medium, and mobile terminal |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710648542.3ACN107368400B (en) | 2017-08-01 | 2017-08-01 | CPU monitoring method and device, computer readable storage medium and mobile terminal |
| Publication Number | Publication Date |
|---|---|
| CN107368400Atrue CN107368400A (en) | 2017-11-21 |
| CN107368400B CN107368400B (en) | 2020-02-04 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710648542.3AActiveCN107368400B (en) | 2017-08-01 | 2017-08-01 | CPU monitoring method and device, computer readable storage medium and mobile terminal |
| Country | Link |
|---|---|
| CN (1) | CN107368400B (en) |
| WO (1) | WO2019024804A1 (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107967178A (en)* | 2017-12-06 | 2018-04-27 | 广东欧珀移动通信有限公司 | Resource allocation method and Related product |
| WO2019024804A1 (en)* | 2017-08-01 | 2019-02-07 | Oppo广东移动通信有限公司 | Cpu monitoring method, computer readable storage medium, and mobile terminal |
| CN109726003A (en)* | 2019-01-04 | 2019-05-07 | Oppo广东移动通信有限公司 | Application thawing processing method, electronic device and computer-readable storage medium |
| CN109800124A (en)* | 2018-12-15 | 2019-05-24 | 中国平安人寿保险股份有限公司 | CPU usage monitoring method, device, electronic equipment and storage medium |
| CN110750352A (en)* | 2018-07-23 | 2020-02-04 | 中兴通讯股份有限公司 | A CPU operation management method, device and storage medium |
| CN111414295A (en)* | 2020-03-09 | 2020-07-14 | 浙江大华技术股份有限公司 | CPU occupancy rate statistical method, device, equipment and medium |
| CN111930593A (en)* | 2020-07-27 | 2020-11-13 | 长沙景嘉微电子股份有限公司 | GPU occupancy rate determination method, device, processing system and storage medium |
| CN112218411A (en)* | 2020-11-03 | 2021-01-12 | 深圳茂硕电子科技有限公司 | LED power supply state monitoring method |
| CN113535516A (en)* | 2021-07-06 | 2021-10-22 | 上海上讯信息技术股份有限公司 | Method and device for monitoring abnormal occupancy rate of CPU |
| CN114003367A (en)* | 2022-01-04 | 2022-02-01 | 北京新唐思创教育科技有限公司 | Risk monitoring method, device, equipment and storage medium |
| CN114116405A (en)* | 2021-11-30 | 2022-03-01 | 上海商汤临港智能科技有限公司 | Application program process control method and device, computer equipment and storage medium |
| CN114416466A (en)* | 2021-12-13 | 2022-04-29 | 北京罗克维尔斯科技有限公司 | CPU usage monitoring method, device, device and storage medium |
| CN114490055A (en)* | 2022-01-21 | 2022-05-13 | 岚图汽车科技有限公司 | A mobile device and its CPU load control method and device |
| CN115794549A (en)* | 2022-11-22 | 2023-03-14 | 中孚安全技术有限公司 | Method, device and medium for managing and controlling resource occupied by application program |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100274530A1 (en)* | 2009-04-28 | 2010-10-28 | Chi Mei Communication Systems, Inc. | System and method for analyzing a usage rate of a central processing unit in a mobile device |
| CN102110043A (en)* | 2010-12-30 | 2011-06-29 | 上海顶竹通讯技术有限公司 | Method and device for computing CPU occupancy rate |
| CN105224439A (en)* | 2014-07-02 | 2016-01-06 | 北京金山安全软件有限公司 | Method and device for detecting CPU occupancy rate of terminal APP and terminal |
| CN105357026A (en)* | 2015-09-24 | 2016-02-24 | 华为技术有限公司 | Resource information collection method and computing node |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100730822B1 (en)* | 2005-06-09 | 2007-06-20 | 에스케이 텔레콤주식회사 | Calculation method of utilization of central processing unit |
| CN104239196B (en)* | 2014-09-17 | 2018-06-01 | 北京金山安全软件有限公司 | Method and device for detecting abnormal operation of application program and mobile terminal |
| CN105589546A (en)* | 2015-12-21 | 2016-05-18 | 北京金山安全软件有限公司 | Information detection method and device |
| CN107368400B (en)* | 2017-08-01 | 2020-02-04 | Oppo广东移动通信有限公司 | CPU monitoring method and device, computer readable storage medium and mobile terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100274530A1 (en)* | 2009-04-28 | 2010-10-28 | Chi Mei Communication Systems, Inc. | System and method for analyzing a usage rate of a central processing unit in a mobile device |
| CN102110043A (en)* | 2010-12-30 | 2011-06-29 | 上海顶竹通讯技术有限公司 | Method and device for computing CPU occupancy rate |
| CN105224439A (en)* | 2014-07-02 | 2016-01-06 | 北京金山安全软件有限公司 | Method and device for detecting CPU occupancy rate of terminal APP and terminal |
| CN105357026A (en)* | 2015-09-24 | 2016-02-24 | 华为技术有限公司 | Resource information collection method and computing node |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2019024804A1 (en)* | 2017-08-01 | 2019-02-07 | Oppo广东移动通信有限公司 | Cpu monitoring method, computer readable storage medium, and mobile terminal |
| CN107967178A (en)* | 2017-12-06 | 2018-04-27 | 广东欧珀移动通信有限公司 | Resource allocation method and Related product |
| CN110750352B (en)* | 2018-07-23 | 2024-10-25 | 南京中兴新软件有限责任公司 | A CPU operation management method, device and storage medium |
| CN110750352A (en)* | 2018-07-23 | 2020-02-04 | 中兴通讯股份有限公司 | A CPU operation management method, device and storage medium |
| CN109800124B (en)* | 2018-12-15 | 2023-04-11 | 中国平安人寿保险股份有限公司 | CPU utilization monitoring method and device, electronic equipment and storage medium |
| CN109800124A (en)* | 2018-12-15 | 2019-05-24 | 中国平安人寿保险股份有限公司 | CPU usage monitoring method, device, electronic equipment and storage medium |
| CN109726003A (en)* | 2019-01-04 | 2019-05-07 | Oppo广东移动通信有限公司 | Application thawing processing method, electronic device and computer-readable storage medium |
| CN109726003B (en)* | 2019-01-04 | 2020-09-15 | Oppo广东移动通信有限公司 | Application thawing processing method, electronic device and computer-readable storage medium |
| CN111414295A (en)* | 2020-03-09 | 2020-07-14 | 浙江大华技术股份有限公司 | CPU occupancy rate statistical method, device, equipment and medium |
| CN111414295B (en)* | 2020-03-09 | 2023-06-30 | 浙江大华技术股份有限公司 | Statistical method, device, equipment and medium for CPU occupancy rate |
| CN111930593B (en)* | 2020-07-27 | 2023-03-28 | 长沙景嘉微电子股份有限公司 | GPU occupancy rate determination method, device, processing system and storage medium |
| CN111930593A (en)* | 2020-07-27 | 2020-11-13 | 长沙景嘉微电子股份有限公司 | GPU occupancy rate determination method, device, processing system and storage medium |
| CN112218411A (en)* | 2020-11-03 | 2021-01-12 | 深圳茂硕电子科技有限公司 | LED power supply state monitoring method |
| CN113535516A (en)* | 2021-07-06 | 2021-10-22 | 上海上讯信息技术股份有限公司 | Method and device for monitoring abnormal occupancy rate of CPU |
| CN114116405A (en)* | 2021-11-30 | 2022-03-01 | 上海商汤临港智能科技有限公司 | Application program process control method and device, computer equipment and storage medium |
| CN114416466A (en)* | 2021-12-13 | 2022-04-29 | 北京罗克维尔斯科技有限公司 | CPU usage monitoring method, device, device and storage medium |
| CN114003367A (en)* | 2022-01-04 | 2022-02-01 | 北京新唐思创教育科技有限公司 | Risk monitoring method, device, equipment and storage medium |
| CN114003367B (en)* | 2022-01-04 | 2022-03-15 | 北京新唐思创教育科技有限公司 | Risk monitoring method, device, equipment and storage medium |
| CN114490055A (en)* | 2022-01-21 | 2022-05-13 | 岚图汽车科技有限公司 | A mobile device and its CPU load control method and device |
| CN115794549A (en)* | 2022-11-22 | 2023-03-14 | 中孚安全技术有限公司 | Method, device and medium for managing and controlling resource occupied by application program |
| Publication number | Publication date |
|---|---|
| WO2019024804A1 (en) | 2019-02-07 |
| CN107368400B (en) | 2020-02-04 |
| Publication | Publication Date | Title |
|---|---|---|
| CN107368400B (en) | CPU monitoring method and device, computer readable storage medium and mobile terminal | |
| CN107391259B (en) | Resource processing method and apparatus, computer-readable storage medium, and mobile terminal | |
| CN107800651B (en) | Application closing method, device, storage medium and electronic device | |
| CN107734616B (en) | Application program closing method and device, storage medium and electronic equipment | |
| EP3514684A1 (en) | Memory recovery method and apparatus | |
| CN107577508B (en) | Application processing method, device, readable storage medium and mobile terminal | |
| CN107526638B (en) | Application processing method, device, mobile terminal and storage medium | |
| CN107562539B (en) | Application processing method and apparatus, computer equipment, storage medium | |
| CN107526637B (en) | Application processing method and device, mobile terminal and storage medium | |
| CN107526640A (en) | Resource management method, device, mobile terminal, and computer-readable storage medium | |
| CN107544842A (en) | Application program processing method and device, computer equipment, storage medium | |
| CN109992438A (en) | Information processing method, apparatus, computer device, and computer-readable storage medium | |
| JP2020537213A (en) | Methods for reducing terminal power consumption, and terminals | |
| WO2019128540A1 (en) | Resource management method, mobile terminal and computer readable storage medium | |
| CN110008008A (en) | Applied program processing method and device, electronic equipment, computer readable storage medium | |
| JP7272694B2 (en) | Method and terminal for reducing power consumption of terminal | |
| CN108681498A (en) | Method, device and mobile terminal for monitoring CPU usage | |
| CN108334345B (en) | Application processing method, device, readable storage medium and mobile terminal | |
| CN109992376B (en) | Application freezing method, device, terminal and computer-readable storage medium | |
| WO2017206901A1 (en) | Process control method and related device | |
| CN107734618B (en) | Application program closing method and device, storage medium and electronic equipment | |
| CN107832131B (en) | Application closing method, device, storage medium and electronic device | |
| CN107220344B (en) | Document processing methods and related products | |
| CN109992369A (en) | Application processing method and apparatus, electronic device, and computer-readable storage medium | |
| CN107423123A (en) | Task scheduling method and device, storage medium and electronic equipment |
| 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 | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information | Address after:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after:OPPO Guangdong Mobile Communications Co., Ltd. Address before:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before:Guangdong Opel Mobile Communications Co., Ltd. | |
| GR01 | Patent grant | ||
| GR01 | Patent grant |