Method and system for restoring temporary data in unused space of a disk

By acquiring disk data while the user's computer system is connected to the network, locating and classifying temporary data in unused space, generating a retention file feature table, and performing restoration processing, the problem of high difficulty and cost in restoring data in unused disk space caused by weak user backup awareness is solved, achieving more efficient data restoration.

CN115586989BActive Publication Date: 2026-07-07CHONGQING XIARUAN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING XIARUAN TECH CO LTD
Filing Date
2022-09-29
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

When users have a weak awareness of backup, restoring temporary data in unused disk space is difficult and costly.

Method used

By acquiring disk data from the user's computer system while it is connected to the network, locating the data area, extracting temporary data from unused space, and classifying the data according to file information characteristics to generate a retained file feature table, reading the retained file feature table and processing it according to preset restoration measures, including user instruction preprocessing and network data download.

Benefits of technology

This reduces the difficulty and cost of data restoration and improves the success rate and accuracy of data restoration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115586989B_ABST
    Figure CN115586989B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of computer file system, and particularly relates to a method and system for restoring temporary data in unused space of a disk, wherein the method comprises the following steps: S1, acquiring all disk running data in a networking state of a user computer system; S2, locating a data area of the disk, extracting temporary data in unused space of the data area, and classifying the temporary data in the unused space according to preset file information features to generate a retention file feature table; and S3, reading the retention file feature table, and processing according to a preset restoration measure according to the completeness of the retention file feature table. The present application can solve the problems of high restoration difficulty and high restoration cost in the prior art when data is restored under the premise that the user's backup awareness is weak.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer file systems, and in particular relates to a method and system for restoring temporary data in unused disk space. Background Technology

[0002] Data recovery technology refers to the techniques used to retrieve and regenerate data when computer storage media is damaged or data is deleted, rendering some or all of the data inaccessible. Computer media includes storage disks, where the basic unit for data storage is a sector. A partition information table is generated on the first sector of the disk, indicating the number of partitions, the size of each partition, and its starting position. After disk partitioning, a formatting operation is typically performed, which rationally divides the partition into directory and file allocation areas based on its size. The file allocation table (LAB) is generated on the data area and the directory file allocation area. The LAB records the attributes, size, and location of each file stored on the disk. Therefore, all file operations are performed on the LAB, including copying, cutting, deleting, viewing file attributes, and reading / executing files. If the LAB is deleted or corrupted, the computer system will be unable to locate the file. Even if the file data in the data area is not affected, the user will not be able to view the file data. The data area where the deleted LAB is located is called unused disk space, and the file data in the unused disk space is considered temporary data.

[0003] Meanwhile, if a user stores new file data on the disk, the disk will store it reasonably according to the attributes of the new file data, depending on the disk's storage method. This reasonable storage will affect files that have been deleted in the file allocation area but not in the data area, i.e., overwriting temporary data. For example, if the new file data is 50G in size, and the temporary data is larger than 50G but close to 50G, when the computer system randomly selects the storage data area for the new file data, the probability of the data area containing the temporary data being selected will increase. Therefore, the new file data will overwrite the temporary data for storage, making it very difficult to recover the deleted file data later.

[0004] Therefore, the existing methods for data restoration involve creating a disk image, i.e., backing up the disk. Even if the data area in the original disk is overwritten, the corresponding temporary data information can be found in the image file. However, this method is only suitable for users who are aware of backups. Most users usually do not have backup awareness or forget to back up during computer system use. In the long-term use of disk storage, when users delete file data, it is subsequently overwritten by new data. At this time, the difficulty and cost of data restoration will be very high.

[0005] Therefore, there is a need for a method to restore temporary data in unused disk space, given that users have a weak awareness of backup, in order to reduce the difficulty and cost of data restoration. Summary of the Invention

[0006] The technical problem solved by this invention is to provide a method and system for restoring temporary data in unused disk space, so as to solve the problems of high difficulty and high cost of data restoration when users have weak awareness of backup in the prior art.

[0007] The basic solution provided by this invention is a method for restoring temporary data in unused disk space, comprising:

[0008] S1: Obtain all disk operation data when the user's computer system is connected to the network;

[0009] S2: Locate the data area of ​​the disk, extract temporary data from the unused space in the data area, and classify the temporary data in the unused space according to preset file information characteristics to generate a retained file characteristic table;

[0010] S3: Read the retained file feature table and process it according to the preset restoration measures based on the completeness of the retained file feature table.

[0011] The principle and advantages of this invention are as follows: In existing application scenarios, when users store data, the computer system typically does not automatically perform backups unless the user has pre-configured plugins or software applications. When a user accidentally deletes data, the deleted data is removed from the file allocation table in the directory file allocation area, but temporary data of the deleted data still exists in the disk data area. Over time and due to the random access storage method of the disk, this temporary data is gradually overwritten by new data, increasing the difficulty and cost of data recovery. Therefore, to address the above problems, this application provides a method for restoring temporary data in unused disk space, the principle of which is:

[0012] First, the system obtains the disk operation data of the user's computer system. The disk types include fixed and removable disks. For removable disks, data can be obtained by connecting to the computer system while the disk is connected to the network. After obtaining the disk operation data, the system locates the data areas on the disk and extracts temporary data from the unused space. This extraction can be done by comparing the data with the file allocation table (FALSE). Data in areas not listed on the FALSE is extracted as temporary data. Then, the temporary data is classified according to its file information characteristics to generate a retention file feature table. This retention file feature table can clearly represent the redundant temporary data by characteristics, allowing the residual content of the temporary data to be identified. Finally, based on the integrity of the data in the retention file feature table, the system processes the data according to preset restoration measures. This means that even if the user has not backed up the data, the system can restore as much data as possible. The source of the restored data is clear, and the restored data is correlated, thereby reducing the difficulty and cost of restoration.

[0013] Therefore, the advantage of the present invention is that the above-described restoration method can solve the problems of high restoration difficulty and high restoration cost in the prior art when users have weak awareness of backup, thereby reducing the difficulty and cost of restoration.

[0014] Furthermore, S3 includes:

[0015] S3-1: Obtain user instructions, preprocess the user instructions according to preset file information characteristics, and generate preprocessing results;

[0016] S3-2: Read the retained file feature table, and process the preprocessing results and the retained file feature table according to the preset restoration measures.

[0017] Beneficial effects: In step S3, by obtaining the user's instructions, the relevant features of the data that the user wants to restore can be obtained. After preprocessing, it is compared with the feature table of retained files, which can directly locate the features associated with the file to be restored in the feature table of retained files, thus reducing the difficulty of restoration.

[0018] Furthermore, S3-2 includes:

[0019] S3-2-1: Match the preprocessing results with the feature table of retained files. If the matching result is greater than the preset matching threshold, push the temporary data in the corresponding retained file table to the user. Otherwise, proceed to S3-2-2.

[0020] S3-2-2: If the matching result is less than the preset matching threshold but greater than 0, extract the number of file information entries that successfully match the preprocessed result with the retained file feature table, and download the file data from the network when the computer system is connected to the network.

[0021] S3-2-3: If the matching result is equal to 0, then the process ends.

[0022] Beneficial effects: In the restoration process, if the matching result is greater than the preset matching threshold, it indicates that the temporary data has high integrity and can be directly restored and pushed to the user. If the matching result is less than the preset matching threshold but greater than 0, it indicates that the restored data is incomplete or missing. Therefore, even after direct restoration, there may be cases where the user cannot open the restored data or the restored data content is incomplete. Therefore, by searching for identical data on the network while connected to the internet, the possibility of successful restoration is increased. Finally, if the matching result is equal to 0, it means that there is no data that the user wants to restore in the temporary data or the data has been completely overwritten. In this case, restoration is not possible, and the restoration operation ends.

[0023] Furthermore, the preset file information features include one or more of the following: file name, file date, file type, file size, file location, and file source.

[0024] Beneficial effects: File information features include one or more of the following: file name, file date, file type, file size, file location, and file source, which can more completely classify the characteristics of the data.

[0025] Furthermore, S2 includes:

[0026] S2-1: Traverse all disk data in the computer system, locate the data area of ​​the disk, compare the file allocation table with the file data in the data area, and extract temporary data in the unused space of the data area;

[0027] S2-2: Classify temporary data according to file name, file date, file type, file size, file location, and file source, and generate a retained file feature table.

[0028] Beneficial effects: Traversing all disk data in a computer system and locating the data area is crucial because a computer system contains multiple disks. When a user downloads data for the first time, it may be from the network or from an application. The downloaded data may then be sent through different applications, such as WeChat. Therefore, there will be many storage paths for the data, meaning that the data will be stored on different disks. Thus, by traversing all disk data and locating the data area of ​​the disk and the temporary data in the unused space of the data area, the authenticity of the temporary data can be ensured, avoiding increasing the workload of restoration operations.

[0029] A system for restoring temporary data in unused disk space includes a disk data acquisition module, a disk data processing module, and a data restoration module. The disk data acquisition module acquires all disk operation data when the user's computer system is connected to the network. The disk data processing module locates the data area of ​​the disk, extracts temporary data from the unused space within the data area, and classifies the temporary data in the unused space according to preset file information characteristics to generate a retained file characteristic table. The data restoration module reads the retained file characteristic table and processes it according to preset restoration measures based on the completeness of the retained file characteristic table.

[0030] Furthermore, the data restoration module includes a user instruction acquisition unit, a user instruction preprocessing unit, and a restoration unit. The user instruction acquisition unit is used to acquire user instructions; the user instruction preprocessing unit is used to preprocess the user instructions according to preset file information characteristics to generate preprocessing results; the restoration unit is used to read the retained file feature table and process the preprocessing results and the retained file feature table according to preset restoration measures.

[0031] Furthermore, the preset restoration measures in the restoration unit are specifically as follows:

[0032] The preprocessing results are matched with the feature table of retained files by the number of feature entries. If the matching result is greater than the preset matching threshold, the temporary data in the corresponding retained file table is pushed to the user; otherwise, the next step is performed.

[0033] If the matching result is less than the preset matching threshold but greater than 0, then extract the number of file information entries that successfully match the preprocessed result with the retained file feature table, and download the file data from the network when the computer system is connected to the network.

[0034] If the matching result is 0, the process ends.

[0035] Furthermore, the preset file information features include one or more of the following: file name, file date, file type, file size, file location, and file source.

[0036] Furthermore, the disk data processing module includes a data area positioning unit, a temporary data extraction unit, and a temporary data processing unit. The data area positioning unit is used to traverse all disk data of the computer system and locate the data area of ​​the disk. The temporary data extraction unit is used to compare the file allocation table with the file data in the data area and extract temporary data in the unused space of the data area. The temporary data processing unit is used to classify the temporary data according to file name, file date, file type, file size, file location, and file source, and generate a retained file feature table. Attached Figure Description

[0037] Figure 1 This is a flowchart of an embodiment of the present invention;

[0038] Figure 2 This is a functional block diagram of an embodiment of the present invention. Detailed Implementation

[0039] The following detailed description illustrates the specific implementation method:

[0040] Computer systems contain multiple disks, including fixed hard drives and external hard drives. Both fixed and external hard drives can be used to store data and are collectively referred to as disks. The basic unit for storing data on a disk is a sector. A partition information table is generated on the first sector of the disk, indicating the number of partitions, the size of each partition, its starting position, and other information. After disk partitioning is completed, a formatting operation is usually performed. Formatting a partition divides it into a directory file allocation area and a data area according to the partition size. A file allocation table is generated on the directory file allocation area. The file allocation table records the attributes, size, and location of each file stored on the disk. Therefore, our file operations are performed on the file allocation table, including copying, cutting, deleting, viewing file attributes, and reading / executing files. If the file allocation table is deleted or damaged, the computer system cannot locate the file. Even if the data in the data area is not affected, the user cannot view the file data. The data area where the deleted file allocation table is located is called unused disk space, and the file data in the unused disk space is considered temporary data.

[0041] Meanwhile, the disk storage method is as follows: newly stored data will be randomly selected from a region on the disk for storage. In order to make reasonable use of the disk storage space, the probability of selecting a region with the same data size will be increased during the random selection of storage regions. Therefore, if the size of the temporary data is the same as or close to the size of the new data, the probability of the temporary data area being randomly selected will increase, and the chance of the temporary data being overwritten will also increase. It will be very difficult to restore the overwritten temporary data.

[0042] Therefore, this application proposes a method for restoring temporary data in unused disk space to improve the success rate of data restoration. Detailed embodiments are shown below:

[0043] The basic implementation examples are as follows: Figure 1 As shown: A method for restoring temporary data in unused disk space, comprising:

[0044] S1: Obtain all disk operation data when the user's computer system is connected to the network;

[0045] In this embodiment, the disk data obtained by this application is acquired when the computer system is connected to the network, and the acquisition method is full disk extraction to ensure the integrity of the acquired disk data.

[0046] S2: Locate the data area of ​​the disk, extract temporary data from the unused space in the data area, and classify the temporary data in the unused space according to preset file information characteristics to generate a retained file characteristic table;

[0047] The preset file information features include one or more of the following: file name, file date, file type, file size, file location, and file source. In this embodiment, the preset file information features include file name, file date, file type, file size, file location, and file source. During the process of temporary data being overwritten, it is usually difficult to completely overwrite the data because the probability of each piece of data being exactly the same size is low. In response to this situation, some existing data restoration technologies will restore the data that was not completely overwritten during the restoration process. However, after restoration, because the data was partially overwritten, even after restoration, there will be situations where the data cannot be opened or an error occurs when opening it. Accordingly, this application classifies each piece of data according to its attribute content. Each category represents the characteristics of the same type of data. For example, data with the same file date are stored in one category, data with the same file storage location are stored in another category, data with the same file type are stored in another category, and so on. The generated retained file feature table records the characteristics of temporary data that has not been overwritten or has not been completely overwritten, which serves as the basis for subsequent restoration measures.

[0048] S2 also includes:

[0049] S2-1: Traverse all disk data in the computer system, locate the data area of ​​the disk, compare the file allocation table with the file data in the data area, and extract temporary data in the unused space of the data area;

[0050] S2-2: Classify temporary data according to file name, file date, file type, file size, file location, and file source, and generate a retained file feature table;

[0051] In this embodiment, all disk data of the computer system, including data from fixed hard drives and external hard drives, is first traversed to locate the data area of ​​the disk and compare it with the file allocation table generated by the directory file allocation area to find temporary data in the unused space of the disk. This temporary data is data whose directory does not exist in the file allocation table. In this embodiment, the disk data area can be located after the second FATA table of the FAT32 file system, which is the data area.

[0052] Temporary data is classified according to preset file information features, including file name, file date, file type, file size, file location, and file source. After classification, a file feature table is generated.

[0053] S3: Read the retained file characteristic table and process it according to the preset restoration measures based on the completeness of the retained file characteristic table; wherein, S3 includes:

[0054] S3-1: Obtain user instructions, preprocess the user instructions according to preset file information characteristics, and generate preprocessing results;

[0055] S3-2: Read the retained file feature table, and process the preprocessing results and the retained file feature table according to the preset restoration measures.

[0056] In this embodiment, the user instruction is obtained through the computer system's search box. The user enters the data content to be restored in the search box. The content entered by the user in the search box is preprocessed. In this embodiment, the preprocessing converts the input content into file information features, such as download date, file type, and file name. After preprocessing, the input content becomes data that can be compared with the stored file feature table. Then, it is processed according to the preset restoration measures, which are specifically described in S3-2 as follows:

[0057] S3-2 includes:

[0058] S3-2-1: Match the preprocessing results with the feature table of retained files. If the matching result is greater than the preset matching threshold, push the temporary data in the corresponding retained file table to the user. Otherwise, proceed to S3-2-2.

[0059] S3-2-2: If the matching result is less than the preset matching threshold but greater than 0, extract the number of file information entries that successfully match the preprocessed result with the retained file feature table, and download the file data from the network when the computer system is connected to the network.

[0060] S3-2-3: If the matching result is equal to 0, then the process ends.

[0061] In this embodiment, the retained file feature table generated according to the file information characteristics of the temporary data includes multiple features, with each file information feature classified as a single feature. After preprocessing, the data that the user wants to restore generates corresponding features, which are then matched against each feature in the retained file feature table. If the matching result is greater than a preset matching threshold (in this embodiment, the preset matching threshold is 100%), meaning that data corresponding to the user's input data can be found completely in the temporary data, then this temporary data can be directly pushed to the user to restore the data. If the matching result is less than 100%, but there are successfully matched file information entries in the retained file feature table, then these successfully matched file information entries are downloaded from the network when the computer system is connected to the internet. For example, if the file source, file name, etc., of the successfully matched feature entries are matched, this information is first pushed to the user. The user can confirm whether it is the data that needs to be restored based on the pushed information. For example, if the file source is a webpage download and the file name is a document category name, after the user confirms, the data with the same file name is downloaded from the network and pushed to the user for viewing and selection, thereby making every effort to restore the user's data.

[0062] If the matching result is 0, it means that the temporary data does not contain the data that the user wants to restore, and the restoration operation cannot be performed in this case.

[0063] like Figure 2 As shown, in another embodiment of this example, a system for restoring temporary data in unused disk space is also included, comprising a disk data acquisition module, a disk data processing module, and a data restoration module, wherein:

[0064] The disk data acquisition module is used to acquire all disk operation data when the user's computer system is connected to the network.

[0065] The disk data processing module is used to locate the data area of ​​the disk, extract temporary data in the unused space of the data area, and classify the temporary data in the unused space according to preset file information features to generate a retained file feature table; the preset file information features include one or more of the following: file name, file date, file type, file size, file location, and file source.

[0066] The disk data processing module includes a data area positioning unit, a temporary data extraction unit, and a temporary data processing unit. The data area positioning unit is used to traverse all disk data of the computer system and locate the data area of ​​the disk. The temporary data extraction unit is used to compare the file allocation table with the file data in the data area and extract temporary data in the unused space of the data area. The temporary data processing unit is used to classify the temporary data according to file name, file date, file type, file size, file location, and file source, and generate a retained file feature table.

[0067] The data restoration module is used to read the retained file feature table and process it according to preset restoration measures based on the completeness of the retained file feature table. The data restoration module includes a user instruction acquisition unit, a user instruction preprocessing unit, and a restoration unit. The user instruction acquisition unit is used to retrieve user instructions. The user instruction preprocessing unit is used to preprocess the user instructions according to preset file information features to generate preprocessing results. The restoration unit is used to read the retained file feature table and process the preprocessing results and the retained file feature table according to preset restoration measures.

[0068] The preset restoration measures in the restoration unit are as follows:

[0069] The preprocessing results are matched with the feature table of retained files by the number of feature entries. If the matching result is greater than the preset matching threshold, the temporary data in the corresponding retained file table is pushed to the user; otherwise, the next step is performed.

[0070] If the matching result is less than the preset matching threshold but greater than 0, then extract the number of file information entries that successfully match the preprocessed result with the retained file feature table, and download the file data from the network when the computer system is connected to the network.

[0071] If the matching result is 0, the process ends.

[0072] The above are merely embodiments of the present invention. Commonly known structures and characteristics are not described in detail here. Those skilled in the art are aware of all common technical knowledge in the field prior to the application date or priority date, are aware of all existing technologies in that field, and have the ability to apply conventional experimental methods prior to that date. Those skilled in the art can, under the guidance of this application, improve and implement this solution in combination with their own capabilities. Some typical known structures or methods should not be obstacles for those skilled in the art to implement this application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the structure of the present invention. These should also be considered within the scope of protection of the present invention, and will not affect the effectiveness of the implementation of the present invention or the practicality of the patent. The scope of protection claimed in this application should be determined by the content of its claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.

Claims

1. A method for restoring temporary data in unused disk space, characterized in that: include: S1: Obtain all disk operation data when the user's computer system is connected to the network; S2: Locate the data area of ​​the disk, extract temporary data from the unused space in the data area, and classify the temporary data in the unused space according to preset file information characteristics to generate a retained file characteristic table; S3: Read the retained file feature table and process it according to the preset restoration measures based on the completeness of the retained file feature table; S3 includes: S3-1: Obtain user instructions, preprocess the user instructions according to preset file information characteristics, and generate preprocessing results; S3-2: Read the retained file feature table, and process the preprocessing results and the retained file feature table according to the preset restoration measures; S3-2 includes: S3-2-1: Match the preprocessing results with the feature table of retained files. If the matching result is greater than the preset matching threshold, push the temporary data in the corresponding retained file table to the user. Otherwise, proceed to S3-2-2. S3-2-2: If the matching result is less than the preset matching threshold but greater than 0, extract the number of file information entries that successfully match the preprocessed result with the retained file feature table, and download the file data from the network when the computer system is connected to the network. S3-2-3: If the matching result is equal to 0, then the process ends.

2. The method for restoring temporary data in unused disk space according to claim 1, characterized in that: The preset file information features include one or more of the following: file name, file date, file type, file size, file location, and file source.

3. The method for restoring temporary data in unused disk space according to claim 2, characterized in that: S2 includes: S2-1: Traverse all disk data in the computer system, locate the data area of ​​the disk, compare the file allocation table with the file data in the data area, and extract temporary data in the unused space of the data area; S2-2: Classify temporary data according to file name, file date, file type, file size, file location, and file source, and generate a retained file feature table.

4. A system for restoring temporary data in unused disk space, characterized in that: The system includes a disk data acquisition module, a disk data processing module, and a data restoration module. The disk data acquisition module is used to acquire all disk operation data when the user's computer system is connected to the network. The disk data processing module is used to locate the data area of ​​the disk, extract temporary data in the unused space of the data area, and classify the temporary data in the unused space according to preset file information characteristics to generate a retained file characteristic table. The data restoration module is used to read the retained file characteristic table and process it according to preset restoration measures based on the completeness of the retained file characteristic table. The data restoration module includes a user instruction acquisition unit, a user instruction preprocessing unit, and a restoration unit. The user instruction acquisition unit is used to retrieve user instructions. The user instruction preprocessing unit is used to preprocess user instructions according to preset file information features to generate preprocessing results. The restoration unit is used to read the retained file feature table and process the preprocessing results and the retained file feature table according to the preset restoration measures; The preset restoration measures in the restoration unit are as follows: The preprocessing results are matched with the feature table of retained files by the number of feature entries. If the matching result is greater than the preset matching threshold, the temporary data in the corresponding retained file table is pushed to the user; otherwise, the next step is performed. If the matching result is less than the preset matching threshold but greater than 0, then extract the number of file information entries that successfully match the preprocessed result with the retained file feature table, and download the file data from the network when the computer system is connected to the network. If the matching result is 0, the process ends.

5. A system for restoring temporary data in unused disk space according to claim 4, characterized in that: The preset file information features include one or more of the following: file name, file date, file type, file size, file location, and file source.

6. A system for restoring temporary data in unused disk space according to claim 5, characterized in that: The disk data processing module includes a data area positioning unit, a temporary data extraction unit, and a temporary data processing unit. The data area positioning unit is used to traverse all disk data of the computer system and locate the data area of ​​the disk. The temporary data extraction unit is used to compare the file allocation table with the file data in the data area and extract temporary data in the unused space of the data area. The temporary data processing unit is used to classify the temporary data according to file name, file date, file type, file size, file location, and file source, and generate a retained file feature table.