[go: up one dir, main page]

CN104503840A - Method and device for optimizing terminal resources - Google Patents

Method and device for optimizing terminal resources Download PDF

Info

Publication number
CN104503840A
CN104503840A CN201410778228.3A CN201410778228A CN104503840A CN 104503840 A CN104503840 A CN 104503840A CN 201410778228 A CN201410778228 A CN 201410778228A CN 104503840 A CN104503840 A CN 104503840A
Authority
CN
China
Prior art keywords
optimization
level
information
identifier
strategy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410778228.3A
Other languages
Chinese (zh)
Other versions
CN104503840B (en
Inventor
杨继鑫
李良
潘全新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201410778228.3A priority Critical patent/CN104503840B/en
Publication of CN104503840A publication Critical patent/CN104503840A/en
Application granted granted Critical
Publication of CN104503840B publication Critical patent/CN104503840B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种对终端资源进行优化的方法及装置,其中,所述装置包括:进程分析单元,用于获取终端中运行的一进程的标识及该进程当前所占系统资源的信息;优化策略获取单元,用于根据该进程的标识,获取与该标识对应的进程优化策略;优化处理单元,用于将该进程当前所占系统资源的信息与所述进程优化策略进行比较,获得针对该进程的优化标记,根据所述优化标记对该进程进行相应等级的优化操作。上述方法可以对于终端中每个进程进行个性化的优化操作,提升用户体验。

The present invention discloses a method and device for optimizing terminal resources, wherein the device includes: a process analysis unit, used to obtain the identifier of a process running in the terminal and the information of the system resources currently occupied by the process; The strategy acquisition unit is used to obtain the process optimization strategy corresponding to the identifier according to the identifier of the process; the optimization processing unit is used to compare the information of the system resources currently occupied by the process with the process optimization strategy, and obtain the optimization strategy for the process. The optimization flag of the process, and the corresponding level of optimization operation is performed on the process according to the optimization flag. The foregoing method can perform personalized optimization operations on each process in the terminal to improve user experience.

Description

对终端资源进行优化的方法及装置Method and device for optimizing terminal resources

技术领域technical field

本发明涉及互联网技术,具体涉及一种对终端资源进行优化的方法及装置。The present invention relates to Internet technology, in particular to a method and device for optimizing terminal resources.

背景技术Background technique

在终端的操作系统中,可能有多个程序在同时运行,相应的也会出现占用系统资源的多个进程。例如,在Android系统中的进程包括前台进程、服务进程、后台进程和空进程等等。其中,每一进程所占用的系统资源又包括内存容量、中央处理器(Central Processing Unit,简称CPU)使用率、磁盘输入/输出(I/O)信息等等。通常情况下,系统会自动结束较为不重要的部分进程以获得所需的系统资源,但存在有部分恶意程序或者设计不合理的程序会使进程在程序运行过程中不断扩张所占用的系统资源,或者使进程在某些特定的情况下出现程度不大的系统资源异常占用。In the operating system of the terminal, there may be multiple programs running at the same time, and correspondingly, there will be multiple processes occupying system resources. For example, processes in the Android system include foreground processes, service processes, background processes, empty processes, and the like. Among them, the system resources occupied by each process include memory capacity, central processing unit (Central Processing Unit, referred to as CPU) usage rate, disk input/output (I/O) information, and the like. Under normal circumstances, the system will automatically end some of the less important processes to obtain the required system resources, but there are some malicious programs or unreasonably designed programs that will cause the process to continuously expand the system resources occupied by the program during the running of the program. Or cause the process to have a small degree of abnormal occupation of system resources in some specific cases.

然而,这些不受用户欢迎的进程在大部分时间内所占用的系统资源总量并不会很大,系统并不会自动将其结束,基于系统资源占用排序的清理程序也不会将其列入待清理列表当中,因此常用的进程清理手段很难对该类进程进行有效地检出和清理。However, the total amount of system resources occupied by these unpopular processes in most of the time is not very large, the system will not automatically end them, and the cleaning program based on system resource occupation sorting will not list them. Therefore, it is difficult to effectively check out and clean up this type of process by common process cleaning methods.

发明内容Contents of the invention

针对现有技术中的缺陷,本发明提供了一种对终端资源进行优化的方法及装置,能够对终端中每个进程进行个性化的优化操作,提升用户体验。Aiming at the defects in the prior art, the present invention provides a method and device for optimizing terminal resources, which can perform personalized optimization operations on each process in the terminal and improve user experience.

第一方面,本发明提供对终端资源进行优化的装置,包括:In the first aspect, the present invention provides a device for optimizing terminal resources, including:

进程分析单元,用于获取终端中运行的一进程的标识及该进程当前所占系统资源的信息;A process analysis unit, configured to obtain an identifier of a process running in the terminal and information about system resources currently occupied by the process;

优化策略获取单元,用于根据该进程的标识,获取与该标识对应的进程优化策略;An optimization strategy acquiring unit, configured to acquire a process optimization strategy corresponding to the identifier according to the identifier of the process;

优化处理单元,用于将该进程当前所占系统资源的信息与所述进程优化策略进行比较,获得针对该进程的优化标记,根据所述优化标记对该进程进行相应等级的优化操作。The optimization processing unit is configured to compare the information of the system resources currently occupied by the process with the process optimization strategy, obtain an optimization mark for the process, and perform a corresponding level of optimization operation on the process according to the optimization mark.

可选地,每一进程当前占用系统资源的信息根据如下一项或多项信息计算得到:Optionally, the information about the system resources currently occupied by each process is calculated based on one or more of the following information:

该进程的内存使用率,中央处理器CPU占用率,磁盘输入输出IO吞吐量、网络吞吐量。The memory usage rate of the process, the CPU usage rate of the central processing unit, the disk input and output IO throughput, and the network throughput.

可选地,所述进程优化策略为预先从服务器中下载的对应终端的系统环境信息中进程的优化策略,且所述进程优化策略中划分有一个以上的与所述优化标记对应的优化操作信息。Optionally, the process optimization strategy is the optimization strategy of the process in the system environment information of the corresponding terminal downloaded from the server in advance, and the process optimization strategy is divided into more than one optimization operation information corresponding to the optimization flag .

可选地,优化策略获取单元,具体用于Optionally, optimize the policy acquisition unit, specifically for

将所述进程的标识发送服务器,以使服务器根据所述标识获取与该标识对应的进程优化策略;Sending the identifier of the process to the server, so that the server obtains a process optimization strategy corresponding to the identifier according to the identifier;

接收服务器发送的与该进程的标识对应的进程优化策略。The process optimization policy corresponding to the identifier of the process sent by the server is received.

可选地,所述优化处理单元,具体用于Optionally, the optimization processing unit is specifically used for

在所述优化标记对应的等级为最高等级时,直接结束该进程;When the level corresponding to the optimization mark is the highest level, directly end the process;

在所述优化标记对应的等级为中间等级时,释放该进程占用的闲置内存和/或清理该进程中的缓存数据或临时数据;When the level corresponding to the optimization mark is an intermediate level, release the idle memory occupied by the process and/or clean up cached data or temporary data in the process;

在所述优化标记对应的等级为最低等级时,跳过对该进程的优化操作。When the level corresponding to the optimization flag is the lowest level, the optimization operation for the process is skipped.

第二方面,本发明提供一种对终端资源进行优化的方法,包括:In a second aspect, the present invention provides a method for optimizing terminal resources, including:

获取终端中运行的一进程的标识及该进程当前所占系统资源的信息;Obtain the identification of a process running in the terminal and information about the system resources currently occupied by the process;

根据该进程的标识,获取与该标识对应的进程优化策略;Obtaining a process optimization strategy corresponding to the identifier according to the identifier of the process;

将该进程当前所占系统资源的信息与所述进程优化策略进行比较,获得针对该进程的优化标记,根据所述优化标记对该进程进行相应等级的优化操作。Comparing the information of the system resources currently occupied by the process with the process optimization strategy to obtain an optimization mark for the process, and performing a corresponding level of optimization operation on the process according to the optimization mark.

可选地,每一进程当前占用系统资源的信息根据如下一项或多项信息计算得到:Optionally, the information about the system resources currently occupied by each process is calculated based on one or more of the following information:

该进程的内存使用率,中央处理器CPU占用率,磁盘输入输出IO吞吐量、网络吞吐量。The memory usage rate of the process, the CPU usage rate of the central processing unit, the disk input and output IO throughput, and the network throughput.

可选地,所述进程优化策略为预先从服务器中下载的对应终端的系统环境信息中进程的优化策略,且所述进程优化策略中划分有一个以上的与所述优化标记对应的的优化操作信息。Optionally, the process optimization strategy is the optimization strategy of the process in the system environment information of the corresponding terminal downloaded from the server in advance, and the process optimization strategy is divided into more than one optimization operation corresponding to the optimization flag information.

可选地,所述根据该进程的标识,获取与该标识对应的进程优化策略,包括:Optionally, the obtaining a process optimization strategy corresponding to the identifier according to the identifier of the process includes:

将所述进程的标识发送服务器,以使服务器根据所述标识获取与该标识对应的进程优化策略;Sending the identifier of the process to the server, so that the server obtains a process optimization strategy corresponding to the identifier according to the identifier;

接收服务器发送的与该进程的标识对应的进程优化策略。The process optimization policy corresponding to the identifier of the process sent by the server is received.

可选地,根据所述优化标记对该进程进行相应等级的优化操作,包括:Optionally, performing a corresponding level of optimization operation on the process according to the optimization flag, including:

在所述优化标记对应的等级为最高等级时,直接结束该进程;When the level corresponding to the optimization mark is the highest level, directly end the process;

在所述优化标记对应的等级为中间等级时,释放该进程占用的闲置内存和/或清理该进程中的缓存数据或临时数据;When the level corresponding to the optimization mark is an intermediate level, release the idle memory occupied by the process and/or clean up cached data or temporary data in the process;

在所述优化标记对应的等级为最低等级时,跳过对该进程的优化操作。When the level corresponding to the optimization flag is the lowest level, the optimization operation for the process is skipped.

由上述技术方案可知,本发明提供的对终端资源进行优化的方法及装置,可以通过对应于单个进程的进程优化策略分别以不同的标准监测各个进程占用系统资源的情况,从而可以监测出占用总量扩张或者异常占用系统资源的进程,因而相比于现有技术可以更有效地监控单个进程的系统资源占用情况,进而能够对终端中每个进程进行个性化的优化操作,提升用户体验。It can be seen from the above technical solution that the method and device for optimizing terminal resources provided by the present invention can monitor the situation of each process occupying system resources with different standards through the process optimization strategy corresponding to a single process, so that the total occupied resources can be monitored. Compared with the existing technology, it can monitor the system resource occupation of a single process more effectively, and then can perform personalized optimization operations on each process in the terminal to improve user experience.

附图说明Description of drawings

图1为本发明一实施例提供的对终端资源进行优化的方法的流程示意图;FIG. 1 is a schematic flowchart of a method for optimizing terminal resources provided by an embodiment of the present invention;

图2为本发明一实施例提供的进程列表的示意图;FIG. 2 is a schematic diagram of a process list provided by an embodiment of the present invention;

图3A至图3C为本发明一实施例提供的提示信息的示意图;3A to 3C are schematic diagrams of prompt information provided by an embodiment of the present invention;

图4为本发明另一实施例提供的对终端资源进行优化的方法的流程示意图;FIG. 4 is a schematic flowchart of a method for optimizing terminal resources provided by another embodiment of the present invention;

图5为本发明一实施例提供的对终端资源进行优化的装置的结构示意图。FIG. 5 is a schematic structural diagram of an apparatus for optimizing terminal resources provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图,对发明的具体实施方式作进一步描述。以下实施例仅用于更加清楚地说明本发明的技术方案,而不能以此来限制本发明的保护范围。The specific embodiments of the invention will be further described below in conjunction with the accompanying drawings. The following examples are only used to illustrate the technical solution of the present invention more clearly, but not to limit the protection scope of the present invention.

图1示出了本发明一实施例提供的对终端资源进行优化的方法的流程示意图,如图1所示,本实施例的方法如下所述。FIG. 1 shows a schematic flowchart of a method for optimizing terminal resources provided by an embodiment of the present invention. As shown in FIG. 1 , the method of this embodiment is described as follows.

步骤101、获取终端中运行的一进程的标识及该进程当前所占系统资源的信息。Step 101. Obtain an identifier of a process running in a terminal and information about system resources currently occupied by the process.

可理解的是,进程是指终端中正在运行的程序。如图2所示的进程列表的示意图。在实际应用中,可以通过使用应用程序接口ActivityManager获取终端的所有进程列表(即包括活跃进程和非活跃进程的列表),以及获取该进程列表中每一进程当前所占系统资源的信息以及该进程的标识。Understandably, a process refers to a program running in a terminal. A schematic diagram of a process list as shown in FIG. 2 . In practical applications, you can use the application program interface ActivityManager to obtain all process lists of the terminal (that is, a list including active processes and inactive processes), and to obtain information about the system resources currently occupied by each process in the process list and the process logo.

例如,在图2中,进程标识可为图2左侧的映像名称,还可为其他标识该进程的名称,本实施例不对其进行限定。或者进程的标识可为选取的用于区分不同进程的标示符等等。图2右侧不同列分别对应每一进程当前所占系统资源的信息。For example, in FIG. 2 , the process identifier may be the image name on the left side of FIG. 2 , or other names that identify the process, which are not limited in this embodiment. Or the identifier of the process may be a selected identifier used to distinguish different processes, and the like. The different columns on the right side of Fig. 2 respectively correspond to the information of the system resources currently occupied by each process.

举例来说,图2中所示的进程当前所占系统资源的类型可为:该进程的内存使用率、CPU占用率/使用率、磁盘I/O信息(磁盘IO吞吐量)、网络吞吐量等类型。For example, the types of system resources currently occupied by the process shown in Figure 2 can be: the memory usage rate of the process, CPU occupancy rate/usage rate, disk I/O information (disk IO throughput), network throughput and other types.

在具体应用中,如果进程当前占用系统资源的信息为多项(如上多种类型图2所示的多种类型),则可根据多项信息加权处理得到该进程当前占用系统资源的信息。例如,每一进程当前占用系统资源的信息根据如下一项或多项信息计算得到:该进程的内存使用率,CPU占用率,磁盘IO信息、网络吞吐量等等。In a specific application, if there are multiple items of information on the system resources currently occupied by the process (multiple types as shown in FIG. 2 ), the information on the system resources currently occupied by the process can be obtained through weighted processing of the multiple items of information. For example, information about system resources currently occupied by each process is calculated based on one or more of the following information: memory usage, CPU usage, disk IO information, network throughput, etc. of the process.

当然,也可以将进程当前占用系统资源的信息单独列出。Of course, the information about the system resources currently occupied by the process can also be listed separately.

步骤102、根据该进程的标识,获取与该标识对应的进程优化策略。Step 102, according to the identifier of the process, obtain the process optimization strategy corresponding to the identifier.

举例来说,所述进程优化策略为预先从服务器中下载的对应终端的系统环境信息中每一进程的优化策略,且所述进程优化策略中划分有一个以上的与所述优化标记对应的优化等级,以及该优化等级的优化操作信息;For example, the process optimization strategy is the optimization strategy of each process in the system environment information of the corresponding terminal downloaded from the server in advance, and the process optimization strategy is divided into more than one optimization flag corresponding to the optimization level, and optimization operation information for that optimization level;

每一优化等级为所述服务器根据设备上报的进程信息统计的优化等级。本实施例终端的系统环境信息可包括该终端的硬件环境和软件环境,如硬件内存和虚拟内存等信息。通常,服务器可实时获取任一终端的系统环境信息。Each optimization level is an optimization level calculated by the server according to process information reported by the device. The system environment information of the terminal in this embodiment may include the hardware environment and software environment of the terminal, such as information such as hardware memory and virtual memory. Usually, the server can obtain the system environment information of any terminal in real time.

也就是说,在终端中,可预先向服务器下载终端中每一进程的进程优化策略,以便终端可根据该进程优化策略对终端内的每一进程进行个性化优化。应说明的是,该终端中不同的系统环境信息可匹配有不同的进程优化策略。That is to say, in the terminal, the process optimization policy of each process in the terminal can be downloaded to the server in advance, so that the terminal can perform personalized optimization for each process in the terminal according to the process optimization policy. It should be noted that different system environment information in the terminal can be matched with different process optimization strategies.

在实际应用中,上述服务器可为云服务器,该云服务器可根据用户反馈信息或者监控信息获取每一进程的进程优化策略。In practical applications, the above-mentioned server may be a cloud server, and the cloud server may acquire a process optimization strategy for each process according to user feedback information or monitoring information.

当然,云服务器可定期更新内部的进程优化策略,进而终端可定期向云服务器下载更新后的与该终端操作系统环境相匹配的进程优化策略。Of course, the cloud server can regularly update the internal process optimization strategy, and then the terminal can periodically download the updated process optimization strategy that matches the operating system environment of the terminal to the cloud server.

步骤103、将该进程当前所占系统资源的信息与所述进程优化策略进行比较,获得针对该进程的优化标记,根据所述优化标记对该进程进行相应等级的优化操作。Step 103: Compare the information of the system resources currently occupied by the process with the process optimization strategy to obtain an optimization mark for the process, and perform a corresponding level of optimization operation on the process according to the optimization mark.

本实施例的对终端资源进行优化的方法,可以通过对应于单个进程的进程优化策略分别以不同的标准监测各个进程占用系统资源的情况,从而可以监测出占用总量扩张或者异常占用系统资源的进程,因而相比于现有技术可以更有效地监控单个进程的系统资源占用情况,进而能够对终端中每个进程进行个性化的优化操作,提升用户体验。In the method for optimizing terminal resources in this embodiment, it is possible to monitor the occupancy of system resources by each process with different standards through the process optimization strategy corresponding to a single process, so that the expansion of the total occupancy or the abnormal occupancy of system resources can be monitored. Therefore, compared with the prior art, the system resource occupation of a single process can be more effectively monitored, and then personalized optimization operations can be performed on each process in the terminal to improve user experience.

另一种具体的例子中,还可根据选中的进程当前所占用系统资源的信息,确定该进程所属的进程优化策略中的优化等级,在终端的界面发送优化等级的提示信息(如图3A和图3C所示);以便提示用户需要对当前的进程进行优化,否则,终端可能运行速度缓慢或死机。In another specific example, the optimization level in the process optimization strategy to which the process belongs can also be determined according to the information of the system resources currently occupied by the selected process, and a prompt message of the optimization level can be sent on the interface of the terminal (as shown in Figure 3A and 3C); in order to prompt the user that the current process needs to be optimized, otherwise, the terminal may run slowly or crash.

当然,如果进程当前所占用系统资源的信息很合适,不需要优化,可忽略该进程,进行其他进程的判断,如图3B所示,图3B示出的是终端中用户选中的进程的当前所占用系统资源的信息,此时可不对该进程进行优化。Certainly, if the information of the system resources currently occupied by the process is very suitable, no optimization is required, the process can be ignored, and other processes can be judged, as shown in Figure 3B, which shows the current information of the process selected by the user in the terminal. Information that occupies system resources, the process may not be optimized at this time.

在图3A中可为提示终端中用户选中的进程的当前所占用系统资源的信息。图3C中可为提示终端中用户选中的进程的当前所占系统资源的信息,且还提供用户可选择是否优化的操作接口。In FIG. 3A , it may be information that prompts the currently occupied system resources of the process selected by the user in the terminal. FIG. 3C may prompt the information of the currently occupied system resources of the process selected by the user in the terminal, and also provide an operation interface for the user to choose whether to optimize.

通常,可根据该进程当前所占用系统资源的信息,确定该进程所属的进程优化策略中的优化等级,在终端的界面发送优化等级的提示信息,在用户触发优化指令(如图3C中的一键加速)之后,采用优化等级对应的优化操作对该进程进行优化;也就是说,是否优化可根据用户决定,满足用户的个性化操作。Usually, the optimization level in the process optimization strategy to which the process belongs can be determined according to the information of the system resources currently occupied by the process, a prompt message of the optimization level is sent on the interface of the terminal, and an optimization command is triggered by the user (as shown in Figure 3C). key acceleration), the optimization operation corresponding to the optimization level is used to optimize the process; that is to say, whether to optimize can be determined by the user to meet the user's personalized operation.

上述优化操作可为结束该进程,或者,该优化操作还可为释放该进程占用的闲置的内容,例如,调用系统内存清理函数SetProcessWorkingSetSize清理该进程占用的内存等等,本实施例仅为举例说明,不限定该处优化操作的具体实现方式,可根据实际需要设置。例如,可采用调用killProcess函数关闭该进程。The above-mentioned optimization operation can be to end the process, or the optimization operation can also be to release the idle content occupied by the process, for example, call the system memory cleaning function SetProcessWorkingSetSize to clean up the memory occupied by the process, etc. This embodiment is only for illustration , does not limit the specific implementation of the optimization operation here, and can be set according to actual needs. For example, the process can be closed by calling the killProcess function.

在具体实现过程中,避免初级用户不太清楚如何选择时,还有一种可能的实现方式可为:根据该进程当前所占系统资源的信息,确定该进程所属的进程优化策略中的优化等级,采用优化等级对应的优化操作对该进程进行优化。In the specific implementation process, to prevent novice users from knowing how to choose, there is another possible implementation method: according to the information of the system resources currently occupied by the process, determine the optimization level in the process optimization strategy to which the process belongs, The process is optimized by using the optimization operation corresponding to the optimization level.

举例来说,优化可包括:网页标签进程或线程的关闭,浏览器插件进程的关闭、系统中当前运行进程和/或服务的关闭、内存释放、清理系统垃圾等。For example, optimization may include: closing of webpage tab processes or threads, closing of browser plug-in processes, closing of currently running processes and/or services in the system, releasing memory, cleaning up system garbage, and the like.

可选地,还在对该进程优化之后,在终端的界面发送展示对该进程进行优化的信息。Optionally, after the process is optimized, information showing that the process is optimized is sent on the interface of the terminal.

另外,需要说明的是,终端中一个进程不同类型的系统资源可能有不同的获取方式。前述步骤101中获取终端中每一进程当前所占系统资源的信息可根据实际需要选用。In addition, it should be noted that different types of system resources of a process in a terminal may have different acquisition methods. The acquisition of the information of the system resources currently occupied by each process in the terminal in step 101 may be selected according to actual needs.

例如,在Linux/Unix下,CPU的使用时间分为用户态,系统态和空闲态,分别表示CPU处于用户态执行的时间,系统内核执行的时间,和空闲系统进程执行的时间,而上述CPU使用率是指:CPU执行非系统空闲进程的时间除以CPU总的执行时间。因此基于这一原理可以通过间接计算的方式得到某一进程当前的CPU的使用率。类似地,磁盘I/O信息可以通过统计一段时间内某进程的读/写数据的次数(如每秒I/O数)来获取,内存占用率可以直接通过系统给定的函数或变量获取。For example, under Linux/Unix, the usage time of the CPU is divided into user state, system state and idle state, which respectively represent the execution time of the CPU in the user state, the execution time of the system kernel, and the execution time of the idle system process, and the above CPU The utilization rate refers to: the CPU execution time of non-system idle processes divided by the total execution time of the CPU. Therefore, based on this principle, the current CPU utilization rate of a certain process can be obtained through indirect calculation. Similarly, disk I/O information can be obtained by counting the number of read/write data of a certain process within a certain period of time (such as the number of I/O per second), and the memory usage can be obtained directly through a given function or variable of the system.

本实施例不限定每一进程当前所占系统资源的信息的获取方式,主要是根据每一进程当前所占系统资源的信息确定当前进程的运行是否合理,如果不合理可对其进行优化处理,如果合理,可不处理,充分保证用户自己的选择,由此,可实现对终端中每一进程的个性化操作,提高用户使用体验。This embodiment does not limit the acquisition method of the information of the system resources currently occupied by each process. It mainly determines whether the operation of the current process is reasonable according to the information of the system resources currently occupied by each process. If it is unreasonable, it can be optimized. If it is reasonable, it may not be processed, and the user's own choice is fully guaranteed, thereby realizing personalized operations on each process in the terminal and improving user experience.

图4示出了本发明一实施例提供的对终端资源进行优化的方法的流程示意图,如图4所示,本实施例的方法如下所述。FIG. 4 shows a schematic flowchart of a method for optimizing terminal resources provided by an embodiment of the present invention. As shown in FIG. 4 , the method of this embodiment is described as follows.

步骤401、遍历进程列表,获取终端中每一进程的标识及该进程当前所占系统资源的信息。Step 401, traversing the process list to obtain the identifier of each process in the terminal and information about the system resources currently occupied by the process.

当前终端中,每一进程运行在终端的操作系统中,并占用操作系统的一部分系统资源(如内存使用率、CPU占用率和磁盘I/O信息等等)。获取进程当前所占系统资源的信息可以是通过读取系统记录文件获取、通过一个或多个给定函数或变量获取(包括直接获取或通过计算间接获取)、或者自行设计相应的统计函数来外部统计获取等等,本实施例对此不作限制。In the current terminal, each process runs in the operating system of the terminal and occupies a part of system resources of the operating system (such as memory usage, CPU usage, disk I/O information, etc.). Obtaining the information of the system resources currently occupied by the process can be obtained by reading the system record file, by one or more given functions or variables (including direct acquisition or indirect acquisition through calculation), or by designing corresponding statistical functions to obtain external The acquisition of statistics and the like are not limited in this embodiment.

步骤402、将所述进程的标识发送云服务器,以使云服务器根据所述标识获取与该标识对应的进程优化策略。Step 402: Send the identification of the process to the cloud server, so that the cloud server obtains the process optimization policy corresponding to the identification according to the identification.

本实施例中,云服务器中的进程优化策略中划分有一个以上的与所述优化标记对应的优化等级;In this embodiment, the process optimization strategy in the cloud server is divided into more than one optimization level corresponding to the optimization mark;

每一优化等级为所述云服务器根据终端中的进程信息统计的优化等级。应说明的是,云端服务器的进程优化策略可为与系统环境信息相匹配的进程优化策略,进而可在与终端的系统环境信息相匹配的进程优化策略中获取与标识对应的进程优化策略。Each optimization level is an optimization level calculated by the cloud server according to process information in the terminal. It should be noted that the process optimization strategy of the cloud server may be the process optimization strategy matching the system environment information, and then the process optimization strategy corresponding to the identification may be obtained from the process optimization strategy matching the terminal system environment information.

步骤403、接收云服务器发送的与该进程的标识对应的进程优化策略。Step 403, receiving the process optimization policy corresponding to the process identifier sent by the cloud server.

步骤404、将该进程当前所占系统资源的信息与所述进程优化策略进行比较,获得针对该进程的优化标记,所述优化标记用于标记该进程将要进行的优化操作所属的等级。Step 404 : Compare the information of the system resources currently occupied by the process with the process optimization policy to obtain an optimization mark for the process, and the optimization mark is used to mark the level of the optimization operation to be performed by the process.

本实施例中,优化等级可分为三个等级,例如,低档、中档、高档;该低档的优化标记可为绿色标记、中档的优化标记可为红色标记、高档的优化标记可为橙色标记;In this embodiment, the optimization level can be divided into three levels, for example, low level, middle level, and high level; the optimization mark of the low level can be a green mark, the optimization mark of the middle level can be a red mark, and the optimization mark of a high level can be an orange mark;

进而,在将该进程当前所占系统资源的信息与进程优化策略进行比较之后,确定该进程的优化标记对应的等级,进而确定是否需要对该进程进行优化处理。Furthermore, after comparing the information of the system resources currently occupied by the process with the process optimization policy, the level corresponding to the optimization flag of the process is determined, and then it is determined whether the process needs to be optimized.

通常,如果进程为橙色标记,则可直接结束该进程;如果进程为红色标记,可释放该进程所占用的系统内存,并清理该进程的垃圾文件等,如果该进程为绿色标记,可不对该进程进行处理。或者,在所述优化等级为最高等级时,直接结束该进程;在所述优化等级为中间等级时,释放该进程占用的闲置内存和/或清理该进程中的垃圾文件。Usually, if the process is marked in orange, you can end the process directly; if the process is marked in red, you can release the system memory occupied by the process and clean up the junk files of the process, etc. If the process is marked in green, you can ignore it process is processed. Or, when the optimization level is the highest level, directly end the process; when the optimization level is an intermediate level, release the idle memory occupied by the process and/or clean up the junk files in the process.

例如,确定该进程所属的进程优化策略中的优化等级之后,可在终端的界面发送优化等级的提示信息,在用户触发优化指令之后,采用优化等级对应的优化操作对该进程进行优化;For example, after determining the optimization level in the process optimization strategy to which the process belongs, a prompt message of the optimization level can be sent on the interface of the terminal, and after the user triggers the optimization command, the process is optimized by using the optimization operation corresponding to the optimization level;

或者,根据该进程当前所占系统资源的信息,确定该进程所属的进程优化策略中的优化等级,采用优化等级对应的优化操作对该进程进行优化等等。本实施例仅为举例说明如何对进程进行优化,具体优化可不限定该举例的这几种方式。Or, according to the information of the system resources currently occupied by the process, the optimization level in the process optimization strategy to which the process belongs is determined, and the optimization operation corresponding to the optimization level is used to optimize the process and so on. This embodiment is only an example to illustrate how to optimize the process, and the specific optimization may not limit the examples.

在实际应用中,可对一个一个的进程进行优化处理,也可对所有的进行设置优化标记,最后一并优化处理,此时,同一优化标记的进程会由同样的优化操作进行处理。In practical application, one process can be optimized one by one, and optimization flags can be set for all of them, and finally they are optimized together. At this time, processes with the same optimization flag will be processed by the same optimization operation.

上述过程中,考虑到同一进程在不同终端上的名称通常是一致的,且进程具有固定的运行规律,因而进程在正常工作的情况下所占用的各项系统资源也是恒定在一定的范围内的。因此,可以通过与进程对应的进程优化策略界定该进程的正常工作范围,使得优化操作可以更准确地结束异常占用系统资源的进程,同时不影响正常工作的进程。即,本实施例可以通过对应于单个进程的进程优化策略分别以不同的标准监测各个进程占用系统资源的情况,从而可以监测出占用总量扩张或者异常占用系统资源的进程,因而相比于现有技术可以更有效地监控单个进程的系统资源占用情况,进而能够对终端中每个进程进行个性化的优化操作,提升用户体验。In the above process, considering that the names of the same process on different terminals are usually the same, and the process has a fixed operation rule, the various system resources occupied by the process under normal working conditions are also constant within a certain range . Therefore, the normal working range of the process can be defined by the process optimization strategy corresponding to the process, so that the optimization operation can more accurately end the process that abnormally occupies system resources, and at the same time does not affect the normal working process. That is to say, this embodiment can monitor the occupation of system resources by each process with different standards through the process optimization strategy corresponding to a single process, so as to detect processes that occupy total resources or abnormally occupy system resources. There are technologies that can more effectively monitor the system resource usage of a single process, and then perform personalized optimization operations on each process in the terminal to improve user experience.

在其它实施例中,每一进程对应的系统资源为多项/多种类型时,该进程当前所占系统资源的信息可为多项系统资源的信息,此时,进程优化策略还可对应于每一项系统资源(如内存、磁盘IO、CPU等)的占用信息分别设有由一个或多个阈值划分的多个优化等级,比如由第一阈值与第二阈值划分的低、中、高三个优化等级,代表进程所占用该项系统资源的不同状态。In other embodiments, when the system resources corresponding to each process are multiple/multiple types, the information of the system resources currently occupied by the process may be the information of multiple system resources. At this time, the process optimization strategy may also correspond to The occupancy information of each system resource (such as memory, disk IO, CPU, etc.) has multiple optimization levels divided by one or more thresholds, such as low, medium, and high levels divided by the first threshold and the second threshold. An optimization level, representing the different states of the system resource occupied by the process.

其中,云服务器中所存储的对应于每一项系统资源的一个或多个阈值(在此称为一个阈值组)可以由多个用户所共用(具体存储格式可以为“进程名称—系统资源类型—阈值组”),不仅节省了本地存储空间,还使得各阈值的动态调整成为了可能。比如,若由于阈值过低而产生了意外结束正常进程的情况,可以将其列入上述用户使用统计信息中并作为下一次提高相应阈值的依据;或者发现异常占用系统资源的进程没有被结束的情况,可以将其列入上述用户使用统计信息中并作为下一次降低相应阈值的依据。当然,云服务器的操作人员也可以根据分析和统计数据手动调整各个阈值的大小,达到更精准的优化效果。Among them, one or more thresholds corresponding to each system resource stored in the cloud server (herein referred to as a threshold group) can be shared by multiple users (the specific storage format can be "process name-system resource type —threshold group"), not only saves local storage space, but also makes dynamic adjustment of each threshold possible. For example, if a normal process ends unexpectedly because the threshold is too low, it can be included in the above user usage statistics and used as the basis for raising the corresponding threshold next time; or it is found that the process that abnormally occupies system resources has not been terminated In case of any situation, it can be included in the above-mentioned user usage statistics and used as the basis for lowering the corresponding threshold next time. Of course, the operator of the cloud server can also manually adjust the size of each threshold according to the analysis and statistical data to achieve a more precise optimization effect.

进一步地,在图4所示的方法实施例中,将该进程当前所占用系统资源的信息还可与所述进程优化策略中对应于每一项系统资源的占用信息所设的一个或多个阈值进行比较,得到该进程当前所占用每一系统资源的信息所处的优化等级。Further, in the method embodiment shown in FIG. 4 , the information of the system resources currently occupied by the process can also be combined with one or more of the information set corresponding to the occupancy information of each system resource in the process optimization strategy. Thresholds are compared to obtain the optimization level of information about each system resource currently occupied by the process.

例如,先根据该进程当前所占用系统资源的信息确定其所处的优化等级(比如某进程的内存占用率为高优化等级、CPU使用率为中优化等级、磁盘I/O信息为低优化等级),再根据各类系统资源的优化等级确定该进程的优化标记,比如最简单地使CPU使用率为高优化等级的进程都对应直接结束进程的优化标记等,当然也可以采用其他标准来执行优化操作,并可以由用户进行设置调整,本发明对此不做限定。For example, first determine the optimization level it is in according to the information of the system resources currently occupied by the process (for example, the memory usage rate of a process is high optimization level, the CPU usage rate is medium optimization level, and the disk I/O information is low optimization level ), and then determine the optimization mark of the process according to the optimization level of various system resources. For example, the easiest way to make the CPU usage rate of a process with a high optimization level is to correspond to the optimization mark of directly ending the process, etc. Of course, other standards can also be used to execute The operation is optimized and can be set and adjusted by the user, which is not limited in the present invention.

下面展示一种针对内存的优化流程实例,具体展示本发明技术方案在各方面的可选特征:The following shows an example of an optimization process for memory, specifically showing the optional features of the technical solution of the present invention in various aspects:

每秒获取所有进程(这里假设为3个)的内存使用率,并与进程优化策略比较得到各进程的高、中、低优化等级,具体为:第一进程的内存占用率为40%,介于进程优化策略中的25%与60%之间,属于中优化等级;第二进程内存占用率为2%,小于进程优化策略中的5%,属于低优化等级;第三进程内存占用率为30%,大于进程优化策略中的20%,属于高优化等级。Obtain the memory utilization rate of all processes (assumed to be 3 here) per second, and compare with the process optimization strategy to obtain the high, medium, and low optimization levels of each process, specifically: the memory utilization rate of the first process is 40%, the intermediate Between 25% and 60% in the process optimization strategy, it belongs to the medium optimization level; the memory usage rate of the second process is 2%, which is less than 5% in the process optimization strategy, and belongs to the low optimization level; the memory usage rate of the third process is 30%, which is greater than 20% in the process optimization strategy, belongs to the high optimization level.

接下来,具体对每一进程进行优化操作:由于第三进程属于高优化等级,因此直接结束第三进程;剩余第一进程与第二进程的内存占用率之和为42%,判定该系统的内存总量1GB小于给定的数值3GB且当前的内存占用率大于给定的数值40%,因此在用户选择清理列表中给出第一进程的进程名称、优化标记(这里具体为中优化等级,则此处优化标记为“可以清理”)和具体的内存占用率40%,并默认不勾选,来让用户决定是否继续清理第一进程。若该系统的内存总量大于等于3GB或者内存占用率小于40%,则忽略所有进程并完成优化操作(即设置一优化目标,当达到优化目标时则结束优化操作,当未达到优化目标时继续优化操作直到没有可以优化的进程或者用户主动终止)。Next, specifically optimize each process: since the third process belongs to a high optimization level, the third process is terminated directly; the sum of the memory usage of the remaining first process and the second process is 42%, and it is determined that the system The total amount of memory of 1GB is less than the given value of 3GB and the current memory usage is greater than the given value of 40%, so the process name and optimization flag of the first process are given in the user selection cleaning list (here specifically, medium optimization level, Then the optimization mark here is "Can be cleaned") and the specific memory usage rate is 40%, and it is not checked by default, so that the user can decide whether to continue cleaning the first process. If the total memory of the system is greater than or equal to 3GB or the memory occupancy rate is less than 40%, ignore all processes and complete the optimization operation (that is, set an optimization goal, end the optimization operation when the optimization goal is reached, and continue when the optimization goal is not reached Optimize operations until there are no processes that can be optimized or the user actively terminates).

由此,本实施例可以通过对应于单个进程的进程优化策略分别以不同的标准监测各个进程占用系统资源的情况,从而可以监测出占用总量扩张或者异常占用系统资源的进程,因而相比于现有技术可以更有效地监控单个进程的系统资源占用情况,进而可以对于每个进程进行个性化的优化操作,提升用户体验。Therefore, in this embodiment, the process optimization strategy corresponding to a single process can monitor the situation of each process occupying system resources with different standards, so that the processes that occupy the total amount of expansion or abnormally occupy system resources can be monitored, so compared with The existing technology can more effectively monitor the system resource occupation of a single process, and then can perform personalized optimization operations for each process to improve user experience.

图5示出了本发明一实施例提供的对终端资源进行优化的装置的结构示意图,如图5所示,本实施例的对终端资源进行优化的装置包括:进程分析单元51、优化策略获取单元52和优化处理单元53;FIG. 5 shows a schematic structural diagram of a device for optimizing terminal resources provided by an embodiment of the present invention. As shown in FIG. 5 , the device for optimizing terminal resources in this embodiment includes: a process analysis unit 51, an optimization strategy acquisition Unit 52 and optimization processing unit 53;

其中,进程分析单元51用于获取终端中运行的一进程的标识及该进程当前所占系统资源的信息;Wherein, the process analysis unit 51 is used to obtain the identification of a process running in the terminal and the information of the system resources currently occupied by the process;

优化策略获取单元52用于根据该进程的标识,获取与该标识对应的进程优化策略;The optimization strategy acquisition unit 52 is configured to acquire a process optimization strategy corresponding to the identifier according to the identifier of the process;

优化处理单元53用于将该进程当前所占系统资源的信息与所述进程优化策略进行比较,获得针对该进程的优化标记,根据所述优化标记对该进程进行相应等级的优化操作。The optimization processing unit 53 is configured to compare the information of the system resource currently occupied by the process with the process optimization strategy, obtain an optimization mark for the process, and perform a corresponding level of optimization operation on the process according to the optimization mark.

在本实施例中,每一进程当前占用系统资源的信息根据如下一项或多项信息计算得到:In this embodiment, the information about the system resources currently occupied by each process is calculated based on one or more of the following information:

该进程的内存使用率,中央处理器CPU占用率,磁盘输入输出IO吞吐量、网络吞吐量。The memory usage rate of the process, the CPU usage rate of the central processing unit, the disk input and output IO throughput, and the network throughput.

进一步地,本实施例中的进程优化策略可为预先从服务器中下载的对应终端的系统环境信息中每一进程的策略,且所述进程优化策略中划分有一个以上的与所述优化标记对应的优化等级,以及该等级的优化操作信息;Further, the process optimization strategy in this embodiment may be the strategy of each process in the system environment information of the corresponding terminal downloaded from the server in advance, and the process optimization strategy is divided into more than one corresponding to the optimization flag The optimization level of , and the optimization operation information of this level;

每一优化等级为所述云服务器根据设备中的进程信息统计的优化等级。Each optimization level is an optimization level calculated by the cloud server according to process information in the device.

在另一可选的实现方式中,优化策略获取单元52具体用于,将所述进程的标识发送服务器,以使服务器根据所述标识获取与该标识对应的进程优化策略;In another optional implementation manner, the optimization policy acquiring unit 52 is specifically configured to send the identifier of the process to the server, so that the server acquires the process optimization strategy corresponding to the identifier according to the identifier;

接收服务器发送的与该进程的标识对应的进程优化策略。The process optimization policy corresponding to the identifier of the process sent by the server is received.

本实施例中服务器中的进程优化策略可为通过大量的统计获得的符合该进程对应的应用程序使用规律的策略。The process optimization policy in the server in this embodiment may be a policy obtained through a large number of statistics that conforms to the usage rules of the application program corresponding to the process.

举例来说,所述优化处理单元53具体用于,根据该进程当前所占用系统资源的信息,确定该进程所属的优化策略中的优化等级,在终端的界面发送优化等级的提示信息;For example, the optimization processing unit 53 is specifically configured to determine the optimization level in the optimization strategy to which the process belongs according to the information of the system resources currently occupied by the process, and send a prompt message of the optimization level on the interface of the terminal;

和/或,根据该进程当前所占用系统资源的信息,确定该进程所属的进程优化策略中的优化等级,在终端的界面发送优化等级的提示信息,在用户触发优化指令之后,采用优化等级对应的优化操作对该进程进行优化;And/or, according to the information of the system resources currently occupied by the process, determine the optimization level in the process optimization strategy to which the process belongs, send the prompt information of the optimization level on the interface of the terminal, and use the optimization level corresponding to the optimization level after the user triggers the optimization command. The optimization operation optimizes the process;

和/或,根据该进程当前所占系统资源的信息,确定该进程所属的进程优化策略中的优化等级,采用优化等级对应的优化操作对该进程进行优化;And/or, according to the information of the system resources currently occupied by the process, determine the optimization level in the process optimization strategy to which the process belongs, and optimize the process by using the optimization operation corresponding to the optimization level;

和/或,根据该进程当前所占系统资源的信息,确定该进程所属的进程优化策略中的优化等级,采用优化等级对应的优化操作对该进程进行优化,并在终端的界面发送已经对该进程进行优化的信息。And/or, according to the information of the system resources currently occupied by the process, determine the optimization level in the process optimization strategy to which the process belongs, optimize the process by using the optimization operation corresponding to the optimization level, and send the Process optimization information.

进一步地,所述优化处理单元53具体用于,Further, the optimization processing unit 53 is specifically used to:

在所述优化标记对应的等级为最高等级时,直接结束该进程;When the level corresponding to the optimization mark is the highest level, directly end the process;

在所述优化标记对应的等级为中间等级时,释放该进程占用的闲置内存和/或清理该进程中的缓存数据或临时数据;When the level corresponding to the optimization mark is an intermediate level, release the idle memory occupied by the process and/or clean up cached data or temporary data in the process;

在所述优化标记对应的等级为最低等级时,跳过对该进程的优化操作。When the level corresponding to the optimization flag is the lowest level, the optimization operation for the process is skipped.

本实施例的装置可执行前述的图1和图4所示的方法实施例中的流程,本实施例不在此进行详述。The device in this embodiment can execute the procedures in the aforementioned method embodiments shown in FIG. 1 and FIG. 4 , and this embodiment will not be described in detail here.

本实施例的装置可以对于每个进程进行个性化的优化操作,提升用户体验。The device in this embodiment can perform personalized optimization operations for each process to improve user experience.

本发明的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description of the invention, numerous specific details are set forth. However, it is understood 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 the understanding of this description.

类似地,应当理解,为了精简本发明公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释呈反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the above description of exemplary embodiments of the invention, in order to streamline the present disclosure and to facilitate understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together into a single embodiment , figure, or description of it. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention 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 can understand that the modules in the device in the embodiment can be adaptively changed and installed in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except where at least some of such features and/or processes or units 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 understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的一种浏览器终端的设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The 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) can be used in practice to implement some or all functions of some or all components in a browser terminal device according to an embodiment of the present invention . The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments 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 distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围,其均应涵盖在本发明的权利要求和说明书的范围当中。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. All of them should be covered by the scope of the claims and description of the present invention.

Claims (10)

1.一种对终端资源进行优化的装置,其特征在于,包括:1. A device for optimizing terminal resources, comprising: 进程分析单元,用于获取终端中运行的进程的标识及该进程当前所占系统资源的信息;A process analysis unit, configured to obtain the identification of the process running in the terminal and information about the system resources currently occupied by the process; 优化策略获取单元,用于根据该进程的标识,获取与该标识对应的进程优化策略;An optimization strategy acquiring unit, configured to acquire a process optimization strategy corresponding to the identifier according to the identifier of the process; 优化处理单元,用于将该进程当前所占系统资源的信息与所述进程优化策略进行比较,获得针对该进程的优化标记,根据所述优化标记对该进程进行相应等级的优化操作。The optimization processing unit is configured to compare the information of the system resources currently occupied by the process with the process optimization strategy, obtain an optimization mark for the process, and perform a corresponding level of optimization operation on the process according to the optimization mark. 2.根据权利要求1所述的装置,其特征在于,每一进程当前占用系统资源的信息根据如下一项或多项信息计算得到:2. The device according to claim 1, wherein the information about the system resources currently occupied by each process is calculated based on one or more of the following information: 该进程的内存使用率,中央处理器CPU占用率,磁盘输入输出IO吞吐量、网络吞吐量。The memory usage rate of the process, the CPU usage rate of the central processing unit, the disk input and output IO throughput, and the network throughput. 3.根据权利要求1或2所述的装置,其特征在于,所述进程优化策略为预先从服务器中下载的对应终端的系统环境信息中进程的优化策略,且所述进程优化策略中划分有一个以上的与所述优化标记对应的优化操作信息。3. The device according to claim 1 or 2, wherein the process optimization strategy is the optimization strategy of the process in the system environment information of the corresponding terminal downloaded from the server in advance, and the process optimization strategy is divided into More than one optimization operation information corresponding to the optimization flag. 4.根据权利要求1或2所述的装置,其特征在于,优化策略获取单元,具体用于4. The device according to claim 1 or 2, characterized in that the optimization strategy acquisition unit is specifically used for 将所述进程的标识发送服务器,以使服务器根据所述标识获取与该标识对应的进程优化策略;Sending the identifier of the process to the server, so that the server obtains a process optimization strategy corresponding to the identifier according to the identifier; 接收服务器发送的与该进程的标识对应的进程优化策略。The process optimization policy corresponding to the identifier of the process sent by the server is received. 5.根据权利要求1至4任一所述的装置,其特征在于,所述优化处理单元,具体用于5. The device according to any one of claims 1 to 4, wherein the optimization processing unit is specifically used for 在所述优化标记对应的等级为最高等级时,直接结束该进程;When the level corresponding to the optimization mark is the highest level, directly end the process; 在所述优化标记对应的等级为中间等级时,释放该进程占用的闲置内存和/或清理该进程中的缓存数据或临时数据;When the level corresponding to the optimization mark is an intermediate level, release the idle memory occupied by the process and/or clean up cached data or temporary data in the process; 在所述优化标记对应的等级为最低等级时,跳过对该进程的优化操作。When the level corresponding to the optimization flag is the lowest level, the optimization operation for the process is skipped. 6.一种对终端资源进行优化的方法,其特征在于,包括:6. A method for optimizing terminal resources, comprising: 获取终端中运行的进程的标识及该进程当前所占系统资源的信息;Obtain the identification of the process running in the terminal and information about the system resources currently occupied by the process; 根据该进程的标识,获取与该标识对应的进程优化策略;Obtaining a process optimization strategy corresponding to the identifier according to the identifier of the process; 将该进程当前所占系统资源的信息与所述进程优化策略进行比较,获得针对该进程的优化标记,根据所述优化标记对该进程进行相应等级的优化操作。Comparing the information of the system resources currently occupied by the process with the process optimization policy to obtain an optimization mark for the process, and performing a corresponding level of optimization operation on the process according to the optimization mark. 7.根据权利要求6所述的方法,其特征在于,每一进程当前占用系统资源的信息根据如下一项或多项信息计算得到:7. The method according to claim 6, wherein the information about the system resources currently occupied by each process is calculated according to one or more of the following information: 该进程的内存使用率,中央处理器CPU占用率,磁盘输入输出IO吞吐量、网络吞吐量。The memory usage rate of the process, the CPU usage rate of the central processing unit, the disk input and output IO throughput, and the network throughput. 8.根据权利要求6或7所述的方法,其特征在于,所述进程优化策略为预先从服务器中下载的对应终端的系统环境信息中进程的优化策略,且所述进程优化策略中划分有一个以上的与所述优化标记对应的的优化操作信息。8. The method according to claim 6 or 7, wherein the process optimization strategy is the optimization strategy of the process in the system environment information of the corresponding terminal downloaded from the server in advance, and the process optimization strategy is divided into More than one optimization operation information corresponding to the optimization flag. 9.根据权利要求6或7所述的方法,其特征在于,所述根据该进程的标识,获取与该标识对应的进程优化策略,包括:9. The method according to claim 6 or 7, wherein said obtaining the process optimization strategy corresponding to the identification according to the identification of the process comprises: 将所述进程的标识发送服务器,以使服务器根据所述标识获取与该标识对应的进程优化策略;Sending the identifier of the process to the server, so that the server obtains a process optimization strategy corresponding to the identifier according to the identifier; 接收服务器发送的与该进程的标识对应的进程优化策略。The process optimization policy corresponding to the identifier of the process sent by the server is received. 10.根据权利要求6至9任一所述的方法,其特征在于,根据所述优化标记对该进程进行相应等级的优化操作,包括:10. The method according to any one of claims 6 to 9, wherein performing a corresponding level of optimization operation on the process according to the optimization flag includes: 在所述优化标记对应的等级为最高等级时,直接结束该进程;When the level corresponding to the optimization mark is the highest level, directly end the process; 在所述优化标记对应的等级为中间等级时,释放该进程占用的闲置内存和/或清理该进程中的缓存数据或临时数据;When the level corresponding to the optimization mark is an intermediate level, release the idle memory occupied by the process and/or clean up cached data or temporary data in the process; 在所述优化标记对应的等级为最低等级时,跳过对该进程的优化操作。When the level corresponding to the optimization flag is the lowest level, the optimization operation for the process is skipped.
CN201410778228.3A 2014-12-15 2014-12-15 The method and device that terminal resource is optimized Active CN104503840B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410778228.3A CN104503840B (en) 2014-12-15 2014-12-15 The method and device that terminal resource is optimized

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410778228.3A CN104503840B (en) 2014-12-15 2014-12-15 The method and device that terminal resource is optimized

Publications (2)

Publication Number Publication Date
CN104503840A true CN104503840A (en) 2015-04-08
CN104503840B CN104503840B (en) 2016-09-28

Family

ID=52945240

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410778228.3A Active CN104503840B (en) 2014-12-15 2014-12-15 The method and device that terminal resource is optimized

Country Status (1)

Country Link
CN (1) CN104503840B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881348A (en) * 2015-06-12 2015-09-02 北京金山安全软件有限公司 System resource occupancy rate display method and device
CN105117321A (en) * 2015-06-30 2015-12-02 浪潮(北京)电子信息产业有限公司 Process management method and process management terminal
CN106354564A (en) * 2016-08-31 2017-01-25 深圳天珑无线科技有限公司 System resource distribution method and system
CN106649070A (en) * 2016-12-30 2017-05-10 郑州云海信息技术有限公司 Rapid optimization method and system for operating performance of Linux system
CN107291483A (en) * 2016-04-01 2017-10-24 深圳富泰宏精密工业有限公司 Intelligence deletes the method and electronic equipment of application program
CN107423097A (en) * 2017-07-28 2017-12-01 北京明朝万达科技股份有限公司 The management method and device of a kind of application program
CN107436812A (en) * 2017-07-28 2017-12-05 北京深思数盾科技股份有限公司 A kind of method and device of linux system performance optimization
CN107479951A (en) * 2017-07-31 2017-12-15 广东欧珀移动通信有限公司 Process control method, device, storage medium and electronic equipment
CN108874546A (en) * 2018-06-26 2018-11-23 郑州云海信息技术有限公司 A kind of system and method that linux optimization resource uses
CN108932163A (en) * 2018-06-15 2018-12-04 奇酷互联网络科技(深圳)有限公司 EMS memory management process, device, readable storage medium storing program for executing and terminal
CN109697128A (en) * 2018-12-19 2019-04-30 北京爱奇艺科技有限公司 A kind of thread maintaining method, device and electronic equipment
CN110955518A (en) * 2019-10-31 2020-04-03 北京浪潮数据技术有限公司 Pressure load adjusting method of distributed storage management system
CN113157439A (en) * 2016-03-29 2021-07-23 华为技术有限公司 Resource statistical method, device and terminal
CN113285976A (en) * 2021-04-07 2021-08-20 上海商米科技集团股份有限公司 Cloud control process management system
CN113626203A (en) * 2021-08-27 2021-11-09 广东九联科技股份有限公司 Memory environment real-time optimization method and system for android system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120239453A1 (en) * 2011-03-18 2012-09-20 International Business Machines Corporation Resource cost optimization system, method, and program
CN103279353A (en) * 2013-05-31 2013-09-04 新浪网技术(中国)有限公司 Method, device and system for determining application optimization strategies
CN103793265A (en) * 2012-10-30 2014-05-14 腾讯科技(深圳)有限公司 Processing method and device for process optimization

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120239453A1 (en) * 2011-03-18 2012-09-20 International Business Machines Corporation Resource cost optimization system, method, and program
CN103793265A (en) * 2012-10-30 2014-05-14 腾讯科技(深圳)有限公司 Processing method and device for process optimization
CN103279353A (en) * 2013-05-31 2013-09-04 新浪网技术(中国)有限公司 Method, device and system for determining application optimization strategies

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881348B (en) * 2015-06-12 2018-03-06 北京金山安全软件有限公司 System resource occupancy rate display method and device
CN104881348A (en) * 2015-06-12 2015-09-02 北京金山安全软件有限公司 System resource occupancy rate display method and device
CN105117321A (en) * 2015-06-30 2015-12-02 浪潮(北京)电子信息产业有限公司 Process management method and process management terminal
CN113157439A (en) * 2016-03-29 2021-07-23 华为技术有限公司 Resource statistical method, device and terminal
CN113157439B (en) * 2016-03-29 2024-03-01 华为技术有限公司 Resource statistics method, device and terminal
CN107291483A (en) * 2016-04-01 2017-10-24 深圳富泰宏精密工业有限公司 Intelligence deletes the method and electronic equipment of application program
CN106354564A (en) * 2016-08-31 2017-01-25 深圳天珑无线科技有限公司 System resource distribution method and system
CN106649070A (en) * 2016-12-30 2017-05-10 郑州云海信息技术有限公司 Rapid optimization method and system for operating performance of Linux system
CN107423097A (en) * 2017-07-28 2017-12-01 北京明朝万达科技股份有限公司 The management method and device of a kind of application program
CN107436812A (en) * 2017-07-28 2017-12-05 北京深思数盾科技股份有限公司 A kind of method and device of linux system performance optimization
CN107423097B (en) * 2017-07-28 2019-02-22 北京明朝万达科技股份有限公司 A kind of management method and device of application program
CN107479951A (en) * 2017-07-31 2017-12-15 广东欧珀移动通信有限公司 Process control method, device, storage medium and electronic equipment
CN108932163A (en) * 2018-06-15 2018-12-04 奇酷互联网络科技(深圳)有限公司 EMS memory management process, device, readable storage medium storing program for executing and terminal
CN108874546B (en) * 2018-06-26 2021-09-28 郑州云海信息技术有限公司 Linux system and method for optimizing resource use
CN108874546A (en) * 2018-06-26 2018-11-23 郑州云海信息技术有限公司 A kind of system and method that linux optimization resource uses
CN109697128A (en) * 2018-12-19 2019-04-30 北京爱奇艺科技有限公司 A kind of thread maintaining method, device and electronic equipment
CN110955518A (en) * 2019-10-31 2020-04-03 北京浪潮数据技术有限公司 Pressure load adjusting method of distributed storage management system
CN113285976A (en) * 2021-04-07 2021-08-20 上海商米科技集团股份有限公司 Cloud control process management system
CN113626203A (en) * 2021-08-27 2021-11-09 广东九联科技股份有限公司 Memory environment real-time optimization method and system for android system
CN113626203B (en) * 2021-08-27 2024-02-13 广东九联科技股份有限公司 Memory environment real-time optimization method and system for android system

Also Published As

Publication number Publication date
CN104503840B (en) 2016-09-28

Similar Documents

Publication Publication Date Title
CN104503840B (en) The method and device that terminal resource is optimized
CN102831045B (en) Method and device for detecting starting items in terminal equipment
CN104461742B (en) Calculate equipment optimization method and device
US11537304B2 (en) Data verification method and apparatus, and storage medium
US9203804B2 (en) Method and system for defending against malware and method for updating filtering table thereof
CN104503841A (en) Process clearing method and process clearing device
WO2017185616A1 (en) File storage method and electronic equipment
CN109144559B (en) Update data packet pushing method and server
CN107295594A (en) Network switching method, device and mobile terminal
CN106897141A (en) The processing method and processing device of information
CN104536813B (en) The acceleration method and device of calculating equipment
WO2014161431A2 (en) System optimization method and device
WO2016183918A1 (en) Method and device for processing storage space
WO2018111381A1 (en) System and method of managing application updates
CN106569917B (en) Data backup method and mobile terminal
CN104484224A (en) Server process control method, device and system
CN105511876B (en) A method and device for processing push information
CN104461741B (en) Graphics device interface based computing device optimizing method and device
CN113867919B (en) Kubernetes cluster scheduling method, system, equipment and medium
CN106470114B (en) A configuration method and device for an OTA upgrade package
CN107277896A (en) WiFi hotspot management method, device and terminal equipment
CN110209548B (en) Service control method, system, electronic device and computer readable storage medium
CN109976896A (en) Business re-scheduling treating method and apparatus
CN106550405B (en) Network data receiving control method and system based on mobile terminal
CN107329832B (en) Data receiving method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220715

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

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

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

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

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

TR01 Transfer of patent right