CN103197962B - Multi-process state switching method and device - Google Patents

Multi-process state switching method and device Download PDF

Info

Publication number
CN103197962B
CN103197962B CN201210001131.2A CN201210001131A CN103197962B CN 103197962 B CN103197962 B CN 103197962B CN 201210001131 A CN201210001131 A CN 201210001131A CN 103197962 B CN103197962 B CN 103197962B
Authority
CN
China
Prior art keywords
group
status information
statuss
state
current
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
CN201210001131.2A
Other languages
Chinese (zh)
Other versions
CN103197962A (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.)
China Mobile Communications Group Co Ltd
Original Assignee
China Mobile Communications Group Co 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 China Mobile Communications Group Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201210001131.2A priority Critical patent/CN103197962B/en
Publication of CN103197962A publication Critical patent/CN103197962A/en
Application granted granted Critical
Publication of CN103197962B publication Critical patent/CN103197962B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a multi-process state switching method and device. The method comprises the steps as follows: running a current process with process state information stored in current process state set, wherein the process state information of the current process is stored in current cache; when switching from the current process state set to a target process state set, storing the process state information in the current process state set into a flash memory and clearing the current cache; and recovering process state information in the target process state set to the current cache and running a target process with the process state information stored in the target process state set. According to the method and the device, applications corresponding to multiple process states can be smoothly switched in the process states by a user; and the currently-used process state set runs in a system cache and the temporarily-unused process state set is stored in the flash memory for switching at any time, so that the storage space is reasonably utilized and the system cache space is saved.

Description

Multi-process state switching method and device
Technical field
The present invention relates to mobile terminal technology in the communications field, in particular it relates to mobile terminal multi-process state switching side Method and device.
Background technology
With the progressively development of mobile terminal, the performance of mobile terminal operating system also progressively powerful, function also by Step is perfect.Support the synchronous operation of multiple applications, and the direct switching of application has become the main flow of mobile terminal operating system Trend.The multi-process state that the systems such as Google Android, Fructus Mali pumilae iOS all successively support application is run and is switched, that is, remove one Outside the application of front stage operation, can also there is multiple application simultaneously in running background it is possible to enter multi-process condition managing circle Face, is switched fast by selecting the application in being currently running.
Conventional technique scheme is the switching between allowing arbitrarily to be applied in the range of internal memory allows at present, some limits Determine the quantity of process statuss, some do not limit but only retain the application being waken up in a period of time.Technique scheme Although simple, there is also some problems:As worked as the application running excessively, or application needs using larger memory headroom When, very big impact can be brought on the operating system performance of mobile terminal, power consumption, what meeting was apparent has influence on experience.For The not high application of usage frequency in a period of time, takies Installed System Memory due to long-time, also can cause resource wave to a certain extent Take, affect systematic function.
Content of the invention
The purpose of the present invention is to run the more defect affecting greatly to systematic function for application in prior art, A kind of multi-process state switching method and device are proposed.
For achieving the above object, according to an aspect of the invention, it is provided a kind of multi-process state switching method.
Multi-process state switching method according to embodiments of the present invention, including:
Run the current process that its process status information is stored in current process state group, the process statuss of current process Information Store is in current cache;
From current process state group switch to target process state group when, by current process state group process statuss letter Breath storage is in flash memory, and empties current cache;
Process status information in target process state group is recovered to current cache, and runs its process status information to deposit Target process in target process state group for the storage.
In technique scheme, method also includes:The process status information of each process is distributed in multiple process statuss Store in group.
In technique scheme, when recovering the process status information in target process state group, if its process shape The usage frequency of process in target process state group for the state information Store is high, then actively start this process.
In technique scheme, when recovering the process status information in target process state group, if its process shape The usage frequency of process in target process state group for the state information Store is low, then close this process.
In technique scheme, method also includes:Start new process, the process status information of this new process is divided Fit over storage in existing process statuss group.
In technique scheme, method also includes:Increase new process statuss group, by the process statuss letter of corresponding process Breath distribution stores in this new process statuss group.
For achieving the above object, according to another aspect of the present invention, there is provided a kind of multi-process state switching device.
Multi-process state switching device according to embodiments of the present invention, including:
Process runs module, for running the current process that its process status information is stored in current process state group, The process status information of current process is stored in current cache, and runs its process status information and be stored in target process state Target process in group;
Storage empties module, during for switching to target process state group from current process state group, by current process shape Process status information in state group stores in flash memory, and empties current cache;
Recovering state module, for recovering the process status information in target process state group to current cache.
In technique scheme, device also includes:
State assignment module, for storing the process status information distribution of each process in multiple process statuss groups.
In technique scheme, device also includes:Process frequency judge module, for recovering target process state group During interior process status information, judge that its process status information is stored in the usage frequency of the process in target process state group, And will determine that result is sent out and process operation module;
Process runs module, is additionally operable to run its process status information according to the judged result of process frequency judge module and deposits Process in target process state group for the storage:
If the usage frequency that its process status information is stored in the process in target process state group is high, actively start This process;
If the usage frequency that its process status information is stored in the process in target process state group is low, closes this and enter Journey.
In technique scheme, device also includes:Process runs module, is additionally operable to start new process;
State assignment module, is additionally operable to distribute the process status information of this new process in existing process statuss group Storage.
In technique scheme, device also includes:Group increases module, for increasing new process statuss group;
State assignment module, is additionally operable to deposit the process status information distribution of corresponding process in this new process statuss group Storage.
Each course allocation is existed by the multi-process state switching method of the present invention and device according to use state, using scene Run in multiple process statuss groups;User (can include use state, use scene) in multiple process statuss groups as needed Between switch, it is possible to use family is realized the smooth of its application corresponding with process statuss in multiple process statuss and is switched, ought The process statuss group of front use is placed in system cache and runs, the process statuss group that wouldn't use is placed in flash memory storage in case Switch at any time, reasonably make use of memory space, save the spatial cache of system, reduce system power dissipation, improve system Work efficiency.
Other features and advantages of the present invention will illustrate in the following description, and, partly become from description Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by the explanations write In book, claims and accompanying drawing, specifically noted structure is realizing and to obtain.
Below by drawings and Examples, technical scheme is described in further detail.
Brief description
Accompanying drawing is used for providing a further understanding of the present invention, and constitutes a part for description, the reality with the present invention Apply example and be used for explaining the present invention together, be not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the view that the present invention initially only has default process state group;
Fig. 2 sets up schematic diagram for multi-process state group of the present invention;
Fig. 3 is multi-process state group switching flow schematic diagram of the present invention;
Fig. 4 switches to the data flow diagram of process statuss group 2 for the present invention from process statuss group 1.
Specific embodiment
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are illustrated it will be appreciated that preferred reality described herein Apply example to be merely to illustrate and explain the present invention, be not intended to limit the present invention.
Process statuss group is the process statuss letter of the one or more each process run in the internal memory of mobile terminal of storage The packet of breath, to carry out whole group operation.The present invention by substantial amounts of process statuss according to use environment, be divided into using scene multiple Process statuss group stores, and process statuss group is run in the caching of mobile terminal.The quantity of concrete process statuss group, each process The process status information which process is state group store freely is set by user.
First, in the case that user does not carry out any setting, give tacit consent to the process statuss group that the process being currently up is called For " default process state group ", can have in the case that system memory space allows belong to default process state group multiple enter Journey is being run;When insufficient space occurs, user is pointed out to discharge the associated process of the application of maximum duration never call.
It should be noted that process is the concept of a computer bottom, and applying is user when using mobile terminal Faced by application program, an application may corresponding one or more processes;Wherein, process status information is according to process statuss group Use state be stored in caching and/or flash memory in, and process according only to caching in process status information start in internal memory, Run or kill.
Then, user can add new process statuss group as needed, such as using scene, use classes etc., and by phase The process status information closing application stores in new process statuss group.When there is multiple process statuss group, user can root Switch to corresponding process statuss group according to currently used scene, mobile terminal only run in current process state group whole enter Journey state.When user need to switch to another scene, the process status information such as currently used state, use environment is deposited packaged Store up to flash memory, current caching is emptied simultaneously, then by processes such as the use state of target process state group, use environments Status information recovers to realize the batch switching of the many scenes of multi-process state to the caching of system.
Embodiment of the method
According to embodiments of the present invention, there is provided a kind of multi-process state switching method.The present embodiment is with process statuss group 1 As a example switching between two process statuss groups of (work) and process statuss group 2 (leisure), the present invention will be described:
As shown in Figure 1-2, when the initially use mobile terminal of user, the process of the current application of all operations of system default In " default process state group ", the process of multiple applications can be had to transport in internal memory in the case that system memory space allows OK;When the situation of memory headroom deficiency occurs, user is pointed out to discharge the correlation of the application of maximum duration never call in internal memory Process.User can add new process statuss group as needed, such as using scene, use classes etc., and by related application Process status information is pulled in new process statuss group, thus forming multiple process statuss groups.The title of process statuss group can To carry out renaming, the process status information of the associated process of each application can only arrange it and belong in a process statuss group, Not reproducible.
As shown in figure 3, setting through user in process statuss Groups List, there are multiple process statuss groups.Assume current process Deposit in state group 1 (work) is and the related application of work, such as mailbox, document reader, calendar etc.;Process statuss group 2 Deposit in (leisure) is the application related to amusement and leisure, such as the game in various mobile terminals.Active user is in work In scene, the application such as mailbox, document reader, calendar is all activated, if now user place scene is changed into amusement and recreation, Select " process statuss group 2 (leisure) " in process statuss Groups List, then system will be stored in the process statuss group 1 in caching The process status information such as whole current scene of (work), current state are stored in flash memory, terminate all and process shape in internal memory The corresponding process of process status information that state group 1 (work) stores, is stored in the process statuss group 2 in flash memory before last time is switched The process status information of (leisure) recovers in cache, and starts it according to the process status information of process statuss group 2 (leisure) and enters Journey status information is stored in the process of process statuss group 2 (leisure), and the mobile terminal of user integrally switches to joy by mode of operation Happy leisure patterns.
Table 1 is the content that process status information taking mailbox application as a example includes.
Table 1
As shown in figure 4, the caching of system is only loaded into the process status information of a process statuss group every time, needing process During scene switching, the process status information in original process statuss group is erased.When be connected to by process statuss group 1 switch to into During the instruction of journey state group 2, system will be stored in process statuss group 1 correlation in the current process status list caching first The current state information uniform packing of process status information and application preserves to system flash, then by process statuss list The process statuss of middle process statuss group 1 correlation kill, by caching associated memory resources release, simultaneously in internal memory with process shape The corresponding process of process status information of state group 1 storage is closed;Then the process statuss group 2 taken out from flash memory is packed storage Process status information be loaded into, each process corresponding with the process status information in process statuss group 2 bring into operation in internal memory, Each state of a process is consistent with each process statuss closing process statuss group 2 before;Related application corresponding with this process Start to start, and be loaded into the state of each application when closing process statuss group 2 before.
Above-mentioned process statuss group 2 is switched to by process statuss group 1 during, if its process status information is stored in Process A usage frequency in process statuss group 2 is high, then actively start this process, so that the corresponding application of this process is behaved; If the process B usage frequency that its process status information is stored in process statuss group 2 is low, the process statuss of process B are entered certainly Delete in journey status list, it is to avoid the startup of process B;Save the cache resources space of system, reduce system power dissipation.
In the diagram, in flash memory, the process status information of in store multiple process statuss groups and last time are respectively applied when closing Status information.When being connected to the instruction that process statuss group 1 switches to process statuss group 2, system is first by process in flash memory The state information updating of the process status information of state group 1 and application corresponding with this process status information is current state, then The associated storage bag of process statuss group 2 in flash memory is taken out, the process status information of this storage bag storage process state group 2 and upper The status information of each application corresponding with process statuss group 2 during secondary closing.Now, system is by the process statuss group 1 in caching Associated process state kills, and when the process status information of process statuss group 2 that flash memory is provided and last time close with process shape The status information of the corresponding each application of state group 2 is loaded into, thus completing the switching of multi-process state.
It should be noted that in the above-mentioned process status information by process statuss group 1 and corresponding with this process status information The state information updating of application is that the main cause of current state is, because the flash memory not current process shape running of real time record State group state, but when carrying out the switching of process statuss group 1 and process statuss group 2, carry out the read-write of related data.That is, when When process statuss group 1 related application is run in the buffer, flash memory not real-time update process statuss group 1 phase in a flash memory Off status record, so when needing to switch to process statuss group 2, need the process in a flash memory by process statuss group 1 State recording is updated.
The multi-process state switching method of the present invention, according to use state, using scene by each course allocation multiple enter Run in journey state group;User can (include use state, use scene) switching between multiple process statuss groups as needed, User can be made to realize the smooth switching of its application corresponding with process statuss in multiple process statuss, will be currently used Process statuss group is placed in system cache and runs, and the process statuss group that wouldn't use is placed in flash memory and stores in case cutting at any time Change, reasonably make use of memory space, save the spatial cache of system, reduce system power dissipation, improve the work of system Efficiency.
Device embodiment
According to embodiments of the present invention, there is provided a kind of multi-process state switching device.
The present embodiment includes:Process runs module, is stored in current process state group for running its process status information Interior current process, the process status information of current process is stored in current cache, and runs the storage of its process status information Target process in target process state group;
Storage empties module, during for switching to target process state group from current process state group, by current process shape Process status information in state group stores in flash memory, and empties current cache;
Recovering state module, for recovering the process status information in target process state group to current cache.
This device also includes:
State assignment module, for storing the process status information distribution of each process in multiple process statuss groups.
This device also includes:
Process frequency judge module, for when recovering the process status information in target process state group, judging that it enters Journey status information is stored in the usage frequency of the process in described target process state group, and will determine that result is sent out and described process Run module;
Process runs module, is additionally operable to run its process status information according to the judged result of process frequency judge module and deposits Process in target process state group for the storage:
If the usage frequency that its process status information is stored in the process in target process state group is high, actively start This process;
If the usage frequency that its process status information is stored in the process in target process state group is low, closes this and enter Journey.
Wherein:
Process runs module, is additionally operable to start new process;
State assignment module, is additionally operable to distribute the process status information of this new process in existing process statuss group Storage.
This device also includes:
Group increases module, for increasing new process statuss group;
State assignment module, is additionally operable to deposit the process status information distribution of corresponding process in this new process statuss group Storage.
The multi-process state switching device of the present invention, according to use state, using scene by each course allocation multiple enter Run in journey state group;User can (include use state, use scene) switching between multiple process statuss groups as needed, User can be made to realize the smooth switching of its application corresponding with process statuss in multiple process statuss, will be currently used Process statuss group is placed in system cache and runs, and the process statuss group that wouldn't use is placed in flash memory and stores in case cutting at any time Change, reasonably make use of memory space, save the spatial cache of system, reduce system power dissipation, improve the work of system Efficiency.
One of ordinary skill in the art will appreciate that:The all or part of step realizing said method embodiment can be passed through Completing, aforesaid program can be stored in a computer read/write memory medium the related hardware of programmed instruction, this program Upon execution, execute the step including said method embodiment;And aforesaid storage medium includes:ROM, RAM, magnetic disc or light Disk etc. is various can be with the medium of store program codes.
Finally it should be noted that:The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, Although being described in detail to the present invention with reference to the foregoing embodiments, for a person skilled in the art, it still may be used To modify to the technical scheme described in foregoing embodiments, or equivalent is carried out to wherein some technical characteristics. All any modification, equivalent substitution and improvement within the spirit and principles in the present invention, made etc., should be included in the present invention's Within protection domain.

Claims (11)

1. a kind of multi-process state switching method is it is characterised in that include:
Run the current process that its process status information is stored in current process state group, the process statuss of described current process Information Store is in current cache;
From current process state group switch to target process state group when, the process status information in current process state group is deposited Store up in flash memory, and empty current cache;
Process status information in described target process state group is recovered to current cache, and runs its process status information to deposit Target process in described target process state group for the storage;
Described process statuss group is the process statuss letter of the one or more each process run in the internal memory of mobile terminal of storage The packet of breath, comprises the process of multiple application programs in described process statuss group.
2. method according to claim 1 is it is characterised in that also include:The process status information of each process is distributed Store in multiple process statuss groups.
3. method according to claim 1 it is characterised in that recover target process state group in process status information When, if the usage frequency that its process status information is stored in the process in described target process state group is high, actively start This process.
4. method according to claim 1 it is characterised in that recover target process state group in process status information When, if the usage frequency that its process status information is stored in the process in described target process state group is low, closes this and enter Journey.
5. the method according to any one in claim 1-4 is it is characterised in that also include:Start new process, should The process status information distribution of new process stores in existing process statuss group.
6. the method according to any one in claim 1-4 is it is characterised in that also include:Increase new process statuss Group, the process status information distribution of corresponding process is stored in this new process statuss group.
7. a kind of multi-process state switching device is it is characterised in that include:
Process runs module, for running the current process that its process status information is stored in current process state group, described The process status information of current process is stored in current cache, and runs its process status information and be stored in target process state Target process in group;
Storage empties module, during for switching to target process state group from current process state group, by current process state group Interior process status information stores in flash memory, and empties current cache;
Recovering state module, for recovering the process status information in described target process state group to current cache;
Described process statuss group is the process statuss letter of the one or more each process run in the internal memory of mobile terminal of storage The packet of breath, comprises the process of multiple application programs in described process statuss group.
8. device according to claim 7 is it is characterised in that also include:
State assignment module, for storing the process status information distribution of each process in multiple process statuss groups.
9. device according to claim 7 is it is characterised in that also include:
Process frequency judge module, for when recovering the process status information in target process state group, judging its process shape The usage frequency of process in described target process state group for the state information Store, and will determine that result is sent out and the operation of described process Module;
Process runs module, is additionally operable to run its process status information according to the judged result of described process frequency judge module and deposits Process in described target process state group for the storage:
If the usage frequency that its process status information is stored in the process in described target process state group is high, actively start This process;
If the usage frequency that its process status information is stored in the process in described target process state group is low, closes this and enter Journey.
10. device according to claim 8 it is characterised in that
Process runs module, is additionally operable to start new process;
State assignment module, is additionally operable to deposit the process status information distribution of this new process in existing process statuss group Storage.
11. devices according to claim 8 are it is characterised in that also include:
Group increases module, for increasing new process statuss group;
State assignment module, is additionally operable to store the process status information distribution of corresponding process in this new process statuss group.
CN201210001131.2A 2012-01-04 2012-01-04 Multi-process state switching method and device Active CN103197962B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210001131.2A CN103197962B (en) 2012-01-04 2012-01-04 Multi-process state switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210001131.2A CN103197962B (en) 2012-01-04 2012-01-04 Multi-process state switching method and device

Publications (2)

Publication Number Publication Date
CN103197962A CN103197962A (en) 2013-07-10
CN103197962B true CN103197962B (en) 2017-02-08

Family

ID=48720552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210001131.2A Active CN103197962B (en) 2012-01-04 2012-01-04 Multi-process state switching method and device

Country Status (1)

Country Link
CN (1) CN103197962B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10055350B2 (en) * 2014-05-06 2018-08-21 Google Llc Controlled cache injection of incoming data
CN105204926B (en) * 2015-09-02 2020-06-02 Tcl移动通信科技(宁波)有限公司 Mobile terminal and multi-background program operation control method and system thereof
US10209851B2 (en) * 2015-09-18 2019-02-19 Google Llc Management of inactive windows
CN108228335A (en) * 2016-12-21 2018-06-29 阿里巴巴集团控股有限公司 A kind of software running method, device, system and electronic equipment
CN112988243B (en) * 2019-12-02 2022-12-27 中国移动通信集团浙江有限公司 Equipment switching method and device and computing equipment
CN111177805B (en) * 2019-12-12 2023-10-03 海光信息技术股份有限公司 Method and device for improving operation safety of processor and CPU chip
CN117311994B (en) * 2023-11-28 2024-02-23 苏州元脑智能科技有限公司 Processing core isolation method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801096A (en) * 2005-01-05 2006-07-12 国际商业机器公司 Method and system for implementing thread sleep in computer system
CN101222709A (en) * 2008-01-22 2008-07-16 中兴通讯股份有限公司 Fast starting method of mobile phone application program
CN102163161A (en) * 2011-04-01 2011-08-24 奇智软件(北京)有限公司 Process management method and device thereof
CN102253863A (en) * 2011-06-15 2011-11-23 奇智软件(北京)有限公司 Method for closing processes

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1801096A (en) * 2005-01-05 2006-07-12 国际商业机器公司 Method and system for implementing thread sleep in computer system
CN101222709A (en) * 2008-01-22 2008-07-16 中兴通讯股份有限公司 Fast starting method of mobile phone application program
CN102163161A (en) * 2011-04-01 2011-08-24 奇智软件(北京)有限公司 Process management method and device thereof
CN102253863A (en) * 2011-06-15 2011-11-23 奇智软件(北京)有限公司 Method for closing processes

Also Published As

Publication number Publication date
CN103197962A (en) 2013-07-10

Similar Documents

Publication Publication Date Title
CN103197962B (en) Multi-process state switching method and device
CN103810020B (en) Virtual machine elastic telescopic method and device
CN102750174B (en) file loading method and device
CN108712454B (en) File processing method, device and equipment
CN101477491B (en) Method and apparatus for function running state statistics
CN106325758B (en) A kind of queue storage space management method and device
CN107291883A (en) The Snapshot Method and device of a kind of distributed memory system
CN106201683A (en) A kind of manage the method for application, device and terminal
CN105516787B (en) The storage controlling method and device of application cache data
KR20060129873A (en) Method for executing garbage collection of mobile terminal
CN106959893A (en) Accelerator, EMS memory management process and data handling system for accelerator
CN104798063A (en) Memory device and host device
CN109508301A (en) Terminal, using the processing method of data, data processing equipment and storage medium
CN102141926A (en) Application program management method, device and digital television set top box
CN104899049A (en) File deletion method and device
CN109656515A (en) Operating method, device and the storage medium of queue message
CN113778662A (en) Memory recovery method and device
CN102122284B (en) Compound document storage and read-write method and compound document storage and read-write device
CN100580669C (en) Method for realizing cache memory relates to file allocation table on Flash storage medium
CN106254270A (en) A kind of queue management method and device
CN107368235A (en) The multitask switching method and function machine of function machine
CN102520879B (en) Priority-based file information storage method, device and system
CN109558187A (en) A kind of user interface rendering method and device
CN107329695A (en) A kind of distributed storage EMS memory management process, system and computer-readable storage medium
US8281091B2 (en) Automatic selection of storage volumes in a data storage system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant