200903199 九、發明說明: 【發明所屬之技術領域】 本發明涉及—種電子設備,特別涉及—種具鬧鐘功能 的電子設備及其鬧鐘的關閉方法。 【先前技術】 目則’用戶在使用各種電子設備的鬧鐘功能時,到達 預定的時間鬧鐘響起時,只需按下任意鍵或某一固定鍵即 鐘’因此,用戶在大腦不太清醒的狀態下便可以 關閉鬧1里。這樣一來可能會導致用戶繼續熟睡過去,甚至 不知遏自己曾關閉過鬧鐘。 現在已有技術增加了間隔—段時間後再次啟動鬧 :戶=:但是這樣會造成用戶心理上的放鬆警惕,而且 用戶在非,疲德的情況下,仍然可以在大腦不太清醒時就 關閉鬧鐘,從而導致熟睡過去。故需要—種電子裝置,盆 所具有之鬧鐘功能可有效叫醒用戶。 /、 【發明内容】 及直鬥^於此本u提供—種具有鬧鐘功能的電子設備 功:=:=方法’以解決現有技術中電子裝置的鬧鐘 力月b不忐有效叫醒用戶的問題。 所述的具鬧鐘功能的電子設備,包括—存 儲有-預設確認次數及_輪入正確次數; 子 單元;一顯示單元…鬧鐘管理』 及關閉鬧鐘;-隨機碼產生模組,用於、 鬧鐘的隨機碼,並將該隨機碼通過聲音輸出及/或顯 200903199 輸出;一隨機碼確認模組,用於接收用戶通過輸入單元輸 入的輸入資訊,並比較該輸入資訊是否與該隨機碼一致; 一記錄模組,用於在用戶的輸入資訊與該隨機碼一致時將 存儲單元中的輸入正確次數加一;一次數確認模組,用於 比較存儲單元中輸入正確次數與預設確認次數,若輸入正 確次數與預設確認次數不相等,則通知所述隨機碼產生模 組重新產生一隨機碼,若輸入正確次數與預設確認次數相 等,則通知鬧鐘管理模組關閉鬧鐘。 所述電子裝置的鬧鐘關閉方法包括步驟:提供一存儲 單元,該存儲單元中存儲一正確輸入次數及一預設確認次 數;啟動鬧鐘時,隨機產生一用於關閉鬧鐘的隨機碼;輸 出隨機碼提示用戶輸入該隨機碼;接收用戶的輸入資訊, 並比較該輸入資訊是否與該隨機碼一致;當用戶的輸入資 訊與該隨機碼一致時將存儲單元中的輸入正確次數加一; 比較存儲單元中輸入正確次數與預設確認次數;若輸入正 確次數與預設確認次數不相等,則產生一隨機碼並返回輸 出隨機碼的步驟;若輸入正確次數與預設確認次數相等, 則關閉鬧鐘。 相較現有技術,上述電子設備及關閉鬧鐘的方法在用 戶正確輸入電子裝置隨機產生的隨機碼後,才可關閉鬧 鐘,如此可有效叫醒用戶。 【實施方式】 請參閱圖1,是具鬧鐘功能的電子設備10的硬體架構 圖。電子設備10主要包括一處理單元100、一時鐘單元 8 200903199 101、一存儲單元102、一顯示單元103、一聲音輸出單元 104及一輸入單元105。其中,時鐘單元101提供其所記錄 之當前時間,顯示單元103及聲音輸出單元104根據處理 單元10的指令顯示輸出或語音輸出需要輸出的資訊。輸入 單元105回應用戶的輸入並傳輸與該輸入對應的輸入資訊 至處理單元10。存儲單元102存儲一鬧鐘啟動時間、鬧鐘 類型、一預設確認次數及一輸入正確次數等資訊。該鬧鐘 啟動時間為用戶設置的鬧鐘啟動的時間;鬧鐘類型為用戶 所設置的在鬧鐘啟動時用於提醒用戶的鬧鐘方式,如鈐聲 或者震動;處理單元100在鬧鐘啟動後會隨機產生一隨機 碼,並將該隨機碼通過顯示單元103顯示或聲音輸出單元 104語音輸出提示用戶輸入該隨機碼,該隨機碼為一字串, 該字串可為字母、數位、符號及其組合,如“586”。隨後, 該處理單元100接收用戶輸入的輸入資訊,若用戶的輸入 資訊與隨機碼一致,則將確認次數加一,即該輸入正確次 數用於記錄用戶正確輸入隨機碼的次數;而該預設確認次 數為用戶預設的用戶需要正確輸入隨機碼的次數,即只有 在用戶正確輸入驗證碼的次數即輸入的正確次數與預設確 認次數相等時,才可關閉鬧鐘,一般地,優選地預設確認 次數為3-5。當正確次數與預設確認次數不相等時,重新產 生新的隨機碼,再次接受用戶的輸入資訊。處理單元100 所執行的功能請參閱圖2。 請參閱圖2,是具鬧鐘功能的電子設備中處理單元100 的功能模組圖。處理單元100包括一設置模組1001、一鬧 200903199 鐘管理模組1002、一隨機碼產生模組1003、一隨機碼確認 模組1004、一記錄模組1005和一次數確認模組1006。各 模組的功能可結合圖3進行說明。 請參閱圖3,是具鬧鐘功能的電子設備的鬧鐘關閉方 法的流程圖。首先,設置模組1001接收用戶所設置的鬧鐘 啟動的時間、預設確認次數、鬧鐘類型等資訊,並將設置 結果存儲至存儲單元102中(步驟S201),當然預設確認 次數及/或鬧鐘類型在不同實施方式中可以不需要設置,而 是固定的。 鬧鐘管理模組1002週期性從時鐘單元101獲取當前時 間,將當前時間與存儲單元102中的鬧鐘啟動時間比較, 判斷當前時間是否與鬧鐘啟動時間相等,若當前時間與鬧 鐘啟動時間不相等,則重複執行本步驟(步驟S202)。 若當前時間與鬧鐘啟動時間相等,則鬧鐘管理模組 1002從存儲單元102中獲取鬧鐘類型並輸出該鬧鐘類型對 應的鬧鐘方式,從而啟動鬧鐘並通知時鐘單元101開始計 時(步驟S203 )。 鬧鐘管理模組1002啟動鬧鐘後發送一隨機碼產生信 號至隨機碼產生模組1003,隨機碼產生模組1003根據接 收到的隨機碼產生信號隨機產生一組隨機碼(步驟S204)。 隨機碼產生模組1003將該隨機碼發送至顯示單元103 顯示或聲音輸出單元104語音輸出(步驟S205)。 隨機碼確認模組1004偵測輸入單元105是否接收到輸 入資訊(步驟S206)。 10 200903199 入資訊,則=確認模組1004债測到輸入單元105接收到輸 生模組1003隻取/輪入資訊,並將該輪入資訊與隨機瑪產 隨機碼是否较:機碼進行比較,判斷該輸入資訊與該 疋古-'致(步驟S207)。 聲音輪出:二通過顯示單元_示或 步驟Lr/”輸出以提示用戶,然後返回步驟 的輸人資訊與賴機碼—致,骑機碼確認模 、·且刪將判斷結果如“輸入正確,,料顯示單幻〇3顯示 或每曰輸出單^ 1(34語音輪出以提示用戶,同時發送-'確 認信號至記錄模組1005 (步驟S2〇9)。 ㈣模組根據隨機碼確减組發送的確認信號 導存儲單元搬中的輸入正確次數加—(步驟s2ii)。 次數確認模組讓比較存儲單幻G2中輸人正嫁次數 及預設確認次數’ __人正確次數與㈣確認次數是 ^目等,若輸人正確錢與職確認錢不 則返回 步驟S204 (步驟S212)。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic device, and more particularly to an electronic device having an alarm clock function and a method for turning off the alarm clock thereof. [Prior Art] When the user uses the alarm function of various electronic devices, when the alarm reaches the predetermined time, the alarm sounds, just press any key or a fixed button, that is, the user is not in a clear state of the brain. You can close the trouble 1 below. This may cause the user to continue to sleep, or even know that they have turned off the alarm. Now the existing technology has increased the interval - after a period of time to start again: Household =: But this will cause the user to be psychologically relaxed, and the user can still close when the brain is not awake, in the case of fatigue, fatigue The alarm clock, which leads to a deep sleep. Therefore, an electronic device is needed, and the alarm clock function of the basin can effectively wake up the user. /, [Summary of the invention] and the straight bucket ^ This is provided by the electronic device with the alarm clock function: =: = method 'to solve the problem of the alarm clock of the electronic device in the prior art is not effective to wake up the user . The electronic device with alarm function includes: - stored - preset confirmation number and _ rounded in correct number of times; subunit; a display unit ... alarm management and off alarm; - random code generation module, for The random code of the alarm clock, and the random code is output through the sound output and/or display 200903199; a random code confirmation module is configured to receive the input information input by the user through the input unit, and compare whether the input information is consistent with the random code a recording module, configured to increase the correct number of inputs in the storage unit by one when the input information of the user is consistent with the random code; a number of confirmation modules for comparing the correct number of inputs in the storage unit with the preset number of confirmations If the correct number of input is not equal to the preset confirmation number, the random code generation module is notified to regenerate a random code, and if the correct number of inputs is equal to the preset confirmation number, the alarm management module is notified to turn off the alarm. The method for turning off the alarm of the electronic device includes the following steps: providing a storage unit, the storage unit stores a correct number of input times and a preset confirmation number; when the alarm is activated, randomly generating a random code for turning off the alarm; and outputting a random code Prompting the user to input the random code; receiving the input information of the user, and comparing whether the input information is consistent with the random code; when the input information of the user is consistent with the random code, adding the correct number of inputs in the storage unit; Enter the correct number of times and the preset number of confirmations; if the correct number of inputs is not equal to the preset number of confirmations, a random code is generated and the step of outputting the random code is returned; if the correct number of inputs is equal to the preset number of confirmations, the alarm is turned off. Compared with the prior art, the above electronic device and the method for turning off the alarm can turn off the alarm after the user correctly inputs the random code randomly generated by the electronic device, so that the user can be effectively woken up. [Embodiment] Please refer to FIG. 1, which is a hardware architecture diagram of an electronic device 10 with an alarm function. The electronic device 10 mainly includes a processing unit 100, a clock unit 8 200903199 101, a storage unit 102, a display unit 103, a sound output unit 104, and an input unit 105. The clock unit 101 provides the current time recorded by the clock unit 101, and the display unit 103 and the sound output unit 104 display the output or voice output information to be output according to the instruction of the processing unit 10. The input unit 105 responds to the user's input and transmits input information corresponding to the input to the processing unit 10. The storage unit 102 stores information such as an alarm start time, an alarm type, a preset confirmation number, and a correct number of inputs. The alarm time is the time when the alarm is set by the user; the alarm type is an alarm mode set by the user to remind the user when the alarm is activated, such as a beep or vibration; the processing unit 100 randomly generates a random after the alarm is started. And the voice code is displayed by the display unit 103 or the voice output unit 104 prompts the user to input the random code, the random code is a string, and the string can be a letter, a digit, a symbol and a combination thereof, such as “ 586”. Then, the processing unit 100 receives the input information input by the user. If the input information of the user is consistent with the random code, the number of confirmations is increased by one, that is, the correct number of times is input for recording the number of times the user correctly inputs the random code; and the preset The number of confirmations is the number of times the user presets the user to correctly input the random code, that is, the alarm can be turned off only when the number of times the user correctly inputs the verification code, that is, the correct number of times of input is equal to the preset number of confirmations. Generally, the priority is preferably Let the number of confirmations be 3-5. When the correct number of times is not equal to the preset number of confirmations, a new random code is generated again, and the user's input information is accepted again. See Figure 2 for the functions performed by processing unit 100. Please refer to FIG. 2 , which is a functional block diagram of the processing unit 100 in an electronic device with an alarm function. The processing unit 100 includes a setting module 1001, a 200903199 management module 1002, a random code generation module 1003, a random code confirmation module 1004, a recording module 1005, and a number confirmation module 1006. The function of each module can be explained in conjunction with FIG. Referring to FIG. 3, it is a flow chart of an alarm clock closing method for an electronic device with an alarm function. First, the setting module 1001 receives information such as the time when the alarm is set by the user, the preset confirmation number, the alarm type, and the like, and stores the setting result in the storage unit 102 (step S201), of course, the preset confirmation number and/or the alarm clock. Types may not need to be set in different embodiments, but are fixed. The alarm management module 1002 periodically obtains the current time from the clock unit 101, compares the current time with the alarm start time in the storage unit 102, and determines whether the current time is equal to the alarm start time. If the current time and the alarm start time are not equal, This step is repeatedly performed (step S202). If the current time is equal to the alarm start time, the alarm management module 1002 acquires the alarm type from the storage unit 102 and outputs an alarm mode corresponding to the alarm type, thereby starting the alarm and notifying the clock unit 101 to start the timer (step S203). The alarm management module 1002 sends a random code generation signal to the random code generation module 1003 after the alarm is started. The random code generation module 1003 randomly generates a random set of codes according to the received random code generation signal (step S204). The random code generation module 1003 transmits the random code to the display unit 103 display or the voice output unit 104 voice output (step S205). The random code confirmation module 1004 detects whether the input unit 105 receives the input information (step S206). 10 200903199 Into the information, then = confirmation module 1004 debt detection input unit 105 receives the transmission module 1003 only take / wheel information, and compare the wheel information with the random Ma production random code: machine code comparison And judging the input information and the --" (step S207). The sound is rotated: two through the display unit _ display or step Lr / "output to prompt the user, and then return to the step of the input information and the machine code - the rider code confirmation mode, and delete the judgment results such as "input correctly , the material display single illusion 显示 3 display or each 曰 output list ^ 1 (34 voice rounds to prompt the user, while sending - 'confirmation signal to the recording module 1005 (step S2 〇 9). (4) the module is based on the random code The confirmation signal of the group reduction transmission guides the correct number of inputs in the storage unit to be added (step s2ii). The number confirmation module allows the comparison to store the number of times the person is married and the number of preset confirmations __ the correct number of times (4) The number of confirmations is the result, etc. If the correct money and job confirmation money are not returned, the process returns to step S204 (step S212).
若記錄的正確讀確認錢 模組1002停止輸出鬧鐘鈐聲 寺,貝J 鐘,並紐私數訊從而關閉鬧 單元=:二’若r碼確_二_輸人 =!〇5 ^ 5緖人,則判斷鬧鐘啟 否 到—預設值,若鬧鐘啟動的& μ ε 間長度疋古連 ^長&小Μ預設值,則返 200903199 回步驟S206,若鬧鐘啟動的時間長度超過或等於該預設 值,則跳至步驟S213 (步驟S208)。 在本發明另一實施方式下,在步驟S210中,若用戶的 輸入資訊與隨機碼不一致,則隨機碼確認模組1004提示輸 入錯誤,將判斷結果如“輸入錯誤”通過顯示單元103顯 示或聲音輸出單元104語音輸出,然後返回步驟S206,而 不需返回步驟S204,直到存儲單元102中的輸入正確次數 與預設確認次數相等時,則關閉鬧鐘。 【圖式簡單說明】 圖1是本發明具鬧鐘功能的電子設備的硬體架構圖; 圖2是本發明具鬧鐘功能的電子設備中處理單元的功 能模組圖; 圖3是本發明的電子設備的鬧鐘關閉方法的流程圖。 【主要元件符號說明】 電子設備 10 處理單元 100 時鐘單元 101 存儲單元 102 顯示單元 103 聲音輸出單元 104 輸入單元 105 設置模組 1001 鬧鐘管理模組 1002 隨機碼產生模組 1003 12 200903199 隨機碼確認板組 1004 記錄模組 1005 次數確認模組 1006 13If the correct reading of the record is confirmed, the money module 1002 stops outputting the alarm clock, the sound of the temple, the J clock, and the private data to close the alarm unit =: two 'if the r code is _ two_ loser =! 〇 5 ^ 5 If the alarm is turned on, the default value is set. If the length between the & μ ε and the preset value of the alarm is started, then return to the step S206, if the alarm is started for longer than the length of the alarm. Or equal to the preset value, the process goes to step S213 (step S208). In another embodiment of the present invention, in step S210, if the input information of the user does not match the random code, the random code confirmation module 1004 prompts an input error, and displays the determination result such as "input error" through the display unit 103 or sounds. The output unit 104 outputs the voice, and then returns to step S206 without returning to step S204 until the correct number of times of input in the storage unit 102 is equal to the preset number of confirmations, then the alarm is turned off. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a hardware structural diagram of an electronic device with an alarm clock function according to the present invention; FIG. 2 is a functional block diagram of a processing unit in an electronic device with an alarm clock function according to the present invention; Flowchart of the device's alarm off method. [Description of main component symbols] Electronic device 10 Processing unit 100 Clock unit 101 Storage unit 102 Display unit 103 Sound output unit 104 Input unit 105 Setting module 1001 Alarm management module 1002 Random code generation module 1003 12 200903199 Random code confirmation board group 1004 Recording Module 1005 Number Confirmation Module 1006 13