CN105224439A - Method and device for detecting CPU occupancy rate of terminal APP and terminal - Google Patents
Method and device for detecting CPU occupancy rate of terminal APP and terminal Download PDFInfo
- Publication number
- CN105224439A CN105224439A CN201410313568.9A CN201410313568A CN105224439A CN 105224439 A CN105224439 A CN 105224439A CN 201410313568 A CN201410313568 A CN 201410313568A CN 105224439 A CN105224439 A CN 105224439A
- Authority
- CN
- China
- Prior art keywords
- time period
- preset time
- app
- cpu usage
- cpu
- 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.)
- Pending
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention provides a method and a device for detecting CPU occupancy rate of a terminal APP and a terminal. Wherein, the method comprises the following steps: acquiring the CPU occupancy rate of a system of a terminal in a preset time period; and if the CPU occupancy rate of the system in a preset time period is greater than a preset threshold value, calculating the CPU occupancy rate of each APP running in the background of the system. The method, the device and the terminal for detecting the CPU occupancy rate of the terminal APP can reduce the consumption of terminal system resources, improve the operation efficiency of the terminal system and further improve the use experience of a user on the terminal.
Description
Technical field
The present invention relates to mobile communication technology field, particularly relate to the detection method of the CPU usage of a kind of terminal APP, device and terminal.
Background technology
Along with intelligent terminal, as the enhancing of the universal of smart mobile phone and panel computer and function, user is more and more higher for the performance requirement of smart mobile phone.Analytic function to system performance is provided in the operating system of smart mobile phone, such as, can adds up central processing unit (CentralProcessingUnit, the CPU) occupancy of intelligent terminal.
At present, intelligent terminal can each application program (APP of computing system running background, APPlication) CPU usage, but the CPU usage of each APP of existing computing system running background all adopts the mode calculated in real time, although adopt the mode that calculates in real time can monitoring intelligent mobile phone resource consumption situation all the time well, but a large amount of system resource can be consumed, thus the operational efficiency of intelligent terminal may be affected.
Summary of the invention
The present invention is intended to solve one of technical matters in correlation technique at least to a certain extent.For this reason, first object of the present invention is the detection method of the CPU usage proposing a kind of terminal APP, and the method can reduce the consumption of system resource, improves the operational efficiency of terminal system, and then can improve the experience of user to terminal.
Second object of the present invention is the pick-up unit of the CPU usage proposing a kind of terminal APP.
3rd object of the present invention is to propose a kind of terminal.
To achieve these goals, first aspect present invention embodiment proposes the detection method of the CPU usage of a kind of terminal APP, comprising: the CPU usage of system in preset time period obtaining described terminal; And if the CPU usage of described system in described preset time period is greater than predetermined threshold value, then calculate the CPU usage of each APP run in described system background.
The detection method of the CPU usage of the terminal APP of the embodiment of the present invention, obtain the CPU usage of system in preset time period of terminal, and when the CPU usage of system in preset time period of terminal is greater than predetermined threshold value, calculate the CPU usage of each APP run in system background, thus, reduce the consumption of system resource, improve the operational efficiency of terminal system, and then improve the experience of user to terminal.
To achieve these goals, second aspect present invention embodiment proposes the pick-up unit of the CPU usage of a kind of terminal APP, comprising: obtain module, for obtaining the CPU usage of system in preset time period of described terminal; And computing module, if be greater than predetermined threshold value for the CPU usage of described system in described preset time period, then calculate the CPU usage of each APP run in described system background.
The pick-up unit of the CPU usage of the terminal APP of the embodiment of the present invention, the CPU usage of system in preset time period of terminal is obtained by obtaining module, computing module is when the CPU usage of system in preset time period of terminal is greater than predetermined threshold value, calculate the CPU usage of each APP run in system background, thus, reduce the consumption of system resource, improve the operational efficiency of terminal system, and then improve the experience of user to terminal.
For achieving the above object, third aspect present invention embodiment proposes a kind of terminal, this terminal comprises housing, processor, storer, circuit board and power circuit, wherein, described circuit board is placed in the interior volume that described housing surrounds, and described processor and described storer are arranged on described circuit board; Described power circuit, for powering for each circuit of described terminal or device; Described storer is used for stores executable programs code; Described processor runs the program corresponding with described executable program code by reading the executable program code stored in described storer, for execution following steps: the CPU usage of system in preset time period obtaining described terminal; And if the CPU usage of described system in described preset time period is greater than predetermined threshold value, then calculate the CPU usage of each APP run in described system background.
The terminal of the embodiment of the present invention, obtain the CPU usage of system in preset time period of terminal, and when the CPU usage of system in preset time period of terminal is greater than predetermined threshold value, calculate the CPU usage of each APP run in system background, thus, reduce the consumption of system resource, improve the operational efficiency of terminal system, and then improve the experience of user to terminal.
The aspect that the present invention adds and advantage will part provide in the following description, and part will become obvious from the following description, or be recognized by practice of the present invention.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the detection method of the CPU usage of terminal APP according to an embodiment of the invention.
Fig. 2 is the page schematic diagram showing CPU usage according to an embodiment of the invention.
Fig. 3 is the structural representation of the pick-up unit of the CPU usage of terminal APP according to an embodiment of the invention.
Fig. 4 is the structural representation of the pick-up unit of the CPU usage of terminal APP in accordance with another embodiment of the present invention.
Embodiment
Be described below in detail embodiments of the invention, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has element that is identical or similar functions from start to finish.Be exemplary below by the embodiment be described with reference to the drawings, be intended to for explaining the present invention, and can not limitation of the present invention be interpreted as.
Below with reference to the accompanying drawings the detection method of the CPU usage of the terminal APP of the embodiment of the present invention, device and terminal are described.
Fig. 1 is the process flow diagram of the detection method of the CPU usage of terminal APP according to an embodiment of the invention, and as shown in Figure 1, the method comprises:
S101, obtains the CPU usage of system in preset time period of terminal.
Wherein, terminal can be smart mobile phone, the mobile terminals such as panel computer lamp, preset time period is greater than unit interval length, and preset time period can be user to be arranged at random, also can obtain according to history experimental data statistics, such as, first preset time period can be set to 1 minute, 3 minutes, 5 minutes, 7 minutes, 9 minutes, 11 minutes, 20 minutes, within 30 minutes, wait numerical value, and the CPU usage of system is obtained according to the time period arranged, then detect the system when the CPU usage of system is abnormal whether relatively can normally work, if when detecting that preset time period is 1-15 minute, system can relatively normally work, then preliminary preset time period is set to 1-15 minute, preferably, 5-10 minute can be set to.
It should be noted that, why arranging much larger than unit interval length by preset time period in this embodiment, such as, is 5-10 minute, is to effectively reduce system power dissipation.
In this embodiment, the time span that system takies CPU in preset time period can be obtained, then system is taken in preset time period the time span of CPU divided by the total run time length of CPU in preset time period, the CPU usage of the system that calculates in preset time period, such as, preset time period is 5 minutes, the total run time length of CPU in this preset time period is 5 minutes, and the time that system took CPU in 5 minutes is 2 minutes, then can calculate the CPU usage of system in 5 minutes is thus 40%.
S102, if the CPU usage of system in preset time period is greater than predetermined threshold value, then calculates the CPU usage of each APP run in system background.
Wherein, above-mentioned predetermined threshold value is the higher limit of the CPU usage pre-set in terminal system, if the CPU usage of system in Preset Time is less than or equal to the higher limit of the CPU usage that this pre-sets, then can think that system ruuning situation of system in preset time period is good, without the need to calculating the CPU usage of each APP of this Preset Time built-in system running background, thus, the consumption to system resource can be reduced, reduce the consumption to terminal power, the operational efficiency of raising system, extends the stand-by time of terminal.
It should be noted that, the object that the embodiment of the present invention calculates the CPU usage of each APP finds out the APP taking many cpu resources at running background, why first calculate the CPU usage of whole system, the CPU usage when whole system is only had to exceed predetermined threshold value, just go the CPU usage calculating each APP, be because: if the CPU usage of entire system is not high, so the CPU usage of APP itself also can not height, the CPU usage therefore calculating APP there is no need.
If the CPU usage of system in Preset Time is greater than the higher limit of the CPU usage pre-set, then think that system exists in preset time period abnormal, that is, there is the CPU usage of the APP of part or all of running background abnormal in this preset time period, therefore, the CPU usage of each APP in preset time period run in system background is calculated further.Particularly, each APP can be obtained in preset time period, take the time span that the time span of CPU and system take CPU in preset time period, and in preset time period, take according to each APP the time span that the time span of CPU and system take CPU in preset time period and calculate the CPU usage of each APP in preset time period, specifically, time span by each APP being taken in preset time period CPU to take the time span of CPU in preset time period divided by system, calculate the CPU usage of each APP in preset time period.
Such as, preset time period is 5 minutes, predetermined threshold value is 80%, and now to calculate the CPU usage of system in 5 minutes be 95%, then can judge that the CPU usage of system in 5 minutes has exceeded predetermined threshold value, that is, system was run in these 5 minutes to be existed extremely, then now need the CPU usage of each APP of further computing system running background, with the CPU usage making user can be informed in this 5 minutes each APP.
In addition, after calculating the CPU usage of each APP in preset time period that system background runs, also can show the CPU usage of each APP in preset time period, particularly, the DISPLAY ORDER of APP can be determined based on the size of the CPU usage of each APP in preset time period, and show the CPU usage of APP in preset time period in the form of a list according to DISPLAY ORDER, user can be facilitated thus to check the APP that in preset time period, CPU usage is larger.
Such as, preset time period is 5 minutes, calculate system background in these 5 points and run 6 APP, with APP1, APP2, APP3 ... APP6 represents this 6 APP respectively, wherein, the CPU usage of APP1 is 6%, the CPU usage of APP2 is 5%, the CPU usage of APP3 is 9%, the CPU usage of APP4 is 7%, APP, the CPU usage of 5 is 4%, the CPU usage of APP6 is 3%, now, user can see the page of an order display CPU usage as shown in Figure 2, pass through Fig. 2, user clearly can check the CPU usage of each APP, and the highest APP of CPU usage can be oriented rapidly.
In addition, after calculating the CPU usage of each APP in preset time period that system background runs, whether extremely can also judge the CPU usage of each APP in preset time period, particularly, for each APP, judge whether the CPU usage in current APP preset time period is greater than limit value, if be greater than limit value, then determine that the CPU usage of current APP in preset time period is abnormal, wherein, the higher limit of the CPU usage of predetermined value corresponding to current APP, and the higher limit of CPU usage corresponding to each APP is different.After the APP of the CPU usage exception of certainty annuity running background, also can show the APP of CPU usage exception in Preset Time, so that user is to the APP process of CPU usage exception.
As can be seen here, the embodiment of the present invention is not only from extending the angle of detection time (namely preset time period is greater than unit interval length) to reduce the consumption of system resource, and the CPU usage of APP is just detected when the CPU usage exception of system, namely the consumption of system resource is reduced from multiple dimension, practical.
The detection method embodiment of the CPU usage of above-mentioned terminal APP, obtain the CPU usage of system in preset time period of terminal, and when the CPU usage of system in preset time period of terminal is greater than predetermined threshold value, calculate the CPU usage of each APP run in system background, thus, reduce the consumption of system resource, improve the operational efficiency of terminal system, and then improve the experience of user to terminal.
In order to realize above-described embodiment, the present invention also proposes the pick-up unit of the CPU usage of a kind of terminal APP.
Fig. 3 is the structural representation of the pick-up unit of the CPU usage of terminal APP according to an embodiment of the invention, and as shown in Figure 3, this device comprises acquisition module 31 and computing module 32, wherein:
Obtain module 31 for obtaining the CPU usage of system in preset time period of terminal; And if computing module 32 is greater than predetermined threshold value for the CPU usage of said system in above-mentioned preset time period, then calculate the CPU usage of each APP at said system running background.
Wherein, terminal can be smart mobile phone, the mobile terminals such as panel computer lamp, preset time period is greater than unit interval length, and preset time period can be user to be arranged at random, also can obtain according to history experimental data statistics, such as, first preset time period can be set to 1 minute, 3 minutes, 5 minutes, 7 minutes, 9 minutes, 11 minutes, 20 minutes, within 30 minutes, wait numerical value, and the CPU usage of system is obtained according to the time period arranged, then detect the system when the CPU usage of system is abnormal whether relatively can normally work, if when detecting that preset time period is 1-15 minute, system can relatively normally work, then preliminary preset time period is set to 1-15 minute, preferably, 5-10 minute can be set to.
It should be noted that, the object that the embodiment of the present invention calculates the CPU usage of each APP finds out the APP taking many cpu resources at running background, why first calculate the CPU usage of whole system, the CPU usage when whole system is only had to exceed predetermined threshold value, just go the CPU usage calculating each APP, be because: if the CPU usage of entire system is not high, so the CPU usage of APP itself also can not height, the CPU usage therefore calculating APP there is no need.
Above-mentioned acquisition module 31 specifically for: obtain said system in above-mentioned preset time period, take the time span of CPU, by above-mentioned time span divided by the total run time length of above-mentioned CPU in preset time period, calculate the CPU usage of said system in above-mentioned preset time period.
Above-mentioned computing module 32 specifically for: calculate the CPU usage of each APP in above-mentioned preset time period at said system running background.Specifically, computing module 32 can obtain each APP in above-mentioned preset time period, take the time span that the time span of CPU and said system take CPU in above-mentioned preset time period, the time span above-mentioned each APP being taken in above-mentioned preset time period CPU takies the time span of CPU in above-mentioned preset time period divided by said system, calculate the CPU usage of each APP in above-mentioned preset time period.
Conveniently user inquires about the CPIU occupancy of each APP in preset time period, as shown in Figure 4, said apparatus can also comprise display module 33, this display module 33, for after calculate each APP at said system running background CPU usage in above-mentioned preset time period at above-mentioned computing module 32, shows the CPU usage of each APP in above-mentioned preset time period.
Particularly, above-mentioned display module 33 can determine the DISPLAY ORDER of APP based on the size of the CPU usage of each APP in above-mentioned preset time period, and show the CPU usage of above-mentioned APP in above-mentioned preset time period according to above-mentioned DISPLAY ORDER, thus, user can be facilitated to check the APP that in preset time period, CPU usage is larger.
In addition, said apparatus can also comprise determination module 34, this determination module 34 is for after calculating each APP at said system running background CPU usage in above-mentioned preset time period at above-mentioned computing module 32, for each APP, judge whether the CPU usage of current APP in above-mentioned preset time period is greater than predetermined value, if be greater than, then determine that the CPU usage of current APP in above-mentioned preset time period is abnormal.After the APP of the CPU usage exception of determination module 34 certainty annuity running background, display module 33 also can be used for the APP showing CPU usage exception in preset time period.
The process that the pick-up unit comprising the CPU usage of the terminal APP obtaining module 31, computing module 32, display module 33 and determination module 34 carries out detecting see Fig. 1, can not repeat herein.
The pick-up unit embodiment of the CPU usage of above-mentioned terminal APP, the CPU usage of system in preset time period of terminal is obtained by obtaining module, computing module is when the CPU usage of system in preset time period of terminal is greater than predetermined threshold value, calculate the CPU usage of each APP run in system background, thus, reduce the consumption of system resource, improve the operational efficiency of terminal system, and then improve the experience of user to terminal.
In order to realize above-described embodiment, the present invention also proposes a kind of terminal, and this terminal comprises housing, processor, storer, circuit board and power circuit, wherein, foregoing circuit plate is placed in the interior volume that above-mentioned housing surrounds, and above-mentioned processor and above-mentioned storer are arranged on foregoing circuit plate; Above-mentioned power circuit, for powering for each circuit of above-mentioned terminal or device; Above-mentioned storer is used for stores executable programs code; Above-mentioned processor runs the program corresponding with above-mentioned executable program code by reading the executable program code stored in above-mentioned storer, for execution following steps:
S101 ', obtains the CPU usage of system in preset time period of terminal.
Wherein, terminal can be smart mobile phone, the mobile terminals such as panel computer, preset time period is greater than unit interval length, and preset time period can be user to be arranged at random, also can obtain according to history experimental data statistics, such as, first preset time period can be set to 1 minute, 3 minutes, 5 minutes, 7 minutes, 9 minutes, 11 minutes, 20 minutes, within 30 minutes, wait numerical value, and the CPU usage of system is obtained according to the time period arranged, then detect the system when the CPU usage of system is abnormal whether relatively can normally work, if when detecting that preset time period is 1-15 minute, system can relatively normally work, then preliminary preset time period is set to 1-15 minute, preferably, 5-10 minute can be set to.
It should be noted that, why arranging much larger than unit interval length by preset time period in this embodiment, such as, is 5-10 minute, is to effectively reduce system power dissipation.
In this embodiment, the time span that system takies CPU in preset time period can be obtained, then system is taken in preset time period the time span of CPU divided by the total run time length of CPU in preset time period, the CPU usage of the system that calculates in preset time period, such as, preset time period is 5 minutes, the total run time length of CPU in this preset time period is 5 minutes, and the time that system took CPU in 5 minutes is 2 minutes, then can calculate the CPU usage of system in 5 minutes is thus 40%.
S102 ', if the CPU usage of system in preset time period is greater than predetermined threshold value, then calculates the CPU usage of each APP run in system background.
Wherein, above-mentioned predetermined threshold value is the higher limit of the CPU usage pre-set in terminal system, if the CPU usage of system in Preset Time is less than or equal to the higher limit of the CPU usage that this pre-sets, then can think that system ruuning situation of system in preset time period is good, without the need to calculating the CPU usage of each APP of this Preset Time built-in system running background, thus, the consumption to system resource can be reduced, reduce the consumption to terminal power, the operational efficiency of raising system, extends the stand-by time of terminal.
It should be noted that, the object that the embodiment of the present invention calculates the CPU usage of each APP finds out the APP taking many cpu resources at running background, why first calculate the CPU usage of whole system, the CPU usage when whole system is only had to exceed predetermined threshold value, just go the CPU usage calculating each APP, be because: if the CPU usage of entire system is not high, so the CPU usage of APP itself also can not height, the CPU usage therefore calculating APP there is no need.
If the CPU usage of system in Preset Time is greater than the higher limit of the CPU usage pre-set, then think that system exists in preset time period abnormal, that is, there is the CPU usage of the APP of part or all of running background abnormal in this preset time period, therefore, the CPU usage of each APP in preset time period run in system background is calculated further.Particularly, each APP can be obtained in preset time period, take the time span that the time span of CPU and system take CPU in preset time period, and in preset time period, take according to each APP the time span that the time span of CPU and system take CPU in preset time period and calculate the CPU usage of each APP in preset time period, specifically, time span by each APP being taken in preset time period CPU to take the time span of CPU in preset time period divided by system, calculate the CPU usage of each APP in preset time period.
Such as, preset time period is 5 minutes, predetermined threshold value is 80%, and now to calculate the CPU usage of system in 5 minutes be 95%, then can judge that the CPU usage of system in 5 minutes has exceeded predetermined threshold value, that is, system was run in these 5 minutes to be existed extremely, then now need the CPU usage of each APP of further computing system running background, with the CPU usage making user can be informed in this 5 minutes each APP.
In addition, after calculating the CPU usage of each APP in preset time period that system background runs, also can show the CPU usage of each APP in preset time period, particularly, the DISPLAY ORDER of APP can be determined based on the size of the CPU usage of each APP in preset time period, and show the CPU usage of APP in preset time period in the form of a list according to DISPLAY ORDER, user can be facilitated thus to check the APP that in preset time period, CPU usage is larger.
Such as, preset time period is 5 minutes, calculate system background in these 5 points and run 6 APP, with APP1, APP2, APP3 ... APP6 represents this 6 APP respectively, wherein, the CPU usage of APP1 is 6%, the CPU usage of APP2 is 5%, the CPU usage of APP3 is 9%, the CPU usage of APP4 is 7%, APP, the CPU usage of 5 is 4%, the CPU usage of APP6 is 3%, now, user can see the page sequentially showing CPU usage as shown in Figure 2, pass through Fig. 2, user clearly can check the CPU usage of each APP, and the highest APP of CPU usage can be oriented rapidly.
In addition, after calculating the CPU usage of each APP in preset time period that system background runs, whether extremely can also judge the CPU usage of each APP in preset time period, particularly, for each APP, judge whether the CPU usage in current APP preset time period is greater than limit value, if be greater than limit value, then determine that the CPU usage of current APP in preset time period is abnormal, wherein, the higher limit of the CPU usage of predetermined value corresponding to current APP, and the higher limit of CPU usage corresponding to each APP is different.After the APP of the CPU usage exception of certainty annuity running background, also can show the APP of CPU usage exception in Preset Time, so that user is to the APP process of CPU usage exception.
As can be seen here, the embodiment of the present invention is not only from extending the angle of detection time (namely preset time period is greater than unit interval length) to reduce the consumption of system resource, and the CPU usage of APP is just detected when the CPU usage exception of system, namely the consumption of system resource is reduced from multiple dimension, practical.
Above-mentioned terminal embodiment, obtain the CPU usage of system in preset time period of terminal, and when the CPU usage of system in preset time period of terminal is greater than predetermined threshold value, calculate the CPU usage of each APP run in system background, thus, reduce the consumption of system resource, improve the operational efficiency of terminal system, and then improve the experience of user to terminal.
In the description of this instructions, specific features, structure, material or feature that the description of reference term " embodiment ", " some embodiments ", " example ", " concrete example " or " some examples " etc. means to describe in conjunction with this embodiment or example are contained at least one embodiment of the present invention or example.In this manual, to the schematic representation of above-mentioned term not must for be identical embodiment or example.And the specific features of description, structure, material or feature can combine in one or more embodiment in office or example in an appropriate manner.In addition, when not conflicting, the feature of the different embodiment described in this instructions or example and different embodiment or example can carry out combining and combining by those skilled in the art.
In addition, term " first ", " second " only for describing object, and can not be interpreted as instruction or hint relative importance or imply the quantity indicating indicated technical characteristic.Thus, be limited with " first ", the feature of " second " can express or impliedly comprise at least one this feature.In describing the invention, the implication of " multiple " is at least two, such as two, three etc., unless otherwise expressly limited specifically.
Describe and can be understood in process flow diagram or in this any process otherwise described or method, represent and comprise one or more for realizing the module of the code of the executable instruction of the step of specific logical function or process, fragment or part, and the scope of the preferred embodiment of the present invention comprises other realization, wherein can not according to order that is shown or that discuss, comprise according to involved function by the mode while of basic or by contrary order, carry out n-back test, this should understand by embodiments of the invention person of ordinary skill in the field.
In flow charts represent or in this logic otherwise described and/or step, such as, the sequencing list of the executable instruction for realizing logic function can be considered to, may be embodied in any computer-readable medium, for instruction execution system, device or equipment (as computer based system, comprise the system of processor or other can from instruction execution system, device or equipment instruction fetch and perform the system of instruction) use, or to use in conjunction with these instruction execution systems, device or equipment.With regard to this instructions, " computer-readable medium " can be anyly can to comprise, store, communicate, propagate or transmission procedure for instruction execution system, device or equipment or the device that uses in conjunction with these instruction execution systems, device or equipment.The example more specifically (non-exhaustive list) of computer-readable medium comprises following: the electrical connection section (electronic installation) with one or more wiring, portable computer diskette box (magnetic device), random access memory (RAM), ROM (read-only memory) (ROM), erasablely edit ROM (read-only memory) (EPROM or flash memory), fiber device, and portable optic disk ROM (read-only memory) (CDROM).In addition, computer-readable medium can be even paper or other suitable media that can print described program thereon, because can such as by carrying out optical scanning to paper or other media, then carry out editing, decipher or carry out process with other suitable methods if desired and electronically obtain described program, be then stored in computer memory.
Should be appreciated that each several part of the present invention can realize with hardware, software, firmware or their combination.In the above-described embodiment, multiple step or method can with to store in memory and the software performed by suitable instruction execution system or firmware realize.Such as, if realized with hardware, the same in another embodiment, can realize by any one in following technology well known in the art or their combination: the discrete logic with the logic gates for realizing logic function to data-signal, there is the special IC of suitable combinational logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) etc.
Those skilled in the art are appreciated that realizing all or part of step that above-described embodiment method carries is that the hardware that can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, this program perform time, step comprising embodiment of the method one or a combination set of.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing module, also can be that the independent physics of unit exists, also can be integrated in a module by two or more unit.Above-mentioned integrated module both can adopt the form of hardware to realize, and the form of software function module also can be adopted to realize.If described integrated module using the form of software function module realize and as independently production marketing or use time, also can be stored in a computer read/write memory medium.
The above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.Although illustrate and describe embodiments of the invention above, be understandable that, above-described embodiment is exemplary, can not be interpreted as limitation of the present invention, and those of ordinary skill in the art can change above-described embodiment within the scope of the invention, revises, replace and modification.
Claims (21)
1. a detection method for the CPU usage of terminal APP, is characterized in that, comprising:
Obtain the CPU usage of system in preset time period of described terminal; And
If the CPU usage of described system in described preset time period is greater than predetermined threshold value, then calculate the CPU usage of each APP run in described system background.
2. method according to claim 1, is characterized in that, the CPU usage of system in preset time period of the described terminal of described acquisition, comprising:
Obtain the time span that described system takies CPU in described preset time period, by described time span divided by the total run time length of described CPU in described preset time period, calculate the CPU usage of described system in described preset time period.
3. method according to claim 1, is characterized in that, the CPU usage of each APP that described calculating runs in described system background, comprising:
Calculate the CPU usage of each APP in described preset time period run in described system background.
4. method according to claim 1, is characterized in that, described preset time period is obtain based on history experimental data.
5. method according to claim 3, is characterized in that, the CPU usage of each APP in described preset time period that described calculating runs in described system background, comprising:
Obtain each APP in described preset time period, take the time span that the time span of CPU and described system take CPU in described preset time period, the time span described each APP being taken in described preset time period CPU takies the time span of CPU in described preset time period divided by described system, calculate the CPU usage of each APP in described preset time period.
6. method according to claim 5, is characterized in that, after the CPU usage of each APP run in described system background in described preset time period, also comprises in described calculating:
Show the CPU usage of each APP in described preset time period.
7. method according to claim 6, is characterized in that, the CPU usage of each APP of described display in described preset time period, comprising:
Size based on the CPU usage of each APP in described preset time period determines the DISPLAY ORDER of APP, and shows the CPU usage of described APP in described preset time period according to described DISPLAY ORDER.
8. the method according to the arbitrary claim of claim 1-7, is characterized in that, described preset time period is greater than unit interval length.
9. method according to claim 8, is characterized in that, described preset time period is 5-10 minute.
10. method according to claim 9, is characterized in that, after the CPU usage of each APP run in described system background in described preset time period, also comprises in described calculating:
For each APP, judge whether the CPU usage of current APP in described preset time period is greater than predetermined value, if be greater than, then determine that the CPU usage of current APP in described preset time period is abnormal.
The pick-up unit of the CPU usage of 11. 1 kinds of terminal APP, is characterized in that, comprising:
Obtain module, for obtaining the CPU usage of system in preset time period of described terminal; And
Computing module, if be greater than predetermined threshold value for the CPU usage of described system in described preset time period, then calculates the CPU usage of each APP run in described system background.
12. devices according to claim 11, is characterized in that, described acquisition module, specifically for:
Obtain the time span that described system takies CPU in described preset time period, by described time span divided by the total run time length of described CPU in described preset time period, calculate the CPU usage of described system in described preset time period.
13. devices according to claim 11, is characterized in that, described computing module, specifically for:
Calculate the CPU usage of each APP in described preset time period run in described system background.
14. devices according to claim 11, is characterized in that, described preset time period is obtain based on history experimental data.
15. devices according to claim 13, is characterized in that, described computing module, also for:
Obtain each APP in described preset time period, take the time span that the time span of CPU and described system take CPU in described preset time period, the time span described each APP being taken in described preset time period CPU takies the time span of CPU in described preset time period divided by described system, calculate the CPU usage of each APP in described preset time period.
16. devices according to claim 15, is characterized in that, also comprise:
Display module, for calculate each APP of running in described system background CPU usage in described preset time period at described computing module after, shows the CPU usage of each APP in described preset time period.
17. devices according to claim 16, is characterized in that, described display module, specifically for:
Size based on the CPU usage of each APP in described preset time period determines the DISPLAY ORDER of APP, and shows the CPU usage of described APP in described preset time period according to described DISPLAY ORDER.
18. devices according to the arbitrary claim of claim 11-17, it is characterized in that, described preset time period is greater than unit interval length.
19. devices according to claim 18, is characterized in that, described preset time period is 5-10 minute.
20. devices according to claim 19, is characterized in that, also comprise:
Determination module, for calculate each APP of running in described system background CPU usage in described preset time period at described computing module after, for each APP, judge whether the CPU usage of current APP in described preset time period is greater than predetermined value, if be greater than, then determine that the CPU usage of current APP in described preset time period is abnormal.
21. 1 kinds of terminals, described terminal comprises housing, processor, storer, circuit board and power circuit, and wherein, described circuit board is placed in the interior volume that described housing surrounds, and described processor and described storer are arranged on described circuit board; Described power circuit, for powering for each circuit of described terminal or device; Described storer is used for stores executable programs code; Described processor runs the program corresponding with described executable program code by reading the executable program code stored in described storer, for execution following steps:
Obtain the CPU usage of system in preset time period of described terminal; And
If the CPU usage of described system in described preset time period is greater than predetermined threshold value, then calculate the CPU usage of each APP run in described system background.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410313568.9A CN105224439A (en) | 2014-07-02 | 2014-07-02 | Method and device for detecting CPU occupancy rate of terminal APP and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410313568.9A CN105224439A (en) | 2014-07-02 | 2014-07-02 | Method and device for detecting CPU occupancy rate of terminal APP and terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105224439A true CN105224439A (en) | 2016-01-06 |
Family
ID=54993424
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410313568.9A Pending CN105224439A (en) | 2014-07-02 | 2014-07-02 | Method and device for detecting CPU occupancy rate of terminal APP and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105224439A (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105824631A (en) * | 2016-03-16 | 2016-08-03 | 深圳市金立通信设备有限公司 | Control method of application program and terminal |
CN105955869A (en) * | 2016-05-12 | 2016-09-21 | 捷开通讯科技(上海)有限公司 | Electronic device abnormal application monitoring and processing system and method |
CN106055408A (en) * | 2016-05-31 | 2016-10-26 | 广东欧珀移动通信有限公司 | Application control method and mobile terminal |
CN106371971A (en) * | 2016-08-30 | 2017-02-01 | 深圳市金立通信设备有限公司 | Method for reminding terminal performance and terminal |
CN106445783A (en) * | 2016-09-27 | 2017-02-22 | 北京金山安全软件有限公司 | Method and device for detecting jamming of electronic equipment and electronic equipment |
CN106681475A (en) * | 2016-12-12 | 2017-05-17 | 北京珠穆朗玛移动通信有限公司 | Method for reducing power consumption of mobile terminal and mobile terminal |
CN106775828A (en) * | 2016-11-25 | 2017-05-31 | 广东欧珀移动通信有限公司 | Application program installation method and device, computer equipment |
CN107291590A (en) * | 2017-05-24 | 2017-10-24 | 珠海金山网络游戏科技有限公司 | A kind of system and method for detecting CPU usage and automatically generating performance evaluation file |
CN107368400A (en) * | 2017-08-01 | 2017-11-21 | 广东欧珀移动通信有限公司 | CPU monitoring methods, device, computer-readable recording medium and mobile terminal |
WO2017206476A1 (en) * | 2016-06-01 | 2017-12-07 | 北京金山安全软件有限公司 | Method, device and apparatus for detecting cpu occupation |
CN107783833A (en) * | 2016-08-25 | 2018-03-09 | 华为技术有限公司 | A kind of management method and device of terminal background application |
CN108334345A (en) * | 2017-08-14 | 2018-07-27 | 广东欧珀移动通信有限公司 | Applied program processing method, device, readable storage medium storing program for executing and mobile terminal |
CN109725702A (en) * | 2018-12-28 | 2019-05-07 | 三星电子(中国)研发中心 | A kind of intelligent terminal power-economizing method and equipment based on AI prediction |
WO2019218673A1 (en) * | 2018-05-18 | 2019-11-21 | 珠海格力电器股份有限公司 | Information processing method, terminal, and readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102141942A (en) * | 2011-04-01 | 2011-08-03 | 奇智软件(北京)有限公司 | Method and device for monitoring and protecting equipment |
CN102946486A (en) * | 2012-11-20 | 2013-02-27 | 惠州Tcl移动通信有限公司 | Background application automatic clearing method based on mobile phone and mobile phone |
CN103220427A (en) * | 2013-04-16 | 2013-07-24 | 广东欧珀移动通信有限公司 | Mobile phone background program cleaning method and mobile phone |
CN103455407A (en) * | 2013-09-03 | 2013-12-18 | 小米科技有限责任公司 | Mobile terminal CPU (Central Processing Unit) occupation rate monitoring method and device and mobile terminal |
US20140025971A1 (en) * | 2012-07-19 | 2014-01-23 | Tencent Technology (Shenzhen) Company Limited | Method and device for controlling terminal and terminal thereof |
-
2014
- 2014-07-02 CN CN201410313568.9A patent/CN105224439A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102141942A (en) * | 2011-04-01 | 2011-08-03 | 奇智软件(北京)有限公司 | Method and device for monitoring and protecting equipment |
US20140025971A1 (en) * | 2012-07-19 | 2014-01-23 | Tencent Technology (Shenzhen) Company Limited | Method and device for controlling terminal and terminal thereof |
CN102946486A (en) * | 2012-11-20 | 2013-02-27 | 惠州Tcl移动通信有限公司 | Background application automatic clearing method based on mobile phone and mobile phone |
CN103220427A (en) * | 2013-04-16 | 2013-07-24 | 广东欧珀移动通信有限公司 | Mobile phone background program cleaning method and mobile phone |
CN103455407A (en) * | 2013-09-03 | 2013-12-18 | 小米科技有限责任公司 | Mobile terminal CPU (Central Processing Unit) occupation rate monitoring method and device and mobile terminal |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105824631A (en) * | 2016-03-16 | 2016-08-03 | 深圳市金立通信设备有限公司 | Control method of application program and terminal |
CN105955869A (en) * | 2016-05-12 | 2016-09-21 | 捷开通讯科技(上海)有限公司 | Electronic device abnormal application monitoring and processing system and method |
CN106055408A (en) * | 2016-05-31 | 2016-10-26 | 广东欧珀移动通信有限公司 | Application control method and mobile terminal |
US10496445B2 (en) | 2016-05-31 | 2019-12-03 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Method for controlling application and related devices |
WO2017206902A1 (en) * | 2016-05-31 | 2017-12-07 | 广东欧珀移动通信有限公司 | Application control method and related device |
US10671437B2 (en) | 2016-05-31 | 2020-06-02 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Method for controlling application and related devices |
CN106055408B (en) * | 2016-05-31 | 2017-11-24 | 广东欧珀移动通信有限公司 | A kind of application control method and mobile terminal |
WO2017206476A1 (en) * | 2016-06-01 | 2017-12-07 | 北京金山安全软件有限公司 | Method, device and apparatus for detecting cpu occupation |
CN107783833B (en) * | 2016-08-25 | 2020-04-28 | 华为技术有限公司 | Management method and device for terminal background application program |
CN107783833A (en) * | 2016-08-25 | 2018-03-09 | 华为技术有限公司 | A kind of management method and device of terminal background application |
CN106371971A (en) * | 2016-08-30 | 2017-02-01 | 深圳市金立通信设备有限公司 | Method for reminding terminal performance and terminal |
CN106445783A (en) * | 2016-09-27 | 2017-02-22 | 北京金山安全软件有限公司 | Method and device for detecting jamming of electronic equipment and electronic equipment |
CN106775828B (en) * | 2016-11-25 | 2020-07-03 | Oppo广东移动通信有限公司 | Application program installation method and device and computer equipment |
CN106775828A (en) * | 2016-11-25 | 2017-05-31 | 广东欧珀移动通信有限公司 | Application program installation method and device, computer equipment |
CN106681475A (en) * | 2016-12-12 | 2017-05-17 | 北京珠穆朗玛移动通信有限公司 | Method for reducing power consumption of mobile terminal and mobile terminal |
CN107291590A (en) * | 2017-05-24 | 2017-10-24 | 珠海金山网络游戏科技有限公司 | A kind of system and method for detecting CPU usage and automatically generating performance evaluation file |
WO2019024804A1 (en) * | 2017-08-01 | 2019-02-07 | Oppo广东移动通信有限公司 | Cpu monitoring method, computer readable storage medium, and mobile terminal |
CN107368400A (en) * | 2017-08-01 | 2017-11-21 | 广东欧珀移动通信有限公司 | CPU monitoring methods, device, computer-readable recording medium and mobile terminal |
CN108334345A (en) * | 2017-08-14 | 2018-07-27 | 广东欧珀移动通信有限公司 | Applied program processing method, device, readable storage medium storing program for executing and mobile terminal |
WO2019218673A1 (en) * | 2018-05-18 | 2019-11-21 | 珠海格力电器股份有限公司 | Information processing method, terminal, and readable storage medium |
CN109725702A (en) * | 2018-12-28 | 2019-05-07 | 三星电子(中国)研发中心 | A kind of intelligent terminal power-economizing method and equipment based on AI prediction |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105224439A (en) | Method and device for detecting CPU occupancy rate of terminal APP and terminal | |
CN105335134A (en) | Method and device for processing CPU occupancy rate abnormity of APP and mobile terminal | |
EP3391634B1 (en) | Electronic device and method for controlling application and component | |
CN105676993A (en) | Method and device for saving electric quantity and electronic equipment | |
CN104298612A (en) | Method and device for cleaning memory in mobile terminal and mobile terminal | |
CN104239196A (en) | Method and device for detecting abnormal operation of application program and mobile terminal | |
CN104199727A (en) | Method and device for reducing terminal temperature and terminal | |
CN104317608A (en) | Management method and device for pre-installed application program in mobile terminal and client | |
CN104268248A (en) | Recommendation method and device for application program and terminal | |
CN105573896A (en) | Running reminding method and device for application program | |
CN104199765A (en) | Method and device for acquiring normal temperature value range of terminal device and terminal | |
CN105094862A (en) | Method for detecting whether application program is installed or not and browser | |
CN104932963B (en) | The method and device of management terminal | |
CN104731301A (en) | Mobile terminal, power-saving operation method of mobile terminal, power-saving operation system of mobile terminal | |
KR20160055220A (en) | Method, Apparatus and Terminal For Processor Core Processing | |
CN103927230A (en) | Memory usage feedback method and device | |
CN104216740A (en) | Application software management method and device and terminal | |
CN104123490A (en) | Method and device for processing malicious bundled software and mobile terminal | |
CN104268049A (en) | Method, device and terminal for judging storage device abnormity | |
CN104267995A (en) | Application processing method and device and terminal | |
CN112749013B (en) | Thread load detection method and device, electronic equipment and storage medium | |
CN104199759B (en) | Application program identification method and device causing terminal temperature rise and terminal | |
WO2016023520A1 (en) | Method and device for recognizing application causing temperature rise of terminal, and terminal | |
CN105177919A (en) | Washing machine system, washing machine and washing machine water consumption monitoring method | |
CN104182330A (en) | Application recommendation method and device and 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160106 |
|
RJ01 | Rejection of invention patent application after publication |