CN106095052A - The method and device of control CPU power consumption - Google Patents

The method and device of control CPU power consumption Download PDF

Info

Publication number
CN106095052A
CN106095052A CN201610380713.4A CN201610380713A CN106095052A CN 106095052 A CN106095052 A CN 106095052A CN 201610380713 A CN201610380713 A CN 201610380713A CN 106095052 A CN106095052 A CN 106095052A
Authority
CN
China
Prior art keywords
processor core
fps
display thread
thread
threshold value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610380713.4A
Other languages
Chinese (zh)
Other versions
CN106095052B (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Power Sources (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)

Abstract

The embodiment of the invention discloses a kind of method controlling CPU power consumption, comprising: screen refresh rate FPS of detection display thread;Obtain the described display corresponding processor core of thread;Regulate the running frequency of this corresponding processor core of display thread according to the FPS of display thread;Detect the running frequency of described processor core, when the running frequency described processor core being detected is more than threshold value, increase new processor core for described display thread.Additionally, the embodiment of the invention also discloses a kind of device controlling CPU power consumption.Use the present invention, it is possible to decrease the power consumption of terminal.

Description

The method and device of control CPU power consumption
Technical field
The present invention relates to field of terminal, particularly relate to a kind of method and device controlling CPU power consumption.
Background technology
With the development of processor technology, multi-core technology becomes the important directions of current processor development.Compare biography The monokaryon chip of system, polycaryon processor technology achieves, by way of multiple process cores are assisted mutually, the feelings keeping frequency constant Under condition, promote the performance of system significantly.
For the display content shown on the display interface in terminal, display content by multiple different modules or Region is constituted, and the display content of zones of different or module is responsible in different prospect application, and for example, renewal is responsible in the application of signal hurdle Signal shows, electricity control module is responsible for updating battery electric quantity icon.Each prospect is applied and is completed the one of its display window After frame display data prepare, can and the content of current whole show layers complete synthetic operation, then active call kernel Display interface, display content is sent to display device and shows.Technical staff's discovery in practice process, due to difference Display thread be responsible for the display of different prospect application and the refreshing of display window, and during display refreshes, Single point in time, the difference of the corresponding refresh rate of multiple application, shape library algorithm is likely to difference, which results in processor core Load is at short notice it may happen that violent change.
And process 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 core, the mainly periodic running frequency according to currently processed sum of processing method and change Change direction and preset load, or determine that each processes the switch of core according to the number of tasks run in the unit interval;Also Being to say, during current interface refreshes, frequency regulator and hot plug control module can't detect any interface Refresh the behavior of application, say, that can't be adjusted the process core running, the disposal ability of processor is but still protected Hold constant.
It is to say, in the control program of polycaryon processor in the prior art, processor can not aware application interface The change updating, so, even if application interface updates corresponding load and occurs in that change, the disposal ability of processor can't Being adjusted therewith, this load allowing for processor is likely to occur the problem of overload, and the disposal ability of processor is not enough And cause that the phenomenons such as card occur, or, the load of processor may kick the beam, and some kernels of processor may be in " empty Turning " there is unnecessary electricity waste in state and causing.
Content of the invention
Based on this, the present invention solves and conventional art refreshes during interface because polycaryon processor in application The excessive technical problem of power consumption that frequency or the quantity operational factor current with terminal are not mated and existed, spy proposes a kind of control The method of CPU power consumption processed.
A kind of method controlling CPU power consumption, comprising:
Screen refresh rate FPS of detection display thread;
Obtain the described display corresponding processor core of thread;
Regulate the running frequency of this corresponding processor core of display thread according to the FPS of display thread;
Detect the running frequency of described processor core, be more than threshold value in the running frequency described processor core being detected When, increase new processor core for described display thread.
Optionally, in one embodiment, described according to display thread FPS regulate this corresponding processor of display thread The running frequency of core includes:
When the FPS of described display thread is less than a FPS threshold value, heighten this corresponding processor core of display thread Running frequency;
When the FPS of described display thread is higher than the 2nd FPS threshold value, turn down this corresponding processor core of display thread Running frequency;
Described 2nd FPS threshold value is higher than a described FPS threshold value.
Optionally, in one embodiment, described according to display thread FPS regulate this corresponding processor of display thread The running frequency of core also includes:
When the FPS of described display thread is less than the 3rd FPS threshold value, described display thread is defined as being in idle shape State;
Described 3rd FPS threshold value is less than a described FPS threshold value.
Optionally, in one embodiment, described method also includes:
Obtain the data volume change of described display thread refresh process, according to described data volume change calculations processor core Resources limit;
Also include after the running frequency of the described processor core of described detection:
According to described processor core resource limit regulating frequency or increase new processor core.
Optionally, in one embodiment, described obtain described display thread refresh process data volume change particularly as follows:
According to formula
M=(ABS (Xnew*Ynew Xold*Yold) | Npixel) * Byte
Calculate the data volume change of described display thread refresh process, wherein, after described Xnew*Ynew represents refreshing Window size, described Xold*Yold represents the window size before refreshing, and described Npixel represents after refreshing relative to refreshing Change pixel number before, described Byte represents each pixel size of data;
Described according to described data volume change calculations processor core resource limit particularly as follows:
According to formula
Percentage=(M1+M2+M3+ ...)/(P*Xtotal*Ytotal)
Calculating screen change percentage, wherein said P represents the quantity of display thread, and described Xtotal*Ytotal represents Screen resolution, described Mi represents that the data volume of i-th display thread refresh process changes, described i=1,2 ..., P;
Then according to formula
Nnew*Fnew=Nmax*Fmax*Percentage (screen change percentage)
Calculating described processor core resource limit, wherein, described Nnew represents new online processor core quantity, institute Stating Fnew and representing the peak frequency of new processor core, described Nmax represents available processors core amounts, described Fmax table Show the limiting frequency of available processors core.
Additionally, the present invention solves and conventional art refreshes during interface because the frequency of polycaryon processor in application The excessive technical problem of power consumption that rate or the quantity operational factor current with terminal are not mated and existed, spy proposes a kind of control The device of CPU power consumption.
A kind of device controlling CPU power consumption, comprising:
Screen refresh rate detection module, for detecting screen refresh rate FPS of display thread;
Processor core determining module, is used for obtaining the described display corresponding processor core of thread;
Processor frequencies adjustment module, for regulating this corresponding processor core of display thread according to the FPS of display thread The running frequency of the heart;
Processor core adjusting module, for detecting the running frequency of described processor core, is detecting described process When the running frequency of device core is more than threshold value, increase new processor core for described display thread.
Optionally, in one embodiment, described processor frequencies adjustment module is additionally operable to the FPS at described display thread During less than a FPS threshold value, heighten the running frequency of this corresponding processor core of display thread;At described display thread When FPS is higher than the 2nd FPS threshold value, turn down the running frequency of this corresponding processor core of display thread;Described 2nd FPS threshold value Higher than a described FPS threshold value.
Optionally, in one embodiment, described processor frequencies adjustment module is additionally operable to the FPS at described display thread During less than the 3rd FPS threshold value, described display thread is defined as being in idle state;Described 3rd FPS threshold value is less than described the One FPS threshold value.
Optionally, in one embodiment, described device also includes processor core resource limit computing module, is used for obtaining Take the data volume change of described display thread refresh process, according to described data volume change calculations processor core resource limit;
Described processor core adjusting module is additionally operable to according to described processor core resource limit regulating frequency or increasing Add new processor core.
Optionally, in one embodiment, described processor core resource limit computing module is additionally operable to according to formula
M=(ABS (Xnew*Ynew Xold*Yold) | Npixel) * Byte
Calculate the data volume change of described display thread refresh process, wherein, after described Xnew*Ynew represents refreshing Window size, described Xold*Yold represents the window size before refreshing, and described Npixel represents after refreshing relative to refreshing Change pixel number before, described Byte represents each pixel size of data;
Described processor core resource limit computing module is additionally operable to according to formula
Percentage=(M1+M2+M3+ ...)/(P*Xtotal*Ytotal)
Calculating screen change percentage, wherein said P represents the quantity of display thread, and described Xtotal*Ytotal represents Screen resolution, described Mi represents that the data volume of i-th display thread refresh process changes, described i=1,2 ..., P;
Then according to formula
Nnew*Fnew=Nmax*Fmax*Percentage (screen change percentage)
Calculating described processor core resource limit, wherein, described Nnew represents new online processor core quantity, institute Stating Fnew and representing the peak frequency of new processor core, described Nmax represents available processors core amounts, described Fmax table Show the limiting frequency of available processors core.
Implement the embodiment of the present invention, will have the advantages that
After have employed the method and apparatus of above-mentioned control CPU power consumption, the size of the screen refresh rate according to display thread The running frequency of this corresponding processor core of display thread is adjusted, and according to each thread place that each and every one shows Processor core and its corresponding running frequency, determining whether should be to the quantity of the processor core running and operation Frequency is adjusted, and for example, increases new processor core to run display thread.It is to say, do not destroying any application Operation logic and on the premise of screen display operation logic, actively the refresh case of the display related linear program that each is applied is entered Row is analyzed, and is adjusted the running frequency of processor core and operation quantity according to analysis result, i.e. according to each The demand of display thread accurately determines the stock number of its required processor core, and then the ensuing process of determination more optimizing The quantity of device core and running frequency, on the premise of ensure that the performance of display thread, reduce the power consumption of terminal.
Brief description
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing In having technology to describe, the accompanying drawing of required use is briefly described, it should be apparent that, the accompanying drawing in describing below is only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, all right Obtain other accompanying drawing according to these accompanying drawings.
Wherein:
Fig. 1 is the schematic flow sheet of a kind of method controlling CPU power consumption in an embodiment;
Fig. 2 is the structural representation of a kind of device controlling CPU power consumption in an embodiment;
Fig. 3 is the structural representation of the computer equipment of the method running aforementioned control CPU power consumption in an embodiment.
Detailed description of the invention
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 Describe, it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments wholely.Based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of not making creative work Embodiment, broadly falls into the scope of protection of the invention.
It should be noted that the term using in embodiments of the present invention is only merely for the mesh describing 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 " being somebody's turn to do " are also intended to include most form, unless context clearly shows that other implications.It is also understood that this The term "and/or" using in Wen refers to and comprises one or more any or all possible group listing project being associated Close.
For solve in conventional art during application refreshes interface because the frequency of polycaryon processor or quantity with The excessive technical problem of power consumption that the current operational factor of terminal is not mated and existed, in the present embodiment, spy proposes one The method of control CPU power consumption, the realization of the method can be dependent on computer program, and this computer program can run on based on Feng Nuo On computer system according to graceful system, this computer program can be the processor control application journey of the terminal of polycaryon processor Sequence.This computer system can be to run the terminals such as the such as smart mobile phone of above computer program, panel computer, PC 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 combination in (Micro Controller Unit, MCU).And, the processor in the present embodiment is permissible It is symmetric multi-core processor (Symmetrical Multi-Processing, SMP), it is also possible to be non-symmetric multi-core processor (Asymmetric Multi-Processing, AMP).In addition, the terminal mentioned in the embodiment of the present invention can be smart mobile phone (smart phone), panel computer (Tablet Personal Computer), car-mounted terminal, desktop computer (computer) Etc..
Concrete, as it is shown in figure 1, the method for above-mentioned control CPU power consumption comprises the steps S102-S108, concrete:
Step S102: screen refresh rate FPS of detection display thread.
Refreshing frequency within the unit interval for the display content on screen refresh rate i.e. screen, in the present embodiment, permissible It is the refreshing frequency in per second, i.e. FPS, Frames Per Second, transmission frame number per second on display screen.For example, general The default screen refresh rate of computer display screen is 60Hz, and the refresh rate at the picture of the display screen display of computer i.e. per second is 60 Frame is per second.In general, in the case that resolution ratio is constant, screen refresh rate is higher, requires the disposal ability of processor also Higher, for example, when the resolution ratio of picture is 1024 × 768, the refresh rate of picture to 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 risen to " 1024 × 768 × 50=39321600 " quickly.
From the point of view of the display interface of terminal, include multiple display unit, for example, in surfing Internet with cell phone interface, signal Unit corresponding signal in hurdle shows, browser cell is corresponding is that web page contents shows, electricity control unit is corresponding is battery The icon of electricity shows;Each display unit is a corresponding display thread, each display thread is responsible for corresponding display The display data of window, and after each frame display data are ready, together with other display threads on whole show layers The display data preparing carry out synthesizing to obtain the picture frame of whole display interface.It is to say, each display thread is aobvious More new capital of registration evidence is independent of each other.
In the present embodiment, prospect application refresh rate in the terminal is analyzed in module, can refresh sub-line for each The refresh rate of journey carries out independently tracked and statistical unit time each display thread interior refreshing frequency, thus show that each shows The screen refresh rate of timberline journey.
Step S104: obtain the described display corresponding processor core of thread.
The process of each display thread is that processor completes, in the present embodiment, because the quantity of processor is Multiple, therefore, the process of different display threads is probably what different processor cores completed.In the present embodiment, according to Each display thread obtains corresponding processor core, i.e. determines each display thread just at which processor core Run in the heart.
Step S106: regulate the running frequency of this corresponding processor core of display thread according to the FPS of display thread.
There is corresponding running frequency within a processor in each display thread, but, this running frequency is basis Running status before terminal or the refresh rate before this display thread determine, can not be necessarily current with this display thread Screen refresh rate be coupling.It is to say, need to determine corresponding process according to the current screen refresh rate of display thread The running frequency of device core.Concrete, if the running frequency that the display corresponding screen refresh rate of thread requires is higher than currently displaying During the running frequency of the corresponding processor core of thread, the running frequency of this corresponding processor core of display thread should be heightened; Corresponding, if the flat rate of operation that the display corresponding screen refresh rate of thread requires is less than the corresponding processor core of currently displaying thread During the running frequency of the heart, the running frequency of this corresponding processor core of display thread should be turned down, and, to processor core The adjustment amount of running frequency is determined by the screen refresh rate of the display thread obtaining in step S102.
In a specific embodiment, in above-mentioned steps S104, described according to display thread FPS regulate this display line In the step of the running frequency of the corresponding processor core of journey, specifically include: be less than a FPS at the FPS of described display thread During threshold value, heighten the running frequency of this corresponding processor core of display thread;It is higher than second at the FPS of described display thread During FPS threshold value, turn down the running frequency of this corresponding processor core of display thread;Described 2nd FPS threshold value is higher than described the One FPS threshold value.
In the present embodiment, there is maximum in screen refresh rate, i.e. largest frames frequency, for example, it is possible to by largest frames frequency It is set to 60 frames/second.Preset the threshold value of screen refresh rate, the i.e. the first FPS threshold value and the 2nd FPS threshold value, wherein the 2nd FPS Threshold value is higher than a described FPS threshold value.For example, it is possible to arranging a FPS threshold value is 58 frames/second, the 2nd FPS threshold value be 50 frames/ Per second, when the screen refresh rate showing thread is more than 58 frames/second, illustrate that the processor core at this display thread place runs frequency Rate is sufficient, can suitably lower the running frequency of processor core, and the disposal ability of i.e. corresponding processor core is too high, or Person, in other embodiments, can also is that the relatively low processor core of serviceability processes above-mentioned display thread;At display thread Screen refresh rate less than 50 frames/per second when, illustrate that the running frequency of the processor core at this display thread place is not enough, i.e. right The processor disposal ability answered is not enough, needs to adjust upward the running frequency of processor core, or the higher place of serviceability Reason device core.To sum up, when the FPS showing thread is less than a FPS threshold value, improve the disposal ability of processor core, showing When the FPS of timberline journey is higher than the 2nd FPS threshold value, reduce the disposal ability of processor core.
In a specific embodiment, in the above-mentioned running frequency heightening or turning down processor core, new fortune The calculating of line frequency can calculate according to equation below:
New_freq=old_freq*Good_FPS_THRESHOLD/current_fps
Wherein new_freq represents new running frequency, old_freq represent early regulate before the operation frequency of processor core Rate, Good_FPS_THRESHOLD represents the 2nd FPS threshold value, and current_fps represents the display thread obtaining in step S102 Screen refresh rate.
Further, in an optional embodiment, in above-mentioned steps S104, the described FPS tune according to display thread In the step of the running frequency saving this corresponding processor core of display thread, also include: be less than at the FPS of described display thread During the 3rd FPS threshold value, described display thread is defined as being in idle state;Described 3rd FPS threshold value is less than a described FPS Threshold value.
It is to say, when the screen refresh rate showing thread is less than the 3rd FPS threshold value, corresponding display thread pair is described Not having demand in screen-refresh, in general, one relatively low numerical value during the 3rd FPS threshold value, for one for screen brush Newly have normal refresh demand should for saying, the screen refresh rate of its corresponding show process should be greater than this relatively low the 3rd FPS threshold value, so, screen refresh rate can be defined as being in idle shape less than the display thread of the 3rd FPS threshold value preset State, is i.e. in idle condition, can be for the process resource of this display thread distribution processor core.For example, at one In embodiment, the 3rd FPS threshold value can be set to 10 frames/second, when the screen refresh rate showing thread is less than 10 frames/second, Corresponding display thread is defined as idle state.In another embodiment, the ideal value of the 3rd FPS threshold value be 0 frame/ Second.
Step S108: detect the running frequency of described processor core, is detecting the operation frequency of described processor core When rate is more than threshold value, increase new processor core for described display thread.
In step s 106, the running frequency for each display thread is regulated, may after regulation Occurring, the summation of the running frequency of the corresponding all of display thread of some processor core can exceed that this processor core The load capacity of the heart, it is therefore desirable to be adjusted correspondingly.Concrete, detect each display corresponding processor core of thread Running frequency, in this example it is shown that the corresponding processor core of thread can be one, it is also possible to be multiple.For In display thread each processor core corresponding, detect its corresponding running frequency respectively.
From the point of view of processor core, preset a threshold value for its running frequency, when running flat rate more than this threshold value, Illustrate that the load of this processor core is excessive, be the performance ensureing processor core, and avoid this processor core Disposal ability deficiency causes the situation of card, it is necessary to increase the disposal ability of processor core, and being display thread increases new Processor core, will partly show that the operation of thread is distributed to the processor core that newly increases and run.
It should be noted that in the present embodiment, new determining whether to increase according to the running frequency of processor core During processor core, i.e. during the quantity of the processor core determining after adjusting, in addition it is also necessary to calculating process Device core resource limit.Concrete, obtain the data volume change of described display thread refresh process, change according to described data volume Computation processor core resource limit;Also include after the running frequency of the described processor core of described detection: according to described place Manage device core resource limit regulating frequency or increase new processor core.
For each refresh sub-line journey refreshing content carry out independently tracked during, detect corresponding display in The situation of change held, is analyzed to the change of refreshing content each time, concrete, shows thread for each, obtains each Window size before and after secondary refreshing, i.e. Xnew*Ynew represents the window size after refreshing, before Xold*Yold represents refreshing Window size, say, that ABS (Xnew*Ynew Xold*Yold) represents the display window change feelings before and after refreshing every time Condition.It is also possible that obtain the quantity of the pixel of change in the image frame before and after refreshing every time, after i.e. Npixel represents refreshing Relative to the change pixel number before refreshing.It is to say, show thread for each, according to formula
M=(ABS (Xnew*Ynew Xold*Yold) | Npixel) * Byte
Calculating the data volume change of display thread refresh process, wherein M represents this number in refresh process for display thread According to amount change, Byte represents each pixel size of data, for example, RGB888, RGB565, YUV422 etc..
If terminal is altogether corresponding P display thread, calculate each data volume showing the corresponding refresh process of thread Change, i.e. M1, M2 ..., MP, wherein Mi represents that the data volume of i-th display thread refresh process changes, described i=1, 2 ..., P.
During above-mentioned calculating computation processor core resource limit, can be according to formula
Percentage=(M1+M2+M3+ ...)/(P*Xtotal*Ytotal)
Calculate screen change percentage Percentage, then according to formula
Nnew*Fnew=Nmax*Fmax*Percentage
Calculate described processor core resource limit, wherein, Xtotal*Ytotal represents screen resolution, i.e. screen Size, Nnew represents new online processor core quantity, and Fnew represents the peak frequency of new processor core, and Nmax represents Available processors core amounts, Fmax represents the limiting frequency of available processors core.It is to say, use said method protecting While having demonstrate,proved each display thread refresh rate (i.e. performance priority), again restriction is made that to the resource of overall processor core (i.e. tending to power consumption preferential), it is achieved thereby that the display performance power dissipation ratio of optimum, on the premise of ensure that Consumer's Experience, control Make the power consumption of terminal.
Additionally, for solve in conventional art during application refreshes interface because the frequency of polycaryon processor or number Measure the operational factor current with terminal not mate and the excessive technical problem of the power consumption that exists, in one embodiment, such as Fig. 2 institute Show, it is also proposed that a kind of device controlling CPU power consumption, including screen refresh rate detection module the 102nd, processor core determining module 104th, processor frequencies adjustment module 106 and processor core adjusting module 108, wherein:
Screen refresh rate detection module 102, for detecting screen refresh rate FPS of display thread;
Processor core determining module 104, is used for obtaining the described display corresponding processor core of thread;
Processor frequencies adjustment module 106, for regulating this corresponding processor of display thread according to the FPS of display thread The running frequency of core;
Processor core adjusting module 108, for detecting the running frequency of described processor core, is detecting described place When the running frequency of reason device core is more than threshold value, increase new processor core for described display thread.
Optionally, in one embodiment, processor frequencies adjustment module 106 is additionally operable to the FPS at described display thread During less than a FPS threshold value, heighten the running frequency of this corresponding processor core of display thread;At described display thread When FPS is higher than the 2nd FPS threshold value, turn down the running frequency of this corresponding processor core of display thread;Described 2nd FPS threshold value Higher than a described FPS threshold value.
Optionally, in one embodiment, processor frequencies adjustment module 106 is additionally operable to the FPS at described display thread During less than the 3rd FPS threshold value, described display thread is defined as being in idle state;Described 3rd FPS threshold value is less than described the One FPS threshold value.
Optionally, in one embodiment, as in figure 2 it is shown, said apparatus also includes that processor core resource limit calculates Module 110, for obtaining the data volume change of described display thread refresh process, according to described data volume change calculations processor Core resource limit;Processor core adjusting module 108 be additionally operable to according to described 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
Calculate the data volume change of described display thread refresh process, wherein, after described Xnew*Ynew represents refreshing Window size, described Xold*Yold represents the window size before refreshing, and described Npixel represents after refreshing relative to refreshing Change pixel number before, described Byte represents each pixel size of data;Described processor core resource limit 110 is counted Calculate module to be additionally operable to according to formula
Percentage=(M1+M2+M3+ ...)/(P*Xtotal*Ytotal)
Calculating screen change percentage, wherein said P represents the quantity of display thread, and described Xtotal*Ytotal represents Screen resolution, described Mi represents that the data volume of i-th display thread refresh process changes, described i=1,2 ..., P;Then root According to formula
Nnew*Fnew=Nmax*Fmax*Percentage (screen change percentage)
Calculating described processor core resource limit, wherein, described Nnew represents new online processor core quantity, institute Stating Fnew and representing the peak frequency of new processor core, described Nmax represents available processors core amounts, described Fmax table Show the limiting frequency of available processors core.
Implement the embodiment of the present invention, will have the advantages that
After have employed the method and apparatus of above-mentioned control CPU power consumption, the size of the screen refresh rate according to display thread The running frequency of this corresponding processor core of display thread is adjusted, and according to each thread place that each and every one shows Processor core and its corresponding running frequency, determining whether should be to the quantity of the processor core running and operation Frequency is adjusted, and for example, increases new processor core to run display thread.It is to say, do not destroying any application Operation logic and on the premise of screen display operation logic, actively the refresh case of the display related linear program that each is applied is entered Row is analyzed, and is adjusted the running frequency of processor core and operation quantity according to analysis result, i.e. according to each The demand of display thread accurately determines the stock number of its required processor core, and then the ensuing process of determination more optimizing The quantity of device core and running frequency, on the premise of ensure that the performance of display thread, reduce the power consumption of terminal.
In one embodiment, as it is shown on figure 3, Fig. 3 illustrate a kind of method running above-mentioned control CPU power consumption based on The terminal of the computer system of von Neumann system.This computer system can be smart mobile phone, panel computer, palm PC, The terminal device such as notebook computer or PC.Concrete, it may include the outer input interface being connected by system bus 1001st, processor the 1002nd, memory 1003 and output interface 1004.Wherein, outer input interface 1001 optionally can at least wrap Include network interface 10012.Memory 1003 can include external memory 10032 (such as hard disk, CD or floppy disk etc.) and interior storage Device 10034.Output interface 1004 can at least include display screen 10042 grade equipment.
In the present embodiment, the operation of this method is stored in based on computer program, the program file of this computer program It in the external memory 10032 of the aforementioned computer system based on von Neumann system, is operationally loaded into built-in storage It in 10034, is transferred to after being then compiled as machine code in processor 1002 perform, so that based on von Neumann system Computer system in form the 102nd, processor core determining module the 104th, the processor of screen refresh rate detection module in logic Frequency adjustment module 106 and processor core adjusting module 108.And during the method for above-mentioned control CPU power consumption performs, The parameter of input is all received by outer input interface 1001, and is transferred in memory 1003 caching, is then input to process Processing in device 1002, the result data of process or be cached in memory 1003 is subsequently processed, or is passed to Output interface 1004 exports.
The above disclosed present pre-ferred embodiments that is only, can not limit the right model of the present invention with this certainly Enclose, the equivalent variations therefore made according to the claims in the present invention, still belong to the scope that the present invention is covered.

Claims (10)

1. the method controlling CPU power consumption, it is characterised in that include:
Screen refresh rate FPS of detection display thread;
Obtain the described display corresponding processor core of thread;
Regulate the running frequency of this corresponding processor core of display thread according to the FPS of display thread;
Detect the running frequency of described processor core, when the running frequency described processor core being detected is more than threshold value, Increase new processor core for described display thread.
2. the method for control CPU power consumption according to claim 1, it is characterised in that the described FPS tune according to display thread The running frequency saving this corresponding processor core of display thread includes:
When the FPS of described display thread is less than a FPS threshold value, heighten the operation of this corresponding processor core of display thread Frequency;
When the FPS of described display thread is higher than the 2nd FPS threshold value, turn down the operation of this corresponding processor core of display thread Frequency;
Described 2nd FPS threshold value is higher than a described FPS threshold value.
3. the method for control CPU power consumption according to claim 2, it is characterised in that the described FPS tune according to display thread The running frequency saving this corresponding processor core of display thread also includes:
When the FPS of described display thread is less than the 3rd FPS threshold value, described display thread is defined as being in idle state;
Described 3rd FPS threshold value is less than a described FPS threshold value.
4. the method for control CPU power consumption according to claim 1, it is characterised in that described method also includes:
Obtain the data volume change of described display thread refresh process, according to described data volume change calculations processor core resource Limit;
Also include after the running frequency of the described processor core of described detection:
According to described processor core resource limit regulating frequency or increase new processor core.
5. the method for control CPU power consumption according to claim 4, it is characterised in that described acquisition described display thread brush The data volume change of new process particularly as follows:
According to formula
M=(ABS (Xnew*Ynew Xold*Yold) | Npixel) * Byte
Calculating the data volume change of described display thread refresh process, wherein, described Xnew*Ynew represents the window after refreshing Size, described Xold*Yold represents the window size before refreshing, before described Npixel represents after refreshing relative to refreshing Change pixel number, described Byte represents each pixel size of data;
Described according to described data volume change calculations processor core resource limit particularly as follows:
According to formula
Percentage=(M1+M2+M3+ ...)/(P*Xtotal*Ytotal)
Calculating screen change percentage, wherein said P represents the quantity of display thread, and described Xtotal*Ytotal represents screen Resolution ratio, described Mi represents that the data volume of i-th display thread refresh process changes, described i=1,2 ..., P;
Then according to formula
Nnew*Fnew=Nmax*Fmax*Percentage (screen change percentage)
Calculating described processor core resource limit, wherein, described Nnew represents new online processor core quantity, described Fnew represents the peak frequency of new processor core, and described Nmax represents available processors core amounts, and described Fmax represents The limiting frequency of available processors core.
6. the device controlling CPU power consumption, it is characterised in that include:
Screen refresh rate detection module, for detecting screen refresh rate FPS of display thread;
Processor core determining module, is used for obtaining the described display corresponding processor core of thread;
Processor frequencies adjustment module, for regulating this corresponding processor core of display thread according to the FPS of display thread Running frequency;
Processor core adjusting module, for detecting the running frequency of described processor core, is detecting described processor core When the running frequency of the heart is more than threshold value, increase new processor core for described display thread.
7. the device of control power consumption according to claim 6, it is characterised in that described processor frequencies adjustment module is also used When the FPS at described display thread is less than a FPS threshold value, heighten the operation frequency of this corresponding processor core of display thread Rate;When the FPS of described display thread is higher than the 2nd FPS threshold value, turn down the operation of this corresponding processor core of display thread Frequency;Described 2nd FPS threshold value is higher than a described FPS threshold value.
8. the device of control CPU power consumption according to claim 7, it is characterised in that described processor frequencies adjustment module It is additionally operable to, when the FPS of described display thread is less than the 3rd FPS threshold value, described display thread is defined as being in idle state; Described 3rd FPS threshold value is less than a described FPS threshold value.
9. the device of control CPU power consumption according to claim 6, it is characterised in that described device also includes processor core Heart Resources limit computing module, for obtaining the data volume change of described display thread refresh process, according to described data quantitative change Change computation processor core resource limit;
Described processor core adjusting module is additionally operable to according to described processor core resource limit regulating frequency or increases new Processor core.
10. the device of control CPU power consumption according to claim 9, it is characterised in that described processor core resource limit Computing module is additionally operable to according to formula
M=(ABS (Xnew*Ynew Xold*Yold) | Npixel) * Byte
Calculating the data volume change of described display thread refresh process, wherein, described Xnew*Ynew represents the window after refreshing Size, described Xold*Yold represents the window size before refreshing, before described Npixel represents after refreshing relative to refreshing Change pixel number, described Byte represents each pixel size of data;
Described processor core resource limit computing module is additionally operable to according to formula
Percentage=(M1+M2+M3+ ...)/(P*Xtotal*Ytotal)
Calculating screen change percentage, wherein said P represents the quantity of display thread, and described Xtotal*Ytotal represents screen Resolution ratio, described Mi represents that the data volume of i-th display thread refresh process changes, described i=1,2 ..., P;
Then according to formula
Nnew*Fnew=Nmax*Fmax*Percentage (screen change percentage)
Calculating described processor core resource limit, wherein, described Nnew represents new online processor core quantity, described Fnew represents the peak frequency of new processor core, and described Nmax represents available processors core amounts, and described Fmax represents 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 true CN106095052A (en) 2016-11-09
CN106095052B CN106095052B (en) 2018-03-27

Family

ID=57229845

Family Applications (2)

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
CN201610380713.4A Active CN106095052B (en) 2016-05-31 2016-05-31 Control the method and device of CPU power consumption

Family Applications Before (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) CN108509016B (en)
WO (1) WO2017206859A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528296A (en) * 2016-11-21 2017-03-22 滁州职业技术学院 Control method for running memory of mobile terminal, and mobile terminal
WO2017206859A1 (en) * 2016-05-31 2017-12-07 广东欧珀移动通信有限公司 Method, apparatus and terminal for controlling cpu power consumption
CN110413400A (en) * 2018-04-28 2019-11-05 珠海全志科技股份有限公司 A kind of cpu frequency adjusting method and system
CN112114975A (en) * 2020-10-28 2020-12-22 Oppo广东移动通信有限公司 Processor frequency adjusting method and device, storage medium and electronic equipment

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
CN108509016B (en) * 2016-05-31 2021-02-19 上海瑾盛通信科技有限公司 Method and apparatus for controlling CPU power consumption and related media product

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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017206859A1 (en) * 2016-05-31 2017-12-07 广东欧珀移动通信有限公司 Method, apparatus and terminal for controlling cpu power consumption
CN106528296A (en) * 2016-11-21 2017-03-22 滁州职业技术学院 Control method for running memory of mobile terminal, and mobile terminal
CN106528296B (en) * 2016-11-21 2019-05-14 滁州职业技术学院 A kind of control method of running of mobile terminal memory
CN109992088A (en) * 2016-11-21 2019-07-09 滁州职业技术学院 A kind of mobile terminal
CN110413400A (en) * 2018-04-28 2019-11-05 珠海全志科技股份有限公司 A kind of cpu frequency adjusting method and system
CN110413400B (en) * 2018-04-28 2022-02-11 珠海全志科技股份有限公司 CPU frequency adjusting method and system
CN112114975A (en) * 2020-10-28 2020-12-22 Oppo广东移动通信有限公司 Processor frequency adjusting method and device, storage medium and electronic equipment
CN112114975B (en) * 2020-10-28 2023-06-27 Oppo广东移动通信有限公司 Processor frequency adjusting method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN106095052B (en) 2018-03-27
WO2017206859A1 (en) 2017-12-07
CN108509016A (en) 2018-09-07
CN108509016B (en) 2021-02-19

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
KR101187622B1 (en) Coordinating power management functions in a multi-media device
US20170199563A1 (en) Image Display Method and Display System
US8860707B2 (en) Switching display update properties upon detecting a power management event
DE112019001522T5 (en) SYSTEM, DEVICE AND METHOD FOR OPTIMIZED THROTTLE DOWN A PROCESSOR
TWI578153B (en) Adaptive graphics subsystem power and performance management
TW201405305A (en) Terminal device and operating method thereof
US20150015589A1 (en) Device and method of power management for graphic processing unit
CN108377421B (en) Video playing method, display device and computer readable storage medium
WO2017206852A1 (en) Method, device and terminal for allocating computational resources of processor
CN102866765B (en) Graphics processing unit and management method thereof
WO2017131907A2 (en) Systems and methods for providing power efficiency via memory latency control
CN112256383B (en) Method, device, equipment and medium for adjusting CPU core number of virtual machine
CN108519808A (en) Frame per second method of adjustment, device, terminal device and storage medium
DE112012005223T5 (en) Energy management of the display controller
CN108811055A (en) Frame per second method of adjustment, device, terminal device and storage medium
CN108693948A (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
CN104063034B (en) Computer installation and its video card efficiency optimization method
CN108712556A (en) Frame per second method of adjustment, device, terminal device and storage medium
CN106648916A (en) Pedometer message reporting method and apparatus
CN108811056A (en) Frame per second method of adjustment, device, terminal device and storage medium
CN113311923B (en) Temperature control method, device and equipment
CN113918002A (en) Frequency modulation method, frequency modulation device, storage medium and electronic equipment

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
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.

TR01 Transfer of patent right
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.