TWI697776B - Computer system, updating method thereof and computer program product - Google Patents

Computer system, updating method thereof and computer program product Download PDF

Info

Publication number
TWI697776B
TWI697776B TW107112648A TW107112648A TWI697776B TW I697776 B TWI697776 B TW I697776B TW 107112648 A TW107112648 A TW 107112648A TW 107112648 A TW107112648 A TW 107112648A TW I697776 B TWI697776 B TW I697776B
Authority
TW
Taiwan
Prior art keywords
operating system
update
operating
running
computer system
Prior art date
Application number
TW107112648A
Other languages
Chinese (zh)
Other versions
TW201944244A (en
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 宏碁股份有限公司
Priority to TW107112648A priority Critical patent/TWI697776B/en
Publication of TW201944244A publication Critical patent/TW201944244A/en
Application granted granted Critical
Publication of TWI697776B publication Critical patent/TWI697776B/en

Links

Images

Abstract

A computer system, a updating method thereof and computer program product are provided. In the method, operated status while the computer system executing an operating system (OS) and system error situation of the OS are determined. If the operating status of OS is idle state or the system error situation is happened, the OS would be updated. Accordingly, the system performance and operating situation of user would not be influenced. In addition, the invention further provides updatable configuration duration, so that the updating procedure can be executed with the configuration duration, and a flexible configuration are provided.

Description

電腦系統、其更新方法及電腦程式產品Computer system, its updating method and computer program product

本發明是有關於一種作業系統,且特別是有關於一種針對作業系統之電腦系統、其更新方法及電腦程式產品。The present invention relates to an operating system, and more particularly to a computer system for an operating system, an update method thereof, and a computer program product.

作業系統(Operating System,OS)需要透過系統更新,來修補系統漏洞以避免電腦病毒或惡意程式侵害,或解決系統錯誤,甚至增加新功能。而相較於過往需要使用者手動執行更新,現今電腦系統的更新流程越來越自動化,便利性也隨著提高。例如,作業系統可供調整系統更新頻率(例如,10分鐘、1小時候更新),或者只要連上網路即可自動更新。然而,現有的更新流程並不會考慮到當下系統效能是否適合作業系統更新、電腦是否處於忙碌階段、或會不會干擾到使用者的工作等情況。在前述情況下貿然執行更新,系統運作狀態將變繁忙且執行速度變慢,從而影響使用者的操作。Operating system (Operating System, OS) needs to be updated through the system to repair system vulnerabilities to avoid computer viruses or malicious programs, or to solve system errors, or even add new features. Compared with the past requiring users to manually perform updates, the update process of computer systems is becoming more and more automated, and convenience is also improved. For example, the operating system can be used to adjust the system update frequency (for example, 10 minutes, 1 hour update), or it can be automatically updated as long as it is connected to the Internet. However, the existing update process does not consider whether the current system performance is suitable for operating system updates, whether the computer is in a busy phase, or whether it will interfere with the user's work. If the update is performed rashly in the foregoing situation, the system operation status will become busy and the execution speed will slow down, thereby affecting the user's operation.

有鑑於此,本發明提供一種電腦系統、其更新方法及電腦程式產品,其能確保系統是在空閒(或稱閒置)狀態下或正常情況下,才會執行更新。In view of this, the present invention provides a computer system, an update method thereof, and a computer program product, which can ensure that the update is performed only when the system is in an idle (or idle) state or under normal conditions.

本發明實施例的更新方法,其適用於運行作業系統的電腦系統。而此更新方法包括下列步驟。判斷電腦系統執行作業系統的運行狀態及系統錯誤情形。而若此作業系統的運行狀態為空閒狀態或發生系統錯誤情形,則更新此作業系統。The update method of the embodiment of the present invention is suitable for a computer system running an operating system. The update method includes the following steps. Determine the operating status of the computer system's operating system and system error conditions. If the operating state of the operating system is idle or a system error occurs, the operating system is updated.

本發明實施例的電腦系統,其包括儲存器及處理器。儲存器記錄數個模組。處理器耦接儲存器,並載入且執行儲存器所記錄的那些模組。而那些模組包括作業系統及自動更新模組。自動更新模組判斷作業系統的運行狀態及系統錯誤情形,而若此作業系統的運行狀態為空閒狀態或發生系統錯誤情形,則更新此作業系統。The computer system of the embodiment of the present invention includes a storage and a processor. The memory records several modules. The processor is coupled to the storage, and loads and executes the modules recorded in the storage. And those modules include operating system and automatic update modules. The automatic update module determines the operating status of the operating system and system error conditions, and if the operating status of the operating system is idle or a system error occurs, the operating system is updated.

本發明實施例的電腦程式產品,其係經由運行作業系統之電腦系統載入程式執行下列步驟。判斷電腦系統執行作業系統的運行狀態及系統錯誤情形。而若此作業系統的運行狀態為空閒狀態或發生系統錯誤情形,則更新此作業系統。The computer program product of the embodiment of the present invention executes the following steps through a computer system loading program running an operating system. Determine the operating status of the computer system's operating system and system error conditions. If the operating state of the operating system is idle or a system error occurs, the operating system is updated.

基於上述,本發明實施例提供至少兩種自動更新模式;其一是在作業系統的運行狀態為空閒狀態才會執行更新;其二是作業系統發生系統錯誤情形才會執行更新。藉此,作業系統更新程序將不會影響到系統效能,更不會影響使用者當下的操作狀況。Based on the foregoing, the embodiment of the present invention provides at least two automatic update modes; one is to perform the update only when the operating state of the operating system is in an idle state; the other is to perform the update only when a system error occurs in the operating system. In this way, the operating system update process will not affect the system performance, and will not affect the user's current operating conditions.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail in conjunction with the accompanying drawings.

圖1是依據本發明一實施例之電腦系統100的元件方塊圖。請參照圖1,電腦系統100包括儲存器110及處理器130。此電腦系統100可以是桌上型電腦、筆記型電腦、智慧型手機、平板電腦等裝置。FIG. 1 is a block diagram of components of a computer system 100 according to an embodiment of the invention. Please refer to FIG. 1, the computer system 100 includes a storage 110 and a processor 130. The computer system 100 can be a desktop computer, a notebook computer, a smart phone, a tablet computer, and other devices.

儲存器110可以是任何型態的固定或可移動隨機存取記憶體(Random Access Memory,RAM)、唯讀記憶體(Read-Only Memory,ROM)、快閃記憶體(Flash Memory)或類似元件或上述元件之組合的儲存器,儲存器110並用於儲存緩衝的或永久的資料、作業系統111(例如,Windows、OSX、Linux、Android等)、軟體模組(自動更新模組(包括節能更新模組113及強制更新模組115)、自訂更新模組117等)、使用者介面、各種日誌檔案、傾印檔案、更新次數、失敗次數、事件檔等資料,且其詳細內容待後續實施例詳述。The storage 110 may be any type of fixed or removable random access memory (Random Access Memory, RAM), read-only memory (Read-Only Memory, ROM), flash memory (Flash Memory) or similar components Or a combination of the above components, the storage 110 is used to store buffered or permanent data, operating system 111 (for example, Windows, OSX, Linux, Android, etc.), software modules (automatic update modules (including energy-saving updates) Module 113 and mandatory update module 115), custom update module 117, etc.), user interface, various log files, dump files, update times, failure times, event files, etc., and their details are to be implemented later Example details.

處理器130與儲存器110耦接,並可以是中央處理單元(CPU),或是其他可程式化之一般用途或特殊用途的微處理器(Microprocessor)、數位信號處理器(DSP)、可程式化控制器、特殊應用積體電路(ASIC)或其他類似元件或上述元件的組合。在本發明實施例中,處理器130用以執行電腦系統100的所有作業,且可載入並執行儲存器110所記錄的作業系統111及各軟體模組。The processor 130 is coupled to the storage 110, and can be a central processing unit (CPU), or other programmable general-purpose or special-purpose microprocessor (Microprocessor), digital signal processor (DSP), or programmable Controller, special application integrated circuit (ASIC) or other similar components or a combination of the above components. In the embodiment of the present invention, the processor 130 is used to perform all operations of the computer system 100, and can load and execute the operating system 111 and various software modules recorded in the storage 110.

為了方便理解本發明的操作流程,以下將舉諸多實施例詳細說明。In order to facilitate the understanding of the operation process of the present invention, a number of embodiments will be described in detail below.

圖2是依據本發明一實施例說明一種更新方法之流程圖。請參照圖2,下文中,將搭配電腦系統100中的元件及模組說明本發明實施例所述之方法。本方法的各個流程可依照實施情形而隨之調整,且並不僅限於此。FIG. 2 is a flowchart illustrating an update method according to an embodiment of the invention. Please refer to FIG. 2. Hereinafter, the components and modules in the computer system 100 will be used to describe the method according to the embodiment of the present invention. Each process of the method can be adjusted accordingly according to the implementation situation, and is not limited to this.

為了方便使用者操作,本實施例係以應用程式(即,電腦程式產品)的態樣實現,電腦系統100經安裝可執行本發明實施例更新方法的應用程式(為方便說明,以下稱為系統更新器)後,可提供捷徑(例如,在開始選單、桌面、工作列上等位置)或快捷鍵功能,讓使用者點選對應捷徑或按下特定快捷鍵後即可操作此系統更新器。請參照圖3是一範例說明系統更新器的使用者介面UI。而本發明實施例主要分為自動化更新及使用者自訂模式,以避免作業系統111繁忙或使用者工作下進行更新。反應於接收到使用者介面UI上之自動化更新或使用者自訂的虛擬按鈕310, 330被選取,處理器130會執行對應的更新流程。In order to facilitate the user's operation, this embodiment is implemented in the form of an application program (ie, a computer program product). The computer system 100 is installed with an application program that can execute the update method of the embodiment of the present invention (for the convenience of description, the system After the updater), a shortcut (for example, on the start menu, desktop, taskbar, etc.) or shortcut key function can be provided, allowing users to click the corresponding shortcut or press a specific shortcut key to operate the system updater. Please refer to Figure 3 for an example illustrating the user interface UI of the system updater. The embodiments of the present invention are mainly divided into automatic update and user-defined modes, so as to prevent the operating system 111 from being updated while the operating system 111 is busy or users are working. In response to receiving the automatic update on the user interface UI or the user-defined virtual buttons 310, 330 are selected, the processor 130 executes the corresponding update process.

首先,針對自動化更新模式,自動更新模組的節能更新模組113及強制更新模組115會分別(定時或不定時)判斷電腦系統100執行作業系統111的運作狀態及系統錯誤情形(步驟S210)。具體而言,本發明實施例的自動化更新又區分為節能更新及強制更新。節能更新是確保作業系統111是在空閒(或稱閒置)狀態下才會進行更新。而判斷空閒狀態的方式有很多種,例如,節能更新模組113可透過應用程式介面(Application Programming Interface,API)判斷是否有運行任何前景視窗(或是否有任何視窗被開啟),若有前景視窗則為非空閒狀態,而若未有前景視窗則為空閒狀態;節能更新模組113亦可產生文字檔案(例如,日誌(log)檔案、text檔案、word檔案等),並寫入訊息(例如,特定字串、數字串、符號串或其組合等)至此文字檔案,再判斷產生文字檔案及寫入此訊息的運行時間是否大於正常回應時間(例如,3、5、10秒等),若未大於正常回應時間則為空閒狀態;節能更新模組113可呼叫特定應用程式(例如,基準(benchmark)測試程式、影片播放軟體等),並判斷應用程式完成開啟或執行特定功能的時間是否大於正常執行時間,若未大於正常執行時間則為空閒狀態;節能更新模組113還可判斷硬體使用情形是否為高負載狀態(例如,記憶體使用率超過80%、CPU使用率超過75%等),若不為高負載狀態則判斷作業系統111為空閒狀態。需說明的是,前述判斷空閒狀態的實施方式可依據實際需求(因應作業系統、裝置類型的不同)而加以調整甚至加以組合,本發明不加以限制。First, for the automatic update mode, the energy-saving update module 113 and the mandatory update module 115 of the automatic update module will respectively (regularly or irregularly) determine the operating status and system error conditions of the computer system 100 running the operating system 111 (step S210) . Specifically, the automatic update in the embodiment of the present invention is divided into energy-saving update and mandatory update. The energy-saving update is to ensure that the operating system 111 is updated only when it is in an idle (or idle) state. There are many ways to determine the idle state. For example, the energy-saving update module 113 can determine whether any foreground windows are running (or whether any windows are opened) through the Application Programming Interface (API), and if there are foreground windows If there is no foreground window, it is in an idle state. The energy-saving update module 113 can also generate text files (for example, log files, text files, word files, etc.) and write messages (for example, , Specific string, number string, symbol string or their combination, etc.) to this text file, and then determine whether the running time of generating the text file and writing this message is greater than the normal response time (for example, 3, 5, 10 seconds, etc.), if If the response time is not longer than the normal response time, it is in an idle state; the energy-saving update module 113 can call specific applications (for example, benchmark test programs, video playback software, etc.), and determine whether the time for the application to complete opening or executing specific functions is greater than Normal execution time, if it is not greater than the normal execution time, it is idle; the energy-saving update module 113 can also determine whether the hardware usage is in a high load state (for example, memory usage exceeds 80%, CPU usage exceeds 75%, etc. ), if it is not in a high load state, it is determined that the operating system 111 is in an idle state. It should be noted that the foregoing implementation of determining the idle state can be adjusted or even combined according to actual requirements (depending on the operating system and device types), and the present invention is not limited.

另一方面,強制更新是處理器130會先分析作業系統111是否因內部問題而造成不正常現象(即,系統錯誤情形)發生。而判斷系統錯誤情形的方式有很多種,例如,強制更新模組115可判斷電腦系統100的硬體使用情形是否異常(例如,記憶體使用率與CPU使用率之間落差是否大於特定比例(例如,25、30、35%)),若硬體使用情形為異常則代表作業系統111太常發生分業錯誤和輾轉現象,並可推論作業系統111的內部程式或硬體驅動程式有問題;強制更新模組115可判斷進入系統全新體驗(out-of-box experience,OOBE)流程是否異常(例如,透過搜尋作業系統事件檔並判斷作業系統111不正常開啟或重啟(Kernel Power)發生時間是否與msoobe程式執行時間相同,若相同則表示進入系統OOBE流程異常);強制更新模組115亦可分析傾印(dump)檔案來判斷作業系統111內建功能程式是否異常(例如,開啟命令提示字元視窗(cmd)並輸入“analyze-v”、及/或檢查堆疊狀態等初步分析);強制更新模組115還可判斷修復磁碟錯誤次數及/或分析此進入系統全新體驗的日誌來判斷有無嚴重錯誤或行程間隔過長(例如,超過特定數量(例如,5、10、15次等)的作業系統事件檔來自chkdsk程式,代表作業系統111內部檔案毀損過多;分析msoobe的日誌,以判斷有無嚴重錯誤或是每個行程間隔超過特定時間(例如,10、15、17秒等)),以確認作業系統111發生系統錯誤情形。需說明的是,前述判斷空閒狀態的實施方式可依據實際需求(因應作業系統、裝置類型的不同)而加以調整甚至加以組合,本發明不加以限制。On the other hand, the forced update means that the processor 130 first analyzes whether the operating system 111 causes an abnormal phenomenon (ie, a system error situation) due to an internal problem. There are many ways to determine system error conditions. For example, the mandatory update module 115 can determine whether the hardware usage of the computer system 100 is abnormal (for example, whether the difference between memory usage and CPU usage is greater than a certain ratio (for example, , 25, 30, 35%)), if the hardware usage is abnormal, it means that operating system 111 too often has division errors and tossing around, and it can be inferred that there is a problem with the internal program or hardware driver of operating system 111; mandatory update Module 115 can determine whether the out-of-box experience (OOBE) process is abnormal (for example, by searching the operating system event file and judging whether the operating system 111 is abnormally turned on or restarted (Kernel Power) occurs in the same time as msoobe The execution time of the program is the same. If the same, it means that the process of entering the system OOBE is abnormal); the forced update module 115 can also analyze the dump file to determine whether the built-in function program of the operating system 111 is abnormal (for example, open the command prompt window (cmd) and enter "analyze-v" and/or check the stacking status and other preliminary analysis); the mandatory update module 115 can also determine the number of disk errors repaired and/or analyze the log entered into the new system experience to determine whether it is serious Errors or trip intervals are too long (for example, more than a certain number (for example, 5, 10, 15, etc.) operating system event files come from the chkdsk program, which means that the internal files of the operating system 111 are damaged too much; analyze the msoobe log to determine whether it is serious Error or each travel interval exceeds a specific time (for example, 10, 15, 17 seconds, etc.) to confirm that the operating system 111 has a system error condition. It should be noted that the foregoing implementation of determining the idle state can be adjusted or even combined according to actual requirements (depending on the operating system and device types), and the present invention is not limited.

接著,若作業系統111的運行狀態為空閒狀態或發生系統錯誤情形,則節能更新模組113或強制更新模組115會更新作業系統111(步驟S230)。若作業系統111的運行狀態為空閒狀態,則節能更新模組113將直接啟動系統更新的服務(service),以執行系統更新程序(即,對作業系統111更新)。而若作業系統111發生系統錯誤情形,則強制更新模組115會先關閉所有程式(例如,運行前景視窗的程式、及非系統背景程式等)再打開全螢幕更新程式(呈現全螢幕圖片或影像)(亦可能是關閉螢幕),讓使用者無法透過滑鼠、鍵盤、觸控板等輸入裝置操作電腦系統111,才進行系統更新程序。Next, if the operating state of the operating system 111 is idle or a system error occurs, the energy saving update module 113 or the forced update module 115 will update the operating system 111 (step S230). If the operating state of the operating system 111 is idle, the energy-saving update module 113 will directly start the system update service to execute the system update procedure (ie, update the operating system 111). If a system error occurs in the operating system 111, the mandatory update module 115 will first close all programs (for example, programs that run the foreground window, and non-system background programs, etc.) and then open the full-screen update program (display full-screen images or images) ) (It may also turn off the screen), so that the user cannot operate the computer system 111 through input devices such as a mouse, keyboard, touchpad, etc., before performing the system update process.

此外,針對使用者自訂模式,本發明實施例係開放使用者自行設定一組或多組設定區間(例如,上午8至10點、晚上11至12點等),而自訂更新模組117會判斷作業系統111的系統時間是否在此設定區間內。若此系統時間在前述設定區間內,則自訂更新模組117才更新作業系統111;反之,則自訂更新模組117不會(或禁能、暫停)更新作業系統111。In addition, for the user-defined mode, the embodiment of the present invention allows users to set one or more sets of setting intervals (for example, 8 to 10 am, 11 to 12 pm, etc.), and the custom update module 117 It will be judged whether the system time of the operating system 111 is within the set interval. If the system time is within the aforementioned set interval, the custom update module 117 will only update the operating system 111; otherwise, the custom update module 117 will not (or disable or suspend) the update of the operating system 111.

為了幫助讀者更加理解本發明,以下將分別針對節能更新、強制更新及使用者自訂更新提出不同應用情境。In order to help readers better understand the present invention, different application scenarios will be proposed for energy-saving update, mandatory update and user-defined update respectively.

請參照圖4是依據本發明一實施例之節能更新之流程圖。節能更新模組113會透過API呼叫方式來搜尋視窗標題(title)及物件(object)(步驟S411)以判斷當前是否有任何視窗被開啟(步驟S412)。若有視窗被開啟,則代表使用者極有可能正在使用電腦系統100,此時若對作業系統111進行更新,則會讓電腦系統100變繁忙且運行速度變慢。因此,節能更新模組113會將作業系統更新的服務停止(步驟S422)。若沒有視窗被開啟,節能更新模組113會產生日誌檔案並寫入一行字串到隱藏資料夾,並測試前述過程中系統回應時間(或稱運行時間)(步驟S413)。一般正常情況之下,作業系統111最慢五秒鐘即能完成產生檔案並寫入一行字串的流程,並判斷回應時間是否逾時(即,是否大於正常回應時間) (步驟S414);若回應時間超過五秒,代表作業系統111當下是繁忙狀態(即,非空閒狀態),因此節能更新模組113會將作業系統更新的服務停止(步驟S422)。若上述兩者條件(即,步驟S412,S414)都沒發生,則節能更新模組113會啟動服務(步驟S415)以執行系統更新(步驟S416),並定時判斷更新是否完成(步驟S417)。若系統更新完成,節能更新模組113則可結束系統更新器。Please refer to FIG. 4 which is a flowchart of an energy saving update according to an embodiment of the present invention. The energy-saving update module 113 searches for the title and object of the window through an API call (step S411) to determine whether any windows are currently opened (step S412). If a window is opened, it means that the user is most likely to be using the computer system 100. If the operating system 111 is updated at this time, the computer system 100 will become busy and slow down. Therefore, the energy saving update module 113 stops the service of operating system update (step S422). If no windows are opened, the energy-saving update module 113 will generate a log file and write a string to the hidden folder, and test the system response time (or running time) in the foregoing process (step S413). Under normal circumstances, the operating system 111 can complete the process of generating files and writing a line of characters in the slowest five seconds, and determine whether the response time is overtime (ie, is it greater than the normal response time) (step S414); if The response time exceeds five seconds, which means that the operating system 111 is currently in a busy state (ie, not in an idle state). Therefore, the energy-saving update module 113 stops the service updated by the operating system (step S422). If the above two conditions (ie, steps S412, S414) do not occur, the energy saving update module 113 will start the service (step S415) to perform the system update (step S416), and periodically determine whether the update is completed (step S417). If the system update is completed, the energy-saving update module 113 can end the system updater.

此外,節能更新模組113也可統計更新次數和系統繁忙頻率高低,系統更新完,計數器會將更新次數加一(步驟S418)。而若回應時間5秒以上(即,逾時),計數器會將失敗次數加一(步驟S419),節能更新模組113並會統計失敗次數,且判斷失敗比率是否過高(步驟S420)。若此失敗次數佔所有統計次數(即,更新次數加失敗次數)的比例大於比例門檻值(例如,3、4、6倍等),例如,統計次數到達10的倍數時,節能更新模組113會統計失敗次數(系統繁忙次數)是否超過3次。若超過3次,極有可能表示作業系統111內有內建程式異常甚至毀損,此時有分析之必要,因此節能更新模組113可呼叫強制更新模組115先進行分析(步驟S421,即判斷作業系統111是否發生系統錯誤情形)。若未超過3次,則節能更新模組113會將作業系統更新的服務停止(步驟S422)。In addition, the energy-saving update module 113 can also count the update times and the busy frequency of the system. After the system is updated, the counter will increase the update times by one (step S418). If the response time is more than 5 seconds (ie, timeout), the counter will increase the number of failures by one (step S419), and the energy saving update module 113 will count the number of failures and determine whether the failure rate is too high (step S420). If the ratio of the number of failures to the total number of statistics (ie, the number of updates plus the number of failures) is greater than the ratio threshold (for example, 3, 4, 6 times, etc.), for example, when the number of statistics reaches a multiple of 10, the energy-saving update module 113 It will count whether the number of failures (the number of times the system is busy) exceeds 3 times. If it exceeds 3 times, it is very likely that the built-in program in the operating system 111 is abnormal or even damaged. At this time, analysis is necessary. Therefore, the energy-saving update module 113 can call the forced update module 115 to perform analysis first (step S421, which is to determine Whether a system error occurs in the operating system 111). If it does not exceed 3 times, the energy-saving update module 113 will stop the operating system update service (step S422).

需說明的是,於其他實施例中,前述步驟S412,S414的判斷流程之順序可調整或僅擇一判斷。It should be noted that, in other embodiments, the sequence of the judgment process of steps S412 and S414 can be adjusted or only one judgment can be selected.

請參照圖5是依據本發明一實施例之強制更新之流程圖。強制更新模組115可附屬在原廠內建自動化更新功能裡面,因此自動化更新能力被啟動時,若停止系統更新服務的頻率太高,則處理器130會呼叫強制更新模組115。而強制更新的分析流程如下,只要有一項檢測出狀況(即符合判斷條件),代表作業系統111內部有程式出了問題或系統錯誤情形,則需要執行強制更新。Please refer to FIG. 5 which is a flowchart of a mandatory update according to an embodiment of the present invention. The mandatory update module 115 can be attached to the original factory built-in automatic update function. Therefore, when the automatic update capability is activated, if the frequency of stopping the system update service is too high, the processor 130 will call the mandatory update module 115. The analysis process of the forced update is as follows. As long as one of the detected conditions (that is, the judgment condition is met), it means that there is a problem or system error in the operating system 111, and the forced update needs to be executed.

強制更新模組115檢查記憶體使用率與CPU使用率落差是否大於25%(即硬體使用情形是否異常,步驟S511),如果有超過25%,代表作業系統111太常發生分頁錯誤和輾轉現象,且作業系統111內部程式或硬體驅動程式有問題,有更新之必要。The compulsory update module 115 checks whether the difference between memory usage and CPU usage is greater than 25% (that is, whether the hardware usage is abnormal, step S511). If it exceeds 25%, it means that the operating system 111 frequently has page faults and tossing. , And there is a problem with the operating system 111 internal program or hardware driver, it is necessary to update.

強制更新模組115搜尋作業系統事件檔,並判斷作業系統事件檔所記錄系統不正常關機或重啟(Kernel Power)發生時間是否跟msoobe程式執行時間一樣、及/或判斷是否有過多來自chkdsk程式的呼叫(即判斷進入系統OOBE流程是否異常,步驟S513)。若時間相同,則代表進入系統OOBE流程不正常且作業系統111本身有潛在性問題;若大多來自chkdsk程式的呼叫,則代表作業系統111內部檔案毀損且難以修復;這些系統錯誤情形都有強制更新必要。The forced update module 115 searches the operating system event file and determines whether the abnormal shutdown or restart (Kernel Power) of the system recorded in the operating system event file is the same as the execution time of the msoobe program, and/or determines whether there are too many errors from the chkdsk program Call (that is, determine whether the OOBE process of entering the system is abnormal, step S513). If the time is the same, it means that the OOBE process of entering the system is abnormal and the operating system 111 itself has potential problems; if most of the calls are from the chkdsk program, it means that the internal files of the operating system 111 are damaged and difficult to repair; these system error situations are forced to update necessary.

若強制更新模組115發現有傾印檔案,則可對命令提示字元視窗輸入analyze-v以分析傾印檔案並檢查堆疊狀態等初步分析(步驟S514)。若強制更新模組115自分析結果發現問題來自於作業系統111內部程式,則需進行強制更新。If the mandatory update module 115 finds that there is a dump file, it can input analyze-v into the command prompt window to analyze the dump file and check the stacking status and other preliminary analysis (step S514). If the self-analysis result of the mandatory update module 115 finds that the problem comes from the internal program of the operating system 111, a mandatory update is required.

強制更新模組115還可分析msoobe的日誌(步驟S516),並判斷有無嚴重錯誤或是每個行程間隔超過10秒(即,逾時)(步驟S517)。如果有嚴重錯誤或行程間隔超過10秒,則代表作業系統111內部有潛在問題,因此需進行強制更新。The mandatory update module 115 can also analyze the msoobe log (step S516), and determine whether there is a serious error or each trip interval exceeds 10 seconds (ie, timeout) (step S517). If there is a serious error or the travel interval exceeds 10 seconds, it means that there is a potential problem within the operating system 111, and therefore a mandatory update is required.

若前述步驟S511,S513,S515,S517的判斷結果都是符合系統錯誤情形,則強制更新模組115會關閉所有程式並開始全螢幕更新程式,以執行對作業系統111更新(步驟S519)。反之,若未符合系統錯誤情形,則強制更新模組115會呼叫節能更新模組114以執行諸如圖4所述的節能更新流程(步驟S518)。If the judgment results of the aforementioned steps S511, S513, S515, and S517 are consistent with the system error condition, the mandatory update module 115 will close all programs and start the full-screen update program to perform the update of the operating system 111 (step S519). Conversely, if the system error condition is not met, the mandatory update module 115 will call the energy-saving update module 114 to execute the energy-saving update process such as that described in FIG. 4 (step S518).

需說明的是,於其他實施例中,前述步驟S511,S513,S515,S517的判斷流程之順序可調整或僅擇一判斷。It should be noted that in other embodiments, the sequence of the judgment process of the aforementioned steps S511, S513, S515, and S517 can be adjusted or only one judgment can be selected.

請參照圖6是依據本發明一實施例之使用者自訂更新之流程圖。電腦系統100可提供使用者介面讓使用者可以自行決定特定時段區間執行電腦系統更新,以避免在使用者不方便的時間進行系統更新而妨礙使用者。自動更新模組117先判斷更新檔是否從遠端更新伺服器完全(完整)下載(步驟S611),若未下載完成則自動更新模組117透過通訊模組(圖未示,例如,乙太網路、Wi-Fi、行動網路等通訊收發器)繼續下載更新檔(步驟S712)。若下載完成,則自動更新模組117開始進行系統更新。而在此之前,自動更新模組117會去讀取系統時間,並判斷系統時間是否在使用者的設定區間範圍內(步驟S613)。若在設定區間內,則自動更新模組117啟動系統更新的服務(步驟S615),以執行系統更新(步驟S616)。而若不在設定範圍內,則自動更新模組117停止更新服務(步驟S614)。自動更新模組117還會判斷更新是否完成(步驟S617),以結束系統更新器之運行。Please refer to FIG. 6 for a flowchart of a user-defined update according to an embodiment of the present invention. The computer system 100 may provide a user interface so that the user can determine a specific time interval to perform the computer system update, so as to avoid the system update at an inconvenient time for the user and hinder the user. The automatic update module 117 first determines whether the update file is completely (completely) downloaded from the remote update server (step S611). If the download is not completed, the automatic update module 117 uses the communication module (not shown, for example, Ethernet Communication transceivers such as Internet access, Wi-Fi, and mobile networks) continue to download the update file (step S712). If the download is completed, the automatic update module 117 starts to update the system. Before that, the automatic update module 117 will read the system time and determine whether the system time is within the range set by the user (step S613). If it is within the set interval, the automatic update module 117 activates the system update service (step S615) to perform the system update (step S616). If it is not within the setting range, the automatic update module 117 stops the update service (step S614). The automatic update module 117 also determines whether the update is completed (step S617), so as to end the operation of the system updater.

本揭露的另一範例實施例提出一種電腦程式產品,用以執行上述更新方法的各個步驟(圖2~圖6所示實施例)。此電腦程式產品包括多個程式指令,且電腦系統100中的處理器130載入並執行這些程式指令之後,可完成上述的更新方法以及實現電腦系統100的功能。Another exemplary embodiment of the present disclosure provides a computer program product for executing each step of the above-mentioned updating method (the embodiments shown in FIG. 2 to FIG. 6). The computer program product includes a plurality of program instructions, and after the processor 130 in the computer system 100 loads and executes these program instructions, the above-mentioned updating method and the functions of the computer system 100 can be completed.

綜上所述,本發明實施例的電腦系統、其更新方法及電腦程式產品可在作業系統為空閒狀態或發生系統錯誤情形下,自動對作業系統更新,以避免在電腦系統忙碌或使用者正在使用電腦系統的情形下更新。另一方面,本發明實施例更開放讓使用者自行設定更新的設定區間,讓使用者可以在不受干擾又不影響生活的情況下,進行電腦系統更新。相較於現有更新技術,本發明實施例更能符合實際使用需求。In summary, the computer system, update method, and computer program product of the embodiments of the present invention can automatically update the operating system when the operating system is idle or when a system error occurs, so as to avoid busy computer systems or users Update when using a computer system. On the other hand, the embodiments of the present invention are more open for users to set the update setting interval by themselves, so that the user can update the computer system without interference and without affecting their lives. Compared with the existing updated technology, the embodiments of the present invention can better meet actual use requirements.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the technical field can make slight changes and modifications without departing from the spirit and scope of the present invention. The scope of protection of the present invention shall be subject to those defined by the attached patent scope.

100‧‧‧電腦系統110‧‧‧儲存器111‧‧‧作業系統113‧‧‧節能更新模組115‧‧‧強制更新模組117‧‧‧自訂更新模組130‧‧‧處理器S210~S230、S411~S422、S511~S518、S611~S617‧‧‧步驟UI‧‧‧使用者介面310、330‧‧‧虛擬按鈕100‧‧‧Computer system 110‧‧‧Storage 111‧‧‧Operating system 113‧‧‧Energy saving update module 115‧‧‧Forced update module 117‧‧‧Custom update module 130‧‧‧Processor S210 ~S230, S411~S422, S511~S518, S611~S617‧‧‧Step UI‧‧‧User interface 310,330‧‧‧Virtual buttons

圖1是依據本發明一實施例之電腦系統的元件方塊圖。 圖2是依據本發明一實施例之更新方法的流程圖。 圖3是一範例說明系統更新器的使用者介面。 圖4是依據本發明一實施例之節能更新之流程圖。 圖5是依據本發明一實施例之強制更新之流程圖。 圖6是依據本發明一實施例之自訂更新之流程圖。FIG. 1 is a block diagram of components of a computer system according to an embodiment of the invention. Fig. 2 is a flowchart of an update method according to an embodiment of the present invention. Figure 3 is an example illustrating the user interface of the system updater. Fig. 4 is a flowchart of an energy saving update according to an embodiment of the present invention. Fig. 5 is a flowchart of mandatory update according to an embodiment of the present invention. Fig. 6 is a flowchart of a custom update according to an embodiment of the invention.

S210~S230‧‧‧步驟 S210~S230‧‧‧Step

Claims (9)

一種更新方法,適用於運行一作業系統的一電腦系統,而該更新方法包括:判斷該電腦系統執行該作業系統的運行狀態及系統錯誤情形;以及若該作業系統的運行狀態為空閒狀態或發生該系統錯誤情形,則更新該作業系統,其中,判斷該電腦系統執行該作業系統的運行狀態及系統錯誤情形包括:產生一文字檔案,並寫入訊息至該文字檔案;以及判斷產生該文字檔案及寫入該訊息的運行時間是否大於正常回應時間,以確認該運行狀態為該空閒狀態。 An update method is suitable for a computer system running an operating system, and the update method includes: judging the operating status of the operating system and system error conditions of the operating system; and if the operating status of the operating system is idle or occurs The operating system is updated for the system error situation, where determining the operating status of the computer system running the operating system and the system error situation includes: generating a text file and writing a message to the text file; and determining whether to generate the text file and Whether the running time written into the message is greater than the normal response time to confirm that the running state is the idle state. 如申請專利範圍第1項所述的更新方法,其中判斷該電腦系統執行該作業系統的運行狀態及系統錯誤情形包括:判斷該作業系統是否有運行任何前景視窗,以確認該運行狀態為該空閒狀態。 For example, the update method described in item 1 of the scope of patent application, wherein determining the operating status of the operating system and system error conditions of the computer system includes: determining whether the operating system has any foreground windows running to confirm that the operating status is the idle status. 如申請專利範圍第1項所述的更新方法,其中判斷產生該文字檔案及寫入訊息的運行時間是否大於該正常回應時間之後,更包括:若該運行時間大於該正常回應時間,則增加一失敗次數;以及若該失敗次數佔所有統計次數的比例大於比例門檻值,則判 斷該作業系統是否發生該系統錯誤情形。 For example, in the update method described in item 1 of the scope of patent application, after determining whether the running time of generating the text file and writing the message is greater than the normal response time, it further includes: if the running time is greater than the normal response time, adding one The number of failures; and if the ratio of the number of failures to all the statistical times is greater than the threshold Check whether the operating system has this system error condition. 如申請專利範圍第1項所述的更新方法,其中判斷該電腦系統執行該作業系統的運行狀態及系統錯誤情形包括:判斷該電腦系統的硬體使用情形是否異常、判斷一進入系統全新體驗(out-of-box experience,OOBE)流程是否異常、分析傾印檔案來判斷該作業系統內建功能程式是否異常、判斷修復磁碟錯誤次數及/或分析該進入系統全新體驗的日誌來判斷有無嚴重錯誤或行程間隔過長,以確認該作業系統發生該系統錯誤情形。 For example, the update method described in item 1 of the scope of patent application, wherein determining the operating status and system error conditions of the operating system of the computer system includes: determining whether the hardware usage of the computer system is abnormal, determining whether a new system experience is entered ( Out-of-box experience (OOBE) process is abnormal, the dump file is analyzed to determine whether the built-in functional program of the operating system is abnormal, the number of times to repair disk errors, and/or the log of the new system experience is analyzed to determine whether it is serious The error or the stroke interval is too long to confirm that the system error occurs in the operating system. 如申請專利範圍第1項所述的更新方法,其中更新該作業系統包括:關閉所有程式;以及打開全螢幕更新程式。 As for the update method described in item 1 of the scope of patent application, the update of the operating system includes: closing all programs; and opening the full-screen update program. 如申請專利範圍第1項所述的更新方法,更包括:判斷該作業系統的系統時間是否在一設定區間內;以及若該系統時間在該設定區間內,則更新該作業系統。 For example, the update method described in item 1 of the scope of patent application further includes: determining whether the system time of the operating system is within a set interval; and if the system time is within the set interval, updating the operating system. 一種電腦系統,包括:一儲存器,記錄多個模組;以及一處理器,耦接該儲存器,並載入且執行該儲存器所記錄的該些模組,而該些模組包括:一作業系統;以及一自動更新模組,判斷該作業系統的運行狀態及系統錯誤情形,而若該作業系統的運行狀態為空閒狀態或發生該系統錯 誤情形,則更新該作業系統,其中該自動更新模組包括:一節能更新模組,產生一文字檔案,並寫入訊息至該文字檔案,且判斷產生該文字檔案及寫入該訊息的運行時間是否大於正常回應時間,以確認該運行狀態為該空閒狀態。 A computer system includes: a memory that records a plurality of modules; and a processor coupled to the memory, and loads and executes the modules recorded in the memory, and the modules include: An operating system; and an automatic update module to determine the operating status of the operating system and system error conditions, and if the operating status of the operating system is idle or the system error occurs In case of error, update the operating system, where the automatic update module includes: an energy-saving update module that generates a text file, writes a message to the text file, and determines the running time for generating the text file and writing the message Is it greater than the normal response time to confirm that the running state is the idle state. 如申請專利範圍第7項所述的電腦系統,其中該節能更新模組更判斷該作業系統是否有運行任何前景視窗,以確認該運行狀態為該空閒狀態;該自動更新模組更包括:一強制更新模組,判斷該電腦系統的硬體使用情形是否異常;判斷一進入系統全新體驗流程是否異常;分析傾印檔案來判斷該作業系統內建功能程式是否異常;以及判斷修復磁碟錯誤次數及/或分析該進入系統全新體驗的日誌來判斷有無嚴重錯誤或行程間隔過長。 For example, in the computer system described in item 7 of the scope of patent application, the energy-saving update module further determines whether the operating system has any foreground windows running to confirm that the operating state is the idle state; the automatic update module further includes: 1. Forcibly update the module to determine whether the hardware usage of the computer system is abnormal; determine whether the process of entering the new system experience is abnormal; analyze the dump file to determine whether the built-in functional program of the operating system is abnormal; and determine the number of times to repair disk errors And/or analyze the log of the new experience entering the system to determine whether there are serious errors or the travel interval is too long. 一種電腦程式產品,經由運行一作業系統之一電腦系統載入程式執行:判斷該電腦系統執行該作業系統的運行狀態及系統錯誤情形;以及若該作業系統的運行狀態為空閒狀態或發生該系統錯誤情形,則更新該作業系統, 其中,判斷該電腦系統執行該作業系統的運行狀態及系統錯誤情形包括:產生一文字檔案,並寫入訊息至該文字檔案;以及判斷產生該文字檔案及寫入該訊息的運行時間是否大於正常回應時間,以確認該運行狀態為該空閒狀態。 A computer program product executed by a computer system loading program running an operating system: determining the operating status of the operating system and system error conditions of the operating system; and if the operating status of the operating system is idle or the system has occurred In case of error, update the operating system, Among them, determining the operating status and system error conditions of the computer system running the operating system includes: generating a text file and writing a message to the text file; and determining whether the running time for generating the text file and writing the message is greater than the normal response Time to confirm that the running state is the idle state.
TW107112648A 2018-04-12 2018-04-12 Computer system, updating method thereof and computer program product TWI697776B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW107112648A TWI697776B (en) 2018-04-12 2018-04-12 Computer system, updating method thereof and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW107112648A TWI697776B (en) 2018-04-12 2018-04-12 Computer system, updating method thereof and computer program product

Publications (2)

Publication Number Publication Date
TW201944244A TW201944244A (en) 2019-11-16
TWI697776B true TWI697776B (en) 2020-07-01

Family

ID=69184729

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107112648A TWI697776B (en) 2018-04-12 2018-04-12 Computer system, updating method thereof and computer program product

Country Status (1)

Country Link
TW (1) TWI697776B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI799035B (en) * 2021-12-29 2023-04-11 威聯通科技股份有限公司 System updating method and electronic apparatus

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI786945B (en) * 2021-11-12 2022-12-11 宜鼎國際股份有限公司 Data storage device and method capable of quickly updating operating system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010014968A1 (en) * 1998-07-21 2001-08-16 Mannan A. Mohammed Automatic upgrade of software
US20030046675A1 (en) * 1996-06-07 2003-03-06 William Cheng Automatic updating of diverse software products on multiple client computer systems
US20070061372A1 (en) * 2005-09-14 2007-03-15 International Business Machines Corporation Dynamic update mechanisms in operating systems
US8271889B1 (en) * 2007-11-26 2012-09-18 Adobe Systems Incorporated Automatically updated user interfaces for a mobile device
US20140149879A1 (en) * 2006-03-10 2014-05-29 Kt Corporation Method and apparatus for providing idle screen service

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030046675A1 (en) * 1996-06-07 2003-03-06 William Cheng Automatic updating of diverse software products on multiple client computer systems
US20010014968A1 (en) * 1998-07-21 2001-08-16 Mannan A. Mohammed Automatic upgrade of software
US20070061372A1 (en) * 2005-09-14 2007-03-15 International Business Machines Corporation Dynamic update mechanisms in operating systems
US20140149879A1 (en) * 2006-03-10 2014-05-29 Kt Corporation Method and apparatus for providing idle screen service
US8271889B1 (en) * 2007-11-26 2012-09-18 Adobe Systems Incorporated Automatically updated user interfaces for a mobile device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Windows 7 藍屏代碼大全 & 藍屏全攻略", 2010年11月27日 http://blog.sina.com.tw/gn00502101/article.php?entryid=600154 *
"電腦藍屏的原因及解決方法", 2013年11月11日 http://tw.wingwit.com/Article/Common/201311/7763.html *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI799035B (en) * 2021-12-29 2023-04-11 威聯通科技股份有限公司 System updating method and electronic apparatus

Also Published As

Publication number Publication date
TW201944244A (en) 2019-11-16

Similar Documents

Publication Publication Date Title
US10884837B2 (en) Predicting, diagnosing, and recovering from application failures based on resource access patterns
US10146635B1 (en) Virtual machine backup
US9185128B2 (en) Malware analysis methods and systems
WO2018196559A1 (en) Method and apparatus for dealing with abnormality of application program, and storage medium
US8516462B2 (en) Method and apparatus for managing a stack
US10387261B2 (en) System and method to capture stored data following system crash
US20150089479A1 (en) Method for pre-testing software compatibility and system thereof
US20210390182A1 (en) Automatic mitigation of corrupted or compromised compute resources
CN111767066A (en) Method and apparatus for in-situ mitigation of firmware failures
US11461179B2 (en) System recovery method and apparatus
CN108292342B (en) Notification of intrusions into firmware
TWI697776B (en) Computer system, updating method thereof and computer program product
US11768672B1 (en) Systems and methods for user-controlled deployment of software updates
CN112306732B (en) Automatic error correction control method, device, equipment and medium in server
CN106095621A (en) The restoration methods of Launcher operation exception and system in a kind of Android system
US10318731B2 (en) Detection system and detection method
TWI518680B (en) Method for maintaining file system of computer system
CN110851294A (en) Method and device for remedying program operation breakdown
CN112131043A (en) Method and device for detecting and recovering abnormity of basic input and output system
CN111078418A (en) Operation synchronization method and device, electronic equipment and computer readable storage medium
CN108416210B (en) Program protection method and device
US11663470B2 (en) Method and system for accelerating boot time
KR20130075807A (en) An atm with back-up hdd for booting and the booting method there of
WO2020052472A1 (en) Method and device for detecting and controlling abnormal application, terminal, and storage medium
US8850399B2 (en) Software development using code retraction and background warm up