CN104683573B - The implementation method of shutdown alarm clock and mobile terminal - Google Patents

The implementation method of shutdown alarm clock and mobile terminal Download PDF

Info

Publication number
CN104683573B
CN104683573B CN201510072841.8A CN201510072841A CN104683573B CN 104683573 B CN104683573 B CN 104683573B CN 201510072841 A CN201510072841 A CN 201510072841A CN 104683573 B CN104683573 B CN 104683573B
Authority
CN
China
Prior art keywords
quarter
bell
mobile terminal
shutdown
event
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510072841.8A
Other languages
Chinese (zh)
Other versions
CN104683573A (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.)
Nubia Technology Co Ltd
Original Assignee
Shenzhen ZTE Mobile Telecom Co 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 Shenzhen ZTE Mobile Telecom Co Ltd filed Critical Shenzhen ZTE Mobile Telecom Co Ltd
Priority to CN201510072841.8A priority Critical patent/CN104683573B/en
Publication of CN104683573A publication Critical patent/CN104683573A/en
Application granted granted Critical
Publication of CN104683573B publication Critical patent/CN104683573B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention discloses a kind of implementation method of shutdown alarm clock, comprising: after mobile terminal shutdown, whether monitoring exists the enable start interrupt signal that RTC register sends; When monitoring the described enable start interrupt signal that described RTC register sends, trigger starting system kernel; In described system kernel start-up course, judge whether the start-up mode of described system kernel is alarm clock mode; When the start-up mode of described system kernel is alarm clock mode, obtain alarm clock start-up parameter; When described system kernel has started, start quarter-bell process process quarter-bell event according to described alarm clock start-up parameter.The present invention also provides a kind of mobile terminal.The response speed of the present invention to shutdown quarter-bell is optimized, and is put in system kernel at the interface that quarter-bell is pointed out, thus can perform quarter-bell prompting operation without the need to starting shooting completely, shortens the response time of shutdown alarm clock.

Description

The implementation method of shutdown alarm clock and mobile terminal
Technical field
The present invention relates to technical field of mobile terminals, particularly relate to implementation method and the mobile terminal of shutdown alarm clock.
Background technology
Smart mobile phone based on Android platform has had shutdown alarm clock function at present mostly.The hardware supports method realizing shutdown alarm clock has multiple, chip internal RTC (Real-TimeClock can be used, real-time clock) method, synchronizing network time comparative approach etc. that compare of module, baseband chip outside connect hours, the support of hardware platform can wake Android system up in order to ensure under power down condition.In order to accomplish prompting function on schedule, generally there is following methods for startup shutdown alarm clock at present: one is system started for 2 minutes in advance, and by system wake-up before alarm time arrives; Two is that system for the treatment of reresents quarter-bell after running completely at alarm time then waken system starting shooting.
Although method above achieves shutdown quarter-bell, effect is poor, and such as, in first method, alarm time does not arrive just to be needed to start shooting in advance, and in start process, play boot animation can affect Consumer's Experience unavoidably; In second method, until alarm time to after start shooting again, and the start process of general Android system needs nearly 1 minutes, and such quarter-bell will exist corresponding time delay, also correspondingly can have influence on Consumer's Experience.
Foregoing, only for auxiliary understanding technical scheme of the present invention, does not represent and admits that foregoing is prior art.
Summary of the invention
Main purpose of the present invention is the implementation method providing a kind of shutdown alarm clock, and the response speed being intended to solve shutdown alarm clock is slow and affect the problem of Consumer's Experience.
For achieving the above object, the implementation method of a kind of shutdown alarm clock provided by the invention, is applied to mobile terminal, and described mobile terminal comprises RTC register, and the implementation method of described shutdown alarm clock comprises:
Step S110, after described mobile terminal shutdown, whether monitoring exists the enable start interrupt signal that RTC register sends;
Step S120, when monitoring the described enable start interrupt signal that described RTC register sends, trigger starting system kernel;
Step S130, in described system kernel start-up course, judges whether the start-up mode of described system kernel is alarm clock mode;
Step S140, when the start-up mode of described system kernel is alarm clock mode, obtains alarm clock start-up parameter;
Step S150, when described system kernel has started, has started quarter-bell process process quarter-bell event according to described alarm clock start-up parameter.
Preferably, the implementation method of described shutdown alarm clock also comprises:
Whether step S210, charge after judging the shutdown of described mobile terminal;
Step S220, when not charging after described mobile terminal shutdown, performs step S110;
Step S230, when charging after described mobile terminal shutdown, creates quarter-bell separate threads in charging process;
Step S240, in described mobile terminal shutdown charging process, described quarter-bell separate threads circulation is read and is preset alarm time;
Step S250, when the difference of described default alarm time and system time is less than Preset Time, triggers described quarter-bell separate threads process quarter-bell event.
Preferably, described step S150 comprises:
In described system kernel, when starting quarter-bell process, described quarter-bell process is run quarter-bell service and is waited for that user responds;
Described quarter-bell process responds the described quarter-bell event of process according to described user, and described quarter-bell event comprises the first greedy quarter-bell event of sleeping, first and stops quarter-bell event, the first upset quarter-bell event, the first start quarter-bell event.
Preferably, described step S250 comprises:
In described system kernel, when triggering described quarter-bell separate threads process quarter-bell event, described quarter-bell separate threads is run quarter-bell service and is waited for that user responds;
Described quarter-bell separate threads responds the described quarter-bell event of process according to described user, and described quarter-bell event comprises the second greedy quarter-bell event of sleeping, second and stops quarter-bell event, the second upset quarter-bell event, the second start quarter-bell event.
Preferably, the implementation method of described shutdown alarm clock also comprises:
Before described mobile terminal shutdown, default alarm time is write described RTC register.
For achieving the above object, the present invention also provides a kind of mobile terminal, has and realizes mobile terminal function, and described mobile terminal comprises:
RTC register, for sending enable start interrupt signal;
Interrupt signal monitoring modular, for after described mobile terminal shutdown, whether monitoring exists the enable start interrupt signal that RTC register sends;
System kernel triggers and starts module, for when monitoring the described enable start interrupt signal that described RTC register sends, and trigger starting system kernel;
Start-up mode judge module, in described system kernel start-up course, judges whether the start-up mode of described system kernel is alarm clock mode;
Alarm clock start-up parameter acquisition module, for when the start-up mode of described system kernel is alarm clock mode, obtains alarm clock start-up parameter;
Quarter-bell process initiation processing module, for when described system kernel has started, has started quarter-bell process process quarter-bell event according to described alarm clock start-up parameter.
Preferably, described mobile terminal also comprises:
Whether shutdown charging judge module, charge after judging the shutdown of described mobile terminal;
Redirect Executive Module, for when not charging after described mobile terminal shutdown, performs interrupt signal monitoring modular;
Quarter-bell separate threads creation module, for when charging after described mobile terminal shutdown, creates quarter-bell separate threads in charging process;
Alarm time read module, in described mobile terminal shutdown charging process, described quarter-bell separate threads circulation is read and is preset alarm time;
Trigger process quarter-bell event module, when the difference of described default alarm time and system time is less than Preset Time, trigger described quarter-bell separate threads process quarter-bell event.
Preferably, described quarter-bell process initiation processing module comprises:
Quarter-bell first class services running unit, in described system kernel, when starting quarter-bell process, described quarter-bell process is run quarter-bell service and is waited for that user responds;
Quarter-bell event first processing unit, responds the described quarter-bell event of process for described quarter-bell process according to described user, and described quarter-bell event comprises the first greedy quarter-bell event of sleeping, first and stops quarter-bell event, the first upset quarter-bell event, the first start quarter-bell event.
Preferably, described triggering process quarter-bell event module comprises:
Quarter-bell serves the second running unit, and in described system kernel, when triggering described quarter-bell separate threads process quarter-bell event, described quarter-bell separate threads is run quarter-bell service and waited for that user responds;
Quarter-bell event second processing unit, respond the described quarter-bell event of process for described quarter-bell separate threads according to described user, described quarter-bell event comprises the second greedy quarter-bell event of sleeping, second and stops quarter-bell event, the second upset quarter-bell event, the second start quarter-bell event.
Preferably, described mobile terminal also comprises:
Alarm time writing module, for before described mobile terminal shutdown, writes described RTC register by described default alarm time.
The present invention proposes a kind of shutdown alarm clock that can start fast, the enable start interrupt signal sent by RTC register in mobile terminal is started with triggering system kernel, and the alarm clock start-up parameter obtained when starting according to system kernel, quarter-bell process is started in system kernel, thus the final operation realizing shutdown quarter-bell.Present invention optimizes the response speed of shutdown quarter-bell, the interface that the quarter-bell of shutdown alarm clock is pointed out is put in system kernel, thus substantially reduce the response time of shutdown quarter-bell.
Accompanying drawing explanation
Fig. 1 is that the present invention shuts down the schematic flow sheet of implementation method first embodiment of quarter-bell;
Fig. 2 is the schematic flow sheet of implementation method second embodiment of shutdown alarm clock of the present invention;
Fig. 3 is the schematic flow sheet of implementation method the 3rd embodiment of shutdown alarm clock of the present invention;
Fig. 4 is the schematic flow sheet of implementation method the 4th embodiment of shutdown alarm clock of the present invention;
Fig. 5 is the high-level schematic functional block diagram of mobile terminal first embodiment of the present invention;
Fig. 6 is the high-level schematic functional block diagram of mobile terminal second embodiment of the present invention;
Fig. 7 is the high-level schematic functional block diagram of mobile terminal of the present invention 3rd embodiment;
Fig. 8 is the high-level schematic functional block diagram of mobile terminal of the present invention 4th embodiment;
Fig. 9 is the high-level schematic functional block diagram of mobile terminal of the present invention 5th embodiment.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, are described further with reference to accompanying drawing.
Embodiment
Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Core concept of the present invention is: the prompting of the quarter-bell of shutdown alarm clock be put in system kernel and realize, to improve the response speed of shutdown alarm clock.When mobile terminal is off-mode, started by RTC register triggering system kernel, then start quarter-bell process process quarter-bell event by system kernel; And when mobile terminal for shutdown and charged state time, then create quarter-bell separate threads by charging process, and trigger quarter-bell separate threads process quarter-bell event according to alarm time.
For further illustrating the implementation method of shutdown alarm clock of the present invention, lower mask body is illustrated with android Android system mobile terminal.
In general Android system, the implementation method of shutdown alarm clock application program is after the system of android being waken up completely, restart shutdown alarm clock application program, the basic Booting sequence of the implementation method of this shutdown alarm clock is as follows: the alarm time arranged as user then wakes mobile terminal system up, LK (LittleKernel, the little operating system of little kernel)->kernel (operating system nucleus)->zygote (android incubator)->app (quarter-bell application).If according to the implementation method of above shutdown alarm clock, whole Android system starts needs about one minute completely, and then shows the interface of quarter-bell prompting, and quarter-bell now has had the delay of a minute nearly, thus affects Consumer's Experience.
Be that the present invention shuts down the schematic flow sheet of implementation method first embodiment of quarter-bell with reference to Fig. 1, Fig. 1.In the present embodiment, the implementation method of shutdown quarter-bell comprises:
Step S110, after mobile terminal shutdown, whether monitoring exists the enable start interrupt signal that RTC register sends;
Be provided with RTC (Real-TimeClock, real-time clock) module at the chip internal of mobile terminal, this RTC module includes some RTC registers, mainly provides time, calendar and alarm clock to export.RTC module also has programmable counter, can be used for counting user and arranges alarm clock value.If when this alarm clock value that user is arranged and system time match, RTC register will produce an alarm interrupt signal, thus makes system force enable start.In the present embodiment, after mobile terminal shutdown, the enable start interrupt signal sent by monitoring RTC register is started with triggering system kernel.
Step S120, when monitoring the enable start interrupt signal that RTC register sends, trigger starting system kernel;
When monitoring the enable start interrupt signal that RTC register sends, when also namely system time is now identical with the user preset time, triggering is started the little operating system LK of little kernel.
Step S130, in system kernel start-up course, judges whether the start-up mode of system kernel is alarm clock mode;
Step S140, when the start-up mode of system kernel is alarm clock mode, obtains alarm clock start-up parameter;
In the boot uboot that LK starts, the reason of system boot is judged by Power Management Unit, if the enable start of RTC module, then in uboot, transmit start-up parameter to system kernel kernel by cmdline order line, such as start-up mode parameter androidboot.mode=alarm (alarm clock mode) is passed to system kernel kernel, then in init initial processes, judge that (Android operation system has three kinds of start-up mode to start-up mode: normal normal startup mode, charger charge initiation pattern, alarm alarm clock start-up mode), if alarm alarm clock start-up mode then obtains alarm clock start-up parameter.
Step S150, when system kernel has started, has started quarter-bell process process quarter-bell event according to alarm clock start-up parameter.
When system kernel kernel has started, system kernel kernel will start quarter-bell process to make this quarter-bell process process quarter-bell event according to alarm clock start-up parameter.
In the present embodiment, the enable start interrupt signal sent by the RTC register in mobile terminal chip is started with triggering system kernel, and the alarm clock start-up parameter obtained when starting according to system kernel, in system kernel, start quarter-bell process, thus realize shutdown quarter-bell.The present embodiment optimizes the response speed of shutdown quarter-bell, is put in system kernel at the interface that quarter-bell is pointed out, thus substantially reduces the response time of shutdown quarter-bell.
Further, be the schematic flow sheet of implementation method second embodiment of shutdown alarm clock of the present invention with reference to Fig. 2, Fig. 2, based on implementation method first embodiment of the invention described above shutdown alarm clock, in the present embodiment, the implementation method of shutdown alarm clock also comprises:
Whether step S210, charge after judging mobile terminal shutdown;
General mobile terminal can carry out charging or not charging after normal shutdown, and mobile terminal carry out when shutting down charging some still can activity with the relevant process of charging, therefore, in the present embodiment, when mobile terminal shutdown charging, also can do according to the realization of process to shutdown alarm clock relevant to charging be still under active state and optimize further.
Step S220, when not charging after mobile terminal shutdown, performs step S110;
When not charging after mobile terminal shutdown, redirect is performed step S110 by the now realization of shutdown alarm clock, triggering is continued to perform step S120-S150 after step S110 is finished.
Step S230, when charging after mobile terminal shutdown, creates quarter-bell separate threads in charging process;
When charging after mobile terminal shutdown, now system kernel is not closed completely, the charging process of still existence activity, therefore, can create quarter-bell separate threads under the charging process of this activity.
Step S240, in mobile terminal shutdown charging process, the circulation of quarter-bell separate threads is read and is preset alarm time;
Step S250, when the difference of default alarm time and system time is less than Preset Time, triggers quarter-bell separate threads process quarter-bell event.
When after generation quarter-bell separate threads, circulation from RTC register is read the alarm time t of user preset by quarter-bell separate threads if, simultaneously by this alarm time t ifwith time of mobile terminal system t systemcompare, work as t if-t systemwhen being less than Preset Time, trigger this quarter-bell separate threads process quarter-bell event.In the present embodiment, Preset Time is preferably 2 seconds.Such as, when user arrange alarm time be 7:00 time, if system time when 6:58 by this quarter-bell separate threads process quarter-bell event of triggering.
In the present embodiment, when mobile terminal shutdown is charged, the now charging process of still existence activity in system kernel, therefore quarter-bell independent process thread can be created under this charging process, thus while not start up system kernel or whole Android system, read the alarm time preset in RTC register by circulation, thus can there is not any delay according to the quarter-bell service of alarm time point real-time response, further increase Consumer's Experience.
Further, be the schematic flow sheet of implementation method the 3rd embodiment of shutdown alarm clock of the present invention with reference to Fig. 3, Fig. 3, based on implementation method first embodiment of the invention described above shutdown alarm clock, in the present embodiment, step S150 comprises sub-step:
Step S1501, in system kernel, when starting quarter-bell process, quarter-bell process is run quarter-bell service and is waited for that user responds;
In system kernel, when starting quarter-bell process, quarter-bell process is run quarter-bell service and is waited for that user responds.Such as, in quarter-bell service, following quarter-bell operation is completed:
(1) play quarter-bell animation by the mode of MIUI, show current alarm time;
(2) loop play quarter-bell sound and motor vibration, until there is process action;
(3) on mobile terminal desktop, draw quarter-bell treatment button " covet and sleep ", " stopping ", " start ", and wait for that user responds;
(4) increase by the upset of predetermined angle to stop quarter-bell service.
Step S1502, quarter-bell process responds process quarter-bell event according to user, and quarter-bell event comprises the first greedy quarter-bell event of sleeping, first and stops quarter-bell event, the first upset quarter-bell event, the first start quarter-bell event.
Quarter-bell process responds process quarter-bell event according to user.Such as, the first greedy quarter-bell event of sleeping: if user touches " covet and the sleep " button on desktop, then will delay alarm time be set, then system kernel shutdown.Such as, arrange the delay quarter-bell after 5 minutes, then after setting up this delay quarter-bell, system kernel shuts down and the startup that is again triggered after 5 minutes, continues subsequently to trigger and runs quarter-bell service;
First stops quarter-bell event: if user touches " stopping " button on desktop, then stop quarter-bell action, and directly shut down by system kernel;
First upset quarter-bell event: if user is by mobile terminal turn predetermined angle, such as, when by mobile terminal turn 90 degree, stops quarter-bell service and directly to be shut down by system kernel;
First start quarter-bell event: if user touches " start " button on desktop, then after killing quarter-bell service, then Android system service is started up completely.
In the present embodiment, it is pointed out that the start-up and functionning due to shutdown alarm clock is in system kernel, therefore for adapting to this running environment, the shutdown alarm clock of the quick startup that the present invention proposes is preferably process.
Further, be the schematic flow sheet of implementation method the 4th embodiment of shutdown alarm clock of the present invention with reference to Fig. 4, Fig. 4, based on the second embodiment of the implementation method of the invention described above shutdown alarm clock, in the present embodiment, step S250 comprises sub-step:
Step S2501, in system kernel, when triggering quarter-bell separate threads process quarter-bell event, quarter-bell separate threads is run quarter-bell service and is waited for that user responds;
In system kernel, when triggering quarter-bell separate threads process quarter-bell event, quarter-bell thread runs quarter-bell service and waits for that user responds.Such as, in quarter-bell service, following quarter-bell operation is completed:
(1) play quarter-bell animation by the mode of MIUI, show current alarm time;
(2) loop play quarter-bell sound and motor vibration, until there is process action;
(3) on mobile terminal desktop, draw quarter-bell treatment button " covet and sleep ", " stopping ", " start ", and wait for that user responds;
(4) increase by the upset of predetermined angle to stop quarter-bell service.
Step S2502, quarter-bell separate threads responds process quarter-bell event according to user, and quarter-bell event comprises the second greedy quarter-bell event of sleeping, second and stops quarter-bell event, the second upset quarter-bell event, the second start quarter-bell event.
Quarter-bell separate threads responds process quarter-bell event according to user.Such as, the second greedy quarter-bell event of sleeping: if user touches " covet and the sleep " button on desktop, then will delay alarm time be set, then continues to enter shutdown charging.Such as, delay quarter-bell after 5 minutes is set, then, after setting up this delay quarter-bell, stops quarter-bell response quarter-bell separate threads and enter shutdown charged state, then, after quarter-bell separate threads obtains this delay alarm time, again trigger quarter-bell and respond this quarter-bell separate threads;
Second stops quarter-bell event: if user touches " stopping " button on desktop, then stop quarter-bell action, and continues to enter shutdown charging;
Second upset quarter-bell event: if user is by mobile terminal turn predetermined angle, such as, when by mobile terminal turn 90 degree, stops quarter-bell service and continues to enter shutdown charging;
Second start quarter-bell event: if user touches " start " button on desktop, then after killing quarter-bell service, then Android system service is started up completely.
Further, in another embodiment of the implementation method of shutdown alarm clock of the present invention, based on any embodiment of the implementation method of the invention described above shutdown alarm clock, the implementation method of shutdown alarm clock also comprises in the present embodiment: before mobile terminal shutdown, will preset alarm time write RTC register.
In the present embodiment, preset alarm time to be write in RTC register before mobile terminal shuts down by user, thus after mobile terminal shutdown, this RTC register can produce alarm interrupt signal according to default alarm time, thus force to make the enable start of system kernel, and then shutdown alarm clock can be realized.Meanwhile, because RTC module is powered battery, so the time of mobile terminal after a power failure in RTC register can not lose, thus the security and stability of alarm time can be ensured.
With reference to the high-level schematic functional block diagram that Fig. 5, Fig. 5 are mobile terminal first embodiment of the present invention.In the present embodiment, mobile terminal comprises:
RTC register 100, for sending enable start interrupt signal;
RTC module has programmable counter, can be used for counting user and arranges alarm clock value.If when the system time of this alarm clock value that user is arranged and this mobile terminal matches, RTC register will produce an alarm interrupt signal, thus makes mobile terminal system force enable start.
Interrupt signal monitoring modular 110, for after mobile terminal shutdown, whether monitoring exists the enable start interrupt signal that RTC register sends;
Be provided with RTC (Real-TimeClock, real-time clock) module at the chip internal of mobile terminal, this RTC module includes some RTC registers, mainly provides time, calendar and alarm clock to export.RTC module also has programmable counter, can be used for counting user and arranges alarm clock value.If when this alarm clock value that user is arranged and system time match, RTC register will produce an alarm interrupt signal, thus makes system force enable start.In the present embodiment, after mobile terminal shutdown, the enable start interrupt signal that interrupt signal monitoring modular 110 is sent by monitoring RTC register starts with triggering system kernel.
System kernel triggers and starts module 120, for when monitoring the enable start interrupt signal that RTC register sends, and trigger starting system kernel;
When monitoring the enable start interrupt signal that RTC register sends, when also namely system time is now identical with the user preset time, system kernel triggers and starts module 120 by the little operating system LK of the triggerings little kernel of startup.
Start-up mode judge module 130, in system kernel start-up course, judges whether the start-up mode of system kernel is alarm clock mode;
Alarm clock start-up parameter acquisition module 140, for when the start-up mode of system kernel is alarm clock mode, obtains alarm clock start-up parameter;
In the boot uboot that LK starts, the reason of system boot is judged by Power Management Unit, if the enable start of RTC module, then in uboot, transmit start-up parameter to system kernel kernel by cmdline order line, such as start-up mode parameter androidboot.mode=alarm (alarm clock mode) is passed to system kernel kernel, then in init initial processes, judge that (Android operation system has three kinds of start-up mode to start-up mode: normal normal startup mode, charger charge initiation pattern, alarm alarm clock start-up mode), if alarm alarm clock start-up mode then obtains alarm clock start-up parameter.
Quarter-bell process initiation processing module 150, for when system kernel has started, has started quarter-bell process process quarter-bell event according to alarm clock start-up parameter.
When system kernel kernel has started, quarter-bell process initiation processing module 150 will start quarter-bell process to make this quarter-bell process process quarter-bell event according to alarm clock start-up parameter.
In the present embodiment, the enable start interrupt signal sent by the RTC register in mobile terminal chip is started with triggering system kernel, and the alarm clock start-up parameter obtained when starting according to system kernel, in system kernel, start quarter-bell process, thus realize shutdown quarter-bell.The present embodiment optimizes the response speed of shutdown quarter-bell, is put in system kernel at the interface that quarter-bell is pointed out, thus substantially reduces the response time of shutdown quarter-bell.
Further, be the high-level schematic functional block diagram of mobile terminal second embodiment of the present invention with reference to Fig. 6, Fig. 6, based on the invention described above mobile terminal first embodiment, in the present embodiment, mobile terminal also comprises:
Whether shutdown charging judge module 210, charge after judging mobile terminal shutdown;
General mobile terminal can carry out charging or not charging after normal shutdown, and mobile terminal carry out when shutting down charging some still can activity with the relevant process of charging, therefore, in the present embodiment, when mobile terminal shutdown charging, also can do according to the realization of process to shutdown alarm clock relevant to charging be still under active state and optimize further.
Redirect Executive Module 220, for when not charging after mobile terminal shutdown, performs step S110;
When not charging after mobile terminal shutdown, now redirect is performed interrupt signal monitoring modular 110 by redirect Executive Module 220.
Quarter-bell separate threads creation module 230, for when charging after mobile terminal shutdown, creates quarter-bell separate threads in charging process;
When charging after mobile terminal shutdown, now system kernel is not closed completely, the charging process of still existence activity, therefore, can create quarter-bell separate threads under the charging process of this activity.
Alarm time read module 240, in mobile terminal shutdown charging process, the circulation of quarter-bell separate threads is read and is preset alarm time;
Triggering process quarter-bell event module 250, during for being less than Preset Time when the difference presetting alarm time and system time, triggering quarter-bell separate threads process quarter-bell event.
When after generation quarter-bell separate threads, circulation from RTC register is read the alarm time t of user preset by alarm time read module 240 if, simultaneously by this alarm time t ifwith time of mobile terminal system t systemcompare, work as t if-t systemwhen being less than Preset Time, triggering process quarter-bell event module 250 and trigger this quarter-bell separate threads process quarter-bell event.In the present embodiment, Preset Time is preferably 2 seconds.Such as, when the alarm time that user is arranged is 7:00, if by this quarter-bell separate threads process quarter-bell event of triggering when system time is 6:58.
In the present embodiment, when mobile terminal shutdown is charged, the now charging process of still existence activity in system kernel, therefore quarter-bell independent process thread can be created under this charging process, thus while not start up system kernel or whole Android system, read the alarm time preset in RTC register by circulation, thus can there is not any delay according to the quarter-bell service of alarm time point real-time response, further increase Consumer's Experience.
Further, be the high-level schematic functional block diagram of mobile terminal of the present invention 3rd embodiment with reference to Fig. 7, Fig. 7, based on the first embodiment of the invention described above mobile terminal, in the present embodiment, quarter-bell process initiation processing module 150 comprises:
Quarter-bell first class services running unit 1501, in system kernel, when starting quarter-bell process, quarter-bell process is run quarter-bell service and is waited for that user responds;
In system kernel, when starting quarter-bell process, quarter-bell process is run quarter-bell service and is waited for that user responds.Such as, in quarter-bell service, following quarter-bell operation is completed:
(1) play quarter-bell animation by the mode of MIUI, show current alarm time;
(2) loop play quarter-bell sound and motor vibration, until there is process action;
(3) on mobile terminal desktop, draw quarter-bell treatment button " covet and sleep ", " stopping ", " start ", and wait for that user responds;
(4) increase by the upset of predetermined angle to stop quarter-bell service.
Quarter-bell event first processing unit 1502, responds process quarter-bell event for quarter-bell process according to user, and quarter-bell event comprises the first greedy quarter-bell event of sleeping, first and stops quarter-bell event, the first upset quarter-bell event, the first start quarter-bell event.
Quarter-bell process responds process quarter-bell event according to user.Such as, the first greedy quarter-bell event of sleeping: if user touches " covet and the sleep " button on desktop, then will delay alarm time be set, then system kernel shutdown.Such as, arrange the delay quarter-bell after 5 minutes, then after setting up this delay quarter-bell, system kernel shuts down and the startup that is again triggered after 5 minutes, continues subsequently to trigger and runs quarter-bell service;
First stops quarter-bell event: if user touches " stopping " button on desktop, then stop quarter-bell action, and directly shut down by system kernel;
First upset quarter-bell event: if user is by mobile terminal turn predetermined angle, such as, when by mobile terminal turn 90 degree, stops quarter-bell service and directly to be shut down by system kernel;
First start quarter-bell event: if user touches " start " button on desktop, then after killing quarter-bell service, then Android system service is started up completely.
Further, be the high-level schematic functional block diagram of mobile terminal of the present invention 4th embodiment with reference to Fig. 8, Fig. 8, based on the second embodiment of the invention described above mobile terminal, in the present embodiment, trigger process quarter-bell event module 250 and comprise:
Quarter-bell serves the second running unit 2501, and in system kernel, when triggering quarter-bell separate threads process quarter-bell event, quarter-bell separate threads is run quarter-bell service and waited for that user responds;
In system kernel, when triggering quarter-bell separate threads process quarter-bell event, quarter-bell thread runs quarter-bell service and waits for that user responds.Such as, in quarter-bell service, following quarter-bell operation is completed:
(1) play quarter-bell animation by the mode of MIUI, show current alarm time;
(2) loop play quarter-bell sound and motor vibration, until there is process action;
(3) on mobile terminal desktop, draw quarter-bell treatment button " covet and sleep ", " stopping ", " start ", and wait for that user responds;
(4) increase by the upset of predetermined angle to stop quarter-bell service.
Quarter-bell event second processing unit 2502, responds process quarter-bell event for quarter-bell separate threads according to user, and quarter-bell event comprises the second greedy quarter-bell event of sleeping, second and stops quarter-bell event, the second upset quarter-bell event, the second start quarter-bell event.
Quarter-bell separate threads responds process quarter-bell event according to user.Such as, the second greedy quarter-bell event of sleeping: if user touches " covet and the sleep " button on desktop, then will delay alarm time be set, then continues to enter shutdown charging.Such as, delay quarter-bell after 5 minutes is set, then, after setting up this delay quarter-bell, stops quarter-bell response quarter-bell separate threads and enter shutdown charged state, then, after quarter-bell separate threads obtains this delay alarm time, again trigger quarter-bell and respond this quarter-bell separate threads;
Second stops quarter-bell event: if user touches " stopping " button on desktop, then stop quarter-bell action, and continues to enter shutdown charging;
Second upset quarter-bell event: if user is by mobile terminal turn predetermined angle, such as, when by mobile terminal turn 90 degree, stops quarter-bell service and continues to enter shutdown charging;
Second start quarter-bell event: if user touches " start " button on desktop, then after killing quarter-bell service, then Android system service is started up completely.
Further, be the high-level schematic functional block diagram of mobile terminal of the present invention 5th embodiment with reference to Fig. 9, Fig. 9, based on the above-mentioned any embodiment of mobile terminal of the present invention, in the present embodiment, mobile terminal also comprises:
Alarm time writing module 310, for before mobile terminal shutdown, will preset alarm time write RTC register.
In the present embodiment, preset alarm time to be write in RTC register before mobile terminal shuts down by user, thus after mobile terminal shutdown, this RTC register can produce alarm interrupt signal according to default alarm time, thus force to make the enable start of system kernel, and then shutdown alarm clock can be realized.Meanwhile, because RTC module is powered battery, so the time of mobile terminal after a power failure in RTC register can not lose, thus the security and stability of alarm time can be ensured.
These are only the preferred embodiments of the present invention; not thereby the scope of the claims of the present invention is limited; every utilize specification of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (10)

1. an implementation method for shutdown alarm clock, is characterized in that, is applied to mobile terminal, and described mobile terminal comprises real-time clock register, and the implementation method of described shutdown alarm clock comprises:
Step S110, after described mobile terminal shutdown, whether monitoring exists the enable start interrupt signal that real-time clock register sends;
Step S120, when monitoring the described enable start interrupt signal that described real-time clock register sends, trigger starting system kernel;
Step S130, in described system kernel start-up course, judges whether the start-up mode of described system kernel is alarm clock mode;
Step S140, when the start-up mode of described system kernel is alarm clock mode, obtains alarm clock start-up parameter;
Step S150, when described system kernel has started, has started quarter-bell process process quarter-bell event according to described alarm clock start-up parameter.
2. the implementation method of shutdown alarm clock as claimed in claim 1, it is characterized in that, the implementation method of described shutdown alarm clock also comprises:
Whether step S210, charge after judging the shutdown of described mobile terminal;
Step S220, when not charging after described mobile terminal shutdown, performs step S110;
Step S230, when charging after described mobile terminal shutdown, creates quarter-bell separate threads in charging process;
Step S240, in described mobile terminal shutdown charging process, described quarter-bell separate threads circulation is read and is preset alarm time;
Step S250, when the difference of described default alarm time and system time is less than Preset Time, triggers described quarter-bell separate threads process quarter-bell event.
3. the implementation method of shutdown alarm clock as claimed in claim 1, it is characterized in that, described step S150 comprises:
In described system kernel, when starting quarter-bell process, described quarter-bell process is run quarter-bell service and is waited for that user responds;
Described quarter-bell process responds the described quarter-bell event of process according to described user, and described quarter-bell event comprises the first greedy quarter-bell event of sleeping, first and stops quarter-bell event, the first upset quarter-bell event, the first start quarter-bell event.
4. the implementation method of shutdown alarm clock as claimed in claim 2, it is characterized in that, described step S250 comprises:
In described system kernel, when triggering described quarter-bell separate threads process quarter-bell event, described quarter-bell separate threads is run quarter-bell service and is waited for that user responds;
Described quarter-bell separate threads responds the described quarter-bell event of process according to described user, and described quarter-bell event comprises the second greedy quarter-bell event of sleeping, second and stops quarter-bell event, the second upset quarter-bell event, the second start quarter-bell event.
5. the implementation method of the shutdown alarm clock as described in as arbitrary in claim 1-4, it is characterized in that, the implementation method of described shutdown alarm clock also comprises:
Before described mobile terminal shutdown, default alarm time is write described real-time clock register.
6. a mobile terminal, has and realizes mobile terminal function, it is characterized in that, described mobile terminal comprises:
Real-time clock register, for sending enable start interrupt signal;
Interrupt signal monitoring modular, for after described mobile terminal shutdown, whether monitoring exists the enable start interrupt signal that real-time clock register sends;
System kernel triggers and starts module, for when monitoring the described enable start interrupt signal that described real-time clock register sends, and trigger starting system kernel;
Start-up mode judge module, in described system kernel start-up course, judges whether the start-up mode of described system kernel is alarm clock mode;
Alarm clock start-up parameter acquisition module, for when the start-up mode of described system kernel is alarm clock mode, obtains alarm clock start-up parameter;
Quarter-bell process initiation processing module, for when described system kernel has started, has started quarter-bell process process quarter-bell event according to described alarm clock start-up parameter.
7. mobile terminal as claimed in claim 6, it is characterized in that, described mobile terminal also comprises:
Whether shutdown charging judge module, charge after judging the shutdown of described mobile terminal;
Redirect Executive Module, for when not charging after described mobile terminal shutdown, performs interrupt signal monitoring modular;
Quarter-bell separate threads creation module, for when charging after described mobile terminal shutdown, creates quarter-bell separate threads in charging process;
Alarm time read module, in described mobile terminal shutdown charging process, described quarter-bell separate threads circulation is read and is preset alarm time;
Trigger process quarter-bell event module, for when the difference of described default alarm time and system time is less than Preset Time, trigger described quarter-bell separate threads process quarter-bell event.
8. mobile terminal as claimed in claim 6, it is characterized in that, described quarter-bell process initiation processing module comprises:
Quarter-bell first class services running unit, in described system kernel, when starting quarter-bell process, described quarter-bell process is run quarter-bell service and is waited for that user responds;
Quarter-bell event first processing unit, responds the described quarter-bell event of process for described quarter-bell process according to described user, and described quarter-bell event comprises the first greedy quarter-bell event of sleeping, first and stops quarter-bell event, the first upset quarter-bell event, the first start quarter-bell event.
9. mobile terminal as claimed in claim 7, is characterized in that, described triggering process quarter-bell event module comprises:
Quarter-bell serves the second running unit, and in described system kernel, when triggering described quarter-bell separate threads process quarter-bell event, described quarter-bell separate threads is run quarter-bell service and waited for that user responds;
Quarter-bell event second processing unit, respond the described quarter-bell event of process for described quarter-bell separate threads according to described user, described quarter-bell event comprises the second greedy quarter-bell event of sleeping, second and stops quarter-bell event, the second upset quarter-bell event, the second start quarter-bell event.
10., as the mobile terminal as described in arbitrary in claim 6-9, it is characterized in that, described mobile terminal also comprises:
Alarm time writing module, for before described mobile terminal shutdown, writes described real-time clock register by default alarm time.
CN201510072841.8A 2015-02-12 2015-02-12 The implementation method of shutdown alarm clock and mobile terminal Active CN104683573B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510072841.8A CN104683573B (en) 2015-02-12 2015-02-12 The implementation method of shutdown alarm clock and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510072841.8A CN104683573B (en) 2015-02-12 2015-02-12 The implementation method of shutdown alarm clock and mobile terminal

Publications (2)

Publication Number Publication Date
CN104683573A CN104683573A (en) 2015-06-03
CN104683573B true CN104683573B (en) 2016-03-23

Family

ID=53318123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510072841.8A Active CN104683573B (en) 2015-02-12 2015-02-12 The implementation method of shutdown alarm clock and mobile terminal

Country Status (1)

Country Link
CN (1) CN104683573B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117897B (en) * 2015-08-19 2019-08-16 小米科技有限责任公司 Shut down based reminding method and device
CN106529244A (en) * 2015-09-15 2017-03-22 中兴通讯股份有限公司 Information processing method and terminal device
US9859731B2 (en) 2016-01-15 2018-01-02 International Business Machines Corporation Alternate alarm notifications based on battery condition
US9734701B2 (en) 2016-01-20 2017-08-15 International Business Machines Corporation Alternative alarm generator
CN106572439B (en) * 2016-10-31 2019-10-25 努比亚技术有限公司 Terminal tracing method, device and mobile terminal
CN108063855B (en) * 2017-12-27 2020-10-30 上海传英信息技术有限公司 Test method and test terminal for shutdown alarm clock
CN113438362B (en) * 2020-03-04 2022-12-09 京东方科技集团股份有限公司 Method for starting terminal at fixed time, terminal and storage medium
CN113596244B (en) * 2021-06-24 2023-06-23 展讯半导体(南京)有限公司 Method, system, equipment and storage medium for realizing shutdown alarm clock of intelligent terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103135992A (en) * 2013-03-13 2013-06-05 上海智变网络科技有限公司 Method of fast designing website mall according to individual characteristics requires of customer
CN103607509A (en) * 2013-11-22 2014-02-26 Tcl通讯(宁波)有限公司 Mobile terminal shutdown alarm clock trigger system and trigger method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103135992A (en) * 2013-03-13 2013-06-05 上海智变网络科技有限公司 Method of fast designing website mall according to individual characteristics requires of customer
CN103607509A (en) * 2013-11-22 2014-02-26 Tcl通讯(宁波)有限公司 Mobile terminal shutdown alarm clock trigger system and trigger method thereof

Also Published As

Publication number Publication date
CN104683573A (en) 2015-06-03

Similar Documents

Publication Publication Date Title
CN104683573B (en) The implementation method of shutdown alarm clock and mobile terminal
US9535747B2 (en) Application heartbeat period adjusting method and apparatus, and terminal
US11463955B2 (en) Method for implementing low power consumption on standby for bluetooth security device and bluetooth security device
CN104484592B (en) The startup method and system of mobile device factory mode
KR101503628B1 (en) Method and system for managing sleep states of interrupt controllers in a portable computing device
US10019602B2 (en) System and method for improved security for a processor in a portable computing device (PCD)
CN103796066A (en) Smart television system and method for turning on and turning off smart television system
CN110381489B (en) Bluetooth connection method, display terminal and television
CN104866063B (en) A kind of method and electronic equipment of information processing
CN103857019A (en) Power-saving method in mobile terminal
WO2015172283A1 (en) Method, device and mobile terminal for reducing power consumption
CN106371938B (en) Smart delays auto shutdown system and its method
CN105159722B (en) RTC wakes up the method and computer of system
WO2012087533A1 (en) Minimizing resource latency between processor application states in a portable computing device by using a next-active state set
CN102855428A (en) Security control method of computer and computer
CN103260224A (en) Mobile terminal and method for achieving refreshing of charging animation during charging
CN106598193B (en) Power consumption control method and device
CN106686633A (en) Method for preventing WIFI malicious frequent awakening
CN113672070A (en) Start-stop control method and device for transport mode and electronic equipment
CN103546648B (en) Method for managing timing information of terminal and terminal
CN106603526B (en) WiFi/hotspot starting method and device
CN110990066B (en) Sleep awakening method of communication terminal
CN106101406B (en) Shutdown alarm triggering processing method based on mobile terminal and mobile terminal
CN108804150B (en) Terminal standby process processing method and terminal
CN115756622B (en) Chip control method and chip

Legal Events

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

Address after: 518057 Guangdong province Shenzhen city Nanshan District high tech park, No. 9018 North Central Avenue, building A, floor six, Han's innovation

Patentee after: Nubian Technologies Ltd.

Address before: 518057 Guangdong province Shenzhen city Nanshan District high tech park, No. 9018 North Central Avenue, building A, floor six, Han's innovation

Patentee before: Shenzhen ZTE Mobile Tech Co., Ltd.