WO2019128545A1 - Procédé de gestion de processus, dispositif électronique et support d'informations lisible par ordinateur - Google Patents
Procédé de gestion de processus, dispositif électronique et support d'informations lisible par ordinateur Download PDFInfo
- Publication number
- WO2019128545A1 WO2019128545A1 PCT/CN2018/116526 CN2018116526W WO2019128545A1 WO 2019128545 A1 WO2019128545 A1 WO 2019128545A1 CN 2018116526 W CN2018116526 W CN 2018116526W WO 2019128545 A1 WO2019128545 A1 WO 2019128545A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- daemon
- application
- foreground
- keyword
- processor
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
Definitions
- the present application relates to the field of data processing, and in particular, to a process processing method, an electronic device, and a computer readable storage medium.
- a process of a foreground application (that is, a foreground process) is usually not resource-restricted, and a process (ie, a background process) of an application running in the background that is not related to the foreground application is occupied by resources.
- a process of a foreground application that is, a foreground process
- a background process of an application running in the background that is not related to the foreground application
- the embodiment of the present application provides a process processing method, an electronic device, and a computer readable storage medium.
- a process processing method comprising:
- a computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor, causing the processor to: acquire process information of a daemon running in the background; and detect the process information Whether the preset keyword is included; when the keyword is included, the resource is restricted to the daemon.
- An electronic device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor executing the computer program, causing the processor to perform the following operations: fetching in the background Process information of the daemon process; detecting whether the process information includes a preset keyword; when the keyword is included, performing resource limitation on the daemon process.
- FIG. 1 is a schematic diagram showing the internal structure of an electronic device in an embodiment.
- FIG. 2 is a partial block diagram of a system in an electronic device in an embodiment.
- FIG. 3 is a flow chart of a process processing method in an embodiment.
- FIG. 4 is a flow chart of a process processing method in another embodiment.
- Figure 5 is a block diagram showing the structure of a process processing apparatus in an embodiment.
- Figure 6 is a block diagram showing the structure of a process processing apparatus in another embodiment.
- Figure 7 is a block diagram showing a portion of the structure of a handset in an embodiment.
- first may be referred to as a second keyword without departing from the scope of the present application, and similarly, the second keyword may be referred to as a first keyword.
- Both the first keyword and the second keyword are keywords, but they are not the same keyword.
- an internal structure diagram of an electronic device includes a processor, memory, and display screen connected by a system bus.
- the processor is used to provide computing and control capabilities to support the operation of the entire electronic device.
- the memory is used to store data, programs, and/or instruction codes, etc., and the memory stores at least one computer program, which can be executed by the processor to implement the process processing method applicable to the electronic device provided in the embodiments of the present application.
- the memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random storage memory (Random-Access-Memory, RAM).
- the memory includes a non-volatile storage medium and an internal memory.
- Non-volatile storage media stores operating systems, databases, and computer programs.
- the database stores data related to a process processing method provided by the above various embodiments, such as information such as the name of each process or application.
- the computer program can be executed by a processor for implementing a process processing method provided by various embodiments of the present application.
- the internal memory provides a cached operating environment for operating systems, databases, and computer programs in non-volatile storage media.
- the display screen can be a touch screen, such as a capacitive screen or an electronic screen, for displaying interface information of an application corresponding to the foreground process, and can also be used for detecting a touch operation acting on the display screen, and generating corresponding instructions, such as performing front and back Application switching instructions, etc.
- the structure shown in FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied.
- the specific electronic device may be It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
- the electronic device further includes a network interface connected through a system bus, and the network interface may be an Ethernet card or a wireless network card, etc., for communicating with an external electronic device, for example, for communicating with a server.
- the network interface may be an Ethernet card or a wireless network card, etc.
- the external electronic device for example, for communicating with a server.
- a partial architectural diagram of an electronic device is provided.
- the architecture of the electronic device includes a JAVA spatial layer 210, a local framework layer 220, and a kernel space layer 230.
- the JAVA spatial layer 210 may include a freeze management application 212.
- the electronic device may implement a freeze policy for each application through the freeze management application 212, and perform freezing and thawing management operations on the related applications of the background power consumption.
- the resource priority and restriction management module 222 and the platform freeze management module 224 are included in the local framework layer 220.
- the electronic device can maintain different applications in different priorities and different resource organizations through the resource priority and limit management module 222, and adjust the resource group of the application according to the requirements of the upper layer to achieve optimized performance and save power. effect.
- the electronic device can allocate the tasks that can be frozen in the background to the frozen layer corresponding to the preset different levels according to the length of the entering freeze time through the platform freeze management module 224.
- the frozen layer can include three, respectively: the CPU Limit sleep mode, CPU freeze sleep mode, process deep freeze mode.
- the CPU restricts the sleep mode to limit the CPU resources occupied by the related processes, so that the related processes occupy less CPU resources, and the free CPU resources are tilted to other unfrozen processes, thereby limiting the occupation of CPU resources.
- the kernel space layer 230 includes a UID management module 231, a Cgroup module 232, a Binder management module 233, a process memory recovery module 234, and a freeze timeout exit module 235.
- the UID management module 231 is configured to implement an application-based User Identifier (UID) to manage resources of a third-party application or freeze. Compared with the Process Identifier (PID) for process management and control, it is easier to uniformly manage the resources of a user's application through UID.
- the Cgroup module 232 is used to provide a complete set of Central Processing Unit (CPU), CPUSET, memory, input/output (I/O), and Net related resource restriction mechanisms.
- the Binder management module 233 is used to implement the priority control of the background binder communication.
- the interface module of the local framework layer 220 includes a binder interface developed to the upper layer, and the upper layer framework or application sends a resource restriction or frozen instruction to the resource priority and restriction management module 222 and the platform freeze management module 224 through the provided binder interface.
- the process memory recovery module 234 is configured to implement the process deep freeze mode, so that when a third-party application is in a frozen state for a long time, the file area of the process is mainly released, thereby saving the memory module and speeding up the application next time. The speed at startup.
- the freeze timeout exit module 235 is configured to resolve an exception generated by the freeze timeout scenario.
- a process processing method is provided.
- the embodiment is applied to the electronic device shown in FIG. 1 as an example for description.
- the method includes:
- the process is a basic operation of a program on a certain data set in a computer. It is the basic unit for resource allocation and scheduling, and is the basis of the operating system structure.
- the operation of an application (APP) is usually reflected by the operation of multiple related processes.
- the process involved in the foreground application runtime is the foreground process
- the process involved in the background application runtime is the background process.
- the electronic device can obtain the foreground process when the foreground application is running.
- Each process can be executed as a task.
- the task formed by the foreground process is the foreground task
- the task formed by the background process is the background task.
- daemon processes In the process running in the background, there is a class of processes as daemons (Daemon processes).
- the daemon is a server program that runs all the time. It usually runs in the background of the system. There is no control terminal and no interaction with the foreground.
- the daemon is generally used as a system service. It is a long-running process. It usually runs after the system is started. It ends when it is closed.
- the electronic device may acquire process information of the daemon running in the background according to a preset frequency or according to the detected user operation instruction.
- the process information includes basic information such as the User Identifier (UID), Process Identifier (PID), and process name of the process.
- the electronic device may update the process running in the foreground and the process running in the background according to the running state of the electronic device.
- the foreground process pool of the corresponding foreground process and the background process of the background process may be set. Pool. Add the process information of the foreground process to the foreground process pool, add the process information of the background process to the background process pool, and update the foreground process pool and the background process pool when detecting that the process running in the background changes.
- Process ID For example, when it is detected that the process B changes from the background process to the foreground process, the process information of the process B can be moved from the background process pool to the foreground process pool.
- the electronic device may set a corresponding foreground mark or background mark for each process, determine a process with a foreground mark as a foreground process, determine a process with a background mark as a background process, and obtain a background mark.
- Process information for the daemon may be set a corresponding foreground mark or background mark for each process, determine a process with a foreground mark as a foreground process, determine a process with a background mark as a background process, and obtain a background mark.
- operation 304 it is detected whether the preset keyword is included in the process information.
- the electronic device presets at least one keyword, which is one or more of a preset number of digits, letters or other characters.
- This keyword is information common to the process information of the daemon that can be resource limited.
- the electronic device may detect one or more field information preset in the process information to determine whether the detected field information includes the corresponding keyword. For example, it can detect whether the process name and the one or more fields such as UID contain corresponding keywords.
- the resource is restricted to the corresponding daemon.
- the resources include CPU resources, CPUSET resources, memory resources, I/O resources, and Net related resources.
- the electronic device may limit one or more of the above resources to prevent the daemon process from occupying more resources and affecting the processing efficiency of the foreground process.
- resource limits are imposed on the daemon, including: limiting CPU resources and I/O resources occupied by the daemon.
- the electronic device can further improve the CPU that can be used by the foreground application by limiting CPU resources and I/O resources of such resources. Resources and I/O resources improve the processing efficiency of the foreground application.
- the electronic device can improve the detection efficiency of detecting the relatively hidden daemon process by detecting the keyword of the daemon process, and include the corresponding key in the detected process information.
- the word daemon performs resource restrictions to prevent it from occupying more resources, so that more resources are tilted toward the foreground application, and the processing efficiency of the foreground application is improved through the process.
- the keyword includes a first keyword and a second keyword
- operation 304 includes: detecting whether the process name in the process information includes the first keyword; and detecting whether the user identity UID in the process information includes the second Keyword
- operation 306 includes: resource limiting the daemon process when the first keyword and the second keyword are included.
- the keywords that the electronic device needs to retrieve include two types, a first keyword and a second keyword.
- the first keyword and the second keyword are respectively composed of one or more of different numbers, letters or other characters of a preset length.
- the first keyword is a keyword that detects the process name
- the second keyword is a keyword that detects the UID.
- the electronic device can obtain the process name and the UID in the process information, and detect whether the process name includes the first keyword and whether the second keyword is included in the UID.
- the electronic device can perform detection of the first keyword and the second keyword at the same time, and the detection order of the two is not necessarily limited.
- the electronic device may perform resource limitation on the daemon.
- the electronic device further improves the accuracy of detecting the daemon process that can perform resource limitation by performing keyword detection in the process name and the UID.
- the method before the resource restriction is performed on the daemon, the method further includes: acquiring an application category of the foreground application, and performing resource limitation on the daemon when the application category is a game application.
- the electronic device can detect an operating state of the front-end application of the local device, and when the current running application is in the running state of the game, perform a resource limiting operation on the daemon.
- the electronic device can record application categories to which different applications belong, and the application categories may include game applications, social applications, map navigation applications, online shopping payment applications, call communication applications, browser applications, and the like.
- the electronic device can obtain the application category of the application running in the foreground, and the application running in the foreground is the foreground application.
- the electronic device can perform a resource restriction operation on the daemon.
- the application of the game class since the application of the game class is in the process of running, it usually needs to occupy a large resource to maintain smooth running, and when there is a daemon hidden in the background, it also occupies certain resources and affects the game.
- the running efficiency of the application therefore, when detecting that the foreground application is a game application, the electronic device can limit the resources of the detected daemon, which can further improve the operating efficiency of the game application.
- resource limits are imposed on the daemon, including: reducing the priority of the daemon; and limiting resources to the daemon based on the reduced priority.
- the electronic device is set to correspond to different priorities, and different priorities correspond to different resource limitation levels.
- the higher the priority the lower the limit on the resources available to it.
- the foreground process is set to the highest priority and is relatively higher than the priority of the background process.
- the same process when running in the foreground and running in the background, does not have the same priority.
- the priority in different states is not necessarily the same. For example, when the same background process is different at different times or when the foreground process is different, the priority of the background process is not necessarily the same.
- the electronic device can adjust its priority to lower the priority of the daemon, and limit the resource to the daemon according to the reduced priority to increase the resource limit on the daemon. The extent that more resources are tilted toward the foreground application.
- the electronic device can set priority 1 to priority 5 according to the priority, and the priority is 5 levels, and the higher the priority, the lower the limit on the resources that can be used.
- the electronic device adjusts the priority of the daemon A from the priority 3 to the priority 4 or preferentially. Level 5, etc., to retain more available resources for the foreground application to further improve the operational efficiency of the foreground application.
- the daemon process performs resource limitation, including: calculating a limit on the daemon process according to the local resource utilization rate; and limiting the resource to the daemon process according to the degree of restriction.
- the local resource utilization includes utilization of one or more resources of the CPU resource, the I/O resource, the memory resource, and the like.
- the resource utilization reflects the idle state of the resources of the electronic device, and the lower the resource utilization, the more idle resources are corresponding.
- the electronic device can calculate the limit on the daemon process according to the current resource utilization rate, so that when the resource utilization rate is larger, the restriction on the daemon process is higher, and the resource utilization rate is smaller, the daemon process is restricted. The degree is correspondingly smaller.
- m may be any suitable empirical value when the number of available I/O resources currently limited to the daemon is m or unlimited.
- the electronic device may limit the number of I/O resources of the daemon to n, and when the current resource utilization rate of the electronic device is b%, the electronic device may The number of I/O resources for this daemon is limited to k. Wherein b and k are both smaller than m, and when a is smaller than b, n is greater than k.
- the electronic device may reduce the priority of the daemon according to the local resource utilization, and limit the resource to the daemon by the degree of resource limitation corresponding to the different priorities.
- the electronic device calculates the degree of restriction on the daemon process according to the local resource utilization rate, and limits the daemon process according to the degree of the restriction, so that the degree of limitation on the daemon process when the local resource utilization is large is large. Larger, when the utilization of local resources is low, the electronic device has a relatively small restriction on the daemon process, so that the degree of restriction on the daemon is balanced with the local resource utilization, and the processing efficiency of the foreground application is not affected. In large cases, the electronic device does not impose too many restrictions on the daemon process, and also avoids the processing efficiency of the daemon process is too low.
- the method before the resource restriction on the daemon, the method further includes: detecting whether the daemon is dependent on the foreground process; and when the daemon is dependent on the foreground process, adjusting the priority of the daemon to match the foreground process; When the daemon is not dependent on the foreground process, the resource limit is enforced on the daemon.
- the electronic device performs the dependency detection operation on the daemon, and may perform detection in any process before the foregoing operation 306.
- the dependency relationship may be detected first, when there is no dependency relationship, Perform keyword detection.
- the daemon is executed to perform resource limitation.
- Dependency indicates that a process needs to utilize data from one or more processes in order to successfully implement the relationship to the execution of that process.
- the two processes that have dependencies are the dependent process and the dependent process, and the electronic device detects the background running daemon that will be depended by the foreground process as the background process that is depended by the foreground process.
- the electronic device may set a corresponding dependency flag to the detected background process that is depended by the foreground process, and obtain a background process with the dependency mark from the background process pool, and determine the background process as a background that is depended by the foreground process. process.
- the electronic device when dependent on the foreground process, can determine that the daemon process is a background process that is depended by the foreground process, and the priority of the daemon process that is dependent on the foreground process is adjusted to match the priority of the foreground process.
- the foreground process is the process running in the foreground.
- the electronic device may adjust its priority so that the adjusted priority matches the priority of the foreground process.
- the electronic device can set different matching priorities of the daemon processes that are dependent on the foreground process and the foreground priority. According to the matching relationship, the electronic device can obtain a corresponding priority for the daemon process that is dependent on the foreground process, and adjust the priority of the daemon process that is dependent on the foreground process to the priority, and reduce the guard against the foreground process.
- the degree of resource throttling of a process matches the extent to which resources that can be used by daemons that are dependent on the foreground process match the limits of the foreground process.
- the priority that matches the priority of the foreground process may be the same priority as the foreground process. That is, the electronic device can adjust the priority of the daemon process that is depended by the foreground process to the same priority as the foreground process, so that the degree of limitation on the resources that can be used by the daemon process that is dependent on the foreground process is related to the foreground process. The limits are the same.
- the electronic device By detecting the dependency of the daemon, the electronic device adjusts the priority of the daemon that the foreground process depends on to the priority of the foreground process. Because the foreground process has the highest priority, the limit of the available resources is the lowest, and the background process has the lower priority to prevent the background process from occupying too many resources and affecting the foreground application. However, in the background process, there is a situation that is depended on by the foreground process. When the dependent background process is executed efficiently, it also affects the foreground process. The application adjusts the priority of the dependent daemon to the priority matching the foreground priority, thereby reducing the limit of the resources that the dependent daemon can use, thereby improving the dependent daemon. Processing efficiency. Since the processing efficiency of the dependent daemon is improved, the processing efficiency of the foreground process depending on the dependent daemon is also improved.
- FIG. 4 another process processing method is provided, the method comprising:
- Operation 402 Obtain process information of a daemon running in the background.
- the process information includes the process name and UID described above.
- the electronic device scans all processes running locally to get the process name and UID of the daemon running in the background.
- the electronic device can acquire the process name and the UID of the multiple daemons at the same time, and obtain the process of the next round of the daemon process after completing the detection of one of the daemons in a preset order. Information is detected and detected, wherein the number of processes included in each round may be one or more and may not be the same.
- the electronic device may send a detection adjustment instruction to the daemon process to the resource priority and restriction management module 222 through the Binder interface through the freeze management application 210 in FIG. 2, and the resource priority and restriction management module 222 passes The received detection instruction acquires the process information of the daemon.
- Operation 404 detecting whether the process name in the process information includes the first keyword; and detecting whether the user identity UID in the process information includes the second keyword.
- the first keyword may be "dex2oat.”
- the second keyword may be a keyword of "2999”
- the electronic device may detect whether the process name includes “dex2oat” and whether the UID is preceded by a UID starting with “2999”, wherein "2999" may be included after A plurality of consecutive 9, such as "299999", “2999999” or "29999999”.
- Operation 406 when the first keyword and the second keyword are included, and the foreground application is a game application, the resource limitation is performed on the daemon, and the CPU resources and I/O resources occupied by the daemon are restricted.
- the electronic device may determine that the daemon is Apply the installation process and mark the identified application installation process. At the same time, the electronic device can detect whether the foreground application is a game application, and when it is a game application, limit the occupied CPU resources and I/O resources of the daemon. For example, if the CPU of the electronic device is an 8-core or a 6-core CPU, the CPU that can be occupied by the daemon can be limited to only one core, so as to provide more CPU resources for the game application running in the foreground. When the current application uses 30 or 20 I/O interfaces, the electronic device can limit it to occupy only 3 I/O interfaces to provide more I/O resources for use by game applications running in the foreground. .
- the electronic device may send a resource limit instruction to the detected daemon to the resource priority and limit management module 222 via the Binder interface.
- the resource limit instruction may be a priority adjustment instruction to the daemon. After receiving the priority adjustment instruction, the resource priority and limit management module 222 lowers the priority of the corresponding daemon process, increases the resource limit thereof, and prevents the foreground application from being stuck.
- the method before limiting the resources of the daemon, the method further includes: detecting whether the daemon is dependent on the foreground process, and when the daemon is not dependent on the foreground process, the electronic device may use CPU resources occupied by the daemon. I/O resources are restricted.
- the electronic device when there is socket communication, binder communication, memory sharing, or lock waiting between the daemon and the foreground process, the electronic device can determine that there is a communication mechanism between the background process and the foreground process.
- the electronic device can set a detection mechanism for the Binder communication between the foreground process and the background process in the Binder driver, and call the detection mechanism set in the Binder driver to detect the background process in which the Binder communication exists with the foreground process, and the detection will be detected.
- the background process is determined to be a background process that is dependent on the foreground process.
- the electronic device can detect individual lock resources, including thread locks, file handles, signals, and the like. For each lock resource, it can be detected whether a lock wait occurs, that is, the lock resource waits. When it is detected that a lock wait is generated, it may be further detected whether the behavior of the occurrence of the wait occurs on the foreground process. If so, all the background processes waiting for the lock resource are traversed, and the detected background processes waiting on the lock resource are all determined to be background processes that are depended by the foreground process.
- the electronic device may set a lock resource monitoring module and a priority adjustment module in a kernel space of the operating system, and embed the lock resource monitoring module into the kernel's native waiting interface.
- the lock resource monitoring module detecting thread locks, file handles, signals, etc. lock various lock resources, whether a wait occurs, whether the waiting behavior occurs on the foreground process, and if it occurs on the foreground task, it will detect
- the message is sent to the priority adjustment module.
- the electronic device traverses all the background threads waiting for the lock resource by the priority adjustment, and determines these background processes as the background processes that are depended by the foreground process.
- the priority adjustment module adjusts the priority of the corresponding daemon to the matching priority.
- the method before the operation 304, the method further includes: when there is a synchronization mechanism between the background process and the foreground process, determining that the daemon having the synchronization mechanism is a background process that is dependent on the foreground process.
- the electronic device can also detect the background process in the background process set by calling the futex system call, whether there is a background process having a synchronization mechanism with the foreground process, and determine the background process with the synchronization mechanism as the background process that is depended by the foreground process.
- the user mode synchronization mechanism can be implemented by calling the futex system call.
- the user state refers to the non-privileged state.
- Synchronization mechanisms include semaphores, mutex locks, and more.
- the electronic device determines, by the detection of at least one of a communication mechanism and a synchronization mechanism between the foreground process and the background process, the detected background process having at least one of a communication mechanism and a synchronization mechanism with the foreground process as being forwarded
- the background process that the process depends on can improve the efficiency of detecting the daemons that are dependent on the foreground process.
- the application installation process usually occupies large CPU resources and I/O resources during the running process, and such application installation process has greater concealment, making the electronic device difficult to detect, through the daemon process.
- the process name and the UID are detected.
- the process name includes a first keyword that is common to the application installation process
- the UID includes a second keyword that is common to the application installation process
- the electronic device may use the CPU occupied by the daemon. Restrictions on resources and I/O resources prevent the daemon from consuming CPU resources and I/O resources, improving the processing efficiency of game applications running in the foreground.
- FIGS. 3 and 4 are sequentially displayed as indicated by the arrows, these operations are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these operations is not strictly limited, and the operations may be performed in other sequences. Moreover, at least some of the operations in FIGS. 3 and 4 may include multiple sub-operations or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, or The order of execution of the stages is also not necessarily sequential, but may be performed alternately or alternately with at least a portion of the sub-operations or stages of other operations or other operations.
- a process processing apparatus includes a process acquisition module 502, a keyword detection module 504, and a process processing module 506.
- the process obtaining module 502 is configured to: process the process information of the daemon running in the background;
- the keyword detection module 504 is configured to detect whether the process information includes a preset keyword;
- the process processing module 506 is configured to: when the keyword is included, Resource restrictions on the daemon.
- the keyword includes a first keyword and a second keyword; the keyword detection module 504 is configured to detect whether the process name in the process information includes the first keyword; and detect whether the user identity identifier UID in the process information is The second keyword is included; the process processing module 506 is configured to perform resource limitation on the daemon when the first keyword and the second keyword are included.
- the process processing module 506 is further configured to obtain an application category of the foreground application, and when the application category is a game application, resource limitation is performed on the daemon.
- the process processing module 506 is further configured to reduce the priority of the daemon process; resource limiting the daemon process according to the reduced priority.
- the process processing module 506 is further configured to calculate a limit on the daemon process according to the local resource utilization rate; and limit the resource to the daemon process according to the degree of restriction.
- the process processing module 506 is further configured to limit CPU resources and I/O resources occupied by the daemon.
- FIG. 6 another process processing apparatus is provided, the apparatus further comprising:
- the dependency detection module 508 is configured to detect whether the daemon process is dependent on the foreground process.
- the process processing module 506 is further configured to: when the daemon process is dependent on the foreground process, adjust the priority of the daemon to match the foreground process; when the daemon is not dependent on the foreground process, and the process information includes the keyword, execute Resource restrictions on the daemon.
- the above-mentioned process processing device can improve the detection efficiency of detecting the relatively hidden daemon process by detecting the keyword of the daemon process, and perform resources for the daemon process including the corresponding keyword in the detected process information. Restrictions prevent them from occupying more resources, so that more resources are tilted toward the foreground application, and the processing efficiency of the foreground application is improved through the process.
- each module in the above process processing device is for illustrative purposes only. In other embodiments, the process processing device may be divided into different modules as needed to complete all or part of the functions of the process processing device.
- process processing device For the specific definition of the process processing device, reference may be made to the limitation of the process processing method in the above, and details are not described herein again.
- Each of the above-described process processing devices may be implemented in whole or in part by software, hardware, and combinations thereof.
- Each of the above modules may be embedded in or independent of the processor in the electronic device, or may be stored in a memory in the electronic device in a software format, so that the processor calls to perform operations corresponding to the above modules.
- each module in the process processing apparatus may be in the form of a computer program.
- the computer program can run on an electronic device such as a terminal or a server.
- the program modules of the computer program can be stored on a memory of the electronic device.
- the computer program is executed by the processor, the operation of the process processing method described in the embodiment of the present application is implemented.
- an electronic device including a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor performing the process processing provided by the foregoing embodiments when executing the computer program The operation of the method.
- a computer readable storage medium having stored thereon a computer program for performing process processing as described in various embodiments of the present application when executed by a processor The operation of the method.
- a computer program product comprising instructions, when executed on a computer, causes the computer to perform the process processing methods described in the various embodiments of the present application.
- the embodiment of the present application also provides a computer device. As shown in FIG. 7 , for the convenience of description, only the parts related to the embodiments of the present application are shown. If the specific technical details are not disclosed, please refer to the method part of the embodiment of the present application.
- the computer device may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, and the like, taking a computer device as a mobile phone as an example. :
- FIG. 7 is a block diagram showing a part of a structure of a mobile phone related to a computer device according to an embodiment of the present application.
- the mobile phone includes: a radio frequency (RF) circuit 710, a memory 720, an input unit 730, a display unit 740, a sensor 750, an audio circuit 760, a wireless fidelity (WiFi) module 770, and a processor 780. And power supply 790 and other components.
- RF radio frequency
- the RF circuit 710 can be used for receiving and transmitting signals during the transmission and reception of information or during a call.
- the downlink information of the base station can be received and processed by the processor 780.
- the uplink data can also be sent to the base station.
- RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
- LNA Low Noise Amplifier
- RF circuitry 710 can also communicate with the network and other devices via wireless communication.
- the above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Messaging Service (SMS), and the like.
- GSM Global System of Mobile communication
- GPRS General
- the memory 720 can be used to store software programs and modules, and the processor 780 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 720.
- the memory 720 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as an application of a sound playing function, an application of an image playing function, etc.);
- the data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone.
- memory 720 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
- the input unit 730 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset 700.
- the input unit 730 may include a touch panel 731 and other input devices 732.
- the touch panel 731 also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 731 or near the touch panel 731. Operation) and drive the corresponding connection device according to a preset program.
- the touch panel 731 can include two portions of a touch detection device and a touch controller.
- the touch detection device detects the touch orientation of the user, and detects a 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 the touch information into contact coordinates, and sends the touch information.
- the processor 780 is provided and can receive commands from the processor 780 and execute them.
- the touch panel 731 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
- the input unit 730 may also include other input devices 732.
- other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.).
- the display unit 740 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
- the display unit 740 can include a display panel 741.
- the display panel 741 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
- the touch panel 731 can cover the display panel 741. When the touch panel 731 detects a touch operation on or near it, the touch panel 731 transmits to the processor 780 to determine the type of the touch event, and then the processor 780 is The type of touch event provides a corresponding visual output on display panel 741.
- touch panel 731 and the display panel 741 are used as two independent components to implement the input and input functions of the mobile phone in FIG. 7, in some embodiments, the touch panel 731 can be integrated with the display panel 741. Realize the input and output functions of the phone.
- the handset 700 can also include at least one type of sensor 750, such as a light sensor, motion sensor, and other sensors.
- 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 741 according to the brightness of the ambient light, and the proximity sensor may close the display panel 741 and/or when the mobile phone moves to the ear. Or backlight.
- the motion sensor may include an acceleration sensor, and the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
- the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
- Audio circuitry 760, speaker 761, and microphone 762 can provide an audio interface between the user and the handset.
- the audio circuit 760 can transmit the converted electrical data of the received audio data to the speaker 761 for conversion to the sound signal output by the speaker 761; on the other hand, the microphone 762 converts the collected sound signal into an electrical signal by the audio circuit 760. After receiving, it is converted into audio data, and then processed by the audio data output processor 780, transmitted to another mobile phone via the RF circuit 710, or outputted to the memory 720 for subsequent processing.
- WiFi is a short-range wireless transmission technology
- the mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 770, which provides users with wireless broadband Internet access.
- FIG. 7 shows the WiFi module 770, it can be understood that it does not belong to the essential configuration of the mobile phone 700 and can be omitted as needed.
- the processor 780 is the control center of the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 720, and invoking data stored in the memory 720, The phone's various functions and processing data, so that the overall monitoring of the phone.
- processor 780 can include one or more processing units.
- the processor 780 can integrate an application processor and a modem, wherein the application processor primarily processes an operating system, a user interface, an application, etc.; the modem primarily processes wireless communications. It will be appreciated that the above described modem may also not be integrated into the processor 780.
- the processor 780 can integrate an application processor and a baseband processor, and the baseband processor and other peripheral chips can form a modem.
- the handset 700 also includes a power source 790 (such as a battery) that supplies power to the various components.
- the power source can be logically coupled to the processor 780 via a power management system to manage functions such as charging, discharging, and power management through the power management system.
- the handset 700 can also include a camera, a Bluetooth module, and the like.
- the processor included in the mobile phone implements the process processing method described above when executing a computer program stored in the memory.
- Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory can include random access memory (RAM), which acts as an external cache.
- RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronization.
- SRAM static RAM
- DRAM dynamic RAM
- SDRAM synchronous DRAM
- DDR SDRAM dual data rate SDRAM
- ESDRAM enhanced SDRAM
- SLDRAM Link (Synchlink) DRAM
- SLDRAM Memory Bus
- Rambus Direct RAM
- RDRAM Direct Memory Bus Dynamic RAM
- RDRAM Memory Bus Dynamic RAM
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
L'invention se rapporte à un procédé de gestion de processus, comprenant les étapes consistant : à acquérir des informations de processus d'un processus démon s'exécutant en arrière-plan ; à détecter si les informations de processus incluent un mot-clé prédéfini ; et, lorsque le mot-clé est inclus, à effectuer une restriction de ressources sur le processus démon.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711484424.XA CN109992394B (zh) | 2017-12-29 | 2017-12-29 | 进程处理方法和装置、电子设备、计算机可读存储介质 |
| CN201711484424.X | 2017-12-29 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019128545A1 true WO2019128545A1 (fr) | 2019-07-04 |
Family
ID=67063020
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/116526 Ceased WO2019128545A1 (fr) | 2017-12-29 | 2018-11-20 | Procédé de gestion de processus, dispositif électronique et support d'informations lisible par ordinateur |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109992394B (fr) |
| WO (1) | WO2019128545A1 (fr) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115016631B (zh) * | 2021-11-22 | 2023-07-18 | 荣耀终端有限公司 | 进程调度方法和终端设备 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101777107A (zh) * | 2009-01-14 | 2010-07-14 | 深圳市维信联合科技有限公司 | 一种文件保护方法、保护模块及计算机 |
| CN103117895A (zh) * | 2013-01-25 | 2013-05-22 | 哈尔滨工业大学 | 一种lxi仪器的服务监听方法 |
| CN104991803A (zh) * | 2015-07-10 | 2015-10-21 | 上海斐讯数据通信技术有限公司 | 对android应用程序在特定条件下自启动的管控系统及方法 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102331950B (zh) * | 2011-09-15 | 2017-02-22 | 北京安天电子设备有限公司 | 基于Linux操作系统定时任务的守护进程实现方法和系统 |
| CN103020181A (zh) * | 2012-11-29 | 2013-04-03 | 乐视致新电子科技(天津)有限公司 | 一种信息加载和播放的方法及系统 |
| CN106897612A (zh) * | 2015-12-18 | 2017-06-27 | 北京奇虎科技有限公司 | 一种拦截捆绑软件的方法及装置 |
| CN105975320B (zh) * | 2016-05-26 | 2020-03-17 | 宇龙计算机通信科技(深圳)有限公司 | 一种第三方应用禁止安装的方法、装置以及终端 |
-
2017
- 2017-12-29 CN CN201711484424.XA patent/CN109992394B/zh active Active
-
2018
- 2018-11-20 WO PCT/CN2018/116526 patent/WO2019128545A1/fr not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101777107A (zh) * | 2009-01-14 | 2010-07-14 | 深圳市维信联合科技有限公司 | 一种文件保护方法、保护模块及计算机 |
| CN103117895A (zh) * | 2013-01-25 | 2013-05-22 | 哈尔滨工业大学 | 一种lxi仪器的服务监听方法 |
| CN104991803A (zh) * | 2015-07-10 | 2015-10-21 | 上海斐讯数据通信技术有限公司 | 对android应用程序在特定条件下自启动的管控系统及方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109992394A (zh) | 2019-07-09 |
| CN109992394B (zh) | 2021-08-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10187872B2 (en) | Electronic device and method of providing notification by electronic device | |
| KR102148948B1 (ko) | 전자 장치의 멀티 태스킹 방법 및 그 전자 장치 | |
| WO2022262530A1 (fr) | Procédé de gestion de mémoire et dispositif électronique | |
| CN106874168A (zh) | 确定应用程序运行性能的方法、装置和移动终端 | |
| WO2019128540A1 (fr) | Procédé de gestion de ressources, terminal mobile et support d'informations lisible par ordinateur | |
| WO2019128546A1 (fr) | Procédé de traitement de programme d'application, dispositif électronique et support de stockage lisible par ordinateur | |
| CN110032321B (zh) | 应用程序处理方法和装置、电子设备、计算机可读存储介质 | |
| WO2019128549A1 (fr) | Procédé et appareil permettant de geler une application, et terminal et support de stockage lisible par ordinateur | |
| WO2019137252A1 (fr) | Procédé de traitement de mémoire, dispositif électronique et support de stockage lisible par ordinateur | |
| WO2019137258A1 (fr) | Procédé de traitement de mémoire, dispositif électronique et support de stockage lisible par ordinateur | |
| CN109992965B (zh) | 进程处理方法和装置、电子设备、计算机可读存储介质 | |
| WO2019128588A1 (fr) | Procédé et appareil de traitement de processus, dispositif électronique et support d'informations lisible par ordinateur | |
| WO2019128537A1 (fr) | Procédé de gel d'application, dispositif informatique, et support de stockage lisible par ordinateur | |
| CN109992399B (zh) | 资源管理方法、装置、移动终端及计算机可读存储介质 | |
| US20200301731A1 (en) | Information Processing Method and Device, Computer Device and Computer Readable Storage Medium | |
| CN109992376B (zh) | 应用冻结方法、装置、终端及计算机可读存储介质 | |
| WO2019128542A1 (fr) | Procédé de traitement d'application, dispositif électronique et support d'informations lisible par ordinateur | |
| WO2019184631A1 (fr) | Procédé et appareil de traitement d'informations, support d'informations lisible par ordinateur et terminal | |
| WO2019128573A1 (fr) | Procédé de traitement d'informations, appareil, dispositif informatique et support d'informations lisible par ordinateur | |
| WO2019128569A1 (fr) | Procédé et appareil pour geler une application et support de stockage et terminal | |
| WO2019128586A1 (fr) | Procédé de traitement d'applications, dispositif électronique et support de stockage lisible par ordinateur | |
| WO2019084783A1 (fr) | Appareil et procédé de planification de services, dispositif informatique et support de stockage lisible par ordinateur | |
| WO2019128553A1 (fr) | Procédé de traitement d'application, dispositif électronique et support de stockage lisible par ordinateur | |
| WO2019128570A1 (fr) | Appareil et procédé de gel d'une application et support de stockage et terminal | |
| CN109992362A (zh) | 应用程序处理方法和装置、电子设备、计算机可读存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18893466 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18893466 Country of ref document: EP Kind code of ref document: A1 |