Data recovery method, storage medium and equipment
By monitoring disk data operations through file filtering drivers and interception programs, it is possible to restore only disk data without affecting the operation of other system processes. This solves the problems of high performance loss and low efficiency in existing technologies and improves the efficiency and flexibility of device restoration.
Patent Information
- Application Number
- CN202410577665.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-10
- Publication Date
- 2025-11-18
AI Technical Summary
Existing technologies require restoring the entire operating system during device restoration, resulting in high performance loss and low efficiency.
By combining a file filter driver with an interceptor program in the shutdown process, disk data operation behavior is monitored and recorded, and saved to a restoration information database. Disk data is then restored during the shutdown process, avoiding a complete restoration of the operating system.
It reduces the performance overhead on the operating system, improves data restoration efficiency, and enhances flexibility and memory utilization through selective restoration and merging processes.
Smart Images

Figure CN120973589A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a data restoration method, a storage medium and an equipment. BACKGROUND
[0002] With the continuous development of computer technology, nowadays users can use the functions in computer equipment such as computers and mobile phones to complete corresponding matters, for example, data storage, document modification, etc.
[0003] And because the long-term use of the equipment is easy to have redundant data, or the equipment is put into public areas for use as public equipment, so it is necessary to perform periodic data restoration operation on such equipment. The existing restoration process is realized by the system restoration of the operating system itself, that is, the entire system needs to be restored. SUMMARY
[0004] The embodiments of the present application provide a data restoration method, a storage medium and an equipment, which can realize the restoration operation of the equipment from the disk data level, reduce the performance loss of the operating system, and improve the restoration efficiency.
[0005] The first aspect of the embodiments of the present application provides a data restoration method, comprising: initializing a system restoration function, running a file filtering driver, and setting an interception program in a shutdown process; if an operation record for disk data is obtained based on the file filtering driver, and the system restoration function is in a working state, the operation record is saved to a restoration information database; if the interception program is detected to intercept the shutdown process, and the system restoration function is in the working state, the running application program is closed, and the operation record is read in the restoration information database; the disk data is restored based on the operation record, and the shutdown process is continued after the restoration.
[0006] Through the above technical solution, the system restoration function is realized by using the file filtering driver combined with the interception program in the shutdown process. The file filtering driver is used to monitor the operation behavior of the disk data, which does not affect the running of other processes in the system, and does not need to backup the entire disk data, reducing the performance loss of the operating system. At the same time, the operation of the disk data is monitored and recorded, and in the shutdown process, the disk data is restored based on the stored operation record, realizing the restoration process of the equipment from the disk data level, without the need to restore the entire operating system, improving the efficiency of data restoration.
[0007] In some possible implementation manners, in combination with the first aspect and the foregoing implementation manners, the step of saving the operation record into the restore information database includes: if the operation record for the disk data is acquired based on the file filter driver and the system restore function is in a working state, obtaining a data identifier of the disk data in the operation record; and if the data identifier does not exist in a set identifier, saving the operation record into the restore information database.
[0008] According to the technical solution, the operation record of the disk data corresponding to the data identifier that does not exist in the set identifier is saved into the restore information database, and the flexibility of data restoration is improved.
[0009] In some possible implementation manners, in combination with the first aspect and the foregoing implementation manners, the step of saving the operation record into the restore information database includes: obtaining a history record associated with the operation record in the restore information database based on a data identifier of the disk data; performing merging processing on the operation record and the history record based on a data execution sequence; and saving the operation record after the merging processing into the restore information database.
[0010] According to the technical solution, the associated operation records are merged and processed, and the operation record after the merging processing is saved in the restore information database, so that the data restoration efficiency is improved, and the memory occupancy rate is reduced.
[0011] In some possible implementation manners, in combination with the first aspect and the foregoing implementation manners, the step of performing the restore processing on the disk data based on the operation record and continuing to execute the shutdown process after the restore processing includes: performing the restore processing on the disk data based on the operation record; deleting the operation record in the restore information database after the restore processing; and if all the operation records in the restore information database are deleted, continuing to execute the shutdown process.
[0012] In some possible implementation manners, in combination with the first aspect and the foregoing implementation manners, before the step of performing the restore processing on the disk data based on the operation record, the method further includes: obtaining selected operation records in the restore information database; and if all the selected operation records in the restore information database are deleted, the step of continuing to execute the shutdown process includes: if all the selected operation records in the restore information database are deleted, continuing to execute the shutdown process.
[0013] According to the technical solution, the selected operation records are deleted, and the unselected operation records are saved in the restore information database, so that the flexibility of data restoration is further improved.
[0014] With reference to the first aspect and the above possible implementation, in a possible implementation, the step further includes: if the operation record for the disk data is acquired based on the file filter driver and the system restore function is in the closed state, stopping responding to the saving of the operation record.
[0015] With reference to the first aspect and the above possible implementation, in a possible implementation, the step further includes: if the intercepting program is detected to intercept the shutdown process and the system restore function is in the closed state, continuing to execute the shutdown process.
[0016] With reference to the first aspect and the above possible implementation, in a possible implementation, the step of setting the intercepting program in the shutdown process includes: acquiring a process identifier of the shutdown process, and setting the intercepting program in the shutdown process corresponding to the process identifier.
[0017] The second aspect of the embodiment of the present application provides a computer device, including a processor, a memory, an input and output interface;
[0018] The processor is connected with the memory and the input and output interface respectively, wherein the input and output interface is used for page interaction, the memory is used for storing program code, and the processor is used for calling the program code to execute the above method steps.
[0019] The third aspect of the embodiment of the present application provides a computer storage medium, the computer storage medium stores a computer program, the computer program includes program instructions, and the program instructions are executed by the processor to execute the above method steps. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0021] Figure 1 is a system architecture diagram of a data restore system provided by the embodiment of the present application;
[0022] Figure 2 is a flowchart of a data restore method provided by the embodiment of the present application;
[0023] Figure 3 is an on-off diagram of a data restore application provided by the embodiment of the present application;
[0024] Figure 4 is a flowchart of an intercepting program provided by the embodiment of the present application;
[0025] Figure 5 is a flow diagram of a data restoration method provided by an embodiment of the present application;
[0026] Figure 6 is an example diagram of merging processing of operation records provided by an embodiment of the present application;
[0027] Figure 7 is a display diagram of a restoration cleanup interface provided by an embodiment of the present application;
[0028] Figure 8 is a structural diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0029] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to 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 the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0030] Please refer to Figure 1 , a system structural diagram of data restoration provided by an embodiment of the present application is provided. As shown in Figure 1 , all local disk operations are intercepted by a file filter driver, when a user generates an operation on disk data, for example, creating a new file, modifying a file, etc., taking the file creation as an example, the local disk can notify the file filter driver that there is a file creation operation in the local disk, the file filter driver generates a corresponding operation record based on the file creation operation, and sends the operation record to a user layer restoration process, the user layer restoration process saves the operation record to a restoration information database, the user layer restoration process and the restoration information database are included in an application layer, when the restoration processing is performed, the user layer restoration process can perform the restoration processing according to the operation record saved by the restoration information database.
[0031] The data restoration method and the data restoration device provided by the embodiments of the present application can be applied to the application scenario of data restoration of an operating system, specifically, the restoration of disk data, the disk data being files, registries, and the data restoration device including but not limited to a computer device such as a personal computer, a notebook computer, a mobile phone, a wearable device, and the like, which is installed with an operating system, the local disk being a hardware disk installed on the data restoration device and capable of storing data for a long time, the file filtering driver being a driver mounted on the disk driver and capable of listening to operations on the disk data, the operations on the disk data being intercepted before reaching the disk, the application layer being a network interface through which a data restoration application provides services to a user, the user layer restoration process being an independent process in the application layer and used to record operations on the disk data and restoration processing, and the restoration information database being a local database or a cloud database in the application layer and used to store records of operations on the disk and access the records of operations on the disk.
[0032] The embodiments of the present application perform the listening of the operation behavior of the disk data by using the file filtering driver, do not affect the running of other processes in the system, and do not need to back up the entire disk data, thereby reducing the performance loss of the operating system, and meanwhile, the operations on the disk data are listened to and recorded, and in the shutdown process, the disk data is restored by using the stored operation records, the restoration process of the device is realized from the disk data layer, the entire operating system does not need to be restored, and the efficiency of the device restoration is improved.
[0033] Based on the system architecture of Figure 1 , the data restoration method provided by the embodiments of the present application will be described in detail below in combination with Figures 2-6 .
[0034] Please refer to Figure 2 , a flowchart of a data restoration method provided by the embodiments of the present application is provided. As shown in Figure 2 , the method of the embodiments of the present application can include the following steps S101-S104.
[0035] S101, initializing the system restoration function, running the file filtering driver, and setting an interception program in the shutdown process;
[0036] Specifically, the system restoration function is initialized, the file filtering driver is run, and the interception program in the shutdown process is set, that is, after the system restoration function is installed in the operating system, the file filtering driver and the interception program in the shutdown process are continuously run, the interception program can be specifically used to intercept the shutdown process of the operating system, that is, the shutdown permission of the operating system is obtained, the shutdown process is paused, and the subsequent restoration processing process is executed first.
[0037] It should be noted that the system restore function can be manifested as a desktop application or as a background process in the operating system. Taking the background process in the operating system as an example, please refer to Figure 3 The triggering operation for the system restore function can be a triggering operation of the user for the "system restore function" button detected in the display interface. When an odd number of triggering operations for the "system restore function" button are detected in the running process of the operating system, the system restore function is in a working state. When an even number of triggering operations for the "system restore function" button are detected in the running process of the operating system, the system restore function is in a closed state. The system restore function can be started without restarting the operating system, thereby reducing the operation complexity of device restoration.
[0038] Optionally, when the user uses a public device, only the administrator has the permission to manage the system restore function due to the characteristics of the public device. The administrator can set the system restore function to be started together with the start operation, add the start item of the system restore function to the start item of the operating system, and start the system restore function together with the operating system at each start. That is, the system restore function is in a continuous working state, so that the public device will be restored at each shutdown, and the operation of the disk data by the previous user does not affect the use of the next user. It should be noted that the user can choose to run as an administrator or obtain a password from the administrator to obtain the permission to manage the system restore function. When the user uses a personal device, the user has the permission to decide the start and close of the system restore function. When a triggering operation for the system restore function is detected, the system restore function is in a working state or a closed state.
[0039] In S102, if the operation record for the disk data is obtained based on the file filtering driver and the system restore function is in a working state, the operation record is saved to the restore information database.
[0040] Specifically, the file filtering driver can monitor the operation for the disk data. In the embodiment of the present application, the file filtering driver can listen to the operation for the disk data, generate an operation record for the disk data according to the operation, and save the operation record to the restore information database when it is detected that the system restore function is in a working state. Compared with the traditional disk backup and restoration, the disk backup has a certain loss to the system performance, while the file filtering driver has almost no performance loss to the system. The operation record for the disk data can be the creation, copying, deletion, moving, etc. of the file or the registry. The restore information database is used to store the operation record listened to by the file filtering driver, and can be a cloud database or a local database.
[0041] It can be understood that when the restoration information database is a local database, the restoration information database is stored in a local disk, and a set of setting identifiers can be set for the local disk, the set of setting identifiers is used to record the setting data identifiers of the local disk, the data identifiers are unique identifiers for identifying disk data such as names, codes, and storage paths, and the setting data identifiers can be data identifiers of disk data in the local disk that do not need to be restored, the disk data can include files, folders, and registries. Therefore, the restoration information database is also recorded in the set of setting identifiers as disk data that does not need to be restored.
[0042] In S103, if it is detected that the interception program intercepts the shutdown process and the system restoration function is in the working state, the running application is closed, and the operation record in the restoration information database is read.
[0043] Specifically, if it is detected that the interception program intercepts the shutdown process, that is, the system starts the shutdown process, and if it is detected that the system restoration function is in the working state, the running application is closed, and the operation record in the restoration information database is read. After intercepting the shutdown process, the running application can be closed. It can be understood that the running application can be an application that is still in a running state in the operating system after detecting the shutdown operation, and the operation record in the restoration information database can be read. It should be noted that closing the running application and reading the operation record can be performed simultaneously or according to the actual execution order.
[0044] Optionally, referring to Figure 4 Taking the Windows operating system as an example, the interception program can include a Hook program code with a hook function. By obtaining the process identifier in the shutdown process, that is, the PID of the Winlogon process, the Hook program code file is injected into the Winlogon process. After successful injection, the Hook ExitWindowsEx function in the Hook program code file can intercept the shutdown process. After successful interception, the currently running application is closed, and the operation record in the restoration information database is read.
[0045] In S104, the disk data is restored based on the operation record, and the shutdown operation is performed after the restoration.
[0046] Specifically, the operation records stored in the reduction information database can be one or more, and the operation records can be stored in time sequence of the operations on the disk data. During the reduction process, the disk data can be restored according to the operations recorded in the operation records in time sequence. When the disk data is restored according to all the operation records in the reduction information database, the shutdown operation is continued. It can be understood that when the interception program intercepts the shutdown process, the interception program obtains the shutdown permission from the operating system, so that after the reduction process, the interception program can transfer the shutdown permission to the operating system, and the operating system continues to execute the shutdown process until the device is shut down.
[0047] The embodiment of the present application adopts a file filter driver to combine with the interception program in the shutdown process to realize the system reduction function. The file filter driver is used to monitor the operation behavior of the disk data, which does not affect the running of other processes in the system, and does not need to backup the entire disk data, thereby reducing the performance loss of the operating system. Meanwhile, the operation of the disk data is monitored and recorded, and the disk data is restored during the shutdown process by using the stored operation records, so that the reduction process of the device is realized from the disk data layer, and the entire operating system does not need to be restored, thereby improving the efficiency of data reduction.
[0048] Please refer to Figure 5 A flowchart of a data reduction method is provided for the embodiment of the present application. As shown in Figure 5 The method of the embodiment of the present application can include the following steps S201-S208.
[0049] S201, initializing the system reduction function, running the file filter driver, and obtaining the process identifier of the shutdown process, and setting the interception program in the shutdown process corresponding to the process identifier;
[0050] Specifically, after the system reduction function is installed in the operating system, the file filter driver and the interception program in the shutdown process are always in working state. The interception program can be used to intercept the shutdown process of the operating system, that is, to obtain the shutdown permission from the operating system and pause the shutdown process.
[0051] The file filtering driver can monitor operations on disk data, and in the embodiment of the application, the file filtering driver can be used to monitor operations on disk data, and operation records on disk data can be generated according to the operations. Compared with the traditional disk backup and restoration, disk backup can have certain loss of system performance, and file filtering has little performance loss to the system. The operation records on disk data can be operations such as creation, copying, deletion, and moving on files or registries. The interception program can be used to intercept the shutdown process of the operating system, that is, to obtain the shutdown permission of the operating system, pause the shutdown process, and execute the subsequent restoration process. After intercepting the shutdown process, the running application can be closed. It can be understood that the running application can be an application that is still in a running state in the operating system after detecting the shutdown operation, and the operation records in the restoration information database can be read. It should be noted that closing the running application and reading the operation records can be performed simultaneously or according to the actual execution order.
[0052] Optionally, please refer to Figure 4 Taking the Windows operating system as an example, the interception program can include a Hook program code with a hook function. The Hook program code can be injected into the Winlogon process by obtaining the process identifier in the shutdown process, that is, the PID of the Winlogon process. After successful injection, the Hook ExitWindowsEx function in the Hook program code file can intercept the shutdown process. After successful interception, the currently running application is closed, and the operation records in the restoration information database are read. The restoration information database is used to store the operation records monitored by the file filtering driver, and can be a cloud database or a local database.
[0053] It should be noted that the system restoration function can be a desktop application or a background process in the operating system. Taking the background process in the operating system as an example, please refer to Figure 3 The triggering operation of the system restoration function can be a triggering operation of the “system restoration function” button detected by the user in the display interface. When an odd number of triggering operations of the “system restoration function” button are detected in the running process of the operating system, the system restoration function is in a working state. When an even number of triggering operations of the “system restoration function” button are detected in the running process of the operating system, the system restoration function is in a closed state. The system restoration function can be started without restarting the operating system, which reduces the operation complexity of device restoration.
[0054] Optionally, when the user uses a public device, only the administrator has the right to manage the system restore function due to the characteristics of the public device. The administrator can set the system restore function to start with the boot operation, add the start item of the system restore function to the start item of the operating system, and enable the system restore function to start with the operating system every time the computer is booted, i.e., the system restore function is in a continuous working state, so that the public device performs the restore processing every time it is shut down, and the operation of the disk data by the previous user does not affect the use of the next user. It should be noted that the user can choose to run as an administrator or obtain a password from the administrator to obtain the right to manage the system restore function. When the user uses a personal device, the user has the right to decide whether to start or stop the system restore function. When a trigger operation for the system restore function is detected, the system restore function is in a working state or a stopped state.
[0055] S202, if the operation record for the disk data is obtained based on the file filter driver and the system restore function is in a working state, obtaining the data identifier of the disk data in the operation record;
[0056] Specifically, when the device used by the user is installed with the system restore function, the file filter driver starts running from the boot, listens to all operations on the disk data from the boot, generates an operation record for the disk data according to the operation, and obtains the data identifier of the disk data in the operation record when the system restore function is in a working state. The data identifier is a unique identifier for identifying the disk data, such as the name, code, and storage path. The disk data can include files, folders, and registries.
[0057] In a feasible implementation, if the operation record for the disk data is obtained based on the file filter driver and the system restore function is in a stopped state, the saving of the operation record is stopped.
[0058] S203, if the data identifier does not exist in the set identifier set, obtaining the historical record associated with the operation record in the restore information database based on the data identifier of the disk data;
[0059] Specifically, the restore information database is used to store the operation record listened to by the file filter driver, and can be a cloud database or a local database. It can be understood that when the restore information database is a local database, the restore information database is stored in the local disk, and the set identifier set can be set for the local disk. The set identifier set is used to record the set data identifier set in the local disk in advance. The set data identifier can be the data identifier of the disk data that does not need to be restored in the local disk.
[0060] Specifically, if the data identifier does not exist in the set identifier, the disk data corresponding to the data identifier can be restored. Based on the data identifier of the disk data, the history record associated with the operation record is obtained in the restore information database. The history record is the history operation record associated with the operation record that has been saved to the restore information database before the operation record. For example, if the data identifier of the A folder exists in the set identifier, the user creates A1 file in the A folder, and generates operation record a: create A1 file in the A folder. The a operation record is not saved to the restore information database. If the data identifier of the B folder does not exist in the set identifier, the user creates B1 file in the B folder, and generates operation record b: create B1 file in the B folder. The b operation record is saved to the restore information database, and the B folder can be restored according to the b operation record, that is, B1 file can be deleted from the B folder.
[0061] S204, merging the operation record and the history record based on the data execution order, and saving the merged operation record to the restore information database;
[0062] Specifically, the operation record stored in the restore information database can be one or more. The operation record can be stored in the order of the time of the operation on the disk data. The operation record can be merged and stored according to different operation records of the same disk data. The different operation records can be merged into one operation record according to the data execution order in the different operation records, and the history record can be deleted from the restore information database. The merged operation record can be saved to the restore information database in the order of time. The data execution order can represent the operation logic of the operation on the disk data. The operation logic can be used to represent the operation process performed based on the operation on the disk data.
[0063] For example, referring to Figure 6 , the user creates C1 file in the C folder, and saves operation record c: create C1 file in the C folder in the restore information database. C1 file is moved to the D folder, and generates operation record d: move C1 file from the C folder to the D folder. The operation records c and d are merged to obtain operation record d1: create C1 file in the D folder. The operation record c is deleted from the restore information database, and the operation record d1 is saved to the restore information database in the order of time.
[0064] S205, if it is detected that the intercept program intercepts the shutdown process, and the system restore function is in the working state, the running application is closed, and the operation record is read in the restore information database;
[0065] Specifically, in the device installed with the system restore function, the intercept program set in the shutdown process is always in working state. If the intercept program is detected to intercept the shutdown process, i.e. the system starts the shutdown process, if the system restore function is detected to be in working state, the running application is closed, and the operation record is read in the restore information database. After intercepting the shutdown process, the running application can be closed. It can be understood that the running application can be the application still in running state in the operating system after detecting the shutdown operation, and the operation record in the restore information database can be read.
[0066] It should be noted that the running application can be closed and the operation record can be read at the same time, or can be executed according to the actual execution order. The two execution orders will display the restore cleaning interface. The restore cleaning interface is used to display the read operation record and provide the user with the selective restore option for the operation record.
[0067] Please refer to Figure 7 The restore cleaning interface contains the operation record read in the restore information database. The user can one-click all selection, restore all operation records, or select the operation record on the restore cleaning interface for restore. The unselected operation record can be retained. The restore cleaning interface has a restore progress bar below, which can monitor the restore progress in real time.
[0068] In a feasible implementation, if the operation record for the disk data is obtained based on the file filter driver, and the system restore function is in the closed state, the response to the saving of the operation record is stopped, i.e. there is no operation record in the restore information database. If the system restore function is started before the shutdown process, when the intercept program is detected to intercept the shutdown process, the system restore function is in working state, the running application is closed, and the operation record is read in the restore information database. Since the operation record is not saved in the restore information database, the operation record cannot be read in the restore information database, and the shutdown process is continued, i.e. the shutdown permission is transferred to the operating system.
[0069] In one possible implementation, if the operation record for the disk data is obtained based on the file filter driver and the system restore function is in the working state, the operation record is saved into the restore information database. If the next operation record is saved and it is detected that the system restore function is in the off state, the existing operation record in the restore information database and the operation record to be saved can be output and displayed for the user to select to retain or delete. For example, the option of "whether to continue to save this operation record" can be popped up for the user to select. Alternatively, when it is detected that the intercept program intercepts the shutdown process, the existing operation record in the restore information database can be output and displayed to enable the user to decide whether to delete the operation record already saved in the restore information database. Further, before the shutdown process, if it is detected that the system restore function is in the working state, the operation record can be continuously saved into the restore information database. When it is detected that the intercept program intercepts the shutdown process and it is detected that the system restore function is in the working state, the running application is closed, and the saved operation record in the restore information database is read.
[0070] In S206, the operation record selected in the restore information database is obtained, and the disk data is restored based on the operation record.
[0071] Specifically, in the restore process, the disk data can be restored according to the time sequence of the operation record and the operation recorded in the operation record. After the disk data is restored according to all the operation records in the restore information database, the shutdown operation is continued. It can be understood that, since the intercept program intercepts the shutdown process and obtains the shutdown permission from the operating system when the shutdown operation is detected, the intercept program can transfer the shutdown permission to the operating system again after the restore process, and the operating system continues to execute the shutdown process until the device is completely shut down.
[0072] It can be understood that, when the user does not select the operation record in the restore information database, full-amount restore can be performed based on all the operation records in the restore information database. When the user selects part of the operation records in the restore information database, selective restore can be performed only on the selected operation records.
[0073] Specifically, when the user uses the public device, the administrator has the right of selective restoration, and the user can only restore all operation records in the restoration information database; when the administrator grants the user the right of selective restoration, or when the user uses the personal device, the user has the right of selective restoration, and can select operation records to be restored on the restoration cleanup interface, and the unselected operation records can be retained; the disk data is restored based on the operation records selected by the user on the restoration cleanup interface, and the flexibility of data restoration is improved. It should be noted that the user can select to run as an administrator or obtain a password from the administrator, and then obtain the right of selective restoration.
[0074] S207, after the restoration processing, the selected operation records are deleted from the restoration information database;
[0075] Specifically, in the process of restoration processing, each operation record can be deleted after being restored, or all operation records can be deleted after being restored. For the selective restoration mode, the unselected operation records can be deleted after the selected operation records are restored, or can be retained in the restoration information database until being executed for restoration processing or being selected for deletion by the user. The specific mode can be set according to the actual execution situation.
[0076] S208, if all the selected operation records in the restoration information database are deleted, the shutdown process is continued.
[0077] Specifically, if all the selected operation records in the restoration information database are deleted, the shutdown right is transferred to the operating system by the interception program, and the operating system continues to execute the shutdown process until the device is shut down.
[0078] The system restoration function is realized by using a file filter driver and an intercepting program in a shutdown process. The file filter driver is used to monitor the operation of the disk data, and does not affect the running of other processes in the system, and does not need to back up the entire disk data, thereby reducing the performance loss of the operating system. Meanwhile, the operation of the disk data is monitored and recorded, and the disk data is restored by using the stored operation record in the shutdown process, so that the restoration process of the device is realized from the disk data layer, and the entire operating system does not need to be restored, thereby improving the data restoration efficiency. The system restoration function can be started and stopped by triggering operation, and does not need to restart the system to take effect, thereby reducing the operation complexity of the device restoration. When the operation record is saved, the operation record of the disk data corresponding to the data identifier which does not exist in the set identifier set is saved into the restoration information database, thereby improving the flexibility of data processing, saving the operation record after merging processing, further improving the data restoration efficiency, and reducing the memory occupancy. Before the restoration processing is performed, the operation record can be selectively restored, thereby further improving the flexibility of data restoration.
[0079] See Figure 8 A structural schematic diagram of a computer device is provided for the embodiment of the application. As shown in Figure 8 The computer device 1000 can include at least one processor 1001 such as a CPU, at least one network interface 1004, an input / output interface 1003, a memory 1005, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the components. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 1005 can be a high-speed RAM memory, or a non-volatile memory such as at least one disk storage. The memory 1005 can also be at least one storage device located away from the aforementioned processor 1001. As shown in Figure 8 The memory 1005 as a computer storage medium can include an operating system, a network communication module, an input / output interface module, and a connection establishment application.
[0080] In one embodiment, the processor 1001 can be used to call the connection establishment application stored in the memory 1005, and specifically perform the following operations:
[0081] Initialize the system restoration function, run the file filter driver, and set the intercepting program in the shutdown process;
[0082] If the operation record of the disk data is acquired based on the file filter driver and the system restoration function is in the working state, the operation record is saved into the restoration information database;
[0083] If the interception program is detected to intercept the shutdown process and the system restoration function is in the working state, the running application is closed, and the operation record is read from the restoration information database;
[0084] The disk data is restored based on the operation record, and the shutdown process is continued after the restoration.
[0085] Optionally, when the processor 1001 executes If the operation record of the disk data is acquired based on the file filter driver and the system restoration function is in the working state, the operation record is saved into the restoration information database, the following operations are specifically performed:
[0086] If the operation record of the disk data is acquired based on the file filter driver and the system restoration function is in the working state, the data identifier of the disk data is acquired in the operation record;
[0087] If the data identifier does not exist in the set identifier set, the operation record is saved into the restoration information database.
[0088] Optionally, when the processor 1001 executes the operation record is saved into the restoration information database, the following operations are specifically performed:
[0089] Based on the data identifier of the disk data, the historical record associated with the operation record is acquired in the restoration information database;
[0090] The operation record and the historical record are merged based on the data execution order;
[0091] The merged operation record is saved into the restoration information database.
[0092] Optionally, when the processor 1001 executes the operation record is saved into the restoration information database, the following operations are specifically performed:
[0093] The disk data is restored based on the operation record;
[0094] After the restoration, the operation record is deleted in the restoration information database;
[0095] If all the operation records in the restoration information database are deleted, the shutdown process is continued.
[0096] Optionally, before the processor 1001 executes the operation record is saved into the restoration information database, the following operations are further performed:
[0097] obtaining the selected operation record in the restore information database.
[0098] Optionally, the processor 1001 further executes the following operation:
[0099] If all the selected operation records in the restore information database are deleted, the shutdown process is continued.
[0100] Optionally, the processor 1001 further executes the following operation:
[0101] If the operation record for the disk data is obtained based on the file filter driver, and the system restore function is in the closed state, the saving of the operation record is stopped.
[0102] Optionally, the processor 1001 further executes the following operation:
[0103] If it is detected that the shutdown process is intercepted by the interceptor, and the system restore function is in the closed state, the shutdown process is continued.
[0104] Optionally, the processor 1001, when setting the interceptor in the shutdown process, specifically executes the following operation:
[0105] Obtaining the process identifier of the shutdown process, and setting the interceptor in the shutdown process corresponding to the process identifier.
[0106] The embodiments of the present application realize the system restore function by using the file filter driver in combination with the interceptor in the shutdown process. The file filter driver is used to monitor the operation behavior of the disk data, which does not affect the running of other processes in the system, and does not need to backup the entire disk data, thereby reducing the performance loss of the operating system. At the same time, the operation of the disk data is monitored and recorded, and the disk data is restored by using the stored operation record in the shutdown process, thereby realizing the restoration process of the device from the disk data layer, without the need to restore the entire operating system, and the efficiency of data restoration is improved. The system restore function can be started and stopped by triggering operation, without the need to restart the system to take effect, thereby reducing the operation complexity of the device restoration. When saving the operation record, the operation record of the disk data corresponding to the data identifier which does not exist in the set identifier set is saved to the restore information database, thereby improving the flexibility of data processing, saving the merged operation record, further improving the data restoration efficiency, and reducing the memory occupancy. Before the restoration processing, the operation record can be selectively restored, thereby further improving the flexibility of data restoration.
[0107] The embodiment of the present application further provides a computer storage medium, which can store a plurality of program instructions, the program instructions being suitable for being loaded and executed by a processor to perform the method steps of the above-described embodiments. Figures 2-7 The specific execution process can refer to the specific description of the embodiment shown in Figures 2-7 The specific execution process can refer to the specific description of the embodiment shown in
[0108] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware, and the program can be stored in a computer readable storage medium. When the program is executed, the program can include the processes of the above-described embodiments. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM), etc.
[0109] The above only describes the preferred embodiments of the present application, and of course cannot limit the scope of the rights of the present application, so the equivalent changes made according to the claims of the present application are still within the scope of the present application.
Claims
1. A data restoration method, characterized in that, include: Initialize the system restore function, run the file filter driver, and set up an interceptor in the shutdown process; If an operation record for disk data is obtained based on the file filtering driver, and the system restore function is in operation, then the operation record is saved to the restore information database. If the interceptor is detected to be blocking the shutdown process and the system restore function is in operation, then the running application is closed and the operation record is read from the restore information database. The disk data is restored based on the operation record, and the shutdown process continues after the restoration is completed.
2. The method according to claim 1, characterized in that, If an operation record for disk data is obtained based on the file filtering driver, and the system restore function is active, then the operation record is saved to the restore information database, including: If an operation record for disk data is obtained based on the file filtering driver, and the system restore function is in operation, then the data identifier of the disk data is obtained from the operation record. If the data identifier does not exist in the set identifiers, the operation record is saved to the restoration information database.
3. The method according to claim 1 or 2, characterized in that, Saving the operation record to the restoration information database includes: Based on the data identifier of the disk data, retrieve the historical records associated with the operation record from the restore information database; The operation records and the historical records are merged based on the data execution order; The merged operation records are saved to the restoration information database.
4. The method according to claim 1, characterized in that, The step of restoring the disk data based on the operation record and continuing the shutdown process after the restoration process includes: The disk data is restored based on the operation records; After the restoration process, the operation record is deleted from the restoration information database; If all operation records in the restoration information database are deleted, the shutdown process continues.
5. The method according to claim 4, characterized in that, Before performing the disk data restoration process based on the operation record, the method further includes: Retrieve the selected operation record from the restoration information database; If all operation records in the restore information database are deleted, the shutdown process continues, including: If all selected operation records in the restore information database are deleted, the shutdown process continues.
6. The method according to claim 1, characterized in that, The method further includes: If the operation record for the disk data is obtained based on the file filtering driver, and the system restore function is in a disabled state, then the saving of the operation record will stop.
7. The method according to claim 1, characterized in that, The method further includes: If the interceptor is detected to be blocking the shutdown process and the system restore function is disabled, the shutdown process will continue.
8. The method according to claim 1, characterized in that, Setting up an interceptor during the shutdown process includes: Obtain the process identifier of the shutdown process, and set an interceptor in the shutdown process corresponding to the process identifier.
9. A computer device, characterized in that, Includes processor, memory, and input / output interfaces; The processor is connected to the memory and the input / output interface respectively, wherein the input / output interface is used for page interaction, the memory is used to store program code, and the processor is used to call the program code to execute the method as described in any one of claims 1-8.
10. A computer storage medium, characterized in that, The computer storage medium stores a computer program, the computer program including program instructions, which, when executed by a processor, perform the method as described in any one of claims 1-8.