WO2019128569A1 - Procédé et appareil pour geler une application et support de stockage et terminal - Google Patents

Procédé et appareil pour geler une application et support de stockage et terminal Download PDF

Info

Publication number
WO2019128569A1
WO2019128569A1 PCT/CN2018/116925 CN2018116925W WO2019128569A1 WO 2019128569 A1 WO2019128569 A1 WO 2019128569A1 CN 2018116925 W CN2018116925 W CN 2018116925W WO 2019128569 A1 WO2019128569 A1 WO 2019128569A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
preset
freeze
coefficient
freezing
Prior art date
Application number
PCT/CN2018/116925
Other languages
English (en)
Chinese (zh)
Inventor
陈岩
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019128569A1 publication Critical patent/WO2019128569A1/fr

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
    • 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/329Power saving characterised by the action undertaken by task scheduling
    • 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
    • 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
    • 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/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/482Application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/504Resource capping
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of terminal technologies, and in particular, to an application freezing method, apparatus, storage medium, and terminal.
  • terminal devices enter the era of intelligence
  • terminal devices of large screens especially touch screens
  • applications applications, referred to as app
  • the operating system of the terminal provides a wakelock.
  • the application holds the wake lock
  • the operating system does not enter the standby state.
  • Some applications have unreasonable holding of wake-up locks. For such applications, the longer the wake-up lock is held, the more the terminal's power consumption is increased, and the system resources are too much.
  • the embodiment of the present application provides an application freezing method, device, storage medium, and terminal, which can release system resources, save power consumption, and improve user experience.
  • An application freezing method including:
  • the application is frozen when the real-time freeze coefficient is greater than a preset threshold.
  • An application freezing device comprising:
  • a query module configured to query, according to a preset period, how long the application holds the wake lock in the background
  • An acquiring module configured to invoke a preset freezing coefficient table to obtain a preset freezing coefficient of the application
  • An adjustment module configured to adjust the preset freeze coefficient according to a duration of the application holding the wake lock to obtain a real-time freeze coefficient
  • a freezing module configured to freeze the application when the real-time freezing coefficient is greater than a preset threshold.
  • a computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to implement the steps of the application freezing method in various embodiments of the present application.
  • a terminal comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor executing the computer program to implement the step of freezing the application in various embodiments of the present application.
  • the application freezing method and device, the storage medium, and the terminal provided by the embodiment of the present application query the duration of the application holding the wake-up lock according to a preset period; acquire a preset freezing coefficient of each application; and hold according to the application
  • the duration of the wake-up lock is adjusted to obtain a real-time freeze coefficient; when the real-time freeze coefficient is greater than a preset threshold, the application is frozen, and the preset may be adjusted according to the duration of the wake-up lock held by the application.
  • the freezing coefficient is used to obtain the real-time freezing coefficient. When the real-time freezing coefficient is greater than the preset threshold, the application running in the background is frozen, so that it cannot run in the background, releasing system resources and saving power.
  • FIG. 1 is a schematic diagram showing the internal structure of a terminal in an embodiment
  • FIG. 2 is a partial schematic diagram of a system in a terminal in an embodiment
  • FIG. 3 is a flow chart of an application freezing method in an embodiment
  • FIG. 5 is a flowchart of adjusting a preset freeze coefficient to obtain a freeze coefficient according to a duration of holding the wake lock by the application according to the embodiment
  • FIG. 6 is a flow chart of an application freezing method in still another embodiment
  • FIG. 7 is a flowchart of determining whether the application meets a preset condition in an embodiment
  • Figure 8 is a flow chart of freezing the application in one embodiment
  • FIG. 9 is a structural block diagram of an application freezing device in an embodiment
  • Figure 10 is a block diagram showing a portion of the structure of a handset in an embodiment.
  • first, second and the like may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another.
  • a first dependent process may be referred to as a second dependent process without departing from the scope of the invention, and similarly, a second dependent process may be referred to as a first dependent process. Both the first dependent process and the second dependent process are dependent processes, but they are not the same dependent process.
  • FIG. 1 a schematic diagram of an internal structure of a terminal is provided.
  • the terminal includes a processor, memory, and display connected via a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire terminal.
  • the memory is used to store data, programs, and/or instruction codes, etc., and the memory stores at least one computer program, which can be executed by the processor to implement the process processing method applicable to the terminal provided in the embodiments of the present application.
  • the memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random storage memory (Random-Access-Memory, RAM).
  • the memory includes a non-volatile storage medium and an internal memory.
  • Non-volatile storage media stores operating systems, databases, and computer programs.
  • the database stores data related to a process processing method provided by the above various embodiments, such as information such as the name of each process or application.
  • the computer program can be executed by a processor for implementing a process processing method provided by various embodiments of the present application.
  • the internal memory provides a cached operating environment for operating systems, databases, and computer programs in non-volatile storage media.
  • the display screen can be a touch screen, such as a capacitive screen or an electronic screen, for displaying interface information of an application corresponding to the foreground process, and can also be used for detecting a touch operation acting on the display screen, and generating corresponding instructions, such as pre-application. Program switching instructions, etc.
  • FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the terminal to which the solution of the present application is applied.
  • the specific terminal may include a ratio. More or fewer components are shown in the figures, or some components are combined, or have different component arrangements.
  • the terminal further includes a network interface connected through a system bus, and the network interface may be an Ethernet card or a wireless network card, etc., for communicating with an external terminal, for example, for communicating with a server.
  • a partial architectural diagram of a terminal is provided.
  • the architecture system of the terminal includes a JAVA spatial layer 210, a local framework layer 220, and a kernel (Kernel) spatial layer 230.
  • the freeze and thaw application 210 can be included in the JAVA spatial layer.
  • the freeze and thaw application 210 can be used by the terminal to implement a freeze policy for each application, and freeze the related application of the background power consumption.
  • the resource priority and restriction management module 222 and the platform freeze management module 224 are included in the local framework layer 220.
  • the terminal can maintain different applications in different priorities and different resource organizations through the resource priority and limit management module 222, and adjust the resource group of the application according to the requirements of the upper layer to achieve optimized performance and save power. .
  • the terminal freezes the task that can be frozen in the background by the platform freeze management module 224, and allocates the freeze layer to the preset different levels according to the length of the entry freeze time.
  • the freeze layer may include three, respectively: CPU limit Sleep mode, CPU freeze sleep mode, process deep freeze mode.
  • the CPU restricts the sleep mode to limit the CPU resources occupied by the related processes, so that the related processes occupy less CPU resources, and the free CPU resources are tilted to other unfrozen processes, thereby limiting the occupation of CPU resources.
  • the kernel space layer 230 includes a UID management module 231, a Cgroup module 232, a Binder management module 233, a process memory collection module 234, and a timeout freeze exit module 235.
  • the UID management module 231 is configured to implement an application-based User Identifier (UID) to manage resources of a third-party application or freeze. Compared with the Process Identifier (PID) for process management and control, it is easier to uniformly manage the resources of a user's application through UID.
  • the Cgroup module 232 is used to provide a complete set of Central Processing Unit (CPU), CPUSET, memory, input/output (I/O), and Net related resource restriction mechanisms.
  • the Binder management module 233 is used to implement the priority control of the background binder communication.
  • the interface module of the local framework layer 220 includes a binder interface developed to the upper layer, and the upper layer framework or application sends a resource restriction or frozen instruction to the resource priority and restriction management module 222 and the platform freeze management module 224 through the provided binder interface.
  • the process memory recovery module 234 is configured to implement the process deep freeze mode, so that when a third-party application is in a frozen state for a long time, the file area of the process is mainly released, thereby saving the memory module and speeding up the application next time. The speed at startup.
  • the timeout freeze exit module 235 is configured to solve the abnormality generated by the freeze timeout scenario.
  • an application freeze method is provided. This embodiment is described by applying the method to the terminal shown in FIG. 1 as an example.
  • the application freeze method includes:
  • Step 302 Query the duration of the application holding the wake-up lock in the background according to a preset period.
  • the application corresponding to the operation page of the application displayed by the current display interface of the terminal is the foreground application currently running by the terminal, and the application running in the background is the application.
  • a wake-up lock is a software mechanism that controls the power state of a host device.
  • the operating system can export explicit power management handles and APIs to specify when a component needs to remain open or awake until it is explicitly released from the task. Among them, as long as there is a resource occupying this wakelock lock, the system cannot sleep and can be obtained by the application or the kernel.
  • the Android architecture exports the wakelock mechanism through PowerManager. Wake-up locks can be divided into and recognize four user wake-up locks:
  • the wake-up lock is an application/release mechanism. When the application needs to keep some components open, it will apply for a wake-up lock to wake up the terminal to perform related tasks. When these components are no longer needed, the wake-up lock needs to be released. .
  • the operating system receives a notification when the application requests a wakelock and releases the wakelock. Therefore, the operating system can record the time the application holds the wake-up lock in the background by calling the application to apply for the wake-up lock and calling the application to release the wake-up lock. For example, the operating system can monitor when the contents of the /sys/power/wake_lock file (requires root access) to know when the CPU resource has wakelock enabled and which service has wakelock enabled. The operating system periodically queries the length of time that all applications hold the wake-up lock, which can be the time interval from the moment the application starts holding the wake-up lock to the current time.
  • Step 304 Acquire a preset freeze coefficient of each application.
  • Each application has a preset freeze coefficient.
  • the freeze coefficient of each application can be the same or different.
  • the preset freeze factor can be used to characterize the expectation that the application needs to be frozen. The larger the preset freeze coefficient, the higher the expectation.
  • the preset freeze coefficient table can be called to obtain the preset freeze coefficient of the application.
  • the preset freeze coefficient is stored in the preset freeze coefficient table, and the mapping relationship between the application and the preset freeze coefficient is stored in the preset freeze coefficient table.
  • the mapping relationship in the preset freezing coefficient table may be set according to a preset condition, wherein the setting of the preset freezing coefficient may be set according to conditions such as an operating frequency of the application, a running time, and an resource occupancy rate of the application.
  • the preset freeze coefficient table may be set by the system default or according to user requirements. According to different preset conditions, a plurality of preset freeze coefficient tables may be set, and each freeze coefficient table corresponds to a preset condition.
  • Step 306 Adjust the preset freeze coefficient according to the duration of the application holding the wake lock to obtain a real-time freeze coefficient.
  • the preset freeze coefficient is adjusted according to the duration of the wake-up lock held by the application obtained in the foregoing step and the preset freeze coefficient corresponding to the application.
  • Each application has a different duration of holding the wake-up lock in the background.
  • the preset freeze coefficient of each application will be different, and the preset freeze coefficient can be adjusted according to the length of time the application holds the wake-up lock.
  • the preset freeze coefficient will increase as the duration of holding the wake-up lock increases to obtain the real-time freeze coefficient.
  • Step 308 When the real-time freezing coefficient is greater than a preset threshold, the application is frozen.
  • the application When the application holds the wake-up lock for a long time, the application will always be in the background running state, which will occupy certain resources and affect the overall power consumption of the terminal.
  • the acquired real-time freezing coefficient reaches a certain value, that is, the freezing coefficient is greater than
  • the threshold is preset, the application running in the background is frozen, so that it cannot run in the background, releasing system resources and saving power.
  • the application freezing method is configured to query, according to a preset period, a duration that the application holds the wake lock; obtain a preset freeze coefficient of each application; and adjust the preset freeze coefficient according to a duration of the application holding the wake lock. Obtaining a real-time freeze coefficient; freezing the application when the real-time freeze coefficient is greater than a preset threshold.
  • the preset freeze coefficient can be adjusted according to the duration of the wake lock held by the application to obtain a real-time freeze coefficient.
  • the real-time freeze coefficient is greater than the preset threshold, the application running in the background is frozen, so that it cannot be run in the background, and released. System resources, saving power.
  • the method before acquiring the preset freeze coefficient of each application, the method includes:
  • Step 402 Obtain a resource occupancy rate or an operating frequency of the application.
  • the resource usage rate can be CPU usage or memory usage.
  • the CPU usage refers to the CPU resources occupied by the running application, indicating the running of the terminal at a certain point in time.
  • Memory usage refers to the memory overhead of all processes in the application.
  • a process is a running activity of a program on a computer on a data set. It is the basic unit of the system for resource allocation and scheduling, and is the basis of the operating system structure.
  • the terminal may collect the maximum value of the resource occupancy rate of the application in the preset period as the resource occupancy rate, or collect the multiple instantaneous resource usage rates of the application in the preset period, according to multiple moments collected.
  • the resource occupancy rate obtains an average value of the resource usage rate, and the average value of the acquired resource usage rate is used as the resource occupancy rate of the application.
  • the terminal may also use other methods to count the resource usage of the application, which is not further limited herein.
  • the terminal can count the number of times the application runs in the foreground in a preset period, and the number of starts is used as the running frequency of the application.
  • Step 404 Set a preset freezing coefficient of the corresponding application according to the resource occupancy rate or the running frequency.
  • the preset freeze coefficient of each application may be set according to the resource occupancy rate, wherein the higher the resource occupancy rate, when the application is running in the background, it is highly likely to cause a jam, affecting the smoothness of the terminal.
  • the user has higher expectation of freezing the application with high resource occupancy rate, and the value of the corresponding preset freezing coefficient can be set larger. That is, the higher the resource occupancy rate of the application, the larger the corresponding preset freezing coefficient.
  • the preset freeze coefficient table is formed according to the correspondence between the resource occupancy rate of the application and the preset freeze coefficient.
  • the corresponding preset freeze coefficient can also be set according to the running frequency of the application.
  • the high frequency of operation indicates that the application is used more frequently by the user; the low frequency of operation indicates that the application is not frequently used by the user. That is, the user has a higher expectation of freezing the application with a lower running frequency, and the value of the corresponding preset freezing coefficient can be set larger. That is, the lower the running frequency of the application, the larger the corresponding preset freezing coefficient.
  • the preset freeze coefficient table can also be formed according to the correspondence between the running frequency of the application and the preset freezing coefficient.
  • the user can also set the preset freeze list according to the running time, network usage, environment information, etc., and no further limitation is made here.
  • the adjusting the preset freeze coefficient to obtain a freeze coefficient according to the duration of the application holding the wake lock includes:
  • Step 502 Acquire a running time of the application running in the foreground in the preset period.
  • the terminal can count the number of starts of the application running in the foreground during the preset period, and the single running time after each startup.
  • the running time of the application running in the foreground is the sum of the single running time after each startup of the application in the preset period, that is, the cumulative running time of the application in the preset period.
  • Step 504 Determine a freeze weighting factor according to the running time length and the duration of holding the wake lock.
  • the freeze weight factor can be determined by the running time and the duration of holding the wake lock, and the freeze weight factor is used to adjust the preset freeze coefficient to obtain the real-time freeze coefficient.
  • determining the freeze weighting factor according to the running time length and the duration of holding the wakelock comprises: calculating a ratio of the running time length to the duration of holding the wakelock; searching and determining in the preset weight table The frozen weight factor corresponding to the ratio.
  • the weighting factor is determined according to the magnitude of the ratio K by calculating the ratio K of the duration of holding the wake-up lock to the running time.
  • the frozen weighting factor corresponding to the ratio K is found by calling a preset weight table. In the preset weight table, the larger the ratio K, the larger the corresponding freeze weight factor. If the ratio K is larger, it can be considered that the duration of holding the wake-up lock of the application is longer than the running time, and the duration of holding the wake-up lock is much longer than the running time. In this case, the application can be considered not to be frequently used by the user. The application, the user expects to freeze the application is relatively large. If the ratio K is less than 1, the application can be considered as an application that is frequently used by the user, and the user's expectation of freezing the application is relatively small.
  • the freeze weight factor may also be determined according to the difference by calculating a difference between the duration of the wakelock and the running time.
  • the preset weight table may be set by default or may be set according to user requirements. The user can adjust the correspondence between the ratio K and the frozen weight factor according to his own needs.
  • Step 506 Determine the real-time freezing coefficient according to the freeze weighting factor and the preset freezing coefficient.
  • the freeze weight factor can be determined according to the running time of the application and the duration of holding the wake lock, and the preset freeze coefficient is adjusted according to the obtained weight factor to obtain the real-time freeze coefficient.
  • the real-time freezing coefficient is the sum of the preset freezing coefficient and the frozen weighting factor. That is:
  • Real-time freeze coefficient preset freeze coefficient + freeze weight factor.
  • the application freezing method includes:
  • Step 602 Query the duration of the application holding the wake lock in the background according to the preset period.
  • Step 604 Acquire a preset freeze coefficient of the application.
  • Step 606 Adjust the preset freeze coefficient according to the duration of the application holding the wake lock to obtain a real-time freeze coefficient.
  • steps 602, 604, and 606 are in one-to-one correspondence with the steps 302, 304, and 306 in the foregoing embodiment, and are not described again.
  • Step 608 When the real-time freezing coefficient is greater than a preset threshold, determine whether the application meets a preset condition.
  • Step 610 When the preset condition is met, the application is frozen.
  • the real-time freezing coefficient is greater than the preset threshold, it is further determined whether the application meets the preset condition, and when the application meets the preset condition, the application is frozen.
  • preset conditions you can avoid freezing applications such as audio playback and downloading that are running in the background, and avoid affecting users from using them normally.
  • the preset condition includes a preset application scenario and a whitelist, wherein the preset application scenario may be an important scenario such as audio playback and downloading, and the user may be affected after the interruption. Experience.
  • Determining whether the application meets the preset conditions including:
  • Step 702 Determine the application application scenario, and compare the application scenario of the application with the preset scenario.
  • the application determines the application scenario of the application, such as WeChat, qq message push, etc., by calling the interface of the Android system during the foreground or background operation.
  • the user can customize the preset application scenario according to the requirements, such as audio playback, data transmission (uploading, downloading), and message pushing. If the application scenario of the application is a preset application scenario, if the application is frozen, Will affect the user experience.
  • Step 704 When the application scenario of the application is the same as the preset scenario, determine whether the application is saved in the whitelist.
  • an application in the whitelist is an application that is not allowed to freeze.
  • Step 706 If not saved in the whitelist, the application satisfies the preset condition.
  • Taobao or Jingdong's shopping application such applications will also have a message push application scenario.
  • Taobao and Jingdong's shopping applications are not stored in the whitelist, only WeChat, QQ is saved in the white list. That is, the application program for Taobao and Jingdong's shopping applications satisfies the preset conditions and can be frozen.
  • the application does not satisfy the preset condition and will not freeze it.
  • freezing the application includes:
  • Step 802 Acquire an application identifier of the application.
  • Each application has a unique app ID that uniquely identifies the corresponding app.
  • the application identifier may be composed of a combination of one or more of a number, a letter or other characters of a preset number of digits.
  • Step 804 Acquire a freeze level of the application with the application identifier in a preset database.
  • a freeze level for each application is stored in the preset database, and the freeze level is used to indicate the maximum allowable resources that can be used by the application.
  • the resources that can be used represent the resources that the process can use at each moment of execution.
  • the maximum allowed resource represents the maximum resource that the process is allowed to use at various times.
  • the process is a basic operation of a program on a certain data set in a computer. It is the basic unit for resource allocation and scheduling, and is the basis of the operating system structure.
  • the terminal may acquire the background process according to a preset frequency or according to the detected user operation instruction.
  • the application obtains the corresponding freeze level from the preset database.
  • the user can configure the corresponding freeze level for each application.
  • the freeze level of the application may be divided into first level, second level, third level, and fourth level, wherein the lowest level of freezing level is one level, and the highest level of freezing level is four levels.
  • the foregoing resources may include a CPU, an I/O file resource, and the like. Take resources as memory for an example. If the memory required by the background process is 40Mb, if the freeze level is one level (lowest level), the background process is allocated resources according to the level 1 freeze level, and the maximum allowable resource that the application can use is 30Mb; For level 4 (the highest level), the background process is allocated resources according to the level 4 freeze level, and the maximum allowable resource that the application can use is 0Mb. Among them, the highest level of freezing level is completely frozen.
  • Step 806 Perform freeze on the application level according to the freeze level.
  • the application is frozen according to the freeze level configured by the application.
  • the freeze level of the application is different, different degrees of freezing operations may be performed according to each application, instead of making all applications satisfying the preset condition completely frozen, and the application may be completely frozen.
  • the state is convenient for the user to quickly and effectively unfreeze the application and improve the user experience.
  • the root-root freeze level limits the maximum allowed resources that an application can use, and can also allocate resources reasonably and reduce power consumption.
  • an application freezing device is provided, the device comprising:
  • the querying module 910 is configured to query, according to a preset period, a duration that the application holds the wake lock in the background;
  • the obtaining module 920 is configured to acquire a preset freezing coefficient of the application
  • the adjusting module 930 is configured to adjust the preset freezing coefficient according to a duration of the application holding the wake lock to obtain a real-time freezing coefficient
  • the freezing module 940 is configured to freeze the application when the real-time freezing coefficient is greater than a preset threshold.
  • the application freezing device the query module 910 can query the duration of the wake lock held by the application according to the preset period; the obtaining module 920 can acquire the preset freezing coefficient of each application; and the adjusting module 930 holds the wakeup according to the application.
  • the duration of the lock adjusts the preset freeze coefficient to obtain a real-time freeze coefficient; when the real-time freeze coefficient is greater than a preset threshold, the freeze module 940 freezes the application.
  • the application freezing device can adjust the preset freezing coefficient according to the duration of the wake lock held by the application to obtain the real-time freezing coefficient. When the real-time freezing coefficient is greater than the preset threshold, the application running in the background is frozen, so that the program cannot be frozen. Run in the background to release system resources and save power.
  • the adjustment module includes:
  • a first obtaining unit configured to acquire, in the preset period, a running time of the application running in the foreground
  • a first determining unit configured to determine a freeze weight factor according to the running time length and a duration of holding the wake lock; the first determining unit is further configured to calculate a ratio of the running time length to the duration of the holding the wake lock; Finding a weighting factor corresponding to the ratio in the weight table;
  • a second determining unit configured to determine the real-time freezing coefficient according to the freeze weighting factor and a preset freezing coefficient.
  • the application freezing device further includes:
  • the coefficient setting module is configured to acquire a resource occupancy rate or an operating frequency of the application; and set a preset freezing coefficient of the corresponding application according to the resource occupancy rate or the running frequency.
  • the application freezing device further includes:
  • the determining module is configured to determine whether the application meets a preset condition; when the preset condition is met, the application is frozen.
  • the preset condition includes a preset application scenario and a whitelist
  • the determining module is further configured to determine an application scenario of the application, and compare the application scenario of the application with the preset scenario; When the application scenario of the program is different from the preset scenario, it is determined whether the application is saved in the whitelist; if not stored in the whitelist, the application satisfies the preset condition.
  • the freeze module includes:
  • An identifier obtaining unit configured to acquire an application identifier of the application
  • a level determining unit configured to acquire, in a preset database, a freeze level of an application having the application identifier, where the freeze level is used to indicate that a maximum allowed resource that can be used by the application is configured;
  • a freezing unit configured to freeze the corresponding level of the application according to the freezing level.
  • each module in the application freezing device is for illustrative purposes only. In other embodiments, the application freezing device may be divided into different modules as needed to complete all or part of the functions of the application freezing device.
  • a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the application freeze method provided by the various embodiments described above.
  • a terminal including a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor freezes when the processor executes the computer program The steps of the method.
  • the embodiment of the present 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 steps of the application freezing method provided by the various embodiments described above.
  • the embodiment of the present application further provides a terminal.
  • a terminal As shown in FIG. 10, for the convenience of description, only the parts related to the embodiments of the present application are shown. For the specific technical details not disclosed, refer to the method part of the embodiment 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 terminal is a mobile phone as an example:
  • FIG. 10 is a block diagram showing a part of a structure of a mobile phone related to a terminal provided by an embodiment of the present application.
  • the mobile phone includes: a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, and a processor 1080. And power supply 1090 and other components.
  • RF radio frequency
  • the RF circuit 1010 can be used for receiving and transmitting signals during the transmission and reception of information or during a call.
  • the downlink information of the base station can be received and processed by the processor 1080.
  • the uplink data can also be sent to the base station.
  • RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
  • LNA Low Noise Amplifier
  • RF circuit 1010 can also communicate with the network and other devices via wireless communication.
  • the above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Messaging Service (SMS), and the like.
  • GSM Global System of Mobile communication
  • GPRS General Pack
  • the memory 1020 can be used to store software programs and modules, and the processor 1080 executes various functional applications and data processing of the mobile phone by running 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 required for at least one function (such as an application of a sound playing function, an application of an image playing function, etc.);
  • the data storage area can store data (such as audio data, address book, etc.) created according to the use of the mobile phone.
  • memory 1020 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 1030 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset 1000.
  • the input unit 1030 may include an operation panel 1031 and other input devices 1032.
  • the operation panel 1031 which may also be referred to as a touch screen, may collect touch operations on or near the user (such as an operation of the user using a finger, a stylus, or the like on the operation panel 1031 or in the vicinity of the operation panel 1031). And drive the corresponding connection device according to a preset program.
  • the operation panel 1031 may include two parts of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 1080 is provided and can receive commands from the processor 1080 and execute them.
  • the operation panel 1031 can be realized by various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 1030 may further include other input devices 1032.
  • other input devices 1032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.).
  • the display unit 1040 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display unit 1040 may include a display panel 1041.
  • the display panel 1041 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the operation panel 1031 may cover the display panel 1041, and when the operation panel 1031 detects a touch operation thereon or nearby, it is transmitted to the processor 1080 to determine the type of the touch event, and then the processor 1080 according to the touch event The type provides a corresponding visual output on display panel 1041.
  • the operation panel 1031 and the display panel 1041 are two independent components to implement the input and input functions of the mobile phone, in some embodiments, the operation panel 1031 and the display panel 1041 may be integrated to implement the mobile phone. Input and output functions.
  • the handset 1000 can also include at least one type of sensor 1050, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor may close the display panel 1041 and/or when the mobile phone moves to the ear. Or backlight.
  • the motion sensor may include an acceleration sensor, and the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
  • the acceleration sensor can detect the magnitude of the acceleration in each direction, and the magnitude and direction of the gravity can be detected at rest, and can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching), and vibration recognition related functions (such as Pedometer, tapping, etc.; in addition, the phone can also be equipped with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors.
  • Audio circuitry 1060, speaker 1061, and microphone 1062 can provide an audio interface between the user and the handset.
  • the audio circuit 1060 can transmit the converted electrical data of the received audio data to the speaker 1061, and convert it into a sound signal output by the speaker 1061; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, by the audio circuit 1060. After receiving, it is converted into audio data, and then processed by the audio data output processor 1080, transmitted to another mobile phone via the RF circuit 1010, or outputted to the memory 1020 for subsequent processing.
  • WiFi is a short-range wireless transmission technology.
  • the mobile phone through the WiFi module 1070 can help users to send and receive e-mail, browse the web and access streaming media, etc. It provides users with wireless broadband Internet access.
  • FIG. 10 shows the WiFi module 1070, it can be understood that it does not belong to the essential configuration of the mobile phone 1000 and can be omitted as needed.
  • the processor 1080 is the control center of the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 1020, and invoking data stored in the memory 1020, The various functions of the mobile phone and the processing of the data, so that the overall monitoring of the mobile phone.
  • processor 1080 can include one or more processing units.
  • the processor 1080 can integrate an application processor and a modem, wherein the application processor primarily processes an operating system, a user interface, an application, etc.; the modem primarily processes wireless communications. It will be appreciated that the above described modem may also not be integrated into the processor 1080.
  • the processor 1080 can integrate an application processor and a baseband processor, and the baseband processor and other peripheral chips can form a modem.
  • the mobile phone 1000 also includes a power source 1090 (such as a battery) that supplies power to various components.
  • the power source can be logically coupled to the processor 1090 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the handset 1000 may also include a camera, a Bluetooth module, and the like.
  • the processor included in the mobile phone implements the application freezing method described above when executing a computer program stored in the memory.
  • Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM), which acts as an external cache.
  • RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronization.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR SDRAM dual data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM Link (Synchlink) DRAM
  • SLDRAM Memory Bus
  • Rambus Direct RAM
  • RDRAM Direct Memory Bus Dynamic RAM
  • RDRAM Memory Bus Dynamic RAM

Abstract

La présente invention concerne un procédé et un appareil pour geler une application, ainsi qu'un support de stockage et un terminal. Le procédé consiste à : interroger, selon une période prédéfinie, la durée d'une application contenant un verrou d'éveil en arrière-plan ; acquérir un coefficient de gel prédéfini de l'application ; ajuster le coefficient de gel prédéfini en fonction de la durée de l'application tenant le verrou d'éveil, de façon à obtenir un coefficient de gel en temps réel ; et, lorsque le coefficient de gel en temps réel est supérieur à une valeur de seuil prédéfinie, geler l'application.
PCT/CN2018/116925 2017-12-29 2018-11-22 Procédé et appareil pour geler une application et support de stockage et terminal WO2019128569A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711488981.9A CN110018885B (zh) 2017-12-29 2017-12-29 应用程序冻结方法、装置、存储介质和终端
CN201711488981.9 2017-12-29

Publications (1)

Publication Number Publication Date
WO2019128569A1 true WO2019128569A1 (fr) 2019-07-04

Family

ID=67065072

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/116925 WO2019128569A1 (fr) 2017-12-29 2018-11-22 Procédé et appareil pour geler une application et support de stockage et terminal

Country Status (2)

Country Link
CN (1) CN110018885B (fr)
WO (1) WO2019128569A1 (fr)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732434A (zh) * 2019-10-28 2021-04-30 华为终端有限公司 一种应用管理方法及装置
CN114153621B (zh) * 2022-02-09 2022-06-07 荣耀终端有限公司 系统进程调控方法、装置、电子设备及可读存储介质
CN115981812A (zh) * 2022-12-19 2023-04-18 广州文石信息科技有限公司 应用程序管理方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468426A (zh) * 2016-01-05 2016-04-06 珠海市魅族科技有限公司 一种应用冻结的方法及终端
CN106020415A (zh) * 2016-05-09 2016-10-12 深圳市万普拉斯科技有限公司 智能设备待机状态下的应用控制方法及装置
CN106959874A (zh) * 2017-03-21 2017-07-18 联想(北京)有限公司 基于操作系统的应用管理方法及应用该方法的电子设备

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8132171B2 (en) * 2006-12-22 2012-03-06 Hewlett-Packard Development Company, L.P. Method of controlling thread access to a synchronization object
CN103324519A (zh) * 2013-06-17 2013-09-25 华为技术有限公司 一种恶意耗电应用的清理方法、装置及用户终端
US9229522B1 (en) * 2013-08-27 2016-01-05 Symantec Corporation Mobile battery performance by identifying apps that disproportionally run background tasks that prevent mobile devices from sleeping
US20150160968A1 (en) * 2013-12-11 2015-06-11 Metratech Corp. Freezing a call stack
CN104156053B (zh) * 2014-07-29 2015-12-30 努比亚技术有限公司 一种异常耗电的控制方法、装置和移动终端
CN104360885A (zh) * 2014-11-18 2015-02-18 深圳市中兴移动通信有限公司 一种启动控制方法、装置及终端
CN105867581A (zh) * 2015-12-16 2016-08-17 乐视移动智能信息技术(北京)有限公司 一种实现功耗优化的方法、装置及移动终端
CN106020426B (zh) * 2016-05-31 2018-12-11 广东欧珀移动通信有限公司 一种唤醒锁的释放方法和装置
CN106095419A (zh) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 唤醒锁释放方法及装置
CN106020964A (zh) * 2016-06-30 2016-10-12 宇龙计算机通信科技(深圳)有限公司 一种应用冻结的方法、装置以及终端
CN107402809A (zh) * 2017-07-31 2017-11-28 广东欧珀移动通信有限公司 应用程序的管控方法、装置、存储介质及电子设备

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468426A (zh) * 2016-01-05 2016-04-06 珠海市魅族科技有限公司 一种应用冻结的方法及终端
CN106020415A (zh) * 2016-05-09 2016-10-12 深圳市万普拉斯科技有限公司 智能设备待机状态下的应用控制方法及装置
CN106959874A (zh) * 2017-03-21 2017-07-18 联想(北京)有限公司 基于操作系统的应用管理方法及应用该方法的电子设备

Also Published As

Publication number Publication date
CN110018885B (zh) 2021-06-01
CN110018885A (zh) 2019-07-16

Similar Documents

Publication Publication Date Title
US11099900B2 (en) Memory reclamation method and apparatus
WO2019128540A1 (fr) Procédé de gestion de ressources, terminal mobile et support d'informations lisible par ordinateur
WO2019128546A1 (fr) Procédé de traitement de programme d'application, dispositif électronique et support de stockage lisible par ordinateur
WO2020024732A1 (fr) Procédé de traitement de processus, dispositif électronique et support de stockage lisible par ordinateur
CN110018901B (zh) 内存回收方法、装置、计算机设备和计算机可读存储介质
WO2020093208A1 (fr) Procédé et appareil de traitement d'applications, dispositif informatique, et support de stockage lisible par ordinateur
CN110032267B (zh) 信息处理方法、装置、移动终端及计算机可读存储介质
WO2019128549A1 (fr) Procédé et appareil permettant de geler une application, et terminal et support de stockage lisible par ordinateur
WO2019128537A1 (fr) Procédé de gel d'application, dispositif informatique, et support de stockage lisible par ordinateur
WO2019137252A1 (fr) Procédé de traitement de mémoire, dispositif électronique et support de stockage lisible par ordinateur
CN106775685B (zh) 唤醒锁释放方法和装置、移动终端
CN110032266B (zh) 信息处理方法、装置、计算机设备和计算机可读存储介质
CN107577508B (zh) 应用程序处理方法、装置、可读存储介质和移动终端
WO2019128573A1 (fr) Procédé de traitement d'informations, appareil, dispositif informatique et support d'informations lisible par ordinateur
WO2019128588A1 (fr) Procédé et appareil de traitement de processus, dispositif électronique et support d'informations lisible par ordinateur
WO2019128569A1 (fr) Procédé et appareil pour geler une application et support de stockage et terminal
WO2019128571A1 (fr) Procédé et dispositif de gestion de ressources, terminal mobile, ainsi que support d'informations lisible par ordinateur
WO2019128574A1 (fr) Procédé et dispositif de traitement d'informations, dispositif informatique et support d'informations lisible par ordinateur
WO2019128586A1 (fr) Procédé de traitement d'applications, dispositif électronique et support de stockage lisible par ordinateur
WO2019137173A1 (fr) Procédé de gestion de ressources, terminal mobile et support d'informations lisible par ordinateur
CN110018886B (zh) 应用状态切换方法和装置、电子设备、可读存储介质
WO2019128570A1 (fr) Appareil et procédé de gel d'une application et support de stockage et terminal
CN110045811B (zh) 应用程序处理方法和装置、电子设备、计算机可读存储介质
CN109375995B (zh) 应用冻结方法和装置、存储介质、电子设备
WO2019128553A1 (fr) Procédé de traitement d'application, dispositif électronique et support de stockage lisible par ordinateur

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18895106

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18895106

Country of ref document: EP

Kind code of ref document: A1