One-click system restoration method, system, computer device and storage medium
By finding the restore volume tags and activating hidden partitions in the hard disk, the rapid restoration of the system is achieved, the cumbersome and professional problems in the existing technology are solved, and a simple and efficient system restoration solution is provided.
Patent Information
- Application Number
- CN202410080354.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-19
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-01-19
AI Technical Summary
The prior art is complicated and requires professional knowledge in the system restoration process, which is difficult to meet the simple and fast restoration needs of end users, especially when system performance deteriorates due to computer virus attacks or software garbage accumulation.
A one-click system restoration method is proposed. By finding the restore volume label in the hard disk partition entry, obtaining the index data table, and activating the hidden partition when the preset key signal is detected, the system restoration operation is performed, simplifying the restoration process.
It realizes the rapid and easy-to-operate restoration of the system, improves efficiency, reduces the demand for professional knowledge, and is suitable for end users.
Smart Images

Figure CN117931520B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of system restoration, and in particular to a one-click system restoration method, system, computer device and storage medium. Background Art
[0002] The operating system may be damaged due to computer virus attacks or improper user operations. In addition, under normal circumstances, the operating system will slow down as software garbage accumulates over time during long-term use. The existing technical solution is to reinstall the operating system through the optical drive, which requires related drivers and software. The operation process is relatively cumbersome and even requires certain system expertise and experience, which adds certain difficulties to the end user. Summary of the invention
[0003] In view of the above problems, the present application proposes a one-click system restoration method, system, computer device and storage medium.
[0004] The present application embodiment provides a one-click system restoration method, including:
[0005] Check whether the hard disk partition entry contains a recovery volume label;
[0006] When the partition entry contains the restoration label, an index data table is obtained based on the restoration label;
[0007] When a restoration signal triggered by a preset button is detected, the hidden partition in the hard disk is activated based on the index data table;
[0008] Perform system restore based on the activated hidden partition.
[0009] In some embodiments of the one-click system restoration method, the index data table includes an entry table and an index table; the step of obtaining the index data table based on the restoration volume label includes:
[0010] The index of the drive letter corresponding to the restored volume label in the master boot record table is saved in the index table to obtain the index table;
[0011] The index of the partition entry of the drive letter corresponding to the restored volume label is saved to the entry table to obtain the entry table.
[0012] In the one-click system restoration method in some embodiments, activating the hidden partition in the hard disk includes:
[0013] Setting each drive letter in the hard disk to an inactive value;
[0014] Setting the drive letter of the hidden partition to an activated state value based on the entry table;
[0015] Based on the index table, the startup priority of the drive letter corresponding to the restoration volume label is set to the highest level.
[0016] In some embodiments of the one-click system restoration method, before activating the hidden partition in the hard disk, the method further includes:
[0017] When a restore signal triggered by a preset key is detected, the master boot record table is read to check whether the master boot record table is valid;
[0018] When the master boot record table is valid, the step of activating the hidden partition in the hard disk is performed.
[0019] In some embodiments of the one-click system restoration method, the index data table includes an entry table, and further includes:
[0020] When the partition entry does not contain the restoration label, or the restoration signal triggered by the preset key is not obtained, the drive letter of the hidden partition is set to an inactive value based on the entry table;
[0021] Set the drive letter of the preset partition to the active value;
[0022] Based on the preset partition, the operating system is started normally.
[0023] In some embodiments of the one-click system restoration method, before searching whether the hard disk partition entry contains a restoration volume label, the method further includes:
[0024] Get and search the hard disk type parameters in the device type table;
[0025] Reading the master boot record table in the corresponding hard disk according to the hard disk type parameter;
[0026] The partition entry in the master boot record table is obtained.
[0027] In some embodiments of the one-click system restoration method, before searching whether the hard disk partition entry contains a restoration volume label, the method further includes:
[0028] Separating a hard disk partition of a preset storage space from the hard disk to obtain the hidden partition;
[0029] The volume label of the drive letter corresponding to the hidden partition is modified to the restoration volume label.
[0030] Another embodiment of the present application further provides a reduction system, comprising:
[0031] A search module is used to search whether the hard disk partition entry contains a recovery volume label;
[0032] A judgment module, configured to obtain an index data table based on the restoration label when finding that the partition entry contains the restoration label;
[0033] A detection module, configured to activate the hidden partition in the hard disk based on the index data table when a restoration signal triggered by a preset key is detected;
[0034] The restore module is used to perform system restore operations based on the activated hidden partition.
[0035] Another embodiment of the present application further proposes a computer device, including a storage unit and a processing unit, wherein the storage unit stores a computer program, and the processing unit executes the steps of the above-mentioned one-key system restoration method by calling the computer program stored in the storage unit.
[0036] Another embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps of the above-mentioned one-key system restoration method.
[0037] The embodiments of the present application have the following beneficial effects:
[0038] The embodiment of the present application proposes a one-click system restoration method, including: searching whether a hard disk partition entry contains a restoration label; when the partition entry contains the restoration label, obtaining an index data table based on the restoration label; when a restoration signal triggered by a preset key is detected, activating a hidden partition in the hard disk based on the index data table; and performing a system restoration operation based on the activated hidden partition. The present application directly restores the system with one click, which is easy to operate and highly efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present application and should not be regarded as limiting the scope of protection of the present application. In each of the drawings, similar components are numbered similarly.
[0040] Figure 1 A first flow chart of a one-click system restoration method in some embodiments of the present application is shown;
[0041] Figure 2 A second flow diagram of a one-click system restoration method in some embodiments of the present application is shown;
[0042] Figure 3 A third flow chart of the one-click system restoration method of some embodiments of the present application is shown;
[0043] Figure 4 A fourth flow chart of a one-click system restoration method according to some embodiments of the present application is shown;
[0044] Figure 5 A fifth flow chart of a one-click system restoration method according to some embodiments of the present application is shown;
[0045] Figure 6 A schematic structural diagram of a reduction system according to some embodiments of the present application is shown. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0047] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0048] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations of the foregoing items.
[0049] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0050] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. Terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.
[0051] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0052] Usually, after booting up, the user performs the restoration operation through related drivers and software, which is a rather cumbersome process.
[0053] Therefore, in order to solve the above problems, the present application proposes a one-click system restoration method.
[0054] Please refer to Figure 2 , is a flow chart of a one-key system restoration method proposed in an embodiment of the present application. Exemplarily, the one-key system restoration method is applied to a computer.
[0055] During the Basic Input / Output System (BIOS) startup process, a pre-set program is generally executed to enter the normal Windows operating system. In order to achieve a one-click system restore operation, this solution requires preparation before the BIOS startup, such as Figure 1 As shown below:
[0056] S110, a hard disk partition of a preset storage space is separated from the hard disk to obtain a hidden partition.
[0057] Specifically, the storage area in the hard disk is generally divided into several hard disk partitions. This solution separates a hard disk partition with preset storage space from the hard disk as a hidden partition. The self-startup file, partition restoration program, and backup system are stored in the hidden partition to prepare for the subsequent restoration of the operating system. The preset storage space can be 512MB, 20GB, 50GB, etc., which is not limited here and depends on the specific application scenario.
[0058] S120, modifying the volume label of the drive letter corresponding to the hidden partition to a recovery volume label.
[0059] Specifically, each partition corresponds to a drive letter and a volume label. The drive letter refers to the letter used to identify each device in the computer. In Windows system, the drive letter is usually used to identify the disk partition. Drive letters are usually assigned in alphabetical order. For example, the first available drive letter is C, followed by D, E, F, and so on. The drive letter is not the physical identifier of the device, but a logical identifier, which is dynamically assigned and managed by the operating system. Usually in Windows system, the operating system is installed on the C drive. The volume label refers to the name or label used to identify the disk partition. It can be a letter, number or string, which can be customized by the user or automatically generated by the operating system. Therefore, the drive letter and volume label of each partition correspond to the partition. In order to make it easier to find and use the hidden partition, the volume label of the hidden partition can be modified to the restore volume label.
[0060] In some embodiments, Figure 2As shown, the one-key system restoration method includes:
[0061] S210, searching whether the hard disk partition entry contains a recovery volume label.
[0062] Specifically, during the BIOS startup process, the hard disk partition entry is searched to see whether the current hard disk contains the above-mentioned hidden partition, and the hidden partition's restore volume label is used to find out whether it contains it. If it does, it means that the subsequent restore operation can be performed. If not, it means that the restore operation cannot be performed. Therefore, it is necessary to add a preset mark (such as Found) to facilitate the subsequent judgment of whether the restore operation can continue. When the hidden partition is found from the partition entry, T is used as the value of the preset mark Found. When the hidden partition is not found from the partition entry, F is used as the value of the preset mark Found.
[0063] In some embodiments of the one-click system restore method, such as Figure 3 As shown in the figure, before searching for the hard disk partition entry to see if it contains a recovery volume label, it also includes:
[0064] S130, obtaining and searching for hard disk type parameters in the device type table.
[0065] Specifically, the hard disk type parameter is searched in the device type table to find the hard disk among the numerous hardware.
[0066] S140, reading the master boot record table in the corresponding hard disk according to the hard disk type parameter.
[0067] S150, obtaining a partition entry in the master boot record table.
[0068] Specifically, after finding the hard disk, the Master Boot Record (MBR) is found from the hard disk. The MBR is a special boot sector stored in the first sector (usually the 0th sector) of the computer hard disk. The MBR contains the information required to start the computer, such as partition entries (partition table), boot programs, etc. When the computer is turned on, the BIOS will read the boot program in the MBR and hand over control to the boot program. The boot program then loads the operating system boot program according to the partition table information and finally starts the operating system.
[0069] S310, when the partition entry contains a restoration label, an index data table is obtained based on the restoration label.
[0070] Specifically, when the partition entry contains a restore volume label, in order to quickly find the hidden partition from all partitions of the hard disk later, it is necessary to record the address of the hidden partition to obtain an index data table.
[0071] In some embodiments of the one-click system restore method, such as Figure 4 As shown, the index data table includes an entry table and an index table; based on the restored volume label, the index data table is obtained, including:
[0072] S311, saving the index of the drive letter corresponding to the restored volume label in the master boot record table to the index table to obtain the index table.
[0073] Specifically, the address (index) of the drive letter corresponding to the restore volume label in the device type table is stored in the index table, so as to facilitate the subsequent rapid search for the hidden partition from the device type table and prepare for the subsequent restore operation.
[0074] S312, save the index of the partition entry of the drive letter corresponding to the restored volume label to the entry table to obtain the entry table.
[0075] Specifically, the address of the partition entry of the drive letter in the partition entry is stored in the entry table, so as to facilitate the subsequent finding of the entry of the hidden partition and quickly read it to prepare for the subsequent restoration operation.
[0076] S410: When a restoration signal triggered by a preset key is detected, a hidden partition in the hard disk is activated based on the index data table.
[0077] Specifically, in general, the hidden partition is in an inactive state. When the hidden partition is needed, its state will be activated. When the BIOS starts, the corresponding program will be executed based on the activated partition. Among them, the preset key can be any key on the keyboard, such as the F2 key, etc., which is not limited here.
[0078] In some embodiments of the one-click system restore method, such as Figure 5 As shown, activate the hidden partition in the hard disk, including:
[0079] S411, setting each drive letter in the hard disk to an inactive value.
[0080] Specifically, generally, when the BIOS is started, the system stored in the default activated partition is started. However, when a restore operation is required, the status of all other partitions needs to be changed to an inactive state, that is, the status value of the drive letter corresponding to each partition is set to an inactive value.
[0081] S412, setting the drive letter of the hidden partition to an activated value based on the entry table.
[0082] Specifically, after the drive letter of each partition is set to an inactive state, the state value of the drive letter of the hidden partition is set to an active state value to prepare for the restore operation.
[0083] Exemplarily, the entry table is used to set the drive letter to an active value, for example:
[0084] ((HD_PAR_STRUC*)(MbrBuffer+gRpEntryOfs))->bActive=0x80, where "gRpEntryOfs" is the entry table.
[0085] S413: Based on the index table, the startup priority of the drive letter corresponding to the restored volume label is set to the highest level.
[0086] Specifically, since during the startup phase, when the system needs to be restored, the hidden partition needs to be started first, the startup priority of the drive letter corresponding to the restoration volume needs to be set to the highest level.
[0087] Exemplarily, the level corresponding to the drive letter is set to the highest level using the index table, for example:
[0088] gRpBbsTable[gRpBbsIndex].BootPriority=0, where “gRpBbsIndex” is the index table.
[0089] In some embodiments, the one-click system restoration method further includes, before activating the hidden partition in the hard disk:
[0090] When a restore signal triggered by a preset key is detected, the master boot record table is read to check whether the master boot record table is valid.
[0091] Specifically, when a triggered restore signal is detected, the master boot record table is read to check whether it is valid.
[0092] Optionally, the first 512 bytes of the MBR store boot information, of which the first 446 bytes store boot information, the last 64 bytes store partition table information, and the last 2 bytes are end flags to indicate whether the MBR is valid. The last 2 bytes can be used to check whether the master boot record is valid, that is, to obtain valid value data in the boot record, and to determine whether the master boot record is valid based on the valid value data.
[0093] Optionally, after detecting the restoration signal and before reading the master boot record table, it is further determined whether the preparation work has been completed by detecting the value of the preset mark Found. When the preparation work has been completed, it is then checked whether the boot record table is valid.
[0094] When the master boot record table is valid, the step of activating the hidden partition in the hard disk is performed.
[0095] Specifically, when the master boot record table is valid, the hidden partition is activated based on the master boot record table.
[0096] S510, performing a system restoration operation based on the activated hidden partition.
[0097] Specifically, since the hidden partition includes the auto-start file, the partition restoration program and the backup system, the partition restoration program is executed according to the command in the auto-start file in the activated hidden partition to overwrite the current system with the backup system to complete the process of restoring the operating system. Among them, the backup system is the system to be restored and can be updated at any time.
[0098] In some embodiments of the one-click system restoration method, the index data table includes an entry table, and further includes:
[0099] When the partition entry does not contain a restore label, or the restore signal triggered by the preset button is not obtained, the drive letter of the hidden partition is set to an inactive value based on the entry table.
[0100] Specifically, when the partition entry does not contain a restore label, the drive letter of the hidden partition is set to an inactive value based on the entry table. Alternatively, when the restore signal triggered by the preset button is not obtained, the drive letter of the hidden partition is set to an inactive value based on the entry table. This is to avoid the system performing a restore operation based on the hidden partition or conflicting with other activated partitions. In addition, although hidden partitions are generally inactive, in order to ensure that nothing happens, the hidden partition is set to an inactive state again to ensure normal subsequent startup.
[0101] Set the drive letter of the preset partition to the active value. Based on the preset partition, start the operating system normally.
[0102] Specifically, the preset partition is a partition where the operating system currently entered by normal booting is stored. After the preset partition is activated, normal booting is performed according to the preset partition without performing a restore operation.
[0103] The embodiment of the present application proposes a one-click system restoration method, including: searching whether a hard disk partition entry contains a restoration label; when the partition entry contains a restoration label, obtaining an index data table based on the restoration label; when a restoration signal triggered by a preset key is detected, activating a hidden partition in the hard disk based on the index data table; and performing a system restoration operation based on the activated hidden partition. The present application directly restores the system with one click, which is easy to operate and highly efficient.
[0104] Another embodiment of the present application also provides a reduction system 600, such as Figure 6 As shown, the restoration system 600 includes:
[0105] The search module 610 is used to search whether the hard disk partition entry contains a recovery volume label.
[0106] The judgment module 620 is used to obtain the index data table based on the restoration label when the partition entry is found to contain the restoration label.
[0107] The detection module 630 is used to activate the hidden partition in the hard disk based on the index data table when a restoration signal triggered by a preset key is detected.
[0108] The restoration module 640 is used to perform a system restoration operation based on the activated hidden partition.
[0109] Another embodiment of the present application further proposes a computer device, including a storage unit and a processing unit, wherein the storage unit stores a computer program, and the processing unit executes the steps of the above-mentioned one-key system restoration method by calling the computer program stored in the storage unit.
[0110] Another embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded by a processor to execute the steps of the above-mentioned one-click system restoration method.
[0111] It can be understood that the method steps of this embodiment correspond to the one-click system restoration method in the above embodiment, wherein the options of the above one-click system restoration method are also applicable to this embodiment and will not be described repeatedly here.
[0112] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a part of the module, program segment or code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0113] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0114] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0115] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A one-click system restore method, It is characterized in that include: Check whether the hard disk partition entry contains a recovery volume label; When the partition entry contains the restoration label, an index data table is obtained based on the restoration label; When a restoration signal triggered by a preset button is detected, the hidden partition in the hard disk is activated based on the index data table; Perform system restore based on the activated hidden partition; The index data table includes an entry table and an index table; The index data table is obtained based on the restored volume label, including: The index of the drive letter corresponding to the restored volume label in the master boot record table is saved in the index table to obtain the index table; Saving the index of the partition entry of the drive letter corresponding to the restored volume label to the entry table to obtain the entry table; The activating the hidden partition in the hard disk includes: Setting each drive letter in the hard disk to an inactive value; Setting the drive letter of the hidden partition to an activated state value based on the entry table; Based on the index table, the startup priority of the drive letter corresponding to the restoration volume label is set to the highest level.
2. The one-key system restoration method according to claim 1, It is characterized in that Before activating the hidden partition in the hard disk, the method further includes: When a restore signal triggered by a preset key is detected, the master boot record table is read to check whether the master boot record table is valid; When the master boot record table is valid, the step of activating the hidden partition in the hard disk is performed.
3. The one-key system restoration method according to claim 1, It is characterized in that The index data table includes an entry table and also includes: When the partition entry does not contain the restoration label, or the restoration signal triggered by the preset key is not obtained, the drive letter of the hidden partition is set to an inactive value based on the entry table; Set the drive letter of the preset partition to the active value; Based on the preset partition, the operating system is started normally.
4. The one-key system restoration method according to claim 1, It is characterized in that Before searching whether the hard disk partition entry contains a recovery volume label, the method further includes: Get and search the hard disk type parameters in the device type table; Reading the master boot record table in the corresponding hard disk according to the hard disk type parameter; The partition entry in the master boot record table is obtained.
5. The one-key system restoration method according to claim 1, It is characterized in that Before searching whether the hard disk partition entry contains a recovery volume label, the method further includes: Separating a hard disk partition of a preset storage space from the hard disk to obtain the hidden partition; The volume label of the drive letter corresponding to the hidden partition is modified to the restoration volume label.
6. A reduction system, It is characterized in that include: A search module is used to search whether the hard disk partition entry contains a recovery volume label; A judgment module, configured to obtain an index data table based on the restoration label when finding that the partition entry contains the restoration label; A detection module, configured to activate the hidden partition in the hard disk based on the index data table when a restoration signal triggered by a preset key is detected; The restore module is used to perform system restore operations based on the activated hidden partition; The index data table includes an entry table and an index table; The index data table is obtained based on the restored volume label, including: The index of the drive letter corresponding to the restored volume label in the master boot record table is saved in the index table to obtain the index table; Saving the index of the partition entry of the drive letter corresponding to the restored volume label to the entry table to obtain the entry table; The activating the hidden partition in the hard disk includes: Setting each drive letter in the hard disk to an inactive value; Setting the drive letter of the hidden partition to an activated state value based on the entry table; Based on the index table, the startup priority of the drive letter corresponding to the restoration volume label is set to the highest level.
7. A computer device, It is characterized in that It comprises a storage unit and a processing unit, wherein the storage unit stores a computer program, and the processing unit executes the steps of the one-key system restoration method according to any one of claims 1 to 5 by calling the computer program stored in the storage unit.
8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps of the one-key system restoration method according to any one of claims 1 to 5.
