TWI760839B - Building method of system restore mechanism and system booting and restoring method - Google Patents

Building method of system restore mechanism and system booting and restoring method Download PDF

Info

Publication number
TWI760839B
TWI760839B TW109130365A TW109130365A TWI760839B TW I760839 B TWI760839 B TW I760839B TW 109130365 A TW109130365 A TW 109130365A TW 109130365 A TW109130365 A TW 109130365A TW I760839 B TWI760839 B TW I760839B
Authority
TW
Taiwan
Prior art keywords
judgment result
system restoration
executed
restoration mechanism
establishing
Prior art date
Application number
TW109130365A
Other languages
Chinese (zh)
Other versions
TW202211025A (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 TW109130365A priority Critical patent/TWI760839B/en
Publication of TW202211025A publication Critical patent/TW202211025A/en
Application granted granted Critical
Publication of TWI760839B publication Critical patent/TWI760839B/en

Links

Images

Abstract

The present application relates to a building method of a system restore mechanism applied to a computer comprising a storage device and an operation system. The building method comprising steps of (a) turning the computer on, (b) recording all commands sent to the storage device during a time interval after the computer is turned on, (c) analyzing an operating times and a time sequence of at least a specific command and generating a analysis result, (d) determining whether the number of the analysis result is larger than or equal to a default value, and (e) building a system restore mechanism according to all the analysis results. When the determining result of the step (d) is YES, the step (e) is performed after the step (d). When the determining result of the step (d) is NO, the step (a) is re-performed after the step (d).

Description

系統還原機制之建立方法及系統啟動與還原方法Establishment method of system restoration mechanism and system startup and restoration method

本案係關於一種機制建立方法,尤指一種基於自動學習的系統還原機制之建立方法及系統啟動與還原方法。This case is about a method for establishing a mechanism, especially a method for establishing a system restoration mechanism based on automatic learning and a method for starting and restoring the system.

在一般使用者使用電腦時,最害怕遇到的其中一個狀況是無法正常開機,不論是停在BIOS畫面或是進入修復模式,甚至是出現藍屏的畫面,都代表系統啟動過程出現錯誤,或是相關的啟動檔案遺失,這些情形都有機會造成原本內部的重要程式或資料再也無法被使用,無形的損失難以估量。One of the things that ordinary users are most afraid of when using a computer is that they cannot boot normally. Whether it is stopping at the BIOS screen or entering the repair mode, or even a blue screen, it means that there is an error in the system startup process, or The relevant startup files are lost, and these situations may cause the original internal important programs or data to no longer be used, and the intangible losses are immeasurable.

為了確保電腦能夠正常運作,系統還原程式已被大量運用及開發,以期能在電腦異常時將作業系統還原至正常狀態。習知技術中的系統還原方式是在作業系統中安裝程式,並透過使用者自訂備份的時間點。當使用者覺得系統不穩定時,再執行系統還原動作,以確保作業系統不會突然發生損毀或當機現象。In order to ensure the normal operation of the computer, system restore programs have been widely used and developed to restore the operating system to a normal state when the computer is abnormal. The system restoration method in the prior art is to install a program in the operating system and customize the backup time point through the user. When the user feels that the system is unstable, the system restore operation is performed to ensure that the operating system will not be damaged or crashed suddenly.

然而,此種方式仍具有不少缺點,特別是在使用者未執行系統還原之前,電腦可能已經發生故障,而此時使用者可能面臨無法進入作業系統執行系統還原的窘境,進而影響到使用者的工作或生產效率,甚至造成使用者的巨大損失。此外,安裝系統還原程式以及執行備份皆須花費大量時間,降低使用者的生產力。However, this method still has many disadvantages, especially before the user performs system restoration, the computer may have failed, and at this time, the user may face the dilemma of being unable to enter the operating system to perform system restoration, thereby affecting the user. work or production efficiency, and even cause huge losses to users. In addition, installing system restore programs and performing backups takes a lot of time, reducing user productivity.

故此,如何發展一種可有效解決前述先前技術之問題與缺點的系統還原機制之建立方法及系統啟動與還原方法,實為目前尚待解決的問題。Therefore, how to develop a method for establishing a system restoration mechanism and a method for system startup and restoration that can effectively solve the problems and shortcomings of the prior art is a problem to be solved at present.

本案之主要目的為提供一種系統還原機制之建立方法及系統啟動與還原方法,俾解決並改善前述先前技術之問題與缺點。The main purpose of this case is to provide a method for establishing a system restoration mechanism and a method for system startup and restoration, so as to solve and improve the problems and shortcomings of the aforementioned prior art.

本案之另一目的為提供一種系統還原機制之建立方法及系統啟動與還原方法,藉由記錄電腦啟動後一時間區間內之所有指令,並分析特定指令之運行次數及時序且產生分析結果,再根據分析結果建立系統還原機制,可以透過自動學習之方式建立專屬於電腦的自動系統還原機制,而無須另行安裝系統還原程式,同時可降低使用者進行備份或執行還原的勞力與時間,進而達到提高生產效率之功效。Another object of this case is to provide a method for establishing a system restoration mechanism and a method for starting and restoring the system, by recording all commands within a time interval after the computer is started, analyzing the running times and timing of specific commands, and generating analysis results, and then According to the analysis results, a system restoration mechanism can be established, and an automatic system restoration mechanism dedicated to the computer can be established through automatic learning, without the need to install a system restoration program. The effect of production efficiency.

本案之另一目的為提供一種系統還原機制之建立方法及系統啟動與還原方法,透過本案之系統還原機制,可有效偵測作業系統是否有正常被啟動,並在偵測到異常時自動還原至正常狀態,進而降低重要程式或資料毀損的風險。Another object of this case is to provide a method for establishing a system restoration mechanism and a method for starting and restoring the system. Through the system restoration mechanism of this case, it can effectively detect whether the operating system is normally activated, and automatically restore to the system when an abnormality is detected. normal state, thereby reducing the risk of damage to important programs or data.

本案之另一目的為提供一種系統還原機制之建立方法及系統啟動與還原方法,當系統在開機啟動的過程中發生了問題,儲存裝置之韌體便會觸發系統還原機制,電腦在下次開機時即能正常啟動系統,避免程式無法執行或重要資料的遺失,也省去將儲存裝置自電腦取出並重新安裝作業系統等繁瑣工作。Another object of this case is to provide a method for establishing a system restoration mechanism and a system startup and restoration method. When a problem occurs during the system startup process, the firmware of the storage device will trigger the system restoration mechanism. When the computer is turned on next time That is, the system can be started normally to avoid program failure or loss of important data, as well as tedious work such as removing the storage device from the computer and reinstalling the operating system.

為達上述目的,本案之一較佳實施態樣為提供一種系統還原機制之建立方法,適用於包括一儲存裝置及一作業系統之一電腦,該系統還原機制之建立方法包括步驟:(a)啟動該電腦;(b)記錄該電腦啟動後的一時間區間內對該儲存裝置發出之所有指令;(c)分析該所有指令中的至少一特定指令的運行次數及時序,並產生一分析結果;(d)判斷該分析結果的數量是否大於或等於一預設值;以及(e)根據所有的該分析結果建立一系統還原機制;其中當該步驟(d)之判斷結果為是,於該步驟(d)之後係執行該步驟(e),且當該步驟(d)之判斷結果為否,於該步驟(d)之後係重新執行該步驟(a)。In order to achieve the above-mentioned purpose, a preferred embodiment of the present application is to provide a method for establishing a system restoration mechanism, which is suitable for a computer including a storage device and an operating system. The method for establishing a system restoration mechanism includes the steps: (a) Start the computer; (b) record all commands issued to the storage device within a time interval after the computer is started; (c) analyze the running times and timing of at least one specific command in all the commands, and generate an analysis result ; (d) judging whether the number of the analysis results is greater than or equal to a preset value; and (e) establishing a system restoration mechanism according to all the analysis results; wherein when the judgment result of the step (d) is yes, in the The step (e) is executed after the step (d), and when the judgment result of the step (d) is no, the step (a) is executed again after the step (d).

為達上述目的,本案之一較佳實施態樣為提供一種系統啟動與還原方法,適用於包括一儲存裝置及一作業系統之一電腦,包括步驟:(a)啟動該電腦;(b)記錄該電腦啟動後的一時間區間內之所有指令;(c)判斷是否存在一系統還原機制;(d)判斷該儲存裝置是否為該作業系統啟動之儲存裝置;(e)分析該所有指令中的至少一特定指令的運行次數及時序,並產生一分析結果;(f)判斷該分析結果的數量是否大於或等於一預設值;(g)根據所有的該分析結果建立一系統還原機制;(h)正常啟動該作業系統;(i)判斷是否執行一系統還原;以及(j)執行該系統還原;其中,當該步驟(c)之判斷結果為是,於該步驟(c)之後係執行該步驟(i),當該步驟(c)之判斷結果為否,於該步驟(c)之後係進行該步驟(d),當該步驟(d)之判斷結果為是,於該步驟(d)之後係執行該步驟(e),當該步驟(d)之判斷結果為否,於該步驟(d)之後係不進行任何步驟,當該步驟(f)之判斷結果為是,於該步驟(f)之後係執行該步驟(g),當該步驟(f)之判斷結果為否,於該步驟(f)之後係重新執行該步驟(a),該步驟(i)之判斷結果係根據該分析結果及該系統還原機制決定,當該步驟(i)之判斷結果為是,於該步驟(i)之後係執行該步驟(j),且當該步驟(i)之判斷結果為否,於該步驟(i)之後係執行該步驟(h)。。In order to achieve the above-mentioned purpose, a preferred embodiment of the present case is to provide a system startup and restoration method, applicable to a computer including a storage device and an operating system, including steps: (a) starting the computer; (b) recording All commands within a time interval after the computer is started; (c) determine whether there is a system restore mechanism; (d) determine whether the storage device is a storage device started by the operating system; (e) analyze all the commands in the (f) determining whether the number of the analysis results is greater than or equal to a preset value; (g) establishing a system restoration mechanism according to all the analysis results; ( h) start the operating system normally; (i) determine whether to perform a system restoration; and (j) perform the system restoration; wherein, when the judgment result of the step (c) is yes, the execution is performed after the step (c) In the step (i), when the judgment result of the step (c) is no, the step (d) is performed after the step (c). When the judgment result of the step (d) is yes, in the step (d) ) and then execute the step (e), when the judgment result of the step (d) is no, no step is performed after the step (d), when the judgment result of the step (f) is yes, in the step Step (g) is executed after (f), when the judgment result of step (f) is no, step (a) is executed again after step (f), and the judgment result of step (i) is based on The analysis result and the system restoration mechanism determine that when the judgment result of the step (i) is yes, the step (j) is executed after the step (i), and when the judgment result of the step (i) is no, The step (h) is performed after the step (i). .

體現本案特徵與優點的一些典型實施例將在後段的說明中詳細敘述。應理解的是本案能夠在不同的態樣上具有各種的變化,其皆不脫離本案的範圍,且其中的說明及圖示在本質上係當作說明之用,而非架構於限制本案。Some typical embodiments embodying the features and advantages of the present case will be described in detail in the description of the latter paragraph. It should be understood that this case can have various changes in different aspects, all of which do not depart from the scope of this case, and the descriptions and diagrams therein are essentially for illustrative purposes rather than limiting the present case.

請參閱第1圖,其係顯示本案一實施例之系統還原機制之建立方法之流程圖。如第1圖所示,本案一實施例之系統還原機制之建立方法係適用於包括儲存裝置及作業系統之電腦,其中儲存裝置係可為例如但不限於固態硬碟(Solid-State Drive, SSD)。系統還原機制之建立方法包括步驟如下。首先,如步驟S100所示,啟動電腦。其次,如步驟S200所示,記錄電腦啟動後的一時間區間內對儲存裝置發出之所有指令,其中時間區間為30秒、1分鐘、3分鐘或5分鐘,但不以此為限。接著,如步驟S300所示,分析所有指令中的至少一特定指令的運行次數及時序並產生分析結果。在步驟S300完成後,係如步驟S400所示,判斷分析結果的數量是否大於或等於預設值。應特別注意的是,當判斷分析結果的數量未大於或等於預設值,即判斷結果為否,於步驟S400之後係重新執行步驟S100,並執行後續步驟至步驟S400;而當斷分析結果的數量大於或等於預設值,即判斷結果為是,於步驟S400之後係執行步驟S500,即根據所有的分析結果建立系統還原機制。若以預設值等於10為例,本案系統還原機制之建立方法會持續記錄所有指令並分析,直到重新啟動電腦9次且產生10個分析結果之後,再根據該10個分析結果建立系統還原機制,但不以此為限。藉此,可以透過自動學習之方式建立專屬於電腦的自動系統還原機制,而無須另行安裝系統還原程式,同時可降低使用者進行備份或執行還原的勞力與時間,進而達到提高生產效率之功效。Please refer to FIG. 1 , which is a flowchart showing a method for establishing a system restoration mechanism according to an embodiment of the present application. As shown in FIG. 1, the method for establishing a system restoration mechanism in an embodiment of the present application is applicable to a computer including a storage device and an operating system, wherein the storage device may be, for example, but not limited to, a solid-state drive (SSD). ). The method for establishing a system restoration mechanism includes the following steps. First, as shown in step S100, the computer is started. Next, as shown in step S200, record all commands sent to the storage device within a time interval after the computer is started, wherein the time interval is 30 seconds, 1 minute, 3 minutes or 5 minutes, but not limited thereto. Next, as shown in step S300, the running times and timing of at least one specific instruction among all the instructions are analyzed, and an analysis result is generated. After step S300 is completed, as shown in step S400, it is determined whether the number of analysis results is greater than or equal to a preset value. It should be particularly noted that when it is determined that the number of analysis results is not greater than or equal to the preset value, that is, the determination result is no, step S100 is re-executed after step S400, and subsequent steps to step S400 are executed; If the number is greater than or equal to the preset value, that is, the determination result is yes, after step S400, step S500 is executed, that is, a system restoration mechanism is established according to all the analysis results. If the default value is equal to 10 as an example, the establishment method of the system restoration mechanism in this case will continue to record and analyze all commands until the computer is restarted 9 times and 10 analysis results are generated, and then the system restoration mechanism will be established according to the 10 analysis results. , but not limited to this. In this way, an automatic system restoration mechanism specific to the computer can be established by means of automatic learning, without the need to install a system restoration program separately, and at the same time, the labor and time of the user for backup or restoration can be reduced, thereby achieving the effect of improving production efficiency.

在一些實施例中,本案之系統還原機制之建立方法可包括判斷儲存裝置是否為系統碟的步驟。請參閱第2圖,其係顯示本案一實施例之系統還原機制之建立方法之流程圖。如第2圖所示,本案系統還原機制之建立方法在步驟S200及步驟S300之間可進一步包括步驟S250。步驟S250判斷儲存裝置是否為作業系統啟動之儲存裝置。當步驟S250之判斷結果為否,代表儲存裝置並非為系統碟,不涉及作業系統啟動,故在步驟S250之後不進行任何步驟,結束此系統還原機制之建立方法。當步驟S250之判斷結果為是,於步驟S250之後係執行步驟S300。In some embodiments, the method for establishing the system restoration mechanism of the present application may include the step of determining whether the storage device is a system disk. Please refer to FIG. 2 , which is a flowchart showing a method for establishing a system restoration mechanism according to an embodiment of the present application. As shown in FIG. 2 , the method for establishing the system restoration mechanism of the present application may further include step S250 between step S200 and step S300 . Step S250 determines whether the storage device is a storage device activated by the operating system. When the determination result of step S250 is no, it means that the storage device is not a system disk, and does not involve operating system startup. Therefore, no steps are performed after step S250, and the method for establishing the system restoration mechanism is ended. When the determination result of step S250 is yes, step S300 is executed after step S250.

根據本案之構想,時間區間可依照實際需求設定之,其可為任意長度的時間範圍,主要目的是在該時間範圍內記錄電源啟動至作業系統完整運行之間的所有指令並分析,但不以此為限。預設值較佳為1至50中的任意整數,但不以此為限。若欲提升分析的精準度,亦可設為大於50的任意整數。According to the conception of this case, the time interval can be set according to actual needs, and it can be a time range of any length. The main purpose is to record and analyze all instructions between the power-on and the complete operation of the operating system within this time range, but not to This is limited. The default value is preferably any integer from 1 to 50, but not limited thereto. To improve the accuracy of the analysis, it can also be set to any integer greater than 50.

在一些實施例中,本案系統還原機制之建立方法之步驟S100可由使用者實現或由步驟S400觸發。步驟S200可由儲存裝置之韌體實現,例如固態硬碟之韌體。步驟S250可由韌體實現。步驟S300可由韌體實現。步驟S400可由韌體實現。步驟S500可由韌體實現。系統還原機制可由韌體實現。故此,當系統在開機啟動的過程中發生了問題,儲存裝置之韌體便會觸發系統還原機制,電腦在下次開機時即能正常啟動系統,避免程式無法執行或重要資料的遺失,也省去將儲存裝置自電腦取出並重新安裝作業系統等繁瑣工作。In some embodiments, the step S100 of the method for establishing the system restoration mechanism of the present application can be implemented by the user or triggered by the step S400. Step S200 may be implemented by the firmware of the storage device, such as the firmware of the solid state hard disk. Step S250 may be implemented by firmware. Step S300 may be implemented by firmware. Step S400 may be implemented by firmware. Step S500 may be implemented by firmware. The system restore mechanism can be implemented by firmware. Therefore, when a problem occurs during the booting process of the system, the firmware of the storage device will trigger the system restoration mechanism, and the computer can start the system normally when the computer is turned on next time, avoiding program failure or loss of important data. The tedious work of removing the storage device from the computer and reinstalling the operating system.

請參閱第3圖,其係顯示本案一實施例之系統還原機制之流程示意圖。如第3圖所示,由本案系統還原機制之建立方法所建立的系統還原機制係包括以下步驟:如步驟S510所示,判斷特定指令的運行次數是否小於下限值或大於上限值。當步驟S510之判斷結果為是,即特定指令的運行次數小於下限值或大於上限值時,代表電腦之運作異常,在步驟S510之後係執行步驟S580,執行系統還原;反之,當步驟S510之判斷結果為否,即特定指令的運行次數未小於下限值且未大於上限值時,代表電腦之運作正常,在步驟S510之後係執行步驟S590,正常啟動作業系統。具體而言,下限值等於所有的分析結果中,特定指令的運行次數的最小值,減去運行次數的最大值與最小值的差值,即下限值=運行次數的最小值-(運行次數的最大值-運行次數的最小值)。上限值等於所有的分析結果中,特定指令的運行次數的最大值,加上運行次數的最大值與最小值的差值,即上限值=運行次數的最大值+(運行次數的最大值-運行次數的最小值)。Please refer to FIG. 3 , which is a schematic flowchart showing the system restoration mechanism of an embodiment of the present application. As shown in FIG. 3 , the system restoration mechanism established by the method for establishing the system restoration mechanism of the present application includes the following steps: as shown in step S510 , it is determined whether the number of executions of a specific instruction is less than the lower limit or greater than the upper limit. When the judgment result of step S510 is yes, that is, when the number of executions of the specific command is less than the lower limit value or greater than the upper limit value, it means that the computer is operating abnormally. After step S510, step S580 is executed to execute system restoration; otherwise, when step S510 If the judgment result is no, that is, when the number of executions of the specific command is not less than the lower limit value and not greater than the upper limit value, it means that the computer operates normally. After step S510, step S590 is executed to normally start the operating system. Specifically, the lower limit value is equal to the minimum value of the execution times of a specific instruction in all the analysis results, minus the difference between the maximum value and the minimum value of the execution times, that is, the lower limit value = the minimum value of the execution times - (running Maximum number of times - minimum number of runs). The upper limit value is equal to the maximum value of the number of executions of a specific instruction in all analysis results, plus the difference between the maximum value and the minimum value of the number of operations, that is, the upper limit value = the maximum value of the number of operations + (the maximum value of the number of operations) - minimum number of runs).

請參閱第4圖,其係顯示本案一實施例之系統還原機制之流程示意圖。如第4圖所示,由本案系統還原機制之建立方法所建立的系統還原機制係包括以下步驟:如步驟S520所示,判斷特定指令的運行時序是否不符合特定規律。當步驟S520之判斷結果為是,即特定指令的運行時序不符合特定規律時,代表電腦之運作異常,在步驟S520之後係執行步驟S580,執行系統還原;反之,當步驟S520之判斷結果為否,即特定指令的運行時序符合特定規律時,代表電腦之運作正常,在步驟S520之後係執行步驟S590,正常啟動作業系統。應特別注意的是,特定規律係由所有的分析結果歸納獲得,且特定指令的數量以三個為較佳,但不以此為限。換句話說,本案系統還原機制之建立方法可以從多次啟動電腦所記錄的指令中,對於多個特定指令,以3個特定指令為較佳,的發生順序進行統計與歸納,最終得出必然象徵電腦正常運作或正常開機的特定規律,以作為判斷是否進行系統還原之依據。Please refer to FIG. 4 , which is a schematic flowchart showing the system restoration mechanism of an embodiment of the present application. As shown in FIG. 4 , the system restoration mechanism established by the method for establishing the system restoration mechanism of the present application includes the following steps: as shown in step S520 , it is determined whether the running sequence of a specific command does not conform to a specific law. When the judgment result of step S520 is yes, that is, when the running sequence of the specific instruction does not conform to the specific law, it means that the computer is abnormally operating. After step S520, step S580 is executed to perform system restoration; otherwise, when the judgment result of step S520 is NO , that is, when the running sequence of the specific instruction conforms to the specific law, it means that the computer is operating normally, and after step S520, step S590 is executed to normally start the operating system. It should be noted that the specific law is obtained by summarizing all the analysis results, and the number of specific instructions is preferably three, but not limited thereto. In other words, the method for establishing the system restoration mechanism in this case can be based on the instructions recorded by starting the computer multiple times. For multiple specific instructions, preferably three specific instructions, the order of occurrence can be counted and summarized, and the final conclusion is inevitable. It symbolizes the specific law of normal operation or normal startup of the computer, which is used as the basis for judging whether to perform system restoration.

當然,根據本案之構想,本案亦可結合上述二種實施例,以進行更為保守的系統還原判斷。請參閱第5圖,其係顯示本案一實施例之系統還原機制之流程示意圖。如第5圖所示,由本案系統還原機制之建立方法所建立的系統還原機制係包括以下步驟:如步驟S530所示,判斷特定指令的運行次數是否小於下限值或大於上限值。當步驟S530之判斷結果為否,代表電腦運作正常,則於步驟S530之後係執行步驟S590,正常啟動作業系統;反之,當步驟S530之判斷結果為是,代表電腦運作可能異常,於步驟S530之後係執行步驟S540,進一步判斷特定指令的運行時序是否不符合一特定規律。當步驟S540之判斷結果為否,代表電腦運作正常,則於步驟S540之後係執行步驟S590,正常啟動作業系統;反之,當步驟S540之判斷結果為是,即兩步驟判斷皆指出電腦運作可能異常時,將電腦運作視為異常,於步驟S540之後係執行步驟S580,執行系統還原。Of course, according to the concept of this case, this case can also combine the above two embodiments to make a more conservative judgment on system restoration. Please refer to FIG. 5 , which is a schematic flowchart showing the system restoration mechanism of an embodiment of the present application. As shown in FIG. 5 , the system restoration mechanism established by the method for establishing the system restoration mechanism of the present application includes the following steps: as shown in step S530 , it is determined whether the running times of a specific command is less than the lower limit or greater than the upper limit. When the judgment result of step S530 is NO, it means that the computer is operating normally, then step S590 is executed after step S530 to start the operating system normally; on the contrary, when the judgment result of step S530 is YES, it means that the computer operation may be abnormal, after step S530 Step S540 is executed to further determine whether the running sequence of the specific instruction does not conform to a specific rule. When the judgment result of step S540 is NO, it means that the computer is operating normally, then step S590 is executed after step S540 to start the operating system normally; on the contrary, when the judgment result of step S540 is YES, both the judgments in the two steps indicate that the computer operation may be abnormal. When the operation of the computer is regarded as abnormal, step S580 is executed after step S540 to execute system restoration.

由上述的數個系統還原機制實施例可知,透過本案之系統還原機制,可有效偵測作業系統是否有正常被啟動,並在偵測到異常時自動還原至正常狀態,進而降低重要程式或資料毀損的風險。It can be seen from the above-mentioned embodiments of the system restoration mechanism that the system restoration mechanism of this case can effectively detect whether the operating system has been started normally, and automatically restore to the normal state when an abnormality is detected, thereby reducing important programs or data. risk of damage.

基於上述的系統還原機制之建立方法以及其建立之系統還原機制,本案另提出一種系統啟動與還原方法。請參閱第6圖,其係顯示本案一實施例之系統啟動與還原方法之流程圖。如第6圖所示,本案一實施例之系統啟動與還原方法包括步驟如下。首先,如步驟S1所示,啟動電腦。接著,如步驟S2所示,記錄電腦啟動後的一時間區間內之所有指令。然後,如步驟S3所示,判斷是否存在系統還原機制。當步驟S3之判斷結果為否,即不存在系統還原機制時,於步驟S3之後係進行步驟S4,判斷儲存裝置是否為作業系統啟動之儲存裝置。當步驟S4之判斷結果為否,即儲存裝置不是作業系統啟動之儲存裝置,於步驟S4之後係不進行任何步驟。當步驟S4之判斷結果為是,即儲存裝置為作業系統啟動之儲存裝置,於步驟S4之後係執行步驟S5及步驟S6,其中步驟S5為分析所有指令中的至少一特定指令的運行次數及時序並產生分析結果之步驟,且步驟S6為判斷分析結果的數量是否大於預設值之步驟。Based on the above-mentioned method for establishing a system restoration mechanism and the established system restoration mechanism, this case also proposes a system startup and restoration method. Please refer to FIG. 6 , which is a flowchart of a system startup and restoration method according to an embodiment of the present application. As shown in FIG. 6 , the system startup and restoration method according to an embodiment of the present application includes the following steps. First, as shown in step S1, the computer is started. Next, as shown in step S2, all commands within a time interval after the computer is started are recorded. Then, as shown in step S3, it is determined whether there is a system restoration mechanism. When the determination result of step S3 is no, that is, there is no system restoration mechanism, step S4 is performed after step S3 to determine whether the storage device is a storage device activated by the operating system. When the determination result of step S4 is no, that is, the storage device is not a storage device activated by the operating system, and no steps are performed after step S4. When the judgment result of step S4 is yes, that is, the storage device is a storage device activated by the operating system, after step S4, step S5 and step S6 are executed, wherein step S5 is to analyze the running times and timing of at least one specific command among all commands. and generating an analysis result, and step S6 is a step of judging whether the number of the analysis results is greater than a preset value.

當步驟S6之判斷結果為否,即分析結果的數量未大於預設值,於步驟S6之後係重新執行步驟S1至步驟S3;反之,當步驟S6之判斷結果為是,即分析結果的數量大於預設值,於步驟S6之後係執行步驟S7及步驟S8。在步驟S7中,係根據所有的分析結果建立系統還原機制。其次,在步驟S8中,係正常啟動作業系統。When the judgment result of step S6 is NO, that is, the number of analysis results is not greater than the preset value, step S1 to step S3 are re-executed after step S6; on the contrary, when the judgment result of step S6 is YES, that is, the number of analysis results is greater than By default, steps S7 and S8 are executed after step S6. In step S7, a system restoration mechanism is established according to all the analysis results. Next, in step S8, the operating system is normally started up.

另一方面,當步驟S3之判斷結果為是,即存在系統還原機制時,於步驟S3之後係執行步驟S9,判斷是否執行系統還原。應特別注意的是,在一些實施例中,步驟S9之判斷結果係根據分析結果及系統還原機制決定,但不以此為限。當步驟S9之判斷結果為是,即判斷應執行系統還原時,於步驟S9之後係執行步驟S10,即執行系統還原;反之,當步驟S9之判斷結果為否,即判斷無須執行系統還原時,於步驟S9之後係執行步驟S8,正常啟動作業系統。On the other hand, when the determination result of step S3 is yes, that is, there is a system restoration mechanism, step S9 is executed after step S3 to determine whether to perform system restoration. It should be particularly noted that, in some embodiments, the judgment result of step S9 is determined according to the analysis result and the system restoration mechanism, but it is not limited thereto. When the judgment result of step S9 is yes, that is, it is judged that system restoration should be executed, step S10 is executed after step S9, that is, system restoration is executed; After step S9, step S8 is executed to normally start the operating system.

綜上所述,本案提供一種系統還原機制之建立方法及系統啟動與還原方法,藉由記錄電腦啟動後一時間區間內之所有指令,並分析特定指令之運行次數及時序且產生分析結果,再根據分析結果建立系統還原機制,可以透過自動學習之方式建立專屬於電腦的自動系統還原機制,而無須另行安裝系統還原程式,同時可降低使用者進行備份或執行還原的勞力與時間,進而達到提高生產效率之功效。進一步地,透過本案之系統還原機制,可有效偵測作業系統是否有正常被啟動,並在偵測到異常時自動還原至正常狀態,進而降低重要程式或資料毀損的風險。易言之,當系統在開機啟動的過程中發生了問題,儲存裝置之韌體便會觸發系統還原機制,電腦在下次開機時即能正常啟動系統,避免程式無法執行或重要資料的遺失,也省去將儲存裝置自電腦取出並重新安裝作業系統等繁瑣工作。To sum up, this case provides a method for establishing a system restoration mechanism and a method for starting and restoring the system. By recording all the commands in a time interval after the computer is started, analyzing the running times and timing of a specific command, and generating the analysis results, According to the analysis results, a system restoration mechanism can be established, and an automatic system restoration mechanism dedicated to the computer can be established through automatic learning, without the need to install a system restoration program. The effect of production efficiency. Further, through the system restoration mechanism of this case, it can effectively detect whether the operating system is normally activated, and automatically restore to the normal state when an abnormality is detected, thereby reducing the risk of damage to important programs or data. In other words, when a problem occurs during the booting process of the system, the firmware of the storage device will trigger the system restore mechanism, and the computer will be able to start the system normally when the computer is turned on next time, avoiding program failure or loss of important data. Eliminate the tedious work of removing the storage device from the computer and reinstalling the operating system.

縱使本發明已由上述之實施例詳細敘述而可由熟悉本技藝之人士任施匠思而為諸般修飾,然皆不脫如附申請專利範圍所欲保護者。Even though the present invention has been described in detail by the above-mentioned embodiments, various modifications can be made by those skilled in the art, but they are all within the scope of the appended claims.

S100、S200、S300、S400、S500:步驟 S510、S520、S530、S540、S580、S590:步驟 S1、S2、S3、S4、S5、S6、S7、S8、S9、S10:步驟 S100, S200, S300, S400, S500: Steps S510, S520, S530, S540, S580, S590: Steps S1, S2, S3, S4, S5, S6, S7, S8, S9, S10: Steps

第1圖係顯示本案一實施例之系統還原機制之建立方法之流程圖。 第2圖係顯示本案一實施例之系統還原機制之建立方法之流程圖。 第3圖係顯示本案一實施例之系統還原機制之流程示意圖。 第4圖係顯示本案一實施例之系統還原機制之流程示意圖。 第5圖係顯示本案一實施例之系統還原機制之流程示意圖。 第6圖係顯示本案一實施例之系統啟動與還原方法之流程圖。 FIG. 1 is a flowchart showing a method for establishing a system restoration mechanism according to an embodiment of the present application. FIG. 2 is a flow chart showing a method for establishing a system restoration mechanism according to an embodiment of the present application. FIG. 3 is a schematic flowchart showing the system restoration mechanism of an embodiment of the present application. FIG. 4 is a schematic flowchart showing the system restoration mechanism of an embodiment of the present application. FIG. 5 is a schematic flowchart showing the system restoration mechanism of an embodiment of the present application. FIG. 6 is a flowchart showing a system startup and restoration method according to an embodiment of the present application.

S100、S200、S300、S400、S500:步驟S100, S200, S300, S400, S500: Steps

Claims (9)

一種系統還原機制之建立方法,適用於包括一儲存裝置及一作業系統之一電腦,該系統還原機制之建立方法包括步驟:(a)啟動該電腦;(b)記錄該電腦啟動後的一時間區間內對該儲存裝置發出之所有指令;(c)分析該所有指令中的至少一特定指令的運行次數及時序,並產生一分析結果;(d)判斷該分析結果的數量是否大於或等於一預設值;以及(e)根據所有的該分析結果建立一系統還原機制;其中該系統還原機制包括步驟:(f)判斷該特定指令的運行次數是否小於一下限值或大於一上限值;(g)執行一系統還原;以及(h)正常啟動該作業系統,其中當該步驟(d)之判斷結果為是,於該步驟(d)之後係執行該步驟(e),且當該步驟(d)之判斷結果為否,於該步驟(d)之後係重新執行該步驟(a),其中,當該步驟(f)之判斷結果為是,於該步驟(f)之後係執行該步驟(g),且當該步驟(f)之判斷結果為否,於該步驟(f)之後係執行該步驟(h),其中該下限值等於所有的該分析結果中,該特定指令的運行次數的最小值,減去運行次數的最大值與最小值的差值。 A method for establishing a system restoration mechanism, suitable for a computer including a storage device and an operating system, the establishment method for the system restoration mechanism includes the steps of: (a) starting the computer; (b) recording a time after the computer is started All instructions issued to the storage device within the interval; (c) analyze the running times and timing of at least one specific instruction in all the instructions, and generate an analysis result; (d) determine whether the number of the analysis results is greater than or equal to a and (e) establishing a system restoration mechanism according to all the analysis results; wherein the system restoration mechanism includes the steps of: (f) judging whether the running times of the specific instruction is less than a lower limit value or greater than an upper limit value; (g) performing a system restore; and (h) starting the operating system normally, wherein when the judgment result of the step (d) is yes, the step (e) is performed after the step (d), and when the step If the judgment result of (d) is no, the step (a) is re-executed after the step (d), wherein when the judgment result of the step (f) is yes, the step is executed after the step (f). (g), and when the judgment result of the step (f) is no, the step (h) is executed after the step (f), wherein the lower limit value is equal to all the analysis results, the operation of the specific command The minimum number of times, minus the difference between the maximum and minimum number of runs. 如請求項1所述之系統還原機制之建立方法,於該步驟(b)及該步驟(c)之間,更包括步驟:(b1)判斷該儲存裝置是否為該作業系統啟動之儲存裝置,其中當該步驟(b1)之判斷結果為是,於該步驟(b1)之後係執行該步驟(c),當該步驟(b1)之判斷結果為否,於該步驟(b1)之後不進行任何步驟。 The method for establishing a system restoration mechanism according to claim 1, between the step (b) and the step (c), further comprising the step of: (b1) judging whether the storage device is a storage device activated by the operating system, Wherein, when the judgment result of the step (b1) is yes, the step (c) is executed after the step (b1); step. 如請求項1所述之系統還原機制之建立方法,其中該上限值等於所有的該分析結果中,該特定指令的運行次數的最大值,加上運行次數的最大值與最小值的差值。 The method for establishing a system restoration mechanism according to claim 1, wherein the upper limit value is equal to the maximum value of the execution times of the specific instruction in all the analysis results, plus the difference between the maximum value and the minimum value of the execution times . 如請求項1所述之系統還原機制之建立方法,其中該系統還原機制包括步驟:(e1)判斷該特定指令的運行時序是否不符合一特定規律;(e2)執行該系統還原;以及(e3)正常啟動該作業系統;其中,當該步驟(e1)之判斷結果為是,於該步驟(e1)之後係執行該步驟(e2),且當該步驟(e1)之判斷結果為否,於該步驟(e1)之後係執行該步驟(e3)。 The method for establishing a system restoration mechanism according to claim 1, wherein the system restoration mechanism comprises the steps of: (e1) judging whether the running sequence of the specific instruction does not conform to a specific rule; (e2) executing the system restoration; and (e3) ) to start the operating system normally; wherein, when the judgment result of the step (e1) is yes, the step (e2) is executed after the step (e1), and when the judgment result of the step (e1) is no, the This step (e1) is followed by this step (e3). 如請求項4所述之系統還原機制之建立方法,其中該特定規律係由所有的該分析結果歸納獲得。 The method for establishing a system restoration mechanism according to claim 4, wherein the specific law is obtained by summarizing all the analysis results. 如請求項1所述之系統還原機制之建立方法,其中該系統還原機制包括步驟:(e1)判斷該特定指令的運行次數是否小於該下限值或大於該上限值;(e2)判斷該特定指令的運行時序是否不符合一特定規律;(e3)執行該系統還原;以及(e4)正常啟動該作業系統;其中,當該步驟(e1)之判斷結果為是,於該步驟(e1)之後係執行該步驟(e2),當該步驟(e1)之判斷結果為否,於該步驟(e1)之後係執行該步驟(e4),當該步驟(e2)之判斷結果為是,於該步驟(e2)之後係執行該步驟(e3),且當該步驟(e2)之判斷結果為否,於該步驟(e2)之後係執行該步驟(e4)。 The method for establishing a system restoration mechanism according to claim 1, wherein the system restoration mechanism comprises the steps of: (e1) judging whether the number of executions of the specific instruction is less than the lower limit or greater than the upper limit; (e2) judging the (e3) execute the system restoration; and (e4) start the operating system normally; wherein, when the judgment result of the step (e1) is yes, in the step (e1) Then execute the step (e2), when the judgment result of the step (e1) is no, execute the step (e4) after the step (e1), when the judgment result of the step (e2) is yes, in the The step (e3) is executed after the step (e2), and when the judgment result of the step (e2) is no, the step (e4) is executed after the step (e2). 如請求項1所述之系統還原機制之建立方法,其中該時間區間為30秒、1分鐘、3分鐘或5分鐘,且該預設值為1至50中的一任意整數。 The method for establishing a system restoration mechanism according to claim 1, wherein the time interval is 30 seconds, 1 minute, 3 minutes or 5 minutes, and the default value is an arbitrary integer from 1 to 50. 如請求項1所述之系統還原機制之建立方法,其中該步驟(a)係由一使用者實現或由該步驟(d)觸發,該步驟(b)係由該儲存裝置之一韌體實現,該步驟(c)係由該韌體實現,該步驟(d)係由該韌體實現,該步驟(e)係由該韌體實現,且該系統還原機制係由該韌體實現。 The method for establishing a system restoration mechanism as claimed in claim 1, wherein the step (a) is implemented by a user or triggered by the step (d), and the step (b) is implemented by a firmware of the storage device , the step (c) is realized by the firmware, the step (d) is realized by the firmware, the step (e) is realized by the firmware, and the system restoration mechanism is realized by the firmware. 一種系統啟動與還原方法,適用於包括一儲存裝置及一作業系統之一電腦,包括步驟:(a)啟動該電腦;(b)記錄該電腦啟動後的一時間區間內之所有指令;(c)判斷是否存在一系統還原機制;(d)判斷該儲存裝置是否為該作業系統啟動之儲存裝置;(e)分析該所有指令中的至少一特定指令的運行次數及時序,並產生一分析結果;(f)判斷該分析結果的數量是否大於或等於一預設值;(g)根據所有的該分析結果建立一系統還原機制;(h)正常啟動該作業系統;(i)判斷是否執行一系統還原;以及(j)執行該系統還原;其中該系統還原機制包括步驟:(g1)判斷該特定指令的運行次數是否小於一下限值或大於一上限值;(g2)執行該系統還原;以及(g3)正常啟動該作業系統,其中,當該步驟(c)之判斷結果為是,於該步驟(c)之後係執行該步驟(i),當該步驟(c)之判斷結果為否,於該步驟(c)之後係進行該步驟(d),當該步驟(d) 之判斷結果為是,於該步驟(d)之後係執行該步驟(e),當該步驟(d)之判斷結果為否,於該步驟(d)之後係不進行任何步驟,當該步驟(f)之判斷結果為是,於該步驟(f)之後係執行該步驟(g),當該步驟(f)之判斷結果為否,於該步驟(f)之後係重新執行該步驟(a),該步驟(i)之判斷結果係根據該分析結果及該系統還原機制決定,當該步驟(i)之判斷結果為是,於該步驟(i)之後係執行該步驟(j),且當該步驟(i)之判斷結果為否,於該步驟(i)之後係執行該步驟(h),其中,當該步驟(g1)之判斷結果為是,於該步驟(g1)之後係執行該步驟(g2),且當該步驟(g1)之判斷結果為否,於該步驟(g1)之後係執行該步驟(g3),其中該下限值等於所有的該分析結果中,該特定指令的運行次數的最小值,減去運行次數的最大值與最小值的差值。 A system startup and restoration method, applicable to a computer including a storage device and an operating system, comprising the steps of: (a) starting the computer; (b) recording all instructions within a time interval after the computer is started; (c) ) determine whether there is a system restore mechanism; (d) determine whether the storage device is a storage device activated by the operating system; (e) analyze the running times and timing of at least one specific instruction in all the instructions, and generate an analysis result ; (f) judging whether the number of the analysis results is greater than or equal to a preset value; (g) establishing a system restoration mechanism based on all the analysis results; (h) starting the operating system normally; (i) judging whether to execute a system restoration; and (j) executing the system restoration; wherein the system restoration mechanism comprises the steps of: (g1) judging whether the running times of the specific instruction is less than a lower limit value or greater than an upper limit value; (g2) executing the system restoration; and (g3) start the operating system normally, wherein, when the judgment result of the step (c) is yes, the step (i) is executed after the step (c), and when the judgment result of the step (c) is no , the step (d) is carried out after the step (c), when the step (d) The judgment result is yes, after the step (d), the step (e) is executed, when the judgment result of the step (d) is no, no step is performed after the step (d), when the step ( If the judgment result of f) is yes, after the step (f), execute the step (g); when the judgment result of the step (f) is no, execute the step (a) again after the step (f). , the judgment result of the step (i) is determined according to the analysis result and the system restoration mechanism, when the judgment result of the step (i) is yes, the step (j) is executed after the step (i), and when The judgment result of the step (i) is NO, and the step (h) is executed after the step (i), wherein, when the judgment result of the step (g1) is yes, the step (g1) is executed after the step (g1). Step (g2), and when the judgment result of the step (g1) is no, the step (g3) is executed after the step (g1), wherein the lower limit value is equal to all the analysis results, the specific instruction The minimum number of runs, minus the difference between the maximum and minimum runs.
TW109130365A 2020-09-04 2020-09-04 Building method of system restore mechanism and system booting and restoring method TWI760839B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109130365A TWI760839B (en) 2020-09-04 2020-09-04 Building method of system restore mechanism and system booting and restoring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109130365A TWI760839B (en) 2020-09-04 2020-09-04 Building method of system restore mechanism and system booting and restoring method

Publications (2)

Publication Number Publication Date
TW202211025A TW202211025A (en) 2022-03-16
TWI760839B true TWI760839B (en) 2022-04-11

Family

ID=81746851

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109130365A TWI760839B (en) 2020-09-04 2020-09-04 Building method of system restore mechanism and system booting and restoring method

Country Status (1)

Country Link
TW (1) TWI760839B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200907664A (en) * 2007-08-01 2009-02-16 Asustek Comp Inc Booting method and booting system
US20090144535A1 (en) * 2007-11-30 2009-06-04 Gigabyte Union Inc. Method for automatically restoring system configuration with a single key
US20170255526A1 (en) * 2010-03-02 2017-09-07 Storagecraft Technology Corporation Headstart restore of first volume to a second volume
TW201944239A (en) * 2018-04-12 2019-11-16 神雲科技股份有限公司 Server and method for restoring a baseboard management controller automatically

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200907664A (en) * 2007-08-01 2009-02-16 Asustek Comp Inc Booting method and booting system
US20090144535A1 (en) * 2007-11-30 2009-06-04 Gigabyte Union Inc. Method for automatically restoring system configuration with a single key
US20170255526A1 (en) * 2010-03-02 2017-09-07 Storagecraft Technology Corporation Headstart restore of first volume to a second volume
TW201944239A (en) * 2018-04-12 2019-11-16 神雲科技股份有限公司 Server and method for restoring a baseboard management controller automatically

Also Published As

Publication number Publication date
TW202211025A (en) 2022-03-16

Similar Documents

Publication Publication Date Title
US7386752B1 (en) Using asset dependencies to identify the recovery set and optionally automate and/or optimize the recovery
WO2018149396A1 (en) Service flow processing method and apparatus, readable storage medium and terminal device
CN111949368A (en) Application program control method and device
TWI760839B (en) Building method of system restore mechanism and system booting and restoring method
TW201635081A (en) Method for BIOS setting and computer booting thereof
CN111400153A (en) Serial port log starting method and device and computer readable storage medium
CN114217851A (en) System recovery mechanism establishing method and system starting and recovery method
TW201944244A (en) Computer system, updating method thereof and computer program product
CN111382009B (en) Automatic system maintenance method and computer equipment with automatic maintenance function
TWI351601B (en) Computer system and method for recording operating
US20160004607A1 (en) Information processing apparatus and information processing method
CN111427720A (en) Database repair method and device, computer equipment and storage medium
JP2001005693A (en) System and method for automatically restoring fault and recording medium recording automatic fault restoration program
JPH06124214A (en) Continuation control system for fault hot job
KR100964636B1 (en) System Controller and Operating Method of the Same
TWI707228B (en) Method for automatically maintaining system and computer thereof
TW201428485A (en) System and method for dealing with errors of programs
JPH0354638A (en) Instruction retrying processing system
CN113708981B (en) Method and system for repairing fault of cloud host system
CN110018928B (en) Firmware-based system backup and restore method
WO2021171430A1 (en) Duplexed operation system, duplexed operation method, and program
JP3263987B2 (en) Automatic IPL initial setting processing method
JP2812037B2 (en) Restart control method for business processing programs
JPH07295670A (en) Starting method for computer system
TWI400600B (en) Method for recovering system setting and computer system