WO2016197715A1 - Method and device for cancelling alarm clock in advance - Google Patents

Method and device for cancelling alarm clock in advance Download PDF

Info

Publication number
WO2016197715A1
WO2016197715A1 PCT/CN2016/080056 CN2016080056W WO2016197715A1 WO 2016197715 A1 WO2016197715 A1 WO 2016197715A1 CN 2016080056 W CN2016080056 W CN 2016080056W WO 2016197715 A1 WO2016197715 A1 WO 2016197715A1
Authority
WO
WIPO (PCT)
Prior art keywords
alarm
action
cancel
canceling
cancellation
Prior art date
Application number
PCT/CN2016/080056
Other languages
French (fr)
Chinese (zh)
Inventor
晋峰
刘兵
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016197715A1 publication Critical patent/WO2016197715A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/21Combinations with auxiliary equipment, e.g. with clocks or memoranda pads
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72484User interfaces specially adapted for cordless or mobile telephones wherein functions are triggered by incoming communication events

Definitions

  • This document relates to, but is not limited to, electrical communication technology, and more particularly to a method and apparatus for canceling an alarm clock in advance.
  • mobile phone alarms are more and more users due to their simple application; users have more and more demand for mobile phone alarms.
  • the mobile phone alarm needs to wait for the alarm time to reach the alarm response, and the user can confirm or delay the operation. This mode of operation does not take into account the fact that the user needs to handle the alarm when the alarm time has not expired.
  • the methods for canceling the alarm clock mainly include: First, canceling the alarm clock at a certain point in time through the interface operation, which not only cancels the current alarm clock at this time point, but also cancels the periodicity after the time point.
  • Alarm clock if the alarm needs to continue to respond, you need to turn the alarm back on. This way of canceling the alarm makes the user add unnecessary operations.
  • the alarm clock is still running in the background, and the next alarm cannot be cancelled in advance by this method.
  • the embodiment of the invention provides a method and a device for canceling an alarm in advance, which can cancel the last alarm alarm before the preset alarm response, and does not affect the continuous response of the preset periodic alarm.
  • An embodiment of the present invention provides a method for canceling an alarm in advance, the method comprising:
  • the canceling the alarm broadcast event is captured by the background alarm cancellation action detection service thread, and determining the cancellation alarm action corresponding to the canceling the alarm broadcast event;
  • the method further includes: starting the background alarm cancellation action detection service thread before the ringing time of the alarm clock.
  • the method further includes:
  • the method further includes:
  • the alarm is activated when the ringing time of the alarm is reached.
  • the converting the canceled alarm action to the canceling the alarm broadcast event includes:
  • the cancel alarm action is converted into a cancel alarm broadcast event
  • the cancel alarm action set includes one or more pre-set standard cancellation actions.
  • the canceling the alarm clock according to the canceling an alarm action includes:
  • the determination macro control parameter for controlling the alarm clock is set to the second preset value, to skip the process of calling the hardware alarm clock, and directly cancel the alarm.
  • the method further includes:
  • the action of the clock is stored as a predetermined cancellation action of the standard; or
  • the selection instruction of the selection criterion canceling action input by the user is acquired, and the standard canceling action corresponding to the selection instruction is stored as the preset standard canceling action.
  • An embodiment of the present invention further provides an apparatus for canceling an alarm in advance, the apparatus comprising:
  • the broadcast event processing module is configured to obtain a cancel alarm action, and convert the obtained canceled alarm action into a canceled alarm broadcast event, and then broadcast;
  • the processing core module is configured to: capture, by the background alarm cancellation action detection service thread, the cancellation alarm broadcast event, and determine the cancellation alarm action corresponding to the cancel alarm broadcast event;
  • the alarm canceling module is configured to cancel the alarm according to the determined cancellation alarm action corresponding to the canceling the alarm broadcast event.
  • the device further includes:
  • the startup detection module is configured to activate the background alarm cancellation action detection service thread before the alarm time of the alarm.
  • the device further includes:
  • the alarm response module is configured to, if it is determined that the cancel alarm broadcast event does not correspond to the cancel alarm action, activate the alarm when the ringing time of the alarm is reached.
  • the broadcast event processing module includes:
  • the obtaining unit is configured to obtain the canceling alarm action
  • the determining unit is configured to compare the acquired canceled alarm action with the canceled alarm action set;
  • the execution unit is configured to: if the acquired cancel alarm action is in the cancel alarm action set, convert the cancel alarm action into a cancel alarm broadcast event, and then broadcast;
  • the cancel alarm action set includes one or more pre-set standard cancellation actions.
  • the alarm cancellation module includes:
  • the first execution unit is configured to generate an instruction to cancel the alarm according to the determined cancellation alarm action corresponding to the canceling the alarm broadcast event;
  • the second execution unit is configured to: set an alarm clock of the alarm according to the generated instruction to cancel the alarm
  • the startup determination parameter is set to a first preset value to cancel the alarm clock
  • the determination macro control parameter for controlling the alarm clock is set to the second preset value, to skip the process of calling the hardware alarm clock, and directly cancel the alarm.
  • the device further includes an alarm cancellation action setting module, where the alarm cancellation action setting module includes:
  • the first setting unit is configured to: before determining the corresponding standard cancel action by the captured canceled alarm broadcast event, obtain a user-entered action of canceling the alarm, and store the obtained action of canceling the alarm as Pre-set the standard cancellation action; or,
  • the second setting unit is configured to acquire a selection instruction of the selection criterion cancellation action input by the user before determining the corresponding standard cancellation action by the captured cancellation alarm broadcast event, and store the standard cancellation action corresponding to the selection instruction The action is canceled for the standard set in advance.
  • the user can customize the standard action of canceling the latest alarm clock within a certain range, thereby avoiding the mistake of the user and canceling the last alarm clock due to different usage habits of the user.
  • the canceling alarm action input by the user with the canceled alarm action set cached locally, each time the user cancels the alarm action, the frequent cancellation of the alarm action detection thread is avoided, and the cancellation of the alarm action detection service thread is effectively guaranteed. service quality.
  • the last alarm alarm is cancelled before the preset alarm response, and the continuous response of the preset periodic alarm is not affected.
  • the technical solution provided by the present invention includes: acquiring a user canceling an alarm action, and converting the obtained canceled alarm action into a canceled alarm broadcast event, and broadcasting; and canceling the alarm broadcast by the background alarm canceling motion detection service thread capture
  • the event determines the cancellation alarm action corresponding to the cancellation of the alarm broadcast event; cancels the alarm according to the canceled alarm action corresponding to the canceled alarm broadcast event.
  • the latest alarm reminder is cancelled before the preset alarm response.
  • FIG. 1 is a flowchart of a method for canceling an alarm in advance according to an embodiment of the present invention
  • FIG. 2 is a flowchart of converting an canceling an alarm action into a canceling an alarm broadcast event according to an embodiment of the present invention
  • FIG. 3 is a flowchart of canceling an alarm clock according to an embodiment of the present invention.
  • FIG. 4 is a structural block diagram of an apparatus for canceling an alarm in advance according to an embodiment of the present invention.
  • FIG. 5 is a structural block diagram of a broadcast event processing module according to an embodiment of the present invention.
  • FIG. 6 is a structural block diagram of an alarm canceling module according to an embodiment of the present invention.
  • FIG. 7 is a structural block diagram of an alarm cancel action setting module according to an embodiment of the present invention.
  • FIG. 8 is a flowchart of a method for canceling an alarm in advance according to another embodiment of the present invention.
  • the method includes:
  • the foregoing solution is mainly to obtain an operation event for canceling an alarm clock broadcast, that is, when an operation for canceling an alarm action is detected, converting it into a cancel alarm broadcast event processing, wherein the canceling the alarm action may include a touch screen action input by the user. It can also include a combined key action input by the user.
  • the canceling the alarm broadcast event may be a data transmission event in the terminal, converting the canceling alarm action of the user into canceling the alarm broadcast event, and canceling the action parameter or action information including the alarm alarm action in the alarm broadcast event.
  • S100 is further included before S101.
  • the user sets an effective alarm.
  • the system starts the background alarm cancellation action detection service thread, which is used to detect whether the user has an operation to cancel the alarm action.
  • the latest alarm is the system.
  • the most recent alarm clock such as the alarm clock, includes: 6:15 alarm clock, 7:00 alarm clock and 8:00 alarm clock. If the system time is 6:45, the last alarm clock refers to the 7:00 alarm clock.
  • the user since the user may perform frequent operations on the touch screen and various keys in an actual application, it is necessary to judge the motion instruction of the user, and analogize the cancellation alarm broadcast event with a preset standard cancellation action, that is, Determine whether the action input by the user is consistent with the preset standard cancel action. For example, the user preset preset cancels the alarm action as action A, and acquires the canceled alarm action action B input by the user. Determine if action A is exactly the same as action B.
  • the action of the user input is determined to be consistent with the preset standard cancel alarm action; for example, when the action A and the action B are completely consistent in the above example, when the actions are consistent, the last alarm command may be cancelled.
  • the method of the embodiment of the present invention further includes:
  • the background alarm cancel motion detection service thread captures the cancel alarm broadcast event, if it is determined that the cancel alarm broadcast event does not correspond to the cancel alarm action, the alarm is started when the alarm time of the alarm is reached.
  • the preset alarm clock when it is determined that the action input by the user is inconsistent with the preset standard canceling alarm action, that is, when the action A and the action B are inconsistent, the preset alarm clock can be normally sounded when the time reaches the response time of the preset alarm clock. Bell reminder.
  • FIG. 2 is a flow chart of converting an cancel alarm action to a cancel alarm broadcast event according to an embodiment of the present invention.
  • the steps of obtaining the user canceling the alarm action and converting the canceling the alarm action into the canceling the alarm broadcast event include:
  • S1021 Acquire an cancel alarm action; in the embodiment of the invention, canceling the alarm action includes canceling an alarm action input by a user.
  • the cancel alarm action set includes one or more preset standard cancel actions.
  • the method of the embodiment of the present invention further includes: performing broadcast transmission of the canceled alarm clock broadcast event generated by the conversion.
  • the user may perform frequent operations on the touch screen or a plurality of keys, and in order to prevent frequent call of the alarm broadcast event processing module, the cancel alarm action set is locally cached.
  • the analogy is canceled with the canceled standard action in the local cached cancel alarm action set. If the canceled alarm action input by the user is in the analogy, the user input will be input.
  • the cancel alarm action is converted to cancel the alarm broadcast event. The solution effectively avoids the frequent operation of the alarm broadcast event processing module and improves its life cycle and service quality.
  • Figure 3 is a flow chart for canceling the alarm clock. According to the cancel alarm action, the steps to cancel the alarm include:
  • S1042 Set an alarm start determination parameter of the alarm to a first preset value according to the generated instruction to cancel the alarm, to cancel the alarm; or, according to the instruction to cancel the alarm, set the determination macro control parameter of the control alarm to the second pre- Set the value to skip the process of calling the hardware alarm and execute the cancel alarm directly.
  • the alarm start determination parameter of the latest alarm may be set to a first preset value, wherein the alarm start determination parameter is set to the first preset value to indicate the latest alarm got canceled.
  • a Boolean type macro variable variable alarm (openAlarm) can be set, and the default value is true (or any preset value), and the method of calling the hardware alarm clock is directly included in one.
  • the judgment parameter is openAlarm. If the user receives the action to cancel the last alarm, the value of openAlarm is changed to error (false). In this statement, the alarm controller's timely control function is directly called to cancel the alarm.
  • openAlarm is reset to true.
  • the alarm clock function of the alarm housekeeper is directly called to start the alarm. This embodiment can cancel the last alarm alarm, and the periodic alarm can continue to respond after canceling the last alarm alarm.
  • the determination macro control parameter for controlling the alarm clock can be set to the second preset value, and the second preset value indicates that the process of calling the hardware alarm clock is skipped, and the process of canceling the alarm clock is directly executed.
  • a parameter of the current system time is included.
  • a new parameter can be added.
  • the alarm is enabled, in addition to the current system time parameter, a flag is added, when the flag is true (or an arbitrary preset value), and the current system time and preset time. The alarm is enabled when it is consistent. If the flag is false, this alarm is ignored.
  • the default value of the flag bit can be set to true.
  • the flag bit is set to false, and the system time is consistent with the preset alarm time of the alarm event. The alarm will not sound when it is. Then, the flag is re-assigned to true, ensuring that the periodic alarm reminder can continue to respond after canceling a single alarm.
  • the method for canceling the foregoing alarm clock in advance includes:
  • the selection instruction for canceling the action of the selection criteria input by the user is acquired, and the standard cancel action corresponding to the selection command is stored as a preset standard cancel action.
  • the user can cancel the action input of canceling the alarm, and there are certain restrictions, and not all operations can be entered.
  • the operation of the touch screen conflicts with other large mobile phone operations, so the operation of the touch screen should be prohibited as a standard action to cancel the alarm.
  • the system should prompt the user for the user to complete the entry.
  • the user sets a long press of the start key as the flag action to cancel the last alarm, but the current long press start key operation defaults to calling Google search, in which case the system prompts the user that the action has been occupied.
  • the action entered by the user needs to be valid in the preset standard action cache set.
  • the user can also select the standard cancellation action provided by the system to set, for example: double-click the volume down button to cancel the alarm, long press the enter button to cancel the alarm, double-click the start button to cancel the alarm, and so on.
  • the background alarm cancel action detection service thread still needs to continue to detect whether the user needs to cancel the next most recent alarm, thereby providing the user with the possibility of continuously canceling multiple alarms.
  • the system determines that the user cancels the last alarm, the current last alarm reminder will not be cancelled immediately, but a prompt box that pops up first (eg, "OK” Cancel the last alarm”).
  • the final cancel alarm command will be executed after the user clicks the confirmation. If the user chooses to cancel, the instruction to cancel the alarm will not be executed.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the method for canceling the alarm clock in advance.
  • An embodiment of the present invention further provides an apparatus for canceling an alarm in advance.
  • the apparatus includes:
  • the broadcast event processing module 102 is configured to acquire a user canceling an alarm action, and convert the obtained canceled alarm action into a cancel alarm broadcast event;
  • the broadcast event processing module is configured to obtain an operation event for canceling the alarm broadcast, that is, when the operation of canceling the alarm action is detected, converting it into canceling the alarm broadcast event processing, wherein the canceling the alarm action may include the touch input by the user.
  • the screen action can also include a combined button action input by the user.
  • the processing core module 103 is configured to: through the background alarm cancellation action detection service thread capture cancel alarm clock broadcast event, determine to cancel the alarm clock broadcast event corresponding to the cancel alarm action;
  • the processing core module 103 needs to judge the motion instruction of the user, and cancels the alarm broadcast event and the preset standard cancellation action.
  • An analogy is made, that is, whether the action input by the user is consistent with the action of canceling the alarm by a preset standard.
  • the user presets the standard to cancel the action of the alarm action A, and obtains the action action B of the canceled alarm input by the user. Determine if action A is exactly the same as action B.
  • the alarm cancellation module 104 is configured to cancel the alarm broadcast according to the processing core module 103.
  • the alarm corresponding to the event cancels the alarm and cancels the alarm.
  • the action of canceling the alarm is determined by determining that the action input by the user is consistent with the preset standard cancellation alarm; for example, when the action A and the action B are completely identical, the canceling the latest alarm command is performed.
  • the apparatus of the embodiment of the present invention further includes:
  • the alarm response module 105 is configured to capture the cancel alarm broadcast event by the background alarm cancel action detection service thread. If the determined cancel alarm broadcast event does not correspond to the cancel alarm action, the alarm is started when the alarm time of the alarm is reached.
  • the preset alarm clock when it is determined that the alarm canceling action input by the user is inconsistent with the preset standard canceling alarm action, that is, when the action A and the action B are inconsistent, the preset alarm clock can be normal when the time reaches the response time of the preset alarm clock. Bell reminder.
  • the apparatus of the embodiment of the present invention further includes: the startup detection module 101 is configured to: after the ringing time of the alarm clock, start the background alarm cancellation action detection service thread;
  • the user sets an effective alarm.
  • the startup detection module 101 starts a background alarm cancellation action detection service thread for detecting whether the user has an operation to cancel the alarm action.
  • the latest alarm is Refers to the alarm clock closest to the system time.
  • the alarm clock includes: 6:15 alarm clock, 7:00 alarm clock and 8:00 alarm clock. If the system time is 6:45, the last alarm clock refers to 7:00. Alarm clock.
  • the broadcast event processing module 102 includes:
  • the obtaining unit 1021 is configured to acquire a cancel alarm action; here, the cancel alarm action may include an operation input by the user.
  • the determining unit 1022 is configured to compare the acquired canceled alarm action with the canceled alarm action set;
  • the processing unit 1023 is configured to, if the acquired cancel alarm action is in the cancel alarm action set, convert the cancel alarm action into a cancel alarm broadcast event and then broadcast.
  • the cancel alarm action set includes one or more pre-set standard cancellation actions.
  • the user may perform frequent operations on the touch screen or a plurality of keys, and in order to prevent the alarm broadcast event processing module 102 from being frequently called, the alarm is cancelled locally.
  • Action set After the user cancels the alarm action, it is analogous to the standard cancel action in the local cache cancel alarm action set. If the user cancels the alarm action in the cancel alarm action set, the user enters the cancel alarm. The action is converted to cancel the alarm broadcast event.
  • the solution effectively avoids the frequent operation of the alarm broadcast event processing module and improves its life cycle and service quality.
  • the alarm cancellation module 104 includes:
  • the first execution unit 1041 is configured to generate an instruction to cancel the alarm according to the determined cancellation alarm action corresponding to the canceling the alarm broadcast event;
  • the second execution unit 1042 is configured to set the alarm start determination parameter of the alarm to a first preset value according to the generated instruction for canceling the alarm to cancel the alarm; or, according to the instruction to cancel the alarm,
  • the decision macro control parameter for controlling the alarm clock is set to the second preset value, to skip the process of calling the hardware alarm clock, and directly cancel the alarm.
  • the alarm start determination parameter of the latest alarm may be set to a first preset value, wherein the alarm start determination parameter is set to a first preset value to indicate the last alarm got canceled.
  • a Boolean type macro variable variable alarm alarm openAlarm can be set, the default value is true (or an arbitrary preset value), and the method of calling the hardware alarm clock is directly included in a judgment statement (for example, , the judgment parameter is openAlarm). If the user receives the action to cancel the last alarm, the value of openAlarm is changed to false. In this statement, the alarm controller's timely control function is directly called to cancel the alarm. After the cancellation is completed, openAlarm is reset to true. When the openAlarm is true, the alarm clock function of the alarm housekeeper is directly called to start the alarm. This embodiment can cancel the last alarm alarm, and the periodic alarm can continue to respond after canceling the last alarm alarm.
  • the determination macro control parameter for controlling the alarm clock can be set to the second preset value, and the second preset value indicates that the process of calling the hardware alarm clock is skipped, and the process of canceling the alarm clock is directly executed.
  • a parameter of the current system time is included.
  • a new parameter can be added.
  • the alarm is enabled, in addition to the current system time parameter, a flag is added, when the flag is true (or an arbitrary preset value), and the current system time is consistent with the system time. The alarm is only enabled. If the flag is false, this alarm is ignored.
  • the default value of the flag bit can be set to true if the core mode is processed from the alarm clock.
  • the flag is set to false.
  • the system time matches the preset alarm time of the alarm event, the alarm will not sound. Then, the flag is re-assigned to true, ensuring that the periodic alarm reminder can continue to respond after canceling a single alarm.
  • the device for canceling the alarm in advance includes an alarm cancel action setting module 106.
  • the alarm cancel action setting module 106 includes:
  • the first setting unit 1061 is configured to acquire a custom cancel alarm action input by the user before determining the corresponding standard cancel action by the captured cancel alarm broadcast event, and store the obtained action of canceling the alarm Cancel the action for the preset criteria; or
  • the second setting unit 1062 is configured to acquire a selection instruction of the selection criterion canceling action input by the user before determining the corresponding standard canceling action by the captured canceled alarm broadcast event, and cancel the standard corresponding to the selection instruction
  • the storage is a predetermined cancellation action that is preset.
  • the user can cancel the action input of canceling the alarm, and there are certain restrictions, and not all operations can be entered.
  • the operation of the touch screen conflicts with other large mobile phone operations, so the operation of the touch screen should be prohibited as a standard action to cancel the alarm.
  • the system should prompt the user for the user to complete the entry.
  • the user sets a long press of the start key as the flag action to cancel the last alarm, but the current long press start key operation defaults to calling Google search, in which case the system prompts the user that the action has been occupied.
  • the action entered by the user needs to be valid in the preset standard action cache set.
  • the user can also select the standard cancellation action provided by the system to set, for example: double-click the volume down button to cancel the alarm, long press the enter button to cancel the alarm, double-click the start button to cancel the alarm, and so on.
  • the background alarm cancel action detection service thread still needs to continue to detect whether the user needs to cancel the next most recent alarm, thereby providing the user with the need to continuously cancel multiple alarms.
  • the system determines that the user cancels the last alarm, the current last alarm reminder will not be cancelled immediately, but a prompt box that pops up first (for example, "is it necessary? Cancel the last alarm”).
  • the final cancel alarm command will be executed after the user clicks the confirmation. If the user chooses to cancel, the cancel alarm will not be executed. instruction.
  • the steps of the method for canceling an alarm in advance in the embodiment of the present invention include:
  • Step 100 The user enters the alarm cancel action setting module to perform selection or customize the setting of the alarm cancel action.
  • Step 200 Detect a setting of an alarm setting list of the current terminal.
  • Step 300 Determine whether the current alarm setting list has an alarm setting. If the current alarm setting list has an alarm setting, step 400 is performed. If the alarm setting list is empty, the process ends.
  • Step 400 Start a background alarm cancellation action detection service thread to obtain an action input by the user.
  • Step 500 The user uses the terminal to perform operations on the terminal.
  • Step 600 In order to avoid frequently calling the background alarm cancel action detection service thread, the obtained canceled alarm action is analogous to the locally cached canceled alarm action set; if in the set, execute 700; if not in the set, execute 1000; The alarm is activated when the alarm time of the alarm clock is once.
  • Step 700 Convert the action to cancel the alarm broadcast event, and broadcast the cancel alarm broadcast event
  • Step 800 The background alarm cancellation motion detection service thread detection step 600 is transmitted to the cancel alarm action input by the user, and the preset standard cancellation action is analogized. If the alarm cancellation event corresponding to the alarm broadcast event is cancelled, the preset standard cancellation action is cancelled. If yes, go to step 900; if they are not, go to step 1000;
  • Step 900 cancel the last alarm clock
  • Step 1000 When the ringing time of the latest alarm clock is reached, the alarm is started.
  • the user can customize the standard action of canceling the latest alarm clock within a certain range, thereby avoiding the mistake of the user and canceling the latest alarm clock due to different usage habits.
  • the action input by the user with the set of canceled alarm action cached locally, for each action of the user, avoiding frequent calls to cancel the alarm action detection thread, effectively guaranteeing the action comparison The quality of service of the thread.
  • the last alarm alarm is cancelled before the preset alarm response, and the continuous response of the preset periodic alarm is not affected.
  • the above technical solution achieves the last alarm alarm reminder before the preset alarm response, without affecting the continuous response of the preset periodic alarm.

Abstract

A method and device for cancelling an alarm clock in advance, the method comprising: obtaining an alarm clock cancellation action of a user, converting the obtained alarm clock cancellation action into an alarm clock cancellation broadcasting event, and performing broadcasting; capturing the alarm clock cancellation broadcasting event via a background alarm clock cancellation action detection service thread, and determining the alarm clock cancellation action corresponding to the alarm clock cancellation broadcasting event; cancelling the alarm clock according to the determined alarm clock cancellation action corresponding to the alarm clock cancellation broadcasting event. The present invention cancels a latest alarm clock reminder before a preset alarm clock response without affecting a preset periodic alarm clock continued response.

Description

一种闹钟提前取消的方法及装置Method and device for canceling alarm clock in advance 技术领域Technical field
本文涉及但不限于电通信技术,尤其涉及一种闹钟提前取消的方法及装置。This document relates to, but is not limited to, electrical communication technology, and more particularly to a method and apparatus for canceling an alarm clock in advance.
背景技术Background technique
随着终端的应用推广,手机闹铃由于应用简单,使用它的用户越来越多;用户对手机闹铃的应用需求也愈加频繁。目前,手机闹铃需要等待闹钟时间到达闹钟响应后,用户才能进行确认或者延迟操作。这样的操作方式没有考虑闹铃时间未到时,用户需要处理闹铃的情况。With the application of the terminal, mobile phone alarms are more and more users due to their simple application; users have more and more demand for mobile phone alarms. At present, the mobile phone alarm needs to wait for the alarm time to reach the alarm response, and the user can confirm or delay the operation. This mode of operation does not take into account the fact that the user needs to handle the alarm when the alarm time has not expired.
现关技术中,取消闹钟的方法主要有:一是直接通过界面操作取消一个时间点的闹钟,这样不仅取消了这个时间点当前一次的闹钟,也可能取消了该时间点在后的周期性的闹钟;如果需要闹钟持续响应,还需要重新开启闹钟,这种取消闹钟的方式使用户增加了不必要的操作;还有一种类似于翻转静音的操作,在闹钟响应时,用户将手机翻转,手机进入静音模式,通过规避避免闹钟响铃,这种取消方式,用户必须在闹钟响应时才能进行该操作,不能提前进行取消操作,并且这种取消方式只是进行了静音处理,并不是实质的取消,后台依旧运行着闹钟,无法通过该方式提前取消下一次闹钟。In the current technology, the methods for canceling the alarm clock mainly include: First, canceling the alarm clock at a certain point in time through the interface operation, which not only cancels the current alarm clock at this time point, but also cancels the periodicity after the time point. Alarm clock; if the alarm needs to continue to respond, you need to turn the alarm back on. This way of canceling the alarm makes the user add unnecessary operations. There is also an operation similar to flipping the mute. When the alarm responds, the user flips the phone, the phone Enter the silent mode, avoiding the alarm ringing by circumventing. In this cancellation mode, the user must perform the operation when the alarm responds, and the cancellation operation cannot be performed in advance, and the cancellation method is only silent processing, and is not a substantial cancellation. The alarm clock is still running in the background, and the next alarm cannot be cancelled in advance by this method.
在预设闹铃未到相应时间时的设置处理功能,处理不需要的闹铃,而又不影响预设的周期性闹钟的持续响应功能,为用户提供更加方便的操作方法,提高终端用户使用体验是需要解决的技术问题。Setting the processing function when the preset alarm has not reached the corresponding time, processing the unnecessary alarm without affecting the continuous response function of the preset periodic alarm, providing the user with a more convenient operation method and improving the use of the end user. Experience is a technical issue that needs to be addressed.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提供了一种闹钟提前取消的方法及装置,能够在预设闹钟响应之前取消最近一次闹钟提醒,且不影响预设周期性闹钟的持续响应。The embodiment of the invention provides a method and a device for canceling an alarm in advance, which can cancel the last alarm alarm before the preset alarm response, and does not affect the continuous response of the preset periodic alarm.
本发明的实施例提供了一种闹钟提前取消的方法,所述方法包括: An embodiment of the present invention provides a method for canceling an alarm in advance, the method comprising:
获取取消闹钟动作,并将获取的所述取消闹钟动作转化为取消闹钟广播事件后进行广播;Obtaining an canceling alarm action, and converting the obtained canceled alarm action into a canceled alarm broadcast event, and then broadcasting;
通过后台闹钟取消动作检测服务线程捕捉所述取消闹钟广播事件,确定所述取消闹钟广播事件对应的取消闹钟动作;The canceling the alarm broadcast event is captured by the background alarm cancellation action detection service thread, and determining the cancellation alarm action corresponding to the canceling the alarm broadcast event;
根据确定的所述取消闹钟广播事件对应的所述取消闹钟动作,取消所述闹钟。And canceling the alarm clock according to the determined cancellation alarm action corresponding to the canceling the alarm clock broadcast event.
可选地,所述方法还包括:在闹钟的响铃时间之前,启动所述后台闹钟取消动作检测服务线程。Optionally, the method further includes: starting the background alarm cancellation action detection service thread before the ringing time of the alarm clock.
可选地,所述方法还包括:Optionally, the method further includes:
所述方法还包括:The method further includes:
如果确定所述取消闹钟广播事件未对应到取消闹钟动作,在到达所述闹钟的响铃时间时,启动闹铃。If it is determined that the cancel alarm clock broadcast event does not correspond to the cancel alarm action, the alarm is activated when the ringing time of the alarm is reached.
可选地,所述将获取的所述取消闹钟动作转化为取消闹钟广播事件包括:Optionally, the converting the canceled alarm action to the canceling the alarm broadcast event includes:
将获取的所述取消闹钟动作和预设的取消闹钟动作集进行类比;Comparing the obtained canceled alarm action with the preset canceled alarm action set;
如果获取的所述取消闹钟动作在所述取消闹钟动作集中,则将所述取消闹钟动作转化为取消闹钟广播事件;If the acquired cancel alarm action is in the cancel alarm action set, the cancel alarm action is converted into a cancel alarm broadcast event;
所述取消闹钟动作集包括一个或一个以上预先设定的标准取消动作。The cancel alarm action set includes one or more pre-set standard cancellation actions.
可选地,所述根据所述取消闹钟动作,取消所述闹钟,包括:Optionally, the canceling the alarm clock according to the canceling an alarm action includes:
根据确定的所述取消闹钟广播事件对应的所述取消闹钟动作生成取消闹钟的指令;And generating an instruction to cancel the alarm according to the determined cancellation alarm action corresponding to the canceling the alarm broadcast event;
根据生成的所述取消闹钟的指令,将闹钟的闹钟启动判定参数置为第一预设值,以取消所述闹钟;或者,And setting an alarm start determination parameter of the alarm to a first preset value according to the generated instruction for canceling the alarm to cancel the alarm; or
根据所述取消闹钟的指令,将控制闹钟的判定宏控制参数设置为第二预设值,以跳过调用硬件闹钟的流程,直接执行取消闹钟。According to the instruction for canceling the alarm clock, the determination macro control parameter for controlling the alarm clock is set to the second preset value, to skip the process of calling the hardware alarm clock, and directly cancel the alarm.
可选地,所述方法还包括:Optionally, the method further includes:
通过捕捉到的所述取消闹钟广播事件确定对应的标准取消动作之前,Before the corresponding standard cancel action is determined by the captured canceled alarm broadcast event,
获取用户输入的自定义取消闹钟的动作,并将获取的所述自定义取消闹 钟的动作存储为预先设定的所述标准取消动作;或者,Obtain the action of the user to cancel the custom cancel alarm, and cancel the obtained custom cancellation The action of the clock is stored as a predetermined cancellation action of the standard; or
获取用户输入的选择标准取消动作的选择指令,并将与所述选择指令对应的标准取消动作存储为预先设定的所述标准取消动作。The selection instruction of the selection criterion canceling action input by the user is acquired, and the standard canceling action corresponding to the selection instruction is stored as the preset standard canceling action.
本发明的实施例还提供一种闹钟提前取消的装置,所述装置包括:An embodiment of the present invention further provides an apparatus for canceling an alarm in advance, the apparatus comprising:
广播事件处理模块设置为,获取取消闹钟动作,并将获取的所述取消闹钟动作转化为取消闹钟广播事件后进行广播;The broadcast event processing module is configured to obtain a cancel alarm action, and convert the obtained canceled alarm action into a canceled alarm broadcast event, and then broadcast;
处理核心模块设置为,通过后台闹钟取消动作检测服务线程捕捉所述取消闹钟广播事件,确定所述取消闹钟广播事件对应的取消闹钟动作;The processing core module is configured to: capture, by the background alarm cancellation action detection service thread, the cancellation alarm broadcast event, and determine the cancellation alarm action corresponding to the cancel alarm broadcast event;
闹钟取消模块设置为,根据确定的所述取消闹钟广播事件对应的所述取消闹钟动作,取消所述闹钟。The alarm canceling module is configured to cancel the alarm according to the determined cancellation alarm action corresponding to the canceling the alarm broadcast event.
可选地,所述装置还包括:Optionally, the device further includes:
启动检测模块设置为,在闹钟的响铃时间之前,启动所述后台闹钟取消动作检测服务线程。The startup detection module is configured to activate the background alarm cancellation action detection service thread before the alarm time of the alarm.
可选地,所述装置还包括:Optionally, the device further includes:
闹钟响应模块设置为,如果确定所述取消闹钟广播事件未对应到取消闹钟动作,在到达所述闹钟的响铃时间时,启动闹铃。The alarm response module is configured to, if it is determined that the cancel alarm broadcast event does not correspond to the cancel alarm action, activate the alarm when the ringing time of the alarm is reached.
可选地,所述广播事件处理模块包括:Optionally, the broadcast event processing module includes:
获取单元设置为,获取所述取消闹钟动作;The obtaining unit is configured to obtain the canceling alarm action;
判断单元设置为,将获取的所述取消闹钟动作和取消闹钟动作集进行类比;The determining unit is configured to compare the acquired canceled alarm action with the canceled alarm action set;
执行单元设置为,如果获取的所述取消闹钟动作在所述取消闹钟动作集中,则将所述取消闹钟动作转化为取消闹钟广播事件后进行广播;The execution unit is configured to: if the acquired cancel alarm action is in the cancel alarm action set, convert the cancel alarm action into a cancel alarm broadcast event, and then broadcast;
所述取消闹钟动作集包括一个或一个以上预先设定的标准取消动作。The cancel alarm action set includes one or more pre-set standard cancellation actions.
可选地,所述闹钟取消模块包括:Optionally, the alarm cancellation module includes:
第一执行单元设置为,根据确定的所述取消闹钟广播事件对应的所述取消闹钟动作生成取消闹钟的指令;The first execution unit is configured to generate an instruction to cancel the alarm according to the determined cancellation alarm action corresponding to the canceling the alarm broadcast event;
第二执行单元设置为,根据生成的所述取消闹钟的指令,将闹钟的闹钟 启动判定参数置为第一预设值,以取消所述闹钟;或者,The second execution unit is configured to: set an alarm clock of the alarm according to the generated instruction to cancel the alarm The startup determination parameter is set to a first preset value to cancel the alarm clock; or,
根据所述取消闹钟的指令,将控制闹钟的判定宏控制参数设置为第二预设值,以跳过调用硬件闹钟的流程,直接执行取消闹钟。According to the instruction for canceling the alarm clock, the determination macro control parameter for controlling the alarm clock is set to the second preset value, to skip the process of calling the hardware alarm clock, and directly cancel the alarm.
可选地,装置还包括闹钟取消动作设置模块,所述闹钟取消动作设置模块包括:Optionally, the device further includes an alarm cancellation action setting module, where the alarm cancellation action setting module includes:
第一设置单元设置为,通过捕捉到的所述取消闹钟广播事件确定对应的标准取消动作之前,获取用户输入的自定义取消闹钟的动作,并将获取的所述自定义取消闹钟的动作存储为预先设定的所述标准取消动作;或者,The first setting unit is configured to: before determining the corresponding standard cancel action by the captured canceled alarm broadcast event, obtain a user-entered action of canceling the alarm, and store the obtained action of canceling the alarm as Pre-set the standard cancellation action; or,
第二设置单元设置为,通过捕捉到的所述取消闹钟广播事件确定对应的标准取消动作之前,获取用户输入的选择标准取消动作的选择指令,并将与所述选择指令对应的标准取消动作存储为预先设定的所述标准取消动作。The second setting unit is configured to acquire a selection instruction of the selection criterion cancellation action input by the user before determining the corresponding standard cancellation action by the captured cancellation alarm broadcast event, and store the standard cancellation action corresponding to the selection instruction The action is canceled for the standard set in advance.
本发明的上述实施例方案有如下的有益效果:The above embodiments of the present invention have the following beneficial effects:
上述方案中,用户在一定的范围内可以自定义取消最近一次闹钟的标准动作,避免了因用户不同的使用习惯,导致误操作而取消最近一次闹钟。通过将用户输入的取消闹钟动作与缓存在本地的取消闹钟动作集进行类比,针对用户的每一次取消闹钟动作,避免了频繁调用取消闹钟动作检测线程,有效的保障了取消闹钟动作检测服务线程的服务质量。实现了在预设闹钟响应之前取消最近一次闹钟提醒,并且不影响预设周期性闹钟的持续响应。In the above solution, the user can customize the standard action of canceling the latest alarm clock within a certain range, thereby avoiding the mistake of the user and canceling the last alarm clock due to different usage habits of the user. By analogizing the canceling alarm action input by the user with the canceled alarm action set cached locally, each time the user cancels the alarm action, the frequent cancellation of the alarm action detection thread is avoided, and the cancellation of the alarm action detection service thread is effectively guaranteed. service quality. The last alarm alarm is cancelled before the preset alarm response, and the continuous response of the preset periodic alarm is not affected.
与相关技术相比,本发明提供的技术方案,包括:获取用户取消闹钟动作,并将获取的取消闹钟动作转化为取消闹钟广播事件后进行广播;通过后台闹钟取消动作检测服务线程捕捉取消闹钟广播事件,确定取消闹钟广播事件对应的取消闹钟动作;根据确定的取消闹钟广播事件对应的取消闹钟动作,取消闹钟。本发明实施例,实现了不影响预设周期性闹钟的持续响应的情况下,在预设闹钟响应之前取消最近一次闹钟提醒。Compared with the related art, the technical solution provided by the present invention includes: acquiring a user canceling an alarm action, and converting the obtained canceled alarm action into a canceled alarm broadcast event, and broadcasting; and canceling the alarm broadcast by the background alarm canceling motion detection service thread capture The event determines the cancellation alarm action corresponding to the cancellation of the alarm broadcast event; cancels the alarm according to the canceled alarm action corresponding to the canceled alarm broadcast event. In the embodiment of the present invention, when the continuous response of the preset periodic alarm is not affected, the latest alarm reminder is cancelled before the preset alarm response.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
图1为本发明实施例闹钟提前取消的方法的流程图; 1 is a flowchart of a method for canceling an alarm in advance according to an embodiment of the present invention;
图2为本发明实施例将取消闹钟动作转化为取消闹钟广播事件的流程图;2 is a flowchart of converting an canceling an alarm action into a canceling an alarm broadcast event according to an embodiment of the present invention;
图3为本发明实施例取消闹钟的流程图;3 is a flowchart of canceling an alarm clock according to an embodiment of the present invention;
图4为本发明实施例闹钟提前取消的装置的结构框图;4 is a structural block diagram of an apparatus for canceling an alarm in advance according to an embodiment of the present invention;
图5为本发明实施例广播事件处理模块的结构框图;5 is a structural block diagram of a broadcast event processing module according to an embodiment of the present invention;
图6为本发明实施例闹钟取消模块的结构框图;6 is a structural block diagram of an alarm canceling module according to an embodiment of the present invention;
图7为本发明实施例的闹钟取消动作设置模块的结构框图;7 is a structural block diagram of an alarm cancel action setting module according to an embodiment of the present invention;
图8为本发明另一实施例的闹钟提前取消的方法流程图。FIG. 8 is a flowchart of a method for canceling an alarm in advance according to another embodiment of the present invention.
本发明的实施方式Embodiments of the invention
下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。Embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
参见图1,图中示出了本发明的闹钟提前取消的方法。该方法包括:Referring to Figure 1, there is shown a method of canceling an alarm in advance of the present invention. The method includes:
S101、获取取消闹钟动作,并将取消闹钟动作转化为取消闹钟广播事件后进行广播;S101. Acquire an cancel alarm action, and convert the cancel alarm action into a cancel broadcast alarm broadcast event, and then broadcast;
可选地,上述方案主要是获取取消闹钟广播的操作事件,即检测到有取消闹钟动作的操作时,将其转化为取消闹钟广播事件处理,其中,取消闹钟动作可以包括用户输入的触屏动作,也可以包括用户输入的组合按键动作。Optionally, the foregoing solution is mainly to obtain an operation event for canceling an alarm clock broadcast, that is, when an operation for canceling an alarm action is detected, converting it into a cancel alarm broadcast event processing, wherein the canceling the alarm action may include a touch screen action input by the user. It can also include a combined key action input by the user.
需要说明的是,取消闹钟广播事件可以是终端内的数据传输事件,将用户的取消闹钟动作转化为取消闹钟广播事件,取消闹钟广播事件中包括取闹闹钟动作的动作参数或动作信息,It should be noted that the canceling the alarm broadcast event may be a data transmission event in the terminal, converting the canceling alarm action of the user into canceling the alarm broadcast event, and canceling the action parameter or action information including the alarm alarm action in the alarm broadcast event.
本发明实施例,S101之前还包括S100。In the embodiment of the present invention, S100 is further included before S101.
S100、在闹钟的响铃时间之前,启动后台闹钟取消动作检测服务线程;S100: Before the ringing time of the alarm clock, start the background alarm cancellation motion detection service thread;
可选地,用户设置了有效闹钟,在最近一次的闹钟响铃之前,系统启动后台闹钟取消动作检测服务线程,用于检测用户是否有取消闹钟动作的操作,该最近一次的闹钟是指离系统时间最近一次的闹钟,比如闹钟包括:6:15的闹钟、7:00的闹钟和8:00的闹钟,如果系统时间为6:45,则最近一次的闹钟指的是7:00的闹钟。 Optionally, the user sets an effective alarm. Before the last alarm is ringed, the system starts the background alarm cancellation action detection service thread, which is used to detect whether the user has an operation to cancel the alarm action. The latest alarm is the system. The most recent alarm clock, such as the alarm clock, includes: 6:15 alarm clock, 7:00 alarm clock and 8:00 alarm clock. If the system time is 6:45, the last alarm clock refers to the 7:00 alarm clock.
S102、通过后台闹钟取消动作检测服务线程捕捉取消闹钟广播事件,确定取消闹钟广播事件对应的取消闹钟动作。S102. Capture, by the background alarm cancellation action detection service thread, cancel the alarm broadcast event, and determine to cancel the alarm cancellation action corresponding to the alarm broadcast event.
可选地,由于在实际应用中用户可能对触屏以及多种按键进行频繁的操作,因此需要对用户的动作指令进行判断,将取消闹钟广播事件与预先设定的标准取消动作进行类比,即,判断用户输入的动作是否与预先设定的标准取消动作一致。例如,用户预先设定的标准取消闹钟动作为动作(action)A,获取用户输入的取消闹钟动作action B。判断action A是否和action B完全一致。Optionally, since the user may perform frequent operations on the touch screen and various keys in an actual application, it is necessary to judge the motion instruction of the user, and analogize the cancellation alarm broadcast event with a preset standard cancellation action, that is, Determine whether the action input by the user is consistent with the preset standard cancel action. For example, the user preset preset cancels the alarm action as action A, and acquires the canceled alarm action action B input by the user. Determine if action A is exactly the same as action B.
S103、根据确定的取消闹钟广播事件对应的取消闹钟动作,取消闹钟。S103. Cancel the alarm according to the canceled alarm action corresponding to the canceled alarm broadcast event.
可选地,通过判断用户输入的动作与预先设定的标准取消闹钟的动作为一致;比如、上述示例中action A和action B完全一致时,一致时,可以执行取消最近一次的闹钟指令。Optionally, the action of the user input is determined to be consistent with the preset standard cancel alarm action; for example, when the action A and the action B are completely consistent in the above example, when the actions are consistent, the last alarm command may be cancelled.
可选地,本发明实施例方法还包括:Optionally, the method of the embodiment of the present invention further includes:
在后台闹钟取消动作检测服务线程捕捉到取消闹钟广播事件时,如果确定取消闹钟广播事件未对应到取消闹钟动作,在到达闹钟的响铃时间时,启动闹铃。When the background alarm cancel motion detection service thread captures the cancel alarm broadcast event, if it is determined that the cancel alarm broadcast event does not correspond to the cancel alarm action, the alarm is started when the alarm time of the alarm is reached.
本发明实施例中,在判断用户输入的动作与预先设定的标准取消闹钟的动作不一致,即action A和action B不一致时,在时间到达预设闹钟的响应时刻时,预设闹钟能够正常响铃提醒。In the embodiment of the present invention, when it is determined that the action input by the user is inconsistent with the preset standard canceling alarm action, that is, when the action A and the action B are inconsistent, the preset alarm clock can be normally sounded when the time reaches the response time of the preset alarm clock. Bell reminder.
图2为本发明的实施例的将取消闹钟动作转化为取消闹钟广播事件的流程图。该获取用户取消闹钟动作,并将取消闹钟动作转化为取消闹钟广播事件的步骤包括:2 is a flow chart of converting an cancel alarm action to a cancel alarm broadcast event according to an embodiment of the present invention. The steps of obtaining the user canceling the alarm action and converting the canceling the alarm action into the canceling the alarm broadcast event include:
S1021、获取取消闹钟动作;本发明实施例,取消闹钟动作包括由用户输入的取消闹钟动作。S1021: Acquire an cancel alarm action; in the embodiment of the invention, canceling the alarm action includes canceling an alarm action input by a user.
S1022、将获取的取消闹钟动作和取消闹钟动作集进行类比;S1022: Comparing the acquired canceled alarm action with the canceled alarm action set;
需要说明的是,本发明实施例中,取消闹钟动作集包括一个或一个以上预先设定的标准取消动作。It should be noted that, in the embodiment of the present invention, the cancel alarm action set includes one or more preset standard cancel actions.
S1023、如果取消闹钟动作在取消闹钟动作集中,则将取消闹钟动作转化 为取消闹钟广播事件。S1023. If the cancel alarm action is in the cancel alarm action set, the alarm action will be canceled. To cancel the alarm broadcast event.
需要说明的是,转换为取消闹钟广播事件后,本发明实施例方法还包括将转换生成的取消闹钟广播事件进行广播发送。It should be noted that, after the process of canceling the alarm clock broadcast event, the method of the embodiment of the present invention further includes: performing broadcast transmission of the canceled alarm clock broadcast event generated by the conversion.
可选地,在实际应用中用户可能对触屏或者多种按键进行频繁的操作,为了防止频繁的调用闹钟广播事件处理模块,而在本地缓存了取消闹钟动作集。在获取了用户输入的取消闹钟动作后,与本地缓存的取消闹钟动作集中的取消标准动作进行类比,如果经过类比,用户输入的取消闹钟动作在该取消闹钟动作集中时,才会将用户输入的取消闹钟动作转化为取消闹钟广播事件。该方案有效避免了闹钟广播事件处理模块的频繁操作,提升了其生命周期和服务质量。Optionally, in an actual application, the user may perform frequent operations on the touch screen or a plurality of keys, and in order to prevent frequent call of the alarm broadcast event processing module, the cancel alarm action set is locally cached. After the canceled alarm action input by the user is obtained, the analogy is canceled with the canceled standard action in the local cached cancel alarm action set. If the canceled alarm action input by the user is in the analogy, the user input will be input. The cancel alarm action is converted to cancel the alarm broadcast event. The solution effectively avoids the frequent operation of the alarm broadcast event processing module and improves its life cycle and service quality.
图3为取消闹钟的流程图。根据取消闹钟动作,取消闹钟的步骤包括:Figure 3 is a flow chart for canceling the alarm clock. According to the cancel alarm action, the steps to cancel the alarm include:
S1041、根据确定的取消闹钟广播事件对应的取消闹钟动作生成取消闹钟的指令;S1041. Generate an instruction to cancel the alarm according to the canceled alarm action corresponding to the canceled alarm broadcast event;
S1042、根据生成的取消闹钟的指令,将闹钟的闹钟启动判定参数置为第一预设值,以取消闹钟;或者,根据取消闹钟的指令,将控制闹钟的判定宏控制参数设置为第二预设值,以跳过调用硬件闹钟的流程,直接执行取消闹钟。S1042: Set an alarm start determination parameter of the alarm to a first preset value according to the generated instruction to cancel the alarm, to cancel the alarm; or, according to the instruction to cancel the alarm, set the determination macro control parameter of the control alarm to the second pre- Set the value to skip the process of calling the hardware alarm and execute the cancel alarm directly.
可选地,根据生成的取消闹钟的指令,可以是将最近一次的闹钟的闹钟启动判定参数置为第一预设值,其中,闹钟启动判定参数置为第一预设值表示最近一次的闹钟被取消。作为一种实现方式,可以是设置一个布尔类型的宏控变量多功能闹钟(openAlarm),默认值为正确(true)(或者是任意的一预设值),调用硬件闹钟的方法直接包含在一个判断语句里面(例如,判断参数为openAlarm)。如果接收到用户有取消最近一次闹钟的动作,openAlarm的值变更为错误(false),在该语句里直接调用闹钟管家的及时控制功能,取消本次闹钟。取消完成后,openAlarm复位为true。openAlarm为true时直接调用闹钟管家的启动闹钟功能来启动闹钟,该实施方式能够实现取消最近一次闹钟提醒,并且在取消该最近一次闹钟提醒后,该周期性闹钟仍可以持续响应。 Optionally, according to the generated instruction for canceling the alarm, the alarm start determination parameter of the latest alarm may be set to a first preset value, wherein the alarm start determination parameter is set to the first preset value to indicate the latest alarm got canceled. As an implementation manner, a Boolean type macro variable variable alarm (openAlarm) can be set, and the default value is true (or any preset value), and the method of calling the hardware alarm clock is directly included in one. Inside the judgment statement (for example, the judgment parameter is openAlarm). If the user receives the action to cancel the last alarm, the value of openAlarm is changed to error (false). In this statement, the alarm controller's timely control function is directly called to cancel the alarm. After the cancellation is completed, openAlarm is reset to true. When the openAlarm is true, the alarm clock function of the alarm housekeeper is directly called to start the alarm. This embodiment can cancel the last alarm alarm, and the periodic alarm can continue to respond after canceling the last alarm alarm.
此外,根据取消闹钟的指令,可以将控制闹钟的判定宏控制参数设置为第二预设值,第二预设值表示调用硬件闹钟的流程被跳过,直接执行取消闹钟的流程。例如,在启动闹钟的方法中,包含了一个当前系统时间的参数。另外,可以新增加一个参数,启用闹钟时除了当前系统时间的参数之外,还增加一个标志位,当标志位为true(或者是任意的一预设值),并且当前系统时间与预设时间一致时才启用闹钟。如果标志位为false,则忽略本次闹钟。作为一种实现方式,标志位的默认值可以设为true,如果从闹钟处理核心模块接收到用户取消闹钟的指令,则将标志位赋值为false,当系统时间与闹钟事件的预设闹钟时间一致时,则闹钟不会响起。接着,标志位重新被赋值为true,确保在取消单次闹钟后,该周期性的闹钟提醒可以持续响应。In addition, according to the instruction to cancel the alarm clock, the determination macro control parameter for controlling the alarm clock can be set to the second preset value, and the second preset value indicates that the process of calling the hardware alarm clock is skipped, and the process of canceling the alarm clock is directly executed. For example, in the method of starting the alarm, a parameter of the current system time is included. In addition, a new parameter can be added. When the alarm is enabled, in addition to the current system time parameter, a flag is added, when the flag is true (or an arbitrary preset value), and the current system time and preset time. The alarm is enabled when it is consistent. If the flag is false, this alarm is ignored. As an implementation manner, the default value of the flag bit can be set to true. If the user cancels the alarm command from the alarm processing core module, the flag bit is set to false, and the system time is consistent with the preset alarm time of the alarm event. The alarm will not sound when it is. Then, the flag is re-assigned to true, ensuring that the periodic alarm reminder can continue to respond after canceling a single alarm.
可选地,上述闹钟提前取消的方法中,还包括:Optionally, the method for canceling the foregoing alarm clock in advance includes:
通过捕捉到的取消闹钟广播事件确定对应的标准取消动作之前,Before the corresponding standard cancel action is determined by the captured cancel alarm broadcast event,
获取用户输入的自定义取消闹钟的动作,并将获取的自定义取消闹钟的动作存储为预先设定的标准取消动作;或者,Obtaining a custom cancel alarm action input by the user, and storing the obtained custom cancel alarm action as a preset standard cancel action; or
获取用户输入的选择标准取消动作的选择指令,并将与选择指令对应的标准取消动作存储为预先设定的标准取消动作。The selection instruction for canceling the action of the selection criteria input by the user is acquired, and the standard cancel action corresponding to the selection command is stored as a preset standard cancel action.
可选的,用户自定义取消闹钟的动作录入,有一定的限制条件,并不是所有的操作都可以进行录入。比如,对触屏的操作与其他大量手机操作相冲突,所以应禁止操作触屏作为取消闹钟的标准动作。当用户录入的动作和其他动作冲突时,系统应该提示用户,以便用户完成录入。例如,用户设置长按起始键作为取消最近一次闹钟的标志动作,但是目前的长按起始键操作默认为调用谷歌搜索,此情况下系统提示用户该动作已经被占用。可选的,用户录入的动作需要在预设标准动作缓存集内才可以生效。Optionally, the user can cancel the action input of canceling the alarm, and there are certain restrictions, and not all operations can be entered. For example, the operation of the touch screen conflicts with other large mobile phone operations, so the operation of the touch screen should be prohibited as a standard action to cancel the alarm. When the action entered by the user conflicts with other actions, the system should prompt the user for the user to complete the entry. For example, the user sets a long press of the start key as the flag action to cancel the last alarm, but the current long press start key operation defaults to calling Google search, in which case the system prompts the user that the action has been occupied. Optionally, the action entered by the user needs to be valid in the preset standard action cache set.
另外,用户还可以选择系统提供的标准取消动作来进行设置,例如:可以是双击音量下键取消闹钟、长按回车键取消闹钟、双击起始键取消闹钟等。In addition, the user can also select the standard cancellation action provided by the system to set, for example: double-click the volume down button to cancel the alarm, long press the enter button to cancel the alarm, double-click the start button to cancel the alarm, and so on.
此外,在用户首次取消最近一次闹钟后,后台闹钟取消动作检测服务线程仍要继续检测用户是否需要取消下一个最近一次闹钟,以此提供用户有可能需要连续取消多个闹钟的需求。 In addition, after the user cancels the last alarm for the first time, the background alarm cancel action detection service thread still needs to continue to detect whether the user needs to cancel the next most recent alarm, thereby providing the user with the possibility of continuously canceling multiple alarms.
可选地,为了防止用户可能因为误操作而取消闹钟,当系统判定用户取消最近一次闹钟后,该当前最近一次闹钟提醒不会立即被取消,而是会先弹出的提示框(例如“是否确定取消最近一次闹钟”)。在用户点击确认后,才会执行最终的取消闹钟指令,如果用户选择取消,则不会执行取消闹钟的指令。Optionally, in order to prevent the user from canceling the alarm due to a misoperation, when the system determines that the user cancels the last alarm, the current last alarm reminder will not be cancelled immediately, but a prompt box that pops up first (eg, "OK" Cancel the last alarm"). The final cancel alarm command will be executed after the user clicks the confirmation. If the user chooses to cancel, the instruction to cancel the alarm will not be executed.
需要说明的是,上述本发明实施例方法可以由包含有闹钟应用的装置或终端实施。It should be noted that the foregoing method of the embodiment of the present invention may be implemented by a device or terminal including an alarm clock application.
本发明实施例还提供一种计算机存储介质,计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行上述闹钟提前取消的方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the method for canceling the alarm clock in advance.
本发明的实施例还提供一种闹钟提前取消的装置,如图4所示,该装置包括:An embodiment of the present invention further provides an apparatus for canceling an alarm in advance. As shown in FIG. 4, the apparatus includes:
广播事件处理模块102设置为,获取用户取消闹钟动作,并将获取的取消闹钟动作转化为取消闹钟广播事件;The broadcast event processing module 102 is configured to acquire a user canceling an alarm action, and convert the obtained canceled alarm action into a cancel alarm broadcast event;
可选地,广播事件处理模块主要用于获取取消闹钟广播的操作事件,即检测到有取消闹钟动作的操作时,将其转化为取消闹钟广播事件处理,其中取消闹钟动作可以包括用户输入的触屏动作,也可以包括用户输入的组合按键动作。Optionally, the broadcast event processing module is configured to obtain an operation event for canceling the alarm broadcast, that is, when the operation of canceling the alarm action is detected, converting it into canceling the alarm broadcast event processing, wherein the canceling the alarm action may include the touch input by the user. The screen action can also include a combined button action input by the user.
处理核心模块103设置为,通过后台闹钟取消动作检测服务线程捕捉取消闹钟广播事件,确定取消闹钟广播事件对应的取消闹钟动作;The processing core module 103 is configured to: through the background alarm cancellation action detection service thread capture cancel alarm clock broadcast event, determine to cancel the alarm clock broadcast event corresponding to the cancel alarm action;
可选地,由于在实际应用中用户可能对触屏以及多种按键进行频繁的操作,因此处理核心模块103需要对用户的动作指令进行判断,将取消闹钟广播事件与预先设定的标准取消动作进行类比,即,判断用户输入的动作是否与预先设定的标准取消闹钟的动作一致。例如,用户预先设定的标准取消闹钟的动作action A,获取用户输入的取消闹钟的动作action B。判断action A是否和action B完全一致。Optionally, since the user may perform frequent operations on the touch screen and various keys in an actual application, the processing core module 103 needs to judge the motion instruction of the user, and cancels the alarm broadcast event and the preset standard cancellation action. An analogy is made, that is, whether the action input by the user is consistent with the action of canceling the alarm by a preset standard. For example, the user presets the standard to cancel the action of the alarm action A, and obtains the action action B of the canceled alarm input by the user. Determine if action A is exactly the same as action B.
闹钟取消模块104设置为,根据处理核心模块103确定的取消闹钟广播 事件对应的取消闹钟动作,取消闹钟。The alarm cancellation module 104 is configured to cancel the alarm broadcast according to the processing core module 103. The alarm corresponding to the event cancels the alarm and cancels the alarm.
可选地,通过判断用户输入的动作与预先设定的标准取消闹钟的动作为一致;例如、即action A和action B完全一致时,执行取消最近一次的闹钟指令。Optionally, the action of canceling the alarm is determined by determining that the action input by the user is consistent with the preset standard cancellation alarm; for example, when the action A and the action B are completely identical, the canceling the latest alarm command is performed.
可选地,本发明实施例装置还包括:Optionally, the apparatus of the embodiment of the present invention further includes:
闹钟响应模块105设置为,通过后台闹钟取消动作检测服务线程捕捉取消闹钟广播事件,如果确定的取消闹钟广播事件未对应到取消闹钟动作,在到达闹钟的响铃时间时,启动闹铃。The alarm response module 105 is configured to capture the cancel alarm broadcast event by the background alarm cancel action detection service thread. If the determined cancel alarm broadcast event does not correspond to the cancel alarm action, the alarm is started when the alarm time of the alarm is reached.
该实施例中,在判断用户输入的闹钟取消动作与预先设定的标准取消闹钟的动作不一致,即action A和action B不一致时,在时间到达预设闹钟的响应时刻时,预设闹钟能够正常响铃提醒。In this embodiment, when it is determined that the alarm canceling action input by the user is inconsistent with the preset standard canceling alarm action, that is, when the action A and the action B are inconsistent, the preset alarm clock can be normal when the time reaches the response time of the preset alarm clock. Bell reminder.
可选的,本发明实施例装置还包括:启动检测模块101设置为,在闹钟的响铃时间之前,启动后台闹钟取消动作检测服务线程;Optionally, the apparatus of the embodiment of the present invention further includes: the startup detection module 101 is configured to: after the ringing time of the alarm clock, start the background alarm cancellation action detection service thread;
可选地,用户设置了有效闹钟,在最近一次的闹钟响铃之前,启动检测模块101启动后台闹钟取消动作检测服务线程,用于检测用户是否有取消闹钟动作的操作,该最近一次的闹钟是指离系统时间最近一次的闹钟,比如闹钟包括:6:15的闹钟、7:00的闹钟和8:00的闹钟,如果系统时间为6:45,则最近一次的闹钟指的是7:00的闹钟。Optionally, the user sets an effective alarm. Before the last alarm is ringed, the startup detection module 101 starts a background alarm cancellation action detection service thread for detecting whether the user has an operation to cancel the alarm action. The latest alarm is Refers to the alarm clock closest to the system time. For example, the alarm clock includes: 6:15 alarm clock, 7:00 alarm clock and 8:00 alarm clock. If the system time is 6:45, the last alarm clock refers to 7:00. Alarm clock.
可选地,如图5所示,广播事件处理模块102包括:Optionally, as shown in FIG. 5, the broadcast event processing module 102 includes:
获取单元1021设置为,获取取消闹钟动作;这里,取消闹钟动作可以包括由用户输入的操作。The obtaining unit 1021 is configured to acquire a cancel alarm action; here, the cancel alarm action may include an operation input by the user.
判断单元1022设置为,将获取的取消闹钟动作和取消闹钟动作集进行类比;The determining unit 1022 is configured to compare the acquired canceled alarm action with the canceled alarm action set;
处理单元1023设置为,如果获取的取消闹钟动作在取消闹钟动作集中,则将取消闹钟动作转化为取消闹钟广播事件后进行广播。The processing unit 1023 is configured to, if the acquired cancel alarm action is in the cancel alarm action set, convert the cancel alarm action into a cancel alarm broadcast event and then broadcast.
可选的,取消闹钟动作集包括一个或一个以上预先设定的标准取消动作。Optionally, the cancel alarm action set includes one or more pre-set standard cancellation actions.
可选地,在实际应用中用户可能对触屏或者多种按键进行频繁的操作,为了防止频繁的调用闹钟广播事件处理模块102,而在本地缓存了取消闹钟 动作集。在获取了用户的取消闹钟动作后,与本地缓存的取消闹钟动作集中的标准取消动作进行类比,如果经过类比,用户输入的取消闹钟动作在该取消闹钟动作集中,才会将用户输入的取消闹钟动作转化为取消闹钟广播事件。该方案有效避免了闹钟广播事件处理模块的频繁操作,提升了其生命周期和服务质量。Optionally, in an actual application, the user may perform frequent operations on the touch screen or a plurality of keys, and in order to prevent the alarm broadcast event processing module 102 from being frequently called, the alarm is cancelled locally. Action set. After the user cancels the alarm action, it is analogous to the standard cancel action in the local cache cancel alarm action set. If the user cancels the alarm action in the cancel alarm action set, the user enters the cancel alarm. The action is converted to cancel the alarm broadcast event. The solution effectively avoids the frequent operation of the alarm broadcast event processing module and improves its life cycle and service quality.
可选地,如图6所示,闹钟取消模块104包括:Optionally, as shown in FIG. 6, the alarm cancellation module 104 includes:
第一执行单元1041设置为,根据确定的所述取消闹钟广播事件对应的所述取消闹钟动作生成取消闹钟的指令;The first execution unit 1041 is configured to generate an instruction to cancel the alarm according to the determined cancellation alarm action corresponding to the canceling the alarm broadcast event;
第二执行单元1042设置为,根据生成的所述取消闹钟的指令,将闹钟的闹钟启动判定参数置为第一预设值,以取消所述闹钟;或者,根据所述取消闹钟的指令,将控制闹钟的判定宏控制参数设置为第二预设值,以跳过调用硬件闹钟的流程,直接执行取消闹钟。The second execution unit 1042 is configured to set the alarm start determination parameter of the alarm to a first preset value according to the generated instruction for canceling the alarm to cancel the alarm; or, according to the instruction to cancel the alarm, The decision macro control parameter for controlling the alarm clock is set to the second preset value, to skip the process of calling the hardware alarm clock, and directly cancel the alarm.
可选地,根据生成的取消闹钟的指令,可以包括将最近一次的闹钟的闹钟启动判定参数置为第一预设值,其中,闹钟启动判定参数置为第一预设值表示最近一次的闹钟被取消。作为一种实现方式,可以是设置一个布尔类型的宏控变量多功能闹钟openAlarm,默认值为true(或者是任意的一预设值),调用硬件闹钟的方法直接包含在一个判断语句里面(例如,判断参数为openAlarm)。如果接收到用户有取消最近一次闹钟的动作,openAlarm的值变更为false,在该语句里直接调用闹钟管家的及时控制功能,取消本次闹钟,取消完成后,openAlarm复位为true。openAlarm为true时直接调用闹钟管家的启动闹钟功能来启动闹钟,该实施方式能够实现取消最近一次闹钟提醒,并且在取消该最近一次闹钟提醒后,该周期性闹钟仍可以持续响应。Optionally, according to the generated instruction for canceling the alarm, the alarm start determination parameter of the latest alarm may be set to a first preset value, wherein the alarm start determination parameter is set to a first preset value to indicate the last alarm got canceled. As an implementation manner, a Boolean type macro variable variable alarm alarm openAlarm can be set, the default value is true (or an arbitrary preset value), and the method of calling the hardware alarm clock is directly included in a judgment statement (for example, , the judgment parameter is openAlarm). If the user receives the action to cancel the last alarm, the value of openAlarm is changed to false. In this statement, the alarm controller's timely control function is directly called to cancel the alarm. After the cancellation is completed, openAlarm is reset to true. When the openAlarm is true, the alarm clock function of the alarm housekeeper is directly called to start the alarm. This embodiment can cancel the last alarm alarm, and the periodic alarm can continue to respond after canceling the last alarm alarm.
此外,根据取消闹钟的指令,可以将控制闹钟的判定宏控制参数设置为第二预设值,第二预设值表示调用硬件闹钟的流程被跳过,直接执行取消闹钟的流程。例如,在启动闹钟的方法中,包含了一个当前系统时间的参数。另外,可以新增加一个参数,启用闹钟时除了当前系统时间的参数之外,还增加一个标志位,当标志位为true(或者是任意的一预设值),并且当前系统时间与系统时间一致时才启用闹钟。如果标志位为false,则忽略本次闹钟。作为一种实现方式,标志位的默认值可以设为true,如果从闹钟处理核心模 块接收到用户取消最近一次闹钟的指令,则将标志位赋值为false,当系统时间与闹钟事件的预设闹钟时间一致时,则闹钟不会响起。接着,标志位重新被赋值为true,确保在取消单次闹钟后,该周期性的闹钟提醒可以持续响应。In addition, according to the instruction to cancel the alarm clock, the determination macro control parameter for controlling the alarm clock can be set to the second preset value, and the second preset value indicates that the process of calling the hardware alarm clock is skipped, and the process of canceling the alarm clock is directly executed. For example, in the method of starting the alarm, a parameter of the current system time is included. In addition, a new parameter can be added. When the alarm is enabled, in addition to the current system time parameter, a flag is added, when the flag is true (or an arbitrary preset value), and the current system time is consistent with the system time. The alarm is only enabled. If the flag is false, this alarm is ignored. As an implementation, the default value of the flag bit can be set to true if the core mode is processed from the alarm clock. When the block receives the command to cancel the last alarm, the flag is set to false. When the system time matches the preset alarm time of the alarm event, the alarm will not sound. Then, the flag is re-assigned to true, ensuring that the periodic alarm reminder can continue to respond after canceling a single alarm.
可选地,上述闹钟提前取消的装置中还包括闹钟取消动作设置模块106,如图7所示,闹钟取消动作设置模块106包括:Optionally, the device for canceling the alarm in advance includes an alarm cancel action setting module 106. As shown in FIG. 7, the alarm cancel action setting module 106 includes:
第一设置单元1061设置为,通过捕捉到的所述取消闹钟广播事件确定对应的标准取消动作之前,获取用户输入的自定义取消闹钟的动作,并将获取的所述自定义取消闹钟的动作存储为预先设定的所述标准取消动作;或者The first setting unit 1061 is configured to acquire a custom cancel alarm action input by the user before determining the corresponding standard cancel action by the captured cancel alarm broadcast event, and store the obtained action of canceling the alarm Cancel the action for the preset criteria; or
第二设置单元1062设置为,通过捕捉到的所述取消闹钟广播事件确定对应的标准取消动作之前,获取用户输入的选择标准取消动作的选择指令,并将与所述选择指令对应的标准取消动作存储为预先设定的所述标准取消动作。The second setting unit 1062 is configured to acquire a selection instruction of the selection criterion canceling action input by the user before determining the corresponding standard canceling action by the captured canceled alarm broadcast event, and cancel the standard corresponding to the selection instruction The storage is a predetermined cancellation action that is preset.
可选的,用户自定义取消闹钟的动作录入,有一定的限制条件,并不是所有的操作都可以进行录入。比如,对触屏的操作与其他大量手机操作相冲突,所以应禁止操作触屏作为取消闹钟的标准动作。当用户录入的动作和其他动作冲突时,系统应该提示用户,以便用户完成录入。例如,用户设置长按起始键作为取消最近一次闹钟的标志动作,但是目前的长按起始键操作默认为调用谷歌搜索,此情况下系统提示用户该动作已经被占用。可选的,用户录入的动作需要在预设标准动作缓存集内才可以生效。Optionally, the user can cancel the action input of canceling the alarm, and there are certain restrictions, and not all operations can be entered. For example, the operation of the touch screen conflicts with other large mobile phone operations, so the operation of the touch screen should be prohibited as a standard action to cancel the alarm. When the action entered by the user conflicts with other actions, the system should prompt the user for the user to complete the entry. For example, the user sets a long press of the start key as the flag action to cancel the last alarm, but the current long press start key operation defaults to calling Google search, in which case the system prompts the user that the action has been occupied. Optionally, the action entered by the user needs to be valid in the preset standard action cache set.
另外,用户还可以选择系统提供的标准取消动作来进行设置,例如:可以是双击音量下键取消闹钟、长按回车键取消闹钟、双击起始键取消闹钟等。In addition, the user can also select the standard cancellation action provided by the system to set, for example: double-click the volume down button to cancel the alarm, long press the enter button to cancel the alarm, double-click the start button to cancel the alarm, and so on.
此外,在用户首次取消最近一次闹钟后,后台闹钟取消动作检测服务线程仍要继续检测用户是否需要取消下一个最近一次闹钟,以此提供用户可能有需要连续取消多个闹钟的需求。In addition, after the user cancels the last alarm for the first time, the background alarm cancel action detection service thread still needs to continue to detect whether the user needs to cancel the next most recent alarm, thereby providing the user with the need to continuously cancel multiple alarms.
可选地,为了防止用户可能因为误操作而取消闹钟,当系统判定用户取消最近一次闹钟后,该当前最近一次闹钟提醒不会立即被取消,而是会先弹出的提示框(例如“是否需要取消最近一次闹钟”)。在用户点击确认后,才会执行最终的取消闹钟指令,如果用户选择取消,则不会执行取消闹钟的 指令。Optionally, in order to prevent the user from canceling the alarm due to a misoperation, when the system determines that the user cancels the last alarm, the current last alarm reminder will not be cancelled immediately, but a prompt box that pops up first (for example, "is it necessary? Cancel the last alarm"). The final cancel alarm command will be executed after the user clicks the confirmation. If the user chooses to cancel, the cancel alarm will not be executed. instruction.
如图8所示,本发明实施例的闹钟提前取消的方法的步骤包括:As shown in FIG. 8, the steps of the method for canceling an alarm in advance in the embodiment of the present invention include:
步骤100、用户进入到闹钟取消动作设置模块,进行选择或者自定义闹钟取消动作的设置。Step 100: The user enters the alarm cancel action setting module to perform selection or customize the setting of the alarm cancel action.
步骤200、检测当前终端的闹钟设置列表设置情况。Step 200: Detect a setting of an alarm setting list of the current terminal.
步骤300、判断当前闹钟设置列表是否有闹钟设置,如果当前闹钟设置列表有闹钟设置,执行步骤400,如果闹钟设置列表为空,则结束流程。Step 300: Determine whether the current alarm setting list has an alarm setting. If the current alarm setting list has an alarm setting, step 400 is performed. If the alarm setting list is empty, the process ends.
步骤400、启动后台闹钟取消动作检测服务线程获取用户输入的动作。Step 400: Start a background alarm cancellation action detection service thread to obtain an action input by the user.
步骤500、用户使用终端,针对终端进行操作。Step 500: The user uses the terminal to perform operations on the terminal.
步骤600、为了避免频繁调用后台闹钟取消动作检测服务线程,将获取的取消闹钟动作和本地缓存的取消闹钟动作集进行类比;若在集合里面,执行700;如果不在集合里面,执行1000;到达最近一次的闹钟的响铃时间时,启动闹铃。Step 600: In order to avoid frequently calling the background alarm cancel action detection service thread, the obtained canceled alarm action is analogous to the locally cached canceled alarm action set; if in the set, execute 700; if not in the set, execute 1000; The alarm is activated when the alarm time of the alarm clock is once.
步骤700、将该动作转化为取消闹钟广播事件,并广播取消闹钟广播事件;Step 700: Convert the action to cancel the alarm broadcast event, and broadcast the cancel alarm broadcast event;
步骤800、后台闹钟取消动作检测服务线程检测步骤600传递到用户输入的取消闹钟动作,预先设定的标准取消动作进行类比,如果取消闹钟广播事件对应的取消闹钟动作与预先设定的标准取消动作一致,则执行步骤900;如果不一致,则执行步骤1000;Step 800: The background alarm cancellation motion detection service thread detection step 600 is transmitted to the cancel alarm action input by the user, and the preset standard cancellation action is analogized. If the alarm cancellation event corresponding to the alarm broadcast event is cancelled, the preset standard cancellation action is cancelled. If yes, go to step 900; if they are not, go to step 1000;
步骤900;取消最近一次闹钟; Step 900; cancel the last alarm clock;
步骤1000、到达最近一次的闹钟的响铃时间时,启动闹铃。Step 1000: When the ringing time of the latest alarm clock is reached, the alarm is started.
综上所述,用户在一定的范围内可以自定义取消最近一次闹钟的标准动作,避免了因用户不同的使用习惯,导致误操作而取消最近一次闹钟。通过将用户输入的动作与缓存在本地的取消闹钟动作集进行类比,针对用户的每一次动作,避免了频繁调用取消闹钟动作检测线程,有效的保障了动作对比 线程的服务质量。实现了在预设闹钟响应之前取消最近一次闹钟提醒,并且不影响预设周期性闹钟的持续响应。In summary, the user can customize the standard action of canceling the latest alarm clock within a certain range, thereby avoiding the mistake of the user and canceling the latest alarm clock due to different usage habits. By analogizing the action input by the user with the set of canceled alarm action cached locally, for each action of the user, avoiding frequent calls to cancel the alarm action detection thread, effectively guaranteeing the action comparison The quality of service of the thread. The last alarm alarm is cancelled before the preset alarm response, and the continuous response of the preset periodic alarm is not affected.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的每个模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储于存储器中的程序/指令来实现其相应功能。本发明不限制于任何特定形式的硬件和软件的结合。”One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct related hardware, such as a processor, which may be stored in a computer readable storage medium, such as a read only memory, disk or optical disk. Wait. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the foregoing embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, being executed by a processor and stored in a memory. Programs/instructions to implement their respective functions. The invention is not limited to any specific form of combination of hardware and software. ”
虽然本申请所揭露的实施方式如上,但所述的内容仅为便于理解本申请而采用的实施方式,并非用以限定本申请,如本发明实施方式中的具体的实现方法。任何本申请所属领域内的技术人员,在不脱离本申请所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本申请的专利保护范围,仍须以所附的权利要求书所界定的范围为准。The embodiments disclosed in the present application are as described above, but the descriptions are only for the purpose of understanding the present application, and are not intended to limit the present application, such as the specific implementation method in the embodiments of the present invention. Any modifications and changes in the form and details of the embodiments may be made by those skilled in the art without departing from the spirit and scope of the disclosure. The scope defined by the appended claims shall prevail.
工业实用性Industrial applicability
上述技术方案实现了不影响预设周期性闹钟的持续响应的情况下,在预设闹钟响应之前取消最近一次闹钟提醒。 The above technical solution achieves the last alarm alarm reminder before the preset alarm response, without affecting the continuous response of the preset periodic alarm.

Claims (13)

  1. 一种闹钟提前取消的方法,所述方法包括:A method for canceling an alarm clock in advance, the method comprising:
    获取取消闹钟动作,并将获取的所述取消闹钟动作转化为取消闹钟广播事件后进行广播;Obtaining an canceling alarm action, and converting the obtained canceled alarm action into a canceled alarm broadcast event, and then broadcasting;
    通过后台闹钟取消动作检测服务线程捕捉所述取消闹钟广播事件,确定所述取消闹钟广播事件对应的取消闹钟动作;The canceling the alarm broadcast event is captured by the background alarm cancellation action detection service thread, and determining the cancellation alarm action corresponding to the canceling the alarm broadcast event;
    根据确定的所述取消闹钟广播事件对应的所述取消闹钟动作,取消所述闹钟。And canceling the alarm clock according to the determined cancellation alarm action corresponding to the canceling the alarm clock broadcast event.
  2. 根据权利要求1所述的方法,所述方法还包括:在闹钟的响铃时间之前,启动所述后台闹钟取消动作检测服务线程。The method of claim 1, further comprising: initiating the background alarm cancellation action detection service thread before the ringing time of the alarm.
  3. 根据权利要求1所述的方法,所述方法还包括:The method of claim 1 further comprising:
    如果确定所述取消闹钟广播事件未对应到取消闹钟动作,在到达所述闹钟的响铃时间时,启动闹铃。If it is determined that the cancel alarm clock broadcast event does not correspond to the cancel alarm action, the alarm is activated when the ringing time of the alarm is reached.
  4. 根据权利要求1~3任一项所述的方法,其中,所述将获取的所述取消闹钟动作转化为取消闹钟广播事件包括:The method according to any one of claims 1 to 3, wherein the converting the obtained canceled alarm action to canceling the alarm broadcast event comprises:
    将获取的所述取消闹钟动作和预设的取消闹钟动作集进行类比;Comparing the obtained canceled alarm action with the preset canceled alarm action set;
    如果获取的所述取消闹钟动作在所述取消闹钟动作集中,则将所述取消闹钟动作转化为取消闹钟广播事件;If the acquired cancel alarm action is in the cancel alarm action set, the cancel alarm action is converted into a cancel alarm broadcast event;
    所述取消闹钟动作集包括一个或一个以上预先设定的标准取消动作。The cancel alarm action set includes one or more pre-set standard cancellation actions.
  5. 根据权利要求1~3任一项所述的方法,其中,所述根据所述取消闹钟动作,取消所述闹钟,包括:The method according to any one of claims 1 to 3, wherein the canceling the alarm according to the canceling an alarm action comprises:
    根据确定的所述取消闹钟广播事件对应的所述取消闹钟动作生成取消闹钟的指令;And generating an instruction to cancel the alarm according to the determined cancellation alarm action corresponding to the canceling the alarm broadcast event;
    根据生成的所述取消闹钟的指令,将闹钟的闹钟启动判定参数置为第一预设值,以取消所述闹钟;或者,And setting an alarm start determination parameter of the alarm to a first preset value according to the generated instruction for canceling the alarm to cancel the alarm; or
    根据所述取消闹钟的指令,将控制闹钟的判定宏控制参数设置为第二预 设值,以跳过调用硬件闹钟的流程,直接执行取消闹钟。Setting the control macro control parameter for controlling the alarm to the second pre-control according to the instruction to cancel the alarm Set the value to skip the process of calling the hardware alarm and execute the cancel alarm directly.
  6. 根据权利要求4所述的方法,所述方法还包括:The method of claim 4, further comprising:
    通过捕捉到的所述取消闹钟广播事件确定对应的标准取消动作之前,Before the corresponding standard cancel action is determined by the captured canceled alarm broadcast event,
    获取用户输入的自定义取消闹钟的动作,并将获取的所述自定义取消闹钟的动作存储为预先设定的所述标准取消动作;或者,Obtaining a motion of a custom cancellation alarm input by the user, and storing the obtained action of canceling the alarm alarm as a preset standard cancellation action; or
    获取用户输入的选择标准取消动作的选择指令,并将与所述选择指令对应的标准取消动作存储为预先设定的所述标准取消动作。The selection instruction of the selection criterion canceling action input by the user is acquired, and the standard canceling action corresponding to the selection instruction is stored as the preset standard canceling action.
  7. 一种闹钟提前取消的装置,所述装置包括:A device for canceling an alarm clock in advance, the device comprising:
    广播事件处理模块设置为,获取取消闹钟动作,并将获取的所述取消闹钟动作转化为取消闹钟广播事件后进行广播;The broadcast event processing module is configured to obtain a cancel alarm action, and convert the obtained canceled alarm action into a canceled alarm broadcast event, and then broadcast;
    处理核心模块设置为,通过后台闹钟取消动作检测服务线程捕捉所述取消闹钟广播事件,确定所述取消闹钟广播事件对应的取消闹钟动作;The processing core module is configured to: capture, by the background alarm cancellation action detection service thread, the cancellation alarm broadcast event, and determine the cancellation alarm action corresponding to the cancel alarm broadcast event;
    闹钟取消模块设置为,根据确定的所述取消闹钟广播事件对应的所述取消闹钟动作,取消所述闹钟。The alarm canceling module is configured to cancel the alarm according to the determined cancellation alarm action corresponding to the canceling the alarm broadcast event.
  8. 根据权利要求7所述的装置,所述装置还包括:The apparatus of claim 7 further comprising:
    启动检测模块设置为,在闹钟的响铃时间之前,启动所述后台闹钟取消动作检测服务线程。The startup detection module is configured to activate the background alarm cancellation action detection service thread before the alarm time of the alarm.
  9. 根据权利要求7所述的装置,所述装置还包括:The apparatus of claim 7 further comprising:
    闹钟响应模块设置为,如果确定所述取消闹钟广播事件未对应到取消闹钟动作,在到达所述闹钟的响铃时间时,启动闹铃。The alarm response module is configured to, if it is determined that the cancel alarm broadcast event does not correspond to the cancel alarm action, activate the alarm when the ringing time of the alarm is reached.
  10. 根据权利要求7~9任一项所述的装置,其中,所述广播事件处理模块包括:The apparatus according to any one of claims 7 to 9, wherein the broadcast event processing module comprises:
    获取单元设置为,获取所述取消闹钟动作;The obtaining unit is configured to obtain the canceling alarm action;
    判断单元设置为,将获取的所述取消闹钟动作和取消闹钟动作集进行类比;The determining unit is configured to compare the acquired canceled alarm action with the canceled alarm action set;
    执行单元设置为,如果获取的所述取消闹钟动作在所述取消闹钟动作集中,则将所述取消闹钟动作转化为取消闹钟广播事件后进行广播; The execution unit is configured to: if the acquired cancel alarm action is in the cancel alarm action set, convert the cancel alarm action into a cancel alarm broadcast event, and then broadcast;
    所述取消闹钟动作集包括一个或一个以上预先设定的标准取消动作。The cancel alarm action set includes one or more pre-set standard cancellation actions.
  11. 根据权利要求7~9任一项所述的装置,其中,所述闹钟取消模块包括:The device according to any one of claims 7 to 9, wherein the alarm cancellation module comprises:
    第一执行单元设置为,根据确定的所述取消闹钟广播事件对应的所述取消闹钟动作生成取消闹钟的指令;The first execution unit is configured to generate an instruction to cancel the alarm according to the determined cancellation alarm action corresponding to the canceling the alarm broadcast event;
    第二执行单元设置为,根据生成的所述取消闹钟的指令,将闹钟的闹钟启动判定参数置为第一预设值,以取消所述闹钟;或者,The second execution unit is configured to set the alarm start determination parameter of the alarm to a first preset value according to the generated instruction for canceling the alarm to cancel the alarm; or
    根据所述取消闹钟的指令,将控制闹钟的判定宏控制参数设置为第二预设值,以跳过调用硬件闹钟的流程,直接执行取消闹钟。According to the instruction for canceling the alarm clock, the determination macro control parameter for controlling the alarm clock is set to the second preset value, to skip the process of calling the hardware alarm clock, and directly cancel the alarm.
  12. 根据权利要求10所述的装置,其中,所述装置还包括闹钟取消动作设置模块,所述闹钟取消动作设置模块包括:The device according to claim 10, wherein the device further comprises an alarm cancel action setting module, and the alarm cancel action setting module comprises:
    第一设置单元设置为,通过捕捉到的所述取消闹钟广播事件确定对应的标准取消动作之前,获取用户输入的自定义取消闹钟的动作,并将获取的所述自定义取消闹钟的动作存储为预先设定的所述标准取消动作;或者,The first setting unit is configured to: before determining the corresponding standard cancel action by the captured canceled alarm broadcast event, obtain a user-entered action of canceling the alarm, and store the obtained action of canceling the alarm as Pre-set the standard cancellation action; or,
    第二设置单元设置为,通过捕捉到的所述取消闹钟广播事件确定对应的标准取消动作之前,获取用户输入的选择标准取消动作的选择指令,并将与所述选择指令对应的标准取消动作存储为预先设定的所述标准取消动作。The second setting unit is configured to acquire a selection instruction of the selection criterion cancellation action input by the user before determining the corresponding standard cancellation action by the captured cancellation alarm broadcast event, and store the standard cancellation action corresponding to the selection instruction The action is canceled for the standard set in advance.
  13. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1~6任一项所述的方法。 A computer storage medium having stored therein computer executable instructions for performing the method of any one of claims 1 to 6.
PCT/CN2016/080056 2016-01-22 2016-04-22 Method and device for cancelling alarm clock in advance WO2016197715A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610043755.9A CN106998387A (en) 2016-01-22 2016-01-22 The method and device that a kind of alarm clock is cancelled in advance
CN201610043755.9 2016-01-22

Publications (1)

Publication Number Publication Date
WO2016197715A1 true WO2016197715A1 (en) 2016-12-15

Family

ID=57503286

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/080056 WO2016197715A1 (en) 2016-01-22 2016-04-22 Method and device for cancelling alarm clock in advance

Country Status (2)

Country Link
CN (1) CN106998387A (en)
WO (1) WO2016197715A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1507389A1 (en) * 2003-08-13 2005-02-16 Sony Ericsson Mobile Communications AB Mobile phone with means for switching off the alarm remotely
CN103491249A (en) * 2013-09-16 2014-01-01 青岛海信传媒网络技术有限公司 Mobile terminal alarm clock prompt cancelling method and mobile terminal
CN104284007A (en) * 2013-07-08 2015-01-14 腾讯科技(深圳)有限公司 Alarm clock managing method and mobile terminal
CN105187647A (en) * 2015-09-08 2015-12-23 广东欧珀移动通信有限公司 Mobile terminal alarm clock control method and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101854130B1 (en) * 2011-12-13 2018-05-03 삼성전자주식회사 Method and apparatus for registering alarm in mobile communication system
CN103945055B (en) * 2014-03-18 2017-05-17 深圳市艾优尼科技有限公司 Method and device for turning off terminal alarm clock and terminal equipment
CN104536735B (en) * 2014-12-12 2017-12-12 魅族科技(中国)有限公司 The method and its device of default reminding task control
CN105187670B (en) * 2015-10-21 2018-03-30 上海斐讯数据通信技术有限公司 Alarm clock control method and device in electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1507389A1 (en) * 2003-08-13 2005-02-16 Sony Ericsson Mobile Communications AB Mobile phone with means for switching off the alarm remotely
CN104284007A (en) * 2013-07-08 2015-01-14 腾讯科技(深圳)有限公司 Alarm clock managing method and mobile terminal
CN103491249A (en) * 2013-09-16 2014-01-01 青岛海信传媒网络技术有限公司 Mobile terminal alarm clock prompt cancelling method and mobile terminal
CN105187647A (en) * 2015-09-08 2015-12-23 广东欧珀移动通信有限公司 Mobile terminal alarm clock control method and system

Also Published As

Publication number Publication date
CN106998387A (en) 2017-08-01

Similar Documents

Publication Publication Date Title
JP6811758B2 (en) Voice interaction methods, devices, devices and storage media
KR102551715B1 (en) Generating iot-based notification(s) and provisioning of command(s) to cause automatic rendering of the iot-based notification(s) by automated assistant client(s) of client device(s)
US11217084B2 (en) Mobile device self-identification system
KR102581347B1 (en) Efficient and low latency automated assistant control of smart devices
US11743355B2 (en) Prompting method and device
RU2644557C1 (en) Method and device for installing alarm clock
JP2014203024A (en) Control device, image forming apparatus, terminal device, control method, and control program
WO2016192258A1 (en) Prompt method for voice use, and terminal device
CN110851057A (en) Method and device for configuring configuration options of BIOS
JP6315740B2 (en) Theme application loading method and device
WO2016197715A1 (en) Method and device for cancelling alarm clock in advance
CN113645344B (en) Message processing method, device and storage medium
CN109327625B (en) Call callback method, device, storage medium and mobile terminal
KR20190067240A (en) Processing method and terminal of virtual navigation bar
CN109040649B (en) Call control method, device, equipment and computer readable medium
CN109327624B (en) Call callback method, device, storage medium and Bluetooth headset
CN112187590A (en) Control method, device, equipment and computer readable storage medium
TWI638351B (en) Voice transmission device and method for executing voice assistant program thereof
CN114697815A (en) Control method, device, equipment and medium for audio output equipment
JP2020077996A (en) Information processor, information processing method and program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16806613

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16806613

Country of ref document: EP

Kind code of ref document: A1