Application management method and apparatus, terminal, and readable storage medium
By identifying the application to be frozen and its sensor type on the terminal, and using the Linux Cgroup Freezer subsystem for application freezing, the problem of the single freezing method in the existing technology is solved, and more efficient resource saving and heat reduction are achieved.
Patent Information
- Application Number
- CN201910810521.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-29
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2040-01-30
AI Technical Summary
Existing technologies employ limited freezing methods, resulting in poor effectiveness and impacting terminal resource consumption and heat generation.
By identifying the applications on the terminal to be frozen and detecting the types of sensors they request, the system combines the application and sensor types to determine whether to perform a freezing operation, and uses the Linux Cgroup Freezer subsystem for application resource scheduling.
It effectively improves the freezing effect of the application, saves resources and heat generation, and ensures that the normal use of the terminal is not affected.
Smart Images

Figure CN112445586B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to, but are not limited to, the technical field of computer technology, in particular, relate to, but are not limited to, an application management method and device, a terminal and a readable storage medium. BACKGROUND
[0002] The functions of terminal applications are increasingly rich and powerful. The more applications installed, even if not used, the battery consumption can be felt to be fast, and the heating becomes obvious, which is mainly because a considerable part of the application, although not running in the foreground, but often "sneak" in the background running and occupying system resources.
[0003] The application freezing technology is mainly a method for limiting application occupation of system resources based on an intelligent terminal. It mainly includes prohibiting occupation of CPU resources, Sensor sensors, GPS navigation systems, memory and other system resources. It can effectively save power consumption, prolong battery life, and also reduce system load and reduce heating.
[0004] After the application is frozen, the application no longer consumes resources, but the application itself is still alive, and the various business logic contacts with other modules of the system also exist. Some applications monitor the state changes of the system and apply for wake-up sensors, such as lifting gestures, movements, etc. If the applications applying for these sensors are frozen, the functions of the applications themselves will be affected. Conversely, if the applications applying for these sensors are not frozen, the freezing effect will be greatly reduced, affecting the original intention of energy saving, so how to effectively control the freezing of the applications applying for the sensors is very important. SUMMARY
[0005] The application management method, device, terminal and readable storage medium provided by the embodiments of the present application mainly solve the problem in the related art that the application freezing means is single and the effect is poor.
[0006] To solve the above technical problems, the application management method provided by the embodiments of the present application comprises:
[0007] Determine an application to be frozen on a terminal;
[0008] Detect a sensor on the terminal applied by the application to be frozen;
[0009] Based on the application to be frozen and the type of the sensor applied by the application, determine whether to freeze the application, and perform corresponding operations.
[0010] The application management device provided by the embodiments of the present application comprises:
[0011] A freezing determination module is configured to determine an application to be frozen on the terminal;
[0012] A detection module is configured to detect a sensor on the terminal applied by the application to be frozen;
[0013] A freezing module is configured to determine whether to freeze the application based on the application to be frozen and the sensor type applied by the application, and perform corresponding operations.
[0014] The embodiment of the application further provides a terminal, which comprises a processor, a memory, a plurality of sensors and a communication bus;
[0015] The communication bus is configured to realize connection and communication among the processor, the sensors and the memory.
[0016] The processor is configured to execute one or more computer programs stored in the memory, so as to realize the steps of the application management method.
[0017] The embodiment of the application further provides a computer storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to realize the steps of the application management method.
[0018] The embodiment of the application has the following beneficial effects:
[0019] According to the application management method, the application management device, the terminal and the readable storage medium provided by the embodiment of the application, the application to be frozen on the terminal is determined, the sensor on the terminal applied by the application to be frozen is detected, and whether to freeze the application is determined based on the application to be frozen and the sensor type applied by the application, and corresponding operations are performed. Therefore, whether to freeze the application is determined by combining the application type and the sensor type applied by the application when freezing the application, so that the freezing method of the application is effectively improved, and the freezing effect is greatly improved without affecting the normal use of the terminal.
[0020] Other features and corresponding beneficial effects of the application are described in the latter part of the specification, and it should be understood that at least part of the beneficial effects is obvious from the description of the application in the specification. BRIEF DESCRIPTION OF DRAWINGS
[0021] Figure 1 The application management method flowchart is provided for the first embodiment of the application;
[0022] Figure 2 The application management method flowchart is provided for the second embodiment of the application;
[0023] Figure 3 The application management device composition schematic diagram is provided for the third embodiment of the application;
[0024] Figure 4 A terminal structure schematic diagram provided for the fourth embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the objectives, technical solutions and advantages of the present application clearer, further detailed description will be made to the embodiments of the present application by specific implementation manners combined with the drawings. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0026] Embodiment one:
[0027] The present embodiment provides an application management method, please refer to Figure 1 The method comprises:
[0028] S101, determining an application to be frozen on a terminal;
[0029] S102, detecting a sensor on the terminal applied by the application to be frozen;
[0030] S103, determining whether to freeze the application based on the application to be frozen and the sensor type applied by the application, and performing corresponding operations.
[0031] The freezing of the application on the terminal refers to the development based on the Linux Cgroup Freezer subsystem, which is used to start and stop the process to achieve the purpose of resource scheduling. The application after freezing no longer consumes resources, but the application itself is still alive, and the various business logic contacts with other modules of the system also exist. When the user wants to use the application again, the application only needs to be scheduled out of the background of the terminal. In this way, the application does not need to be opened and run again, saving the loading time of the application. During the running of the application, various sensors on the terminal will be applied to assist the use to achieve the corresponding functions, such as the gyroscope, acceleration sensor, etc. on the terminal when the navigation application is used. The sensor is a detection device that can sense the measured information and can convert the sensed information into an electrical signal or other required form of information output to the terminal interior, and then perform subsequent processing. When the application on the terminal is frozen, the sensors applied by these applications need to be considered, which may affect the use of the terminal.
[0032] All applications on the terminal are not suitable for freezing, such as the applications necessary for the terminal to run, such as telephone, short message, etc. Therefore, it is extremely important to determine under what circumstances the application can be frozen, that is, how to selectively freeze the application.
[0033] In some embodiments, before determining whether to freeze the application, the method can further comprise:
[0034] classifying the applications on the terminal, the classified categories including at least system critical applications. System critical applications are generally applications that are not suitable for being frozen, and such applications need to be kept running under normal circumstances to ensure that the terminal functions normally. For most terminals, system critical applications include applications that come with the terminal, such as phone, text message, date and time, etc. In addition, system critical applications can also include high-frequency applications on the terminal determined according to user usage habits, such as WeChat, which is mainly used for social networking. Although such applications are not provided by the terminal, their use frequency is too high, and once frozen, they can directly affect the normal life of the user, and therefore should be considered as system critical applications for the user. In addition, system critical applications can also be applications determined according to user input, i.e., applications specified by the user. The determination methods of these system critical applications are feasible in this embodiment.
[0035] In some embodiments, determining whether to freeze the application based on the application to be frozen and the sensor type applied by the application can comprise:
[0036] When the application is a system critical application, it is determined not to freeze the application. Since the application is a system critical application, in order not to affect the normal operation of the terminal, the system critical application is not frozen when the application is frozen. In other words, for phone, text message, WeChat, etc. on the terminal, they are not frozen, so that the phone can be normally dialed and answered, and text messages and WeChat can be normally sent and received. For terminals such as mobile phones, the basic function is still communication, and the normal operation of the basic function needs to be ensured.
[0037] In some embodiments, before determining whether to freeze the application, the method can further comprise:
[0038] classifying the sensors on the terminal, the classified categories including at least first type sensors and second type sensors, wherein the first type sensors wake up the system, and the second type sensors do not wake up the system. During the running of the applications on the terminal, various sensors on the terminal can be applied to ensure the normal running of the applications. The sensors on the terminal are classified into two categories, one of which wakes up the system, and the other of which does not wake up the system. For the sensors that do not wake up the system, the applications that apply such sensors can be directly frozen, and after being frozen, the system will not be affected again due to the applied sensors.
[0039] In some embodiments, determining whether to freeze the application based on the application to be frozen and the sensor type applied by the application can comprise:
[0040] When the sensor type applied by the application is the second type of sensor, it is determined to freeze the application. When the sensor applied by the application is the second type of sensor, that is, the sensor that does not wake up the system, the application can be directly frozen.
[0041] In some embodiments, determining whether to freeze the application based on the application to be frozen and the sensor type applied by the application can comprise:
[0042] When the sensor type applied by the application is the first type of sensor, if it is further determined that the sensor type applied by the application is a motion sensor, it is determined not to freeze the application. When the sensor type applied by the application is the first type of sensor, that is, the sensor that wakes up the system, it needs to be further determined whether to freeze. The sensors on the terminal can be further divided into motion sensors and environment sensors. The motion sensor is a software SensorList-Sports abstracted based on six basic hardware sensors. It is mainly related to motion, such as motion detection, motion wakeup, significant motion, and the like. It is also related to gestures, such as pickup-sensor. The motion sensor is a sensor that detects the motion of the terminal, such as an acceleration sensor and a gyroscope. The application that applies this type of sensor will not have an ideal freezing effect due to the sensor, and the use experience of the application may be affected after freezing. Therefore, the application is not frozen at this time. The environment sensor is mainly related to hardware, such as a proximity sensor and a brightness sensor.
[0043] In some embodiments, determining whether to freeze the application based on the application to be frozen and the sensor type applied by the application can comprise:
[0044] When the sensor type applied by the application is the first type of sensor, if it is further determined that the sensor type applied by the application is an environment sensor, it is determined not to freeze the application when the terminal is in a bright screen state. For the environment sensor, it is generally in a working state only when the terminal is in a bright screen state, and if the terminal is in a non-bright screen state, it can be directly determined that the application can be frozen.
[0045] In some embodiments, it can further comprise:
[0046] Detecting the freezing condition of the terminal for any sensor;
[0047] When the applications of the sensor are all frozen, the registration application of the sensor is released. In the case that the applications of a certain sensor are all frozen, there is no possibility of being invoked for the sensor, so the registration application of the sensor can be directly released to prevent the possibility of reapplying the sensor.
[0048] In some embodiments, the method further comprises:
[0049] When the frozen application is thawed, the sensor applied by the application before being frozen is determined, and the registration of the sensor is re-applied.
[0050] The embodiment provides an application management method, determines an application to be frozen on a terminal, detects a sensor on the terminal applied by the application to be frozen, determines whether to freeze the application based on the application to be frozen and a sensor type applied by the application to be frozen, and performs corresponding operations. Therefore, by determining whether to freeze the application in combination with the application type and the sensor type applied by the application when the application is frozen, the freezing means of the application is effectively improved, and the freezing effect is greatly improved without affecting the normal use of the terminal.
[0051] Embodiment two
[0052] In the embodiment, an application management method is provided. Please refer to Figure 2 The flow includes the following steps:
[0053] S201, classifying all the applied sensors Sensor and their applications of the terminal. The motion class and the environment class are determined, and it is judged whether each Sensor can be woken up.
[0054] The motion class is a software SensorList-Sports abstracted based on six basic hardware Sensors. It is mainly related to movement, such as motion_detect, motion_wakeup, significant motion, and the like, and is also related to gestures, such as pickup-sensor.
[0055] The SensorList-Environment of the environment class is mainly related to hardware, such as a proximity sensor, a brightness sensor, and a gravity sensor.
[0056] S202, when the freezing module performs freezing processing on the application, if the application is a system key application, the freezing process is ended. Otherwise, the judgment and check of the Sensor class applied by the application are performed.
[0057] S203, when the applied Sensor is not wakeable, directly return the judgment that the application can be frozen; when the applied Sensor is wakeable, further detect the Sensor category applied by the application.
[0058] S204, if the applied Sensor is in the SensorList-Sports list of the sports category, return the judgment that the application cannot be frozen, and end the freezing process of the application. Otherwise, further judge the screen state and the Sensor category.
[0059] S205, if the screen is in the bright screen state, and the applied Sensor is in the SensorList-Environment list of the environment category, such as the proximity sensor, light sensor, etc., return the judgment that the application cannot be frozen, and end the freezing process of the application. Otherwise, return the judgment that the application can be frozen.
[0060] S206, after receiving the judgment that the application can be frozen, the freezing process is performed. And the application is monitored to be unfrozen, and the freezing process is initiated again after being unfrozen.
[0061] S207, after the application is frozen, the list of frozen applications is fed back to the system.
[0062] S208, after receiving the list of frozen applications, the sensors applied by the applications are queried. If all the applications applying a certain sensor sensor are frozen, the registration application of the sensor is released.
[0063] S209, after the application is unfrozen, the list of unfrozen applications is fed back to the system.
[0064] S210, after receiving the list of unfrozen applications, the sensors applied by the applications before are queried, and the sensors are re-applied.
[0065] Embodiment Three
[0066] The embodiment provides an application management device, please refer to Figure 3 The device comprises:
[0067] The freezing determination module 31 is configured to determine the application to be frozen on the terminal.
[0068] The detection module 32 is configured to detect the sensor on the terminal applied by the application to be frozen.
[0069] The freezing module 33 is configured to determine whether to freeze the application based on the application to be frozen and the type of sensor applied by the application, and perform corresponding operations.
[0070] The application freezing on the terminal refers to the development based on the Linux Cgroup Freezer subsystem, which is used to start and stop the process to achieve the purpose of resource scheduling. The application after freezing no longer consumes resources, but the application itself is still alive, and the various business logic contacts with other modules of the system also exist. When the user wants to use the application again, it only needs to schedule the application through the terminal background. In this way, the application does not need to be opened and run again, saving the application loading time. During the running of the application, various sensors on the terminal will be applied to assist the use to achieve the corresponding function, such as the navigation application in use, which will apply the terminal's gyroscope, acceleration sensor, etc. The sensor is a detection device that can sense the measured information and can convert the sensed information into an electrical signal or other required form of information output to the terminal interior, and then perform subsequent processing. When the application on the terminal is frozen, the sensors applied by these applications need to be considered, which may affect the use of the terminal.
[0071] All applications on the terminal are not suitable for freezing, such as applications that must run on the terminal, such as phone, short message, etc. It is generally considered that it is not suitable for freezing, therefore, it is extremely important to determine under what circumstances the application can be frozen, that is, how to selectively freeze the application.
[0072] In some embodiments, before determining whether to freeze the application, it can further include:
[0073] Classifying the applications on the terminal, and the classified categories include at least system critical applications.
[0074] In some embodiments, determining whether to freeze the application based on the application to be frozen and the sensor type applied by the application can include:
[0075] When the application is a system critical application, it is determined not to freeze the application.
[0076] In some embodiments, before determining whether to freeze the application, it can further include:
[0077] Classifying the sensors on the terminal, and the classified categories include at least first type sensors and second type sensors, wherein the first type sensors need to wake up the system, and the second type sensors do not wake up the system.
[0078] In some embodiments, determining whether to freeze the application based on the application to be frozen and the sensor type applied by the application can include:
[0079] When the sensor type applied by the application is the second type of sensor, it is determined that the application is to be frozen. When the sensor applied by the application is the second type of sensor, that is, the sensor that does not wake up the system, the application can be directly frozen.
[0080] In some embodiments, determining whether to freeze the application based on the application to be frozen and the sensor type applied by the application can include:
[0081] When the sensor type applied by the application is the first type of sensor, if it is further determined that the sensor type applied by the application is a motion sensor, it is determined that the application is not to be frozen.
[0082] In some embodiments, determining whether to freeze the application based on the application to be frozen and the sensor type applied by the application can include:
[0083] When the sensor type applied by the application is the first type of sensor, if it is further determined that the sensor type applied by the application is an environmental sensor, it is determined that the application is not to be frozen when the terminal is in a bright screen state.
[0084] In some embodiments, it can further include:
[0085] Detecting the freezing condition of the terminal for any sensor;
[0086] When the applications of the sensor are all frozen, the registration application of the sensor is released.
[0087] In some embodiments, it can further include:
[0088] When the frozen application is thawed, the sensor applied by the application before freezing is determined, and the sensor is re-applied for registration.
[0089] The embodiment provides an application management device, determines an application to be frozen on a terminal, detects a sensor on the terminal applied by the application to be frozen, determines whether to freeze the application based on the application to be frozen and the sensor type applied by the application, and performs corresponding operations. Therefore, by determining whether to freeze the application in combination with the application type and the sensor type applied when freezing the application, the freezing means of the application is effectively improved, and the freezing effect is greatly improved without affecting the normal use of the terminal.
[0090] Embodiment Four
[0091] The embodiment also provides a terminal, as shown in Figure 4 The terminal includes a processor 41, a memory 42, a plurality of sensors 43, and a communication bus 44, wherein:
[0092] The communication bus 44 is used to realize the connection communication between the processor 41 and the memory 42;
[0093] The processor 41 is used to execute one or more computer programs stored in the memory 42 to realize the steps of the application management method in the above embodiments, which will not be repeated here.
[0094] The embodiment also provides a computer readable storage medium, which includes a volatile or non-volatile, removable or non-removable medium implemented in any method or technology for storing information (such as computer readable instructions, data structures, computer program modules or other data). The computer readable storage medium includes but is not limited to RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disc (DVD) or other optical disc storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage system, or any other medium that can be used to store desired information and can be accessed by a computer.
[0095] The computer readable storage medium in the embodiment can be used to store one or more computer programs, which are stored in the memory and can be executed by the processor to realize at least one step of the application management method in the above embodiments.
[0096] The embodiment also provides a computer program (or computer software), which can be distributed on a computer readable medium and executed by a computer system to realize at least one step of the application management method in the above embodiments.
[0097] The embodiment also provides a computer program product, which includes a computer readable system on which the computer program is stored as described above. The computer readable system in the embodiment can include the computer readable storage medium as described above.
[0098] It is to be understood by those skilled in the art that all or some of the steps, systems, functional modules / units in the systems disclosed in the above method can be implemented as software (which can be realized by computer program codes executable by a computing system), firmware, hardware and appropriate combinations thereof. In the hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component can have multiple functions, or one function or step can be performed by several physical components in cooperation. Some or all of the physical components can be implemented as software executed by a processor such as a central processing unit, a digital signal processor or a microprocessor, or as hardware, or as an integrated circuit such as an application specific integrated circuit.
[0099] Furthermore, it is well understood by those skilled in the art that communication media typically embodies computer-readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Accordingly, the present application is not limited to any particular hardware and software combination.
[0100] The above description is further to the detailed description of the embodiments of the present application in connection with specific embodiments, and cannot be deemed as limiting the specific implementation of the present application to these descriptions. For those skilled in the art, some simple deductions or replacements can be made without departing from the concept of the present application, and all of these should be deemed as falling within the protection scope of the present application.
Claims
1. An application management method, comprising: determining an application to be frozen on a terminal, wherein the application to be frozen is an application running in the background and occupying system resources on the terminal; detecting a sensor on the terminal applied for by the application to be frozen; determining whether to freeze the application based on an application type of the application to be frozen and a sensor type applied for by the application to be frozen, and performing a corresponding operation; the determining whether to freeze the application based on the application type of the application to be frozen and the sensor type applied for by the application to be frozen comprises: determining whether to freeze the application based on the application type of the application to be frozen; the application type at least comprises a system critical application; when the application is not the system critical application, determining whether to freeze the application based on the sensor type applied for by the application to be frozen; the sensor type is a first type of sensor or a second type of sensor, the first type of sensor needs to wake up the system, and the second type of sensor does not wake up the system.
2. The application management method of claim 1, wherein, Before the determining whether to freeze the application, further comprising: classifying applications on the terminal, and the classified categories at least comprise the system critical application.
3. The application management method according to claim 2, wherein the determining whether to freeze the application based on the application to be frozen and the sensor type applied for by the application to be frozen comprises: when the application is the system critical application, determining not to freeze the application.
4. The application management method of claim 1, wherein, Before the determining whether to freeze the application, further comprising: classifying the sensors on the terminal, and the classified categories at least comprise the first type of sensor and the second type of sensor, wherein the first type of sensor needs to wake up the system, and the second type of sensor does not wake up the system.
5. The application management method of claim 4, wherein, the determining whether to freeze the application based on the application to be frozen and the sensor type applied for by the application to be frozen comprises: when the sensor type applied for by the application is the second type of sensor, determining to freeze the application.
6. The application management method of claim 4, wherein, the determining whether to freeze the application based on the application to be frozen and the sensor type applied for by the application to be frozen comprises: when the sensor type applied for by the application is the first type of sensor, if it is further determined that the sensor type applied for by the application is a motion type sensor, determining not to freeze the application.
7. The application management method of claim 4, wherein, the determining whether to freeze the application based on the application to be frozen and the sensor type applied for by the application to be frozen comprises: when the sensor type applied for by the application is the first type of sensor, if it is further determined that the sensor type applied for by the application is an environment type sensor, determining not to freeze the application when the terminal is in a bright screen state.
8. The application management method according to any one of claims 1 to 7, wherein, further comprising: detecting a freezing condition of the terminal of any sensor; when the applications applying for the sensor are all frozen, releasing the registration application of the sensor.
9. The application management method of claim 8, wherein, further comprising: when the frozen application is thawed, determining the sensor applied for by the application before freezing, and reapplying for registration of the sensor.
10. An application management apparatus, comprising: a freezing determination module configured to determine an application to be frozen on a terminal, wherein the application to be frozen is an application running in the background and occupying system resources on the terminal; detecting a sensor on a terminal to which an application to be frozen is applied; a freezing module, configured to determine whether to freeze the application based on an application type of the application to be frozen and a sensor type applied by the application, and perform corresponding operations; the freezing module is specifically configured to: determine whether to freeze the application based on the application type of the application to be frozen; the application type at least includes a system critical application; when the application is not the system critical application, determine whether to freeze the application based on the sensor type applied by the application to be frozen; the sensor type is a first type of sensor or a second type of sensor, the first type of sensor needs to wake up the system, and the second type of sensor does not wake up the system.
11. A terminal, comprising a processor, a memory, a plurality of sensors and a communication bus; the communication bus is configured to realize connection and communication among the processor, the sensors and the memory; the processor is configured to execute one or more computer programs stored in the memory to realize the steps of the application management method in any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, the computer readable storage medium stores one or more computer programs, which can be executed by one or more processors to realize the steps of the application management method in any one of claims 1-9.
Citation Information
Patent Citations
Application freezing method and device, terminal and computer readable storage medium
CN109992378A