CN110032267B - Information processing method and device, mobile terminal and computer readable storage medium - Google Patents

Information processing method and device, mobile terminal and computer readable storage medium Download PDF

Info

Publication number
CN110032267B
CN110032267B CN201810023233.1A CN201810023233A CN110032267B CN 110032267 B CN110032267 B CN 110032267B CN 201810023233 A CN201810023233 A CN 201810023233A CN 110032267 B CN110032267 B CN 110032267B
Authority
CN
China
Prior art keywords
background process
foreground application
foreground
resource
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810023233.1A
Other languages
Chinese (zh)
Other versions
CN110032267A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810023233.1A priority Critical patent/CN110032267B/en
Priority to PCT/CN2018/122048 priority patent/WO2019137170A1/en
Publication of CN110032267A publication Critical patent/CN110032267A/en
Application granted granted Critical
Publication of CN110032267B publication Critical patent/CN110032267B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3287Power saving characterised by the action undertaken by switching off individual functional units in the computer system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Telephone Function (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application relates to an information processing method, an information processing device, a mobile terminal and a computer readable storage medium. The method comprises the following steps: when the foreground application is monitored to be started, recording the running time of the foreground application in a foreground after being started; if the running time reaches a preset time threshold, acquiring a background process having an association relation with the foreground application; determining the state of a background process having an association relation with the foreground application; and if the state of the background process is the frozen state, unfreezing the background process. The information processing method, the information processing device, the mobile terminal and the computer readable storage medium can unfreeze the background process which has an association relation with the foreground application, and accelerate the response speed of the system.

Description

Information processing method and device, mobile terminal and computer readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an information processing method and apparatus, a mobile terminal, and a computer-readable storage medium.
Background
With the rapid development of the internet, the smart mobile terminal has become the most common electronic device for many users, such as a smart phone, a tablet phone, and the like. A user can install various applications on the intelligent mobile terminal for use, and when the applications run in the background, the applications and the applications running in the foreground can preempt system resources such as a Central Processing Unit (CPU), a memory, a bandwidth and the like, so that problems of unsmooth application running in the foreground, slow system running, heat generation of the mobile terminal and the like occur.
In a traditional mode, the intelligent mobile terminal can freeze background applications occupying foreground application resources, and after the applications running in the background are frozen, the frozen background applications do not use system resources any more, so that the effects of reducing power consumption and improving the running smoothness of the foreground applications can be achieved.
Disclosure of Invention
The embodiment of the application provides an information processing method, an information processing device, a mobile terminal and a computer readable storage medium, which can unfreeze a background process having an association relation with a foreground application and accelerate the response speed of a system.
An information processing method comprising:
when the foreground application is monitored to be started, recording the running time of the foreground application in a foreground after being started;
if the running time reaches a preset time threshold, acquiring a background process having an association relation with the foreground application;
determining the state of a background process having an association relation with the foreground application;
and if the state of the background process is the frozen state, unfreezing the background process.
An information processing apparatus comprising:
the time recording module is used for recording the running time of the foreground application in the foreground after the foreground application is started when the foreground application is monitored to be started;
the process acquisition module is used for acquiring a background process which has an association relation with the foreground application if the running time reaches a preset time threshold;
the state determining module is used for determining the state of a background process which has an incidence relation with a foreground application;
and the unfreezing module is used for unfreezing the background process if the state of the background process is a frozen state.
A mobile terminal comprising a memory and a processor, the memory having stored therein a computer program which, when executed by the processor, causes the processor to carry out the method as described above.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method as set forth above.
According to the information processing method, the information processing device, the mobile terminal and the computer readable storage medium, when the foreground application is monitored to be started, the running time of the foreground application in the foreground after being started is recorded, if the running time reaches a preset time threshold, the background process in the association relation with the foreground application is obtained, the frozen background process in the association relation is unfrozen, the background process in the association relation with the foreground application can be unfrozen, the waiting time of the foreground application needing to use the background process in the association relation to unfreeze in the running process is shortened, and the response speed of a system is accelerated.
Drawings
FIG. 1 is a block diagram of a mobile terminal in one embodiment;
FIG. 2 is a system architecture diagram of an information processing method in one embodiment;
FIG. 3 is a flow chart illustrating a method of processing information in one embodiment;
FIG. 4 is a flow diagram that illustrates the determination of a resource restriction level for a background process associated with a foreground application, according to an embodiment;
FIG. 5 is a diagram of resource groups in one embodiment;
FIG. 6 is a flowchart illustrating a process of determining a resource restriction level of a background process associated with a foreground application according to another embodiment;
FIG. 7 is a flow diagram that illustrates terminating a process in a frozen state, under an embodiment;
FIG. 8 is a block diagram of an information processing apparatus according to an embodiment;
FIG. 9 is a block diagram of an information processing apparatus in another embodiment;
fig. 10 is a block diagram of a mobile terminal in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, a first client may be referred to as a second client, and similarly, a second client may be referred to as a first client, without departing from the scope of the present application. Both the first client and the second client are clients, but they are not the same client.
Fig. 1 is a block diagram of a mobile terminal in one embodiment. As shown in fig. 1, the mobile terminal includes a processor, a memory, a display screen, and an input device connected through a system bus. The memory may include, among other things, a non-volatile storage medium and a processor. The non-volatile storage medium of the mobile terminal stores an operating system and a computer program, and the computer program is executed by a processor to implement an information processing method provided in the embodiment of the present application. The processor is used to provide computing and control capabilities to support the operation of the entire mobile terminal. The internal memory in the mobile terminal provides an environment for the execution of the computer program in the non-volatile storage medium. The display screen of the mobile terminal can be a liquid crystal display screen or an electronic ink display screen, and the input device can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the mobile terminal, or an external keyboard, a touch pad or a mouse. The mobile terminal can be a mobile phone, a tablet computer, a personal digital assistant or a wearable device. Those skilled in the art will appreciate that the architecture shown in fig. 1 is only a block diagram of a portion of the architecture associated with the subject application and does not constitute a limitation on the mobile terminal to which the subject application applies, and that a particular mobile terminal may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Fig. 2 is a system architecture diagram of an information processing method in one embodiment. As shown in fig. 2, the system architecture includes a JAVA space layer 210, a local framework layer 220, and a Kernel space layer 230. The JAVA space layer 210 may include a freezing management module 212, and the mobile terminal may implement a freezing policy for each running application through the freezing management module 212, and perform a freezing operation on a related application that consumes more power in the background or occupies a large amount of system resources. A resource priority and restriction manager 222 and a platform freeze manager 224 are contained in the local framework layer 220. The mobile terminal can maintain different applications in different resource use priorities and different resource groups in real time through the resource priority and restriction manager 222, and adjust the resource groups of the application program according to the requirements of the upper layer, thereby achieving the effects of optimizing performance and saving power consumption. The mobile terminal can allocate the applications that can be frozen in the background to the freezing layers of different preset layers according to the length of the freezing time through the platform freezing manager 224. Alternatively, the frozen layer may comprise three, respectively: CPU limited sleep mode, CPU frozen sleep mode, process deep frozen mode. The CPU sleep-restricted mode is to restrict CPU resources occupied by related processes, so that the related processes occupy less CPU resources, and the vacant CPU resources are inclined to other processes which are not frozen, so that the occupation of the CPU resources is restricted, and the occupation of network resources and I/O interface resources by the processes is correspondingly restricted; the CPU freezing sleep mode means that related processes are forbidden to use the CPU, the occupation of a memory is reserved, and when CPU resources are forbidden to use, corresponding network resources and I/O interface resources are also forbidden to use; the process deep freezing mode is to further recycle the memory resources occupied by the relevant processes except for forbidding the use of CPU resources, and the recycled memory can be used by other processes. Optionally, the local framework layer 220 may further include an interface module that contains a binder interface that is opened to an upper layer, and a framework or application of the upper layer sends instructions for resource restriction or freezing to the resource priority and restriction manager 222 and the platform freeze manager 224 through the provided binder interface.
The kernel space layer 230 may include a UID management module 231, a Cgroup module 233, a Binder management module 235, a process memory recycling module 237, and a freeze timeout exit module 239. The UID management module 231 is configured to manage or freeze resources of the third-party application based on a User Identifier (UID) of the application. Compared with the Process control based on the Process Identifier (PID), the unified management of the resources of the application of one user is facilitated through the UID. The Cgroup module 233 is used to provide a complete set of CPU, CPUSET, memory, input/output (I/O) and Net related resource restriction mechanisms. The Binder management and control module 235 is used for controlling the priority of background Binder communication. The process memory recycling module 237 is used to implement a deep process freezing mode, so that when a third-party application is in a frozen state for a long time, a file area of a process is mainly released, thereby achieving a memory-saving module and increasing the speed of the application when the application is started next time. The freeze timeout exit module 239 may be used to resolve exceptions resulting from the occurrence of the freeze timeout scenario. Through the system architecture, the information processing method in each embodiment of the application can be realized.
As shown in fig. 3, in one embodiment, there is provided an information processing method including the steps of:
and step 310, recording the running time of the foreground application in the foreground after the foreground application is started when the foreground application is monitored to be started.
One or more application programs can be simultaneously run on the mobile terminal, and the application programs can comprise foreground application running in the foreground and background application running in the background. The mobile terminal may monitor the running states of the applications, where the running states may include, but are not limited to, start, foreground running, background running, exit, and the like. When the mobile terminal monitors the foreground application to be started, the running time of the foreground application in the foreground after the foreground application is started can be recorded, wherein the monitoring of the foreground application to be started can mean monitoring that the application is started and enters the foreground to run.
Optionally, the mobile terminal may monitor the running applications through the activity manager, and obtain the running states of the running applications. In one embodiment, the mobile terminal may obtain a running application list at intervals through a RunningAppProcessInfo class of the activity manager, where the application list may record application identifications of respective applications currently running on the mobile terminal, where the application identifications may be composed of one or more of numbers, letters, symbols, and the like. The mobile terminal can compare the application identifier in the application list acquired this time with the application identifier in the application list acquired last time. And if the application identifier of the application only exists in the application list acquired this time and does not exist in the application list acquired last time, determining that the application is a newly started application. The mobile terminal can obtain the newly started application, judge whether the newly started application is operated in the foreground or the background, and determine that the application is the started foreground application if the newly started application is operated in the foreground.
In step 320, if the running time reaches a preset time threshold, a background process having an association relationship with the foreground application is obtained.
A Process (Process) is a running activity of a program in a computer on a data set, is a basic unit of resource allocation and scheduling of a system, and is the basis of an operating system structure. A mobile terminal may typically have multiple processes running thereon, with different processes being available to perform different tasks, respectively. When the mobile terminal monitors the foreground application to be started, the time of the foreground application running in the foreground after being started can be recorded. If the time of the foreground application running in the foreground after being started reaches a preset time threshold, the mobile terminal can acquire the background process which runs in the background and has an association relation with the foreground application. Optionally, the mobile terminal may obtain each current process running in the background through the activity manager, and query, according to the application identifier of the foreground application, a background process having an association relationship with the foreground application in each current process running in the background. The mobile terminal can pre-store the association relationship between the application and the process, and when the starting of the foreground application is monitored and the running time of the foreground application after the starting reaches a preset time threshold, the mobile terminal can acquire the background process having the association relationship with the foreground application according to the application identifier of the foreground application.
Alternatively, the background process having an association relationship with the foreground application may be a background process having a communication mechanism with the foreground application, a background process having a call relationship with the foreground application, or a background process belonging to the same publisher as the foreground application, but is not limited thereto. Communication mechanisms refer to the propagation or exchange of information between different processes and/or applications. Optionally, the communication mechanism may include a socket, a binder, a shared memory, and the like, where two programs on the network implement data exchange through a bidirectional communication connection, and one end of the connection is referred to as a socket; the binder is an interprocess communication mechanism and provides a remote procedure call function; shared memory is a very efficient way to allow two unrelated processes to access the same logical memory, and shared memory is a very efficient way to share and transfer data between two running processes, and memory shared between different processes is usually arranged as the same physical memory. The calling relationship refers to that the foreground application can call the background process to execute a corresponding task, for example, call login information stored in the background process to perform a login operation, where the login information refers to information such as account information and passwords that can be used for login, or call the background process to perform positioning, but is not limited thereto. Background processes belonging to the same family of publishers as the foreground application may carry the same publication tags as the foreground application, which may be used to identify the publisher that published the application.
Step 330, determining the state of the background process having an association relation with the foreground application.
The mobile terminal may obtain states of the generated background processes having an association relationship with the foreground application, and optionally, the states of the background processes may include, but are not limited to, a frozen state, a thawed state, and the like. The frozen state refers to a state that the background process cannot use resources such as CPU, O and network and the like and cannot continue to run, but the background process still occupies memory resources, hard disk resources and the like; the unfreezing state refers to a state that the background process can use system resources such as a CPU, an I/O, a memory, a network and the like and can run and execute tasks.
In one embodiment, the mobile terminal may obtain a background process in a frozen state associated with a foreground application. Optionally, the mobile terminal may obtain a status tag of each background process having an association relationship with the foreground application, and different statuses may be represented by different status tags, for example, a status tag corresponding to a frozen status is 0, a status tag corresponding to a thawed status is 1, and the like, but the invention is not limited thereto. The mobile terminal can acquire the background processes in the frozen state according to the state labels of the background processes which have the association relationship with the foreground application.
Optionally, the mobile terminal may also send a communication signal to each background process having an association relationship with the foreground application, and detect whether a response signal is received within a predetermined time period. And if the response signal returned by the process is not received within the preset time period, determining that the state of the background process which does not send the response signal is a frozen state. It can be understood that other manners may also be used to obtain the frozen background process associated with the foreground application, and the manners are not limited to the above manners.
And 340, if the state of the background process is the frozen state, unfreezing the background process.
After the mobile terminal acquires the frozen background process which has an association relation with the foreground application, the frozen background process can be unfrozen. The mobile terminal can send unfreezing information to the background process in the frozen state which has an association relation with the foreground application, the background process enters the unfreezing state through the unfreezing signal, system resources such as a CPU, an I/O, a memory and a network can be used, and the mobile terminal can normally run and execute tasks. When the foreground application needs to use the background process with the association relation in the running process, the background process does not need to be unfrozen again, and the response rate can be improved. In addition, only the background process which has an association relation with the foreground application is unfrozen, and the whole application to which the background process belongs is not unfrozen, so that the system consumption can be reduced.
Optionally, the mobile terminal may obtain a background process having a communication mechanism with the foreground application, and determine a state of the background process having the communication mechanism with the foreground application. The mobile terminal can unfreeze the frozen background process with the communication mechanism of the foreground application, and the unfrozen background process can normally communicate with the foreground application. The normal communication between foreground application and background process can be ensured, and the response rate of the system is improved.
In this embodiment, when it is monitored that the foreground application is started, the running time of the foreground application in the foreground after being started is recorded, if the running time reaches a preset time threshold, the background process having an association relationship with the foreground application is obtained, the frozen background process having the association relationship is thawed, the background process having the association relationship with the foreground application can be thawed, the waiting time for the foreground application to use the background process having the association relationship to thaw during running is reduced, and the system response rate is accelerated.
As shown in fig. 4, in one embodiment, after the step of unfreezing the background process, the method further includes the following steps:
step 402, obtaining the running characteristics of the background process having the association relation with the foreground application.
After thawing the frozen background processes having the association relationship with the foreground application, the mobile terminal may obtain the running characteristics of each background process having the association relationship with the foreground application, where the running characteristics may include, but are not limited to, a task currently executed by the background process, a communication event with other processes and/or applications, a currently occupied resource type and proportion, and the like.
And step 404, determining the resource limitation level of the background process with the incidence relation according to the running characteristics.
The mobile terminal can analyze the running characteristics of each background process having an association relation with the foreground application and determine the resource restriction level of the corresponding background process according to the running characteristics. Alternatively, the mobile terminal may set different resource restriction levels according to actual requirements, the resource restriction level may be used to indicate a degree to which the used resource is restricted, and the higher the resource restriction level is, the greater the degree of restriction may be. The restricted resources may include, but are not limited to, CPU resources, memory resources, I/O resources, network resources, and the like. Different resource restriction levels can correspond to different resource use priorities, the higher the resource restriction level is, the smaller the corresponding resource use priority can be, and the lower the resource restriction level is, the larger the corresponding resource use priority can be.
In one embodiment, the resource restriction level set by the mobile terminal may include an unlimited level, a normal restriction level, a deep restriction level, a freeze level, and the like. An unlimited level may refer to a process that uses unlimited resources. A common level of restriction may refer to, but is not limited to, a process that may use less resources, such as only 50% of the resources at the most, etc. The deep restriction level may refer to, but is not limited to, a process that may use very few resources, such as only 20% of the resources at the most, etc. The freeze level refers to all actions that a process cannot use any resources, stopping the process. For example, the foreground application may correspond to an unlimited level, and resources used by the foreground application are not limited; if the background process having the association relation with the foreground application does not communicate with the foreground application, the depth limit level may be corresponded, and few resources may be used, but the present invention is not limited thereto.
And 406, distributing the background process with the association relationship to a resource group corresponding to the resource restriction level, and configuring the resource use priority corresponding to the resource restriction level.
After determining the resource restriction level of each background process having an association relationship with the foreground application, the mobile terminal may allocate each background process having an association relationship with the foreground application to a resource group corresponding to the determined resource restriction level, and configure a resource usage priority corresponding to the resource restriction level. Optionally, the mobile terminal may divide different resource groups based on a kernel Cgroup (control group) mechanism, and may set resource usage priority of each resource group in a file node write configuration manner, and manage time or proportion of resource usage of processes allocated to each resource group, where the Cgroup is a mechanism provided in the kernel and capable of limiting, recording, and isolating physical resources (e.g., resources such as CPU, memory, I/O, and the like) used by the processes. The mobile terminal can load a Cgroup configuration file, and the configuration file can record the divided resource groups, the resource use priority of each resource group and the resource scheduling strategy corresponding to the resource use priority. The resource scheduling policy may include, but is not limited to, a time that the processes allocated to the resource group use the resource, a proportion of occupied resource, a resource identifier used, and the like, for example, the processes of the resource group corresponding to the configurable general limit level may use 30 seconds of CPU resource within 1 minute, and the processes of the resource group corresponding to the general limit level may only use the CPU resource numbered X, and the like. When a new resource group needs to be added or the resource use priority and the resource scheduling policy of the resource group need to be modified, the configuration file of the Cgroup can be modified.
The mobile terminal allocates each background process associated with the foreground application to a resource group corresponding to the resource restriction level, and after the resource usage priority corresponding to the resource restriction level is configured, the background process associated with the foreground application can use resources such as a CPU, a memory, I/O (input/output), a network and the like according to a resource scheduling strategy corresponding to the resource group. In one embodiment, the mobile terminal may obtain, at regular intervals, the running characteristics of each background process having an association relationship with the foreground application, and determine the resource restriction level of the background process having the association relationship according to the running characteristics. The resource restriction level of the background process having an association relationship with the foreground application may change with the change of the running characteristic. For example, after the background process finishes communication with the foreground application, the resource restriction level of the background process may be increased, but is not limited thereto.
FIG. 5 is a diagram of resource groups in one embodiment. As shown in fig. 5, four different resource restriction levels may be set in the mobile terminal, and four resource groups are divided, where a first resource group corresponds to an unrestricted level, a second resource group corresponds to a general restriction level, a third resource group corresponds to a deep restriction level, and a fourth resource group corresponds to a freeze level. The four resource groups may respectively correspond to different resource usage priorities, the resource usage priority of the first resource group may be higher than that of the second resource group, the resource usage priority of the second resource group may be higher than that of the third resource group, and the resource usage priority of the third resource group may be higher than that of the fourth resource group. The first resource group at the unrestricted level does not restrict resources such as a CPU, a memory, an I/O, a network and the like used by the process. The second resource group restriction process at the normal restriction level may use less resources such as CPU, memory, I/O, and network. The third resource group at the deep restriction level restricts the processes from using very few resources such as CPU, memory, I/O, and network. The fourth resource group at the freeze level restricts the processes from using resources such as CPU, memory, I/O, and network. The mobile terminal determines the resource restriction level according to the running characteristics of each background process having an association relation with the foreground application, adds each background process having an association relation with the foreground application into a corresponding resource group, configures the resource use priority corresponding to the resource group, and manages the resources used by each background process having an association relation with the foreground application.
In this embodiment, the resource restriction level may be determined according to the running characteristic of the background process having an association relationship with the foreground application, resource restriction of different levels is dynamically implemented on the background process having an association relationship with the foreground application, and the background process having an association relationship with the foreground application is defrosted, so that the system response rate is improved, and at the same time, the resource of the foreground application is reduced from being occupied by the background process having an association relationship, the system performance is optimized, and the power consumption is saved.
As shown in fig. 6, in an embodiment, the information processing method further includes the following steps:
step 602, collecting the running characteristics of the background process having an association relation with the foreground application through the kernel space, and packaging the running characteristics into a data packet to be transmitted to the user space.
The virtual space of the mobile terminal may include a kernel space and a user space, where the kernel space may be used to store codes and data of the kernel, and the user space may be used to store codes and data of the application program. The kernel space has a higher privilege level, the process running in the kernel space can have the authority to access all hardware of the mobile terminal, the authority of the user space is lower, and the process running in the user space can only use partial resources of the system.
The mobile terminal can acquire event data of each background process having an association relation with the foreground application through the kernel space, wherein the event data can include but is not limited to an event type, an event time, an event content, a process identifier to which the event belongs, and the like. Event types may include, but are not limited to, communication events, creation events, exit events, change identification events, task events, and the like. The communication event can refer to the communication event of the process and other applications and/or processes, and can comprise a binder communication event, a socket communication event and the like. A create event may refer to an event that a process or the like is created. An exit event refers to an event in which a process exits. A change identification event may refer to a process changing its identification, etc. A task event may refer to a task performed by a process, etc.
The mobile terminal collects event data of each background process which has an incidence relation with the foreground application through the kernel space, can extract running characteristics of each background process which has an incidence relation with the foreground application from the event data, and can package the running characteristics into data packets according to an agreed packet format to transmit the data packets to the user space. Optionally, the kernel space and the user space may communicate in an asynchronous netlink manner, where a netlink is a special inter-process communication that may enable a user process to communicate with a kernel process. The kernel space transmits the running characteristics of each process contained in the call list to the user space in an asynchronous communication mode, and compared with a mode of actively inquiring the user space, the method is faster and more convenient, and the transmission efficiency of the running characteristics can be improved.
And step 604, analyzing the data packet through the user space to obtain the running characteristics of the background process.
And 606, analyzing the running characteristics through the user space, and determining the resource limitation level of the background process with the incidence relation.
After receiving the data packet transmitted by the kernel space, the user space can analyze the data packet to obtain the running characteristics of each background process having an association relation with the foreground application. The mobile terminal can analyze the running characteristics of each background process having an association relation with the foreground application through the user space, and determine the resource limitation level of each process.
In one embodiment, the mobile terminal analyzes the running characteristics of each background process having an association relationship with the foreground application through a user space, and if the background process having the association relationship does not communicate with the foreground application, the resource limitation level of the background process not communicating with the foreground application can be determined to be the depth limitation level. The mobile terminal can add the background process which is not communicated with the foreground application and has the incidence relation to the resource group corresponding to the depth limit level, configure the resource use priority corresponding to the depth limit level, and the background process which is not communicated with the foreground application and has the incidence relation can use few resources in the mobile terminal. When the mobile terminal detects that the background process with the association relation is communicated with the foreground application through the user space, the resource limitation level of the background process for communication can be reduced. For example, the mobile terminal may determine that the resource restriction level of the background process having an association relationship communicating with the foreground application is a normal restriction level, add the background process having an association relationship communicating with the foreground application to a resource group corresponding to the normal restriction level, and configure a resource usage priority corresponding to the normal restriction level. When the mobile terminal detects that the background process with the incidence relation finishes the communication with the foreground application through the user space, the resource limit level of the background process finishing the communication can be improved. For example, the mobile terminal may determine that the resource restriction level of the background process having an association relationship with which the foreground application ends communication is a deep restriction level or the like.
In this embodiment, the running characteristics of the background process having an association relationship with the foreground application can be collected through the kernel space, and the collected running characteristics are transmitted to the user space for analysis, so that more clue bases for determining the resource restriction level can be provided, the resource restriction level of the background process having an association relationship with the foreground application can be adjusted more accurately, and the resource management effect and the system performance can be improved.
In one embodiment, the information processing method further includes: and when a preset condition is met, re-freezing the unfrozen background process, wherein the preset condition comprises one or more of the condition that the unfrozen background process is not communicated with the foreground application within a preset first time period, the unfrozen background process enters an unfreezing state exceeding a preset second time period, and the foreground application is finished in the running state of the foreground.
After the mobile terminal unfreezes each background process which has an association relation with the foreground application, the unfrozen background process can use resources such as a CPU (central processing unit), a memory, an I/O (input/output) and a network of the mobile terminal, and can normally run and execute tasks and the like. And when the preset condition is met, the mobile terminal can freeze the unfrozen background process which has the association relation with the foreground application again. Optionally, the preset conditions may include one or more of that the unfrozen background process does not communicate with the foreground application within a preset first time period, that the unfrozen background process enters the unfreezing state for more than a preset second time period, and that the foreground application ends in the running state of the foreground application. The first time period and the second time period may be set according to actual requirements, for example, the first time period is 10 minutes, the second time period is 30 minutes, and the like, but not limited thereto. The running state of the foreground application ending in the foreground can be that the foreground application is switched from the foreground to the background to run, or that the foreground application quits running and the like. It is understood that the preset condition may be other conditions, and is not limited to the above. Optionally, the mobile terminal may add the unfrozen background process having an association relationship with the foreground application to the resource group corresponding to the freezing level, configure the resource usage priority corresponding to the resource group, and re-freeze the background process.
In this embodiment, when the preset condition is satisfied, the unfrozen background process having an association relationship with the foreground application can be frozen again, so that the situation that the process is not frozen for a long time after being awakened can be prevented, and the power consumption of the system is reduced.
As shown in fig. 7, in an embodiment, the information processing method further includes the following steps:
step 702, a termination signal is sent over the user space.
When the mobile terminal needs to terminate a running process, a termination signal can be sent through the user space, and the termination signal can be used for terminating the running of the process, so that the process exits from running and occupied system resources such as a CPU (central processing unit), a memory and the like are released.
Step 704, intercepting the termination signal, and if the target process of the termination signal is in the frozen state, unfreezing the target process and each thread included in the target process.
The mobile terminal can intercept a termination signal sent by a user space and judge whether a target process of the termination signal is in a frozen state. If the target process is not in the frozen state, the mobile terminal can directly send a termination signal to the target process, and the target process can respond to the termination signal to terminate the running of the target process. If the target state is in the frozen state, the process in the frozen state cannot normally receive the signal sent by other processes, so that the normal response to the termination signal is not performed. In the conventional method, two different sets of codes are usually written for terminating the frozen state process and the non-frozen state process, respectively, which causes a great obstacle to the development and maintenance of the system. After intercepting the termination signal, the mobile terminal may send a thawing signal to the target process if the target process of the termination signal is in a frozen state, and thaw the target process and each thread included in the target process. A thread, which may also be referred to as a lightweight process (LWP), is the smallest unit of a program execution stream, and a thread is an entity in a process and is the basic unit that is independently scheduled and dispatched by a system. The target process and all threads contained in the target process are unfrozen, so that the zombie process can be prevented from occurring, and waste of system resources is caused, wherein the zombie process means that although the process is already exited, some information of exiting states is reserved in a system process table and occupies a process table item.
Step 706, set the target process to be in the non-freeable state, and send a termination signal to the target process, where the termination signal is used to terminate the target process.
After the target process and each thread contained in the target process are unfrozen by the mobile terminal, the target process can be set to be in an unfreezable state, and the unfreezing state means that the target process cannot be frozen again. The mobile terminal can send the termination signal to the target process, and because the target process is in the non-freezing state at this time, the mobile terminal can normally respond to the termination signal to terminate the operation of the target process, so that the target process quits the operation and releases occupied system resources such as a CPU (central processing unit), a memory and the like.
In this embodiment, the process in the frozen state can be safely terminated without the occurrence of a zombie process. In addition, the user space can send a uniform termination signal for the process termination in the frozen state and the non-frozen state, two sets of different codes do not need to be written, and the system development and maintenance cost can be reduced.
In one embodiment, there is provided an information processing method including the steps of:
and (1) recording the running time of the foreground application in the foreground after the foreground application is started when the foreground application is monitored to be started.
And (2) if the running time reaches a preset time threshold, acquiring a background process having an association relation with the foreground application.
Optionally, step (2), comprising: and acquiring a background process with a communication mechanism with a foreground application.
And (3) determining the state of the background process having the association relation with the foreground application.
And (4) unfreezing the background process if the state of the background process is the frozen state.
Optionally, after the step (4), further comprising: acquiring running characteristics of a background process having an association relation with a foreground application; determining the resource restriction level of the background process with the incidence relation according to the running characteristics; and distributing the background process with the incidence relation to a resource group corresponding to the resource restriction level, and configuring the resource use priority corresponding to the resource restriction level.
Optionally, obtaining an operation feature of a background process having an association relationship with a foreground application includes: acquiring running characteristics of a background process having an association relation with foreground application through a kernel space, and packaging the running characteristics into a data packet to be transmitted to a user space; analyzing the data packet through a user space to obtain the running characteristics of the background process; determining the resource restriction level of the background process with the incidence relation according to the running characteristics, wherein the resource restriction level comprises the following steps: and analyzing the running characteristics through the user space, and determining the resource limitation level of the background process with the incidence relation.
Optionally, analyzing the running characteristics through a user space, and determining a resource restriction level of the background process having the association relationship, includes: when the background process with the incidence relation is communicated with the foreground application, the resource limitation level of the background process for communication is reduced; and when the background process with the incidence relation finishes the communication with the foreground application, improving the resource limitation level of the background process finishing the communication.
Optionally, after the step (4), further comprising: and when a preset condition is met, re-freezing the unfrozen background process, wherein the preset condition comprises one or more of the condition that the unfrozen background process is not communicated with the foreground application within a preset first time period, the unfrozen background process enters an unfreezing state exceeding a preset second time period, and the foreground application is finished in the running state of the foreground.
Optionally, the information processing method further includes: transmitting a termination signal through a user space; intercepting a termination signal, and unfreezing a target process and each thread contained in the target process if the target process of the termination signal is in a frozen state; and setting the target process to be in a non-freezing state, and sending a termination signal to the target process, wherein the termination signal is used for terminating the target process.
In this embodiment, when it is monitored that the foreground application is started, the running time of the foreground application in the foreground after being started is recorded, if the running time reaches a preset time threshold, the background process having an association relationship with the foreground application is obtained, the frozen background process having the association relationship is thawed, the background process having the association relationship with the foreground application can be thawed, the waiting time for the foreground application to use the background process having the association relationship to thaw during running is reduced, and the system response rate is accelerated.
It should be understood that the steps in the above-described flowchart illustrations are shown in order as indicated by the arrows, but the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in the flow diagrams described above may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
As shown in FIG. 8, in one embodiment, an information processing apparatus 800 is provided that includes a time recording module 810, a process acquisition module 820, a state determination module 830, and a unfreezing module 840.
And the time recording module 810 is configured to record the running time in the foreground after the foreground application is started when the foreground application is monitored to be started.
The process obtaining module 820 is configured to obtain a background process having an association relationship with the foreground application if the running time reaches a preset time threshold.
Optionally, the process obtaining module 820 is further configured to obtain a background process having a communication mechanism with the foreground application.
And a state determining module 830, configured to determine a state of the background process having an association relationship with the foreground application.
And the unfreezing module 840 is used for unfreezing the background process if the state of the background process is the frozen state.
In this embodiment, when it is monitored that the foreground application is started, the running time of the foreground application in the foreground after being started is recorded, if the running time reaches a preset time threshold, the background process having an association relationship with the foreground application is obtained, the frozen background process having the association relationship is thawed, the background process having the association relationship with the foreground application can be thawed, the waiting time for the foreground application to use the background process having the association relationship to thaw during running is reduced, and the system response rate is accelerated.
As shown in fig. 9, in one embodiment, the information processing apparatus 800 includes a feature acquisition module 850, a rank determination module 860, and a configuration module 870 in addition to the time recording module 810, the process acquisition module 820, the state determination module 830, and the unfreezing module 840.
The feature obtaining module 850 is configured to obtain an operation feature of the background process having an association relationship with the foreground application.
And the level determining module 860 is used for determining the resource limitation level of the background process with the association relation according to the running characteristics.
A configuration module 870, configured to allocate the background process having the association relationship to the resource group corresponding to the resource restriction level, and configure the resource usage priority corresponding to the resource restriction level.
In this embodiment, the resource restriction level may be determined according to the running characteristic of the background process having an association relationship with the foreground application, resource restriction of different levels is dynamically implemented on the background process having an association relationship with the foreground application, and the background process having an association relationship with the foreground application is defrosted, so that the system response rate is improved, and at the same time, the resource of the foreground application is reduced from being occupied by the background process having an association relationship, the system performance is optimized, and the power consumption is saved.
In one embodiment, the feature obtaining module 850 includes an acquisition unit and a parsing unit.
And the acquisition unit is used for acquiring the running characteristics of the background process which has an association relation with the foreground application through the kernel space, and packaging the running characteristics into a data packet to be transmitted to the user space.
And the analysis unit is used for analyzing the data packet through the user space to obtain the running characteristics of the background process.
The level determining module 860 is further configured to analyze the running characteristics through the user space, and determine a resource restriction level of the background process having the association relationship.
Optionally, the level determining module 860 is further configured to, when the background process having the association relation communicates with the foreground application, reduce the resource restriction level of the background process performing communication.
The level determining module 860 is further configured to, when the background process having the association relation ends communication with the foreground application, increase a resource restriction level of the background process that ends communication.
In this embodiment, the running characteristics of the background process having an association relationship with the foreground application can be collected through the kernel space, and the collected running characteristics are transmitted to the user space for analysis, so that more clue bases for determining the resource restriction level can be provided, the resource restriction level of the background process having an association relationship with the foreground application can be adjusted more accurately, and the resource management effect and the system performance can be improved.
In one embodiment, the information processing apparatus 800 includes a freezing module in addition to the time recording module 810, the process acquiring module 820, the state determining module 830, the unfreezing module 840, the feature acquiring module 850, the rank determining module 860, and the configuration module 870.
And the freezing module is used for freezing the unfrozen background process again when a preset condition is met, wherein the preset condition comprises one or more of the condition that the unfrozen background process is not communicated with the foreground application within a preset first time period, the unfrozen background process enters an unfreezing state exceeding a preset second time period, and the foreground application is finished in the running state of the foreground.
In this embodiment, when the preset condition is satisfied, the unfrozen background process having an association relationship with the foreground application can be frozen again, so that the situation that the process is not frozen for a long time after being awakened can be prevented, and the power consumption of the system is reduced.
In one embodiment, the information processing apparatus 800 includes a signal sending module and a terminating module in addition to the time recording module 810, the process acquiring module 820, the state determining module 830, the unfreezing module 840, the feature acquiring module 850, the grade determining module 860, the configuring module 870, and the freezing module.
And the signal sending module is used for sending a termination signal through the user space.
The unfreezing module 840 is further configured to intercept a termination signal, and unfreeze a target process and each thread included in the target process if the target process of the termination signal is in a frozen state.
And the termination module is used for setting the target process to be in the non-freezing state and sending a termination signal to the target process, wherein the termination signal is used for terminating the target process.
In this embodiment, the process in the frozen state can be safely terminated without the occurrence of a zombie process. In addition, the user space can send a uniform termination signal for the process termination in the frozen state and the non-frozen state, two sets of different codes do not need to be written, and the system development and maintenance cost can be reduced.
The embodiment of the application also provides the mobile terminal. As shown in fig. 10, for convenience of explanation, only the parts related to the embodiments of the present application are shown, and details of the technology are not disclosed, please refer to the method part of the embodiments of the present application. The mobile terminal may be any terminal device including a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), a Point of Sales (POS), a vehicle-mounted computer, a wearable device, and the like, taking the mobile terminal as the mobile phone as an example:
fig. 10 is a block diagram of a partial structure of a mobile phone related to a mobile terminal according to an embodiment of the present application. Referring to fig. 10, the cellular phone includes: radio Frequency (RF) circuit 1010, memory 1020, input unit 1030, display unit 1040, sensor 1050, audio circuit 1060, wireless fidelity (WiFi) module 1070, processor 1080, and power source 1090. Those skilled in the art will appreciate that the handset configuration shown in fig. 10 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The RF circuit 1010 may be configured to receive and transmit signals during information transmission and reception or during a call, and may receive downlink information of a base station and then process the received downlink information to the processor 1080; the uplink data may also be transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 1010 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM, GPRS, Code Division Multiple Access (CDMA), W-CDMA, Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
The memory 1020 can be used for storing software programs and modules, and the processor 1080 executes various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 1020. The memory 1020 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function (such as an application program for a sound playing function, an application program for an image playing function, and the like), and the like; the data storage area may store data (such as audio data, an address book, etc.) created according to the use of the mobile phone, and the like. Further, the memory 1020 may include high speed random access memory, and may 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 1030 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone 1000. Specifically, the input unit 1030 may include a touch panel 1032 and other input devices 1034. Touch panel 1032, which may also be referred to as a touch screen, may collect touch operations by a user (e.g., operations by a user on or near touch panel 1032 using a finger, a stylus, or any other suitable object or accessory) and drive the corresponding connection device according to a predetermined program. In one embodiment, touch panel 1032 can include two portions, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1080, and can receive and execute commands sent by the processor 1080. In addition, the touch panel 1032 may be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 1030 may include other input devices 1034 in addition to the touch panel 1032. In particular, other input devices 1034 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), and the like.
The display unit 1040 may be used to display information input by a user or information provided to the user and various menus of the cellular phone. The display unit 1040 may include a display panel 1042. In one embodiment, the Display panel 1042 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. In one embodiment, the touch panel 1032 can overlay the display panel 1042, and when the touch panel 1032 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 1080 to determine the type of the touch event, and then the processor 1080 provides a corresponding visual output on the display panel 1042 according to the type of the touch event. Although in fig. 10, the touch panel 1032 and the display panel 1042 are two separate components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 1032 and the display panel 1042 may be integrated to implement the input and output functions of the mobile phone.
The cell phone 1000 may also include at least one sensor 1050, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1042 according to the brightness of ambient light, and the proximity sensor may turn off the display panel 1042 and/or the backlight when the mobile phone moves to the ear. The motion sensor can comprise an acceleration sensor, the acceleration sensor can detect the magnitude of acceleration in each direction, the magnitude and the direction of gravity can be detected when the mobile phone is static, and the motion sensor can be used for identifying the application of the gesture of the mobile phone (such as horizontal and vertical screen switching), the vibration identification related functions (such as pedometer and knocking) and the like; the mobile phone may be provided with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor.
Audio circuitry 1060, speaker 1062, and microphone 1064 may provide an audio interface between a user and a cell phone. The audio circuit 1060 can transmit the electrical signal converted from the received audio data to the speaker 1062, and the electrical signal is converted into a sound signal by the speaker 1062 and output; on the other hand, the microphone 1064 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1060 and converted into audio data, and the audio data is processed by the audio data output processor 1080 and then transmitted to another mobile phone through the RF circuit 1010, or the audio data is output to the memory 1020 for subsequent processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help the user to send and receive e-mail, browse web pages, access streaming media, etc. through the WiFi module 1070, which provides wireless broadband internet access for the user. Although fig. 10 shows the WiFi module 1070, it is to be understood that it does not belong to the essential constitution of the handset 1000 and may be omitted as needed.
The processor 1080 is a control center of the mobile phone, connects various parts of the whole mobile phone by using various interfaces and lines, and executes various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 1020 and calling data stored in the memory 1020, thereby integrally monitoring the mobile phone. In one embodiment, processor 1080 may include one or more processing units. In one embodiment, processor 1080 may integrate an application processor and a modem, wherein the application processor primarily handles operating systems, user interfaces, application programs, and the like; the modem handles primarily wireless communications. It is to be appreciated that the modem can be non-integrated with the processor 1080. For example, the processor 1080 may integrate an application processor and a baseband processor, which may constitute a modem with other peripheral chips, etc. The handset 1000 also includes a power supply 1090 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 1080 via a power management system that may be configured to manage charging, discharging, and power consumption.
In one embodiment, the cell phone 1000 may also include a camera, a bluetooth module, and the like.
In the embodiment of the present application, the processor 880 included in the mobile terminal implements the information processing method described above when executing the computer program stored on the memory.
In one embodiment, the mobile terminal can include a memory 1020 and a processor 1080, wherein the memory 1020 stores a computer program that, when executed by the processor 1080, causes the processor to perform the steps of:
when the foreground application is monitored to be started, recording the running time of the foreground application in the foreground after being started;
if the running time reaches a preset time threshold, acquiring a background process having an association relation with the foreground application;
determining the state of a background process having an association relation with a foreground application;
and if the state of the background process is the frozen state, unfreezing the background process.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the information processing method described above.
In one embodiment, a computer program product is provided that comprises a computer program, which when run on a computer device causes the computer device to perform the above-described information processing method when executed.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or the like.
Any reference to memory, storage, database, or other medium as used herein may include non-volatile and/or volatile memory. Suitable 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 external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An information processing method characterized by comprising:
when the foreground application is monitored to be started, recording the running time of the foreground application in a foreground after being started;
if the running time reaches a preset time threshold, acquiring a background process having an association relation with the foreground application before the foreground application uses the background process having the association relation;
determining the state of a background process having an association relation with the foreground application;
and if the state of the background process is the frozen state, unfreezing the background process, and not unfreezing the application program to which the background process belongs.
2. The method of claim 1, wherein obtaining the background process associated with the foreground application comprises:
and acquiring a background process with a communication mechanism with the foreground application.
3. The method of claim 1, wherein after said unfreezing the background process, the method further comprises:
acquiring running characteristics of a background process having an association relation with the foreground application;
determining the resource restriction level of the background process with the incidence relation according to the running characteristics;
and distributing the background process with the incidence relation to a resource group corresponding to the resource restriction level, and configuring the resource use priority corresponding to the resource restriction level.
4. The method of claim 3, wherein obtaining the running characteristics of the background process associated with the foreground application comprises:
acquiring running characteristics of a background process having an association relation with the foreground application through a kernel space, and packaging the running characteristics into a data packet to be transmitted to a user space;
analyzing the data packet through the user space to obtain the running characteristics of the background process;
the determining the resource limitation level of the background process with the incidence relation according to the running characteristics comprises the following steps:
and analyzing the running characteristics through the user space, and determining the resource limitation level of the background process with the incidence relation.
5. The method of claim 4, wherein the analyzing the running characteristic through the user space to determine the resource restriction level of the background process with the association relationship comprises:
when the background process with the incidence relation is communicated with the foreground application, reducing the resource limit level of the background process for communication;
and when the background process with the incidence relation finishes the communication with the foreground application, improving the resource limit level of the background process finishing the communication.
6. The method of any of claims 1 to 5, further comprising:
and when a preset condition is met, re-freezing the unfrozen background process, wherein the preset condition comprises one or more of the condition that the unfrozen background process is not communicated with the foreground application within a preset first time period, the unfrozen background process enters an unfreezing state exceeding a preset second time period, and the foreground application is finished in the running state of the foreground.
7. The method of claim 6, further comprising:
transmitting a termination signal through a user space;
intercepting the termination signal, and unfreezing the target process and each thread contained in the target process if the target process of the termination signal is in a frozen state;
and setting the target process to be in a non-freezing state, and sending a termination signal to the target process, wherein the termination signal is used for terminating the target process.
8. An information processing apparatus characterized by comprising:
the time recording module is used for recording the running time of the foreground application in the foreground after the foreground application is started when the foreground application is monitored to be started;
the process acquisition module is used for acquiring the background process in association with the foreground application before the foreground application uses the background process in association if the running time reaches a preset time threshold;
the state determining module is used for determining the state of a background process which has an incidence relation with a foreground application;
and the unfreezing module is used for unfreezing the background process if the state of the background process is a frozen state, and not unfreezing the application program to which the background process belongs.
9. A mobile terminal comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to carry out the method of any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN201810023233.1A 2018-01-10 2018-01-10 Information processing method and device, mobile terminal and computer readable storage medium Active CN110032267B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810023233.1A CN110032267B (en) 2018-01-10 2018-01-10 Information processing method and device, mobile terminal and computer readable storage medium
PCT/CN2018/122048 WO2019137170A1 (en) 2018-01-10 2018-12-19 Information processing method, mobile terminal, and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810023233.1A CN110032267B (en) 2018-01-10 2018-01-10 Information processing method and device, mobile terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110032267A CN110032267A (en) 2019-07-19
CN110032267B true CN110032267B (en) 2021-05-18

Family

ID=67218814

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810023233.1A Active CN110032267B (en) 2018-01-10 2018-01-10 Information processing method and device, mobile terminal and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN110032267B (en)
WO (1) WO2019137170A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111221650A (en) * 2019-12-31 2020-06-02 青岛海尔科技有限公司 System resource recovery method and device based on process type association
CN114168203B (en) * 2020-09-10 2024-02-13 成都鼎桥通信技术有限公司 Dual-system running state control method and device and electronic equipment
CN112256354B (en) * 2020-11-25 2023-05-16 Oppo(重庆)智能科技有限公司 Application starting method and device, storage medium and electronic equipment
CN112671672B (en) * 2020-12-16 2023-12-08 深圳Tcl新技术有限公司 Application flow control method, device, equipment and readable storage medium
CN112860439A (en) * 2021-03-01 2021-05-28 北京字节跳动网络技术有限公司 Application starting method and device, terminal and storage medium
US11928517B2 (en) * 2021-07-08 2024-03-12 EMC IP Holding Company LLC Feature resource self-tuning and rebalancing
CN115016631B (en) * 2021-11-22 2023-07-18 荣耀终端有限公司 Process scheduling method and terminal equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103645954A (en) * 2013-11-21 2014-03-19 华为技术有限公司 CPU scheduling method, device and system based on heterogeneous multi-core system
CN105979095A (en) * 2016-06-27 2016-09-28 努比亚技术有限公司 Mobile terminal and application power consumption control method
CN106648849A (en) * 2016-10-18 2017-05-10 上海传英信息技术有限公司 Process freezing method and mobile terminal
CN107436779A (en) * 2017-05-22 2017-12-05 努比亚技术有限公司 A kind of application management method, equipment and computer-readable recording medium
CN107526640A (en) * 2017-08-17 2017-12-29 广东欧珀移动通信有限公司 Method for managing resource, device, mobile terminal and computer-readable recording medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8527996B2 (en) * 2010-01-07 2013-09-03 International Business Machines Corporation Method and system for performing a combination of throttling server, throttling network and throttling a data storage device by employing first, second and third single action tools
CN101873616B (en) * 2010-06-21 2014-07-16 宇龙计算机通信科技(深圳)有限公司 Mobile terminal self-check method and system and mobile terminal
CN102331965A (en) * 2011-09-15 2012-01-25 深圳桑菲消费通信有限公司 Method for resource management of terminal
US8990819B2 (en) * 2012-09-30 2015-03-24 International Business Machines Corporation Efficient rollback and retry of conflicted speculative threads using distributed tokens
CN106506815A (en) * 2016-10-19 2017-03-15 北京奇虎科技有限公司 A kind of application enables method and relevant device
CN106843450A (en) * 2017-01-23 2017-06-13 努比亚技术有限公司 The storage processing method and device of a kind of terminal applies
CN107479951B (en) * 2017-07-31 2020-02-11 Oppo广东移动通信有限公司 Process control method and device, storage medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103645954A (en) * 2013-11-21 2014-03-19 华为技术有限公司 CPU scheduling method, device and system based on heterogeneous multi-core system
CN105979095A (en) * 2016-06-27 2016-09-28 努比亚技术有限公司 Mobile terminal and application power consumption control method
CN106648849A (en) * 2016-10-18 2017-05-10 上海传英信息技术有限公司 Process freezing method and mobile terminal
CN107436779A (en) * 2017-05-22 2017-12-05 努比亚技术有限公司 A kind of application management method, equipment and computer-readable recording medium
CN107526640A (en) * 2017-08-17 2017-12-29 广东欧珀移动通信有限公司 Method for managing resource, device, mobile terminal and computer-readable recording medium

Also Published As

Publication number Publication date
CN110032267A (en) 2019-07-19
WO2019137170A1 (en) 2019-07-18

Similar Documents

Publication Publication Date Title
CN110032267B (en) Information processing method and device, mobile terminal and computer readable storage medium
CN109992398B (en) Resource management method, resource management device, mobile terminal and computer-readable storage medium
CN110032429B (en) Information processing method and device, mobile terminal and computer readable storage medium
WO2019128546A1 (en) Application program processing method, electronic device, and computer readable storage medium
CN111061516A (en) Method and device for accelerating cold start of application and terminal
CN107577508B (en) Application processing method and device, readable storage medium and mobile terminal
CN109992399B (en) Resource management method, resource management device, mobile terminal and computer-readable storage medium
CN110032266B (en) Information processing method, information processing device, computer equipment and computer readable storage medium
WO2019128537A1 (en) Application freezing method, and computer device and computer-readable storage medium
WO2019137173A1 (en) Resource management method, mobile terminal and computer-readable storage medium
CN109992380B (en) Application program processing method and device, electronic equipment and computer readable storage medium
WO2019128573A1 (en) Information processing method, apparatus, computer device and computer-readable storage medium
WO2019128586A1 (en) Application processing method, electronic device, and computer readable storage medium
CN109992360B (en) Process processing method and device, electronic equipment and computer readable storage medium
WO2019128569A1 (en) Method and apparatus for freezing application, and storage medium and terminal
WO2019128553A1 (en) Application processing method, electronic device, and computer-readable storage medium
CN109992323B (en) Process processing method and device, electronic equipment and computer readable storage medium
CN110032397B (en) Application processing method and device, electronic equipment and computer readable storage medium
CN110018886B (en) Application state switching method and device, electronic equipment and readable storage medium
CN109375995B (en) Application freezing method and device, storage medium and electronic equipment
WO2019137187A1 (en) Resource management method and apparatus, mobile terminal and computer-readable storage medium
WO2019128570A1 (en) Method and apparatus for freezing application, and storage medium and terminal
CN109992369B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN109995927B (en) Information processing method and device, mobile terminal and computer readable storage medium
CN110045811B (en) Application program processing method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01 Patent grant
GR01 Patent grant