CN106095052B - Control the method and device of CPU power consumption - Google Patents

Control the method and device of CPU power consumption Download PDF

Info

Publication number
CN106095052B
CN106095052B CN201610380713.4A CN201610380713A CN106095052B CN 106095052 B CN106095052 B CN 106095052B CN 201610380713 A CN201610380713 A CN 201610380713A CN 106095052 B CN106095052 B CN 106095052B
Authority
CN
China
Prior art keywords
processor core
fps
display thread
thread
display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610380713.4A
Other languages
Chinese (zh)
Other versions
CN106095052A (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.)
Shanghai Jinsheng Communication Technology Co ltd
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610380713.4A priority Critical patent/CN106095052B/en
Priority to CN201810227266.8A priority patent/CN108509016B/en
Publication of CN106095052A publication Critical patent/CN106095052A/en
Priority to PCT/CN2017/086454 priority patent/WO2017206859A1/en
Application granted granted Critical
Publication of CN106095052B publication Critical patent/CN106095052B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/324Power saving characterised by the action undertaken by lowering clock frequency
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/325Power saving in peripheral device
    • G06F1/3265Power saving in display device

Abstract

The embodiment of the invention discloses a kind of method for controlling CPU power consumption, including:Detection shows the screen refresh rate FPS of thread;Obtain processor core corresponding to the display thread;The running frequency of processor core according to corresponding to the FPS of display thread adjusts the display thread;The running frequency of the processor core is detected, when the running frequency for detecting the processor core is more than threshold value, increases new processor core for the display thread.In addition, the embodiment of the invention also discloses a kind of device for controlling CPU power consumption.Using the present invention, the power consumption of terminal can be reduced.

Description

Control the method and device of CPU power consumption
Technical field
The present invention relates to field of terminal, more particularly to a kind of method and device for controlling CPU power consumption.
Background technology
With the continuous development of processor technology, multi-core technology turns into the important directions of current processor development.Compared to biography The monokaryon chip of system, polycaryon processor technology realize the constant feelings of keep frequency by way of multiple process cores are assisted mutually Under condition, the significantly performance of lifting system.
For the display content shown on the display interface in terminal, display content by multiple different modules or Region is formed, and the display content of different zones or module is responsible in the application of different prospects, for example, renewal is responsible in the application of signal column Signal shows that electricity control module is responsible for updating battery electric quantity icon.Each prospect, which is applied, completes the one of its display window After frame display data prepares, the calling kernel of synthetic operation, then active can be completed with the content of current whole show layers Display interface, display content is sent to display device and shown.Technical staff has found in practice process, due to difference Display thread be responsible for the display of different prospect applications and the refreshing of display window, and during showing and refreshing, Single point in time, the difference of refresh rate corresponding to multiple applications, shape library algorithm may also be different, and which results in processor core Violent change may occur in a short time for load.
And handle in an operating system in nuclear control, frequency regulator is responsible for the frequency hopping pressure regulation operation of kernel, hot plug control Molding block is responsible for the switch of multiple process cores, and processing method is mainly periodically according to the running frequency of currently processed sum and change Change direction to preset load, or the switch of each process cores is determined according to the number of tasks run in the unit interval;Also It is to say, during current interface refreshes, frequency regulator and hot plug control module can't detect any interface Refresh the behavior of application, that is to say, that the process cores of operation can't be adjusted, the disposal ability of processor is but still protected Hold constant.
That is, in the prior art in the control program of polycaryon processor, processor can not aware application interface The change of renewal, so, even if change occurs in the load corresponding to application interface renewal, the disposal ability of processor can't It is adjusted therewith, the problem of this load for allowing for processor is likely to occur overload, the disposal ability deficiency of processor And cause phenomena such as interim card occur, or, the load of processor may kick the beam, and some kernels of processor may be in " sky Turning " there is unnecessary electricity and wastes in state and causing.
The content of the invention
Based on this, the present invention for solve in conventional art during application refreshes interface because polycaryon processor Frequency or quantity and the current operational factor of terminal mismatch and the excessive technical problem of existing power consumption, and spy proposes a kind of control The method of CPU power consumption processed.
A kind of method for controlling CPU power consumption, including:
Detection shows the screen refresh rate FPS of thread;
Obtain processor core corresponding to the display thread;
The running frequency of processor core according to corresponding to the FPS of display thread adjusts the display thread;
The running frequency of the processor core is detected, is more than threshold value in the running frequency for detecting the processor core When, increase new processor core for the display thread.
Optionally, in one embodiment, the processor according to corresponding to the FPS for showing thread adjusts the display thread The running frequency of core includes:
When the FPS of the display thread is less than the first FPS threshold values, processor core corresponding to the display thread is heightened Running frequency;
When the FPS of the display thread is higher than the 2nd FPS threshold values, processor core corresponding to the display thread is turned down Running frequency;
The 2nd FPS threshold values are higher than the first FPS threshold values.
Optionally, in one embodiment, the processor according to corresponding to the FPS for showing thread adjusts the display thread The running frequency of core also includes:
When the FPS of the display thread is less than the 3rd FPS threshold values, the display thread is defined as being in idle shapes State;
The 3rd FPS threshold values are less than the first FPS threshold values.
Optionally, in one embodiment, methods described also includes:
The data volume change of the display thread refresh process is obtained, computation processor core is changed according to the data volume Resources limit;
Also include after the running frequency of the detection processor core:
According to the new processor core of the processor core resource limit regulating frequency or increase.
Optionally, in one embodiment, the data volume for obtaining the display thread refresh process, which changes, is specially:
According to formula
M=(ABS (Xnew*Ynew-Xold*Yold) | Npixel) * Byte
The data volume change of the display thread refresh process is calculated, wherein, the Xnew*Ynew is represented after refreshing Window size, the Xold*Yold represent the window size before refreshing, and the Npixel is represented after refreshing relative to refreshing Change pixel number before, the Byte represent each pixel size of data;
It is described to be specially according to data volume change computation processor core resource limit:
According to formula
Percentage=(M1+M2+M3+ ...)/(P*Xtotal*Ytotal)
Screen change percentage is calculated, wherein the P represents to show the quantity of thread, the Xtotal*Ytotal is represented Screen resolution, the Mi represent the data volume change of i-th of display thread refresh process, the i=1,2 ..., P;
Then according to formula
Nnew*Fnew=Nmax*Fmax*Percentage (screen change percentage)
The processor core resource limit is calculated, wherein, the Nnew represents new online processor core quantity, institute The peak frequency that Fnew represents new processor core is stated, the Nmax represents available processors core amounts, the Fmax tables Show the limiting frequency of available processors core.
In addition, the present invention for solve conventional art in application refresh interface during because polycaryon processor frequency Rate or quantity and the current operational factor of terminal mismatch and the excessive technical problem of existing power consumption, and spy proposes a kind of control The device of CPU power consumption.
A kind of device for controlling CPU power consumption, including:
Screen refresh rate detection module, the screen refresh rate FPS of thread is shown for detecting;
Processor core determining module, for obtaining processor core corresponding to the display thread;
Processor frequencies adjustment module, for according to display thread FPS adjust the display thread corresponding to processor core The running frequency of the heart;
Processor core adjusting module, for detecting the running frequency of the processor core, detecting the processing When the running frequency of device core is more than threshold value, increase new processor core for the display thread.
Optionally, in one embodiment, the processor frequencies adjustment module is additionally operable to the FPS in the display thread During less than the first FPS threshold values, the running frequency of processor core corresponding to the display thread is heightened;In the display thread When FPS is higher than the 2nd FPS threshold values, the running frequency of processor core corresponding to the display thread is turned down;The 2nd FPS threshold values Higher than the first FPS threshold values.
Optionally, in one embodiment, the processor frequencies adjustment module is additionally operable to the FPS in the display thread During less than the 3rd FPS threshold values, the display thread is defined as being in idle states;The 3rd FPS threshold values are less than described the One FPS threshold values.
Optionally, in one embodiment, described device also includes processor core resource limit computing module, for obtaining The data volume change of the display thread refresh process is taken, computation processor core resource limit is changed according to the data volume;
The processor core adjusting module is additionally operable to according to the processor core resource limit regulating frequency or increasing Add new processor core.
Optionally, in one embodiment, the processor core resource limit computing module is additionally operable to according to formula
M=(ABS (Xnew*Ynew-Xold*Yold) | Npixel) * Byte
The data volume change of the display thread refresh process is calculated, wherein, the Xnew*Ynew is represented after refreshing Window size, the Xold*Yold represent the window size before refreshing, and the Npixel is represented after refreshing relative to refreshing Change pixel number before, the Byte represent each pixel size of data;
The processor core resource limit computing module is additionally operable to according to formula
Percentage=(M1+M2+M3+ ...)/(P*Xtotal*Ytotal)
Screen change percentage is calculated, wherein the P represents to show the quantity of thread, the Xtotal*Ytotal is represented Screen resolution, the Mi represent the data volume change of i-th of display thread refresh process, the i=1,2 ..., P;
Then according to formula
Nnew*Fnew=Nmax*Fmax*Percentage (screen change percentage)
The processor core resource limit is calculated, wherein, the Nnew represents new online processor core quantity, institute The peak frequency that Fnew represents new processor core is stated, the Nmax represents available processors core amounts, the Fmax tables Show the limiting frequency of available processors core.
Implement the embodiment of the present invention, will have the advantages that:
After the method and apparatus for employing above-mentioned control CPU power consumption, according to the size of the screen refresh rate of display thread The running frequency of processor core corresponding to the display thread is adjusted, and according to it is each each and every one show thread where Processor core and its corresponding running frequency, determine whether should be to the processor core of operation quantity and operation Frequency is adjusted, for example, increasing new processor core to run display thread.That is, do not destroying any application Operation logic and screen display operation logic on the premise of, actively the refresh case of the display related linear program of each application is entered Row analysis, and the running frequency of processor core and operation quantity are adjusted according to analysis result, i.e., according to each The demand of display thread accurately determines the stock number of the processor core needed for it, and then the ensuing processing of the determination more optimized The quantity and running frequency of device core, on the premise of it ensure that the performance of display thread, reduce the power consumption of terminal.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Wherein:
Fig. 1 is a kind of schematic flow sheet of the method for control CPU power consumption in one embodiment;
Fig. 2 is a kind of structural representation of the device of control CPU power consumption in one embodiment;
Fig. 3 is the structural representation of the computer equipment for the method that foregoing control CPU power consumption is run in one embodiment.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
It should be noted that the term used in embodiments of the present invention is only merely for the mesh of description specific embodiment , and it is not intended to be limiting the present invention." one of singulative used in the embodiment of the present invention and appended claims Kind ", " described " and "the" are also intended to including most forms, unless context clearly shows that other implications.It is also understood that this Term "and/or" used herein refers to and comprising any or all possible group associated of list items purpose of one or more Close.
For solve conventional art in application refresh interface during because polycaryon processor frequency or quantity with The current operational factor of terminal mismatches and the excessive technical problem of existing power consumption, and in the present embodiment, spy proposes one kind The method for controlling CPU power consumption, the realization of this method can be dependent on computer program, and the computer program can run on based on Feng Nuo On computer system according to graceful system, the computer program can be that journey is applied in the processor control of the terminal of polycaryon processor Sequence.The computer system can run the terminal such as smart mobile phone, tablet personal computer, PC of above computer program Equipment.
It should be noted that in embodiments of the present invention, mentioned processor can be central processing unit (Central Processing Unit, CPU), image processor (Graphics Processing Unit, GPU), micro-control unit One or more kinds of combinations in (Micro Controller Unit, MCU).Moreover, processor in the present embodiment can be with It is symmetric multi-core processor (Symmetrical Multi-Processing, SMP) or asymmetric polycaryon processor (Asymmetric Multi-Processing, AMP).In addition, the terminal referred in the embodiment of the present invention can be smart mobile phone (smart phone), tablet personal computer (Tablet Personal Computer), car-mounted terminal, desktop computer (computer) Etc..
Specifically, as shown in figure 1, the method for above-mentioned control CPU power consumption comprises the following steps S102-S108, specifically:
Step S102:Detection shows the screen refresh rate FPS of thread.
Screen refresh rate is refreshing frequency of the display content within the unit interval on screen, in the present embodiment, can be with It is the transmission frame number per second on interior refreshing frequency per second, i.e. FPS, Frames Per Second, display screen.For example, in general The default screen refresh rate of computer display screen is 60Hz, i.e., the refresh rate of the picture of the display screen display per second in computer is 60 Frame is per second.In general, in the case where resolution ratio is constant, screen refresh rate is higher, the disposal ability requirement to processor Higher, for example, when the resolution ratio of picture is 1024 × 768, the refresh rate of picture will reach 24 frames/second, then video card exists One second domestic demand amount of pixels to be processed has just reached " 1024 × 768 × 24=18874368 ", if requiring the refreshing of picture Rate reaches 50 frames/second, then data volume has lifted " 1024 × 768 × 50=39321600 " quickly.
For the display interface of terminal, include multiple display units, for example, in surfing Internet with cell phone interface, signal Signal corresponding to column unit is shown, is that web page contents are shown corresponding to browser cell, is battery corresponding to electricity control unit The icon of electricity is shown;Each display unit has corresponded to a display thread, and each display thread is responsible for corresponding show The display data of window, and after each frame display data is ready, can be with other display threads on whole show layers The display data of preparation is synthesized to obtain the picture frame of whole display interface.That is, each display thread is aobvious More new capital of registration evidence is independent of each other.
In the present embodiment, in prospect application refresh rate analysis module in the terminal, each refreshing sub-line can be directed to The refresh rate of journey carries out the refreshing frequency of each display thread in the independently tracked and statistical unit time, so as to show that each is aobvious The screen refresh rate of timberline journey.
Step S104:Obtain processor core corresponding to the display thread.
The processing of each display thread is that processor is completed, in the present embodiment, because the quantity of processor is Multiple, therefore, the processing of different display threads is probably what different processor cores were completed.In the present embodiment, according to Each display thread obtains corresponding processor core, that is, determines each display thread just in which processor core Run in the heart.
Step S106:The running frequency of processor core according to corresponding to the FPS of display thread adjusts the display thread.
There is corresponding running frequency in each display thread, still, this running frequency is basis within a processor What the refresh rate before the running status or the display thread before terminal determined, can not be necessarily current with the display thread Screen refresh rate be matching.That is, it is necessary to the processing according to corresponding to determining the current screen refresh rate of display thread The running frequency of device core.Specifically, if the running frequency of screen refresh rate requirement corresponding to display thread is higher than current display During the running frequency of processor core corresponding to thread, the running frequency of processor core corresponding to the display thread should be heightened; It is corresponding, if the running frequency of screen refresh rate requirement corresponding to display thread is less than processor core corresponding to current display thread During the running frequency of the heart, the running frequency of processor core corresponding to the display thread should be turned down, also, to processor core The adjustment amount of running frequency is determined by the screen refresh rate of the display thread obtained in step S102.
In a specific embodiment, in above-mentioned steps S104, the FPS according to display thread adjusts the display line In the step of running frequency of processor core corresponding to journey, specifically include:It is less than the first FPS in the FPS of the display thread During threshold value, the running frequency of processor core corresponding to the display thread is heightened;It is higher than second in the FPS of the display thread During FPS threshold values, the running frequency of processor core corresponding to the display thread is turned down;The 2nd FPS threshold values are higher than described the One FPS threshold values.
In the present embodiment, there is maximum, i.e. largest frames frequency in screen refresh rate, for example, can be by largest frames frequency It is arranged to 60 frames/second.The threshold value of screen refresh rate, i.e. the first FPS threshold values and the 2nd FPS threshold values are preset, wherein the 2nd FPS Threshold value is higher than the first FPS threshold values.For example, it is 58 frames/second that can set the 2nd FPS threshold values, the first FPS threshold values be 50 frames/ It is per second, when the screen refresh rate for showing thread is more than 58 frames/second, illustrate the processor core operation frequency where the display thread Rate is sufficient, can suitably lower the running frequency of processor core, i.e., the disposal ability of corresponding processor core is too high, or Person, in other embodiments, it can also be that the relatively low processor core of performance handles above-mentioned display thread;In display thread Screen refresh rate when being less than 50 frames/per second, pair illustrate the running frequency deficiency of the processor core where the display thread, i.e., The processor disposal ability deficiency answered is, it is necessary to adjust upward the running frequency of processor core, or the place that performance is higher Manage device core.To sum up, when the FPS for showing thread is less than the first FPS threshold values, the disposal ability of processor core is improved, aobvious When the FPS of timberline journey is higher than the 2nd FPS threshold values, the disposal ability of processor core is reduced.
In a specific embodiment, heighten above-mentioned or turn down the running frequency of processor core, new fortune The calculating of line frequency can be calculated according to equation below:
New_freq=old_freq*Good_FPS_THRESHOLD/current_fps
Wherein new_freq represents new running frequency, and old_freq represents the operation frequency of processor core before early regulation Rate, Good_FPS_THRESHOLD represent the 2nd FPS threshold values, and current_fps represents the display thread obtained in step S102 Screen refresh rate.
Further, in an optional embodiment, in above-mentioned steps S104, the FPS according to display thread is adjusted In the step of saving the running frequency of processor core corresponding to the display thread, in addition to:It is less than in the FPS of the display thread During the 3rd FPS threshold values, the display thread is defined as being in idle states;The 3rd FPS threshold values are less than the first FPS Threshold value.
That is, when the screen refresh rate for showing thread is less than the 3rd FPS threshold values, illustrate corresponding display thread pair Do not have demand in screen-refresh, in general, one relatively low numerical value during the 3rd FPS threshold values, for one for screen brush It is new have the application of normal refresh demand for, the screen refresh rate of its corresponding show process should be greater than this relatively low the 3rd FPS threshold values, so, display thread of the screen refresh rate less than default 3rd FPS threshold values can be defined as being in idle shapes State, i.e., in idle condition, the process resource for display thread distribution processor core can not had to.For example, at one In embodiment, the 3rd FPS threshold values can be arranged to 10 frames/second, when the screen refresh rate for showing thread is less than 10 frames/second, Corresponding display thread is defined as idle states.In another embodiment, the ideal value of the 3rd FPS threshold value be 0 frame/ Second.
Step S108:The running frequency of the processor core is detected, is detecting the operation frequency of the processor core When rate is more than threshold value, increase new processor core for the display thread.
In step s 106, adjusted for the running frequency of each display thread, may after regulation Occur, the summation of the running frequency of all display threads can exceed that the processor core corresponding to some processor core The load capacity of the heart, it is therefore desirable to be adjusted correspondingly.Specifically, detect processor core corresponding to each display thread Running frequency, in this example it is shown that processor core corresponding to thread can be one or multiple.For In each processor core corresponding to display thread, its corresponding running frequency is detected respectively.
For processor core, a threshold value is preset for its running frequency, when running frequency is more than the threshold value, Illustrate that the load of the processor core is excessive, to ensure the performance of processor core, and avoid the processor core Disposal ability deficiency causes the situation of interim card, it is necessary to increases the disposal ability of processor core, as shows that thread increase is new Processor core, will partly show the operation of thread distribute to newly increase processor core operation.
It should be noted that in the present embodiment, determining whether to increase newly according to the running frequency of processor core During processor core, i.e., it is determined that adjustment after processor core quantity during, it is also necessary to calculating handle Device core resource limit.Specifically, obtaining the data volume change of the display thread refresh process, changed according to the data volume Computation processor core resource limit;Also include after the running frequency of the detection processor core:According to the place Manage device core resource limit regulating frequency or increase new processor core.
During independently tracked for the refreshing content progress of each refreshing sub-line journey, detect in corresponding display The situation of change of appearance, the change of refreshing content each time is analyzed, specifically, for each display thread, obtained each Before window size before and after secondary refreshing, i.e. Xnew*Ynew represent that the window size after refreshing, Xold*Yold represent to refresh Window size, that is to say, that ABS (Xnew*Ynew-Xold*Yold) represents to refresh front and rear display window change feelings every time Condition.It is also possible that obtaining the quantity for refreshing in front and rear image frame the pixel changed every time, i.e. Npixel is represented after refreshing Relative to the change pixel number before refreshing.That is, for each display thread, according to formula
M=(ABS (Xnew*Ynew-Xold*Yold) | Npixel) * Byte
The data volume change for showing thread refresh process is calculated, wherein M represents the number of the display thread in refresh process Change according to amount, Byte represents each pixel size of data, for example, RGB888, RGB565, YUV422 etc..
If terminal has corresponded to P display thread altogether, the data volume of refresh process corresponding to each display thread is calculated Change, i.e. M1, wherein M2 ... ..., MP, Mi represent that the data volume of i-th of display thread refresh process changes, the i=1, 2 ..., P.
, can be according to formula during above-mentioned calculating computation processor core resource limit
Percentage=(M1+M2+M3+ ...)/(P*Xtotal*Ytotal)
Screen change percentage Percentage is calculated, then according to formula
Nnew*Fnew=Nmax*Fmax*Percentage
The processor core resource limit is calculated, wherein, Xtotal*Ytotal expression screen resolutions, i.e. screen Size, Nnew represent new online processor core quantity, and Fnew represents the peak frequency of new processor core, and Nmax is represented Available processors core amounts, Fmax represent the limiting frequency of available processors core.That is, protected using the above method While having demonstrate,proved each display thread refresh rate (i.e. performance priority), and limitation is made that to the resource of overall processor core (it is preferential to tend to power consumption), it is achieved thereby that optimal display performance power dissipation ratio, on the premise of it ensure that Consumer's Experience, control The power consumption of terminal is made.
In addition, for solve conventional art in application refresh interface during because polycaryon processor frequency or number Amount and the current operational factor of terminal mismatch and the excessive technical problem of existing power consumption, in one embodiment, such as Fig. 2 institutes Show, it is also proposed that a kind of device for controlling CPU power consumption, including screen refresh rate detection module 102, processor core determining module 104th, processor frequencies adjustment module 106 and processor core adjusting module 108, wherein:
Screen refresh rate detection module 102, the screen refresh rate FPS of thread is shown for detecting;
Processor core determining module 104, for obtaining processor core corresponding to the display thread;
Processor frequencies adjustment module 106, for according to display thread FPS adjust the display thread corresponding to processor The running frequency of core;
Processor core adjusting module 108, for detecting the running frequency of the processor core, detecting the place When the running frequency of reason device core is more than threshold value, increase new processor core for the display thread.
Optionally, in one embodiment, processor frequencies adjustment module 106 is additionally operable to the FPS in the display thread During less than the first FPS threshold values, the running frequency of processor core corresponding to the display thread is heightened;In the display thread When FPS is higher than the 2nd FPS threshold values, the running frequency of processor core corresponding to the display thread is turned down;The 2nd FPS threshold values Higher than the first FPS threshold values.
Optionally, in one embodiment, processor frequencies adjustment module 106 is additionally operable to the FPS in the display thread During less than the 3rd FPS threshold values, the display thread is defined as being in idle states;The 3rd FPS threshold values are less than described the One FPS threshold values.
Optionally, in one embodiment, as shown in Fig. 2 said apparatus also includes the calculating of processor core resource limit Module 110, for obtaining the data volume change of the display thread refresh process, computation processor is changed according to the data volume Core resource limit;Processor core adjusting module 108 be additionally operable to according to the processor core resource limit regulating frequency or Person increases new processor core.
Optionally, in one embodiment, processor core resource limit computing module 110 is additionally operable to according to formula
M=(ABS (Xnew*Ynew-Xold*Yold) | Npixel) * Byte
The data volume change of the display thread refresh process is calculated, wherein, the Xnew*Ynew is represented after refreshing Window size, the Xold*Yold represent the window size before refreshing, and the Npixel is represented after refreshing relative to refreshing Change pixel number before, the Byte represent each pixel size of data;The processor core resource limit 110 is counted Module is calculated to be additionally operable to according to formula
Percentage=(M1+M2+M3+ ...)/(P*Xtotal*Ytotal)
Screen change percentage is calculated, wherein the P represents to show the quantity of thread, the Xtotal*Ytotal is represented Screen resolution, the Mi represent the data volume change of i-th of display thread refresh process, the i=1,2 ..., P;Then root According to formula
Nnew*Fnew=Nmax*Fmax*Percentage (screen change percentage)
The processor core resource limit is calculated, wherein, the Nnew represents new online processor core quantity, institute The peak frequency that Fnew represents new processor core is stated, the Nmax represents available processors core amounts, the Fmax tables Show the limiting frequency of available processors core.
Implement the embodiment of the present invention, will have the advantages that:
After the method and apparatus for employing above-mentioned control CPU power consumption, according to the size of the screen refresh rate of display thread The running frequency of processor core corresponding to the display thread is adjusted, and according to it is each each and every one show thread where Processor core and its corresponding running frequency, determine whether should be to the processor core of operation quantity and operation Frequency is adjusted, for example, increasing new processor core to run display thread.That is, do not destroying any application Operation logic and screen display operation logic on the premise of, actively the refresh case of the display related linear program of each application is entered Row analysis, and the running frequency of processor core and operation quantity are adjusted according to analysis result, i.e., according to each The demand of display thread accurately determines the stock number of the processor core needed for it, and then the ensuing processing of the determination more optimized The quantity and running frequency of device core, on the premise of it ensure that the performance of display thread, reduce the power consumption of terminal.
In one embodiment, as shown in figure 3, Fig. 3 illustrate a kind of method for running above-mentioned control CPU power consumption based on The terminal of the computer system of von Neumann system.The computer system can be smart mobile phone, tablet personal computer, palm PC, The terminal device such as notebook computer or PC.Specifically, it may include the outer input interface connected by system bus 1001st, processor 1002, memory 1003 and output interface 1004.Wherein, outer input interface 1001 optionally can be wrapped at least Include network interface 10012.Memory 1003 may include external memory 10032 (such as hard disk, CD or floppy disk etc.) and memory storage Device 10034.Output interface 1004 can comprise at least the equipment such as display screen 10042.
In the present embodiment, the operation of this method is based on computer program, and the program file of the computer program is stored in In the external memory 10032 of the foregoing computer system based on von Neumann system, built-in storage is operationally loaded into In 10034, then it is compiled as being transferred in processor 1002 after machine code performing, so that being based on von Neumann system Computer system in form screen refresh rate detection module 102, processor core determining module 104, processor in logic Frequency adjustment module 106 and processor core adjusting module 108.And in the method implementation procedure of above-mentioned control CPU power consumption, The parameter of input is received by outer input interface 1001, and is transferred in memory 1003 and is cached, and is then input to processing Handled in device 1002, the result data of processing or be cached in memory 1003 is subsequently handled, or is passed to Output interface 1004 is exported.
Above disclosure is only preferred embodiment of present invention, can not limit the right model of the present invention with this certainly Enclose, therefore the equivalent variations made according to the claims in the present invention, still belong to the scope that the present invention is covered.

Claims (8)

  1. A kind of 1. method for controlling CPU power consumption, it is characterised in that including:
    Detection shows the screen refresh rate FPS of thread;
    Obtain processor core corresponding to the display thread;
    The running frequency of processor core according to corresponding to the FPS of display thread adjusts the display thread;
    The running frequency of the processor core is detected, when the running frequency for detecting the processor core is more than threshold value, Increase new processor core for the display thread;
    Wherein, the running frequency of the processor core according to corresponding to the FPS for showing thread adjusts the display thread includes:
    When the FPS of the display thread is less than the first FPS threshold values, the operation of processor core corresponding to the display thread is heightened Frequency;
    When the FPS of the display thread is higher than the 2nd FPS threshold values, the operation of processor core corresponding to the display thread is turned down Frequency;
    The 2nd FPS threshold values are higher than the first FPS threshold values.
  2. 2. the method for control CPU power consumption according to claim 1, it is characterised in that the FPS according to display thread is adjusted Saving the running frequency of processor core corresponding to the display thread also includes:
    When the FPS of the display thread is less than the 3rd FPS threshold values, the display thread is defined as being in idle states;
    The 3rd FPS threshold values are less than the first FPS threshold values.
  3. 3. the method for control CPU power consumption according to claim 1, it is characterised in that methods described also includes:
    The data volume change of the display thread refresh process is obtained, computation processor core resource is changed according to the data volume Limit;
    Also include after the running frequency of the detection processor core:
    According to the new processor core of the processor core resource limit regulating frequency or increase.
  4. 4. the method for control CPU power consumption according to claim 3, it is characterised in that described to obtain the display thread brush The data volume of new process, which changes, is specially:
    According to formula
    M=(ABS (Xnew*Ynew-Xold*Yold) | Npixel) * Byte
    The data volume change of the display thread refresh process is calculated, wherein, the Xnew*Ynew represents the window after refreshing Size, the Xold*Yold represent to refresh before window size, before the Npixel is represented after refreshing relative to refreshing Change pixel number, the Byte represents each pixel size of data;
    It is described to be specially according to data volume change computation processor core resource limit:
    According to formula
    Percentage=(M1+M2+M3+ ...)/(P*Xtotal*Ytotal)
    Screen change percentage is calculated, wherein the P represents to show the quantity of thread, the Xtotal*Ytotal represents screen Resolution ratio, the Mi represent the data volume change of i-th of display thread refresh process, the i=1,2 ..., P;
    Then according to formula
    Nnew*Fnew=Nmax*Fmax*Percentage (screen change percentage)
    The processor core resource limit is calculated, wherein, the Nnew represents new online processor core quantity, described Fnew represents the peak frequency of new processor core, and the Nmax represents available processors core amounts, and the Fmax is represented The limiting frequency of available processors core.
  5. A kind of 5. device for controlling CPU power consumption, it is characterised in that including:
    Screen refresh rate detection module, the screen refresh rate FPS of thread is shown for detecting;
    Processor core determining module, for obtaining processor core corresponding to the display thread;
    Processor frequencies adjustment module, for processor core corresponding to adjusting the display thread according to the FPS of display thread Running frequency;
    Processor core adjusting module, for detecting the running frequency of the processor core, detecting the processor core When the running frequency of the heart is more than threshold value, increase new processor core for the display thread;
    Wherein, the processor frequencies adjustment module is additionally operable to, when the FPS of the display thread is less than the first FPS threshold values, adjust The running frequency of processor core corresponding to the high display thread;When the FPS of the display thread is higher than the 2nd FPS threshold values, Turn down the running frequency of processor core corresponding to the display thread;The 2nd FPS threshold values are higher than the first FPS threshold values.
  6. 6. the device of control CPU power consumption according to claim 5, it is characterised in that the processor frequencies adjustment module It is additionally operable to, when the FPS of the display thread is less than the 3rd FPS threshold values, the display thread is defined as being in idle states; The 3rd FPS threshold values are less than the first FPS threshold values.
  7. 7. the device of control CPU power consumption according to claim 5, it is characterised in that described device also includes processor core Heart Resources limit computing module, for obtaining the data volume change of the display thread refresh process, according to the data quantitative change Change computation processor core resource limit;
    The processor core adjusting module is additionally operable to new according to the processor core resource limit regulating frequency or increase Processor core.
  8. 8. the device of control CPU power consumption according to claim 7, it is characterised in that the processor core resource limit Computing module is additionally operable to according to formula
    M=(ABS (Xnew*Ynew-Xold*Yold) | Npixel) * Byte
    The data volume change of the display thread refresh process is calculated, wherein, the Xnew*Ynew represents the window after refreshing Size, the Xold*Yold represent to refresh before window size, before the Npixel is represented after refreshing relative to refreshing Change pixel number, the Byte represents each pixel size of data;
    The processor core resource limit computing module is additionally operable to according to formula
    Percentage=(M1+M2+M3+ ...)/(P*Xtotal*Ytotal)
    Screen change percentage is calculated, wherein the P represents to show the quantity of thread, the Xtotal*Ytotal represents screen Resolution ratio, the Mi represent the data volume change of i-th of display thread refresh process, the i=1,2 ..., P;
    Then according to formula
    Nnew*Fnew=Nmax*Fmax*Percentage (screen change percentage)
    The processor core resource limit is calculated, wherein, the Nnew represents new online processor core quantity, described Fnew represents the peak frequency of new processor core, and the Nmax represents available processors core amounts, and the Fmax is represented The limiting frequency of available processors core.
CN201610380713.4A 2016-05-31 2016-05-31 Control the method and device of CPU power consumption Active CN106095052B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201610380713.4A CN106095052B (en) 2016-05-31 2016-05-31 Control the method and device of CPU power consumption
CN201810227266.8A CN108509016B (en) 2016-05-31 2016-05-31 Method and apparatus for controlling CPU power consumption and related media product
PCT/CN2017/086454 WO2017206859A1 (en) 2016-05-31 2017-05-27 Method, apparatus and terminal for controlling cpu power consumption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610380713.4A CN106095052B (en) 2016-05-31 2016-05-31 Control the method and device of CPU power consumption

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN201810227266.8A Division CN108509016B (en) 2016-05-31 2016-05-31 Method and apparatus for controlling CPU power consumption and related media product

Publications (2)

Publication Number Publication Date
CN106095052A CN106095052A (en) 2016-11-09
CN106095052B true CN106095052B (en) 2018-03-27

Family

ID=57229845

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201610380713.4A Active CN106095052B (en) 2016-05-31 2016-05-31 Control the method and device of CPU power consumption
CN201810227266.8A Expired - Fee Related CN108509016B (en) 2016-05-31 2016-05-31 Method and apparatus for controlling CPU power consumption and related media product

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201810227266.8A Expired - Fee Related CN108509016B (en) 2016-05-31 2016-05-31 Method and apparatus for controlling CPU power consumption and related media product

Country Status (2)

Country Link
CN (2) CN106095052B (en)
WO (1) WO2017206859A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108509016A (en) * 2016-05-31 2018-09-07 广东欧珀移动通信有限公司 Control the method and device and related media production of CPU power consumption

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528296B (en) * 2016-11-21 2019-05-14 滁州职业技术学院 A kind of control method of running of mobile terminal memory
CN110413400B (en) * 2018-04-28 2022-02-11 珠海全志科技股份有限公司 CPU frequency adjusting method and system
CN110377257B (en) * 2019-07-17 2022-04-19 Oppo广东移动通信有限公司 Layer composition method and device, electronic equipment and storage medium
CN111077979B (en) * 2019-12-09 2021-04-02 Oppo广东移动通信有限公司 Power consumption control method, storage medium, and electronic device
CN112114975B (en) * 2020-10-28 2023-06-27 Oppo广东移动通信有限公司 Processor frequency adjusting method and device, storage medium and electronic equipment
CN112817746B (en) * 2021-01-15 2023-01-10 浪潮电子信息产业股份有限公司 CPU power adjusting method, device, equipment and readable storage medium
CN113448789A (en) * 2021-06-30 2021-09-28 东莞市小精灵教育软件有限公司 Test method and device and electronic equipment
CN114442792A (en) * 2022-02-09 2022-05-06 北京小米移动软件有限公司 Method and device for adjusting operating frequency of processor and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424156A (en) * 2013-09-09 2015-03-18 中兴通讯股份有限公司 Core processing method and device of processor and terminal
CN104460934A (en) * 2013-09-13 2015-03-25 华为终端有限公司 Scheduling method and device for multi central processing units (CPU)
CN105094272A (en) * 2014-05-14 2015-11-25 中兴通讯股份有限公司 Regulating method and regulating device for hardware refresh rate of terminal

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7463992B2 (en) * 2006-09-29 2008-12-09 Intel Corporation Method and system to self-test single and multi-core CPU systems
US9137848B2 (en) * 2012-01-31 2015-09-15 Lg Electronics Inc. Mobile terminal, controlling method thereof and recording medium thereof
US9250665B2 (en) * 2012-06-07 2016-02-02 Apple Inc. GPU with dynamic performance adjustment
US9905199B2 (en) * 2014-09-17 2018-02-27 Mediatek Inc. Processor for use in dynamic refresh rate switching and related electronic device and method
CN104978235A (en) * 2015-06-30 2015-10-14 柏斯红 Operating frequency prediction based load balancing method
CN105357401A (en) * 2015-11-18 2016-02-24 广东欧珀移动通信有限公司 Power saving method and device of multi-core mobile terminal
CN106095052B (en) * 2016-05-31 2018-03-27 广东欧珀移动通信有限公司 Control the method and device of CPU power consumption

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424156A (en) * 2013-09-09 2015-03-18 中兴通讯股份有限公司 Core processing method and device of processor and terminal
CN104460934A (en) * 2013-09-13 2015-03-25 华为终端有限公司 Scheduling method and device for multi central processing units (CPU)
CN105094272A (en) * 2014-05-14 2015-11-25 中兴通讯股份有限公司 Regulating method and regulating device for hardware refresh rate of terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108509016A (en) * 2016-05-31 2018-09-07 广东欧珀移动通信有限公司 Control the method and device and related media production of CPU power consumption
CN108509016B (en) * 2016-05-31 2021-02-19 上海瑾盛通信科技有限公司 Method and apparatus for controlling CPU power consumption and related media product

Also Published As

Publication number Publication date
CN108509016A (en) 2018-09-07
CN108509016B (en) 2021-02-19
WO2017206859A1 (en) 2017-12-07
CN106095052A (en) 2016-11-09

Similar Documents

Publication Publication Date Title
CN106095052B (en) Control the method and device of CPU power consumption
CN107851042B (en) Using command stream hints to characterize GPU workload and power management
US10037070B2 (en) Image display method and display system
US10740154B2 (en) Method and apparatus for allocating computing resources of processor based on processor load, and terminal
TWI578153B (en) Adaptive graphics subsystem power and performance management
CN103207659B (en) Switching method and electronic equipment
CN105045367A (en) Android system equipment power consumption optimization method based on game load prediction
TW201814512A (en) Scenario-based method and apparatus for performance and power management in electronic apparatus
TW201405305A (en) Terminal device and operating method thereof
CN107111553A (en) System and method for providing dynamic caching extension in many cluster heterogeneous processor frameworks
JP5792337B2 (en) Reducing power consumption while rendering graphics
CN104765600A (en) Page processing method
CN106095047B (en) Control method and electronic equipment
DE112012005223T5 (en) Energy management of the display controller
US20170212581A1 (en) Systems and methods for providing power efficiency via memory latency control
CN102866765A (en) Graphics processing unit and management method thereof
CN108519808A (en) Frame per second method of adjustment, device, terminal device and storage medium
CN108811055A (en) Frame per second method of adjustment, device, terminal device and storage medium
CN108628429A (en) Frame per second method of adjustment, device, terminal device and storage medium
CN112804527B (en) Image output method, image output device and computer-readable storage medium
CN108693948A (en) Frame per second method of adjustment, device, terminal device and storage medium
CN108594982A (en) Frame per second method of adjustment, device, terminal device and storage medium
CN112256383B (en) Method, device, equipment and medium for adjusting CPU core number of virtual machine
CN104063034B (en) Computer installation and its video card efficiency optimization method
CN104765599A (en) Terminal

Legal Events

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

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

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

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

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

CP01 Change in the name or title of a patent holder
TR01 Transfer of patent right

Effective date of registration: 20181226

Address after: Room 2101, 600 Longhuazhong Road, Xuhui District, Shanghai 200030

Patentee after: SHANGHAI JINSHENG COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

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

TR01 Transfer of patent right