Search

CN-122019181-A - Application management method, device, electronic equipment and medium

CN122019181ACN 122019181 ACN122019181 ACN 122019181ACN-122019181-A

Abstract

The application discloses an application management method, an application management device, electronic equipment and a medium, and relates to the technical field of terminals. The method comprises the steps of determining background checking and killing time of a first application according to first information of the first application under the condition that the first application is operated in the background, wherein the first information comprises at least one item of heap memory occupation information of the first application in the foreground operation process, cartoon performance information of the first application in the foreground operation process, the position of the first application in a background task list and background working state information of the first application, and terminating operation of the first application after the background checking and killing time is reached if the first application keeps the background operation before the background checking and killing time.

Inventors

  • HU CHAOHUI

Assignees

  • 维沃移动通信有限公司

Dates

Publication Date
20260512
Application Date
20260210

Claims (12)

  1. 1. An application management method, the method comprising: Determining background checking and killing time of a first application according to first information of the first application under the condition that the first application is operated in the background, wherein the first information comprises at least one item of heap memory occupation information of the first application in the foreground operation process, katon performance information of the first application in the foreground operation process, the position of the first application in a background task list and background working state information of the first application; And if the first application keeps running in the background before the background checking and killing time, stopping running the first application after the background checking and killing time is reached.
  2. 2. The method of claim 1, wherein the determining the background seek time of the first application based on the first information of the first application comprises: And under the condition that the first information meets the target killing condition in at least one killing condition, determining the background killing time according to a killing strategy corresponding to the target killing condition.
  3. 3. The method according to claim 1 or 2, wherein determining the background seek time of the first application according to the first information of the first application comprises: And under the condition that the first information does not meet any one of at least one searching and killing condition, calculating the background searching and killing time according to the first information and a first rule.
  4. 4. The method of claim 2, wherein the first information includes the stuck-at-performance information and the heap memory occupancy information, and the at least one kill condition includes a stuck-at-performance condition and a heap memory occupancy condition; And under the condition that the first information meets the target killing condition in at least one killing condition, determining the background killing time according to a killing strategy corresponding to the target killing condition, including: Determining the background searching and killing time according to a searching and killing strategy corresponding to the katon performance condition under the condition that the katon performance information meets the katon performance condition; And under the condition that the blocking performance information does not meet the blocking performance condition and the heap memory occupation information meets the heap memory occupation condition, determining the background searching and killing time according to a searching and killing strategy corresponding to the heap memory occupation condition.
  5. 5. The method of claim 1, wherein prior to the terminating running the first application, the method further comprises: sending a data saving notification to the first application, wherein the data saving notification is used for notifying the first application to save operation data; The terminating running the first application includes: terminating running the first application under the condition that a preset condition is met; wherein, the meeting the preset condition includes any one of the following: After the first preset time period after the data saving notification is sent, And receiving data storage completion feedback sent by the first application.
  6. 6. An application management apparatus, the apparatus comprising: A processing module for: Determining background checking and killing time of a first application according to first information of the first application under the condition that the first application is operated in the background, wherein the first information comprises at least one item of heap memory occupation information of the first application in the foreground operation process, katon performance information of the first application in the foreground operation process, the position of the first application in a background task list and background working state information of the first application; And if the first application keeps running in the background before the background checking and killing time, stopping running the first application after the background checking and killing time is reached.
  7. 7. The apparatus of claim 6, wherein the processing module is specifically configured to determine the background killing time according to a killing policy corresponding to a target killing condition if the first information meets the target killing condition of at least one killing condition.
  8. 8. The apparatus according to claim 6 or 7, wherein the processing module is specifically configured to calculate the background killing time according to the first information and the first rule, in a case where the first information does not satisfy any one of at least one killing condition.
  9. 9. The apparatus of claim 7, wherein the first information comprises at least the katon performance information and the heap memory occupancy information, and wherein the at least one kill condition comprises a katon performance condition and a heap memory occupancy condition; The processing module is specifically configured to: Determining the background searching and killing time according to a searching and killing strategy corresponding to the katon performance condition under the condition that the katon performance information meets the katon performance condition; And under the condition that the blocking performance information does not meet the blocking performance condition and the heap memory occupation information meets the heap memory occupation condition, determining the background searching and killing time according to a searching and killing strategy corresponding to the heap memory occupation condition.
  10. 10. The apparatus of claim 6, wherein the apparatus further comprises a transmission module; the sending module is used for sending a data saving notification to the first application before the processing module terminates running the first application, wherein the data saving notification is used for notifying the first application to save running data; the processing module is specifically configured to terminate running the first application when a preset condition is met; wherein, the meeting the preset condition includes any one of the following: After the first preset time period after the data saving notification is sent, And receiving data storage completion feedback sent by the first application.
  11. 11. An electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the application management method of any of claims 1-5.
  12. 12. A readable storage medium, wherein a program or instructions is stored on the readable storage medium, which when executed by a processor, implements the steps of the application management method according to any of claims 1-5.

Description

Application management method, device, electronic equipment and medium Technical Field The application belongs to the technical field of terminals, and particularly relates to an application management method, an application management device, electronic equipment and a medium. Background Currently, when an application is started, the electronic device may allocate a heap memory for the application from the memory of the electronic device, and the upper limit of the heap memory of the single application is fixed, such as 256MB or 512MB. In order to ensure normal operation of the application, the virtual machine corresponding to the application can use a garbage collection (garbage collection, GC) algorithm to perform memory recovery so as to release the memory occupied by the garbage object in the heap memory for the application to continue to use. However, as the heap memory size used by the application increases gradually, the frequency of triggering the GC by the virtual machine is also higher and higher, and frequent GC, especially the blocking GC, may cause application jamming and heating of the electronic device, thereby affecting the operation performance of the electronic device. Disclosure of Invention The embodiment of the application aims to provide an application management method, an application management device, electronic equipment and a medium, which can differentially search and kill the application running in the background of the electronic equipment so as to improve the running performance of the electronic equipment. In a first aspect, an embodiment of the present application provides an application management method, where under a condition that a first application is run in a background, a background checking time of the first application is determined according to first information of the first application, where the first information includes at least one item including heap memory occupation information of the first application in a foreground running process, blocking performance information of the first application in the foreground running process, a position of the first application in a background task list, and background working state information of the first application, and if the first application keeps running in the background before the background checking time, the first application is terminated to run after the background checking time is reached. In a second aspect, an embodiment of the present application provides an application management apparatus, where the application management apparatus includes a processing module. The processing module is used for acquiring heap memory occupation information of the first application in a foreground operation process, blocking performance information of the first application in the foreground operation process, positions of the first application in a background task list and background working state information of the first application, and terminating operation of the first application after the background searching and killing time is reached if the first application keeps the background operation before the background searching and killing time. In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory stores a program or instructions executable on the processor, the program or instructions implementing the steps of the method according to the first aspect when executed by the processor. In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps of the method as described in the first aspect. In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and where the processor is configured to execute a program or instructions to implement a method according to the first aspect. In a sixth aspect, embodiments of the present application provide a computer program product stored in a storage medium, the program product being executable by at least one processor to implement the method according to the first aspect. In the embodiment of the application, the background searching and killing time of the first application can be determined according to the first information of the first application under the condition that the first application is operated in the background, wherein the first information comprises at least one item of heap memory occupation information of the first application in the foreground operation process, the cartoon representation information of the first application in the foreground operation process, the position of the first application in a background task list and the background working state information of the first application, a