CN109992361B - Application freezing method and device, terminal and computer readable storage medium - Google Patents

Application freezing method and device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN109992361B
CN109992361B CN201711480509.0A CN201711480509A CN109992361B CN 109992361 B CN109992361 B CN 109992361B CN 201711480509 A CN201711480509 A CN 201711480509A CN 109992361 B CN109992361 B CN 109992361B
Authority
CN
China
Prior art keywords
application program
freezing
background application
plug
desktop
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
CN201711480509.0A
Other languages
Chinese (zh)
Other versions
CN109992361A (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 CN201711480509.0A priority Critical patent/CN109992361B/en
Publication of CN109992361A publication Critical patent/CN109992361A/en
Application granted granted Critical
Publication of CN109992361B publication Critical patent/CN109992361B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution

Abstract

The application relates to an application freezing method, an application freezing device, a terminal and a computer readable storage medium. The method comprises the following steps: acquiring a background application program running on the terminal, and detecting whether a desktop plug-in exists in the background application program; if the background application program has the desktop plug-in, judging whether the background application program corresponding to the desktop plug-in is frozen or not according to the type of the desktop plug-in; and when the background application program needs to be frozen, freezing the background application program according to a preset freezing strategy. By the method, whether the corresponding background application program is frozen or not can be judged according to the working type of the desktop plug-in, so that the freezing error rate is reduced, and the freezing application is more reasonable.

Description

Application freezing method and device, terminal and computer readable storage medium
Technical Field
The present application relates to the field of data processing, and in particular, to an application freezing method, apparatus, terminal, and computer-readable storage medium.
Background
With the development of mobile communication technology, the functions of the intelligent terminal are stronger and more application programs are available. In order to avoid that an unnecessary application runs in the background or an application which is not reasonably used by a user runs in the foreground, the system memory is occupied, and the electric quantity of the terminal equipment is consumed, the unnecessary application or the application which is not reasonably used by the user is generally frozen. Generally, the way of freezing an application is mainly to decide whether an application should be frozen or not according to the running state of the application, whether the application is a foreground application or a background application, and the like. The application is frozen only by the running state of the application, which may cause the normally running application to be frozen and not to work normally, and the background application cannot be frozen according to some unique attributes of the application, so that the freezing accuracy is not high, and the user experience is affected.
Disclosure of Invention
The embodiment of the application freezing method and device, the terminal and the computer readable storage medium can judge whether to freeze a corresponding background application program according to the type of a desktop plug-in, so that the application freezing is more reasonable.
An application freezing method for freezing an application program running on a terminal, the method comprising:
acquiring a background application program running on the terminal, and detecting whether a desktop plug-in exists in the background application program;
if the background application program has the desktop plug-in, judging whether the background application program corresponding to the desktop plug-in is frozen or not according to the type of the desktop plug-in;
and when the background application program needs to be frozen, freezing the background application program according to a preset freezing strategy.
An application freezing apparatus comprising:
the acquisition module is used for acquiring a background application program running on the terminal and detecting whether a desktop plug-in exists in the background application program;
the judging module is used for judging whether the background application program corresponding to the desktop plug-in is frozen or not according to the type of the desktop plug-in if the background application program has the desktop plug-in;
and the freezing module is used for freezing the background application program according to a preset freezing strategy when the background application program needs to be frozen.
A terminal comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the method.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method.
According to the application freezing method, the application freezing device, the terminal and the computer readable storage medium, the background application program running on the terminal is obtained, whether the desktop plug-in exists in the background application program is detected, if the desktop plug-in exists in the background application program, whether the background application program corresponding to the desktop plug-in is frozen or not is judged according to the type of the desktop plug-in, when the background application program needs to be frozen, the background application program is frozen according to a preset freezing strategy, whether the corresponding background application program is frozen or not can be judged according to the working type of the desktop plug-in, the freezing error rate is reduced, and the frozen application is more reasonable.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of an internal structure of a terminal in one embodiment;
FIG. 2 is a block diagram that illustrates a portion of the framework of the system in the terminal in one embodiment;
FIG. 3 is a flow diagram illustrating an exemplary implementation of a freezing method;
FIG. 4 is a schematic flow chart of a freezing method applied in another embodiment;
FIG. 5 is a schematic flow chart of a freezing method applied in another embodiment;
FIG. 6 is a schematic flow chart of a freezing method applied in another embodiment;
FIG. 7 is a schematic flow chart of a freezing method applied in another embodiment;
FIG. 8 is a block diagram of an embodiment employing a freezing apparatus;
fig. 9 is a block diagram of a partial structure of a mobile phone related to a terminal according to an embodiment of the present application.
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.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
In one embodiment, as shown in fig. 1, a schematic diagram of the internal structure of a terminal is provided. The terminal includes a processor, a memory, and a display screen connected by a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole terminal. The memory is used for storing data, programs, and/or instruction codes, and the like, and the memory stores at least one computer program which can be executed by the processor to realize the application freezing method suitable for the terminal provided in the embodiment 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-Access-Memory (RAM). For example, in one embodiment, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a database, and a computer program. The database stores data related to an application freezing method for implementing the embodiments, for example, information such as a name and an occupied memory size of each application or process may be stored. The computer program can be executed by a processor for implementing an application freezing method provided by various embodiments of the present application. The internal memory provides a cached operating environment for the operating system, databases, and computer programs in the non-volatile storage medium. The display screen may be a touch screen, such as a capacitive screen or an electronic screen, and is configured to display interface information of an application corresponding to the first process, and may also be configured to detect a touch operation applied to the display screen and generate a corresponding instruction, such as a switching instruction for performing foreground and background applications.
Those skilled in the art will appreciate that the configuration shown in fig. 1 is a block diagram of only a portion of the configuration relevant to the present application, and does not constitute a limitation on the terminal to which the present application is applied, and that a particular terminal may include more or less components than those shown in the drawings, or may combine certain components, or have a different arrangement of components. For example, the terminal further includes a network interface connected via the system bus, where the network interface may be an ethernet card or a wireless network card, and the like, and is used for communicating with an external terminal, such as communicating with a server.
In one embodiment, as shown in FIG. 2, a partial architecture diagram of a terminal is provided. The architecture system of the terminal 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 and unfreezing application 212, and the terminal may implement a freezing policy for each application through the freezing and unfreezing application 212, and perform a freezing operation on the related application consuming power in the background. A resource priority and restriction management module 222 and a platform freeze management module 224 are contained in the local framework layer 220. The terminal can maintain different applications in organizations with different priorities and different resources in real time through the resource priority and restriction management module 222, and adjust the resource groups of the application programs according to the requirements of the upper layer, thereby achieving the effects of optimizing performance and saving power consumption. The terminal may allocate, by using the platform freezing management module 224, the task that can be frozen in the background to the freezing layers corresponding to the preset different levels according to the length of the freezing time, and optionally, the number of the freezing layers may include three, where: 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. The kernel space layer 230 includes a UID management module 231, a Cgroup module 232, a Binder management module 233, a process memory recycling module 234, and a freeze timeout exit module 235. 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 232 is used to provide a complete set of resource restriction mechanisms related to Central Processing Unit (CPU), CPU set, memory, input/output (I/O) and Net. The Binder management and control module 233 is used for controlling the priority of background Binder communication. The interface module of the local framework layer 220 includes a binder interface that is issued to the upper layer, and the framework or application of the upper layer sends a resource restriction or freezing instruction to the resource priority and restriction management module 222 and the platform freezing management module 224 through the provided binder interface. The process memory recycling module 234 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 235 is used to resolve the exception generated by the freeze timeout scenario. Through the above-mentioned architecture, the application freezing method in the embodiments of the present application can be implemented.
In one embodiment, as shown in fig. 3, an application freezing method is provided for freezing an application program running on a terminal. The embodiment is described by taking the method applied to the terminal shown in fig. 1 as an example. The application freezing method comprises the following steps:
step 302: and acquiring a background application program running on the terminal, and detecting whether the desktop plug-in exists in the background application program.
An Application (APP) refers to a computer program that performs one or more specific tasks, operates in a user mode, can interact with a user, and has a visual user interface. Background applications work in a background running state, and one application work in the background running state indicates that the application is located at a position corresponding to a non-top-of-stack window object of a window stack of an operating system. Determining whether a target application program is a background application program, acquiring a window object corresponding to the target application program, and judging whether the window object is positioned at the top of a window stack of an operating system, if not, indicating that the application program is the background application program, and if so, indicating that the application program runs on a foreground application program.
Desktop plug-ins are technologies that facilitate users to quickly use certain application functions without entering applications in a mobile operating system. The application program provides various services which enable the plug-in to be applied, and comprises a loading mode, so that the plug-in can be loaded into the application program and a network transmission protocol to exchange data with the plug-in. The plug-in must rely on the application to function itself, and the plug-in cannot function properly only. In using desktop plug-ins, the application is still caused to run in the background. When the application enters the background, if the application is directly frozen, the function of the desktop plug-in of the application can be influenced.
Step 304: and if the background application has the desktop plug-in, judging whether to freeze the background application program corresponding to the desktop plug-in according to the type of the desktop plug-in.
If the running background application program has the desktop plug-in corresponding to the running background application program, the data related to the background application program is shown on the terminal desktop. The desktop plug-ins are mainly divided into input type plug-ins and output type plug-ins. The input plug-ins include desktop plug-ins for displaying output results according to input data, that is, desktop plug-ins capable of displaying output results according to data input by a user only when data input by the user is detected, such as desktop plug-ins for applications such as "drip travel, jingdong, and microblog. Outbound plug-ins include desktop plug-ins that are updated in real time, i.e., such plug-ins typically require updating the display state of the plug-in the background, such as the desktop plug-in for applications such as "weather, clock, traffic management", and the like. For an input type plug-in, the corresponding background application program can be frozen; for output type plug-ins, which need to update the display state in real time, freezing such applications can affect the user experience, and thus the running state of the output type plug-ins needs to be maintained.
Step 306: and when the background application program needs to be frozen, freezing the background application program according to a preset freezing strategy.
When the desktop plug-in exists in the background application running on the terminal, the terminal can judge whether the background application needs to be frozen according to the type of the desktop plug-in, and for the input type plug-in, the background application corresponding to the desktop plug-in can be frozen; for the output type plug-in, the running state of the background application corresponding to the desktop plug-in needs to be maintained. The background application program to be frozen is frozen according to a preset freezing policy, for example, a corresponding freezing policy may be set according to the monitored operation information to implement the freezing operation on the foreground application. For example, different freezing levels can be set according to the acquired use frequency of the desktop plug-ins, and freezing of foreground applications can be realized according to the freezing levels.
According to the application freezing method, the background application program running on the terminal is obtained, whether the desktop plug-in exists in the background application program is detected, if the desktop plug-in exists in the background application program, whether the background application program corresponding to the desktop plug-in is frozen is judged according to the type of the desktop plug-in, when the background application program needs to be frozen, the background application program is frozen according to a preset freezing strategy, whether the corresponding background application program is frozen can be judged according to the working type of the desktop plug-in, the freezing error rate is reduced, and the frozen application is more reasonable.
In an embodiment, as shown in fig. 4, the determining whether to freeze the background application corresponding to the desktop plug-in according to the type of the desktop plug-in includes:
step 402: and acquiring the desktop plug-in corresponding to the background application program, and detecting the work type of the desktop plug-in.
When the desktop plug-in is detected to exist in a background application running on a terminal, the desktop plug-in corresponding to the background application is obtained, and the working type of the desktop plug-in is detected, wherein the desktop plug-in is mainly divided into an input type plug-in and an output type plug-in. The input plug-ins include desktop plug-ins for displaying output results according to input data, that is, desktop plug-ins capable of displaying output results according to data input by a user only when data input by the user is detected, such as desktop plug-ins for applications such as "drip travel, jingdong, and microblog. Outbound plug-ins include desktop plug-ins that are updated in real time, i.e., such plug-ins typically require updating the display state of the plug-in the background, such as the desktop plug-in for applications such as "weather, clock, traffic management", and the like.
For example, the terminal may detect a process of the desktop plug-in according to a preset frequency or according to a detected user operation instruction, and obtain a current working type of the desktop plug-in by detecting a process state of the desktop plug-in. The running of an application is usually reflected by the running of related processes, so that the running of desktop plug-ins is also related to the processes. Optionally, a process identifier of the desktop plug-in may be obtained, where the process identifier is used to uniquely identify a corresponding process, and may be formed by one or a combination of several of numbers, letters, or other characters with preset digits. For example, process a may be represented by process identifier "0001", process B may be represented by "1234", and the running state of the processes of different process identifiers may be detected, so that the work type of the desktop plug-in may be known.
Step 404: and when the desktop plug-in belongs to the input type plug-in, freezing the background application program corresponding to the input type plug-in.
Detecting the working type of the desktop plugin, when the desktop plugin belongs to an input type plugin, the plugin often needs to display an output result according to data input by a user, and if the data input by the user is not detected, the current use requirement of the user on the desktop plugin is low, and a background application program corresponding to the input type plugin can be frozen.
Step 406: and when the desktop plug-in belongs to the output type plug-in, keeping the running state of the background application program corresponding to the output type plug-in.
The method comprises the steps of detecting the working type of the desktop plugin, when the desktop plugin belongs to an output type plugin, generally updating the display state of the plugin in the background, and freezing the application program corresponding to the plugin can cause the desktop plugin to be incapable of normally running to influence user experience, so that the running state of the background application program corresponding to the output type plugin needs to be maintained.
In one embodiment, as shown in fig. 5, the freezing the background application according to the preset freezing policy includes:
step 502: acquiring the use frequency of the desktop plug-in corresponding to the background application program to be frozen;
because the desktop plug-in corresponding to the background application program needing to be frozen is an input type plug-in, the terminal can acquire the operation information input by the user when each desktop plug-in runs, and count the historical operation records of each desktop plug-in receiving the user input each time. The historical operation record comprises historical operation modes and use frequencies corresponding to the operation modes. The historical operation modes at least comprise operation modes such as key pressing, voice, touch, fingerprint, scanning and the like, and the use frequency corresponding to the operation modes is the use frequency of each operation mode.
For example, when the desktop plug-in runs an Application (APP) of a player such as "OPPO video player", the terminal records a starting time point when the desktop plug-in starts running the "OPPO video player", and an ending time point when the desktop plug-in ends or switches to the background, and a time duration between the starting time point and the ending time point is a historical running time duration, such as 120 minutes. In the historical operating time length, the input operation modes of the receiving user comprise operation modes such as touch input and sliding input. According to the input operation mode, the use frequency of each operation mode can be acquired, wherein the use frequency of the touch input operation mode is 2 times/60 minutes, and the use frequency of the slide input operation mode is 6 times/60 minutes.
Step 504: dividing freezing grades according to the mapping relation between the use frequency and the freezing degree; the freeze level is used to indicate a maximum allowed resource that can be used to configure the background application.
And dividing the freezing grade according to the acquired use frequency of the desktop plug-ins. Wherein the freeze level is used to indicate a maximum allowed resource that can be used by the configuration foreground application. The resource that can be used represents the resource that can be used by the process at each time when the process is executed. The maximum allowed resource represents the maximum resource that a process is allowed to use at each time. The lower the use frequency is, the higher the freezing level is, and the less the maximum allowed resources can be used by the corresponding background application program; conversely, the higher the frequency of use, the lower the freeze level, and the greater the maximum allowed resources that can be used by the corresponding background application.
In the operating system, the interaction mechanism between the processes is mainly divided into a synchronization mechanism and a communication mechanism. The communication mechanism includes socket, binder, shared memory, etc. Two programs on the network effect the exchange of data via a bidirectional communication link, one end of which is called a socket. Binder is an inter-process communication mechanism that provides remote procedure call functionality.
The terminal can acquire the background process according to a preset frequency or according to a detected user operation instruction. Optionally, a process identifier of the background process may be obtained, where the process identifier is used to uniquely identify a corresponding process, and may be formed by one or a combination of several of numbers, letters, or other characters with preset digits. For example, process A can be represented by process identification "0001", process B by "1234", and so on.
It should be noted that the freezing level dividing manner may be set according to the requirement of the user, and may be set in combination with the historical running time of the background application and the application type of the background application. The freezing levels of each application program may be the same or different in division rule, and the number of the divided levels may be the same or different.
Step 506: and freezing the background application program at a corresponding level according to the freezing level.
And determining a freezing grade corresponding to the use frequency of the current desktop plug-in according to the use frequency of the desktop plug-in. If the memory required by the background application program is 40Mb when the background application program is executed, and if the freezing level is the first level (the lowest level), resources are allocated to the background application program according to the first freezing level, and the maximum allowed resources which can be used by the background application program are 30 Mb; and if the freezing level is four levels (the highest level), distributing resources to the background application program according to the first freezing level, wherein the maximum allowed resource which can be used by the background application program is 0 Mb. Wherein the highest level of freezing is a completely frozen state.
The resources may include a CPU, I/O file resources, and the like. Taking resources as a memory for example, the longer the interval time is, the higher the freezing level is; the higher the freeze level, the less maximum allowed resources that the background application can use.
In the method, the freezing level is set according to the use frequency of the desktop plug-in, the lower the use frequency is, the higher the freezing level is, but the maximum allowed resource which can be used by the background application is reduced along with the freezing level until the background application is in a complete freezing state. A certain time process is needed from partial freezing to complete freezing, a buffering time period is given to a user, and in the time period, the user can quickly and effectively unfreeze the background application, so that the user experience is improved. Meanwhile, the root freezing level limits the maximum allowed resource which can be used by the background application, and the resource can be reasonably distributed, so that the power consumption is reduced.
In one embodiment, as shown in fig. 6, the freezing the background application according to the preset freezing policy includes:
step 602: acquiring all functions of the background application program and functions used by the desktop plug-in of the background application program.
The background application program has various functions, and when the freezing condition is met, the functions used by the desktop plug-ins corresponding to the current background application program are obtained. An input operation to an input-type desktop plug-in may correspond to one or more functions, for example, a voice operation may correspond to functions of voice communication, voice control, voice search, etc., and a scan operation may correspond to functions of scan recognition, scan payment, scan authentication, etc. By acquiring the monitored operation mode, the function corresponding to the monitored operation mode can be acquired correspondingly.
It should be noted that the functional functions used by the desktop plug-in may also include, but are not limited to: recording, taking pictures, connecting with a network, using Bluetooth, acquiring geographic positions, making calls and sending short messages.
Step 604: and acquiring unused functions according to the functions used by the desktop plug-ins of the background application program.
When a user uses a desktop plug-in corresponding to a current background application program, a function which is not frequently used by the user generally exists. The unused function refers to a function other than the monitored function corresponding to the operation of the desktop plug-in, among all functions of the desktop plug-in.
Step 606: and freezing the corresponding process of the unused function in the system.
Each application corresponds to a process group in a system frame, and when the application is operated, the system can allocate resources to the corresponding process group; each function module in the application also corresponds to the process in the process group, so that the corresponding process of each function of the application is identified, and the subsequent system resource allocation management of the corresponding process is facilitated. The identifier is used for uniquely identifying the corresponding process and can be formed by one or a combination of several of numbers, letters or other characters with preset digits. For example, process A can be represented by process identification "0001", process B by "1234", and so on.
By the method, the terminal can freeze the corresponding process of the unused function in the system, and the aims of saving resources and improving the operation efficiency are fulfilled. But other functions of the background application program can still be used, so that the application does not need to freeze the whole application, but freezes partial functions of the application, and ensures normal use of other partial functions, thereby achieving the effect of reducing power consumption.
In one embodiment, after freezing the background application according to a preset freezing policy, the method further includes: when the background application program with the desktop plug-in is frozen, if the current display interface is detected to be the desktop, the background application program with the desktop plug-in is unfrozen.
Specifically, when the current display interface of the terminal is detected to be the desktop, a unfreezing instruction of the background application program with the desktop plug-in is generated. The information of the terminal display interface is detected in real time, and after the terminal display interface is detected to be a desktop, the use requirement of the desktop plug-in is increased, so that unfreezing operation needs to be carried out on the frozen application program and process related to the desktop plug-in. Further, when the current display interface of the terminal is detected to be the desktop, the terminal automatically generates a corresponding unfreezing instruction for unfreezing the application program and the process related to the desktop plug-in. Optionally, when the corresponding application program and process need to be defrosted after the background application program and the background process are frozen, a defreezing instruction input by a user may also be obtained. Biometric information is included in the thawing instruction, wherein the biometric information may be fingerprint information, iris information, voiceprint information, facial information, and the like. It should be noted that different applications may set different biometric information, or may set the same biometric information, and the biometric information may be set by user-defined settings according to the needs of the user.
In one embodiment, as shown in fig. 7, after freezing the background application according to the preset freezing policy, the method further includes:
step 702: obtaining a unfreezing instruction for unfreezing the frozen background application program;
step 704: detecting whether the biological characteristic information in the unfreezing instruction is matched with a preset biological characteristic;
step 706: and when the biological characteristic information in the unfreezing instruction is matched with the preset biological characteristic, unfreezing the background application program.
That is, when the background application is frozen and needs to be defrosted, the defreezing instruction input by the user needs to be acquired. Biometric information is included in the thawing instruction, wherein the biometric information may be fingerprint information, iris information, voiceprint information, facial information, and the like.
It should be noted that different applications may set different biometric information, or may set the same biometric information, and the biometric information may be set by user-defined settings according to the needs of the user.
And when the biological characteristic information in the unfreezing instruction is matched with the preset biological characteristic information, unfreezing the foreground application. And during the unfreezing operation, a corresponding unfreezing strategy can be set according to the freezing strategy, so that the unfreezing operation on the background application program is realized.
In one embodiment, as shown in fig. 8, there is provided an application freezing apparatus comprising:
an obtaining module 810, configured to obtain a background application running on the terminal, and detect whether a desktop plug-in exists in the background application.
A determining module 820, configured to determine whether to freeze the background application program corresponding to the desktop plug-in according to the type of the desktop plug-in if the background application program has the desktop plug-in.
And the freezing module 830 is configured to freeze the background application according to a preset freezing policy when the background application needs to be frozen.
In an embodiment, the determining module 820 is further configured to obtain a desktop plug-in corresponding to the background application, and detect a work type to which the desktop plug-in belongs; when the desktop plug-in belongs to an input type plug-in, freezing a background application program corresponding to the input type plug-in; wherein the input type plug-in includes a desktop plug-in that displays an output result according to input data.
In one embodiment, the determining module 820 is further configured to maintain the running state of the background application corresponding to the output-type plug-in when the desktop plug-in belongs to the output-type plug-in; wherein the output type plug-in comprises a desktop plug-in which updates are performed in real time.
In one embodiment, the freezing module 830 is further configured to obtain a usage frequency of a desktop plug-in corresponding to the background application that needs to be frozen; dividing freezing grades according to the mapping relation between the use frequency and the freezing degree; the freeze level is used for indicating the maximum allowed resource which can be used by the background application program; and freezing the background application program at a corresponding level according to the freezing level.
In one embodiment, the freezing module 830 is further configured to obtain all functions of the background application and functions currently used by the desktop plug-in of the background application; acquiring unused functions according to functions used by the desktop plug-ins of the background application program; and freezing the corresponding process of the unused function in the system.
In one embodiment, the desktop plug-in protection system further comprises a unfreezing module, wherein the unfreezing module is used for unfreezing the background application program with the desktop plug-in if the current display interface is detected to be the desktop when the background application program with the desktop plug-in is frozen.
In one embodiment, the unfreezing module is further used for obtaining an unfreezing instruction for unfreezing the frozen background application program; detecting whether the biological characteristic information in the unfreezing instruction is matched with a preset biological characteristic; and when the biological characteristic information in the unfreezing instruction is matched with the preset biological characteristic, unfreezing the background application program.
According to the application freezing device, the acquisition module 810 acquires the background application program running on the terminal, whether the background application program has the desktop plug-in is detected, if the background application program has the desktop plug-in, the judgment module 820 judges whether the background application program corresponding to the desktop plug-in is frozen according to the type of the desktop plug-in, when the background application program needs to be frozen, the freezing module 830 freezes the background application program according to a preset freezing strategy, whether the corresponding background application program is frozen can be judged according to the working type of the desktop plug-in, freezing error rate is reduced, and freezing application is more reasonable.
The division of the modules in the application freezing apparatus is only used for illustration, and in other embodiments, the application freezing apparatus may be divided into different modules as needed to complete all or part of the functions of the application freezing apparatus.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the application freezing methods as described in the embodiments above.
The embodiment of the application also provides a computer program product. A computer program product comprising instructions which, when run on a computer, cause the computer to perform the application freezing method described in the embodiments above.
The embodiment of the application also provides a terminal. As shown in fig. 9, 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 terminal 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 the terminal as the mobile phone as an example:
fig. 9 is a block diagram of a partial structure of a mobile phone related to a terminal according to an embodiment of the present application. Referring to fig. 9, the handset includes: radio Frequency (RF) circuit 910, memory 920, input unit 930, display unit 940, sensor 950, audio circuit 960, wireless fidelity (WiFi) module 970, processor 980, and power supply 990. Those skilled in the art will appreciate that the handset configuration shown in fig. 9 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 910 may be used for receiving and transmitting signals during information transmission or communication, and may receive downlink information of a base station and then process the downlink information to the processor 980; 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 circuit 910 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), e-mail, Short Messaging Service (SMS), and the like.
The memory 920 may be used to store software programs and modules, and the processor 980 may execute various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 920. The memory 920 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 920 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 930 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 900. Specifically, the input unit 930 may include a touch panel 931 and other input devices 932. The touch panel 931, which may also be referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 931 (e.g., a user operating the touch panel 931 or near the touch panel 931 by using a finger, a stylus, or any other suitable object or accessory), and drive the corresponding connection device according to a preset program. In one embodiment, the touch panel 931 may include two parts of 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 980, and can receive and execute commands sent by the processor 980. In addition, the touch panel 931 may be implemented by various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 930 may include other input devices 932 in addition to the touch panel 931. In particular, other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), and the like.
The display unit 940 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 940 may include a display panel 941. In one embodiment, the Display panel 941 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 931 may overlay the display panel 941, and when the touch panel 931 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 980 to determine the type of touch event, and then the processor 980 provides a corresponding visual output on the display panel 941 according to the type of touch event. Although in fig. 9, the touch panel 931 and the display panel 941 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 931 and the display panel 941 may be integrated to implement the input and output functions of the mobile phone.
Cell phone 900 may also include at least one sensor 950, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 941 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 941 and/or backlight when the mobile phone is moved 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 960, speaker 961 and microphone 962 may provide an audio interface between a user and a cell phone. The audio circuit 960 may transmit the electrical signal converted from the received audio data to the speaker 961, and convert the electrical signal into a sound signal for output by the speaker 961; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, converts the electrical signal into audio data after being received by the audio circuit 960, and then outputs the audio data to the processor 980 for processing, and then the audio data can be transmitted to another mobile phone through the RF circuit 910, or the audio data can be output to the memory 920 for subsequent processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 970, and provides wireless broadband Internet access for the user. Although fig. 9 shows WiFi module 970, it is to be understood that it does not belong to the essential components of cell phone 900 and may be omitted as desired.
The processor 980 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 920 and calling data stored in the memory 920, thereby integrally monitoring the mobile phone. In one embodiment, processor 980 may include one or more processing units. In one embodiment, the processor 980 may integrate an application processor and a modem, wherein the application processor primarily handles operating systems, user pages, applications, and the like; the modem handles primarily wireless communications. It is to be appreciated that the modem may not be integrated into the processor 980. For example, the processor 980 may integrate an application processor and a baseband processor, which may constitute a modem with other peripheral chips, etc. The handset 900 also includes a power supply 990 (e.g., a battery) for supplying power to various components, which may preferably be logically connected to the processor 980 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption.
In one embodiment, the cell phone 900 may also include a camera, a bluetooth module, and the like.
In the embodiment of the present application, the processor included in the mobile phone implements the application freezing method described in the above embodiments when executing the computer program stored in the memory.
When the computer program running on the processor is executed, whether the corresponding background application program is frozen or not can be judged according to the working type of the desktop plug-in, so that the freezing error rate is reduced, and the freezing application is more reasonable.
Any reference to memory, storage, database, or other medium 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 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 present application. 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 application freezing method for freezing an application program running on a terminal, the method comprising:
acquiring a background application program running on the terminal, and detecting whether a desktop plug-in exists in the background application program;
if the background application program has the desktop plug-in, judging whether the background application program corresponding to the desktop plug-in is frozen according to the type of the desktop plug-in, wherein the type of the desktop plug-in comprises the type of an input type plug-in and the type of an output type plug-in, the input type plug-in is a desktop plug-in displaying an output result according to input data, and the output type plug-in is a desktop plug-in updated in real time;
and when the background application program needs to be frozen, freezing the background application program according to a preset freezing strategy.
2. The method of claim 1, wherein the determining whether to freeze the background application corresponding to the desktop plug-in according to the type of the desktop plug-in comprises:
acquiring a desktop plug-in corresponding to the background application program, and detecting the work type of the desktop plug-in;
when the desktop plug-in belongs to an input type plug-in, freezing a background application program corresponding to the input type plug-in; wherein the input type plug-in includes a desktop plug-in that displays an output result according to input data.
3. The method of claim 2, wherein the determining whether to freeze the background application corresponding to the desktop plug-in according to the type of the desktop plug-in further comprises:
when the desktop plug-in belongs to an output plug-in, keeping the running state of a background application program corresponding to the output plug-in; wherein the output type plug-in comprises a desktop plug-in which updates are performed in real time.
4. The method of claim 1, wherein freezing the background application according to a preset freezing policy comprises:
acquiring the use frequency of the desktop plug-in corresponding to the background application program to be frozen;
dividing freezing grades according to the mapping relation between the use frequency and the freezing degree; the freeze level is used for indicating the maximum allowed resource which can be used by the background application program;
and freezing the background application program at a corresponding level according to the freezing level.
5. The method of claim 1, wherein freezing the background application according to a preset freezing policy comprises:
acquiring all functions of a background application program and functions used by a desktop plug-in of the background application program;
acquiring unused functions according to functions used by the desktop plug-ins of the background application program;
and freezing the corresponding process of the unused function in the system.
6. The method of claim 1, further comprising, after freezing the background application according to a preset freezing policy:
when the background application program with the desktop plug-in is frozen, if the current display interface is detected to be the desktop, the background application program with the desktop plug-in is unfrozen.
7. The method of claim 1, further comprising, after freezing the background application according to a preset freezing policy:
obtaining a unfreezing instruction for unfreezing the frozen background application program;
detecting whether the biological characteristic information in the unfreezing instruction is matched with a preset biological characteristic;
and when the biological characteristic information in the unfreezing instruction is matched with the preset biological characteristic, unfreezing the background application program.
8. An application freezing apparatus, comprising:
the acquisition module is used for acquiring a background application program running on a terminal and detecting whether the desktop plug-in exists in the background application program;
the judging module is used for judging whether the background application program corresponding to the desktop plugin is frozen or not according to the type of the desktop plugin if the background application program has the desktop plugin, wherein the type of the desktop plugin comprises the type of an input type plugin and the type of an output type plugin, the input type plugin is the desktop plugin displaying an output result according to input data, and the output type plugin is a desktop plugin updated in real time;
and the freezing module is used for freezing the background application program according to a preset freezing strategy when the background application program needs to be frozen.
9. A terminal comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of 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 steps of the method according to any one of claims 1 to 7.
CN201711480509.0A 2017-12-29 2017-12-29 Application freezing method and device, terminal and computer readable storage medium Active CN109992361B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711480509.0A CN109992361B (en) 2017-12-29 2017-12-29 Application freezing method and device, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711480509.0A CN109992361B (en) 2017-12-29 2017-12-29 Application freezing method and device, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109992361A CN109992361A (en) 2019-07-09
CN109992361B true CN109992361B (en) 2021-08-31

Family

ID=67109843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711480509.0A Active CN109992361B (en) 2017-12-29 2017-12-29 Application freezing method and device, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109992361B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116414553A (en) * 2021-12-31 2023-07-11 中兴通讯股份有限公司 Application freezing management method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250185A (en) * 2016-07-29 2016-12-21 宇龙计算机通信科技(深圳)有限公司 The control method of application program, control device and terminal
CN107220076A (en) * 2016-09-27 2017-09-29 华为技术有限公司 A kind of method for recovering internal storage and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8117555B2 (en) * 2006-12-07 2012-02-14 Sap Ag Cooperating widgets
CN106095482A (en) * 2016-05-31 2016-11-09 宇龙计算机通信科技(深圳)有限公司 The freezing method of application program and device
CN106125882B (en) * 2016-06-15 2019-04-26 深圳市万普拉斯科技有限公司 A kind of management method and electronic equipment of application program
CN106201596B (en) * 2016-06-29 2019-11-08 宇龙计算机通信科技(深圳)有限公司 A kind of method, apparatus and terminal for forbidding third-party application to automatically update
CN106959857B (en) * 2017-03-29 2020-05-26 联想(北京)有限公司 Application control method and device of electronic equipment
CN107329777A (en) * 2017-06-01 2017-11-07 深圳市金立通信设备有限公司 Using startup method and terminal device
CN107315612B (en) * 2017-06-27 2020-07-03 珠海市魅族科技有限公司 Terminal control method, terminal control device, computer device and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250185A (en) * 2016-07-29 2016-12-21 宇龙计算机通信科技(深圳)有限公司 The control method of application program, control device and terminal
CN107220076A (en) * 2016-09-27 2017-09-29 华为技术有限公司 A kind of method for recovering internal storage and device

Also Published As

Publication number Publication date
CN109992361A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
US10635449B2 (en) Method and apparatus for running game client
CN107391259B (en) Resource processing method and device, computer readable storage medium and mobile terminal
CN107679559B (en) Image processing method, image processing device, computer-readable storage medium and mobile terminal
CN109992398B (en) Resource management method, resource management device, mobile terminal and computer-readable storage medium
CN109144232B (en) Process processing method and device, electronic equipment and computer readable storage medium
CN109445917B (en) Application processing method and device, electronic equipment and computer readable storage medium
CN107484154B (en) Data switching method and device, terminal and computer readable storage medium
CN110032266B (en) Information processing method, information processing device, computer equipment and computer readable storage medium
WO2019128549A1 (en) Method and apparatus for freezing application, and terminal and computer-readable storage medium
CN109992364B (en) Application freezing method and device, computer equipment and computer readable storage medium
CN112703714A (en) Application program processing method and device, computer equipment and computer readable storage medium
CN108334345B (en) Application processing method and device, readable storage medium and mobile terminal
CN109992425B (en) Information processing method, information processing device, computer equipment and computer readable storage medium
CN109992380B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN107623612B (en) Flow display method and device, computer equipment and computer readable storage medium
CN109992399B (en) Resource management method, resource management device, mobile terminal and computer-readable storage medium
CN110018886B (en) Application state switching method and device, electronic equipment and readable storage medium
CN110018885B (en) Application program freezing method and device, storage medium and terminal
CN110032430B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN109992309B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN109992395B (en) Application freezing method and device, terminal and computer readable storage medium
CN109375995B (en) Application freezing method and device, storage medium and electronic equipment
CN109992322B (en) Application program unloading method and device, storage medium and terminal
CN109992361B (en) Application freezing method and device, terminal and computer readable storage medium
CN109992360B (en) Process 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: OPPO Guangdong Mobile Communications Co.,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