WO2019024640A1 - 进程控制方法、装置、存储介质以及电子设备 - Google Patents

进程控制方法、装置、存储介质以及电子设备 Download PDF

Info

Publication number
WO2019024640A1
WO2019024640A1 PCT/CN2018/094219 CN2018094219W WO2019024640A1 WO 2019024640 A1 WO2019024640 A1 WO 2019024640A1 CN 2018094219 W CN2018094219 W CN 2018094219W WO 2019024640 A1 WO2019024640 A1 WO 2019024640A1
Authority
WO
WIPO (PCT)
Prior art keywords
running
priority
background
list
preset
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.)
Ceased
Application number
PCT/CN2018/094219
Other languages
English (en)
French (fr)
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
Publication of WO2019024640A1 publication Critical patent/WO2019024640A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/3287Power saving characterised by the action undertaken by switching off individual functional units in the computer system
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • 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

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a process control method, apparatus, storage medium, and electronic device.
  • the embodiment of the present invention provides a process control method, device, storage medium, and electronic device, which can effectively control background processes and reduce waste of terminal power.
  • the embodiment of the present application provides a process control method, which is applied to an electronic device, and includes:
  • the background process is controlled to be turned on and off according to the adjusted priority.
  • the embodiment of the present application further provides a process control apparatus, which is applied to an electronic device, and includes:
  • a first obtaining module configured to acquire a process control instruction
  • a second acquiring module configured to acquire, according to the process control instruction, a background process, a foreground process, a current location, and a priority of each background process of the electronic device;
  • a determining module configured to determine a target process list according to the current location
  • An adjustment module configured to adjust a priority of the background process according to the target process list and a foreground process
  • control module configured to control opening and closing of the background process according to the adjusted priority.
  • the embodiment of the present application further provides a storage medium, where the storage medium stores a plurality of instructions, and the instructions are adapted to be loaded by a processor to execute any one of the foregoing process control methods.
  • the embodiment of the present application further provides an electronic device, including a processor and a memory, the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is configured to execute any one of the foregoing Process control method.
  • FIG. 1 is a schematic diagram of an application scenario of a process control system according to an embodiment of the present disclosure.
  • FIG. 2 is a schematic flowchart diagram of a process control method according to an embodiment of the present application.
  • FIG. 3 is another schematic flowchart of a process control method according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of storage of a local database according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a process control apparatus according to an embodiment of the present application.
  • FIG. 6 is another schematic structural diagram of a process control apparatus according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a creation module according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an adjustment module according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • Embodiments of the present application provide a process control method, apparatus, storage medium, electronic device, and system.
  • FIG. 1 is an application scenario diagram of a process control system, which may include any of the electronic devices provided by the present application.
  • the electronic device may acquire a process control instruction, and obtain, according to the process control instruction, a background process, a foreground process, a current location, and a priority of each background process of the electronic device, and then determine a target process list according to the current location, and The priority of the background process is adjusted according to the target process list and the foreground process, and then the background process is controlled to be turned on and off according to the adjusted priority.
  • a process control command may be generated.
  • the electronic device acquires the foreground process Q, the background process ⁇ H1, H2...Hn ⁇ , and the current location according to the process control instruction.
  • P1 and the priority of each background process the priority may be set by the manufacturer when the electronic device is shipped from the factory.
  • the electronic device may determine the target process list M1 from the local database according to the current location P1, and the local database may store more Process list ⁇ M1, M2...Mn ⁇ , such as location P1 correspondence table M1, location P2 corresponding to table M2, and so on, and according to the foreground process Q and the target process list M1, the priority of the background process can be adjusted, after that, according to The adjusted priority control ⁇ H1, H2...Hn ⁇ is turned on and off.
  • the terminal may include a mobile phone, a tablet computer, and a personal computer. Wait.
  • the embodiment of the present application provides a process control method, including the following steps:
  • the background process is controlled to be turned on and off according to the adjusted priority.
  • the priority of the background process is adjusted according to the target process list and the foreground process, including:
  • the priority of the background process is adjusted according to the first process and the second process.
  • the priority of the background process is adjusted according to the first process and the second process, including:
  • the priority of the first process is increased by a second preset amplitude
  • the priority of the second process is increased by a third preset amplitude, where the first preset amplitude is greater than the second preset amplitude, The second preset amplitude is greater than the third preset amplitude.
  • the adjusting the priority of the background process according to the first process and the second process further includes:
  • the priority of the third process is lowered by a fourth preset amplitude.
  • the determining the target process list based on the current location comprises:
  • controlling the opening and closing of the background process according to the adjusted priority comprises:
  • the method before determining the target process list according to the current location, the method further includes:
  • the corresponding process list is created according to the running times and running time of the running process in the running process group, including:
  • the dividing the running process according to the operating location comprises:
  • the determining the target process list according to the current location includes: determining a preset location area to which the current location belongs; and obtaining the determined process list corresponding to the preset location area as the target process list.
  • the process control method can be applied to an electronic device, and the specific process can be as follows:
  • the trigger condition of the process control command may be determined according to the power, the CPU usage, and the running speed, for example, when the power or When the running speed is lower than a certain value, or the CPU usage is higher than a certain value, the electronic device may trigger the generation of the process control instruction.
  • the process control command may be triggered when the number of processes running in the electronic device exceeds a certain value.
  • the priority may be set in advance according to the attribute information of each process.
  • the priority of the system process may be higher than the priority of the non-system process, and the priority of the instant messaging process may be higher than the shopping process.
  • Priority and so on.
  • the current location can be obtained by means of GPS (Global Positioning System) positioning, cellular data network positioning, or WiFi positioning.
  • GPS Global Positioning System
  • cellular data network positioning is mainly implemented based on the location of the base station in the vicinity of the electronic device, and the WiFi network is mainly located. It is implemented based on the name of the local area network to which the electronic device is connected, that is, the SSID (Service Set Identifier).
  • SSID Service Set Identifier
  • the target process list may store some processes associated with the location, and the processes may be obtained by statistical analysis of the historical running status and running location of the processes in the electronic device, for example, it may be determined that several users frequently go.
  • the location and then count the historical operation of the process in each frequent place, and establish a list of processes corresponding to the frequent location according to the historical operation situation, wherein each frequent place can be set by the user according to his own situation.
  • the electronic device can be summarized and summarized according to the operation place. After that, the established process list and the frequent place are stored in association, and then the corresponding process list can be obtained as the target process list according to the current location.
  • the target process list may specifically include:
  • the preset location area may be set by the user, or may be summarized by the electronic device according to the historical operation location, and may include a home, an office, or a subway. It is easy to understand that the process list should be set in advance, that is, before the step S103, the process control method may further include:
  • the historical period can be artificially set, such as the past month or half year.
  • the running location mainly refers to the location where the electronic device is located when the running process is running.
  • the running process group includes at least one running process, which may be all the running processes that the user has used in the same preset location area.
  • the foregoing step 1-2 may specifically include: running the locations in the same preset location area.
  • the corresponding running processes are grouped together.
  • the running process group can also be all running processes that the user has used at the same running place.
  • steps 1-3 may specifically include:
  • the running processes in the running process group may be sorted according to the running frequency from high to low or low to high, and then the sorted running process group may be directly used as the process list.
  • the process list is mainly used to filter the background process, if the number of processes in the process list is too large, the screening purpose may not be achieved, so a certain number of running processes with a higher running frequency may be selected, or selected.
  • step S104 may specifically include:
  • the association process refers to a process associated with the foreground process, which may be set in advance, for example, processes belonging to the same application may be defined as associated processes associated with each other.
  • the background process that is the same as the associated process is obtained as the first process; and the background process included in the target process list is obtained as the second process.
  • the foreground process is the process that the user is using
  • the importance is usually higher than other background processes
  • the first process is a background process related to the foreground process, so the importance of the first process is different from other
  • the background process at the same time, because the second process is a background process on the target process list, and the target process list is related to the current location, the importance of the second process is also different from other background processes.
  • steps 2-3 may specifically include:
  • the priority of the first process is increased by a second preset amplitude
  • the priority of the second process is increased by a third preset amplitude, where the first preset amplitude is greater than the second preset amplitude, The second preset amplitude is greater than the third preset amplitude.
  • the first preset amplitude, the second preset amplitude, and the third preset amplitude need to be set by the user in advance, for example, the order may be 4 levels, 3 levels, and 2 levels.
  • the first process or the second process is significantly more important to the user than other background processes, when there is a coincident first process (or second process), it may be based on the existing priority
  • the priority of the first process (or the second process) of the coincidence is greatly increased, and for the first process and the second process that do not coincide, the improvement may be relatively low, of course, the improvement of the first process and
  • the increase in the second process has no obvious high and low requirements, which can be determined according to actual needs.
  • steps 2-3 may further include:
  • the priority of the third process is lowered by a fourth preset amplitude.
  • the background process that is neither the first process nor the second process should have the lowest importance.
  • the existing priority may not be adjusted, or the fourth preset amplitude may be used.
  • the existing priority is lowered, and the size of the fourth preset amplitude is not necessarily related to the first preset amplitude, the second preset amplitude, and the third preset amplitude, and may be set in advance.
  • step S105 may specifically include:
  • the preset bit may be determined according to actual needs, for example, may be 3 or 4.
  • the preset level may be determined according to a total priority level of the electronic device, for example, when a total of ten priority levels are divided.
  • the preset level may be the third level. Specifically, the higher the priority, the more important the process is to the user. Therefore, when the background process needs to be cleaned up, the lower priority process may be prioritized. These processes may be processes with a lower priority than a certain degree. Can be a relatively low number of processes. Of course, for the background process that does not perform the shutdown operation, the higher priority part can be maintained in an active state, the other part is frozen, or all remain active, which can be determined according to actual needs.
  • the process control method provided in this embodiment is applied to an electronic device, and obtains a process control instruction, and acquires a background process, a foreground process, a current location, and a priority of each background process of the electronic device according to the process control instruction. Level, and then determining a target process list according to the current location, and adjusting the priority of the background process according to the target process list and the foreground process, and then controlling the background process to be turned on and off according to the adjusted priority, thereby
  • the effective control of the background process in combination with the current location high flexibility, simple method, is conducive to reducing terminal power consumption.
  • the process control device is specifically integrated into the electronic device as an example for detailed description.
  • the electronic device acquires a running process in the electronic device during a historical period, and a running time, a running time, and a running location of the running process.
  • the historical period can be an artificially set month or two.
  • the operating location can be obtained by means of GPS positioning, cellular data network positioning, or WiFi positioning.
  • the electronic device records operational information for each process within it, including the number of runs, run time, and run location.
  • the electronic device groups the running processes corresponding to the running locations in the same preset location area into one group, and obtains at least one running process group.
  • the preset location area may be that the electronic device is summarized according to the operation location. For example, the operation location with more statistics and longer stay duration may be determined as a common location, and then the common location is taken as the center and the specified value is the radius. A circular area is determined, and the circular area is used as a preset position area.
  • the preset position area may include a home, an office, and some frequent leisure places.
  • the electronic device calculates an operating frequency of the corresponding running process in the historical time period according to the running times and the running time length, and sorts the running processes in the running process group according to the running frequency.
  • the running frequency actually reflects the user's preference.
  • the applications used by users in different places may be different, so the running process is different.
  • the long-term use may be palm reading, WeChat reading, etc.
  • Application process users in the home network environment, long-term use can be WeChat, Weibo and other application processes; users in the office, the longer use can be nailed, Email and other office software application process, etc. Wait.
  • the electronic device creates a corresponding process list according to the sorted running process group.
  • a certain number of running processes with a higher running frequency may be selected, or a running process with a running frequency greater than a certain frequency may be selected to create a process list, and then an association relationship between the process list and the preset location area is established, and the relationship is stored.
  • a certain number of running processes with a higher running frequency may be selected, or a running process with a running frequency greater than a certain frequency may be selected to create a process list, and then an association relationship between the process list and the preset location area is established, and the relationship is stored.
  • a certain number of running processes with a higher running frequency may be selected, or a running process with a running frequency greater than a certain frequency may be selected to create a process list, and then an association relationship between the process list and the preset location area is established, and the relationship is stored.
  • the local database In the local database.
  • the electronic device acquires a process control instruction.
  • the electronic device may trigger the generation of the process control instruction when the power or the running speed is lower than a certain value, or the CPU usage is higher than a certain value, or the number of processes exceeds a certain value.
  • the electronic device acquires, according to the process control instruction, a background process, a foreground process, a current location, and a priority of each background process of the electronic device.
  • the priority may be set in advance according to the attribute information of each process.
  • the priority of the system process may be higher than the priority of the non-system process, and the priority of the instant messaging process may be higher than the shopping process. Priority, and so on.
  • the electronic device determines a preset location area to which the current location belongs, and obtains the determined process list corresponding to the preset location area, as the target process list.
  • the process list ⁇ M1, M2...Mn ⁇ may be stored in the local database, and the preset location area stored therein may include ⁇ office, home, subway ⁇ , where M1 may include nails, emails, etc.
  • M2 can include application processes such as WeChat and Weibo.
  • M3 can include application processes such as palm reading and WeChat reading. If the current location belongs to the home, the list of target processes obtained is M2. If the current location belongs to the office, then The list of target processes obtained is M1.
  • the electronic device acquires the associated process corresponding to the foreground process, and obtains a background process that is the same as the associated process, and obtains a background process included in the target process list as the second process.
  • the electronic device determines whether the same background process exists in the first process and the second process. If yes, the priority of the same background process is increased by the first preset amplitude. If not, the following step S210 is performed. .
  • the first process or the second process when there is a coincident first process (or second process), it can be based on the existing priority.
  • the priority of the first process (or the second process) of the coincidence is increased by a maximum amount, that is, the first preset amplitude may be the maximum adjustment range, such as 4 levels.
  • the electronic device acquires a background process other than the first process and the second process, as a third process, and increases the priority of the first process by a second preset amplitude, and increases the value by using a third preset amplitude.
  • the priority of the second process lowers the priority of the third process by a fourth preset amplitude.
  • the second preset amplitude, the third preset amplitude, and the fourth preset amplitude may be sequentially decreased, for example, three levels, two levels, and one level.
  • the electronic device acquires a background process corresponding to the adjusted priority of the preset position, or obtains a background process corresponding to the adjusted priority lower than the preset level, as the target process, and closes the target process.
  • the preset bit can be 3 or 4.
  • the preset level may be the third level.
  • the total priority may be divided into ten levels, and the higher the level, the more important it is to the user.
  • These processes can be processes with a lower priority than a certain level, or a relatively low number of processes.
  • the process control method provided by the embodiment wherein the electronic device can acquire the running process in the electronic device during the historical time period, the running times, the running time and the running location of the running process, and belong to the same preset position.
  • the running processes corresponding to the running locations in the area are grouped into one group, and at least one running process group is obtained.
  • the running frequency of the corresponding running process in the historical time period is calculated, and according to the running frequency,
  • the running process in the running process group is sorted, and then the corresponding process list is created according to the sorted running process group, so that the association relationship between each preset location area and the process list can be stored in the local database, and the method is simple, and then
  • the electronic device obtains the process control instruction, the background process, the foreground process, the current location, and the priority of each background process of the electronic device may be acquired according to the process control instruction, and then the preset location to which the current location belongs is determined.
  • the corresponding process list is used as the target process list, and then the associated process corresponding to the foreground process is obtained, and the same background process as the associated process is obtained, and the background process included in the target process list is obtained as the first process.
  • the present embodiment will be further described from the perspective of a process control device which can be integrated in an electronic device.
  • An embodiment of the present application provides a process control apparatus, including:
  • a first obtaining module configured to acquire a process control instruction
  • a second acquiring module configured to acquire, according to the process control instruction, a background process, a foreground process, a current location, and a priority of each background process of the electronic device;
  • a determining module configured to determine a target process list according to the current location
  • An adjustment module configured to adjust a priority of the background process according to the target process list and the foreground process
  • the control module is configured to control the opening and closing of the background process according to the adjusted priority.
  • the adjusting module specifically includes:
  • a first obtaining submodule configured to acquire an associated process corresponding to the foreground process
  • a second obtaining sub-module configured to obtain a background process that is the same as the associated process, as a first process; and obtain a background process included in the target process list as a second process;
  • the adjustment submodule is configured to adjust the priority of the background process according to the first process and the second process.
  • the adjustment submodule is specifically configured to:
  • the priority of the first process is increased by a second preset amplitude
  • the priority of the second process is increased by a third preset amplitude, where the first preset amplitude is greater than the second preset amplitude, The second preset amplitude is greater than the third preset amplitude.
  • the adjustment sub-module is further configured to:
  • the priority of the third process is lowered by a fourth preset amplitude.
  • the determining module is specifically configured to:
  • control module is specifically configured to:
  • the method further includes: creating a module, where the creating module specifically includes:
  • a third obtaining submodule configured to acquire a running process in the electronic device, a running time, a running time, and a running location of the running process in the historical period before the determining module determines the target process list according to the current location;
  • the creation sub-module is specifically for:
  • the partitioning submodule is specifically configured to:
  • the determining module is specifically configured to: determine a preset location area to which the current location belongs; and obtain a determined process list corresponding to the preset location area, as a target process list.
  • FIG. 5 specifically describes a process control apparatus according to an embodiment of the present application, which is applied to an electronic device, and may include: a first acquiring module 10, a second acquiring module 20, a determining module 30, an adjusting module 40, and a control. Module 50, wherein:
  • the first obtaining module 10 is configured to acquire a process control instruction.
  • the trigger condition of the process control command may be determined according to the power, the CPU usage, and the running speed, for example, when the power or When the running speed is lower than a certain value, or the CPU usage is higher than a certain value, the electronic device may trigger the generation of the process control instruction.
  • the process control command may be triggered when the number of processes running in the electronic device exceeds a certain value.
  • the second obtaining module 20 is configured to acquire, according to the process control instruction, a background process, a foreground process, a current location, and a priority of each background process of the electronic device.
  • the priority may be set in advance according to the attribute information of each process.
  • the priority of the system process may be higher than the priority of the non-system process, and the priority of the instant messaging process may be higher than the shopping process.
  • Priority and so on.
  • the current location can be obtained by means of GPS (Global Positioning System) positioning, cellular data network positioning, or WiFi positioning.
  • GPS Global Positioning System
  • cellular data network positioning is mainly implemented based on the location of the base station in the vicinity of the electronic device, and the WiFi network is mainly located. It is implemented based on the name of the local area network to which the electronic device is connected, that is, the SSID (Service Set Identifier).
  • SSID Service Set Identifier
  • the determining module 30 is configured to determine a target process list according to the current location.
  • the target process list may store some processes associated with the location, and the processes may be obtained by statistical analysis of the historical running status and running location of the processes in the electronic device, for example, it may be determined that several users frequently go.
  • the location and then count the historical operation of the process in each frequent place, and establish a list of processes corresponding to the frequent location according to the historical operation situation, wherein each frequent place can be set by the user according to his own situation.
  • the electronic device can be summarized and summarized according to the operation place. After that, the established process list and the frequent place are stored in association, and then the corresponding process list can be obtained as the target process list according to the current location.
  • the determining module 30 may be specifically used.
  • the preset location area may be set by the user, or may be summarized by the electronic device according to the historical operation location, and may include a home, an office, or a subway. It is easy to understand that the process list should be set in advance, that is, referring to FIG. 6 and FIG. 7, the process control apparatus may further include a creation module 60, and the creation module 60 may specifically include a third acquisition submodule. 61. Divide sub-module 62 and create sub-module 63, wherein:
  • a third obtaining sub-module 61 configured to acquire, after the determining module 30 determines the target process list according to the current location, a running process in the electronic device during the historical time period, and a running time, a running time, and a running location of the running process;
  • a sub-module 62 configured to divide the running process according to the running location, to obtain at least one running process group
  • the historical period can be artificially set, such as the past month or half year.
  • the running location mainly refers to the location where the electronic device is located when the running process is running.
  • the running process group includes at least one running process, which may be all the running processes that the user has used in the same preset location area.
  • the dividing sub-module 62 may be specifically configured to: run in the same preset location area.
  • the running processes corresponding to the locations are grouped together.
  • the running process group can also be all running processes that the user has used at the same running place.
  • the sub-module 63 is configured to create a corresponding process list according to the running times and running time of the running process in the running process group.
  • the creation sub-module 63 can be specifically used to:
  • the creating sub-module 63 can sort the running processes in the running process group according to the running frequency from high to low or low to high, and then directly sort the sorted running process group as a process list.
  • the process list is mainly used for filtering the background process, if the number of processes in the process list is too large, the screening purpose may not be achieved, so the creation sub-module 63 may select a certain number of operations with a higher running frequency. Process, or select a process that runs at a frequency greater than a certain frequency to create a list of processes.
  • the adjustment module 40 is configured to adjust the priority of the background process according to the target process list and the foreground process.
  • the adjustment module 40 may specifically include a first acquisition submodule 41 , a second acquisition submodule 42 , and an adjustment submodule 43 , where:
  • the first obtaining submodule 41 is configured to acquire an associated process corresponding to the foreground process.
  • the association process refers to a process associated with the foreground process, which may be set in advance, for example, processes belonging to the same application may be defined as associated processes associated with each other.
  • the second obtaining sub-module 42 is configured to acquire a background process that is the same as the associated process as the first process, and obtain a background process included in the target process list as the second process.
  • the foreground process is the process that the user is using
  • the importance is usually higher than other background processes
  • the first process is a background process related to the foreground process, so the importance of the first process is different from other
  • the background process at the same time, because the second process is a background process on the target process list, and the target process list is related to the current location, the importance of the second process is also different from other background processes.
  • the adjustment sub-module 43 is configured to adjust the priority of the background process according to the first process and the second process.
  • the adjustment sub-module 43 can be specifically used to:
  • the priority of the first process is increased by a second preset amplitude
  • the priority of the second process is increased by a third preset amplitude, where the first preset amplitude is greater than the second preset amplitude, The second preset amplitude is greater than the third preset amplitude.
  • the first preset amplitude, the second preset amplitude, and the third preset amplitude need to be set by the user in advance, for example, the order may be 4 levels, 3 levels, and 2 levels. Considering that the importance of the first process or the second process relative to the user is significantly higher than other background processes, when there is a coincident first process (or second process), the adjustment sub-module 43 can be at the existing priority.
  • the priority of the first process (or the second process) of the coincidence is increased by a maximum amount, and for the first process and the second process that are not coincident, the improvement range may be relatively lower, of course, the first process There is no obvious high and low requirement between the increase rate and the increase of the second process, which may be determined according to actual needs.
  • adjustment sub-module 43 can also be used to:
  • the priority of the third process is lowered by a fourth preset amplitude.
  • the background process that is neither the first process nor the second process should have the lowest degree of importance.
  • the adjustment sub-module 43 may not adjust its existing priority, or may The four preset amplitudes reduce their existing priorities, and the magnitude of the fourth preset amplitudes is not necessarily related to the first preset amplitude, the second preset amplitude, and the third preset amplitude, and may be set in advance.
  • the control module 50 is configured to control the opening and closing of the background process according to the adjusted priority.
  • control module 50 can be specifically configured to:
  • the preset bit may be determined according to actual needs, for example, may be 3 or 4.
  • the preset level may be determined according to a total priority level of the electronic device, for example, when a total of ten priority levels are divided.
  • the preset level may be the third level. Specifically, the higher the priority, the more important the process is to the user. Therefore, when the background process needs to be cleaned up, the lower priority process may be prioritized. These processes may be processes with a lower priority than a certain degree. Can be a relatively low number of processes. Of course, for the background process that does not perform the shutdown operation, the higher priority part can be maintained in an active state, the other part is frozen, or all remain active, which can be determined according to actual needs.
  • the foregoing units may be implemented as a separate entity, or may be implemented in any combination, and may be implemented as the same or a plurality of entities.
  • the foregoing method embodiments and details are not described herein.
  • the process control device provided in this embodiment is applied to an electronic device, and the process control command is acquired by the first acquiring module 10, and the second acquiring module 20 acquires the background process and the foreground process of the electronic device according to the process control command.
  • the background process is controlled according to the adjusted priority, so that the background process can be effectively controlled and controlled in combination with the current location, the flexibility is high, and the method is simple, which is beneficial to reducing the power consumption of the terminal.
  • an embodiment of the present application further provides a storage medium, wherein the storage medium stores a plurality of instructions, the instructions being adapted to be loaded by a processor to execute the process control method described in any one of the foregoing embodiments.
  • the embodiment of the present application further provides an electronic device, which may be a device such as a smart phone or a tablet computer.
  • 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, respectively.
  • the processor 701 is a control center of the electronic device 700, which connects various parts of the entire electronic device using various interfaces and lines, executes the electronic by running or loading an application stored in the memory 702, and calling data stored in the memory 702.
  • the various functions and processing data of the device enable overall monitoring of the electronic device.
  • the processor 701 in the electronic device 700 loads the instructions corresponding to the process of one or more applications into the memory 702 according to the following steps, and is stored in the memory 702 by the processor 701.
  • the application thus implementing various functions:
  • the background process is controlled to be turned on and off according to the adjusted priority.
  • the processor is configured to perform the following steps when adjusting the priority of the background process according to the target process list and the foreground process:
  • the priority of the background process is adjusted according to the first process and the second process.
  • the processor when the priority of the background process is adjusted according to the first process and the second process, the processor is configured to perform the following steps:
  • the priority of the first process is increased by a second preset amplitude
  • the priority of the second process is increased by a third preset amplitude, where the first preset amplitude is greater than the second preset amplitude, The second preset amplitude is greater than the third preset amplitude.
  • the processor when the priority of the background process is adjusted according to the first process and the second process, the processor is further configured to perform the following steps:
  • the priority of the third process is lowered by a fourth preset amplitude.
  • the processor is configured to perform the following steps when determining a target process list based on the current location:
  • the processor is configured to perform the following steps when controlling the opening and closing of the background process according to the adjusted priority:
  • the processor is further configured to perform the following steps before determining the target process list based on the current location:
  • the processor is configured to perform the following steps when creating a corresponding process list based on the number of runs and the run time of the running process in the running process group:
  • the processor is configured to perform the following steps when partitioning the running process according to the operating location:
  • the determining the target process list according to the current location includes: determining a preset location area to which the current location belongs; and obtaining the determined process list corresponding to the preset location area as the target process list.
  • Memory 702 can be used to store applications and data.
  • the application stored in the memory 702 contains instructions executable in the processor.
  • Applications can form various functional modules.
  • the processor 701 executes various functional applications and data processing by running an application stored in the memory 702.
  • the display screen 703 can be used to display information entered by the user or information provided to the user as well as various graphical user interfaces of the terminal, which can be composed of images, text, icons, video, and any combination thereof.
  • the control circuit 704 is electrically connected to the display screen 703 for controlling the display screen 703 to display information.
  • the electronic device 700 further includes a radio frequency circuit 705, an input unit 706, an audio circuit 707, a sensor 708, and a power source 709.
  • the processor 701 is electrically connected to the radio frequency circuit 705, the input unit 706, the audio circuit 707, the sensor 708, and the power source 709, respectively.
  • the radio frequency circuit 705 is configured to transmit and receive radio frequency signals to establish wireless communication with a network device or other electronic device through wireless communication, and to transmit and receive signals with the network device or other electronic devices.
  • the input unit 706 can be configured to receive input digits, character information, or user characteristic information (eg, fingerprints), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function controls.
  • the input unit 706 can include a fingerprint identification module.
  • the audio circuit 707 can provide an audio interface between the user and the terminal through a speaker and a microphone.
  • Electronic device 700 may also include at least one type of sensor 708, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may close the display panel and/or the backlight when the terminal moves to the ear.
  • the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the terminal can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • Power source 709 is used to power various components of electronic device 700.
  • the power supply 709 can be logically coupled to the processor 701 through a power management system to enable functions such as managing charging, discharging, and power management through the power management system.
  • the electronic device 700 may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the electronic device obtained by the embodiment of the present application obtains a process control instruction, and acquires a background process, a foreground process, a current location, and a priority of each background process of the electronic device according to the process control instruction, and then determines according to the current location.
  • a target process list, and the priority of the background process is adjusted according to the target process list and the foreground process, and then the background process is controlled to be turned on and off according to the adjusted priority, so that the background process can be effectively controlled in combination with the current location.
  • the flexibility is high and the method is simple, which is beneficial to reducing the power consumption of the terminal.
  • the storage medium may include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Telephone Function (AREA)

Abstract

一种进程控制方法,包括:获取进程控制指令;根据该进程控制指令获取该电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级;根据该当前位置确定目标进程列表;根据该目标进程列表和前台进程对该后台进程的优先级进行调整;根据调整后优先级控制该后台进程的开启与关闭。

Description

进程控制方法、装置、存储介质以及电子设备
本申请要求于2017年7月31日提交中国专利局、申请号为201710643266.1、发明名称为“进程控制方法、装置、存储介质以及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及一种进程控制方法、装置、存储介质以及电子设备。
背景技术
目前,多数终端设备都可以运行多用户多进程的操作系统。于后台程序而言,对不同的程序进行拉起动作时,通常会按照一定的优先级进行拉起,当前现有的应用程序的优先级往往是固定的,用户在不清楚的情况下也无法实现有限级的调整,且往往部分服务进程与应用程序绑定在一起,如果应用程序的优先级较高,服务进程即便没有在运行时往往因为绑定在一起而继续运行,耗费终端的电量。
发明内容
本申请实施例提供一种进程控制方法、装置、存储介质以及电子设备,可以有效管控后台进程、减少终端电量的浪费。
本申请实施例提供了一种进程控制方法,应用于电子设备,包括:
获取进程控制指令;
根据所述进程控制指令获取所述电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级;
根据所述当前位置确定目标进程列表;
根据所述目标进程列表和前台进程对所述后台进程的优先级进行调整;
根据调整后优先级控制所述后台进程的开启与关闭。
本申请实施例还提供了一种进程控制装置,应用于电子设备,包括:
第一获取模块,用于获取进程控制指令;
第二获取模块,用于根据所述进程控制指令获取所述电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级;
确定模块,用于根据所述当前位置确定目标进程列表;
调整模块,用于根据所述目标进程列表和前台进程对所述后台进程的优先级进行调整;
控制模块,用于根据调整后优先级控制所述后台进程的开启与关闭。
本申请实施例还提供了一种存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行上述任一项进程控制方法。
本申请实施例还提供了一种电子设备,包括处理器和存储器,所述处理器与所述存储器电性连接,所述存储器用于存储指令和数据,所述处理器用于执行上述任一项进程控制方法。
附图说明
下面结合附图,通过对本申请的具体实施方式详细描述,将使本申请的技术方案及其它有益效果显而易见。
图1为本申请实施例提供的进程控制系统的应用场景示意图。
图2为本申请实施例提供的进程控制方法的流程示意图。
图3为本申请实施例提供的进程控制方法的另一流程示意图。
图4为本申请实施例提供的本地数据库的存储示意图。
图5为本申请实施例提供的进程控制装置的结构示意图。
图6为本申请实施例提供的进程控制装置的另一结构示意图。
图7为本申请实施例提供的创建模块的结构示意图。
图8为本申请实施例提供的调整模块的结构示意图。
图9为本申请实施例提供的电子设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例提供一种进程控制方法、装置、存储介质、电子设备以及系统。
请参阅图1,图1为进程控制系统的应用场景图,该进程控制系统可以包括本申请提供的任一种电子设备。
其中,电子设备可以获取进程控制指令,并根据该进程控制指令获取该电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级,接着,根据该当前位置确定目标进程列表,并根据该目标进程列表和前台进程对该后台进程的优先级进行调整,之后,根据调整后优先级控制该后台进程的开启与关闭。
比如,当电子设备电量较低或者CPU占用率较高时,可以生成进程控制指令,此时,电子设备会根据该进程控制指令获取前台进程Q、后台进程{H1、H2…Hn}、当前位置P1以及每一后台进程的优先级,该优先级可以是电子设备出厂时厂家设置好的,之后,电子设备可以根据当前位置P1从本地数据库中确定目标进程列表M1,该本地数据库中可以存储多个进程列表{M1、M2…Mn},比如位置P1对应表M1,位置P2对应表M2,等等,并根据前台进程Q和目标进程列表M1可以对后台进程的优先级进行调整,之后,根据调整后优先级控制{H1、H2…Hn}的开启与关闭。
本实施例将从进程控制装置的角度进行描述,该进程控制装置具体可以作为独立的实体来实现,也可以集成在电子设备,比如终端中来实现,该终端可以包括手机、平板电脑以及个人计算机等。
本申请实施例提供一种进程控制方法,包括以下步骤:
获取进程控制指令;
根据该进程控制指令获取该电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级;
根据该当前位置确定目标进程列表;
根据该目标进程列表和前台进程对该后台进程的优先级进行调整;
根据调整后优先级控制该后台进程的开启与关闭。
在一些实施例中,该根据该目标进程列表和前台进程对该后台进程的优先级进行调整,包括:
获取该前台进程对应的关联进程;
获取与该关联进程相同的后台进程,作为第一进程;
获取该目标进程列表中包含的后台进程,作为第二进程;
根据该第一进程和第二进程对该后台进程的优先级进行调整。
在一些实施例中,该根据该第一进程和第二进程对该后台进程的优先级进行调整,包括:
判断该第一进程和第二进程中是否存在相同的后台进程;
若存在,则以第一预设幅度调高该相同的后台进程的优先级;
若不存在,则以第二预设幅度调高该第一进程的优先级,以第三预设幅度调高该第二进程的优先级,该第一预设幅度大于第二预设幅度,该第二预设幅度大于第三预设幅度。
在一些实施例中,该根据该第一进程和第二进程对该后台进程的优先级进行调整,还包括:
获取除该第一进程和第二进程之外的后台进程,作为第三进程;
以第四预设幅度降低该第三进程的优先级。
在一些实施例中,该根据该当前位置确定目标进程列表,包括:
确定该当前位置所属的预设位置区域;
获取确定的该预设位置区域对应的进程列表,作为目标进程列表。
在一些实施例中,该根据调整后优先级控制该后台进程的开启与关闭,包括:
获取位于后预设位的调整后优先级对应的后台进程,或者获取低于预设等级的调整后优先级对应的后台进程,作为目标进程;
关闭该目标进程。
在一些实施例中,在根据该当前位置确定目标进程列表之前,还包括:
获取历史时段内该电子设备中的运行进程、以及该运行进程的运行次数、运行时长和运行地点;
根据该运行地点对该运行进程进行划分,得到至少一个运行进程组;
根据该运行进程组中运行进程的运行次数和运行时长创建对应的进程列表。
在一些实施例中,该根据该运行进程组中运行进程的运行次数和运行时长创建对应的进程列表,包括:
根据该运行次数和运行时长计算对应运行进程在该历史时段内的运行频率;
根据该运行频率对该运行进程组中的运行进程进行排序;
根据排序后的运行进程组创建对应的进程列表。
在一些实施例中,该根据该运行地点对该运行进程进行划分,包括:
将属于同一预设位置区域内的运行地点对应的运行进程归为一组;
该根据该当前位置确定目标进程列表,包括:确定该当前位置所属的预设位置区域;获取确定的该预设位置区域对应的进程列表,作为目标进程列表。
如图2所示,该进程控制方法可以应用于电子设备,其具体流程可以如下:
S101、获取进程控制指令。
本实施例中,由于进程的运行会影响电子设备的电量、CPU占用率以及运行速度等,故该进程控制指令的触发条件可以根据电量、CPU占用率以及运行速度而定,比如,当电量或运行速度低于一定值,或者CPU占用率高于一定值时,电子设备可以触发生成进程控制指令,当然,也可以是电子设备中运行的进程数量超过一定值时,触发生成进程控制指令。
S102、根据该进程控制指令获取该电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级。
本实施例中,该优先级可以是根据每个进程的属性信息提前设定好的,比如系统进程的优先级可以高于非系统进程的优先级,即时通讯进程的优先级可以高于购物进程的优先级,等等。该当前位置可以通过GPS(Global Positioning System,全球定位系统)定位、蜂窝数据网络定位、或者WiFi定位等方式获取,该蜂窝数据网络定位主要基于电子设备附近的基站位置来实现,该WiFi网络定位主要基于电子设备所连接的局域网名称,也即SSID(Service Set Identifier,服务集标识)来实现。
S103、根据该当前位置确定目标进程列表。
本实施例中,该目标进程列表上可以存储与位置有关联的一些进程,这些进程可以通过对电子设备中进程的历史运行情况和运行地点统计分析得到,比如可以先确定出几个用户常去的地点,然后统计出在每一常去地点中进程的历史运行情况,根据历史运行情况建立该常去地点对应的进程列表,其中,每一常去地点可以是用户根据自身情况自行设定的,也可以是电子设备直接根据运行地点归纳总结出的,之后,将建立好的进程列表和常去地点进行关联存储,后续就可以根据当前地点获取对应的进程列表作为目标进程列表了。
当然,考虑到实际使用过程中,用户常去的地方通常是一个区域范围,而并非精确地点,故建立的可以是区域范围与进程列表的对应关系,此时,上述步骤“根据该当前位置确定目标进程列表”具体可以包括:
确定该当前位置所属的预设位置区域;
获取确定的该预设位置区域对应的进程列表,作为目标进程列表。
本实施例中,该预设位置区域可以是用户自行设定的,也可以是电子设备根据历史运行地点归纳出的,其可以包括家里、办公室或地铁等。容易理解的是,该进程列表应该是提前设定好的,也即,在上述步骤S103之前,该进程控制方法还可以包括:
1-1、获取历史时段内该电子设备中的运行进程、以及该运行进程的运行次数、运行时长和运行地点。
1-2、根据该运行地点对该运行进程进行划分,得到至少一个运行进程组。
本实施例中,该历史时段可以人为设定,比如过去一个月或半年。该运行地点主要指运行进程在运行时,该电子设备所处的位置。该运行进程组包括至少一个运行进程,其可以是用户在同一预设位置区域使用过的所有运行进程,此时,上述步骤1-2具体可以包括:将属于同一预设位置区域内的运行地点对应的运行进程归为一组。当然,该运行进程组还可以是用户在同一运行地点使用过的所有运行进程。
1-3、根据该运行进程组中运行进程的运行次数和运行时长创建对应的进程列表。
例如,上述步骤1-3具体可以包括:
根据该运行次数和运行时长计算对应运行进程在该历史时段内的运行频率;
根据该运行频率对该运行进程组中的运行进程进行排序;
根据排序后的运行进程组创建对应的进程列表。
本实施例中,可以按照运行频率从高到低或者从低到高对运行进程组中的运行进程进行排序,之后可以直接将排序后的运行进程组作为进程列表。当然,考虑到该进程列表主要用于对后台进程进行筛选,若进程列表中进程的数量过多,则可能达不到筛选目的,故可以选取运行频率较高的一定数量的运行进程,或者选取运行频率大于一定频率的进程创建进程列表。
S104、根据该目标进程列表和前台进程对该后台进程的优先级进行调整。
例如,上述步骤S104具体可以包括:
2-1、获取该前台进程对应的关联进程。
本实施例中,该关联进程是指与前台进程相关联的进程,其可以是提前设定好的,比如可以将属于同一应用的进程定义为彼此关联的关联进程。
2-2、获取与该关联进程相同的后台进程,作为第一进程;获取该目标进程列表中包含的后台进程,作为第二进程。
需要说明的是,由于前台进程是用户正在使用的进程,其重要性通常高于其他后台进程,而第一进程又是与前台进程有关的后台进程,故该第一进程的重要性不同与其他后台进程,与此同时,由于该第二进程是目标进程列表上的后台进程,而该目标进程列表又与当前位置有关,故该第二进程的重要性也不同于其他后台进程。
2-3、根据该第一进程和第二进程对该后台进程的优先级进行调整。
例如,上述步骤2-3具体可以包括:
判断该第一进程和第二进程中是否存在相同的后台进程;
若存在,则以第一预设幅度调高该相同的后台进程的优先级;
若不存在,则以第二预设幅度调高该第一进程的优先级,以第三预设幅度调高该第二进程的优先级,该第一预设幅度大于第二预设幅度,该第二预设幅度大于第三预设幅度。
本实施例中,该第一预设幅度、第二预设幅度和第三预设幅度需要用户提前设置好,比如其依次可以为4个等级、3个等级和2个等级等。考虑到该第一进程或第二进程相对于用户的重要程度明显高于其他后台进程,故当存在重合的第一进程(或第二进程)时,可以在现有优先级的基础上,以最大幅度提升该重合的第一进程(或第二进程)的优先级,而对于不重合的第一进程和第二进程,其提升幅度可以相对较低一些,当然,第一进程的提升幅度和第二进程的提升幅度彼此间没有明显的高低要求,可随实际需求而定。
此外,上述步骤2-3还可以包括:
获取除该第一进程和第二进程之外的后台进程,作为第三进程;
以第四预设幅度降低该第三进程的优先级。
本实施例中,对于既不是第一进程,又不是第二进程的后台进程,其重要程度应该最低,此时,可以不对其现有优先级进行调节,或者,也可以以第四预设幅度降低其现有优先级,该第四预设幅度的大小与第一预设幅度、第二预设幅度以及第三预设幅度之间没有必然联系,其可以提前设置好。
S105、根据调整后优先级控制该后台进程的开启与关闭。
例如,上述步骤S105具体可以包括:
获取位于后预设位的调整后优先级对应的后台进程,或者获取低于预设等级的调整后优先级对应的后台进程,作为目标进程;
关闭该目标进程。
本实施例中,该预设位可以根据实际需求而定,比如可以为3或4,该预设等级可以根据电子设备总共划分的优先级等级而定,比如当总共划分有十个优先级等级时,该预设等级可以是第三级。具体的,由于优先级越高的进程对用户越重要,故当需要对后台进程进行清理时,可以优先考虑关闭优先级较低的进程,这些进程可以是优先级低于一定程度的进程,也可以是相对较低的一定数量的进程。当然,对于不进行关闭操作的后台进行,可以优先级较高的一部分维持活跃状态,另一部分进行冻结,或者全部维持活跃状态,具体可以根据实际需求而定。
由上述可知,本实施例提供的进程控制方法,应用于电子设备,通过获取进程控制指令,并根据该进程控制指令获取该电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级,接着,根据该当前位置确定目标进程列表,并根据该目标进程列表和前台进程对该后台进程的优先级进行调整,之后,根据调整后优先级控制该后台进程的开启与关闭,从而可以结合当前地点对后台进程进行有效管控,灵活性高,方法简单,有利于减少终端耗电量。
在本实施例中,将以该进程控制装置具体集成在电子设备中为例进行详细说明。
请参见图3,一种进程控制方法,具体流程可以如下:
S201、电子设备获取历史时段内该电子设备中的运行进程、以及该运行进程的运行次数、运行时长和运行地点。
譬如,该历史时段可以是人为设定的一个月或两个月等。该运行地点可以通过GPS定位、蜂窝数据网络定位、或者WiFi定位等方式获取。通常,在该历史时段内,电子设备会记录其内每一进程的运行信息,包括运行次数、运行时长和运行地点等。
S202、电子设备将属于同一预设位置区域内的运行地点对应的运行进程归为一组,得 到至少一个运行进程组。
譬如,该预设位置区域可以是电子设备根据运行地点归纳出的,比如可以将统计次数较多、停留时长较长的运行地点确定为常用地点,然后以该常用地点为圆心、指定数值为半径确定一个圆形区域,将该圆形区域作为预设位置区域,通常,该预设位置区域可以包括家里、办公室以及一些常去的休闲场所等。
S203、电子设备根据该运行次数和运行时长计算对应运行进程在该历史时段内的运行频率,并根据该运行频率对该运行进程组中的运行进程进行排序。
譬如,可以根据运行频率从高到低或者从低到高对运行进程组中的运行进程进行排序。该运行频率实际上反映了用户的使用偏好,不同场所用户习惯使用的应用可能不一样,从而运行的进程也不一样,比如用户在地铁时,使用时长较长的可以是掌阅、微信读书等应用进程;用户在家里的网络环境下,使用时间较长的可以是微信、微博等应用进程;用户在办公室时,使用时间较长的可以是钉钉、Email等办公软件的应用进程,等等。
S204、电子设备根据排序后的运行进程组创建对应的进程列表。
譬如,可以选取运行频率较高的一定数量的运行进程,或者选取运行频率大于一定频率的运行进程创建进程列表,之后,建立这些进程列表与预设位置区域的关联关系,并将该关联关系存储在本地数据库中。
S205、电子设备获取进程控制指令。
譬如,电子设备可以在电量或运行速度低于一定值,或者CPU占用率高于一定值,或者进程数量超过一定值时,触发生成进程控制指令。
S206、电子设备根据该进程控制指令获取该电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级。
本实施例中,该优先级可以是根据每个进程的属性信息提前设定好的,比如系统进程的优先级可以高于非系统进程的优先级,即时通讯进程的优先级可以高于购物进程的优先级,等等。
S207、电子设备确定该当前位置所属的预设位置区域,并获取确定的该预设位置区域对应的进程列表,作为目标进程列表。
譬如,请参见图4,本地数据库中可以存储有进程列表{M1、M2…Mn},且与其关联存储的预设位置区域可以包括{办公室、家里…地铁},其中M1可以包括钉钉、Email等应用进程,M2可以包括微信、微博等应用进程,M3可以包括掌阅、微信读书等应用进程,若当前位置属于家里,则获取到的目标进程列表为M2,若当前位置属于办公室,则获取到的目标进程列表为M1。
S208、电子设备获取该前台进程对应的关联进程,并获取与该关联进程相同的后台进程,作为第一进程,获取该目标进程列表中包含的后台进程,作为第二进程。
S209、电子设备判断该第一进程和第二进程中是否存在相同的后台进程,若是,则以第一预设幅度调高该相同的后台进程的优先级,若否,则执行下述步骤S210。
譬如,考虑到该第一进程或第二进程相对于用户的重要程度明显高于其他后台进程,故当存在重合的第一进程(或第二进程)时,可以在现有优先级的基础上,以最大幅度提升该重合的第一进程(或第二进程)的优先级,也即该第一预设幅度可以为最大的调节幅度,比如4个等级。
S210、电子设备获取除该第一进程和第二进程之外的后台进程,作为第三进程,并以第二预设幅度调高该第一进程的优先级,以第三预设幅度调高该第二进程的优先级,以第四预设幅度降低该第三进程的优先级。
譬如,该第二预设幅度、第三预设幅度和第四预设幅度可以依次递减,比如依次为3个等级、2个等级和1个等级。
S211、电子设备获取位于后预设位的调整后优先级对应的后台进程,或者获取低于预设等级的调整后优先级对应的后台进程,作为目标进程,并关闭该目标进程。
譬如,该预设位可以为3或4。该预设等级可以为第三级,此时,总的优先级可以划分为十个等级,等级越高代表对用户越重要。当需要对后台进程进行清理时,可以优先考虑关闭优先级较低的进程,这些进程可以是优先级低于一定程度的进程,也可以是相对较低的一定数量的进程。
由上述可知,本实施例提供的进程控制方法,其中电子设备可以获取历史时段内该电子设备中的运行进程、以及该运行进程的运行次数、运行时长和运行地点,并将属于同一预设位置区域内的运行地点对应的运行进程归为一组,得到至少一个运行进程组,接着,根据该运行次数和运行时长计算对应运行进程在该历史时段内的运行频率,并根据该运行频率对该运行进程组中的运行进程进行排序,接着,根据排序后的运行进程组创建对应的进程列表,从而可以在本地数据库中存储好每一预设位置区域和进程列表的关联关系,方法简单,之后,当电子设备获取到进程控制指令时,可以根据该进程控制指令获取该电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级,接着,确定该当前位置所属的预设位置区域,并获取确定的该预设位置区域对应的进程列表,作为目标进程列表,接着,获取该前台进程对应的关联进程,并获取与该关联进程相同的后台进程,作为第一进程,获取该目标进程列表中包含的后台进程,作为第二进程,接着,判断该第一进程和第二进程中是否存在相同的后台进程,若是,则以第一预设幅度调高该相同的后台进程的优先级,若否,则获取除该第一进程和第二进程之外的后台进程,作为第三进程,并以第二预设幅度调高该第一进程的优先级,以第三预设幅度调高该第二进程的优先级,以第四预设幅度降低该第三进程的优先级,之后,获取位于后预设位的调整后优先级对应的后台进程,或者获取低于预设等级的调整后优先级对应的后台进程,作为目标进程,并关闭该目标进程,从而可以结合当前地点对后台进程进行有效管控,灵活性高,方法简单,有利于减少终端耗电量。
根据上述实施例所描述的方法,本实施例将从进程控制装置的角度进一步进行描述,该进程控制装置可以集成在电子设备中。
本申请实施例提供一种进程控制装置,包括:
第一获取模块,用于获取进程控制指令;
第二获取模块,用于根据该进程控制指令获取该电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级;
确定模块,用于根据该当前位置确定目标进程列表;
调整模块,用于根据该目标进程列表和前台进程对该后台进程的优先级进行调整;
控制模块,用于根据调整后优先级控制该后台进程的开启与关闭。
在一些实施例中,该调整模块具体包括:
第一获取子模块,用于获取该前台进程对应的关联进程;
第二获取子模块,用于获取与该关联进程相同的后台进程,作为第一进程;获取该目标进程列表中包含的后台进程,作为第二进程;
调整子模块,用于根据该第一进程和第二进程对该后台进程的优先级进行调整。
在一些实施例中,该调整子模块具体用于:
判断该第一进程和第二进程中是否存在相同的后台进程;
若存在,则以第一预设幅度调高该相同的后台进程的优先级;
若不存在,则以第二预设幅度调高该第一进程的优先级,以第三预设幅度调高该第二进程的优先级,该第一预设幅度大于第二预设幅度,该第二预设幅度大于第三预设幅度。
在一些实施例中,该调整子模块还用于:
获取除该第一进程和第二进程之外的后台进程,作为第三进程;
以第四预设幅度降低该第三进程的优先级。
在一些实施例中,该确定模块具体用于:
确定该当前位置所属的预设位置区域;
获取确定的该预设位置区域对应的进程列表,作为目标进程列表。
在一些实施例中,该控制模块具体用于:
获取位于后预设位的调整后优先级对应的后台进程,或者获取低于预设等级的调整后优先级对应的后台进程,作为目标进程;
关闭该目标进程。
在一些实施例中,还包括创建模块,该创建模块具体包括:
第三获取子模块,用于在该确定模块根据该当前位置确定目标进程列表之前,获取历史时段内该电子设备中的运行进程、以及该运行进程的运行次数、运行时长和运行地点;
划分子模块,用于根据该运行地点对该运行进程进行划分,得到至少一个运行进程组;
创建子模块,用于根据该运行进程组中运行进程的运行次数和运行时长创建对应的进程列表。
在一些实施例中,该创建子模块具体用于:
根据该运行次数和运行时长计算对应运行进程在该历史时段内的运行频率;
根据该运行频率对该运行进程组中的运行进程进行排序;
根据排序后的运行进程组创建对应的进程列表。
在一些实施例中,该划分子模块具体用于:
将属于同一预设位置区域内的运行地点对应的运行进程归为一组;
该确定模块具体用于:确定该当前位置所属的预设位置区域;获取确定的该预设位置区域对应的进程列表,作为目标进程列表。
请参阅图5,图5具体描述了本申请实施例提供的进程控制装置,应用于电子设备,其可以包括:第一获取模块10、第二获取模块20、确定模块30、调整模块40和控制模块50,其中:
(1)第一获取模块10
第一获取模块10,用于获取进程控制指令。
本实施例中,由于进程的运行会影响电子设备的电量、CPU占用率以及运行速度等,故该进程控制指令的触发条件可以根据电量、CPU占用率以及运行速度而定,比如,当电量或运行速度低于一定值,或者CPU占用率高于一定值时,电子设备可以触发生成进程控制指令,当然,也可以是电子设备中运行的进程数量超过一定值时,触发生成进程控制指令。
(2)第二获取模块20
第二获取模块20,用于根据该进程控制指令获取该电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级。
本实施例中,该优先级可以是根据每个进程的属性信息提前设定好的,比如系统进程的优先级可以高于非系统进程的优先级,即时通讯进程的优先级可以高于购物进程的优先级,等等。该当前位置可以通过GPS(Global Positioning System,全球定位系统)定位、蜂窝数据网络定位、或者WiFi定位等方式获取,该蜂窝数据网络定位主要基于电子设备附近的基站位置来实现,该WiFi网络定位主要基于电子设备所连接的局域网名称,也即SSID(Service Set Identifier,服务集标识)来实现。
(3)确定模块30
确定模块30,用于根据该当前位置确定目标进程列表。
本实施例中,该目标进程列表上可以存储与位置有关联的一些进程,这些进程可以通过对电子设备中进程的历史运行情况和运行地点统计分析得到,比如可以先确定出几个用户常去的地点,然后统计出在每一常去地点中进程的历史运行情况,根据历史运行情况建立该常去地点对应的进程列表,其中,每一常去地点可以是用户根据自身情况自行设定的,也可以是电子设备直接根据运行地点归纳总结出的,之后,将建立好的进程列表和常去地点进行关联存储,后续就可以根据当前地点获取对应的进程列表作为目标进程列表了。
当然,考虑到实际使用过程中,用户常去的地方通常是一个区域范围,而并非精确地点,故建立的可以是区域范围与进程列表的对应关系,此时,上述确定模块30具体可以用于:
确定该当前位置所属的预设位置区域;
获取确定的该预设位置区域对应的进程列表,作为目标进程列表。
本实施例中,该预设位置区域可以是用户自行设定的,也可以是电子设备根据历史运行地点归纳出的,其可以包括家里、办公室或地铁等。容易理解的是,该进程列表应该是提前设定好的,也即,请参见图6和图7,该进程控制装置还可以包括创建模60,该创建模块60具体可以包括第三获取子模块61、划分子模块62和创建子模块63,其中:
第三获取子模块61,用于在该确定模块30根据该当前位置确定目标进程列表之前,获取历史时段内该电子设备中的运行进程、以及该运行进程的运行次数、运行时长和运行地点;
划分子模块62,用于根据该运行地点对该运行进程进行划分,得到至少一个运行进程组;
本实施例中,该历史时段可以人为设定,比如过去一个月或半年。该运行地点主要指运行进程在运行时,该电子设备所处的位置。该运行进程组包括至少一个运行进程,其可以是用户在同一预设位置区域使用过的所有运行进程,此时,该划分子模块62具体可以用于:将属于同一预设位置区域内的运行地点对应的运行进程归为一组。当然,该运行进程组还可以是用户在同一运行地点使用过的所有运行进程。
创建子模块63,用于根据该运行进程组中运行进程的运行次数和运行时长创建对应的进程列表。
例如,该创建子模块63具体可以用于:
根据该运行次数和运行时长计算对应运行进程在该历史时段内的运行频率;
根据该运行频率对该运行进程组中的运行进程进行排序;
根据排序后的运行进程组创建对应的进程列表。
本实施例中,创建子模块63可以按照运行频率从高到低或者从低到高对运行进程组中的运行进程进行排序,之后可以直接将排序后的运行进程组作为进程列表。当然,考虑到该进程列表主要用于对后台进程进行筛选,若进程列表中进程的数量过多,则可能达不到筛选目的,故创建子模块63可以选取运行频率较高的一定数量的运行进程,或者选取运行频率大于一定频率的进程创建进程列表。
(4)调整模块40
调整模块40,用于根据该目标进程列表和前台进程对该后台进程的优先级进行调整。
例如,请参见图8,该调整模块40具体可以包括第一获取子模41、第二获取子模块42和调整子模块43,其中:
第一获取子模41,用于获取该前台进程对应的关联进程。
本实施例中,该关联进程是指与前台进程相关联的进程,其可以是提前设定好的,比如可以将属于同一应用的进程定义为彼此关联的关联进程。
第二获取子模块42,用于获取与该关联进程相同的后台进程,作为第一进程;获取该 目标进程列表中包含的后台进程,作为第二进程。
需要说明的是,由于前台进程是用户正在使用的进程,其重要性通常高于其他后台进程,而第一进程又是与前台进程有关的后台进程,故该第一进程的重要性不同与其他后台进程,与此同时,由于该第二进程是目标进程列表上的后台进程,而该目标进程列表又与当前位置有关,故该第二进程的重要性也不同于其他后台进程。
调整子模块43,用于根据该第一进程和第二进程对该后台进程的优先级进行调整。
例如,该调整子模块43具体可以用于:
判断该第一进程和第二进程中是否存在相同的后台进程;
若存在,则以第一预设幅度调高该相同的后台进程的优先级;
若不存在,则以第二预设幅度调高该第一进程的优先级,以第三预设幅度调高该第二进程的优先级,该第一预设幅度大于第二预设幅度,该第二预设幅度大于第三预设幅度。
本实施例中,该第一预设幅度、第二预设幅度和第三预设幅度需要用户提前设置好,比如其依次可以为4个等级、3个等级和2个等级等。考虑到该第一进程或第二进程相对于用户的重要程度明显高于其他后台进程,故当存在重合的第一进程(或第二进程)时,调整子模块43可以在现有优先级的基础上,以最大幅度提升该重合的第一进程(或第二进程)的优先级,而对于不重合的第一进程和第二进程,其提升幅度可以相对较低一些,当然,第一进程的提升幅度和第二进程的提升幅度彼此间没有明显的高低要求,可随实际需求而定。
此外,该调整子模块43还可以用于:
获取除该第一进程和第二进程之外的后台进程,作为第三进程;
以第四预设幅度降低该第三进程的优先级。
本实施例中,对于既不是第一进程,又不是第二进程的后台进程,其重要程度应该最低,此时,调整子模块43可以不对其现有优先级进行调节,或者,也可以以第四预设幅度降低其现有优先级,该第四预设幅度的大小与第一预设幅度、第二预设幅度以及第三预设幅度之间没有必然联系,其可以提前设置好。
(5)控制模块50
控制模块50,用于根据调整后优先级控制该后台进程的开启与关闭。
例如,该控制模块50具体可以用于:
获取位于后预设位的调整后优先级对应的后台进程,或者获取低于预设等级的调整后优先级对应的后台进程,作为目标进程;
关闭该目标进程。
本实施例中,该预设位可以根据实际需求而定,比如可以为3或4,该预设等级可以根据电子设备总共划分的优先级等级而定,比如当总共划分有十个优先级等级时,该预设等级可以是第三级。具体的,由于优先级越高的进程对用户越重要,故当需要对后台进程进行清理时,可以优先考虑关闭优先级较低的进程,这些进程可以是优先级低于一定程度的进程,也可以是相对较低的一定数量的进程。当然,对于不进行关闭操作的后台进行,可以优先级较高的一部分维持活跃状态,另一部分进行冻结,或者全部维持活跃状态,具体可以根据实际需求而定。
具体实施时,以上各个单元可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元的具体实施可参见前面的方法实施例,在此不再赘述。
由上述可知,本实施例提供的进程控制装置,应用于电子设备,通过第一获取模块10获取进程控制指令,第二获取模块20根据该进程控制指令获取该电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级,接着,确定模块30根据该当前位置确定目 标进程列表,调整模块40根据该目标进程列表和前台进程对该后台进程的优先级进行调整,之后,控制模块50根据调整后优先级控制该后台进程的开启与关闭,从而可以结合当前地点对后台进程进行有效管控,灵活性高,方法简单,有利于减少终端耗电量。
此外,本申请实施例还提供了一种存储介质,其中,该存储介质中存储有多条指令,该指令适于由处理器加载以执行上述任一实施例所描述的进程控制方法。
另外,本申请实施例还提供了一种电子设备,该电子设备可以是智能手机、平板电脑等设备。图9所示,电子设备700包括处理器701、存储器702、显示屏703以及控制电路704。其中,处理器701分别与存储器702、显示屏703、控制电路704电性连接。
处理器701是电子设备700的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器702内的应用程序,以及调用存储在存储器702内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。
在本实施例中,电子设备700中的处理器701会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器702中,并由处理器701来运行存储在存储器702中的应用程序,从而实现各种功能:
获取进程控制指令;
根据该进程控制指令获取该电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级;
根据该当前位置确定目标进程列表;
根据该目标进程列表和前台进程对该后台进程的优先级进行调整;
根据调整后优先级控制该后台进程的开启与关闭。
在一些实施例中,在根据该目标进程列表和前台进程对该后台进程的优先级进行调整时,该处理器用于执行以下步骤:
获取该前台进程对应的关联进程;
获取与该关联进程相同的后台进程,作为第一进程;
获取该目标进程列表中包含的后台进程,作为第二进程;
根据该第一进程和第二进程对该后台进程的优先级进行调整。
在一些实施例中,在根据该第一进程和第二进程对该后台进程的优先级进行调整时,该处理器用于执行以下步骤:
判断该第一进程和第二进程中是否存在相同的后台进程;
若存在,则以第一预设幅度调高该相同的后台进程的优先级;
若不存在,则以第二预设幅度调高该第一进程的优先级,以第三预设幅度调高该第二进程的优先级,该第一预设幅度大于第二预设幅度,该第二预设幅度大于第三预设幅度。
在一些实施例中,在根据该第一进程和第二进程对该后台进程的优先级进行调整时,该处理器还用于执行以下步骤:
获取除该第一进程和第二进程之外的后台进程,作为第三进程;
以第四预设幅度降低该第三进程的优先级。
在一些实施例中,在根据该当前位置确定目标进程列表时,该处理器用于执行以下步骤:
确定该当前位置所属的预设位置区域;
获取确定的该预设位置区域对应的进程列表,作为目标进程列表。
在一些实施例中,在根据调整后优先级控制该后台进程的开启与关闭时,该处理器用于执行以下步骤:
获取位于后预设位的调整后优先级对应的后台进程,或者获取低于预设等级的调整后优先级对应的后台进程,作为目标进程;
关闭该目标进程。
在一些实施例中,在根据该当前位置确定目标进程列表之前,该处理器还用于执行以下步骤:
获取历史时段内该电子设备中的运行进程、以及该运行进程的运行次数、运行时长和运行地点;
根据该运行地点对该运行进程进行划分,得到至少一个运行进程组;
根据该运行进程组中运行进程的运行次数和运行时长创建对应的进程列表。
在一些实施例中,在根据该运行进程组中运行进程的运行次数和运行时长创建对应的进程列表时,该处理器用于执行以下步骤:
根据该运行次数和运行时长计算对应运行进程在该历史时段内的运行频率;
根据该运行频率对该运行进程组中的运行进程进行排序;
根据排序后的运行进程组创建对应的进程列表。
在一些实施例中,在根据该运行地点对该运行进程进行划分时,该处理器用于执行以下步骤:
将属于同一预设位置区域内的运行地点对应的运行进程归为一组;
该根据该当前位置确定目标进程列表,包括:确定该当前位置所属的预设位置区域;获取确定的该预设位置区域对应的进程列表,作为目标进程列表。
存储器702可用于存储应用程序和数据。存储器702存储的应用程序中包含有可在处理器中执行的指令。应用程序可以组成各种功能模块。处理器701通过运行存储在存储器702的应用程序,从而执行各种功能应用以及数据处理。
显示屏703可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图像、文本、图标、视频和其任意组合来构成。
控制电路704与显示屏703电性连接,用于控制显示屏703显示信息。
在一些实施例中,如图9所示,电子设备700还包括:射频电路705、输入单元706、音频电路707、传感器708以及电源709。其中,处理器701分别与射频电路705、输入单元706、音频电路707、传感器708以及电源709电性连接。
射频电路705用于收发射频信号,以通过无线通信与网络设备或其他电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。
输入单元706可用于接收输入的数字、字符信息或用户特征信息(例如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。其中,输入单元706可以包括指纹识别模组。
音频电路707可通过扬声器、传声器提供用户与终端之间的音频接口。
电子设备700还可以包括至少一种传感器708,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
电源709用于给电子设备700的各个部件供电。在一些实施例中,电源709可以通过电源管理系统与处理器701逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
尽管图9中未示出,电子设备700还可以包括摄像头、蓝牙模块等,在此不再赘述。
本申请实施例提供的电子设备,通过获取进程控制指令,并根据该进程控制指令获取该电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级,接着,根据该当前位置确定目标进程列表,并根据该目标进程列表和前台进程对该后台进程的优先级进行调整,之后,根据调整后优先级控制该后台进程的开启与关闭,从而可以结合当前地点对后台进程进行有效管控,灵活性高,方法简单,有利于减少终端耗电量。
需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。
综上所述,虽然本申请已以优选实施例揭露如上,但上述优选实施例并非用以限制本申请,本领域的普通技术人员,在不脱离本申请的精神和范围内,均可作各种更动与润饰,因此本申请的保护范围以权利要求界定的范围为准。

Claims (20)

  1. 一种进程控制方法,应用于电子设备,其包括:
    获取进程控制指令;
    根据所述进程控制指令获取所述电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级;
    根据所述当前位置确定目标进程列表;
    根据所述目标进程列表和前台进程对所述后台进程的优先级进行调整;
    根据调整后优先级控制所述后台进程的开启与关闭。
  2. 根据权利要求1所述的进程控制方法,其中,所述根据所述目标进程列表和前台进程对所述后台进程的优先级进行调整,包括:
    获取所述前台进程对应的关联进程;
    获取与所述关联进程相同的后台进程,作为第一进程;
    获取所述目标进程列表中包含的后台进程,作为第二进程;
    根据所述第一进程和第二进程对所述后台进程的优先级进行调整。
  3. 根据权利要求2所述的进程控制方法,其中,所述根据所述第一进程和第二进程对所述后台进程的优先级进行调整,包括:
    判断所述第一进程和第二进程中是否存在相同的后台进程;
    若存在,则以第一预设幅度调高所述相同的后台进程的优先级;
    若不存在,则以第二预设幅度调高所述第一进程的优先级,以第三预设幅度调高所述第二进程的优先级,所述第一预设幅度大于第二预设幅度,所述第二预设幅度大于第三预设幅度。
  4. 根据权利要求3所述的进程控制方法,其中,所述根据所述第一进程和第二进程对所述后台进程的优先级进行调整,还包括:
    获取除所述第一进程和第二进程之外的后台进程,作为第三进程;
    以第四预设幅度降低所述第三进程的优先级。
  5. 根据权利要求1所述的进程控制方法,其中,所述根据所述当前位置确定目标进程列表,包括:
    确定该当前位置所属的预设位置区域;
    获取确定的该预设位置区域对应的进程列表,作为目标进程列表。
  6. 根据权利要求1所述的进程控制方法,其中,所述根据调整后优先级控制所述后台进程的开启与关闭,包括:
    获取位于后预设位的调整后优先级对应的后台进程,或者获取低于预设等级的调整后优先级对应的后台进程,作为目标进程;
    关闭该目标进程。
  7. 根据权利要求1所述的进程控制方法,其中,在根据所述当前位置确定目标进程列表之前,还包括:
    获取历史时段内所述电子设备中的运行进程、以及所述运行进程的运行次数、运行时长和运行地点;
    根据所述运行地点对所述运行进程进行划分,得到至少一个运行进程组;
    根据所述运行进程组中运行进程的运行次数和运行时长创建对应的进程列表。
  8. 根据权利要求7所述的进程控制方法,其中,所述根据所述运行进程组中运行进程的运行次数和运行时长创建对应的进程列表,包括:
    根据所述运行次数和运行时长计算对应运行进程在所述历史时段内的运行频率;
    根据所述运行频率对所述运行进程组中的运行进程进行排序;
    根据排序后的运行进程组创建对应的进程列表。
  9. 根据权利要求7所述的进程控制方法,其中,所述根据所述运行地点对所述运行进程进行划分,包括:
    将属于同一预设位置区域内的运行地点对应的运行进程归为一组;
    所述根据所述当前位置确定目标进程列表,包括:确定所述当前位置所属的预设位置区域;获取确定的所述预设位置区域对应的进程列表,作为目标进程列表。
  10. 一种进程控制装置,应用于电子设备,其包括:
    第一获取模块,用于获取进程控制指令;
    第二获取模块,用于根据所述进程控制指令获取所述电子设备的后台进程、前台进程、当前位置以及每一后台进程的优先级;
    确定模块,用于根据所述当前位置确定目标进程列表;
    调整模块,用于根据所述目标进程列表和前台进程对所述后台进程的优先级进行调整;
    控制模块,用于根据调整后优先级控制所述后台进程的开启与关闭。
  11. 根据权利要求10所述的进程控制装置,其中,所述调整模块具体包括:
    第一获取子模块,用于获取所述前台进程对应的关联进程;
    第二获取子模块,用于获取与所述关联进程相同的后台进程,作为第一进程;获取所述目标进程列表中包含的后台进程,作为第二进程;
    调整子模块,用于根据所述第一进程和第二进程对所述后台进程的优先级进行调整。
  12. 根据权利要求11所述的进程控制装置,其中,所述调整子模块具体用于:
    判断所述第一进程和第二进程中是否存在相同的后台进程;
    若存在,则以第一预设幅度调高所述相同的后台进程的优先级;
    若不存在,则以第二预设幅度调高所述第一进程的优先级,以第三预设幅度调高所述第二进程的优先级,所述第一预设幅度大于第二预设幅度,所述第二预设幅度大于第三预设幅度。
  13. 根据权利要求12所述的进程控制装置,其中,所述调整子模块还用于:
    获取除所述第一进程和第二进程之外的后台进程,作为第三进程;
    以第四预设幅度降低所述第三进程的优先级。
  14. 根据权利要求10所述的进程控制装置,其中,所述确定模块具体用于:
    确定该当前位置所属的预设位置区域;
    获取确定的该预设位置区域对应的进程列表,作为目标进程列表。
  15. 根据权利要求10所述的进程控制装置,其中,所述控制模块具体用于:
    获取位于后预设位的调整后优先级对应的后台进程,或者获取低于预设等级的调整后优先级对应的后台进程,作为目标进程;
    关闭该目标进程。
  16. 根据权利要求10所述的进程控制装置,其还包括创建模块,所述创建模块具体包括:
    第三获取子模块,用于在所述确定模块根据所述当前位置确定目标进程列表之前,获取历史时段内所述电子设备中的运行进程、以及所述运行进程的运行次数、运行时长和运行地点;
    划分子模块,用于根据所述运行地点对所述运行进程进行划分,得到至少一个运行进程组;
    创建子模块,用于根据所述运行进程组中运行进程的运行次数和运行时长创建对应的进程列表。
  17. 根据权利要求16所述的进程控制装置,其中,所述创建子模块具体用于:
    根据所述运行次数和运行时长计算对应运行进程在所述历史时段内的运行频率;
    根据所述运行频率对所述运行进程组中的运行进程进行排序;
    根据排序后的运行进程组创建对应的进程列表。
  18. 根据权利要求16所述的进程控制装置,其中,所述划分子模块具体用于:
    将属于同一预设位置区域内的运行地点对应的运行进程归为一组;
    所述确定模块具体用于:确定所述当前位置所属的预设位置区域;获取确定的所述预设位置区域对应的进程列表,作为目标进程列表。
  19. 一种存储介质,其中,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行权利要求1所述的进程控制方法。
  20. 一种电子设备,其包括处理器和存储器,所述处理器与所述存储器电性连接,所述存储器用于存储指令和数据,所述处理器用于调用所述存储指令以执行权利要求1所述的进程控制方法。
PCT/CN2018/094219 2017-07-31 2018-07-03 进程控制方法、装置、存储介质以及电子设备 Ceased WO2019024640A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710643266.1A CN107463436B (zh) 2017-07-31 2017-07-31 进程控制方法、装置、存储介质以及电子设备
CN201710643266.1 2017-07-31

Publications (1)

Publication Number Publication Date
WO2019024640A1 true WO2019024640A1 (zh) 2019-02-07

Family

ID=60548195

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/094219 Ceased WO2019024640A1 (zh) 2017-07-31 2018-07-03 进程控制方法、装置、存储介质以及电子设备

Country Status (2)

Country Link
CN (1) CN107463436B (zh)
WO (1) WO2019024640A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463436B (zh) * 2017-07-31 2019-12-10 Oppo广东移动通信有限公司 进程控制方法、装置、存储介质以及电子设备
CN109992397A (zh) * 2017-12-29 2019-07-09 广东欧珀移动通信有限公司 进程处理方法和装置、电子设备、计算机可读存储介质
CN110032321B (zh) * 2018-01-12 2024-02-20 Oppo广东移动通信有限公司 应用程序处理方法和装置、电子设备、计算机可读存储介质
CN109117256A (zh) * 2018-07-12 2019-01-01 维沃移动通信有限公司 一种后台应用程序的管理方法及终端
CN109324883A (zh) * 2018-08-29 2019-02-12 烽火通信科技股份有限公司 智能终端设备的内存管理方法及系统
CN109445567B (zh) * 2018-09-30 2021-11-16 联想(北京)有限公司 信息处理方法和电子设备
CN110704187B (zh) * 2019-09-25 2024-10-01 深圳传音控股股份有限公司 系统资源的调整方法、装置及可读存储介质
CN111651261B (zh) * 2020-07-07 2023-04-07 Oppo(重庆)智能科技有限公司 进程管理方法、装置、终端设备及计算机可读存储介质
CN117149362B (zh) * 2023-04-06 2024-07-16 荣耀终端有限公司 进程管控方法及相关装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010094295A1 (de) * 2009-02-17 2010-08-26 Siemens Aktiengesellschaft Verfahren und vorrichtung zur anpassung der prozessorauslastung in einem automatisierungssystem
CN102479108A (zh) * 2010-11-26 2012-05-30 中国科学院声学研究所 一种多应用进程的嵌入式系统终端资源管理系统及方法
CN102622290A (zh) * 2012-03-07 2012-08-01 苏州阔地网络科技有限公司 一种进程监控的方法及系统
CN103838630A (zh) * 2014-03-03 2014-06-04 联想(北京)有限公司 信息处理方法、系统及电子设备
CN104991816A (zh) * 2015-06-25 2015-10-21 浪潮(北京)电子信息产业有限公司 一种进程调度方法及装置
CN107463436A (zh) * 2017-07-31 2017-12-12 广东欧珀移动通信有限公司 进程控制方法、装置、存储介质以及电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010094295A1 (de) * 2009-02-17 2010-08-26 Siemens Aktiengesellschaft Verfahren und vorrichtung zur anpassung der prozessorauslastung in einem automatisierungssystem
CN102479108A (zh) * 2010-11-26 2012-05-30 中国科学院声学研究所 一种多应用进程的嵌入式系统终端资源管理系统及方法
CN102622290A (zh) * 2012-03-07 2012-08-01 苏州阔地网络科技有限公司 一种进程监控的方法及系统
CN103838630A (zh) * 2014-03-03 2014-06-04 联想(北京)有限公司 信息处理方法、系统及电子设备
CN104991816A (zh) * 2015-06-25 2015-10-21 浪潮(北京)电子信息产业有限公司 一种进程调度方法及装置
CN107463436A (zh) * 2017-07-31 2017-12-12 广东欧珀移动通信有限公司 进程控制方法、装置、存储介质以及电子设备

Also Published As

Publication number Publication date
CN107463436B (zh) 2019-12-10
CN107463436A (zh) 2017-12-12

Similar Documents

Publication Publication Date Title
WO2019024640A1 (zh) 进程控制方法、装置、存储介质以及电子设备
EP3514684B1 (en) Memory recovery method and apparatus
CN107463403B (zh) 进程控制方法、装置、存储介质以及电子设备
CN107241784B (zh) 物联网接入的方法及装置
US12587935B2 (en) Terminal behavior triggering method and terminal
CN107800651A (zh) 应用程序关闭方法、装置、存储介质和电子设备
WO2015085928A1 (en) Method and device for message pushing management cross-reference to related applications
JP2017507394A (ja) サイドメニュー表示方法、装置及び端末
CN103823626B (zh) 显示内容调节方法、装置和电子设备
CN107302633B (zh) 应用控制方法、装置、存储介质以及电子设备
CN108984066B (zh) 一种应用程序图标显示方法及移动终端
WO2019024641A1 (zh) 数据同步方法、装置、存储介质以及电子设备
CN110008008A (zh) 应用程序处理方法和装置、电子设备、计算机可读存储介质
JP7272694B2 (ja) 端末の電力消費を低減するための方法、および端末
CN102890628A (zh) 目标对象的显示方法和装置
US11150913B2 (en) Method, device, and terminal for accelerating startup of application
WO2014166266A1 (en) File scanning method and system, client and server
US11082806B2 (en) Method of identifying user location, storage medium and electronic device
CN107302591A (zh) 数据同步方法、装置、存储介质以及电子设备
CN107832131A (zh) 应用程序关闭方法、装置、存储介质和电子设备
WO2018036337A1 (zh) 卸载界面的显示方法及装置
CN107423123A (zh) 任务调度方法、装置、存储介质及电子设备
CN108924357A (zh) 一种调整终端桌面显示的方法、装置及终端
CN109451295A (zh) 一种获取虚拟信息的方法和系统
JP2018032425A (ja) サイドメニュー表示方法、装置及び端末

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18841103

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18841103

Country of ref document: EP

Kind code of ref document: A1