CN104536907A - Memory cleaning method and electronic equipment - Google Patents

Memory cleaning method and electronic equipment Download PDF

Info

Publication number
CN104536907A
CN104536907A CN201510037517.2A CN201510037517A CN104536907A CN 104536907 A CN104536907 A CN 104536907A CN 201510037517 A CN201510037517 A CN 201510037517A CN 104536907 A CN104536907 A CN 104536907A
Authority
CN
China
Prior art keywords
application
cleaning
internal memory
resource
thresholding
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.)
Granted
Application number
CN201510037517.2A
Other languages
Chinese (zh)
Other versions
CN104536907B (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201510037517.2A priority Critical patent/CN104536907B/en
Publication of CN104536907A publication Critical patent/CN104536907A/en
Application granted granted Critical
Publication of CN104536907B publication Critical patent/CN104536907B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides a memory cleaning method and electronic equipment. The method comprises the following steps: determining the current occupied memory resources of each application positioned in a set operating state when the memory cleaning condition is met; determining that the occupied memory resources are larger than a target application of a corresponding resource threshold according to the current occupied memory resources of each application and the set corresponding resource threshold of each application, wherein each application corresponds to a resource threshold; and performing memory cleaning on the target application. According to the memory cleaning method and the electronic equipment in the embodiment of the invention, the memory cleaning can be performed according to the service condition of the application, and waste to the system resources of the electronic equipment is reduced.

Description

A kind of internal memory method for cleaning and electronic equipment
Technical field
The present invention relates to data scrubbing technical field, more particularly, relate to a kind of internal memory method for cleaning and electronic equipment.
Background technology
Internal memory cleaning refers to that cleaning, the release of memory source are carried out in the application to committed memory resource, the mode that the free memory resource making electronic equipment current increases; Along with the use of electronic equipment, the memory source that the application that electronic equipment is installed takies will get more and more, and occur that the free memory resource of electronic equipment cannot meet the phenomenon of the user demand of electronic apparatus system, add the use burden of electronic apparatus system.Therefore, when applying the memory source taken and being more, reply is applied the memory source taken and is carried out cleaning release, makes electronic apparatus system can use more available resources.
The mode of the internal memory cleaning of current electronic equipment is mainly: arrange OMK (out of memory killer, low memory clear up) treatment mechanism, but OMK is when carrying out internal memory cleaning, only internal memory cleaning is carried out to non-common application, and for conventional application, as the conventional application such as desktop application, phone application, contact application can not carry out internal memory cleaning; Although these conventional application exist longer characteristic service time, its ample resources loaded not is use in real time, and this just causes the waste of the system resource of electronic equipment; Therefore provide a kind of internal memory method for cleaning, the service condition according to application carries out internal memory cleaning, to reduce the waste of the system resource of electronic equipment, becomes the problem that those skilled in the art need solution badly.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of internal memory method for cleaning and electronic equipment, to solve prior art does not carry out internal memory cleaning problem according to the service condition of application.
For achieving the above object, the embodiment of the present invention provides following technical scheme:
A kind of internal memory method for cleaning, is applied to electronic equipment, comprises:
When determining to meet internal memory cleaning condition, determine the current memory source taken of each application being in setting running status;
According to the current memory source taken of each application, and the resource thresholding that each application of setting is corresponding, determine that the memory source taken is greater than the intended application of corresponding resource thresholding, one of them application is to there being a resource thresholding;
Internal memory cleaning is carried out to described intended application.
Wherein, described intended application comprises conventional intended application and non-common intended application; Described to described intended application carry out internal memory cleaning comprise:
Internal memory cleaning is carried out to non-common intended application;
If after carrying out internal memory cleaning to non-common intended application, the free memory resource of described electronic equipment reaches the normal thresholding of default resource, then cancel and carry out internal memory cleaning to conventional intended application;
If after carrying out internal memory cleaning to non-common intended application, the free memory resource of described electronic equipment does not reach the normal thresholding of default resource, then continue to carry out internal memory cleaning to conventional intended application.
Wherein, the described current memory source taken of each application determining to be in setting running status comprises:
Determine to be in background operation state, or the current memory source taken of the application of non-data download state.
Wherein, the assignment procedure of the resource thresholding that each application is corresponding comprises:
Choose the resource use value of application and the application selected by definition, selected application is associated with defined resource use value, determine that the resource use value associated is the resource thresholding of selected application correspondence.
Wherein, the assignment procedure of the resource thresholding that each application is corresponding comprises:
Determine the history service time be respectively applied in setting-up time section;
If history of existence is greater than the application of the setting very first time service time, the resource thresholding that history is greater than the application of the setting very first time service time is set as Secondary resource use value by current first resource use value, and Secondary resource use value is greater than first resource use value;
If history of existence is less than the application of setting second time service time, resource thresholding history being less than the application of setting second time service time is set as the 4th resource use value by current information resources use value, 4th resource use value is less than information resources use value, and the second time was less than the very first time.
Wherein, describedly determine to meet internal memory cleaning condition and comprise:
Be at described electronic equipment screen state of going out, and when current free memory resource is less than set memory resource thresholding, determine to meet internal memory cleaning condition;
Or when the first icon shown by the display screen that user clicks described electronic equipment being detected, determine to meet internal memory cleaning condition, described first icon is carry out icon corresponding to internal memory cleaning.
Wherein, described to described intended application carry out internal memory cleaning comprise:
Determine the cleaning grade of cleaned application;
If the cleaning grade of cleaned application is the first estate, then cleaned application is carried out to the cleaning of internal memory usage data;
If the cleaning grade of cleaned application is the second grade, then kill cleaned application, wherein the first estate is higher than the second grade.
Wherein, described method also comprises:
After killing cleaned application, be applied as conventional application if killed, then restart killed conventional application, be applied as non-common application if killed, then cancel and restart killed non-common application.
The embodiment of the present invention also provides a kind of electronic equipment, comprising:
First determination module, for when determining to meet internal memory cleaning condition, determines the current memory source taken of each application being in setting running status;
Second determination module, for according to the current memory source taken of each application, and the resource thresholding that each application of setting is corresponding, determine that the memory source taken is greater than the intended application of corresponding resource thresholding, one of them application is to there being a resource thresholding;
Cleaning module, for carrying out internal memory cleaning to described intended application.
Wherein, described cleaning module comprises:
Non-common application cleaning unit, for carrying out internal memory cleaning to non-common intended application;
Cancel cleaning unit, if for after carrying out internal memory cleaning to non-common intended application, the free memory resource of described electronic equipment reaches the normal thresholding of default resource, then cancel and carry out internal memory cleaning to conventional intended application;
Conventional application cleaning unit, if for after carrying out internal memory cleaning to non-common intended application, the free memory resource of described electronic equipment does not reach the normal thresholding of default resource, then continue to carry out internal memory cleaning to conventional intended application.
Based on technique scheme, the internal memory method for cleaning that the embodiment of the present invention provides, can when meeting internal memory cleaning condition, determine the current memory source taken of each application being in setting running status, the resource thresholding corresponding according to each application of the current memory source that takies of each application and setting, determine that the memory source taken is greater than the intended application of corresponding resource thresholding, one of them application to there being a resource thresholding, thus carries out internal memory cleaning to intended application.The embodiment of the present invention is passed through as resource thresholding corresponding to each application settings, when carrying out internal memory cleaning, the current memory source taken only is greater than the application of self taken resource thresholding (namely corresponding resource thresholding) of setting as intended application by the embodiment of the present invention, thus only intended application is cleared up, and do not clear up other non-targeted application; Visible, the embodiment of the present invention is when carrying out internal memory cleaning, choose to be in setting running status, and the application that the current memory source taken is greater than self taken resource thresholding of setting is cleared up, thus when making the current memory source taken of conventional application be greater than self taken resource thresholding of setting, the embodiment of the present invention also will carry out internal memory cleaning to conventional application, reduce the waste of not clearing up the system resource to electronic equipment of conventional application.The embodiment of the present invention achieves the object of carrying out internal memory cleaning according to the service condition of application, reduces the waste of the system resource to electronic equipment.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only embodiments of the invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to the accompanying drawing provided.
The process flow diagram of the internal memory method for cleaning that Fig. 1 provides for the embodiment of the present invention;
Another process flow diagram of the internal memory method for cleaning that Fig. 2 provides for the embodiment of the present invention;
A process flow diagram again of the internal memory method for cleaning that Fig. 3 provides for the embodiment of the present invention;
The another process flow diagram of the internal memory method for cleaning that Fig. 4 provides for the embodiment of the present invention;
The process flow diagram of the establishing method of the resource thresholding of the application correspondence that Fig. 5 provides for the embodiment of the present invention;
The structured flowchart of the electronic equipment that Fig. 6 provides for the embodiment of the present invention;
The structured flowchart of the cleaning module that Fig. 7 provides for the embodiment of the present invention;
The structured flowchart of the first determination module that Fig. 8 provides for the embodiment of the present invention;
Another structured flowchart of the electronic equipment that Fig. 9 provides for the embodiment of the present invention;
Another structured flowchart of the cleaning module that Figure 10 provides for the embodiment of the present invention;
A structured flowchart again of the electronic equipment that Figure 11 provides for the embodiment of the present invention;
The another structured flowchart of the electronic equipment that Figure 12 provides for the embodiment of the present invention;
Another structured flowchart again of the electronic equipment that Figure 13 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The process flow diagram of the internal memory method for cleaning that Fig. 1 provides for the embodiment of the present invention, the method can be applicable to electronic equipment, and electronic equipment can have the equipment of data-handling capacity as mobile phone, panel computer, notebook computer etc.; With reference to Fig. 1, the method can comprise:
Step S100, when determining to meet internal memory cleaning condition, determine the current memory source taken of each application being in setting running status;
Internal memory cleaning condition can for the condition of carrying out internal memory cleaning pre-set, as electronic equipment can show an icon (comprising the icon etc. of a certain internal memory cleaning control in desktop suspended window, electronic equipment house keeper software) for triggering to carry out internal memory cleaning, when this icon is clicked by user, then can determine current meet internal memory cleaning condition, the icon of the type can be described as the first icon in embodiments of the present invention; Also can set memory resource thresholding, when the free memory resource of electronic equipment is less than this set memory resource thresholding, then determines currently to meet internal memory cleaning condition, automatically carry out internal memory cleaning; Also regularly can carry out internal memory cleaning, by arranging timer, when the timing of timer reaching setting-up time, determine currently to meet internal memory cleaning condition, then restarting timer, realize automatic internal memory cleaning at set intervals; Obviously, the explanation above for internal memory cleaning condition is only exemplary, and internal memory cleaning condition can carry out self-defined setting according to practical situations.
The application of setting running status can be the application of running background, the current application used of user is applied as due to front stage operation, if carry out internal memory release, by user's user demand current for impact, therefore the application setting running status can be the application of running background, to carry out internal memory cleaning in the follow-up application to running background;
Obviously, the application of setting running status can also be the application of non-data download state, the application of data download state is there is if current, then represent that user is current and there is download demand, if carry out internal memory cleaning to the application of data download state, will the downloading task of user be caused to complete in time, affect user and use, therefore the application setting running status can be the application of non-data download state, to carry out internal memory cleaning in the follow-up application to non-data download state;
The running status of setting can also be other running statuses of application, as the unmusical broadcast state etc. of audio-visual application; For the running status of setting, the embodiment of the present invention can carry out self-defined setting according to practical situations.
Step S110, according to the current memory source taken of each application, and the resource thresholding that each application of setting is corresponding, determine that the memory source taken is greater than the intended application of corresponding resource thresholding, one of them application is to there being a resource thresholding;
Optionally, the embodiment of the present invention can arrange corresponding resource thresholding to each application, represent the resource thresholding that each application can take, after the application determining to be in setting running status, the embodiment of the present invention by current for the determined each application memory source taken, can be compared with the corresponding resource thresholding of its setting, the application of applying the current memory source taken be greater than the resource thresholding of its correspondence if exist, then determine that this is applied as intended application, internal memory cleaning need be carried out to intended application; If apply the resource thresholding that the current memory source taken is not more than its correspondence, then determine that such non-targeted that is applied as is applied, follow-up need carries out internal memory cleaning to it;
Can find out, for the determined each application being in setting running status, the current memory source taken of each application is all compared with self corresponding resource thresholding of application, thus the current memory source taken is greater than the application of corresponding resource thresholding, is defined as intended application; What be in setting running status as determined is applied as A and B, the corresponding resource thresholding that application A presets is a1, the corresponding resource thresholding that application B presets is b1, the current memory source taken of determined application A is a, if a is greater than a1, then determines that A is intended application, internal memory cleaning need be carried out follow-up, if a is not more than a1, then determines that A is non-targeted application, follow-uply can not carry out internal memory cleaning; Disposition for application B is similar, and the current memory source taken of determined application B is b, if b is greater than b1, then determine that B is intended application, internal memory cleaning need be carried out follow-up, if b is not more than b1, then determine that B is non-targeted application, follow-uply can not carry out internal memory cleaning.
Step S120, internal memory cleaning is carried out to described intended application.
The internal memory method for cleaning that the embodiment of the present invention provides, can when meeting internal memory cleaning condition, determine the current memory source taken of each application being in setting running status, the resource thresholding corresponding according to each application of the current memory source that takies of each application and setting, determine that the memory source taken is greater than the intended application of corresponding resource thresholding, one of them application to there being a resource thresholding, thus carries out internal memory cleaning to intended application.The embodiment of the present invention is passed through as resource thresholding corresponding to each application settings, when carrying out internal memory cleaning, the current memory source taken only is greater than the application of self taken resource thresholding (namely corresponding resource thresholding) of setting as intended application by the embodiment of the present invention, thus only intended application is cleared up, and do not clear up other non-targeted application; Visible, the embodiment of the present invention is when carrying out internal memory cleaning, choose to be in setting running status, and the application that the current memory source taken is greater than self taken resource thresholding of setting is cleared up, thus when making the current memory source taken of conventional application be greater than self taken resource thresholding of setting, the embodiment of the present invention also will carry out internal memory cleaning to conventional application, reduce the waste of not clearing up the system resource to electronic equipment of conventional application.The embodiment of the present invention achieves the object of carrying out internal memory cleaning according to the service condition of application, reduces the waste of the system resource to electronic equipment.
Optionally, if determined intended application comprises conventional application and non-common application, then the embodiment of the present invention first can carry out internal memory cleaning to non-common application, if after carrying out internal memory cleaning to non-common application, system free memory is higher, then do not carry out the internal memory cleaning of conventional application, retain the operation of conventional application; If after carrying out internal memory cleaning to non-common application, system free memory is still lower, then carry out the internal memory cleaning of conventional application again, elevator system free memory.In embodiments of the present invention, the conventional application in intended application can be described as conventional intended application, and the non-common application in intended application can be described as non-common intended application.
Fig. 2 shows another flow process of the internal memory method for cleaning that the embodiment of the present invention provides, and with reference to Fig. 2, the method can comprise:
Step S200, when determining to meet internal memory cleaning condition, determine the current memory source taken of each application being in setting running status, the determined application being in setting running status comprises conventional application and non-common application;
Step S210, according to the current memory source taken of each application, and the resource thresholding that each application of setting is corresponding, determine that the memory source taken is greater than the intended application of corresponding resource thresholding, one of them application is to there being a resource thresholding, and determined intended application comprises conventional intended application and non-common intended application;
Step S220, internal memory cleaning is carried out to non-common intended application;
Whether the free memory resource of the electronic equipment after step S230, judgement cleaning, be greater than the normal thresholding of default resource, if so, perform step S240, if not, performs step S250;
Cut off value between the high system free memory resource that the default normal thresholding of resource represents and low system free memory resource, can set according to the configuration of electronic equipment physical memory hardware parameter and the software application situation etc. of electronic equipment, as can arrange resource normal door be limited to 40% can with, 30% can to use.
Step S240, cancel and internal memory cleaning is carried out to conventional intended application;
Step S250, continue to carry out internal memory cleaning to conventional intended application.
After carrying out internal memory cleaning to non-common intended application, if the free memory resource of electronic equipment does not reach the normal thresholding of default resource, then represent the internal memory cleaning also needing to carry out conventional intended application, to promote the free memory resource of electronic equipment.
Optionally, when carrying out internal memory cleaning to intended application, the embodiment of the present invention also can arrange the cleaning grade between different application, and make some application only clear up internal memory usage data, some application is then directly killed; The setting of embody rule grade, can carry out self-defined setting according to actual conditions.
Fig. 3 shows a flow process again of the internal memory method for cleaning that the embodiment of the present invention provides, and with reference to Fig. 3, the method can comprise:
Step S300, when determining to meet internal memory cleaning condition, determine the current memory source taken of each application being in setting running status;
Step S310, according to the current memory source taken of each application, and the resource thresholding that each application of setting is corresponding, determine that the memory source taken is greater than the intended application of corresponding resource thresholding, one of them application is to there being a resource thresholding;
Step S320, determine the cleaning grade of cleaned application;
Optionally, cleaned application can be determined all intended application; Also can first using non-common intended application as cleaned application, the free memory resource of electronic equipment is not more than default resource normal door in limited time after the cleaning, then using conventional intended application as cleaned application;
If the cleaning grade of the application that step S330 is cleaned is the first estate, then cleaned application is carried out to the cleaning of internal memory usage data;
The cleaning of internal memory usage data is the cleaning to applying the data taken in internal memory, instead of directly application is killed, can clear up as GC (Garbage Collection, garbage reclamation) the cleaning of internal memory usage data, cache (buffer memory) cleaning etc.
If the cleaning grade of the application that step S340 is cleaned is the second grade, then kill cleaned application, wherein the first estate is higher than the second grade.
Optionally, method shown in Fig. 3 also can first be cleared up non-common intended application, and follow-up judging whether again is cleared up conventional intended application; Corresponding, Fig. 4 shows the another flow process of the internal memory method for cleaning that the embodiment of the present invention provides, and with reference to Fig. 4, the method can comprise:
Step S400, when determining to meet internal memory cleaning condition, determine the current memory source taken of each application being in setting running status, the determined application being in setting running status comprises conventional application and non-common application;
Step S410, according to the current memory source taken of each application, and the resource thresholding that each application of setting is corresponding, determine that the memory source taken is greater than the intended application of corresponding resource thresholding, one of them application is to there being a resource thresholding, and determined intended application comprises conventional intended application and non-common intended application;
The cleaning grade of step S420, each application determined in non-common intended application;
Step S430, be the non-common intended application of the first estate for cleaning grade, carry out the cleaning of internal memory usage data;
Step S440, be the non-common intended application of the second grade for cleaning grade, carry out application and kill process;
Wherein, the first estate is higher than the second grade.
Step S450, judge the free memory resource that electronic equipment is current whether to be greater than the normal thresholding of default resource, if so, perform step S460, if not, perform step S470;
Step S460, do not carry out conventional intended application internal memory cleaning;
The cleaning grade of step S470, each application determined in conventional intended application;
Step S480, be the conventional intended application of the first estate for cleaning grade, carry out the cleaning of internal memory usage data;
Step S490, be the conventional intended application of the second grade for cleaning grade, carry out application and kill process.
Optionally, be applied as conventional application if killed, then the embodiment of the present invention also can restart killed conventional application, is applied as non-common application if killed, then the embodiment of the present invention can not be carried out being killed restarting of application.
Below an application example of the internal memory method for cleaning that the embodiment of the present invention provides is described:
Click the suspended window of electronic equipment display user, or when suspended window is moved to presumptive area, electronic equipment triggers internal memory clean-up process; Optionally, when also can be the current free memory resource little set memory resource thresholding of electronic equipment, directly automatically trigger internal memory clean-up process; Optionally, the embodiment of the present invention can trigger internal memory clean-up process when user's inoperation electronic equipment, as being at electronic equipment screen state of going out, and electronic equipment current free memory resource is when being less than set memory resource thresholding, determine currently to meet internal memory cleaning condition, automatically trigger internal memory clean-up process;
Determine to be in background operation state, or non-data download state be applied as A, B, C, D and E, and determine to apply the current memory source taken of A, B, C, D and E a, b, c, d and e respectively, wherein applying A, B and C is non-common application, D and E is conventional application;
Determine that the current memory source a taken of application A is greater than the resource thresholding a1 of self correspondence, the current memory source b taken of application B is greater than the resource thresholding b1 of self correspondence, the current memory source c taken of application C is not more than the resource thresholding c1 of self correspondence, the current memory source d taken of application D is greater than the resource thresholding d1 of self correspondence, and the current memory source e taken of application E is greater than the resource thresholding e1 of self correspondence;
Application A and B is defined as the non-common application of target, application D and E is defined as the conventional application of target, gets rid of application C;
First carry out internal memory cleaning to application A and B, the cleaning grade of application A is the first estate, and the cleaning grade of application B is the second grade; Then application A is carried out to the cleaning of internal memory usage data, application B directly kills;
After to application, A and B carry out internal memory cleaning, if the current free memory resource of electronic equipment reach 70% can with (presetting the normal thresholding of resource), then unclearly ought to use C and D, end internal memory clean-up process;
After A and B carry out internal memory cleaning to application, can use if the current free memory resource of electronic equipment does not reach 70%, then internal memory cleaning be carried out to application C and D; The cleaning grade of application C is the first estate, and the cleaning grade of application D is the second grade, then application C is carried out to the cleaning of internal memory usage data, and application D directly kills; Again application D is restarted after killing application D.
Optionally, presetting the normal thresholding of resource can be consistent with set memory resource thresholding, also can be inconsistent.
Optionally, resource thresholding for self correspondence of each application can be specified by user, concrete, the embodiment of the present invention can when setting the resource thresholding of self correspondence of each application, choose the resource use value of application and the application selected by definition, selected application is associated with defined resource use value, determines that the resource use value associated is the resource thresholding of selected application correspondence; Time resource use value can be application and development, rule of thumb defined by developer, also can by User Defined.
Optionally, the internal memory cleaning carried out to make the embodiment of the present invention is more accurate, rationally, the embodiment of the present invention can carry out the adjustment of the resource thresholding applying self correspondence according to the history service condition of application; Concrete, the embodiment of the present invention adjusts resource thresholding corresponding to each application by intelligent learning mode, and namely according to adjusting thresholding service time, time length then improves thresholding, and the time is short, reduces thresholding; Corresponding, Fig. 5 shows the process flow diagram of the establishing method of the resource thresholding of the application correspondence that the embodiment of the present invention provides, and with reference to Fig. 5, the method can comprise:
Step S500, determine history service time of being respectively applied in setting-up time section;
If step S510 history of existence is greater than the application of the setting very first time service time, the resource thresholding that history is greater than the application of the setting very first time service time is set as Secondary resource use value by current first resource use value, and Secondary resource use value is greater than first resource use value;
If step S520 history of existence is less than the application of setting second time service time, resource thresholding history being less than the application of setting second time service time is set as the 4th resource use value by current information resources use value, 4th resource use value is less than information resources use value, and the second time was less than the very first time.
Optionally, if history service time of application is between the second time and the very first time, then the resource thresholding keeping application corresponding is constant.
For ease of understanding, an example of method shown in Fig. 5 is as follows: with setting-up time Duan Weiyi week, the very first time is 14 hours, second time was 1 hour is example, at user-association, the resource thresholding of self correspondence of application A is after 5% EMS memory occupation ratio, and electronic equipment can determine the service time applying A in one week; If application A is greater than 14 hours the service time in one week, then can improve the resource thresholding that application A is corresponding, the resource thresholding as the current correspondence of application A is 5% EMS memory occupation ratio, be then promoted to 6% EMS memory occupation ratio by 5%; If application A is less than 1 hour the service time in one week, then can reduces the resource thresholding that application A is corresponding, taking than being reduced to 4% EMS memory occupation ratio as deposited by 5%; Obviously, after resource threshold elevation to the 6% EMS memory occupation ratio that application A is corresponding, if application A is less than 1 hour in the service time in next week, then the resource thresholding that application A is corresponding can be reduced, as being reduced to 5% by 6%; After the resource thresholding that application A is corresponding is reduced to 4% EMS memory occupation ratio, if application A is greater than 14 hours in the service time in next week, then can improve the resource thresholding that application A is corresponding, as being promoted to 5% EMS memory occupation ratio by 4% EMS memory occupation ratio; If A is little between 14 hours between 1 for the service time in one week in application, then keep the resource thresholding that application A is corresponding constant.In embodiments of the present invention, resource thresholding lower limit corresponding to application A and the upper limit can also be set, be limited to 3% as follows, the upper limit is 7%, no longer reduce after the resource thresholding then applying A is reduced to 3% EMS memory occupation ratio, no longer raise after the resource thresholding of application A is increased to 7% EMS memory occupation ratio, make to apply resource thresholding corresponding to A and adjust between the upper limit and lower limit.
The internal memory method for cleaning that the embodiment of the present invention provides, carries out the object of internal memory cleaning, can reduce the waste of the system resource to electronic equipment according to the service condition of application.
Below the electronic equipment that the embodiment of the present invention provides is introduced, this electronic equipment can be mounted with the functional module realizing above-described internal memory method for cleaning, and electronic equipment specific functional modules content described below can corresponding reference mutual to above-described internal memory method for cleaning.
The structured flowchart of the electronic equipment that Fig. 6 provides for the embodiment of the present invention, with reference to Fig. 6, this electronic equipment can comprise:
First determination module 100, for when determining to meet internal memory cleaning condition, determines the current memory source taken of each application being in setting running status;
Second determination module 200, for according to the current memory source taken of each application, and the resource thresholding that each application of setting is corresponding, determine that the memory source taken is greater than the intended application of corresponding resource thresholding, one of them application is to there being a resource thresholding;
Cleaning module 300, for carrying out internal memory cleaning to described intended application.
Optionally, intended application can comprise conventional intended application and non-common intended application; Fig. 7 shows a kind of alternate configurations of the cleaning module 300 that the embodiment of the present invention provides, and with reference to Fig. 7, cleaning module 300 can comprise:
Non-common application cleaning unit 310, for carrying out internal memory cleaning to non-common intended application;
Cancel cleaning unit 311, if for after carrying out internal memory cleaning to non-common intended application, the free memory resource of described electronic equipment reaches the normal thresholding of default resource, then cancel and carry out internal memory cleaning to conventional intended application;
Conventional application cleaning unit 312, if for after carrying out internal memory cleaning to non-common intended application, the free memory resource of described electronic equipment does not reach the normal thresholding of default resource, then continue to carry out internal memory cleaning to conventional intended application.
Optionally, Fig. 8 shows a kind of alternate configurations of the first determination module 100 that the embodiment of the present invention provides, and with reference to Fig. 8, the first determination module 100 can comprise:
Memory source determining unit 110, is in background operation state for determining, or the current memory source taken of the application of non-data download state.
Optionally, Fig. 9 shows another structured flowchart of the electronic equipment that the embodiment of the present invention provides, and shown in 6 and Fig. 9, this electronic equipment can also comprise:
Cleaning condition determination module 400, for being at described electronic equipment screen state of going out, and when current free memory resource is less than set memory resource thresholding, determines to meet internal memory cleaning condition; Or when the first icon shown by the display screen that user clicks described electronic equipment being detected, determine to meet internal memory cleaning condition, described first icon is carry out icon corresponding to internal memory cleaning.
Optionally, Figure 10 shows the another kind of alternate configurations of the cleaning module 300 that the embodiment of the present invention provides, and with reference to Figure 10, cleaning module 300 can comprise:
Cleaning level de-termination unit 320, for determining the cleaning grade of cleaned application;
First cleaning unit 321, if be the first estate for the cleaning grade of cleaned application, then carries out the cleaning of internal memory usage data to cleaned application;
Second cleaning unit 322, if be the second grade for the cleaning grade of cleaned application, then kill cleaned application, wherein the first estate is higher than the second grade.
Optionally, Figure 11 shows a structured flowchart again of the electronic equipment that the embodiment of the present invention provides, and shown in 6 and Figure 11, this electronic equipment can also comprise:
Restart module 500, for after killing cleaned application, be applied as conventional application if killed, then restart killed conventional application, be applied as non-common application if killed, then cancel and restart killed non-common application.
Optionally, Figure 12 shows the another structured flowchart of the electronic equipment that the embodiment of the present invention provides, and shown in 6 and Figure 12, this electronic equipment can also comprise:
First setting module 600, for choosing the resource use value of the application selected by application and definition, associates selected application with defined resource use value, determines that the resource use value associated is the resource thresholding of selected application correspondence.
Optionally, Figure 13 shows another structured flowchart again of the electronic equipment that the embodiment of the present invention provides, and shown in 6 and Figure 13, this electronic equipment can also comprise:
Service time determination module 700, for determining the history service time be respectively applied in setting-up time section;
First adjusting module 800, if be greater than the application of the setting very first time service time for history of existence, the resource thresholding that history is greater than the application of the setting very first time service time is set as Secondary resource use value by current first resource use value, and Secondary resource use value is greater than first resource use value;
Second adjusting module 900, if be less than the application of setting second time service time for history of existence, resource thresholding history being less than the application of setting second time service time is set as the 4th resource use value by current information resources use value, 4th resource use value is less than information resources use value, and the second time was less than the very first time.
The electronic equipment that the embodiment of the present invention provides, when carrying out internal memory cleaning, choose to be in setting running status, and the application that the current memory source taken is greater than self taken resource thresholding of setting is cleared up, thus when making the current memory source taken of conventional application be greater than self taken resource thresholding of setting, the embodiment of the present invention also will carry out internal memory cleaning to conventional application, reduce the waste of not clearing up the system resource to electronic equipment of conventional application.The embodiment of the present invention achieves the object of carrying out internal memory cleaning according to the service condition of application, reduces the waste of the system resource to electronic equipment.
In this instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar portion mutually see.For device disclosed in embodiment, because it corresponds to the method disclosed in Example, so description is fairly simple, relevant part illustrates see method part.
Professional can also recognize further, in conjunction with unit and the algorithm steps of each example of embodiment disclosed herein description, can realize with electronic hardware, computer software or the combination of the two, in order to the interchangeability of hardware and software is clearly described, generally describe composition and the step of each example in the above description according to function.These functions perform with hardware or software mode actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can use distinct methods to realize described function to each specifically should being used for, but this realization should not thought and exceeds scope of the present invention.
The software module that the method described in conjunction with embodiment disclosed herein or the step of algorithm can directly use hardware, processor to perform, or the combination of the two is implemented.Software module can be placed in the storage medium of other form any known in random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field.
To the above-mentioned explanation of the disclosed embodiments, professional and technical personnel in the field are realized or uses the present invention.To be apparent for those skilled in the art to the multiple amendment of these embodiments, General Principle as defined herein can without departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention can not be restricted to these embodiments shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (10)

1. an internal memory method for cleaning, is characterized in that, is applied to electronic equipment, comprising:
When determining to meet internal memory cleaning condition, determine the current memory source taken of each application being in setting running status;
According to the current memory source taken of each application, and the resource thresholding that each application of setting is corresponding, determine that the memory source taken is greater than the intended application of corresponding resource thresholding, one of them application is to there being a resource thresholding;
Internal memory cleaning is carried out to described intended application.
2. internal memory method for cleaning according to claim 1, is characterized in that, described intended application comprises conventional intended application and non-common intended application; Described to described intended application carry out internal memory cleaning comprise:
Internal memory cleaning is carried out to non-common intended application;
If after carrying out internal memory cleaning to non-common intended application, the free memory resource of described electronic equipment reaches the normal thresholding of default resource, then cancel and carry out internal memory cleaning to conventional intended application;
If after carrying out internal memory cleaning to non-common intended application, the free memory resource of described electronic equipment does not reach the normal thresholding of default resource, then continue to carry out internal memory cleaning to conventional intended application.
3. internal memory method for cleaning according to claim 1, is characterized in that, the described current memory source taken of each application determining to be in setting running status comprises:
Determine to be in background operation state, or the current memory source taken of the application of non-data download state.
4. the internal memory method for cleaning according to any one of claim 1-3, is characterized in that, the assignment procedure of the resource thresholding that each application is corresponding comprises:
Choose the resource use value of application and the application selected by definition, selected application is associated with defined resource use value, determine that the resource use value associated is the resource thresholding of selected application correspondence.
5. the internal memory method for cleaning according to any one of claim 1-3, is characterized in that, the assignment procedure of the resource thresholding that each application is corresponding comprises:
Determine the history service time be respectively applied in setting-up time section;
If history of existence is greater than the application of the setting very first time service time, the resource thresholding that history is greater than the application of the setting very first time service time is set as Secondary resource use value by current first resource use value, and Secondary resource use value is greater than first resource use value;
If history of existence is less than the application of setting second time service time, resource thresholding history being less than the application of setting second time service time is set as the 4th resource use value by current information resources use value, 4th resource use value is less than information resources use value, and the second time was less than the very first time.
6. the internal memory method for cleaning according to any one of claim 1-3, is characterized in that, describedly determines to meet internal memory cleaning condition and comprises:
Be at described electronic equipment screen state of going out, and when current free memory resource is less than set memory resource thresholding, determine to meet internal memory cleaning condition;
Or when the first icon shown by the display screen that user clicks described electronic equipment being detected, determine to meet internal memory cleaning condition, described first icon is carry out icon corresponding to internal memory cleaning.
7. internal memory method for cleaning according to claim 1, is characterized in that, described to described intended application carry out internal memory cleaning comprise:
Determine the cleaning grade of cleaned application;
If the cleaning grade of cleaned application is the first estate, then cleaned application is carried out to the cleaning of internal memory usage data;
If the cleaning grade of cleaned application is the second grade, then kill cleaned application, wherein the first estate is higher than the second grade.
8. electronic equipment internal memory method for cleaning according to claim 7, is characterized in that, also comprise:
After killing cleaned application, be applied as conventional application if killed, then restart killed conventional application, be applied as non-common application if killed, then cancel and restart killed non-common application.
9. an electronic equipment, is characterized in that, comprising:
First determination module, for when determining to meet internal memory cleaning condition, determines the current memory source taken of each application being in setting running status;
Second determination module, for according to the current memory source taken of each application, and the resource thresholding that each application of setting is corresponding, determine that the memory source taken is greater than the intended application of corresponding resource thresholding, one of them application is to there being a resource thresholding;
Cleaning module, for carrying out internal memory cleaning to described intended application.
10. electronic equipment according to claim 9, is characterized in that, described cleaning module comprises:
Non-common application cleaning unit, for carrying out internal memory cleaning to non-common intended application;
Cancel cleaning unit, if for after carrying out internal memory cleaning to non-common intended application, the free memory resource of described electronic equipment reaches the normal thresholding of default resource, then cancel and carry out internal memory cleaning to conventional intended application;
Conventional application cleaning unit, if for after carrying out internal memory cleaning to non-common intended application, the free memory resource of described electronic equipment does not reach the normal thresholding of default resource, then continue to carry out internal memory cleaning to conventional intended application.
CN201510037517.2A 2015-01-26 2015-01-26 A kind of memory method for cleaning and electronic equipment Active CN104536907B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510037517.2A CN104536907B (en) 2015-01-26 2015-01-26 A kind of memory method for cleaning and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510037517.2A CN104536907B (en) 2015-01-26 2015-01-26 A kind of memory method for cleaning and electronic equipment

Publications (2)

Publication Number Publication Date
CN104536907A true CN104536907A (en) 2015-04-22
CN104536907B CN104536907B (en) 2018-11-09

Family

ID=52852437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510037517.2A Active CN104536907B (en) 2015-01-26 2015-01-26 A kind of memory method for cleaning and electronic equipment

Country Status (1)

Country Link
CN (1) CN104536907B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104866190A (en) * 2015-04-27 2015-08-26 努比亚技术有限公司 Mobile terminal and method for realizing internal storage clearing operation through multi-finger sliding by mobile terminal
CN105824702A (en) * 2016-03-22 2016-08-03 乐视云计算有限公司 Method and terminal for managing program memory footprint
CN105898077A (en) * 2016-06-21 2016-08-24 韩文杰 Smartphone capable of automatically cleaning memory
CN105893153A (en) * 2016-03-31 2016-08-24 北京百纳威尔无线通信设备有限公司 Memory cleaning method and device for mobile terminal
CN106774787A (en) * 2016-11-18 2017-05-31 北京奇虎科技有限公司 A kind of mode control method and electronic equipment
CN106980525A (en) * 2017-04-25 2017-07-25 北京奇虎科技有限公司 Using startup method, device and mobile terminal
CN107133097A (en) * 2017-04-16 2017-09-05 努比亚技术有限公司 Memory Optimize Method and device
CN107291549A (en) * 2016-03-31 2017-10-24 阿里巴巴集团控股有限公司 A kind of method and device for managing application program
WO2017185569A1 (en) * 2016-04-29 2017-11-02 北京小米移动软件有限公司 Method of clearing memory, device, and electronic apparatus
CN107665147A (en) * 2017-09-26 2018-02-06 厦门美图移动科技有限公司 The cleaned system method and mobile device of a kind of mobile device
CN107766134A (en) * 2017-09-26 2018-03-06 厦门美图移动科技有限公司 The cleaned system method and mobile device of a kind of mobile device
CN109117384A (en) * 2018-07-05 2019-01-01 麒麟合盛网络技术股份有限公司 A kind of reminding method and device of memory cleaning
WO2019047045A1 (en) * 2017-09-06 2019-03-14 深圳传音通讯有限公司 Memory cleaning method and user terminal
CN112948208A (en) * 2021-02-24 2021-06-11 视若飞信息科技(上海)有限公司 Memory monitoring and recycling method, system, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7096339B2 (en) * 2003-03-01 2006-08-22 International Business Machines Corporation System and method for detecting memory management programming errors
CN101859261A (en) * 2010-06-09 2010-10-13 中兴通讯股份有限公司 Control method and control equipment for releasing memory
CN103324575A (en) * 2012-03-23 2013-09-25 腾讯科技(深圳)有限公司 Memory clearing method and mobile terminal
CN103645955A (en) * 2013-12-16 2014-03-19 百度在线网络技术(北京)有限公司 Running management method and device for application program
CN104077191A (en) * 2014-07-18 2014-10-01 广州金山网络科技有限公司 Method and device used for managing memory resources
CN104298549A (en) * 2014-09-30 2015-01-21 北京金山安全软件有限公司 Method and device for cleaning application programs in mobile terminal and mobile terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7096339B2 (en) * 2003-03-01 2006-08-22 International Business Machines Corporation System and method for detecting memory management programming errors
CN101859261A (en) * 2010-06-09 2010-10-13 中兴通讯股份有限公司 Control method and control equipment for releasing memory
CN103324575A (en) * 2012-03-23 2013-09-25 腾讯科技(深圳)有限公司 Memory clearing method and mobile terminal
CN103645955A (en) * 2013-12-16 2014-03-19 百度在线网络技术(北京)有限公司 Running management method and device for application program
CN104077191A (en) * 2014-07-18 2014-10-01 广州金山网络科技有限公司 Method and device used for managing memory resources
CN104298549A (en) * 2014-09-30 2015-01-21 北京金山安全软件有限公司 Method and device for cleaning application programs in mobile terminal and mobile terminal

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104866190B (en) * 2015-04-27 2017-02-15 努比亚技术有限公司 Mobile terminal and method for realizing internal storage clearing operation through multi-finger sliding by mobile terminal
CN104866190A (en) * 2015-04-27 2015-08-26 努比亚技术有限公司 Mobile terminal and method for realizing internal storage clearing operation through multi-finger sliding by mobile terminal
CN105824702A (en) * 2016-03-22 2016-08-03 乐视云计算有限公司 Method and terminal for managing program memory footprint
CN107291549A (en) * 2016-03-31 2017-10-24 阿里巴巴集团控股有限公司 A kind of method and device for managing application program
CN105893153A (en) * 2016-03-31 2016-08-24 北京百纳威尔无线通信设备有限公司 Memory cleaning method and device for mobile terminal
CN107291549B (en) * 2016-03-31 2020-11-24 阿里巴巴集团控股有限公司 Method and device for managing application program
WO2017185569A1 (en) * 2016-04-29 2017-11-02 北京小米移动软件有限公司 Method of clearing memory, device, and electronic apparatus
US10409684B2 (en) 2016-04-29 2019-09-10 Beijing Xiaomi Mobile Software Co., Ltd. Method, device and storage medium for cleaning memory
CN105898077A (en) * 2016-06-21 2016-08-24 韩文杰 Smartphone capable of automatically cleaning memory
CN106774787A (en) * 2016-11-18 2017-05-31 北京奇虎科技有限公司 A kind of mode control method and electronic equipment
CN107133097A (en) * 2017-04-16 2017-09-05 努比亚技术有限公司 Memory Optimize Method and device
CN106980525A (en) * 2017-04-25 2017-07-25 北京奇虎科技有限公司 Using startup method, device and mobile terminal
WO2019047045A1 (en) * 2017-09-06 2019-03-14 深圳传音通讯有限公司 Memory cleaning method and user terminal
CN107766134A (en) * 2017-09-26 2018-03-06 厦门美图移动科技有限公司 The cleaned system method and mobile device of a kind of mobile device
CN107766134B (en) * 2017-09-26 2020-01-17 厦门美图移动科技有限公司 System cleaning method of mobile equipment and mobile equipment
CN107665147A (en) * 2017-09-26 2018-02-06 厦门美图移动科技有限公司 The cleaned system method and mobile device of a kind of mobile device
CN109117384A (en) * 2018-07-05 2019-01-01 麒麟合盛网络技术股份有限公司 A kind of reminding method and device of memory cleaning
CN112948208A (en) * 2021-02-24 2021-06-11 视若飞信息科技(上海)有限公司 Memory monitoring and recycling method, system, equipment and storage medium

Also Published As

Publication number Publication date
CN104536907B (en) 2018-11-09

Similar Documents

Publication Publication Date Title
CN104536907A (en) Memory cleaning method and electronic equipment
US10432533B2 (en) Automatic detection and prevention of network overload conditions using SDN
US9158649B2 (en) Methods and computer program products for generating a model of network application health
CN103501340B (en) Information push method, device and client
CN109547282B (en) Overload protection method and device, computer readable storage medium and server
US20150227388A1 (en) Method and device for handling optimization processes
WO2017004952A1 (en) Method and apparatus for detecting and stopping malicious clicking of advertisement link
CN109614168A (en) Memory Optimize Method and device
WO2020220748A1 (en) Application control method and apparatus, terminal, and computer-readable storage medium
US10642585B1 (en) Enhancing API service schemes
CN104994080A (en) Information processing method, system and electronic equipment
CN108540356B (en) Processing method and processing apparatus
CN108512917B (en) Data pushing method and system based on Websocket
US20230273831A1 (en) Instance allocation method, system, and apparatus
CN110460593B (en) Network address identification method, device and medium for mobile traffic gateway
CN107092551A (en) A kind of server system performance optimization method and device
WO2023000729A1 (en) System message sending method and apparatus for client
CN108933823B (en) User touch method and device
CN110377616A (en) A kind of data-erasure method, device, electronic equipment and storage medium
CN105117290A (en) Information processing method and system and electronic equipment
CN113553074B (en) Applet distribution control method, device, electronic equipment and storage medium
CN113747423B (en) Cloud mobile phone state synchronization method, device, equipment, storage medium and program product
CN112596924B (en) Internet of things middlebox server application remote procedure calling method and system
CN115576698A (en) Network card interrupt aggregation method, device, equipment and medium
CN108829316A (en) Data capture method, device, electronic equipment and readable storage medium storing program for executing

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