CN107463403B - Process control method, device, storage medium and electronic equipment - Google Patents

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

Info

Publication number
CN107463403B
CN107463403B CN201710643030.8A CN201710643030A CN107463403B CN 107463403 B CN107463403 B CN 107463403B CN 201710643030 A CN201710643030 A CN 201710643030A CN 107463403 B CN107463403 B CN 107463403B
Authority
CN
China
Prior art keywords
background
current
acquiring
foreground
priority
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.)
Active
Application number
CN201710643030.8A
Other languages
Chinese (zh)
Other versions
CN107463403A (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 CN202010167023.7A priority Critical patent/CN111309400A/en
Priority to CN201710643030.8A priority patent/CN107463403B/en
Publication of CN107463403A publication Critical patent/CN107463403A/en
Priority to PCT/CN2018/094251 priority patent/WO2019024642A1/en
Application granted granted Critical
Publication of CN107463403B publication Critical patent/CN107463403B/en
Active 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • 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
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a process control method, a device, a storage medium and an electronic device, wherein the process control method comprises the following steps: acquiring a current foreground process, a current background process and the priority of the current foreground process and the current background process; determining the closing quantity according to the quantity of the current foreground and background processes; acquiring an associated process set corresponding to the current foreground process; adjusting the priority of the current background process according to the association process set; and controlling the opening and closing of the current and next processes according to the adjusted priority and the adjusted closing quantity. The process control method can flexibly control the background process by combining the foreground process, is simple, is beneficial to saving the electric quantity of the terminal and improves the operation efficiency of the terminal.

Description

Process control method, device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a process control method, an apparatus, a storage medium, and an electronic device.
Background
At present, most terminal devices can run a multi-user and multi-process operating system. For background programs, when different programs are pulled up, the programs are usually pulled up according to a certain priority, the priority of the current application program is often fixed, a user cannot adjust the limited level even in an unclear condition, part of service processes are often bound with the application program, and if the priority of the application program is higher, the service processes are often continuously operated due to the binding together even when the service processes are not operated, so that the electric quantity of the terminal is consumed.
Disclosure of Invention
The embodiment of the invention provides a process control method, a process control device, a storage medium and electronic equipment, which can effectively control background processes and reduce waste of terminal electric quantity.
The embodiment of the invention provides a process control method, which is applied to electronic equipment and comprises the following steps:
acquiring a current foreground process, a current background process and the priority of the current background process in the electronic equipment;
determining the closing quantity according to the quantity of the current background processes;
acquiring an associated process set corresponding to the current foreground process;
adjusting the priority of the current background process according to the association process set;
and controlling the opening and closing of the current background process according to the adjusted priority and the adjusted closing quantity.
The embodiment of the invention also provides a process control device, which is applied to electronic equipment and comprises the following steps:
the first acquisition module is used for acquiring a current foreground process, a current background process and the priority of the current background process in the electronic equipment;
the determining module is used for determining the closing quantity according to the quantity of the current background processes;
a second obtaining module, configured to obtain an associated process set corresponding to the current foreground process;
the adjusting module is used for adjusting the priority of the current background process according to the association process set;
and the control module is used for controlling the opening and closing of the current background process according to the adjusted priority and the closing quantity.
The embodiment of the invention also provides a storage medium, wherein a plurality of instructions are stored in the storage medium, and the instructions are suitable for being loaded by a processor to execute any one of the process control methods.
The embodiment of the invention also provides electronic equipment which comprises a processor and a memory, wherein the processor is electrically connected with the memory, the memory is used for storing instructions and data, and the processor is used for executing any one of the process control methods.
According to the process control method, the device, the storage medium and the electronic equipment, the current foreground process, the current background process and the priority of the current foreground process and the current background process are obtained, the closing number is determined according to the number of the current foreground process and the closing number, then the associated process set corresponding to the current foreground process is obtained, the priority of the current background process is adjusted according to the associated process set, and then the opening and closing of the current background process are controlled according to the adjusted priority and the closing number, so that the background process can be flexibly controlled by combining the foreground process.
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 schematic view of an application scenario of a process control system according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating a process control method according to an embodiment of the present invention.
Fig. 3 is another schematic flow chart of a process control method according to an embodiment of the present invention.
Fig. 4 is a schematic interface diagram of a current background process according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a process control apparatus according to an embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a third obtaining module according to an embodiment of the present invention.
Fig. 7 is a schematic structural diagram of an adjusting module according to an embodiment of the present invention.
Fig. 8 is a schematic structural diagram of a control module according to an embodiment of the present invention.
Fig. 9 is a schematic structural diagram of an electronic 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 embodiment of the invention provides a process control method, a process control device, a storage medium, electronic equipment and a system.
Referring to fig. 1, fig. 1 is a diagram illustrating an application scenario of a process control system, which may include any electronic device provided by the present invention.
The electronic device can obtain a current foreground process, a current background process and the priority of the current foreground process and the current background process, determine the closing number according to the number of the current foreground process and the current background process, then obtain an associated process set corresponding to the current foreground process, adjust the priority of the current background process according to the associated process set, and then control the opening and closing of the current foreground process and the current background process according to the adjusted priority and the closing number.
For example, the current foreground process acquired by the electronic device may be Q, the current background process may be { H1, H2 … Hn }, the total number of the current foreground and background processes is n, the closing number determined according to the number n may be i, the priority of the current background process is adjusted by acquiring the associated process set corresponding to the current foreground process Q, and according to the associated process set, so that i foreground and background processes with the lowest adjusted priority may be selected from { H1, H2 … Hn }, and closed.
The embodiment will be described from the perspective of a process control 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, a personal computer, and the like.
As shown in fig. 2, the process control method may be applied to an electronic device, and the specific flow may be as follows:
s101, acquiring a current foreground process, a current background process and the priority of the foreground process and the background process in the electronic equipment.
In this embodiment, the priority may be set in advance according to the attribute information of each process, for example, the priority of the system process may be higher than the priority of the non-system process, the priority of the instant messaging process may be higher than the priority of the shopping process, and the like.
Since the running of the process may affect the electric quantity, the CPU occupancy rate, the running speed, and the like of the electronic device, the triggering condition of the process control instruction may be determined according to the electric quantity, the CPU occupancy rate, and the running speed, for example, when the electric quantity or the running speed is lower than a certain value, or the CPU occupancy rate is higher than a certain value, the electronic device may perform a background process cleaning operation, that is, may trigger execution of step S101.
And S102, determining the closing quantity according to the quantity of the foreground and background processes.
In this embodiment, the closing number may be set in advance, and may be determined directly according to the number of foreground and background processes, for example, different closing numbers are set in advance for different background processes, or may be determined indirectly, for example, a closing ratio may be set manually, and then the closing number is calculated according to the closing ratio and the number of foreground and background processes.
S103, acquiring an associated process set corresponding to the current foreground process.
In this embodiment, the associated process set includes at least one associated process, where the associated process refers to a process related to a current foreground process, and generally, different foreground processes correspond to different associated process sets. It should be noted that, the associated process set should be set in advance, that is, before the step S103, the process control method may further include:
acquiring a foreground process running in the electronic equipment in a historical period;
acquiring a background process corresponding to each foreground process, and the switching frequency of each background process and the interval duration between two continuous switching, wherein the switching frequency is the frequency of switching the background process to the foreground process;
and determining an associated process set corresponding to the foreground process from the background process according to the switching times and the interval duration.
For example, the step of "determining the associated process set corresponding to the foreground process from the background process according to the switching times and the interval duration" may specifically include:
calculating the switching frequency of the corresponding background process according to the switching times and the interval duration;
and acquiring the background process with the switching frequency higher than the preset frequency, or acquiring the background process with the highest switching frequency as the associated process corresponding to the foreground process, and adding the associated process into the associated process set.
In this embodiment, the history time period, the preset frequency and the preset bit may be set in advance manually. Specifically, the switching frequency may be calculated according to the switching frequency and the interval duration, for example, the total duration may be calculated by adding all the interval durations, and the switching frequency is determined according to a quotient between the total duration and the switching frequency.
It should be noted that, there is no obvious difference between the foregoing steps S102 and S103, and they may be performed simultaneously.
And S104, adjusting the priority of the current background process according to the association process set.
In this embodiment, the adjustment operation may include increasing and decreasing, and different objects may adopt different adjustment operations.
For example, the step S104 may specifically include:
and acquiring the current background process which is the same as the associated process in the associated process set as a first process.
And acquiring the running time of the first process in the background.
And the priority of the first process is increased according to the running time.
In this embodiment, each associated process is the process that is most likely to be switched with the current foreground process, that is, the process that is most likely to be used by the user in the subsequent use process, so the importance of the processes to the user is obviously higher than that of other processes, and in order to avoid the processes from being cleaned up, the priority of the processes can be improved.
For example, the step S104 may further include:
acquiring a current background process except the first process as a second process;
acquiring the resource occupancy rate of the second process;
and reducing the priority of the second process according to the resource occupancy rate.
In this embodiment, the resource occupancy may include cache occupancy, CPU occupancy, and the like. According to the historical use habit of the user, the probability that the current background processes which do not belong to the associated process set are switched to the foreground for use in a short time is extremely low, which shows that the importance of the processes to the user is obviously low at this time, so that the priorities of the processes can be reduced, the processes with more occupied resources can be preferentially cleared, and in the process of reducing the priorities, the processes with more occupied resources can be preferentially cleared by considering that the resource occupation conditions of different processes to the electronic equipment are different, namely, the reduction range of the process with high resource occupancy rate can be set to be larger, and the reduction range of the process with low resource occupancy rate can be set to be smaller.
And S105, controlling the opening and closing of the current and next processes according to the adjusted priority and the closing number.
For example, the step S105 may specifically include:
acquiring the current background processes with the adjusted closing quantity and the lowest priority as target processes;
detecting whether a target process which is carrying out data transceiving operation exists or not;
if so, increasing the priority of the target process which is performing data transceiving operation, and returning to the step of acquiring the current background process with the adjusted closing number with the lowest priority;
if not, closing the target process.
In this embodiment, for the current background process that is performing data interaction, it is described that the user is using the process at this time, for example, the process is used for downloading, and in order to ensure that the data interaction can be performed completely, the priority may be increased to ensure that the process is not cleared away temporarily.
As can be seen from the above, the process control method provided in this embodiment is applied to an electronic device, and is implemented by obtaining a current foreground process, a current background process, and priorities of the current foreground process and the current background process, determining a closing number according to the number of the current foreground process, then obtaining an associated process set corresponding to the current foreground process, adjusting the priority of the current background process according to the associated process set, and then controlling the opening and closing of the current background process according to the adjusted priority and closing number, so that the background process can be flexibly controlled in combination with the foreground process, and the method is simple, and is beneficial to saving electric quantity of a terminal and improving operation efficiency of the terminal.
In this embodiment, the process control device will be specifically integrated in an electronic device as an example.
Referring to fig. 3, a process control method may specifically include the following steps:
s201, the electronic device obtains foreground processes running in the electronic device in a historical period, background processes corresponding to the foreground processes, the switching frequency of each background process and the interval duration between two continuous times of switching, wherein the switching frequency is the frequency of switching the background process to the foreground process.
For example, the historical period may be the past month, half a year, or the like, which is set manually. Normally, when each foreground process runs, there is usually at least one background process running simultaneously with it.
S202, the electronic equipment calculates the switching frequency of the corresponding background process according to the switching times and the interval duration.
For example, the electronic device may add all the interval durations to calculate a total duration, and then determine the switching frequency according to a quotient between the total duration and the number of switching times.
S203, the electronic device acquires the background process with the switching frequency higher than the preset frequency, or acquires the background process with the preset bit with the highest switching frequency as the associated process corresponding to the foreground process, and adds the associated process into the associated process set.
For example, the preset bit may be set manually, for example, 5 or 6, since the background process with the higher switching frequency is more likely to switch from the background to the foreground as soon as possible, so that the background process which is most likely to perform the switching operation with the foreground process can be determined as the associated process according to the switching frequency.
S204, the electronic equipment acquires the current foreground process, the current background process and the priority of the current foreground process and the current background process.
For example, the electronic device may perform the operation of acquiring the current foreground process and the current background process when the power or the operating speed is lower than a certain value, or the CPU occupancy is higher than a certain value, or the number of processes exceeds a certain value, as shown in fig. 4, the current foreground process and the current background process may include { H1, H2 … H10 }.
S205, the electronic equipment determines the closing number according to the number of the current foreground and background processes, and obtains the associated process set corresponding to the current foreground process.
For example, the number of closures may be determined according to a specified closure ratio, for example, if the closure ratio is 40%, the calculated number of closures is 4, and of course, there may be a case where the number of closures is a non-integer number, for example, 3.2, and in this case, it may be determined as 3 by rounding.
S206, the electronic equipment acquires the current background process which is the same as the association process in the association process set as a first process, and acquires the running time of the first process in the background.
In this embodiment, the first process may include H1, H3, H4, and H8.
And S207, the electronic equipment improves the priority of the first process according to the running time.
For example, the increasing degree of the process with longer running time in the background may be set to be smaller, and the increasing degree of the process with shorter running time may be set to be larger, and at this time, the first process may be { H1, H8, H3, H4} in the order from high to low after adjustment.
S208, the electronic equipment acquires the current background process which is different from the association process in the association process set as a second process, and acquires the resource occupancy rate of the second process.
For example, the second process may include H2, H5, H6, H7, H9, and H10.
And S209, the electronic equipment reduces the priority of the second process according to the resource occupancy rate.
For example, the reduction degree of the process with high resource occupancy may be set to be larger, and the reduction degree of the process with low resource occupancy may be set to be smaller, and in this case, the second process may be set to { H2, H9, H6, H7, H5, H10} in the order from higher to lower after adjustment.
It should be noted that there is no obvious sequential execution order between the above steps S206-S207 and S208-S209, and they may be performed simultaneously or sequentially.
S210, the electronic device obtains the current background processes with the lowest priority and the closing number after adjustment as target processes, detects whether the target processes which are performing data transceiving operation exist, if so, executes the following step S211, and if not, can close the target processes.
For example, for all current background processes, the priorities may be set as { H1, H8, H2, H9, H3, H4, H6, H7, H5, H10} in order from high to low after adjustment, and at this time, the target process may be H6, H7, H5, and H10, and data transceiving conditions thereof need to be further detected.
S211, the electronic equipment raises the priority of the target process which is carrying out data transceiving operation.
For example, if the target process in the data transceiving operation is H6, the priority of H6 may be processed with a certain lifting width, which may be set manually, for example, 2 levels or 3 levels, at this time, for all the current background processes after processing, the priorities may be { H1, H8, H2, H9, H6, H3, H4, H7, H5, and H10} in order from high to low after adjustment, and the processes that need to be closed are updated to H4, H7, H5, and H10.
As can be seen from the above, the process control method provided in this embodiment, wherein the electronic device can obtain the foreground process running in the electronic device in the historical period, the background process corresponding to each foreground process, and the switching frequency of each background process and the interval duration between two consecutive switching, where the switching frequency is the number of times that the background process is switched to the foreground process, then calculate the switching frequency of the corresponding background process according to the switching frequency and the interval duration, then obtain the background process with the switching frequency higher than the preset frequency, or obtain the preset bit background process with the highest switching frequency as the associated process of the corresponding foreground process and add the associated process into the associated process set, and then, when process cleaning is required, the electronic device obtains the priorities of the current foreground process, the current background process, and the foreground and background processes, then, determining a closing quantity according to the quantity of the foreground and background processes, acquiring the association process set corresponding to the current foreground process, then acquiring a current background process which is the same as the association process in the association process set as a first process, acquiring the running time of the first process in the background, then increasing the priority of the first process according to the running time, meanwhile, acquiring a current background process which is different from the association process in the association process set as a second process, acquiring the resource occupancy rate of the second process, reducing the priority of the second process according to the resource occupancy rate, then acquiring the current background process with the closing quantity with the lowest priority after adjustment as a target process, detecting whether a target process which is performing data transceiving operation exists, if so, increasing the priority of the target process which is performing data transceiving operation, if not, the target process can be closed, so that the background process can be flexibly controlled by combining the foreground process, the method is simple, the electric quantity of the terminal is saved, and the operation efficiency of the terminal is improved.
The present embodiment will be further described from the perspective of a process control device that may be integrated in an electronic device, according to the methods described in the above embodiments.
Referring to fig. 5, fig. 5 specifically illustrates a process control apparatus provided in an embodiment of the present invention, which is applied to an electronic device, and includes: a first obtaining module 10, a determining module 20, a second obtaining module 30, an adjusting module 40 and a control module 50, wherein:
(1) first acquisition module 10
The first obtaining module 10 is configured to obtain a current foreground process, a current background process, and a priority of the current foreground process and the current background process in the electronic device.
In this embodiment, the priority may be set in advance according to the attribute information of each process, for example, the priority of the system process may be higher than the priority of the non-system process, the priority of the instant messaging process may be higher than the priority of the shopping process, and the like.
Since the operation of the process may affect the electric quantity, the CPU occupancy rate, the operation speed, and the like of the electronic device, the triggering condition of the process control instruction may be determined according to the electric quantity, the CPU occupancy rate, and the operation speed, for example, when the electric quantity or the operation speed is lower than a certain value, or the CPU occupancy rate is higher than a certain value, the electronic device may perform a background process cleaning operation, that is, may trigger the first obtaining module 10 to perform the obtaining operation.
(2) Determination module 20
A determining module 20, configured to determine a closing number according to the number of the current foreground and background processes.
In this embodiment, the closing number may be set in advance, and may be determined directly according to the number of foreground and background processes, for example, different closing numbers are set in advance for different background processes, or may be determined indirectly, for example, a closing ratio may be set manually, and then the closing number is calculated according to the closing ratio and the number of foreground and background processes.
(3) Second acquisition module 30
A second obtaining module 30, configured to obtain an associated process set corresponding to the current foreground process.
In this embodiment, the associated process set includes at least one associated process, where the associated process refers to a process related to a current foreground process, and generally, different foreground processes correspond to different associated process sets. It should be noted that the associated process set should be set in advance, that is, please refer to fig. 6, the process control apparatus may further include a third obtaining module 60, and the third obtaining module 60 may specifically include:
a fourth obtaining unit 61, configured to obtain a foreground process running in the electronic device in a historical period; acquiring a background process corresponding to each foreground process, and the switching frequency of each background process and the interval duration between two continuous switching, wherein the switching frequency is the frequency of switching the background process to the foreground process;
a determining unit 62, configured to determine, according to the switching times and the interval duration, an associated process set corresponding to the foreground process from the background process.
For example, the determining unit 62 may be specifically configured to:
calculating the switching frequency of the corresponding background process according to the switching times and the interval duration;
and acquiring the background process with the switching frequency higher than the preset frequency, or acquiring the background process with the highest switching frequency as the associated process corresponding to the foreground process, and adding the associated process into the associated process set.
In this embodiment, the history time period, the preset frequency and the preset bit may be set in advance manually. Specifically, the determining unit 62 may calculate the switching frequency according to the switching frequency and the interval duration, for example, may add all the interval durations to calculate the total duration, and determine the switching frequency according to a quotient between the total duration and the switching frequency, generally, a background process with a higher switching frequency is more likely to be switched from the background to the foreground as soon as possible, so that a background process which is most likely to be switched with the foreground process is determined as the associated process according to the switching frequency.
(4) Adjusting module 40
And an adjusting module 40, configured to adjust the priority of the current background process according to the associated process set.
In this embodiment, the adjustment operation may include increasing and decreasing, and different objects may adopt different adjustment operations.
For example, referring to fig. 7, the adjusting module 40 may specifically include:
a first obtaining unit 41, configured to obtain a current background process that is the same as the associated process in the associated process set as a first process; the method comprises the steps of acquiring the running time of the first process in the background;
an increasing unit 42, configured to increase the priority of the first process according to the running time.
In this embodiment, each associated process is a process that is most likely to be switched with the current foreground process, that is, a process that is most likely to be used by the user in the subsequent use process, so that the importance of the processes to the user is obviously higher than that of other processes, and in order to avoid the processes from being cleaned up, the priorities of the processes can be improved, specifically, the adjusting module 40 can determine the improvement range of each process according to the running time of the processes on the background.
For example, the adjusting module 40 may further include:
a second acquiring unit 43, configured to acquire a current background process other than the first process as a second process; acquiring the resource occupancy rate of the second process;
a reducing unit 44, configured to reduce the priority of the second process according to the resource occupancy.
In this embodiment, the resource occupancy may include cache occupancy, CPU occupancy, and the like. According to the historical use habit of the user, the probability that the current background processes which do not belong to the associated process set are switched to the foreground for use in a short time is extremely low, which shows that the importance of the processes to the user is obviously low at this time, so that the priorities of the processes can be reduced, the processes with more occupied resources can be preferentially cleared, and in the process of reducing the priorities, the processes with more occupied resources can be preferentially cleared by considering that the resource occupation conditions of different processes to the electronic equipment are different, namely, the reduction range of the process with high resource occupancy rate can be set to be larger, and the reduction range of the process with low resource occupancy rate can be set to be smaller.
(5) Control module 50
And a control module 50, configured to control the opening and closing of the foreground and background processes according to the adjusted priority and the closing number.
For example, referring to fig. 8, the control module 50 may specifically include:
a third obtaining unit 51, configured to obtain, as a target process, the current background process with the adjusted lowest priority and the closing number;
a detecting unit 52, configured to detect whether there is a target process performing data transceiving operation;
a closing unit 53, configured to, if yes, increase the priority of the target process that is performing the data transceiving operation, and return to the step of triggering the third obtaining unit to perform the step of obtaining the current background process with the adjusted closed number having the lowest priority; if not, closing the target process.
In this embodiment, for the current background process that is performing data interaction, it is described that the user is using the process at this time, for example, the process is used for downloading, and in order to ensure that the data interaction can be performed completely, the priority may be increased to ensure that the process is not cleared away temporarily.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
As can be seen from the above, the process control apparatus provided in this embodiment is applied to an electronic device, a current foreground process, a current background process, and a priority of the current foreground process and the current background process are obtained by the first obtaining module 10, the determining module 20 determines a closing number according to the number of the current background process, then, the second obtaining module 30 obtains an associated process set corresponding to the current foreground process, the adjusting module 40 adjusts the priority of the current background process according to the associated process set, and then, the control module 50 controls the opening and closing of the current foreground process and the current background process according to the adjusted priority and the closing number, so that the background process can be flexibly controlled in combination with the foreground process.
In addition, an embodiment of the present invention further provides a storage medium, where the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the process control method described in any one of the above embodiments.
In addition, the embodiment of the invention also provides electronic equipment which can be equipment such as a smart phone and a tablet personal computer. As shown in fig. 9, the electronic device 700 includes a processor 701, a memory 702, a display screen 703, and a control circuit 704. The processor 701 is electrically connected to the memory 702, the display screen 703 and the control circuit 704.
The processor 701 is a control center of the electronic device 700, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or loading an application program stored in the memory 702 and calling data stored in the memory 702, thereby integrally monitoring the electronic device.
In this embodiment, the processor 701 in the electronic device 700 loads instructions corresponding to processes of one or more application programs into the memory 702 according to the following steps, and the processor 701 runs the application programs stored in the memory 702, thereby implementing various functions:
acquiring a current foreground process, a current background process and the priority of the foreground process and the background process in the electronic equipment;
determining the closing quantity according to the quantity of the current foreground and background processes;
acquiring an associated process set corresponding to the current foreground process;
adjusting the priority of the current background process according to the association process set;
and controlling the opening and closing of the current and next processes according to the adjusted priority and the closing quantity.
In some embodiments, when the priority of the current background process is adjusted according to the set of associated processes, the processor is configured to perform the following steps:
acquiring a current background process which is the same as the association process in the association process set as a first process;
acquiring the running time of the first process in the background;
and the priority of the first process is increased according to the running time.
In some embodiments, when the priority of the current background process is adjusted according to the set of associated processes, the processor is further configured to perform the following steps:
acquiring a current background process except the first process as a second process;
acquiring the resource occupancy rate of the second process;
and reducing the priority of the second process according to the resource occupancy rate.
In some embodiments, when controlling the starting and closing of the foreground and background processes according to the adjusted priority and the closing number, the processor is configured to perform the following steps:
acquiring the current background processes with the adjusted closing quantity and the lowest priority as target processes;
detecting whether a target process which is carrying out data transceiving operation exists or not;
if so, increasing the priority of the target process which is performing data transceiving operation, and returning to the step of acquiring the current background process with the adjusted closing number with the lowest priority;
if not, closing the target process.
In some embodiments, prior to obtaining the set of associated processes corresponding to the current foreground process, the processor is further configured to:
acquiring a foreground process running in the electronic equipment in a historical period;
acquiring a background process corresponding to each foreground process, and the switching frequency of each background process and the interval duration between two continuous switching, wherein the switching frequency is the frequency of switching the background process to the foreground process;
and determining an associated process set corresponding to the foreground process from the background process according to the switching times and the interval duration.
In some embodiments, when determining the associated process set corresponding to the foreground process from the background process according to the switching times and the interval duration, the processor is configured to perform the following steps:
calculating the switching frequency of the corresponding background process according to the switching times and the interval duration;
and acquiring the background process with the switching frequency higher than the preset frequency, or acquiring the background process with the highest switching frequency as the associated process corresponding to the foreground process, and adding the associated process into the associated process set.
The memory 702 may be used to store applications and data. The memory 702 stores applications containing instructions executable in the processor. The application programs may constitute various functional modules. The processor 701 executes various functional applications and data processing by running an application program stored in the memory 702.
The display screen 703 may be used to display information input 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 704 is electrically connected to the display screen 703 and is configured to control the display screen 703 to display information.
In some embodiments, as shown in fig. 9, the electronic device 700 further comprises: radio frequency circuit 705, input unit 706, audio circuit 707, sensor 708, and power supply 709. The processor 701 is electrically connected to the rf circuit 705, the input unit 706, the audio circuit 707, the sensor 708, and the power source 709, respectively.
The rf circuit 705 is used for transceiving rf signals to establish wireless communication with a network device or other electronic devices through wireless communication, and to transmit and receive signals to and from the network device or other electronic devices.
The input unit 706 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint), and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. The input unit 706 may include a fingerprint recognition module.
The audio circuitry 707 may provide an audio interface between the user and the terminal through a speaker, microphone.
The electronic device 700 may also include at least one sensor 708, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the terminal is moved to the ear. 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 in the terminal, detailed description is omitted here.
The power supply 709 is used to supply power to various components of the electronic device 700. In some embodiments, the power supply 709 may be logically connected to the processor 701 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system.
Although not shown in fig. 9, the electronic device 700 may further include a camera, a bluetooth module, and the like, which are not described in detail herein.
According to the electronic device and the storage medium provided by the embodiment of the invention, the current foreground process, the current background process and the priority of the current foreground process and the current background process are obtained, the closing number is determined according to the number of the current foreground process and the current background process, then, the associated process set corresponding to the current foreground process is obtained, the priority of the current background process is adjusted according to the associated process set, and then, the opening and closing of the current background process are controlled according to the adjusted priority and the closing number, so that the foreground process can be combined to flexibly control the background process, the method is simple, the electric quantity of a terminal can be saved, and the operation efficiency of the terminal can be improved.
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, where the program may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
In summary, although the present invention has been described with reference to the preferred embodiments, the above-described preferred embodiments are not intended to limit the present invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, therefore, the scope of the present invention shall be determined by the appended claims.

Claims (8)

1. A process control method is applied to electronic equipment and is characterized by comprising the following steps:
acquiring a current foreground process, a current background process and the priority of the current background process in the electronic equipment, wherein the priority of each current background process is set in advance according to attribute information;
determining the closing quantity according to the quantity of the current background processes;
acquiring an associated process set corresponding to the current foreground process, wherein the associated process set comprises at least one associated process related to the current foreground process;
acquiring a current background process which is the same as the association process in the association process set as a first process;
acquiring the running time of the first process in the background;
the priority of the first process is improved according to the running time length, wherein the improvement range of the process with longer running time length is smaller;
acquiring a current background process except the first process as a second process;
acquiring the resource occupancy rate of the second process;
reducing the priority of the second process according to the resource occupancy rate, wherein the higher the resource occupancy rate is, the larger the reduction amplitude of the process is;
acquiring the current background processes with the lowest priority and the closing quantity after adjustment as target processes;
detecting whether a target process which is carrying out data transceiving operation exists or not;
if so, increasing the priority of the target process which is performing data transceiving operation, and returning to the step of acquiring the current background process with the adjusted closing number with the lowest priority;
if not, closing the target process.
2. The process control method according to claim 1, further comprising, before obtaining the associated process set corresponding to the current foreground process:
acquiring a foreground process running in the electronic equipment in a historical period;
acquiring a background process corresponding to each foreground process, and the switching frequency of each background process and the interval duration between two continuous switching, wherein the switching frequency is the frequency of switching the background process to the foreground process;
and determining an associated process set corresponding to the foreground process from the background process according to the switching times and the interval duration.
3. The process control method according to claim 2, wherein the determining the associated process set corresponding to the foreground process from the background process according to the switching times and the interval duration comprises:
calculating the switching frequency of the corresponding background process according to the switching times and the interval duration;
and acquiring the background process with the switching frequency higher than the preset frequency, or acquiring the background process with the highest switching frequency as the associated process corresponding to the foreground process, and adding the associated process into the associated process set.
4. A process control device applied to electronic equipment is characterized by comprising:
the first acquisition module is used for acquiring a current foreground process, a current background process and the priority of the current background process in the electronic equipment;
the determining module is used for determining the closing quantity according to the quantity of the current background processes;
a second obtaining module, configured to obtain an associated process set corresponding to the current foreground process, where the associated process set includes at least one associated process related to the current foreground process;
the adjusting module is used for acquiring the current background process which is the same as the associated process in the associated process set and taking the current background process as a first process; acquiring the running time of the first process in the background; the priority of the first process is improved according to the running time length, wherein the improvement range of the process with longer running time length is smaller; acquiring a current background process except the first process as a second process; acquiring the resource occupancy rate of the second process; reducing the priority of the second process according to the resource occupancy rate, wherein the higher the resource occupancy rate is, the larger the reduction amplitude of the process is;
the control module is used for acquiring the current background processes with the lowest priority and the closing number after adjustment as target processes; detecting whether a target process which is carrying out data transceiving operation exists or not; if so, increasing the priority of the target process which is performing data transceiving operation, and returning to the step of acquiring the current background process with the adjusted closing number with the lowest priority; if not, closing the target process.
5. The process control device according to claim 4, further comprising a third obtaining module, wherein the third obtaining module specifically includes:
the fourth acquisition unit is used for acquiring foreground processes running in the electronic equipment in historical time periods; acquiring a background process corresponding to each foreground process, and the switching frequency of each background process and the interval duration between two continuous switching, wherein the switching frequency is the frequency of switching the background process to the foreground process;
and the determining unit is used for determining the associated process set corresponding to the foreground process from the background process according to the switching times and the interval duration.
6. The process control device according to claim 5, wherein the determining unit is specifically configured to:
calculating the switching frequency of the corresponding background process according to the switching times and the interval duration;
and acquiring the background process with the switching frequency higher than the preset frequency, or acquiring the background process with the highest switching frequency as the associated process corresponding to the foreground process, and adding the associated process into the associated process set.
7. A storage medium having stored therein a plurality of instructions adapted to be loaded by a processor to perform the process control method of any of claims 1 to 3.
8. An electronic device comprising a processor and a memory, the processor being electrically connected to the memory, the memory being configured to store instructions and data, the processor being configured to invoke the stored instructions to perform the process control method of any of claims 1 to 3.
CN201710643030.8A 2017-07-31 2017-07-31 Process control method, device, storage medium and electronic equipment Active CN107463403B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202010167023.7A CN111309400A (en) 2017-07-31 2017-07-31 Process control method, device, storage medium and electronic equipment
CN201710643030.8A CN107463403B (en) 2017-07-31 2017-07-31 Process control method, device, storage medium and electronic equipment
PCT/CN2018/094251 WO2019024642A1 (en) 2017-07-31 2018-07-03 Process control method and apparatus, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710643030.8A CN107463403B (en) 2017-07-31 2017-07-31 Process control method, device, storage medium and electronic equipment

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202010167023.7A Division CN111309400A (en) 2017-07-31 2017-07-31 Process control method, device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN107463403A CN107463403A (en) 2017-12-12
CN107463403B true CN107463403B (en) 2020-04-21

Family

ID=60548126

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201710643030.8A Active CN107463403B (en) 2017-07-31 2017-07-31 Process control method, device, storage medium and electronic equipment
CN202010167023.7A Pending CN111309400A (en) 2017-07-31 2017-07-31 Process control method, device, storage medium and electronic equipment

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202010167023.7A Pending CN111309400A (en) 2017-07-31 2017-07-31 Process control method, device, storage medium and electronic equipment

Country Status (2)

Country Link
CN (2) CN107463403B (en)
WO (1) WO2019024642A1 (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463403B (en) * 2017-07-31 2020-04-21 Oppo广东移动通信有限公司 Process control method, device, storage medium and electronic equipment
CN109992400A (en) * 2017-12-29 2019-07-09 广东欧珀移动通信有限公司 Resource allocation methods, device, mobile terminal and computer readable storage medium
CN109992397A (en) * 2017-12-29 2019-07-09 广东欧珀移动通信有限公司 Process handling method and device, electronic equipment, computer readable storage medium
CN109992393A (en) * 2017-12-29 2019-07-09 广东欧珀移动通信有限公司 Application processing method and device, electronic equipment, computer readable storage medium
CN110032429B (en) * 2018-01-10 2022-03-18 Oppo广东移动通信有限公司 Information processing method and device, mobile terminal and computer readable storage medium
CN110046031B (en) * 2018-01-12 2021-11-09 Oppo广东移动通信有限公司 Application processing method and device, electronic equipment and computer readable storage medium
CN110633134A (en) * 2018-06-22 2019-12-31 中兴通讯股份有限公司 Application program management method and device, mobile terminal and storage medium
CN109388491A (en) * 2018-08-23 2019-02-26 深圳点猫科技有限公司 A kind of method and system for the picture fluency improving education operating system
CN109324883A (en) * 2018-08-29 2019-02-12 烽火通信科技股份有限公司 The EMS memory management process and system of intelligent terminal
CN112835689A (en) * 2019-11-25 2021-05-25 航天信息股份有限公司 Method and device for controlling application process
CN111008079B (en) * 2019-12-10 2022-10-21 Oppo(重庆)智能科技有限公司 Process management method, device, storage medium and electronic equipment
CN111221650A (en) * 2019-12-31 2020-06-02 青岛海尔科技有限公司 System resource recovery method and device based on process type association
CN113535250A (en) * 2020-04-13 2021-10-22 华为技术有限公司 Application keep-alive method and device and electronic equipment
CN111611020A (en) * 2020-04-14 2020-09-01 上海卓易科技股份有限公司 Application process searching and killing method and device for application program
CN111651261B (en) * 2020-07-07 2023-04-07 Oppo(重庆)智能科技有限公司 Process management method and device, terminal equipment and computer readable storage medium
CN111857513B (en) * 2020-07-17 2022-04-29 维沃移动通信有限公司 Background program control method and device and electronic equipment
CN112231090A (en) * 2020-11-04 2021-01-15 Oppo广东移动通信有限公司 Application process management method and device and terminal equipment
CN115016631B (en) * 2021-11-22 2023-07-18 荣耀终端有限公司 Process scheduling method and terminal equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103500121A (en) * 2013-09-29 2014-01-08 深圳Tcl新技术有限公司 Process managing method and device
CN105843650A (en) * 2016-03-31 2016-08-10 青岛海信移动通信技术股份有限公司 Application program management method and device in intelligent terminal
CN106325990A (en) * 2016-08-19 2017-01-11 宇龙计算机通信科技(深圳)有限公司 Control method of application program, control device and terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7987160B2 (en) * 2006-01-30 2011-07-26 Microsoft Corporation Status tool to expose metadata read and write queues
JP5783246B2 (en) * 2011-03-19 2015-09-24 富士通株式会社 Terminal device, process management method, and process management program
CN105279098B (en) * 2014-07-22 2019-02-12 中兴通讯股份有限公司 The method for cleaning and device of memory
CN106201821A (en) * 2016-06-29 2016-12-07 宇龙计算机通信科技(深圳)有限公司 Terminal control method, terminal control mechanism and terminal
CN107463403B (en) * 2017-07-31 2020-04-21 Oppo广东移动通信有限公司 Process control method, device, storage medium and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103500121A (en) * 2013-09-29 2014-01-08 深圳Tcl新技术有限公司 Process managing method and device
CN105843650A (en) * 2016-03-31 2016-08-10 青岛海信移动通信技术股份有限公司 Application program management method and device in intelligent terminal
CN106325990A (en) * 2016-08-19 2017-01-11 宇龙计算机通信科技(深圳)有限公司 Control method of application program, control device and terminal

Also Published As

Publication number Publication date
WO2019024642A1 (en) 2019-02-07
CN111309400A (en) 2020-06-19
CN107463403A (en) 2017-12-12

Similar Documents

Publication Publication Date Title
CN107463403B (en) Process control method, device, storage medium and electronic equipment
CN107734616B (en) Application program closing method and device, storage medium and electronic equipment
CN107463436B (en) process control method, device, storage medium and electronic equipment
CN110392298B (en) Volume adjusting method, device, equipment and medium
CN107402808B (en) Process management method, device, storage medium and electronic equipment
CN106200970B (en) The method and terminal of a kind of split screen display available
CN107302633B (en) Application control method, device, storage medium and electronic equipment
CN108196482B (en) Power consumption control method and device, storage medium and electronic equipment
WO2014180138A1 (en) Method and device for video processing
WO2019024641A1 (en) Data synchronization method and apparatus, storage medium and electronic device
CN107332997B (en) Method and device for reducing terminal heating, mobile terminal and storage medium
CN106897134B (en) Positioning function management method and device
CN109714476B (en) Data processing method and device, mobile terminal and storage medium
CN110362185B (en) Control method for screen brightness adjustment, terminal and computer readable storage medium
CN107800869B (en) Split screen display method, mobile terminal and storage medium
CN108564539B (en) Method and device for displaying image
CN108038050B (en) Performance adjusting method and device, storage medium and electronic equipment
CN110489177B (en) Application control method and device, storage medium and terminal equipment
CN107343100B (en) Information prompting method and device, storage medium and electronic equipment
US11150913B2 (en) Method, device, and terminal for accelerating startup of application
CN106454953B (en) Flow control method, device and terminal
CN110830653B (en) Sensor control method, sensor control device, mobile terminal and storage medium
CN109327866B (en) Flow control method, flow control device, mobile terminal and storage medium
CN106776041B (en) Data processing method and device
CN109672242B (en) Terminal charging control method and device and storage medium

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: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant