CN107479953B - Process management method, device, storage medium and electronic equipment - Google Patents

Process management method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN107479953B
CN107479953B CN201710644134.0A CN201710644134A CN107479953B CN 107479953 B CN107479953 B CN 107479953B CN 201710644134 A CN201710644134 A CN 201710644134A CN 107479953 B CN107479953 B CN 107479953B
Authority
CN
China
Prior art keywords
processes
closing
occupancy rate
proportion
closing proportion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201710644134.0A
Other languages
Chinese (zh)
Other versions
CN107479953A (en
Inventor
杜冰
张俊
林志泳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710644134.0A priority Critical patent/CN107479953B/en
Publication of CN107479953A publication Critical patent/CN107479953A/en
Application granted granted Critical
Publication of CN107479953B publication Critical patent/CN107479953B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Supply And Distribution Of Alternating Current (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a process management method, a process management device, a storage medium and electronic equipment. The method is applied to the electronic equipment and comprises the following steps: acquiring a plurality of processes running on the electronic equipment; dividing the plurality of processes according to the types of the plurality of processes to obtain a process set; acquiring a process closing proportion corresponding to the current system occupancy rate; and closing the corresponding number of processes in the process set according to the process closing proportion. The integrity and stability of the whole system can be maintained, the occupancy rate and speed of the system can be improved, and the utilization rate of system resources is improved.

Description

Process management method, device, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of mobile equipment, in particular to a process management method, a process management device, a storage medium and electronic equipment.
Background
With the rapid development of electronic device technology, the functions of electronic devices are stronger and more applications are more and more.
The current process management mainly manages background processes, but does not effectively manage other processes, thereby causing waste of system resources.
Disclosure of Invention
The embodiment of the invention provides a process management method, a process management device, a storage medium and electronic equipment, which can improve the utilization rate of system resources.
In a first aspect, an embodiment of the present invention provides a process management method applied to an electronic device, where the method includes:
acquiring a plurality of processes running on the electronic equipment;
dividing the plurality of processes according to the types of the plurality of processes to obtain a process set;
acquiring a process closing proportion corresponding to the current system occupancy rate;
and closing the corresponding number of processes in the process set according to the process closing proportion.
In a second aspect, an embodiment of the present invention further provides a process management apparatus, applied to an electronic device, where the apparatus includes:
a first obtaining module, configured to obtain a plurality of processes running on the electronic device;
the process dividing module is used for dividing the processes according to the types of the processes to obtain a process set;
the second acquisition module is used for acquiring the process closing proportion corresponding to the current system occupancy rate;
and the processing module is used for closing the corresponding number of processes in the process set according to the process closing proportion.
In a third aspect, an embodiment of the present invention further provides a storage medium, where a plurality of instructions are stored, where the instructions are adapted to be loaded by a processor to execute steps of implementing any one of the process management methods provided in the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention further provides an electronic device, including:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program codes stored in the memory to execute the steps of any process management method provided by the embodiment of the invention.
The invention provides a process management method, a device, a storage medium and a terminal, which are characterized in that a plurality of processes running on electronic equipment are firstly obtained; then, dividing the multiple processes according to the types of the multiple processes to obtain a process set; then acquiring a process closing proportion corresponding to the current system occupancy rate; and then closing the corresponding number of processes in the process set according to the process closing proportion. Therefore, the integrity and the stability of the whole system can be maintained, the occupancy rate and the speed of the system can be improved, and the utilization rate of system resources is improved.
Drawings
The technical solution and other advantages of the present invention will become apparent from the following detailed description of specific embodiments of the present invention, which is to be read in connection with the accompanying drawings.
Fig. 1 is a scene schematic diagram of an application management and control method according to an embodiment of the present invention.
Fig. 2 is a schematic view of another scenario of the application management and control method according to the embodiment of the present invention.
Fig. 3 is a flowchart of a process management method according to an embodiment of the present invention.
Fig. 4 is another flowchart of a process management method according to an embodiment of the present invention.
Fig. 5 is a schematic view of another scenario of the application management and control method according to the embodiment of the present invention
Fig. 6 is a schematic structural diagram of a process management device according to an embodiment of the present invention.
Fig. 7 is another schematic structural diagram of a process management device according to an embodiment of the present invention.
Fig. 8 is a schematic structural diagram of a process management device according to an embodiment of the present invention.
Fig. 9 is a schematic diagram of another structure of a process management device according to an embodiment of the present invention.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Fig. 11 is another schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures. 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 terms "first" and "second", etc. in the present invention are used for distinguishing different objects, not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. A process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to the listed steps or modules but may alternatively include other steps or modules not listed or inherent to such process, method, article, or apparatus.
The embodiment of the invention provides a process management method, a process management device, a storage medium and electronic equipment.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic view of a scenario of an application management and control method according to an embodiment of the present invention. Fig. 2 is a schematic view of another scenario of the application management and control method according to the embodiment of the present invention.
The scene may include an electronic device, which may include a tablet, a PC (personal computer), a mobile phone, etc., having a storage unit and having an arithmetic capability with a microprocessor installed.
The electronic equipment takes a mobile phone as an example for explanation, and a plurality of processes running on the mobile phone are acquired; such as processes like notepad, day cat, art of love, business bank, WeChat, calendar, email, etc. Then, dividing the multiple processes according to the types of the multiple processes to obtain a process set; then acquiring a process closing proportion corresponding to the current system occupancy rate; and then closing the corresponding number of processes in the process set according to the process closing proportion. And each set closes a corresponding number of processes, so that the integrity and stability of the whole system can be maintained, and the occupancy rate and speed of the system can be improved.
The scenario may include an application management apparatus (not shown in the figure), which may be specifically integrated in the electronic device. The application control device is mainly used for acquiring a plurality of processes running on the electronic equipment; then, dividing the multiple processes according to the types of the multiple processes to obtain a process set; then acquiring a process closing proportion corresponding to the current system occupancy rate; and then closing the corresponding number of processes in the process set according to the process closing proportion.
The details will be described below separately.
In the embodiment of the present invention, the description will be made from the perspective of a process management apparatus, which may be integrated in an electronic device having an arithmetic capability, such as a tablet, a PC, or a mobile phone, which has a storage unit and a microprocessor.
A process management method is applied to electronic equipment and comprises the following steps: acquiring a plurality of processes running on an electronic device; dividing a plurality of processes according to the types of the plurality of processes to obtain a process set; acquiring a process closing proportion corresponding to the current system occupancy rate; and closing the corresponding number of processes in the process set according to the process closing proportion.
Referring to fig. 3, fig. 3 is a flowchart of a process management method according to an embodiment of the present invention. The process management method may include:
in step S101, a plurality of processes running on the electronic device are acquired.
In step S102, the multiple processes are divided according to the types of the multiple processes to obtain a process set.
The multiple processes are divided according to the types of the multiple processes, and the division can be performed according to the use types of the processes, such as video, instant messaging, photographing and the like. And the system can be divided according to the use environment types of the processes, such as indoor, outdoor, shopping mall and the like. The process can also be divided according to the flow type of the process, such as a process requiring a large flow, a process requiring only a small flow, a process not requiring a flow, and the like. It can also be divided according to the location type of the process, such as office process and mail process suitable for office, video process suitable for residence, payment process suitable for shopping mall, etc. Then, a corresponding process set is obtained, and the process set can correspond to one type of process or multiple types of processes.
In some embodiments, the step of dividing the multiple processes according to the types of the multiple processes to obtain the process set specifically includes: dividing the processes of the same type into corresponding process sets to obtain a plurality of process sets; and sequencing the processes in the process set according to the priority of the processes in the process set.
Wherein the priority of the process in the process set can be set by the system, such as setting the priority according to the types of the plurality of processes. The priority of the process may also be set according to a white list. The priority of the process can also be set according to the use habits of the user. And then sorting the processes in the process set according to the priorities of the processes in the process set. The processes of the process set are ordered.
In some embodiments, after obtaining the plurality of process sets, before sorting, when it is detected that the geographic location of the electronic device changes, selecting a target process set corresponding to the current location of the electronic device from the plurality of process sets; adjusting the priority of the processes in the target process set; and closing the corresponding number of processes in the target process set according to the process closing proportion.
Specifically, when the geographic location of the electronic device changes, for example, from a residence to a traffic road, the application used and needed by the user changes greatly, the importance of the progress of the video and game is reduced, the importance of the progress of the navigation and instant messaging is improved, and at this time, a target progress set corresponding to the traffic road is selected, the target progress set comprises the progress of the navigation and instant messaging, and the priority of the progress in the target progress set is increased, so that the progress in the target progress set better meets the needs of the user. And the other acquired target process set corresponding to the previous geographic position comprises processes such as videos and games, the priority of the processes in the target process set is reduced, the overhead of the system is reduced, the utilization rate of a CPU (central processing unit) is reduced, the occupancy rate of a memory is reduced, the response speed of the system is improved, the power consumption of the electronic equipment is reduced, and the electric quantity is saved.
In some embodiments, before sorting, when it is detected that the geographic location of the electronic device changes, one or more processes corresponding to the current location of the electronic device are selected from a plurality of processes; prioritizing the one or more processes; and sequencing the processes in the process set according to the priority of the processes in the process set. The rank of the process or processes to which the current location corresponds is higher. Similarly, one or more processes corresponding to the previous position of the electronic equipment are selected from the multiple processes; lowering the priority of the one or more processes; and sequencing the processes in the process set according to the priority of the processes in the process set. The rank of the process or processes to which the previous position corresponds is lower.
In some embodiments, after obtaining a plurality of process sets, before sorting, when it is detected that a current foreground process of an electronic device is switched, a target process set corresponding to the current foreground process is obtained; and then adjusting the priority of the processes in the process set, and then closing the corresponding number of processes in the target process set according to the process closing proportion.
Specifically, when the foreground process of the electronic device is switched, if the foreground process is changed from a video process to an office process, the applications used and needed by the user are greatly changed, the importance of the processes of the video, game, leisure and news is reduced, and the importance of the processes of the office, mail and web page query is improved. At this time, a target process set corresponding to the current foreground process is selected, the target process set comprises processes of office class, mail class and webpage query class, and the priority of the processes in the target process set is increased, so that the target process set better meets the requirements of users. And another target process set corresponding to the previous foreground process, which comprises processes of video, game, leisure and news, can be obtained, the priority of the processes in the target process set is reduced, the overhead of the system is reduced, the utilization rate of a CPU (Central processing Unit) is reduced, the occupancy rate of a memory is reduced, the response speed of the system is improved, the power consumption of the electronic equipment is reduced, and the electric quantity is saved.
In some embodiments, before sorting, when it is detected that a foreground process of the electronic device is switched, one or more processes corresponding to a current foreground process of the electronic device are selected from the multiple processes; prioritizing the one or more processes; and sequencing the processes in the process set according to the priority of the processes in the process set. The ranking of the one or more processes corresponding to the current foreground process is higher. Similarly, selecting one or more processes corresponding to the front foreground process of the electronic equipment from the plurality of processes; lowering the priority of the one or more processes; and sequencing the processes in the process set according to the priority of the processes in the process set. The rank of the process or processes to which the previous foreground process corresponds is lower.
In step S103, a process closing ratio corresponding to the current system occupancy rate is acquired.
The system occupancy rate can be obtained by the electronic device in real time, that is, the current system occupancy rate can be obtained at intervals, and the interval can be at millisecond level, second level, or classification level, such as 5 millisecond, 5 second, 5 minute, and the like. Therefore, the process can be well managed according to the current system occupancy rate. The system occupancy rate may be a CPU usage rate, a memory occupancy rate, or a combination of the CPU usage rate and the memory occupancy rate, for example, the CPU usage rate and the memory occupancy rate are calculated by half, or the system occupancy rate or the memory occupancy rate is set by a user.
And acquiring a corresponding process closing proportion according to the current system occupancy rate. For example, if the memory occupancy rate is 70%, a larger process closing rate, such as 50%, 60%, etc., is obtained, and if the memory occupancy rate is 40%, a smaller process closing rate, such as 20%, 30%, etc., is obtained.
In some embodiments, the step of obtaining the process closing proportion corresponding to the current system occupancy further includes: setting a preset time threshold; and if the system time reaches a preset time threshold, acquiring the current system occupancy rate.
It should be noted that the preset time threshold may be a time point, such as 8 o' clock earlier, at this time, the subsequent steps are started, and before the user uses the electronic device, the electronic device has already been automatically cleaned, so that the user can use the electronic device for the subsequent time. If 12 o' clock evening, after the user leisure, electronic equipment has automatically accomplished the clearance, practices thrift the electric quantity, and electronic equipment standby is more of a specified duration, can not cause electronic equipment automatic shutdown because the electric quantity is not enough, the unable normal use of next day, especially, when electronic equipment has the alarm clock function, cause the user to the next morning unable circumstances such as getting up on time, late to take place. The preset time threshold may also be a time period, and after one time of cleaning the process, the process cleaning is started again after one time of period elapses. The time period may be 30 minutes, 1 hour, 4 hours, etc.
When the system time of the electronic equipment reaches a preset time threshold, acquiring the current system occupancy rate, and further acquiring a process closing proportion corresponding to the current system occupancy rate; and closing the corresponding number of processes in the process set according to the process closing proportion. The cleaning process is started through time, so that the electronic equipment can be in an efficient state for a long time, the electronic equipment is not required to be cleaned when the waiting system occupancy rate is high and the operation is not smooth, the electronic equipment can be used smoothly only by cleaning before a user needs to use the electronic equipment, the time is wasted, and the user experience is reduced.
In some embodiments, the step of obtaining the process closing proportion corresponding to the current system occupancy rate includes:
if the system occupancy rate is higher than a preset threshold value, acquiring a first process closing proportion corresponding to the system occupancy rate;
and if the system occupancy rate is lower than the preset threshold value, acquiring a second process closing proportion corresponding to the system occupancy rate, wherein the second process closing proportion is smaller than the first process closing proportion.
The preset threshold value can be set by a system according to the jam condition, and if the system occupancy rate reaches 70%, the program of the system operation part will jam, and 70% is set as the preset threshold value. The preset threshold may also be set manually by the user. If the system occupancy rate is higher than a preset threshold value, acquiring a first process closing proportion corresponding to the system occupancy rate; such as 50%, 60%, etc. And if the system occupancy rate is lower than the preset threshold value, acquiring a second process closing proportion corresponding to the system occupancy rate, wherein the second process closing proportion is smaller than the first process closing proportion. The second process shutdown may be 20%, 30%, etc.
In step S104, a corresponding number of processes in the process set are closed according to the process closing ratio.
Specifically, according to the process closing proportion obtained in the previous step, the corresponding number of processes in the process set is closed. The corresponding number of processes in the process set may be closed randomly, or the processes may be closed in a certain closing order, for example, the closing order may be that the processes in the process set are closed in sequence from low to high according to the priority.
Referring to fig. 4 and 5, fig. 4 is another flowchart of a process management method according to an embodiment of the present invention. Fig. 5 is a schematic view of another scenario of the application management and control method according to the embodiment of the present invention. In the embodiment of the invention, the process management method comprises the following steps:
in step S201, a plurality of processes running on the electronic device are acquired;
in step S202, dividing a plurality of processes according to a visible process, a secondary service process, and a background process to obtain a corresponding first process set, a second process set, and a third process set;
in step 203, a fourth process closing proportion corresponding to the first process set, a fifth process closing proportion corresponding to the second process set, and a sixth process closing proportion corresponding to the third process set are respectively obtained; and the fourth process closing proportion is smaller than the fifth process closing proportion, and the fifth process closing proportion is smaller than the sixth process closing proportion.
In step S204, a corresponding number of processes in the first process set, the second process set, and the third process set are closed according to the fourth process closing ratio, the fifth process closing ratio, and the sixth process closing ratio.
It should be noted that, according to the importance of the process, the importance of the visible process is greater than that of the secondary service process, and the importance of the secondary service process is greater than that of the background process, so that the processes of the first process set, the second process set and the third process set are respectively closed in different proportions, so that the integrity and stability of the whole system can be maintained, and the occupancy rate and speed of the system can be increased.
Meanwhile, different process closing proportions are adopted according to the occupancy rate of the system. If the occupancy rate of the system is 70%, the closing rate of the fourth process, the closing rate of the fifth process and the closing rate of the sixth process are respectively 28%, 35% and 42%. The occupancy rate of the system is 40%, and the fourth process closing proportion, the fifth process closing proportion and the sixth process closing proportion are 16%, 20% and 24%, respectively.
In summary, the process management method provided by the present invention first obtains a plurality of processes running on the electronic device; then, dividing the multiple processes according to the types of the multiple processes to obtain a process set; then acquiring a process closing proportion corresponding to the current system occupancy rate; and then closing the corresponding number of processes in the process set according to the process closing proportion. Therefore, the integrity and the stability of the whole system can be maintained, and the occupancy rate and the speed of the system can be improved.
In order to better implement the process management method provided by the embodiment of the invention, the embodiment of the invention also provides a device based on the process management method. The terms are the same as those in the process management method, and details of implementation may refer to the description in the method embodiment.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a process management device according to an embodiment of the present invention. In this embodiment of the present invention, the process management apparatus 300 includes a first obtaining module 301, a process dividing module 302, a second obtaining module 303, and a processing module 304.
A first obtaining module 301, configured to obtain a plurality of processes running on an electronic device.
The process dividing module 302 is configured to divide the multiple processes according to the types of the multiple processes to obtain a process set.
The multiple processes are divided according to the types of the multiple processes, and the division can be performed according to the use types of the processes, such as video, instant messaging, photographing and the like. And the system can be divided according to the use environment types of the processes, such as indoor, outdoor, shopping mall and the like. The process can also be divided according to the flow type of the process, such as a process requiring a large flow, a process requiring only a small flow, a process not requiring a flow, and the like. It can also be divided according to the location type of the process, such as office process and mail process suitable for office, video process suitable for residence, payment process suitable for shopping mall, etc. Then, a corresponding process set is obtained, and the process set can correspond to one type of process or multiple types of processes.
In some embodiments, please refer to fig. 7, and fig. 7 is a schematic structural diagram of a process management device according to an embodiment of the present invention. In this embodiment, the process partitioning module 302 further includes a process partitioning submodule 3021 and a process ordering submodule 3022.
A process division submodule 3021, configured to divide the processes of the same type into corresponding process sets, so as to obtain a plurality of process sets;
the process ordering submodule 3022 is configured to order the processes in the process set according to the priorities of the processes in the process set.
The priority of the process in the process set can be set by the system, such as setting the priority according to the types of the multiple processes. The priority of the process may also be set according to a white list. The priority of the process can also be set according to the use habits of the user. And then sorting the processes in the process set according to the priorities of the processes in the process set. The processes of the process set are ordered.
In some embodiments, please refer to fig. 8, and fig. 8 is a schematic structural diagram of a process management device according to an embodiment of the present invention. In this embodiment, the apparatus further comprises a third acquiring module 3023 and a priority adjusting module 3024.
A third obtaining module 3023, configured to select, when it is detected that the geographic location of the electronic device changes, a target process set corresponding to the current location of the electronic device from the multiple process sets;
a priority adjustment module 3024, configured to adjust priorities of processes in the target process set;
and the processing module 304 is configured to close a corresponding number of processes in the target process set according to the process closing ratio.
Specifically, when the geographic location of the electronic device changes, for example, from a residence to a traffic road, the application used and needed by the user changes greatly, the importance of the progress of the video and game is reduced, the importance of the progress of the navigation and instant messaging is improved, and at this time, a target progress set corresponding to the traffic road is selected, the target progress set comprises the progress of the navigation and instant messaging, and the priority of the progress in the target progress set is increased, so that the progress in the target progress set better meets the needs of the user. And the other acquired target process set corresponding to the previous geographic position comprises processes such as videos and games, the priority of the processes in the target process set is reduced, the overhead of the system is reduced, the utilization rate of a CPU (central processing unit) is reduced, the occupancy rate of a memory is reduced, the response speed of the system is improved, the power consumption of the electronic equipment is reduced, and the electric quantity is saved.
In some embodiments, please refer to fig. 9, and fig. 9 is a schematic diagram illustrating another structure of a process management apparatus according to an embodiment of the present invention. In this embodiment, the apparatus further comprises a fourth acquiring module 3025 and a priority adjusting module 3023.
A fourth obtaining module 3025, configured to obtain a target process set corresponding to a current foreground process when it is detected that the current foreground process of the electronic device is switched;
a priority adjusting module 3024, configured to adjust the priority of the process in the process set;
the processing module 304 is further configured to close a corresponding number of processes in the target process set according to the process closing ratio.
Specifically, when the foreground process of the electronic device is switched, if the foreground process is changed from a video process to an office process, the applications used and needed by the user are greatly changed, the importance of the processes of the video, game, leisure and news is reduced, and the importance of the processes of the office, mail and web page query is improved. At this time, a target process set corresponding to the current foreground process is selected, the target process set comprises processes of office class, mail class and webpage query class, and the priority of the processes in the target process set is increased, so that the target process set better meets the requirements of users. And another target process set corresponding to the previous foreground process, which comprises processes of video, game, leisure and news, can be obtained, the priority of the processes in the target process set is reduced, the overhead of the system is reduced, the utilization rate of a CPU (Central processing Unit) is reduced, the occupancy rate of a memory is reduced, the response speed of the system is improved, the power consumption of the electronic equipment is reduced, and the electric quantity is saved.
It should be noted that, in the above embodiment, the third acquiring module 3023 and the fourth acquiring module 3025 may be simultaneously disposed in the process management apparatus 300. The priority adjustment module 3024 then adjusts the processes of the process set acquired by the third acquisition module 3023 and the fourth acquisition module 3025 together.
A second obtaining module 303, configured to obtain a process closing ratio corresponding to the current system occupancy rate.
The system occupancy rate can be obtained by the electronic device in real time, that is, the current system occupancy rate can be obtained at intervals, and the interval can be at millisecond level, second level, or classification level, such as 5 millisecond, 5 second, 5 minute, and the like. Therefore, the process can be well managed according to the current system occupancy rate. The system occupancy rate may be a CPU usage rate, a memory occupancy rate, or a combination of the CPU usage rate and the memory occupancy rate, for example, the CPU usage rate and the memory occupancy rate are calculated by half, or the system occupancy rate or the memory occupancy rate is set by a user.
And acquiring a corresponding process closing proportion according to the current system occupancy rate. For example, if the memory occupancy rate is 70%, a larger process closing rate, such as 50%, 60%, etc., is obtained, and if the memory occupancy rate is 40%, a smaller process closing rate, such as 20%, 30%, etc., is obtained.
In some embodiments, the apparatus further comprises a time threshold setting module and a system occupancy acquisition module.
And the time threshold setting module is used for setting a preset time threshold. The preset time threshold may be a time point, such as 8 o' clock earlier, at which point the subsequent steps are started, and before the user uses the electronic device, the electronic device has been automatically cleaned, so that the user can use the electronic device for the subsequent time. If 12 o' clock evening, after the user leisure, electronic equipment has automatically accomplished the clearance, practices thrift the electric quantity, and electronic equipment standby is more of a specified duration, can not cause electronic equipment automatic shutdown because the electric quantity is not enough, the unable normal use of next day, especially, when electronic equipment has the alarm clock function, cause the user to the next morning unable circumstances such as getting up on time, late to take place. The preset time threshold may also be a time period, and after one time of cleaning the process, the process cleaning is started again after one time of period elapses. The time period may be 30 minutes, 1 hour, 4 hours, etc.
And the system occupancy rate acquisition module is used for acquiring the current system occupancy rate if the system time reaches a preset time threshold value.
When the system time of the electronic equipment reaches a preset time threshold, acquiring the current system occupancy rate, and further acquiring a process closing proportion corresponding to the current system occupancy rate; and closing the corresponding number of processes in the process set according to the process closing proportion. The cleaning process is started through time, so that the electronic equipment can be in an efficient state for a long time, the electronic equipment is not required to be cleaned when the waiting system occupancy rate is high and the operation is not smooth, the electronic equipment can be used smoothly only by cleaning before a user needs to use the electronic equipment, the time is wasted, and the user experience is reduced.
In some embodiments, the second obtaining module is further configured to, if the system occupancy is higher than a preset threshold, obtain a first process closing proportion corresponding to the system occupancy; and if the system occupancy rate is lower than the preset threshold value, acquiring a second process closing proportion corresponding to the system occupancy rate, wherein the second process closing proportion is smaller than the first process closing proportion.
And the processing module 304 is configured to close a corresponding number of processes in the process set according to the process closing ratio.
And closing the corresponding number of processes in the process set according to the process closing proportion acquired in the last step. The corresponding number of processes in the process set may be closed randomly, or the processes may be closed in a certain closing order, for example, the closing order may be that the processes in the process set are closed in sequence from low to high according to the priority.
In some embodiments, the first obtaining module 301 is further configured to obtain a plurality of processes running on the electronic device. The process partitioning module 302 is further configured to partition the multiple processes according to the visible process, the secondary service process, and the background process to obtain a corresponding first process set, a second process set, and a third process set. The second obtaining module 303 is further configured to obtain a fourth process closing ratio corresponding to the first process set, a fifth process closing ratio corresponding to the second process set, and a sixth process closing ratio corresponding to the third process set, respectively; and the fourth process closing proportion is smaller than the fifth process closing proportion, and the fifth process closing proportion is smaller than the sixth process closing proportion. The processing module 304 is further configured to close a corresponding number of processes in the first process set, the second process set, and the third process set according to the fourth process closing proportion, the fifth process closing proportion, and the sixth process closing proportion.
It should be noted that, according to the importance of the process, the importance of the visible process is greater than that of the secondary service process, and the importance of the secondary service process is greater than that of the background process, so that the processes of the first process set, the second process set and the third process set are respectively closed in different proportions, so that the integrity and stability of the whole system can be maintained, and the occupancy rate and speed of the system can be increased.
Meanwhile, different process closing proportions are adopted according to the occupancy rate of the system. If the occupancy rate of the system is 70%, the closing rate of the fourth process, the closing rate of the fifth process and the closing rate of the sixth process are respectively 28%, 35% and 42%. The occupancy rate of the system is 40%, and the fourth process closing proportion, the fifth process closing proportion and the sixth process closing proportion are 16%, 20% and 24%, respectively.
In summary, the process management apparatus provided in the present invention first obtains a plurality of processes running on an electronic device; then, dividing the multiple processes according to the types of the multiple processes to obtain a process set; then acquiring a process closing proportion corresponding to the current system occupancy rate; and then closing the corresponding number of processes in the process set according to the process closing proportion. Therefore, the integrity and the stability of the whole system can be maintained, and the occupancy rate and the speed of the system can be improved.
The embodiment of the invention also provides the electronic device 400. The electronic device 400 may be a smart phone, a tablet computer, or the like. As shown in fig. 10, fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. The electronic device 400 includes: a processor 401 and a memory 402. The processor 401 is electrically connected to the memory 402.
The processor 401 is a control center of the electronic device 400, connects various parts of the whole electronic device 400 by using various interfaces and lines, performs various functions of the electronic device 400 and processes data by running or loading an application program stored in the memory 402 and calling the data stored in the memory 402, thereby performing overall monitoring of the electronic device 400.
In this embodiment, the processor 401 in the electronic device 400 loads instructions corresponding to processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 runs the application programs stored in the memory 402, thereby implementing various functions:
acquiring a plurality of processes running on an electronic device;
dividing a plurality of processes according to the types of the plurality of processes to obtain a process set;
acquiring a process closing proportion corresponding to the current system occupancy rate;
and closing the corresponding number of processes in the process set according to the process closing proportion.
The memory 402 may be used to store applications and data. The memory 402 stores applications containing instructions executable in the processor 401. The application programs may constitute various functional modules. The processor 401 executes various functional applications and data processing by running an application program stored in the memory 402.
In some embodiments, please refer to fig. 11, and fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. The electronic device 400 further comprises: radio frequency circuit 403, display 404, control circuit 405, input unit 406, audio circuit 407, sensor 408, and power supply 409. The processor 401 is electrically connected to the radio frequency circuit 403, the display 404, the control circuit 405, the input unit 406, the audio circuit 407, the sensor 408, and the power source 409.
The radio frequency circuit 403 is used for transceiving radio frequency signals to communicate with a server or other electronic devices through a wireless communication network.
The display screen 404 may be used to display information entered by or provided to the user as well as various graphical user interfaces of the terminal, which may be comprised of images, text, icons, video, and any combination thereof.
The control circuit 405 is electrically connected to the display screen 404, and is configured to control the display screen 404 to display information.
The input unit 406 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The audio circuit 407 may provide an audio interface between the user and the terminal through a speaker, microphone.
The sensor 408 is used to collect external environmental information. The sensor 28 may include one or more of an ambient light sensor, an acceleration sensor, a gyroscope, and the like.
The power supply 409 is used to power the various components of the electronic device 400. In some embodiments, the power source 409 may be logically connected to the processor 401 through a power management system, so that functions of managing charging, discharging, and power consumption are implemented through the power management system.
Although not shown in fig. 11, the electronic device 400 may further include a camera, a bluetooth module, and the like, which are not described in detail herein.
As can be seen from the above, an embodiment of the present invention provides an electronic device, which first obtains a plurality of processes running on the electronic device; then, dividing the multiple processes according to the types of the multiple processes to obtain a process set; then acquiring a process closing proportion corresponding to the current system occupancy rate; and then closing the corresponding number of processes in the process set according to the process closing proportion. Therefore, the integrity and the stability of the whole system can be maintained, and the occupancy rate and the speed of the system can be improved.
The embodiment of the present invention further provides a storage medium, where a plurality of instructions are stored in the storage medium, and the instructions are suitable for being loaded by a processor to execute the process management method according to any of the above embodiments.
It should be noted that, as one of ordinary skill in the art would understand, all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a program, and the program may be stored in a computer-readable medium, which may include but is not limited to: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The above detailed description is provided for the process management method, apparatus, storage medium and electronic device according to the embodiments of the present invention, and a specific example is applied in this document to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, 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 invention.

Claims (14)

1. A process management method is applied to electronic equipment, and is characterized in that the method comprises the following steps:
acquiring a plurality of processes running on the electronic equipment;
dividing the plurality of processes according to a visible process, a secondary service process and a background process to obtain a first process set, a second process set and a third process set, wherein the importance of the visible process is greater than that of the secondary service process, and the importance of the secondary service process is greater than that of the background process;
determining a process closing proportion corresponding to each process set according to the importance of different process sets and the current system occupancy rate to obtain a fourth process closing proportion of the first process set, a fifth process closing proportion corresponding to the second process set and a sixth process closing proportion corresponding to the third process set, wherein the fourth process closing proportion is smaller than the fifth process closing proportion, the fifth process closing proportion is smaller than the sixth process closing proportion, and the process closing proportion corresponding to each process set is positively correlated with the current system occupancy rate;
acquiring the priority of each process in each process set;
and respectively closing the processes with the corresponding number in each process set according to the process closing proportion corresponding to each process set and the sequence of the priority of the processes in each process set from low to high.
2. The process management method according to claim 1, wherein dividing the plurality of processes according to the types of the plurality of processes to obtain a process set comprises:
dividing the processes of the same type into corresponding process sets to obtain a plurality of process sets;
and sequencing the processes in the process set according to the priority of the processes in the process set.
3. The process management method according to claim 2, wherein after dividing the processes of the same type into the corresponding process sets to obtain a plurality of process sets, before sorting the processes in the process sets according to the priorities of the processes in the process sets, the method further comprises:
when the change of the geographic position of the electronic equipment is detected, selecting a target process set corresponding to the current position of the electronic equipment from the plurality of process sets;
adjusting the priority of the processes in the target process set;
closing the corresponding number of processes in the process set according to the process closing proportion, wherein the process closing proportion comprises the following steps:
and closing the corresponding number of processes in the target process set according to the process closing proportion.
4. The process management method according to claim 2, wherein after dividing the processes of the same type into the corresponding process sets to obtain a plurality of process sets, before sorting the processes in the process sets according to the priorities of the processes in the process sets, the method further comprises:
when the switching of the current foreground process of the electronic equipment is detected, selecting a target process set corresponding to the current foreground process from the plurality of process sets;
adjusting the priority of the processes in the target process set;
closing the corresponding number of processes in the process set according to the process closing proportion, wherein the process closing proportion comprises the following steps:
and closing the corresponding number of processes in the target process set according to the process closing proportion.
5. The process management method according to claim 1, wherein obtaining the process closing proportion corresponding to the current system occupancy rate comprises:
if the system occupancy rate is higher than a preset threshold value, acquiring a first process closing proportion corresponding to the system occupancy rate;
and if the system occupancy rate is lower than a preset threshold value, acquiring a second process closing proportion corresponding to the system occupancy rate, wherein the second process closing proportion is smaller than the first process closing proportion.
6. The process management method according to claim 1, wherein obtaining the process closing proportion corresponding to the current system occupancy rate comprises:
setting a preset time threshold;
and if the system time reaches the preset time threshold, acquiring the current system occupancy rate.
7. A process management device applied to electronic equipment is characterized by comprising:
a first obtaining module, configured to obtain a plurality of processes running on the electronic device;
the process dividing module is used for dividing the plurality of processes according to the visible process, the secondary service process and the background process to obtain a first process set, a second process set and a third process set, wherein the importance of the visible process is greater than that of the secondary service process, and the importance of the secondary service process is greater than that of the background process;
the second obtaining module is used for determining a process closing proportion corresponding to each process set according to the importance of different process sets and the current system occupancy rate to obtain a fourth process closing proportion of the first process set, a fifth process closing proportion corresponding to the second process set and a sixth process closing proportion corresponding to the third process set, wherein the fourth process closing proportion is smaller than the fifth process closing proportion, the fifth process closing proportion is smaller than the sixth process closing proportion, and the process closing proportion corresponding to each process set is positively correlated with the current system occupancy rate;
and the processing module is used for acquiring the priority of each process in each process set, and respectively closing the processes with the corresponding quantity in each process set according to the process closing proportion corresponding to each process set and the sequence of the priorities of the processes in each process set from low to high.
8. The process management device according to claim 7, wherein said device further comprises:
the process division submodule is used for dividing the processes of the same type into corresponding process sets to obtain a plurality of process sets;
and the process ordering submodule is used for ordering the processes in the process set according to the priority of the processes in the process set.
9. The process management device according to claim 8, wherein said device further comprises:
a third obtaining module, configured to select, when it is detected that a geographic location of the electronic device changes, a target process set corresponding to a current location of the electronic device from the multiple process sets;
a priority adjustment module for adjusting the priority of the processes in the target process set;
and the processing module is further used for closing the corresponding number of processes in the target process set according to the process closing proportion.
10. The process management device according to claim 8, wherein said device further comprises:
a fourth obtaining module, configured to, when it is detected that a current foreground process of the electronic device is switched, select a target process set corresponding to the current foreground process from the multiple process sets;
a priority adjustment module for adjusting the priority of the processes in the target process set;
and the processing module is further used for closing the corresponding number of processes in the target process set according to the process closing proportion.
11. The process management device according to claim 7, wherein said device further comprises:
the second obtaining module is further configured to obtain a first process closing proportion corresponding to the system occupancy rate if the system occupancy rate is higher than a preset threshold value; and if the system occupancy rate is lower than a preset threshold value, acquiring a second process closing proportion corresponding to the system occupancy rate, wherein the second process closing proportion is smaller than the first process closing proportion.
12. The process management device according to claim 7, wherein said device further comprises:
the time threshold setting module is used for setting a preset time threshold;
and the system occupancy rate acquisition module is used for acquiring the current system occupancy rate if the system time reaches the preset time threshold.
13. A storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor for performing the steps of the method according to any of claims 1-6.
14. An electronic device comprising a memory and a processor, the memory storing instructions, the processor loading the instructions to perform the steps of the method of any of claims 1-6.
CN201710644134.0A 2017-07-31 2017-07-31 Process management method, device, storage medium and electronic equipment Expired - Fee Related CN107479953B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710644134.0A CN107479953B (en) 2017-07-31 2017-07-31 Process management method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710644134.0A CN107479953B (en) 2017-07-31 2017-07-31 Process management method, device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN107479953A CN107479953A (en) 2017-12-15
CN107479953B true CN107479953B (en) 2020-08-25

Family

ID=60598240

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710644134.0A Expired - Fee Related CN107479953B (en) 2017-07-31 2017-07-31 Process management method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN107479953B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108829499A (en) * 2018-04-29 2018-11-16 郑州易通众联电子科技有限公司 The management method and managing device of electronic equipment
CN109324878A (en) * 2018-09-20 2019-02-12 郑州云海信息技术有限公司 A kind of control method and relevant device of process CPU usage
CN111949471A (en) * 2019-05-16 2020-11-17 珠海格力电器股份有限公司 Monitoring control method for terminal process
CN111949385A (en) * 2019-05-16 2020-11-17 珠海格力电器股份有限公司 Monitoring control method for terminal process
CN110806926A (en) * 2019-09-05 2020-02-18 华为技术有限公司 Resource control method and equipment
CN113505018A (en) * 2021-07-27 2021-10-15 联想(北京)有限公司 Interference process detection method and device and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104778031A (en) * 2014-01-09 2015-07-15 腾讯科技(深圳)有限公司 Method and device for closing processes
CN106844032A (en) * 2017-01-23 2017-06-13 努比亚技术有限公司 The storage processing method and device of a kind of terminal applies

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981906A (en) * 2012-11-16 2013-03-20 广东欧珀移动通信有限公司 Application program background process management method and device
CN103106093A (en) * 2013-02-21 2013-05-15 北京奇虎科技有限公司 System operation quickening method and device
CN104461742B (en) * 2014-12-15 2016-10-12 北京奇虎科技有限公司 Calculate equipment optimization method and device
CN106096391B (en) * 2016-06-02 2019-05-03 珠海豹趣科技有限公司 A kind of course control method and user terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104778031A (en) * 2014-01-09 2015-07-15 腾讯科技(深圳)有限公司 Method and device for closing processes
CN106844032A (en) * 2017-01-23 2017-06-13 努比亚技术有限公司 The storage processing method and device of a kind of terminal applies

Also Published As

Publication number Publication date
CN107479953A (en) 2017-12-15

Similar Documents

Publication Publication Date Title
CN107479953B (en) Process management method, device, storage medium and electronic equipment
CN108363593B (en) Application program preloading method and device, storage medium and terminal
EP3502880A1 (en) Method for preloading application, storage medium, and terminal device
CN109213539B (en) Memory recovery method and device
CN107911798B (en) Message pushing method and device and terminal
CN107944277B (en) Application starting control method and device, storage medium and intelligent terminal
CN107943650B (en) Application program control method and device, storage medium and terminal
US10805100B2 (en) Method and system for sorting chatroom list based on conversational activeness and contextual information
CN109947497B (en) Application program preloading method and device, storage medium and mobile terminal
CN108595224B (en) Application program prompting method and device, storage medium and terminal
CN107402808B (en) Process management method, device, storage medium and electronic equipment
CN102025835A (en) Method and device for automatically classifying application programs in mobile terminal
CN108762844B (en) Application program preloading method and device, storage medium and terminal
CN113032112A (en) Resource scheduling method and device, electronic equipment and storage medium
CN110740088B (en) Method, device, terminal and medium for recommending and adding social resources
CN107748697B (en) Application closing method and device, storage medium and electronic equipment
CN107943570B (en) Application management method and device, storage medium and electronic equipment
US11082806B2 (en) Method of identifying user location, storage medium and electronic device
CN112052096A (en) Resource processing method and device, server and terminal
CN107608744B (en) Application process management method and device and mobile terminal
CN107450951B (en) Application processing method and device, storage medium and terminal
CN104980451A (en) Information prompting method and apparatus
CN113157439B (en) Resource statistics method, device and terminal
CN107291543B (en) Application processing method and device, storage medium and terminal
CN106844070A (en) A kind of control method of broadcast, device and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200825

CF01 Termination of patent right due to non-payment of annual fee