Background technology
In the last few years, mobile phone, PDA built-in terminals such as (personal digital assistants) incorporated in the daily life.Along with the function of terminal is become stronger day by day, the power consumption demand of terminal is also more and more higher; On the other hand, the user makes the energy supply of terminal be restricted again to the portable demand of terminal.The target of embedded device low power dissipation design is satisfying under the prerequisite of user to performance requirement exactly, reduces the power consumption of equipment as far as possible, to solve the contradiction between the high-performance and the limited energy content of battery.
In the prior art, a kind of scheme of control terminal power consumption is that for terminal is provided with multiple operating state, terminal can be according to the difference of functional requirement, the real time altering self working state.In every kind of operating state, the corresponding different operating frequency of each functional module of terminal like this, does not need Processing tasks or task amount more after a little while in terminal, and certain module can be in the lower state of operating frequency, thereby reaches the purpose of saving power consumption.
In typical terminal system, the operating state of terminal is divided into three kinds, is respectively Normal (standard) state, Slow (standby) state and Sleep (dormancy) state.Under the Normal state, the CPU of terminal (Central Processing Unit, CPU) subsystem and DSP (Digital SignalProcessor, digital signal processor) subsystem all are in normal operating conditions, and the power consumption of terminal is the highest; Under the Slow state, the PLL of CPU (Phase-Locked Loop, phase-locked loop) does not enable, and the frequency all the time of CPU is lower, so the power consumption of terminal is significantly less than the Normal state under the Slow state; And under the Sleep state, the cpu subsystem of terminal and DSP subsystem all are in power-down state, and terminal is least in power-consuming at this moment.
When terminal is in the Sleep state, can periodically be waken up state to Slow, and at Slow state execution DRX (Discontinuous Reception, discontinuous reception) task, if during carrying out the DRX task, detected communication event, for example received called paging, or detect communication link fails etc., then terminal can further switch to the Normal state and carry out corresponding task; In addition, when terminal was in Sleep or Slow state, if received interrupt instruction, for example user key-press interrupted, connects charger interruption etc., also can switch to the Normal state and carry out corresponding task.
In realizing process of the present invention, the inventor finds that there are the following problems at least in the prior art:
When the generation state switches, terminal always enters the Normal state with fixing operating frequency (comprising CPU operating frequency, DSP operating frequency, bus operating frequency or correlation module operating frequency etc.), but for carrying out under the Normal state of task, some only just can normal process under lower operating frequency, because operating frequency is directly proportional with the dynamic power consumption value of terminal, therefore, if terminal always enters the Normal state with fixing operating frequency, in fact caused unnecessary power wastage.
Embodiment
At first the terminal power consumption control method to the embodiment of the invention describes, and comprising:
When terminal receives the triggering that switches to the standard operation state, obtain the type of handover triggering condition;
According to the type of the handover triggering condition that is obtained, operating frequency is set; Described operating frequency comprises: processing unit operating frequency, and/or system bus operating frequency.
Wherein, described processing unit can comprise the processing unit of CPU, DSP or other types; Described operating frequency can also comprise: Peripheral Interface operating frequency, memory device operating frequency and internal memory operating frequency etc.
When the embodiment of the invention is prepared to switch to the Normal state when terminal, at first obtain the particular type of handover triggering condition, just can judge terminal is about to execution after switching to the Normal state function according to the type of trigger condition, further just can be for terminal is provided with the optimal working frequency, to realize reducing the effect of power consumption.In order to make those skilled in the art person understand the present invention program better, the present invention is described in further detail below in conjunction with accompanying drawing.
Embodiment one:
Figure 1 shows that the flow chart of embodiment of the invention terminal power consumption control method, may further comprise the steps:
S101 when terminal receives the triggering that switches to the standard operation state, obtains the type of handover triggering condition.
At first the switching flow to terminal operating status carries out simple declaration, Figure 2 shows that the schematic diagram of terminal switching condition between each state, when terminal is in the Sleep state, if receive interruption, then be waken up the Slow state that enters, wherein, interrupt to be divided into again DRX interruption and non-DRX and interrupt.
It is periodic that DRX interrupts, and according to concrete communication network environment, DRX cycle scope operated by rotary motion is at 80ms-2560ms.Receive among the DRX when terminal and to have no progeny, can carry out corresponding D RX task, mainly comprise detection (for example detect whether called paging or short message etc. are arranged) and measurement task (using radio-frequency devices that network condition is measured) that paging receives, these DRX tasks all can be finished under the Slow state.If having detected paging reception incident takes place, or detect network condition change (for example the adjacent area level continues to be higher than service area level or down link inefficacy etc.), then need further to carry out and answer, receive note or carry out operation such as network switching, these tasks relate to the mutual of communication system signaling plane and data surface, system loading requires high, and therefore must switch to the Normal state can finish.
Except that the interruption of DRX type, the caused interruption of other incidents all takes place at random, these incidents comprise that timer interruption, user key-press interruption are connected interruption (for example connect charger, connect the usb data line) etc. with the outside, when terminal receives that this class is interrupted, also need to switch to the Normal state and carry out function corresponding (if under the Sleep state, receive this class interruption, then wake to Slow state earlier up, further switch to the Normal state again).
In sum, terminal switches to the trigger condition of standard operation state, can be divided into two classes: down trigger and communication event trigger.Wherein, the down trigger here is meant that specifically non-DRX triggers, and comprises that specifically timer down trigger, user key-press down trigger are connected down trigger etc. with outside, can obtain the particular type of down trigger by reading interrupt register; And trigger for communication event, then can determine the particular type of communication event directly according to performed DRX task.
S102, the type according to handover triggering condition is provided with operating frequency.
Terminal is after getting access to the type of handover triggering condition, in fact just can judge in advance and switch to the function of soon carrying out behind the Normal state, further just can suitable operating frequency be set, to realize the optimal control of power consumption at the concrete function that is about to carry out.The type of several handover triggering conditions of being mentioned in S101, being about to of its correspondence carry out function and power consumption demand is described below:
A) timer down trigger, the quarter-bell that relates to the cycle such as wake up at operation, require lower to operating frequency;
B) user key-press down trigger needs the user who handles interactivity to input or output operation, and operating frequency is had certain requirement;
C) the outside down trigger that connects causes owing to need load driver and operation task scheduling etc., operating frequency is had certain requirement by incidents such as connecting charger, connection usb data line;
D) communication service triggers, and when receiving that this class triggers, the expression terminal need initiate that note receives or called traffic operation such as answer, to having relatively high expectations of operating frequency;
E) network condition change triggers is mainly continued to be higher than incidents such as service area, down link inefficacy and causes by the adjacent area level, when receiving that this class triggers, the expression terminal need be initiated operations such as wireless measurement or network switching, and is the highest to the requirement of operating frequency.
By foregoing description as can be seen, trigger the Normal state that enters by interrupt event, the requirement integral body of operating frequency is lower than to be triggered by communication event enters of the requirement of Normal state operating frequency, this enters the Normal state with regard to allowing terminal with lower operating frequency, simultaneously the normal execution of assurance function.According to above characteristics, we can be pre-defined the corresponding relation of a cover handover triggering condition type and operating frequency, like this, after getting access to the handover triggering condition type, terminal just can be according to predefined corresponding relation, is provided with to switch to operating frequency behind the Normal state.
In actual applications, we can pre-defined a series of Profile (configuration information), all comprises a kind of concrete frequency setting scheme among each Profile, and corresponding a kind of handover triggering condition type.Here be example to comprise concrete cpu frequency value set point and bus frequency set point among the Profiles, after terminal is obtained the handover triggering condition type, by loading Profile corresponding, just can directly CPU operating frequency and the setting of system bus operating frequency be finished with it.A kind of scheme of definition Profile can be joined and is shown in Table 1:
The handover triggering condition type |
The Profile type |
Timer interrupts |
Profile?A |
User key-press interrupts |
Profile?B |
The outside connection interrupts |
Profile?C |
Communication service |
Profile?D |
Network condition changes |
Profile?E |
Table 1
Wherein, in table 1, can adopt following running parameter setting:
Profile A:60MHz/30MHz; (expression cpu frequency set point is 60Mhz, and the bus frequency set point is 30Mhz, below describes similar);
Profile?B:100MHz/50MHz;
Profile?C:160MHz/80MHz;
Profile?D:240MHz/80MHz;
Profile?E:300MHz/100MH。
The concrete set point of above-mentioned table 1 and parameter thereof does not constitute the qualification to the present invention program only for schematically illustrating.Those skilled in the art can be according to concrete interrupt type and application demand, the corresponding relation of definition handover triggering condition type and operating frequency.
Compared with prior art, the technical scheme that the embodiment of the invention provided, when terminal switches to the Normal state, can all not operate in fixing frequency at every turn, but before switching, at first judge the specific category of handover triggering condition, select pairing operating frequency according to the trigger condition classification again, so just can make the operating frequency of terminal after switching to the Normal state and be about to carry out the required frequency of function and be complementary, thereby realize the optimal control of power consumption, reduce the overall power of terminal.
After terminal switches to the Normal state, also can dynamically arrange operating frequency under the Normal state according to performed function.For example, in the above-described embodiments, terminal enters the Normal state by Profile B, if user's button is to carry out the caller operation, then terminal can load Profile D; In like manner, as shown in Figure 1, if do not executing the task for a long time, then terminal can change standby or resting state over to.This part content should be those skilled in the art institute easy to understand and implement.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
Embodiment two:
Corresponding to top method embodiment, the embodiment of the invention also provides a kind of power consumption of terminal control device, referring to shown in Figure 3, comprising:
Trigger condition type acquiring unit 310 is used for obtaining the type of handover triggering condition when terminal receives the triggering that switches to the standard operation state;
Frequency configuration unit 320 is used for the type according to the handover triggering condition that is obtained, and operating frequency is set; Described operating frequency can comprise: CPU operating frequency, DSP operating frequency, system bus operating frequency, Peripheral Interface operating frequency, memory device operating frequency and internal memory operating frequency etc.
Wherein, described frequency configuration unit 320 can be provided with operating frequency according to the handover triggering condition type that sets in advance and the corresponding relation of operating frequency.
The concrete scheme of the handover triggering condition type that sets in advance and the corresponding relation of operating frequency can comprise:
According to the set operating frequency of down trigger, be not higher than according to communication event and trigger set operating frequency.
Wherein, described down trigger specifically can comprise following type: timer down trigger, user key-press down trigger and the outside down trigger that is connected.Connect down trigger, user key-press down trigger and the set operating frequency of timer down trigger according to the outside, its numerical value reduces successively.
Described communication event triggers, and specifically can comprise following type: paging receives and triggers and the network condition change triggers;
Described communication service comprises: incidents such as called communication service and/or reception short message service;
Described network condition changes, and comprising: the adjacent area level continues to be higher than incidents such as service area level and/or down link inefficacy.
Receive the set operating frequency of triggering according to paging, should not be higher than according to the set operating frequency of network condition variation.
In actual applications, we can pre-defined a series of Profile (configuration information), all comprises a kind of concrete frequency setting scheme among each Profile, and corresponding a kind of handover triggering condition type.After terminal is obtained the handover triggering condition type, by loading corresponding Profile with it, the setting of the frequency of just can directly finishing the work.
Referring to shown in Figure 4, the frequency configuration unit can be the form of configuration information loading unit 320a, is used to load the Profile with the pairing configuration information of trigger condition type that obtained, uses the set point that comprises among the described Profile, and operating frequency is set.
The embodiment of the invention also provides a kind of terminal equipment, and this terminal equipment comprises the device described in the foregoing description.
Use above device or terminal equipment, when terminal switches to the Normal state, can all not operate in fixing frequency at every turn, but before switching, at first judge the specific category of handover triggering condition, select pairing operating frequency according to the trigger condition classification again, so just can make the operating frequency of terminal after switching to the Normal state and be about to carry out the required frequency of function to be complementary, thus the optimal control of realization power consumption, the overall power of reduction terminal.
For device embodiment, because it is substantially corresponding to method embodiment, so describe fairly simplely, relevant part gets final product referring to the part explanation of method embodiment.Device embodiment described above only is schematic, wherein said unit as the separating component explanation can or can not be physically to separate also, the parts that show as the unit can be or can not be physical locations also, promptly can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select wherein some or all of module to realize the purpose of present embodiment scheme according to the actual needs.Those of ordinary skills promptly can understand and implement under the situation of not paying performing creative labour.
Need to prove, handover triggering condition type described in this specification embodiment and correspondent frequency are set scheme only for schematically illustrating, what those skilled in the art were easy to expect is, the trigger condition that terminal switches to standard state is not limited to the several types described in the above embodiment, the setting of operating frequency also is not limited only to CPU and system bus, operating frequency, memory device operating frequency and the internal memory operating frequency etc. that for example, can also comprise Peripheral Interfaces such as camera, display screen.
The above only is the specific embodiment of the present invention, does not constitute the qualification to protection range of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within protection scope of the present invention.