Background technology
Along with the continuous development of the communication technology, various hommization functions constantly perfect, mobile communication terminal product have become indispensable important tool in user's life gradually.Additional functions such as the alarm clock that product such as mobile phone, PDA provided, notepad, calendar, calculator combine the characteristic that means of communication is always carried, for user's routine work life is provided convenience.
Wherein, alarm service is the function that most of mobile phone productses all have, and custom uses the user of alarm clock on cell phone rather than clock and watch alarm clock also quite a lot.For the user, setting alarm clock is often for important time agreement, as the quarter-bell of getting up prevents to be late or the like.Therefore guarantee that alarm clock on cell phone triggered on time according to the time that the user sets, and just can not bring puzzlement for user's daily life.
The alarm clock function of present many mobile phones can not be fully according to user's setting, in appropriate Time Triggered.A main cause that above-mentioned FAQs occurs is not considered the problem of power management with regard to the alarm clock setting that is mobile phone.Such as, the user is provided with alarm clock, but has arrived time that the user sets because the mobile phone electric weight exhausts reasons such as power shortage, shutdown already, and the alarm clock on cell phone function can't normally start naturally.Some mobile phone supports shutdown quarter-bell promptly also can be according to user's setting under the state of shutdown, in good time startup alarm clock function, if but give no thought to the problem of dump energy, there is the possibility of this functional failure too, bring very big inconvenience to the user.
Therefore for guaranteeing the perfectly safe of alarm clock function in the mobile phone, power management module and alarm clock should comprehensively be set functional module is set, under with reference to the condition that has electric weight now, alarm clock function is set.Power management module is suitably improved, in mobile phone, add corresponding menu function, in dump energy, seal required electric weight of quarter-bell of startup up for safekeeping, obviously be not enough to support to start an alarm clock function, should in time point out this alarm clock function of user unavailable as electric weight.Could guarantee that like this user behind setting alarm clock, can normally start at the fixed time, or when unavailable, in time point out the user to prepare in addition.
Summary of the invention
Technical problem underlying to be solved by this invention is, the electric weight of integrated management portable terminal and alarm clock setting effectively guarantee the reliability of alarm clock on cell phone function.
To achieve these goals, the invention provides a kind of mobile terminal alarm-clock power supply management method, comprise the steps: to obtain in real time current electric quantity of power supply value; The charge value that described current electric quantity of power supply value and quarter-bell is essential compares; In described current electric quantity of power supply value during greater than the essential charge value of described quarter-bell, for the portable terminal of supporting the shutdown alarm, set this portable terminal when electric quantity of power supply equals the essential charge value of described quarter-bell, automatically shut down or send warning signal, portable terminal for the alarm of not supporting to shut down, set when described current electric quantity of power supply value and be not enough to support power consumption and the described quarter-bell must electric weight sum time of portable terminal, send warning signal from the current time to the quarter-bell setting-up time.
Described mobile terminal alarm-clock power supply management method, when the quarter-bell time set is finished and quarter-bell set finish after, obtain current electric quantity of power supply value.
Described mobile terminal alarm-clock power supply management method, during less than the essential charge value of quarter-bell, portable terminal ejects warning signal in power supply current electric quantity value.
Described mobile terminal alarm-clock power supply management method for the portable terminal of supporting the shutdown alarm, is set it and is equaled described quarter-bell at the actual electric weight of power supply and must shut down automatically during charge value, sets this quarter-bell.
Though described current electric quantity of power supply value is the essential electric weight sum of the power consumption from the current time to the quarter-bell setting-up time and described quarter-bell greater than portable terminal, gap sends warning signal during less than a predetermined value.
The power consumption of described portable terminal from the current time to the quarter-bell setting-up time is mobile terminal standby power consumption.
Described mobile terminal alarm-clock power supply management method is set and is also comprised after this quarter-bell, and equaling described quarter-bell at the practical power electric weight must charge value and quarter-bell time when not arriving, and sends warning signal.
It is invalid that described warning signal comprises charge prompting and/or shows that quarter-bell is provided with.
A kind of mobile terminal alarm-clock power-supply system comprises that alarm clock is provided with module, is used to be provided with quarter-bell, and described system also comprises:
The charge value acquisition module obtains essential charge value of quarter-bell and current electric quantity of power supply value; Comparison module, be used for more current electric quantity of power supply value, the essential charge value of quarter-bell, also be used in described current electric quantity of power supply value during greater than the essential charge value of described quarter-bell, whether more current electric quantity of power supply value the power consumption from the current time to the quarter-bell setting-up time and the essential electric weight sum of quarter-bell greater than portable terminal; Display module when the portable terminal electric weight can not be supported quarter-bell, shows warning signal.
Described comparison module, also be used for portable terminal for the alarm of not supporting to shut down, whether more current electric quantity of power supply value essential electric weight sum of power consumption from the current time to the quarter-bell setting-up time and quarter-bell greater than portable terminal, if less than, then display module sends warning signal, otherwise carry out alarm clock module is set.
The present invention can effectively improve the reliability of alarm clock on cell phone function, and the refusal setting alarm clock guarantees that the alarm clock of having set starts in good time when electric weight is not enough, when existing alarm clock to lose efficacy danger the user is pointed out.
Embodiment
The present invention is used to strengthen the management to the alarm clock power supply, and the alarm clock of avoiding setting can't normally start because of exhausting of electric weight.Utilize the present invention, can when being in different situation, carry out multiple prompting, guarantee that the user in time understands the reliability of this alarm clock function the user.
Below describe in detail by specific embodiment, but and be not used in qualification the present invention.
The present invention has taken all factors into consideration the relation between alarm-clock power supply management and alarm clock setting and the setting back power consumption.Import predetermined quarter-bell after the time the user, directly do not set this alarm clock, but the process of at first carrying out detection of the present invention, judgement and setting.Under the condition that electric weight allows, finish the setting of this alarm clock, otherwise pop-up window is pointed out to the user.Its idiographic flow sees also Fig. 1.
Import predetermined quarter-bell after the time the user, at first obtain variable g_nCurr and the required charge value g_nAlarmPer (step 101) of quarter-bell of being used to indicate current electric quantity, and said two devices compared (step 102), this g_nAlarmPer is according to being provided with and the hardware handbook obtains.If g_nCurr is less than the needed charge value g_nAlarmPer of quarter-bell, promptly existing electric weight is not enough to even support that a quarter-bell is required, then the user of pop-up window prompting immediately: alarm clock is provided with failure because of the electric weight deficiency, please in time charge (step 103); If g_nCurr is greater than the needed charge value g_nAlarmPer of quarter-bell, when promptly dump energy was sufficient, at the difference of mobile phone original function, follow-up flow process also was not quite similar.
If mobile phone is provided with the external clock chip, just support the shutdown quarter-bell, then be provided with comparatively simple.Whether g_nCurr is used for control and shuts down, and g_nCurr is deducted the needed charge value g_nAlarmPer of quarter-bell one time, and promptly g_nCurr=g_nCurr-g_nAlarmPer (step 104) has just preserved the electric weight that quarter-bell that the user sets will expend in advance.Then, start the setting (step 105) that original alarm clock setting program carries out alarm clock.Original like this power management routines can be indicated shutdown in the electric weight deficiency, and the enough quarter-bells of dump energy this moment are required.Is being set when arriving the quarter-bell time, alarm clock also can normally be activated.Still utilize original power management module to carry out normal power management after the alarm clock setting is finished, and this power management module determine whether shut down mainly according to the size of g_nCurr.
For the mobile phone of the quarter-bell of not supporting to shut down, promptly do not possess the mobile communication terminal of external clock chip, owing to have uncertainty to the predetermined mobile phone power consumption situation of quarter-bell the time, therefore need the power consumption in future be calculated and monitor from setting quarter-bell.At first read the time that the is provided with g_AlarmTime (step 106) of current time g_CurrTime and quarter-bell.Calculate with reference to cell phone standby electric current g_nCurrentStd and time g_AlarmTime to be set from current time g_CurrTime to quarter-bell under ideal case, to expend electric weight g_nCurrCost (step 107).This cell phone standby electric current g_nCurrentStd is according to being provided with and the acquisition of hardware handbook.To expend electric weight g_nCurrCost and be used to indicate that the variable g_nCurr of current electric quantity compares (step 108).If it is little that the g_nCurr ratio expends electric weight g_CurrCost, then pop-up window is pointed out the user: alarm clock is provided with failure.If it is big that the g_nCurr ratio expends electric weight g_CurrCost, but very approximate, difference is less than a predetermined value, and then pop-up window is pointed out the user: alarm clock might lose efficacy! Can point out the user early to do other preparations like this.If difference is bigger, greater than above-mentioned predetermined value, then start the setting (step 105) that original alarm clock setting program carries out alarm clock, this time alarm clock is set successfully.
Do not support to shut down the mobile phone of quarter-bell after alarm clock is set successfully, still keep monitoring to g_nCurr, when g_nCurr=g_nAlarmPer and quarter-bell setting-up time also do not arrive (step 109), eject a prompt window, inform that the quarter-bell that the user sets lost efficacy.If alarm clock is provided with success, but when not arriving the quarter-bell setting-up time, the user initiatively shuts down, can be in the shutdown picture design one human picture prompting user, for example: do not forget the important thing of so-and-so time, everything goes well with your work to wish you :)
The present invention also provides a kind of mobile terminal alarm-clock power-supply system.This system mainly comprises: charge value acquisition module 201, comparison module 202, display module 203.Import predetermined quarter-bell after the time the user, charge value acquisition module 201 at first obtains variable g_nCurr and the required charge value g_nAlarmPer of quarter-bell that is used to indicate current electric quantity.At this moment, starting comparison module 202 compares above-mentioned two data, if g_nCurr is less than the needed charge value g_nAlarmPer of quarter-bell, be that existing electric weight is not enough to even support that a quarter-bell is required, then start display module 203 immediately, pop-up window prompting user: alarm clock is provided with failure because of the electric weight deficiency, please in time charges; If g_nCurr is greater than the needed charge value g_nAlarmPer of quarter-bell, when promptly dump energy was sufficient, at the mobile phone of difference in functionality, this power-supply system was also different.
If mobile phone is provided with the external clock chip, just support the shutdown quarter-bell, then will be used to control the g_nCurr that whether shuts down and deduct the needed charge value g_nAlarmPer of quarter-bell one time, and the startup alarm clock is provided with module 204.This module is the module that has existed in the prior art.Original like this power management routines can be indicated shutdown in the electric weight deficiency, and the enough quarter-bells of dump energy this moment are required.Be provided with the quarter-bell time when arriving alarm clock also can normally be activated.Still utilize original power management module to carry out normal power management after the alarm clock setting is finished, and this power management module determine whether shut down mainly according to the size of g_nCurr.
Mobile phone for the quarter-bell of not supporting to shut down, the mobile communication terminal that does not promptly possess the external clock chip, utilize charge value acquisition module 201 at first to read the time that the is provided with g_AlarmTime of current time g_CurrTime and quarter-bell, calculate with reference to cell phone standby electric current g_nCurrentStd and time g_AlarmTime is set from current time g_CurrTime to quarter-bell under ideal case, expends electric weight g_nCurrCost.Utilize comparison module 202, compare with the variable g_nCurr that indicates current electric quantity expending electric weight g_nCurrCost.If it is little that the g_nCurr ratio expends electric weight g_CurrCost, then start display module 203, pop-up window prompting user: alarm clock is provided with failure.If it is big that the g_nCurr ratio expends electric weight g_CurrCost, but very approximate, difference then starts display module 203 less than a predetermined value, and pop-up window prompting user: alarm clock might lose efficacy! Can point out the user early to do other preparations like this.If difference is bigger, greater than above-mentioned predetermined value, then start alarm clock and module 204 is set carries out the setting of alarm clock, this time alarm clock is set successfully.
Certainly, for the ease of the management of user to function of the present invention, the present invention also can add option in the setup menu of mobile phone, and the user selects to open or close this function voluntarily, perhaps checks the state of this function.
The corresponding unlatching of this menu option is provided with module 205, and it has utilized a Boolean type global variable g_bAlarmPM, is able to this function of switch by the different assignment to it.For example, this function is opened in the g_bAlarmPM=TRUE representative, and this function is closed in the g_bAlarmPM=FALSE representative.User oriented corresponding operating menu sees also Fig. 3.The user can click and enter " setting " menu 302 in main menu of mobile telephone 301, selects " the alarm clock protection is provided with " option 3025, enters alarm clock power supply interface 303.Three options are arranged in this interface, comprising: " the power-on protection is provided with " 3031, " the powered-down protection is provided with " 3032, " checking that protection is provided with state " 3033.As clicking " power-on protection is provided with " 3031, the then corresponding value of composing g_bAlarmPM is TRUE, and the user will see affirmation picture 3031 ' simultaneously, and the prompting user has started the alarm clock function of power protection.Click " the powered-down protection is provided with " 3032, then corresponding value of giving g_bAlarmPM is FALSE, and same user will see affirmation picture 3032 ', and the prompting user has closed the alarm clock function of power protection.Click " checking that protection is provided with state " 3033, the power-on defencive function is seen up till now in state display field 3034 places that can be below the interface whether." open " as opening demonstration, otherwise show " pass ", be convenient to the user and understand at any time and further each parameter of setting.
Corresponding with it; comprise also in the mobile phone that is judged an opening module 206; this judges that opening module 206 is by judging g_bAlarmPM; judge the current alarm clock function of power protection of whether having opened; if g_bAlarmPM is true, promptly the user has been set to open, then carries out aforesaid obtaining and is used to indicate the variate-value g_nCurr of current electric quantity and step afterwards thereof; if g_bAlarmPM is false, then directly utilizes original alarm clock that module is set alarm clock is provided with.
Adopted the portable terminal of alarm-clock power supply management method of the present invention, if support the type of shutdown alarm, even then electric weight is crossed low normal shutdown, when arriving default quarter-bell during the time, owing to reserved the electric weight of enough alarm clock operate as normal, also can start alarm clock, operate as normal.Do not support the to shut down type of alarm, after successfully alarm clock being set, as long as too not frequent use, dump energy also is enough to make quarter-bell normally to start when arriving the default time.Or after frequent use, prompting user when electric weight does not prop up, alarm clock lost efficacy.As seen the present invention can effectively improve the reliability of alarm clock function, expands and stablized the function of portable terminal.
Simultaneously, the user can adjust the volume of quarter-bell in advance, and the needed charge value g_nAlarmPer of certain quarter-bell also can change with this setting.The user also can at first set the mode of quarter-bell, such as selecting once every 2 minutes sound, cipher 3 times, input begins the time of quarter-bell again, when entering flow process of the present invention like this, needed charge value g_nAlarmPer of quarter-bell is also corresponding to become original 3 times, and mobile phone will be set this quarter-bell after check judges that electric weight can be supported this three ciphers quarter-bell.
Certainly, the present invention field of also can be applicable to other portable terminals or needing Timing power supply to guarantee.For example, be applied on the alarm of ordinary clock or on the timing function of MP3 or the like.
Though the present invention with the foregoing description openly as above, can not limit the present invention, any those of ordinary skill in the art, under the prerequisite of spirit of the present invention and essence, any modification done and replacement all belong to protection scope of the present invention.