Application process management method, device, equipment and storage medium
1. A management method of an application process is applied to a terminal, and the management method of the application process comprises the following steps:
when an authority-raising request of a background application process is detected, displaying a first prompt box containing the authority-raising request;
in response to the determination operation of the user on the first prompt box, calling foreground service to improve the priority of the background application process, so that the background application process is converted into a foreground process;
acquiring the memory occupancy rate of the foreground process;
and rendering the memory occupancy rate to a preset area of the terminal display interface in real time in a preset display form.
2. A method of managing an application process as recited in claim 1, further comprising:
when a first sliding gesture with the preset area as a starting area is detected, acquiring the memory occupancy rates of all foreground processes;
and displaying a second prompt box containing process information of each foreground process, wherein the process information comprises the memory occupancy rate of the corresponding foreground process.
3. The method for managing an application process of claim 2, wherein the second prompt box comprises a plurality of sub prompt boxes, each sub prompt box is bound with a foreground process and displays only process information corresponding to the foreground process, the process information further comprises priority information, and the method for managing an application process further comprises:
and in response to the editing operation of the user on the target sub-prompt box, editing the priority information of the target foreground process bound with the target sub-prompt box so as to modify the authority of the target foreground process.
4. A method of managing an application process as claimed in claim 3, further comprising:
when a second sliding gesture taking the area of the target sub prompt box as a starting area is detected, ending the target foreground process;
and listing the UID group to which the target foreground process belongs into a blacklist.
5. The method for managing application processes according to claim 1, wherein the step of rendering the memory occupancy rate to a preset area of the terminal display interface in real time in a preset display form comprises:
determining the target display length of the memory occupancy rate in a preset area according to the memory occupancy rate and the total display length of the preset area;
and filling the preset color of the target display length in the preset area in a display form of a progress bar, and displaying on a terminal display interface.
6. The method for managing application processes according to claim 5, wherein a total progress bar exists in the preset area, the total progress bar includes at least one sub-progress bar, each sub-progress bar has a different color, each sub-progress bar is connected end to form the total progress bar, and the step of filling the preset color of the target display length in the preset area and displaying the preset color on a terminal display interface includes:
taking the tail end of the total progress bar as an initial filling position, and starting to fill the preset color of the target display length in the preset area to form a new sub-progress bar;
and the color of the new sub-progress bar is different from the colors of other sub-progress bars.
7. The method for managing an application process according to claim 1, wherein the step of obtaining the memory occupancy rate of the foreground process comprises:
and determining the UID group to which the foreground process belongs to obtain the memory occupancy rate of all foreground processes in the UID group.
8. A management device of an application process is applied to a terminal, and comprises the following steps: the system comprises a detection module, a calling module, an acquisition module and a rendering module;
the detection module is used for displaying a first prompt box containing the right-offering request when the right-offering request of the background application process is detected;
the calling module is used for calling foreground service to improve the priority of the background application process in response to the determination operation of the user on the first prompt box so as to convert the background application process into a foreground process;
the acquisition module is used for acquiring the memory occupancy rate of the foreground process;
and the rendering module is used for rendering the memory occupancy rate to a preset area of the terminal display interface in real time in a preset display form.
9. A terminal device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the memory being coupled to the processor and the processor implementing the method of managing application processes of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, wherein when the computer program runs, the apparatus on which the computer-readable storage medium is located is controlled to execute the management method of the application process according to any one of claims 1 to 7.
Background
The Android system mainly uses an LMK (Low Memory Killer) mechanism to manage the Memory: different oom _ adj (Out of Memory Adjustment) values are distributed to processes in different running states, classification of process priorities is achieved through the size of oom _ adj values (the smaller the oom _ adj is, the higher the priority is), when the whole residual Memory of the system is smaller than a preset threshold value or the Memory pressure is too high, a Low Memory Killer is triggered to clear processes with Low priorities, and therefore the Memory occupied by the processes with Low priorities is recycled.
At present, in order to avoid that an application process is cleaned by a Low Memory Killer, a common and effective means is to promote the priority of the application process, and a corresponding specific implementation is to promote the priority of the corresponding application process to the level of a Foreground process through a Foreground Service binding Notification message Notification, which is also a way authorized by a unique Android SDK (software development kit) to an application developer to promote the level of the process.
In order to avoid the abuse of the aforementioned right-giving means for giving right to the priority of the application process, the Android sets the following condition limit to the means:
1. requiring the declaration of the relevant rights;
2. it needs to be bound with Notification information of a resident status bar.
The purpose of Android setting the above condition limit is to enable a user to pay attention to the action of applying for hanging the foreground by the application process, and to hope that the user ends the application process by modifying authorization or manually closing when the user definitely does not want to hang the foreground by the application process. However, most users do not know what is the foreground and the background at all, and it is unclear what the problem will be caused by hanging the application process on the foreground, so when the right-lifting means of the application process is abused, so that a pile of application processes are all high priority, for Low Memory killers, the Memory cannot be continuously and effectively cleaned and recycled, thereby causing the terminal device to be in the vicious circle of Low Memory all the time, and causing the performance of the terminal device to be seriously reduced; or the Low Memory Killer clears the important process interacting with the user during clearing, and the normal use of the user is influenced.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for managing an application process, which can display a memory occupation status of an application process hung on a foreground in real time, and improve convenience for a user to check the foreground application process, thereby facilitating the user to manage the foreground application process.
In a first aspect, to achieve the above object, an embodiment of the present invention provides an application process management method applied to a terminal, where the application process management method includes:
when an authority-raising request of a background application process is detected, displaying a first prompt box containing the authority-raising request;
in response to the determination operation of the user on the first prompt box, calling foreground service to improve the priority of the background application process, so that the background application process is converted into a foreground process;
acquiring the memory occupancy rate of the foreground process;
and rendering the memory occupancy rate to a preset area of the terminal display interface in real time in a preset display form.
Further, the method for managing the application process further includes:
when a first sliding gesture with the preset area as a starting area is detected, acquiring the memory occupancy rates of all foreground processes;
and displaying a second prompt box containing process information of each foreground process, wherein the process information comprises the memory occupancy rate of the corresponding foreground process.
Further, the second prompt box includes a plurality of sub prompt boxes, each sub prompt box is bound with one foreground process, and only displays process information corresponding to the foreground process, the process information further includes priority information, and the method for managing the application process further includes:
and in response to the editing operation of the user on the target sub-prompt box, editing the priority information of the target foreground process bound with the target sub-prompt box so as to modify the authority of the target foreground process.
Further, the method for managing the application process further includes:
when a second sliding gesture taking the area of the target sub prompt box as a starting area is detected, ending the target foreground process;
and listing the UID group to which the target foreground process belongs into a blacklist.
Further, the step of rendering the memory occupancy rate to a preset area of the terminal display interface in real time in a preset display form includes:
determining the target display length of the memory occupancy rate in a preset area according to the memory occupancy rate and the total display length of the preset area;
and filling the preset color of the target display length in the preset area in a display form of a progress bar, and displaying on a terminal display interface.
Further, a total progress bar exists in the preset area, the total progress bar includes at least one sub-progress bar, the color of each sub-progress bar is different, and each sub-progress bar is connected end to form the total progress bar, the preset area is filled with the preset color of the target display length, and the preset color is displayed on a terminal display interface, including:
taking the tail end of the total progress bar as an initial filling position, and starting to fill the preset color of the target display length in the preset area to form a new sub-progress bar;
and the color of the new sub-progress bar is different from the colors of other sub-progress bars.
Further, the step of obtaining the memory occupancy rate of the foreground process includes:
and determining the UID group to which the foreground process belongs to obtain the memory occupancy rate of all foreground processes in the UID group.
In a second aspect, to solve the same technical problem, an embodiment of the present invention further provides an application process management apparatus, which is applied to a terminal, and includes: the system comprises a detection module, a calling module, an acquisition module and a rendering module;
the detection module is used for displaying a first prompt box containing the right-offering request when the right-offering request of the background application process is detected;
the calling module is used for calling foreground service to improve the priority of the background application process in response to the determination operation of the user on the first prompt box so as to convert the background application process into a foreground process;
the acquisition module is used for acquiring the memory occupancy rate of the foreground process;
and the rendering module is used for rendering the memory occupancy rate to a preset area of the terminal display interface in real time in a preset display form.
In a third aspect, to solve the same technical problem, an embodiment of the present invention further provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the memory is coupled to the processor, and the processor, when executing the computer program, implements the method for managing an application process as described in any one of the above.
In a fourth aspect, to solve the same technical problem, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, where, when the computer program runs, a device on which the computer-readable storage medium is located is controlled to execute any one of the above methods for managing an application process.
The embodiment of the invention provides an application process management method, an application process management device, application process equipment and a storage medium, wherein the application process management method displays a first prompt box containing an authorization request when the authorization request of a background application process is detected so as to inform a user of the current authorization behavior, provides a way for managing the authorization behavior for the user, and simultaneously renders the memory occupancy rate of the foreground process to a preset area of a terminal display interface in real time, so that the convenience for the user to check the foreground application process can be improved, and the user can conveniently manage the foreground application process.
Drawings
Fig. 1 is a schematic flowchart of a method for managing an application process according to an embodiment of the present invention;
fig. 2 is another schematic flowchart of a management method for an application process according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an interface for displaying a first prompt box according to an embodiment of the present invention;
fig. 4 is a first interaction diagram of a management method for an application process according to an embodiment of the present invention;
fig. 5 is a second interaction diagram of a management method for an application process according to an embodiment of the present invention;
fig. 6 is a third interaction diagram of a management method for an application process according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a management apparatus for an application process according to an embodiment of the present invention;
fig. 8 is another schematic structural diagram of a management apparatus for application processes according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The method for managing the application process provided by the embodiment of the invention is mainly applied to an Android system to manage terminals of the Android system, so that management objects described in the following embodiment are terminals of the Android system. Referring to fig. 1, fig. 1 is a schematic flow chart of a management method for an application process according to an embodiment of the present invention, and as shown in fig. 1, the management method for an application process according to an embodiment of the present invention includes steps S101 to S104;
step S101, when an authorization request of a background application process is detected, a first prompt box containing the authorization request is displayed.
The existing background service may be killed by the system when the system memory is insufficient (the LMK mechanism cleans the memory), and in order to keep the background process alive, the background process keeps running state and is not killed by the system. For example, the privilege granting behavior of the background application process is implemented by modifying the oom _ adj value of the background application process to 0.
However, when the existing background application process performs the right-lifting, only one piece of information related to the current right-lifting behavior is inserted into the message notification record, but the information is not a strong reminder, which may cause the user to ignore the right-lifting behavior of the application process. When the user ignores a plurality of right-offering behaviors, the LMK mechanism of the terminal cannot effectively clean and recycle the memory, so that the performance of the terminal is reduced, and the normal use of the terminal is seriously influenced.
In the embodiment, when the right-lifting request of the background application process is detected, the first prompt box containing the right-lifting request is immediately displayed, so that the current right-lifting behavior of the user can be timely reminded, the user can conveniently manage the current right-lifting behavior, unnecessary application process right lifting is cleared to the foreground application process level, and the performance of the terminal is effectively improved.
And step S102, responding to the determined operation of the user on the first prompt box, calling foreground service to improve the priority of the background application process, and converting the background application process into the foreground process.
In this embodiment, the confirmation operation includes a confirmation click event on the first prompt box and a received confirmation voice instruction, the confirmation click event is an event that the user triggers a "confirm" button or an "allow" button on the first prompt box, and the confirmation voice instruction is a voice instruction that is collected by the terminal and input by the user, such as voice data with positive meanings including "confirm", "allow", and the like.
After the confirmation operation of the user is detected, a foreground service is called to set the background application process as the foreground process, specifically, the oom _ adj value of the background application process is modified, the oom _ adj value is modified to be 0, the priority of the background application process is promoted to the priority of the foreground process, and therefore the background application process is converted into the foreground process.
Step S103, acquiring the memory occupancy rate of the foreground process.
In this embodiment, in order to facilitate the management of the foreground process by the user, the memory occupancy rate of the foreground process is immediately obtained after the background application process is converted into the foreground process.
And step S104, rendering the memory occupancy rate to a preset area of a terminal display interface in real time in a preset display form.
In this embodiment, the preset display form is a display form that is convenient for a user to view the memory occupancy rate of the foreground process. And after the memory occupancy rate of the foreground process is obtained, rendering the memory occupancy rate of the foreground process to a preset area of a terminal display interface in a preset display form in real time. Through show with predetermined show form on terminal display interface, can improve the convenience that the user looked over the proscenium application process to be convenient for the user management proscenium application process, in order to clear up the big and useless proscenium process of the volume of occupying the RAM, and then effectively improve the performance at terminal.
It should be noted that the preset region of the terminal display interface is a side region of the terminal display interface, and the display of the memory occupancy rate detected by the foreground process in the preset region can be used to avoid the display of the memory occupancy rate of the foreground process from affecting the content displayed on the current display interface of the terminal.
To sum up, the embodiment of the present invention provides a method for managing an application process, in which when an authorization request of a background application process is detected, a first prompt box containing the authorization request is displayed to notify a user of a current authorization behavior, so as to provide a way for the user to manage the authorization behavior, and meanwhile, the memory occupancy rate of a foreground process is rendered to a preset area of a terminal display interface in real time, so that convenience for the user to check the foreground application process can be improved, and thus the user can conveniently manage the foreground application process.
Referring to fig. 2, fig. 2 is another schematic flow chart of a management method for an application process according to an embodiment of the present invention, and as shown in fig. 2, the management method for an application process according to an embodiment of the present invention includes steps S201 to S210;
step S201, when the right-lifting request of the background application process is detected, displaying a first prompt box containing the right-lifting request.
In this embodiment, the authorization behavior of the background application process is monitored by the monitoring application, specifically, the authorization request of the background application process is monitored by the Hook application, so that when the authorization behavior of the background application process is performed, the corresponding authorization request is displayed in time for the user to confirm or reject.
Referring to fig. 3, fig. 3 is an interface schematic diagram for displaying a first prompt box according to an embodiment of the present invention, as shown in fig. 3, when an authorization request of a background application process B (hereinafter referred to as application B) is detected, a terminal display interface 10 displays the first prompt box 20 shown in fig. 3 to prompt a user that the application B is requesting to be hung on a foreground to be converted into a foreground process, and displays the authorization request of the application B in the prompt box 20 by using a strong prompt manner provided by the embodiment of the present invention, so that the user can be effectively prompted to pay attention to the authorization behavior of the application B, the user can conveniently determine whether to allow the application B to be hung on the foreground, and convenience in managing the foreground process is improved.
Step S202, responding to the determined operation of the user on the first prompt box, calling foreground service to improve the priority of the background application process, and converting the background application process into the foreground process.
Step S203, determining the UID group to which the foreground process belongs to obtain the memory occupancy rates of all foreground processes in the UID group.
In this embodiment, since the background application process is authorized by the UID group to which the background application process belongs, and when one UID group includes a plurality of application processes, one of the application processes is authorized, all other application processes in the UID group are authorized and converted into foreground processes, thereby occupying a certain amount of memory, when it is detected that one background application process is converted into a foreground process, the UID group of the foreground process needs to be determined, thereby being able to know the memory occupancy rates of all processes in the UID group corresponding to the foreground process, avoiding that one UID group includes a plurality of application processes, ignoring the memory occupancy rates of other application processes in the UID group, and thus affecting the management of the foreground processes by the user according to the memory occupancy rates.
For example, after the background application process 1 is converted into the foreground process 1, when it is detected that the memory occupancy rate 1 of the foreground process 1 is 20%, and it is detected that the UID group to which the foreground process 1 belongs also contains the application process 2, the memory occupancy rate 2 of the application process 2 needs to be detected, and the memory occupancy rate 2 is obtained as 20%, at this time, the memory occupancy rate 1 plus the memory occupancy rate 2 is taken as the memory occupancy rate corresponding to the foreground process 1, that is, 20% + 40% of the memory occupancy rate.
And step S204, determining the target display length of the memory occupancy rate in the preset area according to the memory occupancy rate and the total display length of the preset area.
Referring to fig. 3, as shown in fig. 3, the side bar on the left side of the terminal display interface 10 in fig. 3 is a preset area 30, the total display length of the preset area 30 is set to be L, and when the memory occupancy rate is detected to be 20%, it is determined that the target display length of the memory occupancy rate corresponding to the foreground process in the preset area 30 is 1/5L.
It should be noted that, a total progress bar exists in the preset area, the total progress bar includes at least one sub-progress bar, the color of each sub-progress bar is different, and each sub-progress bar is connected end to form the total progress bar.
Step S205, filling the preset color of the target display length in the preset area in the display form of the progress bar and with the end of the total progress bar as the initial filling position to form a new sub-progress bar.
It should be noted that the preset color is any color, and the color of the new sub-progress bar (i.e., the preset color) is different from the colors of the other sub-progress bars.
In this embodiment, please refer to fig. 3 and 4, and fig. 4 is a first interaction schematic diagram of a management method for an application process according to an embodiment of the present invention, and as shown in fig. 3 and 4, when an authorization request of an application B is detected, a terminal display interface 10 displays a first prompt box 20, where the first prompt box 20 includes an enable key and a disable key. At this time, since the terminal has only one foreground process (application a), the total progress bar 31 (i.e., the progress bar 31 of application a) exists in the preset area 30. When the user performs a confirmation operation on the first prompt box 20, that is, it is detected that the user clicks an allowed button on the first prompt box 20 in fig. 4, the terminal hangs the allowed application B on the foreground, at this time, the memory occupancy rate of 20% of all applications in the UID group corresponding to the application B is obtained, the 20% is used as the memory occupancy rate of the application B, and according to the memory occupancy rate of 20% of the application B and the total display length L of the preset area 30, the target display length of the memory occupancy rate of the application B in the preset area 30 is determined to be 1/5L, then, in the display form of the progress bar, and with the end of the total progress bar 31 as a starting filling position, a preset color with a length of 1/5L is started to be filled in the preset area 30, so as to form a new sub-progress bar 32 (that is, the progress bar 32 of the application B).
In step S206, when the first sliding gesture with the preset area as the start area is detected, the memory occupancy rates of all foreground processes are obtained.
Step S207, a second prompt box containing the process information of each foreground process is displayed.
Wherein, the process information comprises the memory occupancy rate of the corresponding foreground process.
In this embodiment, please refer to fig. 5, where fig. 5 is a second interaction diagram of the application process management method according to the embodiment of the present invention, as shown in fig. 5, when a first swipe gesture in which the user uses the area 33 in the preset area 30 as a start area and the swipe direction is a is detected, it is determined that the user wants to view process information of all current foreground processes of the terminal, and at this time, the terminal display interface 10 displays a second prompt box 21 containing process information of two foreground processes (application a and application B) shown in fig. 5.
It should be noted that the first slide gesture is a continuous slide gesture with an arbitrary region in the preset region 30 as a starting region and a slide direction a, where-90 ° ± n × 360 ° < a < 90 ° ± n × 360 °.
As an alternative embodiment, the second prompt box includes a plurality of sub prompt boxes, each sub prompt box is bound with one foreground process, and only displays process information corresponding to the foreground process, and the process information further includes priority information, please continue referring to fig. 5, as shown in fig. 5, the second prompt box 21 includes two sub prompt boxes, that is, the sub prompt box 211 corresponding to the application a and the sub prompt box 212 corresponding to the application B, and each sub prompt box includes memory occupancy information and priority information (oom _ adj value) of the corresponding process.
And S208, in response to the editing operation of the user on the target sub-prompt box, editing the priority information of the target foreground process bound with the target sub-prompt box so as to modify the authority of the target foreground process.
In this embodiment, the target sub-prompt box is a sub-prompt box selected by a user, and the editing operation includes a pressing operation and a selecting operation for any one of all sub-prompt boxes, where the pressing operation is determined when a pressure exceeding a preset pressure value is detected in a target sub-prompt box area, and the selecting operation is determined when a continuous touch exceeding a preset time is detected in the target sub-prompt box area.
Optionally, when the editing operation of the user on the target sub-prompt box is detected, the content in the target sub-prompt box is set to be in an editable state, and at this time, the user can edit the content in the target sub-prompt box, so that the oom _ adj value in the target sub-prompt box can be modified, the priority of the corresponding foreground process is adjusted, and the management of the foreground process is realized.
In step S209, when the second sliding gesture with the area of the target sub-hint box as the start area is detected, the target foreground process is ended.
In this embodiment, please refer to fig. 6, fig. 6 is a third interaction schematic diagram of the application process management method according to the embodiment of the present invention, as shown in fig. 6, when detecting a second sliding gesture in which the user uses an area 2121 in the area where the target sub-prompt box 212 is located as a start area and the sliding direction is b, determining that the user wants to end the corresponding target foreground process, at this time, the terminal will end the corresponding target foreground process, clear the progress bar of the corresponding application on the terminal display interface 10, and simultaneously display a short third prompt box 213, for example, for 2 seconds, when the third prompt box 213 automatically disappears after 2 seconds, and after a preset time, for example, 3 seconds, if the user has no operation, the terminal automatically hides the second prompt box 21, and only displays the preset area 30 and the progress bar 31 of the process (application a) currently existing in the terminal.
It should be noted that the second slide gesture is a continuous slide gesture in which an arbitrary region in the target sub-prompt box is used as a start region and the slide direction is b, where b is an arbitrary direction.
In one embodiment, to prevent the false touch operation from ending the important process, by detecting whether the length of the continuous slide track of the second slide gesture is longer than a preset length, the corresponding process is ended only when the length of the continuous slide track of the second slide gesture exceeds the preset length.
In another embodiment, in order to further prevent the false touch operation from ending the important process, whether the ending position of the continuous sliding track of the second sliding gesture is a preset clearing area is detected, where the preset clearing area is any area set in the terminal display interface, such as the upper right corner, and when the ending position of the continuous sliding track of the second sliding gesture is in the preset clearing area, the corresponding process is ended.
Step S210, the UID group to which the target foreground process belongs is listed in a blacklist.
In this embodiment, the UID group of the foreground process is listed in the blacklist, so that the automatic start or the re-authorization action of the target foreground process can be prevented, and the performance of the terminal is improved in a phase-changing manner.
In another embodiment, when the user wants to start the process in the blacklist, the user can move the process out of the blacklist only by clicking the icon corresponding to the process on the terminal display interface, the operation mode is simple and convenient, and the convenience for the user to manage the foreground application process is improved.
According to the method described in the foregoing embodiment, the embodiment will be further described from the perspective of an application process management device, which may be specifically implemented as an independent entity, or may be implemented by being integrated in an electronic device, such as a terminal, where the terminal may include a mobile phone, a tablet computer, and the like.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a management apparatus for an application process according to an embodiment of the present invention, where the management apparatus for an application process is mainly applied to a terminal device, and as shown in fig. 7, the management apparatus 700 for an application process according to an embodiment of the present invention includes a detection module 701, a calling module 702, an obtaining module 703, and a rendering module 704;
the detecting module 701 is configured to display a first prompt box containing an authorization request when the authorization request of the background application process is detected.
The invoking module 702 is configured to invoke a foreground service to increase the priority of the background application process in response to a determination operation of the user on the first prompt box, so that the background application process is converted into a foreground process.
The obtaining module 703 is configured to obtain the memory occupancy rate of the foreground process.
In this embodiment, the obtaining module 703 is specifically configured to: and determining the UID group to which the foreground process belongs to obtain the memory occupancy rate of all foreground processes in the UID group.
The rendering module 704 is configured to render the memory occupancy rate to a preset area of the terminal display interface in real time in a preset display form.
It should be noted that, a total progress bar exists in the preset area, the total progress bar includes at least one sub-progress bar, the color of each sub-progress bar is different, and each sub-progress bar is connected end to form the total progress bar.
In this embodiment, the rendering module 704 is specifically configured to: and according to the memory occupancy rate and the total display length of the preset area, determining the target display length of the memory occupancy rate in the preset area, and starting to fill the preset color of the target display length in the preset area by taking the tail end of the total progress bar as a starting filling position in the display form of the progress bar so as to form a new sub-progress bar.
Wherein, the color of the new sub-progress bar is different from the color of the other sub-progress bars.
Optionally, referring to fig. 8, fig. 8 is another schematic structural diagram of a management apparatus for an application process according to an embodiment of the present invention, and as shown in fig. 8, the management apparatus 700 for an application process according to an embodiment of the present invention further includes a first gesture detection module 705, a first processing module 706, an editing module 707, a second gesture detection module 708, and a second processing module 709;
the first gesture detection module 705 is configured to obtain memory occupancy rates of all foreground processes when a first sliding gesture with a preset region as a starting region is detected.
The first processing module 706 is configured to display a second prompt box containing process information of each foreground process, where the process information includes memory occupancy rates of the corresponding foreground processes.
It should be noted that the second prompt box includes a plurality of sub prompt boxes, each sub prompt box is bound with one foreground process, and only displays the process information corresponding to the foreground process, and the process information further includes priority information.
And the editing module 707 is configured to, in response to an editing operation performed by the user on the target sub-prompt box, edit the priority information of the target foreground process bound to the target sub-prompt box to modify the authority of the target foreground process.
The second gesture detection module 708 is configured to, when a second sliding gesture with the area where the target sub-hint box is located as a starting area is detected, end the target foreground process.
The second processing module 709 is configured to list the UID group to which the target foreground process belongs in a blacklist.
In a specific implementation, each of the modules and/or units may be implemented as an independent entity, or may be implemented as one or several entities by any combination, where the specific implementation of each of the modules and/or units may refer to the foregoing method embodiment, and specific achievable beneficial effects also refer to the beneficial effects in the foregoing method embodiment, which are not described herein again.
In addition, referring to fig. 9, fig. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present invention, where the terminal device may be a mobile terminal such as a smart phone, a tablet computer, and the like. As shown in fig. 9, terminal device 900 includes a processor 901, a memory 902. The processor 901 is electrically connected to the memory 902.
The processor 901 is a control center of the terminal device 900, connects various parts of the entire electronic device by using various interfaces and lines, executes various functions of the terminal device 900 and processes data by running or loading an application program stored in the memory 902 and calling data stored in the memory 902, thereby monitoring the terminal device 900 as a whole.
In this embodiment, the processor 901 in the terminal device 900 loads instructions corresponding to processes of one or more application programs into the memory 902 according to the following steps, and the processor 901 runs the application programs stored in the memory 902, thereby implementing various functions:
when an authority-raising request of a background application process is detected, displaying a first prompt box containing the authority-raising request;
in response to the determination operation of the user on the first prompt box, calling foreground service to improve the priority of the background application process, so that the background application process is converted into a foreground process;
acquiring the memory occupancy rate of a foreground process;
and rendering the memory occupancy rate to a preset area of a terminal display interface in real time in a preset display form.
The terminal device 900 may implement the steps in any embodiment of the management method for an application process provided in the embodiment of the present invention, and therefore, beneficial effects that can be achieved by the management method for an application process provided in the embodiment of the present invention can be achieved, which are detailed in the foregoing embodiment and will not be described herein again.
Referring to fig. 10, fig. 10 is another schematic structural diagram of a terminal device according to an embodiment of the present invention, and as shown in fig. 10, fig. 10 is a specific structural block diagram of the terminal device according to the embodiment of the present invention, where the terminal device may be used to implement the management method of the application process provided in the foregoing embodiment. The terminal device 1000 may be a mobile terminal such as a smart phone or a notebook computer.
The RF circuit 1010 is used for receiving and transmitting electromagnetic waves, so as to perform interconversion between the electromagnetic waves and electrical signals, thereby communicating with a communication network or other devices. RF circuitry 1010 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The RF circuit 1010 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices over a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network may use various Communication standards, protocols, and technologies, including, but not limited to, Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (e.g., Institute of Electrical and Electronics Engineers (IEEE) standard IEEE802.11 a, IEEE802.11 b, IEEE802.11g, and/or IEEE802.11 n), Voice over Internet Protocol (VoIP), world wide mail Access (Microwave Access for micro), wimax-1, other suitable short message protocols, and any other suitable Protocol for instant messaging, and may even include those protocols that have not yet been developed.
The memory 1020 can be used for storing software programs and modules, such as program instructions/modules corresponding to the management method of the application process in the above embodiment, and the processor 1080 executes various functional applications and data processing by running the software programs and modules stored in the memory 1020, that is, the following functions are realized:
when an authority-raising request of a background application process is detected, displaying a first prompt box containing the authority-raising request;
in response to the determination operation of the user on the first prompt box, calling foreground service to improve the priority of the background application process, so that the background application process is converted into a foreground process;
acquiring the memory occupancy rate of a foreground process;
and rendering the memory occupancy rate to a preset area of a terminal display interface in real time in a preset display form.
The memory 1020 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 1020 can further include memory located remotely from processor 1080, which can be connected to terminal device 1000 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input unit 1030 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, input unit 1030 may include touch-sensitive surface 1031, as well as other input devices 1032. The touch-sensitive surface 1031, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (such as operations by a user on or near the touch-sensitive surface 1031 using any suitable object or attachment, such as a finger, a stylus, etc.) on or near the touch-sensitive surface 1031 and drive the corresponding connection device according to a preset program. Optionally, the touch sensitive surface 1031 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1080, and can receive and execute commands sent by the processor 1080. In addition, the touch-sensitive surface 1031 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 1030 may also include other input devices 1032 in addition to the touch-sensitive surface 1031. In particular, other input devices 1032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, a joystick, or the like.
The display unit 1040 may be used to display information input by a user or information provided to a user, and various graphical user interfaces of the terminal device 1000, which may be configured by graphics, text, icons, video, and any combination thereof. The Display unit 1040 may include a Display panel 1041, and optionally, the Display panel 1041 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 1031 may overlay the display panel 1041, and when a touch operation is detected on or near the touch-sensitive surface 1031, the touch operation is transmitted to the processor 1080 for determining the type of the touch event, and the processor 1080 then provides a corresponding visual output on the display panel 1041 according to the type of the touch event. Although in the figures touch-sensitive surface 1031 and display panel 1041 are shown as two separate components that implement input and output functions, in some embodiments touch-sensitive surface 1031 may be integrated with display panel 1041 that implements input and output functions.
Terminal device 1000 can also include at least one sensor 1050, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 1041 according to the brightness of ambient light, and a proximity sensor that may generate an interrupt when the folder is closed or closed. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the terminal device 1000, further description is omitted here.
Audio circuitry 1060, speaker 1061, microphone 1062 may provide an audio interface between a user and terminal device 1000. The audio circuit 1060 can transmit the electrical signal converted from the received audio data to the speaker 1061, and the electrical signal is converted into a sound signal by the speaker 1061 and output; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1060 and converted into audio data, which is then processed by the audio data output processor 1080 and then transmitted to, for example, another terminal via the RF circuit 1010, or output to the memory 1020 for further processing. The audio circuit 1060 may also include an earbud jack to provide communication of peripheral headphones with the terminal device 1000.
The terminal device 1000, which can help a user receive a request, transmit information, etc., through the transmission module 1070 (e.g., Wi-Fi module), provides the user with wireless broadband internet access. Although the transmission module 1070 is shown in the figure, it is understood that it does not belong to the essential constitution of the terminal device 1000, and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 1080 is a control center of the terminal device 1000, connects various parts of the whole mobile phone by using various interfaces and lines, and executes various functions and processes data of the terminal device 1000 by operating or executing software programs and/or modules stored in the memory 1020 and calling data stored in the memory 1020, thereby integrally monitoring the electronic device. Optionally, processor 1080 may include one or more processing cores; in some embodiments, processor 1080 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 1080.
Terminal device 1000 can also include a power supply 1090 (e.g., a battery) for powering various components, which in some embodiments can be logically coupled to processor 1080 via a power management system that can provide functionality for managing charging, discharging, and power consumption. Power supply 1090 may also include any component including one or more DC or AC power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the terminal device 1000 further includes a camera (e.g., a front camera, a rear camera), a bluetooth module, and the like, which are not described herein again. Specifically, in this embodiment, the display unit of the electronic device is a touch screen display, the mobile terminal further includes a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for:
when an authority-raising request of a background application process is detected, displaying a first prompt box containing the authority-raising request;
in response to the determination operation of the user on the first prompt box, calling foreground service to improve the priority of the background application process, so that the background application process is converted into a foreground process;
acquiring the memory occupancy rate of a foreground process;
and rendering the memory occupancy rate to a preset area of a terminal display interface in real time in a preset display form.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above modules may refer to the foregoing method embodiments, which are not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor. To this end, the embodiment of the present invention provides a storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps of any embodiment of the management method for an application process provided in the embodiment of the present invention.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium may execute the steps in any embodiment of the management method for an application process provided in the embodiment of the present invention, beneficial effects that can be achieved by the management method for an application process provided in the embodiment of the present invention can be achieved, which are detailed in the foregoing embodiment and will not be described herein again.
The foregoing describes in detail a method, an apparatus, a device, and a storage medium for managing an application process provided in an embodiment of the present application, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the foregoing embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application. Moreover, it will be apparent to those skilled in the art that various modifications and adaptations can be made without departing from the principles of the invention, and such modifications and adaptations are intended to be within the scope of the invention.