Summary of the invention
The purpose of this invention is to provide a kind of portable terminal, make it under idle pulley, when not influencing its normal function realization, make each functional module of its inside all be in sleep state as much as possible,, prolong the stand-by time of terminal to save power consumption.
Another object of the present invention provides a kind of method of electricity saving of mobile terminal, to overcome the mode receiving system beep-page message and the system message of the discontinuous reception of available technology adopting, thereby miss many other and may need the shortcoming of the task of carrying out, when guaranteeing the every function of terminal, reduce the different chip of terminal system running time to greatest extent.
For this reason, the invention provides following technical scheme:
A kind of portable terminal comprises: application layer unit, upper-layer protocol unit, physical layer element, keyboard also comprise:
Power-saving control unit, execute the task time calculating unit and timer;
When portable terminal was in idle condition, the time calculating unit of executing the task calculated portable terminal from now on to the shortest time T that needs between the last the executing the task
i, notice power-saving control unit makes application layer unit, upper-layer protocol unit and physical layer element enter the sleep state of low-power consumption, and according to this shortest time T
iSetting also starts this timer, when timing arrives, notifies described power-saving control unit to wake the task that physical layer element is carried out this moment up, and whether wakes described upper-layer protocol unit up according to the execution result decision of physical layer element.
Described portable terminal also comprises:
The length of one's sleep, the threshold setting unit was used to be provided with the threshold T length of one's sleep
t
Comparing unit, the threshold T length of one's sleep that is used for relatively being provided with
tAnd the portable terminal that calculates is from now on to the shortest time T that needs between the last the executing the task
iSize, and work as T
i〉=T
tThe time, notify described power-saving control unit to make application layer unit, upper-layer protocol unit and physical layer element enter sleep state.
When physical layer element need report execution result the upper-layer protocol unit or need paging receiving message, notice power-saving control unit woke the upper-layer protocol unit up.
When triggering from keyboard is received in described power-saving control unit, wake described application layer unit up and obtain keyboard and trigger task.
Physical layer element is carried out and is carried out the measurement task when reading the paging channel task.
A kind of method of electricity saving of mobile terminal may further comprise the steps:
A, portable terminal obtain it from now on to the shortest time T that needs between the last the executing the task when idle condition
i, make application layer, physical layer and high level in the portable terminal enter sleep state simultaneously;
B, as the T time of advent
iAfter, wake physical layer up and carry out the task that this need be carried out constantly, and determine that according to the execution result of physical layer whether waking high level up enters operating state.
Described method further comprises:
Preestablish the thresholding T length of one's sleep
t
Before application layer in making portable terminal, physical layer and high level enter sleep state, judge described T
iWhether more than or equal to described T
t
Work as T
i〉=T
tThe time, make application layer, physical layer and high level in the portable terminal enter sleep state, otherwise make application layer, physical layer and the high-rise state of activation that keeps.
Described portable terminal obtains it from now on to the shortest time T that needs between the last the executing the task by following steps
i:
Calculate respectively from now on to the time of reading Page Indication Channel, read system message and reading cell broadcast messages;
Read Page Indication Channel, read system message and read the time the shortest in the time of cell broadcast messages what calculate as the shortest time T that needs between executing the task to the last time from now on
i
Described step B further comprises:
When physical layer need report execution result the upper-layer protocol unit or need paging receiving message, wake high level up and enter operating state.
Described method further comprises step:
T after application layer, physical layer and high level enter sleep state
iIn time,, wake application layer up and obtain keyboard and trigger task if when described portable terminal is received triggering from keyboard;
If described keyboard triggering task is the access task, then wakes high level and physical layer up and carry out access operation.
By above technical scheme provided by the invention as can be seen, the present invention controls application layer unit, upper-layer protocol unit and physical layer element and enters the sleep state of low-power consumption or respectively it is waken up from sleep state by the power-saving control unit is set in portable terminal, and further, length of one's sleep thresholding prevents under the more frequent situation of portable terminal task by being set, constantly sleeping and waking each layer unit up increases system control overhead, thereby increases the phenomenon of battery power consumption.Utilize the present invention, can guarantee that portable terminal is not when missing the downlink information that all-network side that terminal should receive sends, the characteristic of finishing the work according to different units needs in the portable terminal, reduce the running time of terminal system different units chip to greatest extent, the electric power that makes portable terminal be used in chip significantly reduces, thereby saved the power consumption of terminal effectively, prolonged the stand-by time of terminal.
Embodiment
Core of the present invention is to be provided with the power-saving control unit and controls the application layer unit in portable terminal, upper-layer protocol unit and physical layer element enter the sleep state of low-power consumption or respectively it are waken up from sleep state, for fear of the increase of under the more frequent situation of portable terminal task, constantly sleeping and waking each layer cell moving power consumption of terminal up, further set the thresholding length of one's sleep, when portable terminal during in idle condition, calculate it from now on to the shortest time that needs between the last the executing the task, if should the time greater than the thresholding of the setting length of one's sleep, just by power-saving control unit controls application layer unit, upper-layer protocol unit and physical layer element enter the sleep state of low-power consumption.After the time is executed the task in arrival, at first wake physical layer element up and carry out the task that this need be carried out constantly, and then determine that according to the execution result of physical layer element whether waking the upper-layer protocol unit up enters operating state.At any time, if after trigger action from keyboard is received in the power-saving control unit, then wake the application layer unit immediately up and carry out corresponding operation.
The present technique field personnel know, after the terminal power-on, carries out the cell initial search process, finally enters into idle pulley.Under idle pulley, the main task of terminal is exactly to understand system information aperiodically, and adjacent cell is measured, and listens to the gravity treatment of paging and sub-district.The system information of Web broadcast and paging content were carried out with the fixed cycle, so terminal there is no need all system informations of constantly deciphering and the content of paging block, thereby can save the power supply power consumption of terminal greatly, improved the stand-by time of terminal.According to this principle, the present invention is provided with a power-saving control unit and controls application layer unit, upper-layer protocol unit and physical layer element and enter the sleep state of low-power consumption or respectively it is waken up from sleep state in portable terminal.
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 drawings and embodiments.
With reference to Fig. 1, Fig. 1 shows the theory diagram of portable terminal first embodiment of the present invention:
Usually, existing portable terminal is made up of several parts such as application layer unit, upper-layer protocol unit, physical layer element, keyboard, radio-frequency module, antennas.In the present invention, comprise this several parts equally, as shown in FIG., application layer cell S 1, upper-layer protocol cell S 2, physical layer element S3, keyboard S4, radio-frequency module S5, antenna S6 are arranged.In addition, in portable terminal of the present invention, also comprise with lower unit: power-saving control cell S 01, time calculating unit S02 and timer S03 execute the task.
When portable terminal was in idle condition, the time calculating unit S02 that executes the task calculated portable terminal from now on to the shortest time T that needs between the last the executing the task
i, notify power-saving control cell S 01 to make application layer unit, upper-layer protocol unit and physical layer element enter the sleep state of low-power consumption simultaneously, and according to this shortest time T
iBe provided with and startup timer S03, when timing arrives, that is to say elapsed time T
iAfter, timer S03 notice power-saving control cell S 01 is waken the task that physical layer element is carried out this moment up, after physical layer element is executed the task and finished, give power-saving control cell S 01, whether wake the upper-layer protocol unit up according to this result's decision by it with the execution result data passes.
The front is mentioned, and under idle pulley, the main task of terminal is exactly to understand system information aperiodically, and adjacent cell is measured, and listens to the gravity treatment of paging and sub-district.And in existing protocol, do not have the specifying measurement task executions constantly.Therefore, calculate portable terminal from now on to the shortest time T that needs between the last the executing the task at the time calculating unit S02 that executes the task
iThe time, only consider that portable terminal needs the moment of read system message or sub-district message and receipts beep-page message.Because the Web broadcast beep-page message is by transmission channel PCH (paging channel) and physical channel PICH (Page Indication Channel) broadcasting, wherein PICH and PCH pairing is used.PICH does not carry the data of transmission channel, but uses with transmission channel PCH pairing, the PCH channel (being mapped on the auxiliary Common Control Channel S-CCPCH) of following thereafter in order to indicate specific portable terminal whether to need to understand.The required information such as physical layer parameter, channel number and channel architecture of PICH channel configuration are by system information broadcast.The content of PICH channel is made up of a series of paging indicator, after terminal is understood the PICH piece, can determine the value of this paging terminal factor in the PICH piece, according to this value, terminal can learn whether be required to receive the PICH channel interior paging channel of paging block afterwards, to determine whether comprising in the beep-page message paging to this terminal.Therefore, calculating portable terminal from now on to the shortest time T that needs between the last the executing the task
iThe time, only consider the moment that portable terminal needs read system message or sub-district message and reads PICH.
No matter being system message, cell broadcast messages or the message of reading PICH, all is periodic, that is to say that each fixing cycle will read once this class message.But the cycle of every kind of message is different, and original position is generally also inequality, if the cycle of certain message is T (is unit with 5ms), start offset is O (is unit with 5ms), and the position of reading this message so is exactly O+N*T, and wherein N is an integer.
When power-saving control cell S 01 is waken physical layer element up, task of needing the notice physical layer element to carry out.If need to carry out read apparatus message or cell broadcast messages, after then physical layer element reads these message, send the message content that reads to power-saving control cell S 01, judge whether the message content that reads to be reported the upper-layer protocol unit by power-saving control cell S 01, report if desired, then power-saving control cell S 01 is waken the upper-layer protocol unit up, and the data content that physical layer element is received reports the upper-layer protocol unit and handles.If need to carry out the task of reading the PICH channel, when then physical layer element is read the PICH channel, carry out the measurement task, and send measurement result to power-saving control cell S 01, judge by power-saving control cell S 01 whether measured value has reached predetermined measurement thresholding.If measured value has reached predetermined measurement thresholding, then power-saving control cell S 01 is waken the upper-layer protocol unit up, makes physical layer element that measurement result is reported the upper-layer protocol unit; Simultaneously, physical layer element sends the PICH information that reads to power-saving control cell S 01, and by the value of power-saving control cell S 01 definite this paging terminal factor, whether according to this value, can learn needs to receive PICH channel PCH channel afterwards.Paging receiving message is then waken the upper-layer protocol unit up and is carried out corresponding action if desired.If power-saving control cell S 01 judges that according to the execution result of physical layer needs do not wake the upper-layer protocol unit up, then notify the time calculating unit of executing the task to carry out the calculating of next control time point.
Make T after application layer unit, upper-layer protocol unit and physical layer element enter sleep state in power-saving control cell S 01
iIn time period,, then wake the application layer unit up and obtain keyboard triggering task if power-saving control cell S 01 is received the triggering from keyboard.If the application layer unit finds that the triggering from keyboard is a task that needs insert, then notify power-saving control cell S 01, power-saving control cell S 01 is waken the operation that it is inserted up with being about to upper-layer protocol unit and physical layer element.
Under the frequent situation of task, constantly sleep and wake the increase that brings the control expense up for fear of portable terminal, also can set one the length of one's sleep thresholding, when the time calculating unit S02 that executes the task calculates the shortest time T that portable terminal needs between executing the task to the last time from now on
iGreater than this during thresholding, power-saving control cell S 01 just makes application layer unit, upper-layer protocol unit and physical layer element enter sleep state length of one's sleep, otherwise, make application layer unit, upper-layer protocol unit and physical layer element keep state of activation always.
Theory diagram with reference to portable terminal second embodiment of the present invention shown in Figure 2:
In this embodiment, threshold setting length of one's sleep cell S 04 is used to be provided with the threshold T length of one's sleep
t, this value can be set by user oneself in the position and the traffic carrying capacity of sub-district according to portable terminal.The threshold T length of one's sleep that comparing unit S05 is used for relatively being provided with
tAnd the portable terminal that calculates is from now on to the shortest time T that needs between the last the executing the task
iSize, work as T
i〉=T
tThe time, notice power-saving control cell S 01 makes application layer unit, upper-layer protocol unit and physical layer element enter sleep state.
The course of work of other each unit is identical with the foregoing description one, does not repeat them here.
The sleep of power-saving control cell S 01 itself and wake up and can utilize prior art realizes by timer.
With reference to Fig. 3, Fig. 3 shows the realization flow of the inventive method first embodiment:
Step 301: portable terminal enters idle condition;
Step 302: calculate from now on to the shortest time T that needs between the last the executing the task
i
Step 303: make application layer, physical layer and high level enter sleep state;
Step 304: at T
iJudge whether in time to interrupt,, then enter step 305 if having from the triggering of keyboard; Otherwise enter step 311;
Step 305: wake application layer up and obtain keyboard triggering task.
Step 306: judge that keyboard triggers whether task is the access task; If, then enter step 307, otherwise, enter step
Step 307: wake physical layer and high level up;
Step 308: set up respective link for portable terminal inserts;
Step 309: remain on the link establishment state;
Step 310: judge whether link discharges; If do not discharge, then return step 309, continue to remain on the link establishment state; Otherwise, returning step 301, portable terminal reenters idle condition;
Step 311: through T
iWake physical layer after time up;
Step 312: judge whether to need to carry out the task of reading PICH; If then enter step 313; Otherwise, enter step 319;
Step 313: read the PICH channel information; Carry out step 314 simultaneously;
Step 314: carry out the measurement task;
Step 315: judge whether measured value has reached predetermined thresholding; If reach, then enter step 316; Otherwise, enter step 318;
Step 316: wake high level up, so that make the physical layer can be to high-rise reporting measurement result;
Step 317: physical layer reporting measurement result gives high-rise;
Step 318: the PICH channel information according to reading, need to judge whether paging receiving information, whether that is to say needs to read the PCH channel; Receive paging information if desired, then enter step 316; Otherwise, enter step 323;
Step 319: carry out read apparatus message or read the task of cell broadcast messages;
Step 320:, judge whether and message content need be reported upper-layer protocol according to the message that reads; If desired, then enter step 321; Otherwise, return step 302;
Step 321: wake high level up, so that make physical layer report the message content that reads to high level;
Step 322: physical layer reporting message content is given high-rise, and high level is preserved the message of receiving and upgraded relevant parameter, and this moment, terminal still remained on idle condition.
Step 323: make portable terminal continue to remain on idle condition; Return step 302 then.
In above-mentioned steps 311, through T
iWake physical layer after time up, at this moment, at T
iThe task of constantly needing to carry out might be to read PICH, read apparatus message and one of read in these three tasks of cell broadcast messages, perhaps wherein two or need to carry out whole three.Carry out a task wherein if desired, then carry out according to above-mentioned corresponding flow process, after executing this task, may terminal continue to remain on idle condition according to execution result, or high level restarts to calculate from now on to the shortest time that needs between executing the task recently.Carry out the multi-task if desired simultaneously, then carry out successively according to above-mentioned corresponding flow process.
Under the frequent situation of task, constantly sleep and wake the increase that brings the control expense up for fear of portable terminal, also can set one the length of one's sleep thresholding, the shortest time T that between the portable terminal that calculates is executed the task to the last time from now on, needs
iGreater than this during thresholding length of one's sleep, just make application layer, high level and physical layer enter sleep state, otherwise, make it keep state of activation always.
Realization flow with reference to the inventive method second embodiment shown in Figure 4 may further comprise the steps:
Step 401: set the thresholding T length of one's sleep
t
Step 402: portable terminal obtains it from now on to the shortest time T that needs between the last the executing the task when idle condition
i
Step 403: judge T
iWhether more than or equal to T
t
If T
i〉=T
t, then enter step 404: make application layer, physical layer and high level in the portable terminal enter sleep state; Otherwise, after the next control time, point arrived, return step 402, recomputate portable terminal from now on to the shortest time T that needs between the last the executing the task
i
Step 405: judge at T
iWhether receive the interruption that triggers from keyboard in time;
If receive, then enter step 406: wake application layer up and obtain keyboard triggering task;
Step 407: when keyboard triggering task is the access task, wakes high level and physical layer up and carry out access operation; After access operation was finished, portable terminal came back to idle condition;
If do not receive, then enter step 408: through T
iWake physical layer after time up and carry out the task that this need be carried out constantly;
Step 409:, need to judge whether high-rise participation according to the execution result of physical layer;
If desired, then enter step 410: wake high level up and enter operating state; After corresponding actions was finished, portable terminal came back to idle condition;
If do not need, after the then next control time, point arrived, return step 402, recomputate portable terminal from now on to the shortest time T that needs between the last the executing the task
i
Usually, in the portable terminal of reality, adopt at least two chips usually, one is DSP (digital signal processor), and another is MCU (microcontroller).Wherein, DSP handles complicated physical layer algorithm, and MCU then finishes a part of controlled function that comprises higher-layer protocols and physical layer.In the data exchange process of DSP with MCU, DSP dispatches different algorithms according to the order of MCU.Such as, generally need the mutual secondary data of every frame for the portable terminal of supporting TD-SCDMA (Time Division-Synchronous Code Division Multiple Access).For application layer unit in the portable terminal of the present invention and upper-layer protocol unit, can realize that also can be integrated on the MCU, at this moment, application layer unit and upper-layer protocol unit are to sleep simultaneously and wake up by two MCU.
Such as, application layer and upper-layer protocol all operate on the MCU chip, and physical layer operates on the dsp chip, and the power-saving control unit also is integrated on the MCU chip, the sleep of power-saving control unit self and wake up by timer and realize.
Suppose that the thresholding length of one's sleep that the power-saving control unit is set is 100ms, that is to say that have only when the idle time surpasses 100ms, the power-saving control unit just can order MCU and DSP to enter sleep state.
The power-saving control unit calculates to be found just need read PICH at the integral multiple of 0.32s, duration is 10ms, needs read apparatus message at the integral multiple of 1.28s, and the duration is 20ms, integral multiple at 0.64s just need be read cell broadcast messages, and the duration is 20ms.And in reading the process of PICH, only when the 5th is read PICH, just found paging, read PCH and lasting 40ms.Will measure when reading PICH, how much relevant the time of measurement and the project that will measure be, supposes here to finish in 10ms.The time that MCU handles once the message from DSP to be needed is 5ms.
In this case, use after the present invention, the running time of DSP and MCU as shown in Figure 5.By this figure as can be seen, to this section of 2.56s in the typical time, it is to be in sleep state that DSP has time of general 95% at 0s, and MCU time of general 99% is arranged is to be in sleep state.Being in the electric weight that is consumed in the dormant time is very little.
As seen, utilize the present invention, can guarantee that terminal can not missed receives system message and the cell broadcast messages that network side sends, and can make terminal in the process of paging receiving, carry out the measurement of necessary wireless index, guaranteed that not only terminal can obtain real-time network parameter at any time, and make each unit of terminal inner in the most of the time of terminal idle pulley, all be in sleep state as much as possible, thereby the consumption of having saved electric energy greatly.
Though described the present invention by embodiment, those of ordinary skills know, the present invention has many distortion and variation and do not break away from spirit of the present invention, wish that appended claim comprises these distortion and variation and do not break away from spirit of the present invention.