Method and system for establishing system restoration mechanism and method for starting and restoring system
By recording and analyzing computer startup commands, an automatic system restore mechanism is established, solving the problems of time-consuming and cumbersome system restore in existing technologies, achieving efficient automatic restore, and reducing the risk of data loss.
Patent Information
- Application Number
- CN202010922452.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-04
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2040-09-04
AI Technical Summary
Existing system restore methods may fail before users perform backups, making it impossible to access the system to perform a restore, which affects production efficiency, is time-consuming, and the installation of restore programs is cumbersome.
By recording all commands within a certain time interval after the computer starts up, analyzing the number of times and timing of specific commands, an automatic system restore mechanism is established, and the restore mechanism is triggered by the firmware, avoiding tedious operations.
It enables automatic restoration without the need to install additional programs, reducing the labor and time required for backup and restoration, improving productivity, and reducing the risk of losing important data.
Smart Images

Figure CN114217851B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to a mechanism establishment method, and more particularly to a method for establishing a system restoration mechanism based on automatic learning and a system startup and restoration method. Background Technology
[0002] One of the most feared situations for ordinary users when using a computer is the inability to boot up normally. Whether it is stuck on the BIOS screen, enters repair mode, or even displays a blue screen, it means that there is an error in the system startup process or that related startup files are missing. These situations may cause important programs or data inside to become unusable, and the intangible losses are incalculable.
[0003] To ensure the normal operation of computers, system restore programs have been widely used and developed to restore the operating system to a normal state in the event of computer malfunction. Current system restore methods involve installing an application on the operating system and allowing users to customize backup times. When users feel the system is unstable, they then perform a system restore to ensure that the operating system does not suddenly become corrupted or crash.
[0004] However, this method still has many drawbacks. In particular, the computer may have already malfunctioned before the user performs a system restore, leaving the user unable to access the operating system to perform the restore, thus impacting work or productivity and potentially causing significant losses. Furthermore, installing a system restore program and performing backups both take considerable time, reducing user productivity.
[0005] Therefore, how to develop a system restoration mechanism and system startup and restoration method that can effectively solve the problems and shortcomings of the aforementioned existing technologies is a problem that still needs to be solved. Summary of the Invention
[0006] The main purpose of this disclosure is to provide a method for establishing a system restore mechanism and a system startup and restore method, thereby solving and improving the problems and shortcomings of the aforementioned prior art.
[0007] Another objective of this disclosure is to provide a method for establishing a system restore mechanism and a system startup and restore method. By recording all instructions within a certain time interval after the computer starts up, analyzing the number of times and timing of specific instructions and generating analysis results, and then establishing a system restore mechanism based on the analysis results, an automatic system restore mechanism specific to the computer can be established through automatic learning without the need to install a separate system restore program. At the same time, it can reduce the labor and time of users to perform backups or restores, thereby achieving the technical effect of improving productivity.
[0008] Another objective of this disclosure is to provide a method for establishing a system restore mechanism and a system startup and restore method. Through the system restore mechanism of this disclosure, it is possible to effectively detect whether the operating system has been started normally, and automatically restore it to the normal state when an abnormality is detected, thereby reducing the risk of damage to important programs or data.
[0009] Another objective of this disclosure is to provide a method for establishing a system restore mechanism and a system startup and restore method. When a problem occurs during the system startup process, the firmware of the storage device will trigger the system restore mechanism, and the computer can start the system normally the next time it is turned on, avoiding the inability of programs to execute or the loss of important data, and also saving the tedious work of removing the storage device from the computer and reinstalling the operating system.
[0010] To achieve the above objectives, a preferred embodiment of this disclosure provides a method for establishing a system restore mechanism, applicable to a computer including a storage device and an operating system. The method for establishing the system restore mechanism includes the following steps: (a) starting the computer; (b) recording all instructions issued to the storage device within a time interval after the computer starts; (c) analyzing the execution count and timing of at least one specific instruction among all the instructions, and generating an analysis result; (d) determining whether the number of the analysis results is greater than or equal to a preset value; and (e) establishing a system restore mechanism based on all the analysis results; wherein when the determination result of step (d) is yes, step (e) is executed after step (d), and when the determination result of step (d) is no, step (a) is re-executed after step (d).
[0011] To achieve the above objectives, a preferred embodiment of this disclosure provides a system startup and restore 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 starts; (c) determining whether a system restore mechanism exists; (d) determining whether the storage device is the storage device used to start the operating system; (e) analyzing the execution count and timing of at least one specific instruction among all the instructions, and generating an analysis result; (f) determining whether the number of analysis results is greater than or equal to a preset value; (g) establishing a system restore mechanism based on all the analysis results; (h) starting the operating system normally; (i) determining whether to perform a system restore; and (j) performing the system restore; wherein, when the determination result of step (c) is yes, in step ( c) is followed by step (i). If the result of step (c) is negative, step (d) is performed after step (c). If the result of step (d) is positive, step (e) is performed after step (d). If the result of step (d) is negative, no steps are performed after step (d). If the result of step (f) is positive, step (g) is performed after step (f). If the result of step (f) is negative, step (a) is re-executed after step (f). The result of step (i) is determined based on the analysis result and the system's restoration mechanism. If the result of step (i) is positive, step (j) is performed after step (i). If the result of step (i) is negative, step (h) is performed after step (i). Attached Figure Description
[0012] Figure 1 This is a flowchart illustrating a method for establishing a system restore mechanism according to an embodiment of the present disclosure.
[0013] Figure 2 This is a flowchart illustrating a method for establishing a system restore mechanism according to an embodiment of the present disclosure.
[0014] Figure 3 This is a flowchart illustrating the system restore mechanism of an embodiment of the present disclosure.
[0015] Figure 4 This is a flowchart illustrating the system restore mechanism of an embodiment of the present disclosure.
[0016] Figure 5 This is a flowchart illustrating the system restore mechanism of an embodiment of the present disclosure.
[0017] Figure 6 This is a flowchart illustrating a system startup and restore method according to an embodiment of the present disclosure.
[0018] Explanation of reference numerals in the attached figures:
[0019] S100, S200, S300, S400, S500: Steps
[0020] S510, S520, S530, S540, S580, S590: Steps
[0021] S1, S2, S3, S4, S5, S6, S7, S8, S9, S10: Steps Detailed Implementation
[0022] Some typical embodiments embodying the features and advantages of this disclosure will be described in detail in the following description. It should be understood that this disclosure can be varied in different implementations without departing from the scope of this disclosure, and the descriptions and illustrations therein are for illustrative purposes only and not intended to limit this disclosure.
[0023] Please see Figure 1 This is a flowchart illustrating a method for establishing a system restore mechanism according to an embodiment of the present disclosure. Figure 1 As shown, the system restore mechanism establishment method of one embodiment of this disclosure 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 system restore mechanism establishment method includes the following steps. First, as shown in step S100, the computer is started. Second, as shown in step S200, all instructions issued to the storage device within a time interval after the computer starts are recorded, wherein the time interval is 30 seconds, 1 minute, 3 minutes, or 5 minutes, but is not limited thereto. Next, as shown in step S300, the execution count and timing of at least one specific instruction among all instructions are analyzed and analysis results are 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 the number of analysis results is not greater than or equal to the preset value (i.e., the judgment result is negative), step S100 is re-executed after step S400, and subsequent steps are executed up to step S400. Conversely, when the number of analysis results is greater than or equal to the preset value (i.e., the judgment result is positive), step S500 is executed after step S400, that is, a system restore mechanism is established based on all analysis results. Taking a preset value of 10 as an example, the system restore mechanism establishment method disclosed herein will continuously record and analyze all instructions until the computer is restarted 9 times and 10 analysis results are generated, and then a system restore mechanism is established based on these 10 analysis results, but this is not a limitation. Therefore, an automatic system restore mechanism specific to the computer can be established through automatic learning without the need to install a separate system restore program, thereby reducing the labor and time required for users to perform backups or restores, and thus achieving the technical effect of improving productivity.
[0024] In some embodiments, the method for establishing the system restore mechanism disclosed herein may include a step of determining whether the storage device is a system disk. See also... Figure 2 This is a flowchart illustrating a method for establishing a system restore mechanism according to an embodiment of the present disclosure. Figure 2 As shown, the method for establishing the system restore mechanism of this disclosure may further include step S250 between steps S200 and S300. Step S250 determines whether the storage device is a storage device used for operating system startup. If the determination result of step S250 is negative, 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 this system restore mechanism ends. If the determination result of step S250 is positive, step S300 is executed after step S250.
[0025] According to the concept of this disclosure, the time interval can be set according to actual needs, and it can be any length of time range. The main purpose is to record and analyze all instructions from power-on to the complete operation of the operating system within this time range, but it is not limited to this. The preset value is preferably any integer from 1 to 50, but it is not limited to this. If it is desired to improve the accuracy of the analysis, it can also be set to any integer greater than 50.
[0026] In some embodiments, step S100 of the system restore mechanism establishment method of this disclosure can be implemented by the user or triggered by step S400. Step S200 can be implemented by the firmware of the storage device, such as the firmware of a solid-state drive. Step S250 can be implemented by the firmware. Step S300 can be implemented by the firmware. Step S400 can be implemented by the firmware. Step S500 can be implemented by the firmware. The system restore mechanism can be implemented by the firmware. Therefore, when a problem occurs during the system boot process, the firmware of the storage device will trigger the system restore mechanism, and the computer can boot normally the next time it boots up, avoiding program execution failures or loss of important data, and saving the tedious work of removing the storage device from the computer and reinstalling the operating system.
[0027] Please see Figure 3 This is a flowchart illustrating the system restore mechanism of an embodiment of the present disclosure. Figure 3As shown, the system restore mechanism established by the method of this disclosure includes the following steps: As shown in step S510, it is determined whether the number of times a specific instruction is executed is less than the lower limit or greater than the upper limit. When the determination result of step S510 is yes, that is, the number of times a specific instruction is executed is less than the lower limit or greater than the upper limit, it indicates that the computer is running abnormally. After step S510, step S580 is executed to perform system restore; conversely, when the determination result of step S510 is no, that is, the number of times a specific instruction is executed is neither less than the lower limit nor greater than the upper limit, it indicates that the computer is running normally. After step S510, step S590 is executed to start the operating system normally. Specifically, the lower limit is equal to the minimum number of times a specific instruction is executed among all analysis results, minus the difference between the maximum and minimum number of times the execution count is performed, that is, lower limit = minimum number of times the execution count - (maximum number of times the execution count - minimum number of times the execution count). The upper limit is equal to the maximum number of times a specific instruction is executed among all the analysis results, plus the difference between the maximum and minimum number of executions. That is, the upper limit = maximum number of executions + (maximum number of executions - minimum number of executions).
[0028] Please see Figure 4 This is a flowchart illustrating the system restore mechanism of an embodiment of the present disclosure. Figure 4 As shown, the system restore mechanism established by the method of this disclosure includes the following steps: As shown in step S520, it is determined whether the execution sequence of a specific instruction does not conform to a specific pattern. When the determination result of step S520 is yes, that is, the execution sequence of the specific instruction does not conform to the specific pattern, it indicates that the computer is running abnormally. After step S520, step S580 is executed to perform system restore; conversely, when the determination result of step S520 is no, that is, the execution sequence of the specific instruction conforms to the specific pattern, it indicates that the computer is running normally. After step S520, step S590 is executed to start the operating system normally. It should be particularly noted that the specific pattern is obtained by summarizing all the analysis results, and the number of specific instructions is preferably three, but not limited to this. In other words, the method of establishing the system restore mechanism of this disclosure can statistically summarize the occurrence order of multiple specific instructions (preferably three specific instructions) from the instructions recorded by multiple computer startups, and finally derive a specific pattern that necessarily indicates that the computer is running normally or booting up normally, as the basis for determining whether to perform system restore.
[0029] Of course, based on the concept of this disclosure, this disclosure can also be combined with the above two embodiments to perform a more conservative system reconstruction judgment. Please refer to... Figure 5 This is a flowchart illustrating the system restore mechanism of an embodiment of the present disclosure. Figure 5As shown, the system restore mechanism established by the method of this disclosure includes the following steps: As shown in step S530, it is determined whether the number of times a specific instruction is executed is less than a lower limit or greater than an upper limit. If the result of step S530 is negative, it means the computer is running normally, and step S590 is executed after step S530 to start the operating system normally; otherwise, if the result of step S530 is positive, it means the computer may be running abnormally, and step S540 is executed after step S530 to further determine whether the execution sequence of the specific instruction does not conform to a specific rule. If the result of step S540 is negative, it means the computer is running normally, and step S590 is executed after step S540 to start the operating system normally; otherwise, if the result of step S540 is positive, that is, both steps indicate that the computer may be running abnormally, the computer is considered to be running abnormally, and step S580 is executed after step S540 to perform system restore.
[0030] As can be seen from the above-described system restore mechanism embodiments, the system restore mechanism disclosed herein can effectively detect whether the operating system has been started normally, and automatically restore it to a normal state when an anomaly is detected, thereby reducing the risk of damage to important programs or data.
[0031] Based on the aforementioned method for establishing a system restore mechanism and the system restore mechanism itself, this disclosure further proposes a system startup and restore method. Please refer to... Figure 6 This is a flowchart illustrating a system startup and restore method according to an embodiment of the present disclosure. Figure 6 As shown, a system startup and restore method according to an embodiment of this disclosure includes the following steps. First, as shown in step S1, the computer is started. Next, as shown in step S2, all instructions within a time interval after the computer starts are recorded. Then, as shown in step S3, it is determined whether a system restore mechanism exists. When the determination result of step S3 is negative, i.e., no system restore mechanism exists, step S4 is performed after step S3 to determine whether the storage device is the storage device for operating system startup. When the determination result of step S4 is negative, i.e., the storage device is not the storage device for operating system startup, no steps are performed after step S4. When the determination result of step S4 is positive, i.e., the storage device is the storage device for operating system startup, steps S5 and S6 are performed after step S4, wherein step S5 is a step of analyzing the execution count and timing of at least one specific instruction among all instructions and generating analysis results, and step S6 is a step of determining whether the number of analysis results is greater than a preset value.
[0032] If the result of step S6 is negative, meaning the number of analysis results is not greater than the preset value, steps S1 to S3 are re-executed after step S6. Conversely, if the result of step S6 is positive, meaning the number of analysis results is greater than the preset value, steps S7 and S8 are executed after step S6. In step S7, a system restoration mechanism is established based on all analysis results. Next, in step S8, the operating system is started normally.
[0033] On the other hand, if the judgment result of step S3 is yes, that is, if a system restore mechanism exists, then step S9 is executed after step S3 to determine whether to perform a system restore. It should be noted that in some embodiments, the judgment result of step S9 is determined based on the analysis results and the system restore mechanism, but this is not a limitation. If the judgment result of step S9 is yes, that is, if it is determined that a system restore should be performed, then step S10 is executed after step S9, that is, the system restore is performed; conversely, if the judgment result of step S9 is no, that is, if it is determined that a system restore is not required, then step S8 is executed after step S9, and the operating system starts normally.
[0034] In summary, this disclosure provides a method for establishing a system restore mechanism and a system startup and restore method. By recording all instructions within a certain time interval after computer startup, analyzing the execution frequency and timing of specific instructions, and generating analysis results, a system restore mechanism is established based on these results. This allows for the automatic learning of a computer-specific automatic system restore mechanism, eliminating the need for a separate system restore program. It also reduces the labor and time required for users to perform backups or restores, thereby improving productivity. Furthermore, the system restore mechanism of this disclosure can effectively detect whether the operating system has started normally and automatically restores it to a normal state when an anomaly is detected, thus reducing the risk of damage to important programs or data. In other words, when a problem occurs during system startup, the firmware of the storage device triggers the system restore mechanism, allowing the computer to start normally the next time it boots up, preventing program execution failures or loss of important data, and eliminating the tedious work of removing the storage device from the computer and reinstalling the operating system.
[0035] Although the present invention has been described in detail by the above embodiments, and various modifications can be made by those skilled in the art, all of which shall not depart from the protection sought by the appended claims.
Claims
1. A method for establishing a system restore mechanism for a computer having a storage device and an operating system, the method comprising the steps of: (a) starting the computer; (b) recording all commands issued to the storage device during a time interval after the computer is started; (c) analyzing a running frequency and a running time of at least one specific command among the all commands and generating an analysis result; (d) determining whether the analysis result is greater than or equal to a predetermined value; and (e) establishing a system restore mechanism based on all the analysis results; wherein the step (d) is followed by the step (e) when the determination result of the step (d) is yes, and the step (d) is followed by re-executing the step (a) when the determination result of the step (d) is no; wherein the system restore mechanism comprises the steps of: (f) determining whether the running frequency of the at least one specific command is less than a lower limit value or greater than an upper limit value; (g) executing a system restore; and (h) normally starting the operating system; wherein the step (f) is followed by the step (g) when the determination result of the step (f) is yes, and the step (f) is followed by the step (h) when the determination result of the step (f) is no; and wherein the lower limit value is equal to a minimum value of the running frequency of the at least one specific command among all the analysis results, minus a difference between a maximum value and the minimum value of the running frequency.
2. The method of claim 1, further comprising the step of (bl) determining whether the storage device is the storage device started by the operating system, wherein the step (bl) is followed by the step (c) when the determination result of the step (bl) is yes, and the step (bl) is not followed by any step when the determination result of the step (bl) is no.
3. The method of claim 1, wherein the upper limit value is equal to a maximum value of the running frequency of the at least one specific command among all the analysis results, plus the difference between the maximum value and the minimum value of the running frequency.
4. The method of claim 1, wherein another implementation of the system restore mechanism comprises the steps of: (el) determining whether a running time of the at least one specific command does not conform to a specific rule; (e2) executing a system restore; and (e3) normally starting the operating system; wherein the step (el) is followed by the step (e2) when the determination result of the step (el) is yes, and the step (el) is followed by the step (e3) when the determination result of the step (el) is no.
5. The method of claim 4, wherein the specific rule is induced from all the analysis results.
6. The method of claim 1, wherein another implementation of the system restore mechanism comprises the steps of: (el) determining whether the running frequency of the at least one specific command is less than a lower limit value or greater than an upper limit value; wherein (e2) determining whether the timing of the at least one specific instruction is not in accordance with a specific rule; (e3) performing a system restoration; (e4) normally starting the operating system; wherein, when the result of step (e1) is yes, step (e2) is performed after step (e1); when the result of step (e1) is no, step (e4) is performed after step (e1); when the result of step (e2) is yes, step (e3) is performed after step (e2); and when the result of step (e2) is no, step (e4) is performed after step (e2).
7. The method of claim 1, wherein the time interval is 30 seconds, 1 minute, 3 minutes or 5 minutes, and the preset value is any integer from 1 to 50.
8. The method of claim 1, wherein step (a) is performed by a user or triggered by step (d); step (b) is performed by a firmware of the storage device; step (c) is performed by the firmware; step (d) is performed by the firmware; step (e) is performed by the firmware; and the system restoration mechanism is performed by the firmware.
9. A method of starting and restoring a system, applicable to a computer comprising a storage device and an operating system, comprising steps of: (a) starting the computer; (b) recording all instructions within a time interval after the computer is started; (c) determining whether a system restoration mechanism exists; (d) determining whether the storage device is the storage device from which the operating system is started; (e) analyzing the number of times and the timing of at least one specific instruction from the all instructions, and generating an analysis result; (f) determining whether the number of the analysis result is greater than or equal to a preset value; (g) establishing a system restoration mechanism according to all the analysis results; (h) normally starting the operating system; (i) determining whether to perform a system restoration; and (j) performing the system restoration; wherein, when the result of step (c) is yes, step (i) is performed after step (c); when the result of step (c) is no, step (d) is performed after step (c); when the result of step (d) is yes, step (e) is performed after step (d); when the result of step (d) is no, no step is performed after step (d); when the result of step (f) is yes, step (g) is performed after step (f); when the result of step (f) is no, step (a) is re-performed after step (f); the result of step (i) is determined according to the analysis result and the system restoration mechanism; when the result of step (i) is yes, step (j) is performed after step (i); and when the result of step (i) is no, step (h) is performed after step (i); wherein the system restoration mechanism comprises steps of: (g1) judging whether the running times of the at least one specific instruction is less than a lower limit value or greater than an upper limit value; (g2) performing a system restoration; and (g3) normally starting the operating system; wherein when the result of the step (g1) is yes, the step (g2) is performed after the step (g1), and when the result of the step (g1) is no, the step (g3) is performed after the step (g1); and wherein the lower limit value is equal to the minimum value of the running times of the at least one specific instruction in all the analysis results, minus the difference between the maximum value and the minimum value of the running times.
Citation Information
Patent Citations
Method for restoring basic input / output system, terminal equipment and storage medium
CN111258817A