TW201944244A - Computer system, updating method thereof and computer program product - Google Patents
Computer system, updating method thereof and computer program productInfo
- Publication number
- TW201944244A TW201944244A TW107112648A TW107112648A TW201944244A TW 201944244 A TW201944244 A TW 201944244A TW 107112648 A TW107112648 A TW 107112648A TW 107112648 A TW107112648 A TW 107112648A TW 201944244 A TW201944244 A TW 201944244A
- Authority
- TW
- Taiwan
- Prior art keywords
- operating system
- operating
- update
- computer system
- running
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000004590 computer program Methods 0.000 title claims abstract description 10
- 230000002159 abnormal effect Effects 0.000 claims description 16
- 230000008569 process Effects 0.000 claims description 16
- 230000004044 response Effects 0.000 claims description 12
- 230000006870 function Effects 0.000 claims description 7
- 230000008439 repair process Effects 0.000 claims description 3
- 238000004891 communication Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 241000700605 Viruses Species 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
Description
本發明是有關於一種作業系統,且特別是有關於一種針對作業系統之電腦系統、其更新方法及電腦程式產品。The present invention relates to an operating system, and in particular, to a computer system for an operating system, an update method thereof, and a computer program product.
作業系統(Operating System,OS)需要透過系統更新,來修補系統漏洞以避免電腦病毒或惡意程式侵害,或解決系統錯誤,甚至增加新功能。而相較於過往需要使用者手動執行更新,現今電腦系統的更新流程越來越自動化,便利性也隨著提高。例如,作業系統可供調整系統更新頻率(例如,10分鐘、1小時候更新),或者只要連上網路即可自動更新。然而,現有的更新流程並不會考慮到當下系統效能是否適合作業系統更新、電腦是否處於忙碌階段、或會不會干擾到使用者的工作等情況。在前述情況下貿然執行更新,系統運作狀態將變繁忙且執行速度變慢,從而影響使用者的操作。The operating system (OS) needs to update system vulnerabilities to avoid computer viruses or malicious programs, or to resolve system errors, or even add new functions. Compared with the past, which required users to manually perform updates, the update process of computer systems is becoming more and more automated, and convenience has also improved. For example, the operating system can be used to adjust the system update frequency (for example, 10 minutes, 1 hour), or it can be automatically updated as long as it is connected to the Internet. However, the existing update process does not take into account whether the current system performance is suitable for operating system updates, whether the computer is busy, or whether it will interfere with the user's work and so on. In the foregoing case, if the update is rashly performed, the system operation status will become busy and the execution speed will be slow, thereby affecting the user's operation.
有鑑於此,本發明提供一種電腦系統、其更新方法及電腦程式產品,其能確保系統是在空閒(或稱閒置)狀態下或正常情況下,才會執行更新。In view of this, the present invention provides a computer system, a method for updating the same, and a computer program product, which can ensure that the system performs the update only in an idle (or idle) state or under normal circumstances.
本發明實施例的更新方法,其適用於運行作業系統的電腦系統。而此更新方法包括下列步驟。判斷電腦系統執行作業系統的運行狀態及系統錯誤情形。而若此作業系統的運行狀態為空閒狀態或發生系統錯誤情形,則更新此作業系統。The updating method of the embodiment of the present invention is applicable to a computer system running an operating system. This update method includes the following steps. Determine the operating status and system error conditions of the operating system of the computer system. If the operating state of the operating system is idle or a system error occurs, the operating system is updated.
本發明實施例的電腦系統,其包括儲存器及處理器。儲存器記錄數個模組。處理器耦接儲存器,並載入且執行儲存器所記錄的那些模組。而那些模組包括作業系統及自動更新模組。自動更新模組判斷作業系統的運行狀態及系統錯誤情形,而若此作業系統的運行狀態為空閒狀態或發生系統錯誤情形,則更新此作業系統。The computer system according to the embodiment of the present invention includes a memory and a processor. The memory records several modules. The processor is coupled to the memory, and loads and executes the modules recorded in the memory. Those modules include operating systems and automatic update modules. The automatic update module judges the operating state of the operating system and the system error situation, and updates the operating system if the operating state of the operating system is idle or a system error situation occurs.
本發明實施例的電腦程式產品,其係經由運行作業系統之電腦系統載入程式執行下列步驟。判斷電腦系統執行作業系統的運行狀態及系統錯誤情形。而若此作業系統的運行狀態為空閒狀態或發生系統錯誤情形,則更新此作業系統。The computer program product according to the embodiment of the present invention executes the following steps by loading a program in a computer system running an operating system. Determine the operating status and system error conditions of the operating system of the computer system. If the operating state of the operating system is idle or a system error occurs, the operating system is updated.
基於上述,本發明實施例提供至少兩種自動更新模式;其一是在作業系統的運行狀態為空閒狀態才會執行更新;其二是作業系統發生系統錯誤情形才會執行更新。藉此,作業系統更新程序將不會影響到系統效能,更不會影響使用者當下的操作狀況。Based on the above, embodiments of the present invention provide at least two automatic update modes; one is to perform the update only when the operating state of the operating system is idle; 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, nor will it affect the user's current operating conditions.
為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。In order to make the above features and advantages of the present invention more comprehensible, embodiments are hereinafter described in detail with reference to 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 present invention. Referring to FIG. 1, the computer system 100 includes a memory 110 and a processor 130. The computer system 100 may be a desktop computer, a notebook computer, a smart phone, a tablet computer, or the like.
儲存器110可以是任何型態的固定或可移動隨機存取記憶體(Random Access Memory,RAM)、唯讀記憶體(Read-Only Memory,ROM)、快閃記憶體(Flash Memory)或類似元件或上述元件之組合的儲存器,儲存器110並用於儲存緩衝的或永久的資料、作業系統111(例如,Windows、OSX、Linux、Android等)、軟體模組(自動更新模組(包括節能更新模組113及強制更新模組115)、自訂更新模組117等)、使用者介面、各種日誌檔案、傾印檔案、更新次數、失敗次數、事件檔等資料,且其詳細內容待後續實施例詳述。The memory 110 may be any type of fixed or removable random access memory (RAM), read-only memory (ROM), flash memory (Flash Memory), or the like 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 Examples are detailed.
處理器130與儲存器110耦接,並可以是中央處理單元(CPU),或是其他可程式化之一般用途或特殊用途的微處理器(Microprocessor)、數位信號處理器(DSP)、可程式化控制器、特殊應用積體電路(ASIC)或其他類似元件或上述元件的組合。在本發明實施例中,處理器130用以執行電腦系統100的所有作業,且可載入並執行儲存器110所記錄的作業系統111及各軟體模組。The processor 130 is coupled to the memory 110, and may be a central processing unit (CPU), or other programmable general purpose or special purpose microprocessor (Microprocessor), digital signal processor (DSP), and programmable Controller, special application integrated circuit (ASIC) or other similar components or a combination of the above. In the embodiment of the present invention, the processor 130 is configured to execute all operations of the computer system 100, and may load and execute the operating system 111 and each software module recorded in the storage 110.
為了方便理解本發明的操作流程,以下將舉諸多實施例詳細說明。In order to facilitate understanding of the operation flow 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 present invention. Please refer to FIG. 2. Hereinafter, the method according to the embodiment of the present invention will be described with components and modules in the computer system 100. Each process of the method can be adjusted according to the implementation situation, and is not limited to this.
為了方便使用者操作,本實施例係以應用程式(即,電腦程式產品)的態樣實現,電腦系統100經安裝可執行本發明實施例更新方法的應用程式(為方便說明,以下稱為系統更新器)後,可提供捷徑(例如,在開始選單、桌面、工作列上等位置)或快捷鍵功能,讓使用者點選對應捷徑或按下特定快捷鍵後即可操作此系統更新器。請參照圖3是一範例說明系統更新器的使用者介面UI。而本發明實施例主要分為自動化更新及使用者自訂模式,以避免作業系統111繁忙或使用者工作下進行更新。反應於接收到使用者介面UI上之自動化更新或使用者自訂的虛擬按鈕310, 330被選取,處理器130會執行對應的更新流程。In order to facilitate the operation of the user, 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 convenience of explanation, hereinafter referred to as a system) After the updater, you can provide shortcuts (for example, on the start menu, desktop, taskbar, etc.) or shortcut keys. Users can click the corresponding shortcuts or press a specific shortcut to operate the system updater. Please refer to FIG. 3 for an example of a user interface UI of the system updater. The embodiments of the present invention are mainly divided into an automatic update mode and a user-customized mode, so as to avoid the update when the operating system 111 is busy or the user works. In response to receiving an automatic update on the user interface UI or a user-defined virtual button 310, 330 being selected, the processor 130 executes a 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 forced update module 115 of the automatic update module will judge (scheduled or unscheduled) the operating status of the operating system 111 and the system error situation of the computer system 100 (step S210). . Specifically, the automatic update in the embodiment of the present invention is divided into an energy-saving update and a forced 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 window is running (or whether any window is opened) through the Application Programming Interface (API). If there is a foreground window, It is in a non-idle state, and 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 combination thereof) 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 it is not longer than the normal response time, it is idle; the energy saving update module 113 can call a specific application (for example, a benchmark test program, video playback software, etc.), and determine whether the time for the application to complete opening or executing a specific function is greater than Normal execution time, if it is not longer than normal execution time, it is idle; the energy saving update module 113 can also judge whether the hardware usage is It is in a high load state (for example, the memory usage exceeds 80%, the CPU usage exceeds 75%, etc.). If it is not in the high load state, it is determined that the operating system 111 is in an idle state. It should be noted that the foregoing embodiments for determining the idle state can be adjusted or even combined according to actual needs (corresponding to different operating systems and device types), and the present invention is not limited thereto.
另一方面,強制更新是處理器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 is that the processor 130 first analyzes whether the operating system 111 causes an abnormality (ie, a system error situation) due to an internal problem. There are many ways to determine the system error situation. For example, the forced update module 115 can determine whether the hardware usage of the computer system 100 is abnormal (for example, whether the difference between the memory usage and the CPU usage is greater than a specific ratio (for example, , 25, 30, 35%)), if the hardware usage situation is abnormal, it means that the operating system 111 is too often divided and mistakes occur, and it can be inferred that there is a problem with the internal program or the hardware driver of the operating system 111; mandatory updates The module 115 can determine whether the out-of-box experience (OOBE) process is abnormal (for example, by searching the operating system event file and determining whether the operating system 111 is abnormally turned on or restarted (Kernel Power) occurs with msoobe The program execution time is the same, if they are the same, it means that the OOBE flow into the system 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 a command prompt window (cmd) and enter "analyze-v", and / or preliminary analysis such as checking the stack status); the forced update module 115 can also judge repairing disk errors Count and / or analyze the log of the new experience of entering the system to determine whether there are serious errors or the travel interval is too long (for example, more than a specific number (for example, 5, 10, 15 times, etc.) of the operating system event file from the chkdsk program, which represents the operation The internal file of the system 111 is too damaged; analyze the msoobe log to determine whether there is a serious error or that each trip interval exceeds a certain time (for example, 10, 15, 17 seconds, etc.) to confirm that a system error situation has occurred in the operating system 111. It should be noted that the foregoing embodiments for determining the idle state can be adjusted or even combined according to actual needs (corresponding to different operating systems and device types), and the present invention is not limited thereto.
接著,若作業系統111的運行狀態為空閒狀態或發生系統錯誤情形,則節能更新模組113或強制更新模組115會更新作業系統111(步驟S230)。若作業系統111的運行狀態為空閒狀態,則節能更新模組113將直接啟動系統更新的服務(service),以執行系統更新程序(即,對作業系統111更新)。而若作業系統111發生系統錯誤情形,則強制更新模組115會先關閉所有程式(例如,運行前景視窗的程式、及非系統背景程式等)再打開全螢幕更新程式(呈現全螢幕圖片或影像)(亦可能是關閉螢幕),讓使用者無法透過滑鼠、鍵盤、觸控板等輸入裝置操作電腦系統111,才進行系統更新程序。Next, if the operating state of the operating system 111 is an idle state or a system error situation occurs, the energy saving update module 113 or the forced update module 115 updates the operating system 111 (step S230). If the operating state of the operating system 111 is an idle state, the energy saving update module 113 will directly start a system update service to execute a system update program (that is, update the operating system 111). If a system error occurs in the operating system 111, the forced update module 115 will close all programs (for example, programs running in the foreground window and non-system background programs, etc.) and then open the full-screen update program (presenting full-screen pictures or images) ) (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 the user to set one or more sets of setting intervals (for example, 8 to 10 am, 11 to 12 pm, etc.), and customizes the update module 117 It is determined whether the system time of the operating system 111 is within this set interval. If the system time is within the aforementioned setting interval, the custom update module 117 will 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 to better understand the present invention, different application scenarios are proposed below for energy-saving updates, mandatory updates, and user-defined updates.
請參照圖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 energy saving update according to an embodiment of the present invention. The energy saving update module 113 searches the window title (title) and object (step S411) through the API calling method to determine whether any window is currently opened (step S412). If a window is opened, it means that the user is most likely using the computer system 100. At this time, if the operating system 111 is updated, the computer system 100 will become busy and the running speed will be slower. Therefore, the energy saving update module 113 stops the service of the operating system update (step S422). If no window is opened, the energy saving update module 113 generates a log file and writes a string to a hidden folder, and tests 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 a file and writing a string of characters at the slowest five seconds, and determine whether the response time has expired (that is, whether it is greater than the normal response time) (step S414); The response time exceeds five seconds, which indicates that the operating system 111 is currently busy (ie, not in an idle state), so the energy saving update module 113 stops the service of the operating system update (step S422). If neither of the above conditions (ie, steps S412, S414) occurs, the energy saving update module 113 starts a service (step S415) to perform a system update (step S416), and periodically determines whether the update is completed (step S417). If the system update is completed, the energy saving update module 113 may terminate 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 number of updates and the system busy frequency. After the system is updated, the counter will increase the number of updates by one (step S418). If the response time is more than 5 seconds (that is, 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 all the statistics (ie, the number of updates plus the number of failures) is greater than the 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 Will count the number of failures (system busy times) more than 3 times. If it is more than 3 times, it is very likely to indicate 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 mandatory update module 115 to perform the analysis first (step S421, that is, judge Whether a system error condition occurs in the operating system 111). If not more than three times, the energy saving update module 113 stops the service of the operating system update (step S422).
需說明的是,於其他實施例中,前述步驟S412,S414的判斷流程之順序可調整或僅擇一判斷。It should be noted that, in other embodiments, the order of the foregoing determination processes of steps S412 and S414 may be adjusted or only one determination may be made.
請參照圖5是依據本發明一實施例之強制更新之流程圖。強制更新模組115可附屬在原廠內建自動化更新功能裡面,因此自動化更新能力被啟動時,若停止系統更新服務的頻率太高,則處理器130會呼叫強制更新模組115。而強制更新的分析流程如下,只要有一項檢測出狀況(即符合判斷條件),代表作業系統111內部有程式出了問題或系統錯誤情形,則需要執行強制更新。Please refer to FIG. 5, which is a flowchart of a forced update according to an embodiment of the present invention. The forced 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 forced update module 115. The compulsory update analysis process is as follows. As long as one of the detected conditions (that is, the judgment condition is met) indicates that there is a problem in the operating system 111 or a system error situation, the compulsory update needs to be performed.
強制更新模組115檢查記憶體使用率與CPU使用率落差是否大於25%(即硬體使用情形是否異常,步驟S511),如果有超過25%,代表作業系統111太常發生分頁錯誤和輾轉現象,且作業系統111內部程式或硬體驅動程式有問題,有更新之必要。The forced update module 115 checks whether the difference between the memory usage rate and the CPU usage rate is greater than 25% (that is, whether the hardware usage is abnormal, step S511). If it exceeds 25%, it indicates that the operating system 111 frequently causes page faults and rotation , And there is a problem with the internal program or hardware driver of the operating system 111, and it is necessary to update.
強制更新模組115搜尋作業系統事件檔,並判斷作業系統事件檔所記錄系統不正常關機或重啟(Kernel Power)發生時間是否跟msoobe程式執行時間一樣、及/或判斷是否有過多來自chkdsk程式的呼叫(即判斷進入系統OOBE流程是否異常,步驟S513)。若時間相同,則代表進入系統OOBE流程不正常且作業系統111本身有潛在性問題;若大多來自chkdsk程式的呼叫,則代表作業系統111內部檔案毀損且難以修復;這些系統錯誤情形都有強制更新必要。The forced update module 115 searches for operating system event files, and determines whether the abnormal shutdown or restart (Kernel Power) of the system recorded in the operating system event files takes the same time as the msoobe program execution time, and / or determines whether there are too many from the chkdsk program. Call (that is, determine whether the OOBE flow into 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 from the chkdsk program, it means that the internal files of the operating system 111 are damaged and difficult to repair; these system error conditions are forced to update necessary.
若強制更新模組115發現有傾印檔案,則可對命令提示字元視窗輸入analyze-v以分析傾印檔案並檢查堆疊狀態等初步分析(步驟S514)。若強制更新模組115自分析結果發現問題來自於作業系統111內部程式,則需進行強制更新。If the forced update module 115 finds a dump file, it can enter analyze-v into the command prompt window to analyze the dump file and check the stacking status (step S514). If the forced update module 115 finds that the problem comes from an internal program of the operating system 111 from the analysis results, a forced update is required.
強制更新模組115還可分析msoobe的日誌(步驟S516),並判斷有無嚴重錯誤或是每個行程間隔超過10秒(即,逾時)(步驟S517)。如果有嚴重錯誤或行程間隔超過10秒,則代表作業系統111內部有潛在問題,因此需進行強制更新。The forced update module 115 may also analyze the log of msoobe (step S516), and determine whether there is a serious error or that the interval between each trip exceeds 10 seconds (that is, timeout) (step S517). If there is a serious error or the travel interval exceeds 10 seconds, it means that there is a potential problem in the operating system 111, so a forced update is required.
若前述步驟S511,S513,S515,S517的判斷結果都是符合系統錯誤情形,則強制更新模組115會關閉所有程式並開始全螢幕更新程式,以執行對作業系統111更新(步驟S519)。反之,若未符合系統錯誤情形,則強制更新模組115會呼叫節能更新模組114以執行諸如圖4所述的節能更新流程(步驟S518)。If the judgment results of the foregoing steps S511, S513, S515, and S517 are all in accordance with the system error situation, the forced update module 115 will close all programs and start a full-screen update program to perform an update to 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 order of the foregoing determination processes of steps S511, S513, S515, and S517 may be adjusted or only one determination may be made.
請參照圖6是依據本發明一實施例之使用者自訂更新之流程圖。電腦系統100可提供使用者介面讓使用者可以自行決定特定時段區間執行電腦系統更新,以避免在使用者不方便的時間進行系統更新而妨礙使用者。自動更新模組117先判斷更新檔是否從遠端更新伺服器完全(完整)下載(步驟S611),若未下載完成則自動更新模組117透過通訊模組(圖未示,例如,乙太網路、Wi-Fi、行動網路等通訊收發器)繼續下載更新檔(步驟S712)。若下載完成,則自動更新模組117開始進行系統更新。而在此之前,自動更新模組117會去讀取系統時間,並判斷系統時間是否在使用者的設定區間範圍內(步驟S613)。若在設定區間內,則自動更新模組117啟動系統更新的服務(步驟S615),以執行系統更新(步驟S616)。而若不在設定範圍內,則自動更新模組117停止更新服務(步驟S614)。自動更新模組117還會判斷更新是否完成(步驟S617),以結束系統更新器之運行。Please refer to FIG. 6 is a flowchart of user-defined update according to an embodiment of the present invention. The computer system 100 can provide a user interface so that the user can decide to perform a computer system update at a specific time interval, so as to prevent the user from being hindered by performing system updates at a time inconvenient for 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 update file is not downloaded, the automatic update module 117 passes the communication module (not shown in the figure, for example, Ethernet Communication transceivers such as wireless networks, Wi-Fi, and mobile networks) continue to download the update file (step S712). If the download is completed, the automatic update module 117 starts system update. Before that, the automatic update module 117 reads the system time and determines 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 starts a system update service (step S615) to execute a 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) 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 performing each step of the above-mentioned update method (the embodiments shown in FIGS. 2 to 6). This computer program product includes multiple program instructions, and after the processor 130 in the computer system 100 loads and executes these program instructions, the above-mentioned update method and the functions of the computer system 100 can be completed.
綜上所述,本發明實施例的電腦系統、其更新方法及電腦程式產品可在作業系統為空閒狀態或發生系統錯誤情形下,自動對作業系統更新,以避免在電腦系統忙碌或使用者正在使用電腦系統的情形下更新。另一方面,本發明實施例更開放讓使用者自行設定更新的設定區間,讓使用者可以在不受干擾又不影響生活的情況下,進行電腦系統更新。相較於現有更新技術,本發明實施例更能符合實際使用需求。In summary, the computer system, the updating method and the computer program product of the embodiments of the present invention can automatically update the operating system when the operating system is idle or a system error occurs, so as to avoid busyness of the computer system or users Update using a computer system. On the other hand, the embodiments of the present invention are more open for users to set updated setting intervals, so that users can update computer systems without interference and without affecting their lives. Compared with the existing updated technology, the embodiments of the present invention can better meet the actual use requirements.
雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed as above with the examples, it is not intended to limit the present invention. Any person with ordinary knowledge in the technical field can make some modifications and retouching without departing from the spirit and scope of the present invention. The protection scope of the present invention shall be determined by the scope of the attached patent application.
100‧‧‧電腦系統100‧‧‧ computer system
110‧‧‧儲存器110‧‧‧Storage
111‧‧‧作業系統111‧‧‧operating system
113‧‧‧節能更新模組113‧‧‧Energy saving update module
115‧‧‧強制更新模組115‧‧‧Force update module
117‧‧‧自訂更新模組117‧‧‧Custom Update Module
130‧‧‧處理器130‧‧‧ processor
S210~S230、S411~S422、S511~S518、S611~S617‧‧‧步驟S210 ~ S230, S411 ~ S422, S511 ~ S518, S611 ~ S617‧‧‧steps
UI‧‧‧使用者介面UI‧‧‧ User Interface
310、330‧‧‧虛擬按鈕310, 330‧‧‧Virtual Button
圖1是依據本發明一實施例之電腦系統的元件方塊圖。 圖2是依據本發明一實施例之更新方法的流程圖。 圖3是一範例說明系統更新器的使用者介面。 圖4是依據本發明一實施例之節能更新之流程圖。 圖5是依據本發明一實施例之強制更新之流程圖。 圖6是依據本發明一實施例之自訂更新之流程圖。FIG. 1 is a block diagram of components of a computer system according to an embodiment of the present invention. FIG. 2 is a flowchart of an update method according to an embodiment of the present invention. FIG. 3 illustrates an example 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 a forced update according to an embodiment of the present invention. FIG. 6 is a flowchart of a custom update according to an embodiment of the present invention.
Claims (10)
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 true TW201944244A (en) | 2019-11-16 |
TWI697776B 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)
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 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI799035B (en) * | 2021-12-29 | 2023-04-11 | 威聯通科技股份有限公司 | System updating method and electronic apparatus |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6151643A (en) * | 1996-06-07 | 2000-11-21 | Networks Associates, Inc. | Automatic updating of diverse software products on multiple client computer systems by downloading scanning application to client computer and generating software list on client computer |
US6418555B2 (en) * | 1998-07-21 | 2002-07-09 | Intel Corporation | Automatic upgrade of software |
US7818736B2 (en) * | 2005-09-14 | 2010-10-19 | International Business Machines Corporation | Dynamic update mechanisms in operating systems |
KR100775554B1 (en) * | 2006-03-10 | 2007-11-15 | 주식회사 케이티프리텔 | Method and system for providing content based dynamic wallpaper service |
US8271889B1 (en) * | 2007-11-26 | 2012-09-18 | Adobe Systems Incorporated | Automatically updated user interfaces for a mobile device |
-
2018
- 2018-04-12 TW TW107112648A patent/TWI697776B/en active
Cited By (1)
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 |
Also Published As
Publication number | Publication date |
---|---|
TWI697776B (en) | 2020-07-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104102506B (en) | A kind of Android Acceleration of starting methods based on ARM platforms | |
CN104461858B (en) | software compatibility pre-testing method and system | |
CN102253863B (en) | Method for closing processes | |
CN105917306B (en) | System and method for configuring system firmware configuration data | |
US11768672B1 (en) | Systems and methods for user-controlled deployment of software updates | |
CN111708655A (en) | Application crash processing method, device and system | |
TW200416544A (en) | Recovery method of multi-functional operating system and system thereof | |
CN108292342B (en) | Notification of intrusions into firmware | |
US10318731B2 (en) | Detection system and detection method | |
TWI697776B (en) | Computer system, updating method thereof and computer program product | |
US6519637B1 (en) | Method and apparatus for managing a memory shortage situation in a data processing system | |
CN111090546B (en) | Method, device and equipment for restarting operating system and readable storage medium | |
US7340594B2 (en) | Bios-level incident response system and method | |
CN102262573B (en) | Operating system startup protection method and device | |
TW201510995A (en) | Method for maintaining file system of computer system | |
US11663470B2 (en) | Method and system for accelerating boot time | |
CN118708396A (en) | Error information processing method, device, medium and program product | |
CN105893248A (en) | Method and device for obtaining abnormal relevant information in terminal equipment | |
CN110399145A (en) | Computer system, method for updating the same, and computer program product | |
CN110134546B (en) | Batch restarting windows system method, electronic device and storage medium | |
CN116880872A (en) | Cluster firmware combination upgrade method, system, terminal and storage media | |
TW201015296A (en) | Method for auto-testing environment variable setting | |
US20170300104A1 (en) | Power-saving method and an electronic device for performing power consumption management | |
CN106557379A (en) | A kind of generation method and device of installation kit of mourning in silence | |
US8850399B2 (en) | Software development using code retraction and background warm up |