CN104503828B - A kind of process management method and terminal - Google Patents

A kind of process management method and terminal Download PDF

Info

Publication number
CN104503828B
CN104503828B CN201410779136.7A CN201410779136A CN104503828B CN 104503828 B CN104503828 B CN 104503828B CN 201410779136 A CN201410779136 A CN 201410779136A CN 104503828 B CN104503828 B CN 104503828B
Authority
CN
China
Prior art keywords
resident
terminal
target
managing
binding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201410779136.7A
Other languages
Chinese (zh)
Other versions
CN104503828A (en
Inventor
张俊
帅朝春
张寅祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201410779136.7A priority Critical patent/CN104503828B/en
Publication of CN104503828A publication Critical patent/CN104503828A/en
Application granted granted Critical
Publication of CN104503828B publication Critical patent/CN104503828B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a kind of process management method and terminals, wherein the process management method includes: target end process, to discharge the terminal memory source that the target process occupies;The identification information for obtaining the target process, according to target process described in the identification information judgment of the target process whether be preset resident managing process binding process;If so, restarting the target process.Using the partial memory resource of releasable terminal of the invention, and save the terminal memory source of Resident Process occupancy.

Description

A kind of process management method and terminal
Technical field
The present invention relates to field of communication technology more particularly to a kind of process management method and terminals.
Background technique
With the continuous development of the communication technology, the function of mobile terminal is increasingly rich, and runs application on mobile terminals Also more and more, the use of the memory source of mobile terminal, which seems, to become more and more important.Mobile terminal usually needs in use Certain processes are resided with monitor terminal operating status and are promptly responded, such as alarm clock process, if closing, alarm clock is arrived Timing instant would not be rung.But Resident Process occupies always mobile phone EMS memory and is hardly recovered, for a long time with mobile terminal Use, Resident Process can more and more, and the memory of Resident Process occupancy can be increased due to fragmentation, reside into The memory source of Cheng Zhanyong is more and more, this makes the speed of service of mobile terminal slower and slower, card machine occurs, reports an error or without sound The case where answering.In addition, the priority-level due to Resident Process is high, will not generally it be moved to end, when terminal memory source is lower than one When determining degree, terminal will usually select to terminate foreground process, seriously affect user experience.
Summary of the invention
The embodiment of the invention provides a kind of Resident Process management method and terminals, can reduce the memory source of Resident Process It occupies, and the memory source for occupying the Resident Process in terminal in addition to resident managing process easily recycles, and keeps it can be certainly The characteristics of dynamic starting, improve user experience.
The embodiment of the invention provides a kind of process management methods, which comprises
Target end process, to discharge the terminal memory source that the target process occupies;
The identification information for obtaining the target process, according to target process described in the identification information judgment of the target process Whether be preset resident managing process binding process;
If so, restarting the target process.
Correspondingly, the embodiment of the invention provides a kind of terminal, the terminal includes:
End unit is used for target end process, to discharge the terminal memory source that the target process occupies;
Acquiring unit, for obtaining the identification information of the target process;
Whether judging unit is preset normal for the target process according to the identification information judgment of the target process In the binding process of managing process;
Start unit judges the target process for the binding process of the resident managing process for the judging unit When, restart the target process.
The embodiment of the present invention can target end process may be used also with discharging the terminal memory source that the target process occupies Whether the identification information for obtaining the target process is pre- according to target process described in the identification information judgment of the target process If resident managing process binding process, and then judge the target process be preset resident managing process binding into The target process is restarted when journey, the target process is made to restPose, and releasable portion terminal memory source subtracts The memory source that Resident Process occupies in few terminal, and occupy other Resident Process in terminal in addition to resident managing process Memory source be easy recycling, and keep other Resident Process can self-starting the characteristics of, improve user experience.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of process management method flow diagram provided in an embodiment of the present invention;
Fig. 2 is another process management method flow diagram provided in an embodiment of the present invention;
Fig. 3 is another process management method flow diagram provided in an embodiment of the present invention;
Fig. 4 is a kind of terminal structure schematic diagram provided in an embodiment of the present invention;
Fig. 5 is one schematic diagram of structure of end unit provided in an embodiment of the present invention;
Fig. 6 is two schematic diagram of structure of end unit provided in an embodiment of the present invention;
Fig. 7 is the process relation schematic diagram in terminal provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
In the specific implementation, the terminal mentioned in the embodiment of the present invention includes but is not limited to: smart phone (such as Android Mobile phone, IOS mobile phone), tablet computer, laptop, palm PC, the electronic equipments such as wearable intelligent equipment.
A kind of process management method provided in an embodiment of the present invention and terminal are carried out below in conjunction with Fig. 1 to Fig. 7 specific Description.
It is a kind of process management method flow diagram provided in an embodiment of the present invention, process as shown in the figure referring to Fig. 1 Management method can comprise the following steps that
S101, target end process, to discharge the terminal memory source that the target process occupies.
In the specific implementation, process refers to the application program being currently running in the terminal.The memory of multiple process shared terminals Resource, when the not used free memory resource value of terminal is lower than to a certain degree, the speed of service of terminal can be slower and slower, occurs Card machine, report an error or without response the case where.Terminal would generally provide application manager to user management process, when terminal is blocked Machine or without response the case where when, user can enter application manager select target end process, be accounted for discharging target process Terminal memory source.
It should be noted that target process mentioned by the present invention is preset Resident Process, Resident Process when terminal is dispatched from the factory Refer to that long-term occupied terminal memory source provides the process of service, residence characteristics are embodied in: priority-level is especially high, leads to Chang Buhui is moved to end, and can be started automatically immediately being moved to end.In the present embodiment, in order to keep target process occupied Memory source is easy recycling, needs to allow it to become common process the priority-level for reducing target process in advance, can just make terminal It can terminate or maintain the target process according to the service condition of memory source.
S102 obtains the identification information of the target process, according to mesh described in the identification information judgment of the target process Mark process is the binding process of preset resident managing process.
In the specific implementation, needing that the Resident Process specified in terminal is set as resident managing process in advance, by its in terminal His Resident Process is set as the binding process of the resident managing process.Specifically, terminal can obtain target process in advance Identification information, then registering the identification information of the target process with target process described in remarks in resident managing process is The binding process of the resident managing process.Such as a binding relationship chained list is created in resident managing process, wherein recording All identification informations with the process that the resident managing process is binding relationship, one of identification information is target process Identification information.After terminal target end process, the identification information of the target process is obtained first, according to the mark of the target process Information judges whether it is the binding process of the resident managing process, if performing the next step rapid S103, otherwise, keeps the mesh The end state of mark process.
The identification information storage of the target process is in the application configuration file of target process, the number usually applied Signature, or other contents to the unique identities of identification process, such as the operating system that terminal uses is Android When system, the identification information can be in<manifest>in AndroidManifest.xml file in application configuration file The content of android:process in the content of android:sharedUserId or<application>.
It should be noted that resident managing process preset in the present embodiment is unique Resident Process in terminal, and The Resident Process of binding process as resident managing process, need to reduce its priority-level in advance and allow makes to lose residence characteristics, To allow the present embodiment to execute step S101.
S103 restarts the target process.
The target process being moved to end in step S101 restarting can be made to continue offer service after executing this step, make mesh Mark process has the characteristics that Resident Process can start automatically immediately.
In an alternative embodiment, in method shown in Fig. 1, step S101 target end process is executed, described in release Before the terminal memory source that target process occupies, following steps can be performed:
11) Resident Process specified in the terminal, is set as the resident managing process, by other in the terminal Resident Process be set as the binding process of the resident managing process.
12) priority-level of the binding process of the resident managing process, is modified, so that the resident managing process The priority-level of binding process is lower than the foreground process in the terminal.
The residence characteristics of Resident Process in terminal are mainly reflected in: the priority-level of Resident Process is higher than its in terminal His process, therefore Resident Process will not be generally moved to end, and can be opened automatically immediately in the case where terminal is opened being moved to end It is dynamic.In the present embodiment, pass through step 11)~12), the process in terminal provided in an embodiment of the present invention as shown in Figure 7 is closed It is schematic diagram, residing managing process becomes unique Resident Process in terminal, therefore reduces what Resident Process in terminal occupied Terminal memory source, and other Resident Process lose it and reside because of its priority-level is fallen below foreground process Characteristic, the state or original is terminated by step S101 that the startup function that the manual selection target process of user can be allowed to provide switchs This target process as Resident Process, to discharge the partial memory resource of terminal, and again further through step S102 and S103 The characteristics of starting target process makes it remain able to self-starting.It should be noted that resident managing process in the present embodiment Binding process depends on resident managing process to exist, i.e., when the starting of resident managing process comes into force, the binding process can just be opened It is dynamic to come into force.
In another alternative embodiment, in method shown in Fig. 1, execute step S103 restart the target into Before journey, following steps can be performed:
21) state of the startup function switch of presently described target process, the state packet of the startup function switch, are obtained It includes: open state or off status.
In the specific implementation, terminal can provide the startup function switch of target process for user, therefore user can pass through starting Functional switch manually selects starting or target end process, wherein the corresponding starting target of the open state of startup function switch into The off status of journey, the startup function switch corresponds to target end process.The state of target process startup function switch can be made Judge whether to need the reference conditions for starting the target process automatically for terminal, such as terminal opening target process before being turned off Dynamic functional switch is set on state, and all processes include that target process is all moved to end in terminal after closing terminal, and terminal is again When starting, terminal detects just automatically starting process when the startup function switch of target process is open state.
22) whether the state for, judging the startup function switch is open state, if so, executing described in the restarting Target process step.
Optionally, if the state of startup function switch is off status, the end state of the target process, such mesh are maintained The occupied terminal memory source of mark process can release.
Pass through execute step 21)~22), if keep target process startup function switch be open state, the target into It can also be restarted immediately when journey is moved to end and user's offer service is provided, target process is enable to have Resident Process automatic The characteristics of starting;And if the state of startup function switch is off status, terminal target end process simultaneously maintains target process End state, the occupied terminal memory source of the target process can release.
The embodiment of the present invention obtains the identification information of the target process by target end process, and according to the mesh Target process described in the identification information judgment of mark process be preset resident managing process binding into when restart the mesh Mark process makes the target process restPose, releasable portion terminal memory source, reduces Resident Process in terminal and accounts for Memory source, and the memory source for occupying other Resident Process in terminal in addition to resident managing process is easy back Receive, and keep other Resident Process can self-starting the characteristics of, improve user experience.
Referring to fig. 2, be another process management method flow diagram provided in an embodiment of the present invention, it is as shown in the figure into Thread management method can comprise the following steps that
S201 detects that the memory use value of target process is greater than preset threshold.
In the specific implementation, due to the defect that program itself designs RAM leakage can occur in the process of running for certain processes Situation, which there is RAM leakage process, in these gradually to drain the memory source of terminal, therefore cannot create again in terminal new Process, and occur without response, card machine or the case where report an error.There is RAM leakage in process in order to prevent, can be to the process in terminal The threshold value of a default memory use value is led to when detecting the memory use value of target process greater than preset threshold to terminal Crossing to execute step S202~S205 and discharge the memory source for the terminal that the target process occupies and restart the target process makes It restPoses.
S202 terminates the target process, to discharge the terminal memory source that the target process occupies.
The residence characteristics of Resident Process in terminal are mainly reflected in: priority-level is especially high, will not generally be moved to end, It can the automatic starting immediately in the case where terminal is opened being moved to end.In the present embodiment, it needs to specify in terminal in advance Resident Process be set as the resident managing process, set the resident managing process for Resident Process other in terminal Binding process, and reduce the priority-level of the binding process of resident managing process, make its lose residence characteristics as with it is normal The common process of binding process is carried out in managing process.Therefore resident managing process becomes unique Resident Process in terminal, and Originally it can detect that the memory use value of target process is big in step S201 and S202 as the target process of Resident Process Terminate the process when preset threshold, the memory source for occupying it is easily recovered, and is made further through step S203~S206 Target process still have the characteristics that Resident Process after can be started automatically again.
S203 obtains the identification information of the target process, according to mesh described in the identification information judgment of the target process Mark process is the binding process of preset resident managing process.
S204 obtains the state of the startup function switch of presently described target process, the state of the startup function switch It include: open state or off status.
In the specific implementation, terminal can provide the startup function switch of target process for user, therefore user can pass through starting Functional switch manually selects starting or target end process, wherein the corresponding starting target of the open state of startup function switch into The off status of journey, the startup function switch corresponds to target end process.The state of target process startup function switch can be made Judge whether to need the reference conditions for starting the target process automatically for terminal, such as terminal opening target process before being turned off Dynamic functional switch is set on state, and all processes include that target process is all moved to end in terminal after closing terminal, and terminal is again When starting, terminal detects just automatically starting process when the startup function switch of target process is open state;If target into The journey state that startup function switchs before the end is off status, maintains the end state of the target process.
S205 judges the state of the startup function switch for open state.
S206 restarts the target process.
In the present embodiment, step S203 step S206 distinguishes step S102 and step in embodiment shown in Figure 1 S103, details are not described herein.
The embodiment of the present invention, detect target process memory use value be greater than preset threshold when, terminate the target into Then journey obtains the identification information of the target process, according to target process described in the identification information judgment of the target process For the binding process of preset resident managing process, and the startup function switch state of the target process when being open state again Start the target process, target process is made to restPose, releasable portion terminal memory source is reduced in terminal and resided The memory source that process occupies, and prevent the process in terminal from RAM leakage occur and the memory source of terminal is caused to be drained.
Another process management method flow diagram provided in an embodiment of the present invention referring to Fig. 3, it is as shown in the figure into Thread management method can comprise the following steps that
The Resident Process specified in the terminal is set as the resident managing process, by its in the terminal by S301 His Resident Process is set as the binding process of the resident managing process.
S302 modifies the priority-level of the binding process of the resident managing process, so that the resident managing process Binding process priority-level lower than the foreground process in the terminal.
In the specific implementation, the priority-level that the residence characteristics of the Resident Process in terminal are mainly reflected in Resident Process is special It is not high, it will not generally be moved to end, it can the automatic starting immediately in the case where terminal is opened being moved to end.In the present embodiment In, so that resident managing process is become unique Resident Process in terminal by step S301 and step S302, reduces in terminal The memory source that Resident Process occupies, and other Resident Process are because fallen below foreground process for its priority-level Its residence characteristics is lost, and becomes the binding process of resident managing process, reduces the terminal that Resident Process occupies in terminal Memory source.And it can be by step S303~S305 when the memory use value for detecting terminal is greater than preset threshold, by terminal Middle priority-level is determined as the target process lower than the process of foreground process, and terminates the target process, to discharge the mesh The terminal memory source that mark process occupies, can discharge the partial memory resource of terminal but also preferentially meet foreground process to memory The needs of resource protect foreground process not terminated suddenly.
S303 detects that the memory use value of terminal is greater than preset threshold.
In the specific implementation, when the not used free memory resource value of terminal is lower than to a certain degree, the speed of service of terminal Can it is slower and slower, there is card machine, report an error or without response the case where, occur above situation in order to prevent, an end can be preset End memory use value threshold value passes through when detecting the memory use value of terminal greater than preset threshold to terminal and executes step S302 and step S303 is to discharge the memory source of part terminal.
S304, the process by priority-level in the terminal lower than foreground process are determined as target process.
In terminal free memory resource lower than to a certain degree when influence terminal the speed of service, terminal need latter end into For journey to discharge partial memory resource, usual user is more concerned about the foreground process currently interacted with user, it is desirable to which terminal can be excellent First meet the use of foreground process memory source, in case foreground process is terminated suddenly and loses current foreground process and user's friendship Data caused by mutually, therefore preferential selection is terminated the process that priority-level is lower than foreground process by terminal, to protect foreground Process.
S305 terminates the target process, to discharge the terminal memory source that the target process occupies.
S306 obtains the identification information of the target process, according to mesh described in the identification information judgment of the target process Mark process is the binding process of preset resident managing process.
In the specific implementation, needing that the Resident Process specified in terminal is set as the resident managing process in advance, by terminal Middle others Resident Process is set as the binding process of the resident managing process, and modifies the binding process of resident managing process Priority-level so that the priority-level of the binding process of resident managing process is lower than the foreground process in terminal, therefore The binding process of resident managing process can be targeted process in step s 304.
S307 restarts the target process.
In the present embodiment, step S305 and step S307 distinguish step S101 and step in embodiment shown in Figure 1 S103, details are not described herein.
The embodiment of the present invention, when detecting that the memory use value of terminal is greater than preset threshold, by priority in the terminal Rank is determined as the target process lower than the process of foreground process, and then terminates the target process, then obtains the mesh The identification information of mark process, according to target process described in the identification information judgment of the target process be it is preset it is resident manage into The target process is restarted when the binding process of journey, releasable portion terminal memory source protects the foreground process of terminal Do not terminated suddenly, reduces the memory source that Resident Process occupies in terminal, and make in terminal in addition to resident managing process The characteristics of memory source that other Resident Process occupy is easy recycling and keeps its energy self-starting, improves user experience.
Referring to fig. 4, a kind of terminal structure schematic diagram provided in an embodiment of the present invention, terminal as shown in the figure at least can wrap It includes: end unit 401, acquiring unit 402, judging unit 403, start unit 404.
End unit 401 is used for target end process, to discharge the terminal memory source that the target process occupies.
Process refers to the application program being currently running in terminal system.The memory source of multiple process shared terminals, when When the not used free memory resource value of terminal is lower than to a certain degree, the speed of service of terminal can be slower and slower, card machine, report occurs It is wrong or the case where without response.Terminal would generally provide application manager to user management process, when terminal occur card machine or When without the case where response, user, which can enter application manager selection, terminates certain processes, to discharge the end of these processes occupancy End memory resource.Optionally, end unit 401 can be when residual terminal memory source be low, according to the priority of process in terminal Rank target end process, to discharge the terminal memory source that the target process occupies.
It should be noted that target process mentioned by the present invention is originally used for preset Resident Process when terminal factory, reside Process refers to that long-term occupied terminal memory source provides the process of service, and residence characteristics are embodied in: priority-level is special Height will not be usually moved to end, and can be started automatically immediately being moved to end.In order to make the target process for being originally used for Resident Process Occupied memory source is easy recycling, needs to make it lose residence characteristics the priority-level for reducing target process in advance, tie Shu Danyuan 401 could terminate the target process according to the service condition of memory source.
Acquiring unit 402, for obtaining the identification information of the target process.
The identification information storage of target process is in the application configuration file of target process, and usually the number of process is signed Name, or other contents to the unique identities of identification process, such as the operating system that terminal uses is Android system When system, the identification information can be in<manifest>in AndroidManifest.xml file in application configuration file The content of android:process in the content of android:sharedUserId or<application>.
Whether judging unit 403 is default for the target process according to the identification information judgment of the target process Resident managing process binding process.
It whether is preset normal in the target process according to the identification information judgment of the target process of judging unit 403 Before the binding process of managing process, need that the Resident Process specified in terminal is set as the resident managing process in advance, Set Resident Process other in terminal to the binding process of the resident managing process.Specifically, acquiring unit 402 obtains The identification information of target process, then the identification information is registered in resident managing process with target process described in remarks as The binding process of the resident managing process.Such as a binding relationship chained list is created in resident managing process, wherein recording It is all to establish the identification information for having the processes of binding relationship with the resident managing process, one of identification information be target into The identification information of journey.After 401 target end process of end unit, acquiring unit 402 obtains the identification information of the target process, Judging unit 403 according to the identification information judgment of the target process whether be the resident managing process binding process, if so, The target process is then restarted by start unit 404.
Start unit 404 judges that the identification information of the target process is resided to be preset for the judging unit 403 When the binding process of managing process, the target process is restarted.
It should be noted that resident managing process is unique Resident Process in terminal, and become resident managing process The Resident Process of binding process, need to reduce its priority-level in advance makes it lose residence characteristics, to allow end unit 401 Terminate the target process originally as Resident Process.
In an alternative embodiment, the terminal further include: setting unit 405 terminates described for the end unit 401 Before target process, the Resident Process specified in the terminal is set as the resident managing process, by its in the terminal His Resident Process is set as the binding process of the resident managing process.
Correspondingly, the terminal further include: priority modification unit 406, for modifying tying up for the resident managing process The priority-level of process is determined, so that the priority-level of the binding process of the resident managing process is lower than in the terminal The foreground process.
In the specific implementation, the residence characteristics of the Resident Process in terminal are mainly reflected in: priority-level is especially high, generally It will not be moved to end, it can the automatic starting immediately in the case where terminal is opened being moved to end.Pass through the setting unit in terminal 405 and priority modification unit 406, the process relation schematic diagram in terminal provided in an embodiment of the present invention as shown in Figure 7, often Become unique Resident Process in terminal in managing process, reduces the terminal memory source that Resident Process occupies in terminal, and Other Resident Process have lost its residence characteristics because its priority-level is fallen below foreground process, terminate Unit 401 can go to terminate other described Resident Process according to the service condition of memory source in terminal, make other Resident Process institutes The memory source of occupancy is easily recycled.
In another alternative embodiment, the acquiring unit 402, be also used to the start unit 404 restart it is described Before target process, the state of the startup function switch of presently described target process, the state of the startup function switch are obtained It include: open state or off status.
In the specific implementation, terminal can provide the startup function switch of target process for user, therefore user can pass through starting Functional switch manually selects starting or target end process, wherein the corresponding starting target of the open state of startup function switch into The off status of journey, the startup function switch corresponds to target end process.The state of target process startup function switch can be made Judge whether to need the reference conditions for starting the target process automatically for terminal, such as terminal opening target process before being turned off Dynamic functional switch is set on state, and all processes include that target process is all moved to end in terminal after closing terminal, and terminal is again When starting, terminal detects just automatically starting process when the startup function switch of target process is open state;If target into The journey state that startup function switchs before the end is off status, maintains the end state of the target process.
The judging unit 403 is also used to judge whether the state of the startup function switch is open state.
The start unit 404 is also used to the judging unit 403 and judges the state of the startup function switch to open shape When state, the target process is restarted.
The embodiment of the present invention can target end process, the identification information of the target process can be also obtained, according to the mesh Whether target process described in the identification information judgment of mark process is the binding process of preset resident managing process, and then is judging The target process restarts the target process when being the binding process of preset resident managing process, in releasable terminal Deposit resource, reduce the memory source that Resident Process occupies in terminal, and make in terminal in addition to resident managing process reside into The memory source of Cheng Zhanyong be easy recycling and keep its can self-starting the characteristics of, improve user experience.
Further referring to Fig. 5, one schematic diagram of structure of end unit provided in an embodiment of the present invention;The end unit 401 can include: detection sub-unit 4101 determines subelement 4102, terminates subelement 4103.
Whether detection sub-unit, the memory use value for detecting terminal are greater than preset threshold.
In the specific implementation, when the not used free memory resource value of terminal is lower than to a certain degree, the speed of service of terminal Can it is slower and slower, there is card machine, report an error or without response the case where, occur above situation in order to prevent, an end can be preset End memory use value threshold value passes through when detecting the memory use value of terminal greater than preset threshold to detection sub-unit 4101 It determines subelement 4102 and terminates 4103 target end process of subelement to discharge the memory source of part terminal.
It determines subelement 4102, detects that the memory use value of the terminal is greater than in advance for the detection sub-unit 4101 If when threshold value, the process by priority-level in the terminal lower than foreground process is determined as the target process.
The speed of service that will affect terminal when terminal memory source consumption is very big, needs latter end process to discharge Partial memory resource, usual user are more concerned about the foreground process currently interacted with user, it is desirable to before terminal can preferentially meet The use of platform proceeding internal memory resource, in case foreground process is terminated suddenly and is lost produced by current foreground process interacts with user Data, it is thus determined that subelement 4102 preferential will determine the process that priority-level is lower than foreground process that terminates, before protection Platform process.
Terminate subelement 4103, for terminating the target process, to discharge the terminal memory that the target process occupies Resource.
Further referring to Fig. 6, two schematic diagram of structure of end unit provided in an embodiment of the present invention;The end unit 401 can include: detection sub-unit 4111 terminates subelement 4112.
Whether detection sub-unit 4111, the memory use value for detecting the target process are greater than preset threshold.
In the specific implementation, due to the defect that program itself designs RAM leakage can occur in the process of running for certain processes Situation, which there is RAM leakage process, in these gradually to drain the memory source of terminal, therefore cannot create again in terminal new Process, and occur without response, card machine or the case where report an error.There is RAM leakage in process in order to prevent, can be to the process in terminal The threshold value of a default memory use value, detects that the memory use value of target process is big to detection sub-unit 4111 in terminal When preset threshold, provided by terminating the target process of subelement 4112 with the memory for discharging the terminal of target process occupancy Source, then restarting the target process by judging unit 403 and start unit 404 makes it restPose.
Terminate subelement, detects that the memory use value of the target process is greater than in advance for the detection sub-unit 4111 If when threshold value, terminating the target process, to discharge the terminal memory source that the target process occupies.
Description through the foregoing embodiment, the embodiment of the present invention can target end process, can also obtain the target process Identification information, whether be preset resident managing process according to target process described in the identification information judgment of the target process Binding process, and then when judging that the target process is the binding process of preset resident managing process restarting described in Target process makes the target process restPose, releasable portion terminal memory source, reduces Resident Process in terminal The memory source of occupancy, and the memory source for occupying other Resident Process in terminal in addition to resident managing process is easy back Receive, and keep other Resident Process can self-starting the characteristics of, improve user experience.
A kind of process management method disclosed by the embodiments of the present invention and terminal are described in detail above, it is above to be taken off Dew is only present pre-ferred embodiments, and of course, the scope of rights of the present invention cannot be limited by this, therefore according to the present invention Equivalent variations made by claim, is still within the scope of the present invention.

Claims (4)

1. a kind of process management method characterized by comprising
The Resident Process specified in terminal is set as resident managing process, by the identification information of Resident Process other in terminal Registration is the resident managing process with others Resident Process described in remarks in the binding relationship chained list of resident managing process Binding process, all marks with the process that the resident managing process is binding relationship are recorded in the binding relationship chained list and are believed Breath;
The priority-level of the binding process of the resident managing process is modified, so that the binding process of the resident managing process Priority-level lower than the foreground process in the terminal, the priority-level of the Resident Process is higher than described before a modification The foreground process of terminal;
Whether the memory use value of detection terminal is greater than preset threshold;
If so, the process by priority-level in the terminal lower than foreground process is determined as target process;
Terminate the target process, to discharge the terminal memory source that the target process occupies;
From android:sharedUserId in<manifest>in AndroidManifest.xml file in application configuration file Content or<application>in the content of android:process obtain the identification information of the target process, according to The identification information of process in the binding relationship chained list of the identification information of the target process and the resident managing process is sentenced The target process that breaks whether be preset resident managing process binding process;
If so, restarting the target process.
2. the method according to claim 1, wherein before the restarting target process, further includes:
The state of the startup function switch of presently described target process is obtained, the state of the startup function switch includes: out shape State or off status;
Whether the state for judging the startup function switch is open state, if so, executing the restarting target process Step.
3. a kind of terminal, which is characterized in that the terminal includes:
Setting unit will be other resident in terminal for the Resident Process specified in terminal to be set as resident managing process It is institute that the identification information of process, which is registered in the binding relationship chained list of resident managing process with others Resident Process described in remarks, The binding process of resident managing process is stated, it is binding relationship that all and resident managing process is recorded in the binding relationship chained list Process identification information;
Priority modification unit, the priority-level of the binding process for modifying the resident managing process, so that described normal It is lower than the foreground process in the terminal in the priority-level of the binding process of managing process, before a modification the Resident Process Priority-level be higher than the terminal foreground process;
End unit is used for target end process, to discharge the terminal memory source that the target process occupies;
Acquiring unit, for from AndroidManifest.xml file in application configuration file in<manifest> The content of android:process obtains the mesh in the content of android:sharedUserId or<application> The identification information of mark process;
Judging unit, for according to the identification information of the target process and the binding relationship chained list of the resident managing process In process identification information judgment described in target process whether be preset resident managing process binding process;
Start unit, when judging the target process for the judging unit for the binding process of the resident managing process, Restart the target process;
Wherein the end unit includes:
Whether detection sub-unit, the memory use value for detecting terminal are greater than preset threshold;
Determine subelement, it, will when detecting the memory use value of the terminal greater than preset threshold for the detection sub-unit Priority-level is determined as the target process lower than the process of foreground process in the terminal.
4. terminal according to claim 3, which is characterized in that
The acquiring unit is also used to before the start unit restarting target process, obtains presently described target The state of the state of the startup function switch of process, the startup function switch includes: open state or off status;
The judging unit is also used to judge whether the state of the startup function switch is open state;
The start unit, when being also used to the judging unit and judging the state of startup function switch for open state, again Start the target process.
CN201410779136.7A 2014-12-12 2014-12-12 A kind of process management method and terminal Expired - Fee Related CN104503828B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410779136.7A CN104503828B (en) 2014-12-12 2014-12-12 A kind of process management method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410779136.7A CN104503828B (en) 2014-12-12 2014-12-12 A kind of process management method and terminal

Publications (2)

Publication Number Publication Date
CN104503828A CN104503828A (en) 2015-04-08
CN104503828B true CN104503828B (en) 2018-12-11

Family

ID=52945229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410779136.7A Expired - Fee Related CN104503828B (en) 2014-12-12 2014-12-12 A kind of process management method and terminal

Country Status (1)

Country Link
CN (1) CN104503828B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294059A (en) * 2015-06-26 2017-01-04 中兴通讯股份有限公司 The restoration methods of process and device in network management system
CN105700960B (en) * 2016-01-13 2018-01-19 广东欧珀移动通信有限公司 A kind of start and stop method, device and mobile terminal of network positions process
CN105912394B (en) * 2016-04-25 2020-02-11 深圳市万普拉斯科技有限公司 Thread processing method and system
CN106095558B (en) * 2016-06-16 2019-05-10 Oppo广东移动通信有限公司 A kind of method and terminal of audio effect processing
CN106775851A (en) * 2016-12-02 2017-05-31 深圳创维数字技术有限公司 A kind of self-start method and device
CN106648863B (en) * 2016-12-08 2020-01-03 武汉斗鱼网络科技有限公司 Android application installation package, application target process keep-alive method and system
CN106951335B (en) * 2017-02-28 2020-08-04 维沃移动通信有限公司 Process daemon method and mobile terminal
CN110209548B (en) * 2018-04-19 2023-07-14 深圳市腾讯计算机***有限公司 Service control method, system, electronic device and computer readable storage medium
CN110737562A (en) * 2018-07-19 2020-01-31 深圳市鸿合创新信息技术有限责任公司 method and system for monitoring process and electronic equipment
CN109189562B (en) * 2018-08-09 2021-08-20 麒麟合盛网络技术股份有限公司 Method and device for controlling process operation
CN113032130A (en) * 2021-05-24 2021-06-25 荣耀终端有限公司 System exception handling method and device
CN113391926A (en) * 2021-06-28 2021-09-14 京东方科技集团股份有限公司 Data playing method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436404A (en) * 2011-08-24 2012-05-02 苏州阔地网络科技有限公司 Daemon implementing method
CN102981878A (en) * 2012-11-28 2013-03-20 广东欧珀移动通信有限公司 Method for automatically closing background programs and mobile terminal of automatically closing background programs
CN103678084A (en) * 2012-09-21 2014-03-26 成都勤智数码科技股份有限公司 Flexible application process guarding method
CN104050044A (en) * 2014-06-19 2014-09-17 宇龙计算机通信科技(深圳)有限公司 Terminal and method and device for releasing memory

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1273895C (en) * 2002-10-11 2006-09-06 华为技术有限公司 Method for monitoring background programme
KR20110121362A (en) * 2010-04-30 2011-11-07 삼성전자주식회사 Data management method for preventing memory fragments in memory pool
CN102479108B (en) * 2010-11-26 2013-09-11 中国科学院声学研究所 Terminal resource management system for multi-application process embedded system and method
CN103324536A (en) * 2012-03-23 2013-09-25 宇龙计算机通信科技(深圳)有限公司 Terminal and application program protection method
CN103838630A (en) * 2014-03-03 2014-06-04 联想(北京)有限公司 Information processing method, system and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436404A (en) * 2011-08-24 2012-05-02 苏州阔地网络科技有限公司 Daemon implementing method
CN103678084A (en) * 2012-09-21 2014-03-26 成都勤智数码科技股份有限公司 Flexible application process guarding method
CN102981878A (en) * 2012-11-28 2013-03-20 广东欧珀移动通信有限公司 Method for automatically closing background programs and mobile terminal of automatically closing background programs
CN104050044A (en) * 2014-06-19 2014-09-17 宇龙计算机通信科技(深圳)有限公司 Terminal and method and device for releasing memory

Also Published As

Publication number Publication date
CN104503828A (en) 2015-04-08

Similar Documents

Publication Publication Date Title
CN104503828B (en) A kind of process management method and terminal
US9477527B2 (en) Resource optimization method and apparatus
CN103226491B (en) A kind of method and device that Application Status are set
CN105824664B (en) Application program launching monitoring method, device and terminal device
CN107783803B (en) System optimization method and device of intelligent terminal, storage medium and intelligent terminal
CN104615334B (en) A kind of quick method and system for removing mobile terminal informing information
US20150365360A1 (en) Method and apparatus for processing push message in notification center of mobile terminal, and storage medium
CN105094909B (en) Mobile terminal software upgrading method, update device and mobile terminal
CN110554762A (en) Method and terminal for controlling application program
CN103164229A (en) Method and device for clearing progresses of mobile terminal
CN106325990A (en) Control method of application program, control device and terminal
CN103905641B (en) A kind of method preventing mobile phone flow from escaping
CN106897125A (en) Smart machine and its management method of service or application
CN104166591A (en) Method and device for avoiding forced interruption of game
CN103561414A (en) Terminal and multi-channel data transmission method
CN111580899B (en) Layered structure-based message popup window system and electronic equipment
CN105959462A (en) Abnormal startup control method and system
WO2016037553A1 (en) Method and apparatus for closing application program
CN105323837A (en) Intermittent networking method and system
CN104102498B (en) A kind of mobile terminal and its starting-up method
CN104778041A (en) Management method and management system for multi-program shared speech equipment
CN105892833A (en) Popup message processing method and device
CN103093529B (en) The method of dynamic refresh data
CN108958808A (en) Method for starting terminal and device, terminal and storage medium
CN105447384B (en) A kind of anti-method monitored, system and mobile terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

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

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

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

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

CP01 Change in the name or title of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181211

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