A multi-system space storage optimization method and system

CN116431075BActive Publication Date: 2026-08-11福建天晴在线互动科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-23
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0002]在同一台电脑上安装多个不同版本的Windows操作系统时,会浪费大量的磁盘空间,因为很多类似的文件会占用磁盘空间,导致磁盘空间浪费

Benefits of technology

[0022] The beneficial effects of this invention are as follows: This invention enables two different versions of Windows operating systems to share a single VHD master disk, avoiding the problem of similar files occupying disk space and improving disk space utilization. At the same time, by recording and utilizing the same sector blocks, it achieves efficient storage and retrieval of changing files, thereby improving the system's operating efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116431075B_ABST
    Figure CN116431075B_ABST
Patent Text Reader

Abstract

This invention relates to a multi-system space storage optimization method and system. It involves creating VHD virtual disk 1 and VHD virtual disk 2 on a VHD master disk, and installing two different versions of Windows operating systems on each. The method identifies files that are present, changed, or deleted on VHD virtual disk 2 compared to VHD virtual disk 1. Similar files with identical sectors and different sectors are stored independently in different file sector locations, creating a differential VHD virtual disk 1diff2. The method logically deletes and writes the extra files to the differential VHD virtual disk 1diff2. The method writes the contents of different sectors to the differential VHD virtual disk 1diff2. A differential disk 1diff1 is created, and both differential VHD virtual disks 1diff1 and 1diff2 are mounted as system boot disks. A VHD directory is created for the data folder and mounted to the corresponding directory on the system disk via a symbolic link, enabling software data synchronization and sharing when switching between the two systems. This invention avoids the problem of similar files occupying disk space and improves disk space utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer communication technology, and in particular to a multi-system space storage optimization method and system. Background Technology

[0002] Installing multiple different versions of Windows operating systems on the same computer wastes a significant amount of disk space because many similar files occupy disk space, leading to wasted disk space. Current technology simply wastes space repeatedly by installing multiple operating systems. Summary of the Invention

[0003] To overcome the above problems, the purpose of this invention is to provide a multi-system space storage optimization method and system.

[0004] This invention is implemented using the following scheme: a multi-system space storage optimization method, the method comprising the following steps:

[0005] Step S1: Create VHD virtual disk 1 on the VHD master disk and install Windows operating system version 1; create VHD virtual disk 2 and install Windows operating system version 2.

[0006] Step S2: First, compare the file sizes of the two virtual disks. For files of the same size, perform SHA1 calculation to find the files that are present in VHD virtual disk 2, the changed files, and the deleted files compared to VHD virtual disk 1.

[0007] Step S3: Scan similar files in the changed files, organize the sector storage of similar files, store the same sectors of similar files and record them in file sector position 1, and place different sectors independently in file sector position 2.

[0008] Step S4: Create a differential VHD virtual disk 1diff2 based on VHD virtual disk 1, logically delete the extra files, and write the extra files to file sector position 3 on differential VHD virtual disk 1diff2.

[0009] Step S5: Using the same sectors, write the contents of different sectors onto the differential VHD virtual disk 1diff2.

[0010] Step S6: Create a differential VHD virtual disk 1diff1 for VHD virtual disk 1, mount differential VHD virtual disk 1diff1 and differential VHD virtual disk 1diff2 as system boot disks, create a VHD directory for the data folder, and mount it to the corresponding directory of the system disk through a symbolic link to achieve software data synchronization and sharing when switching between the two systems.

[0011] Furthermore, step 3 further comprises: comparing the hash values ​​of each sector block of the file; if more than half of the blocks are the same, the file is determined to be a similar file; modifying the sector record information of this similar file in the Master File Table (MFT); placing the same sectors of the similar files in file sector position 1, where the file sector position in the MFT of the same sector points to file sector position 1; and placing different sectors independently in file sector position 2, where the file sector position in the MFT of the different sectors points to file sector position 2.

[0012] Furthermore, step 4 further comprises: creating a differential VHD virtual disk 1diff2 based on VHD virtual disk 1, deleting the extra files in the Master File Table (MFT) of differential VHD virtual disk 1diff2, creating file metadata in the Master File Table (MFT) of differential VHD virtual disk 1diff2, and then writing the data of the extra files to the file sector position 3 of VHD virtual disk 1diff2.

[0013] A multi-system space storage optimization system, the system including a system installation module, a virtual disk file comparison module, a changed file sector sorting module, an extra file writing module, a changed file writing module, and a data synchronization and sharing module;

[0014] The system installation module: creates a VHD virtual disk 1 on the VHD master disk and installs Windows operating system version 1, and creates a VHD virtual disk 2 and installs Windows operating system version 2.

[0015] The virtual disk file comparison module first compares the file sizes of the two virtual disks, and then performs SHA1 calculation on files of the same size to find the files that are present, changed, or deleted in VHD virtual disk 2 compared to VHD virtual disk 1.

[0016] The changed file sector organization module: scans similar files in the changed files, organizes the sector storage of similar files, stores the same sectors of similar files and records them in file sector position 1, and places different sectors independently in file sector position 2;

[0017] The extra file writing module: creates a differential VHD virtual disk 1diff2 based on VHD virtual disk 1, logically deletes the extra files, and writes the extra files to file sector position 3 on differential VHD virtual disk 1diff2.

[0018] The modified file writing module: The modified file uses the same sector to write the contents of different sectors on the differential VHD virtual disk 1diff2;

[0019] The data synchronization and sharing module: creates a differential VHD virtual disk 1diff1 for VHD virtual disk 1, mounts differential VHD virtual disk 1diff1 and differential VHD virtual disk 1diff2 as system boot disks, creates a VHD directory for the data folder, and mounts it to the corresponding directory of the system disk through a soft link, so as to realize software data synchronization and sharing when switching between the two systems.

[0020] Furthermore, the modified file sector reorganization module further comprises: comparing the hash values ​​of each sector block of the file; if more than half of the blocks are the same, it is determined to be a similar file; modifying the sector record information of this similar file in the Master File Table (MFT); placing the same sectors of the similar files in file sector position 1, where the file sector position in the Master File Table (MFT) for the same sectors points to file sector position 1; and placing different sectors independently in file sector position 2, where the file sector position in the Master File Table (MFT) for different sectors points to file sector position 2.

[0021] Furthermore, the additional file writing module further comprises: creating a differential VHD virtual disk 1diff2 based on VHD virtual disk 1; deleting the additional file in the master file table (MFT) of differential VHD virtual disk 1diff2; creating file metadata in the master file table (MFT) of differential VHD virtual disk 1diff2; and then writing the data of the additional file to the file sector position 3 of VHD virtual disk 1diff2.

[0022] The beneficial effects of this invention are as follows: This invention enables two different versions of Windows operating systems to share a single VHD master disk, avoiding the problem of similar files occupying disk space and improving disk space utilization. At the same time, by recording and utilizing the same sector blocks, it achieves efficient storage and retrieval of changing files, thereby improving the system's operating efficiency. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of the method flow of the present invention.

[0024] Figure 2 This is a system principle block diagram of the present invention. Detailed Implementation

[0025] The invention will now be further described with reference to the accompanying drawings.

[0026] Please see Figure 1 As shown, the present invention provides a multi-system space storage optimization method, the method comprising the following steps:

[0027] Step S1: Create VHD virtual disk 1 on the VHD master disk and install Windows operating system version 1; create VHD virtual disk 2 and install Windows operating system version 2.

[0028] Step S2: First, compare the file sizes of the two virtual disks. For files of the same size, perform SHA1 calculation to find the files that are present in VHD virtual disk 2, the changed files, and the deleted files compared to VHD virtual disk 1.

[0029] Step S3: Scan similar files in the changed files, organize the sector storage of similar files, store the same sectors of similar files and record them in file sector position 1, and place different sectors independently in file sector position 2.

[0030] Step S4: Create a differential VHD virtual disk 1diff2 based on VHD virtual disk 1, logically delete the extra files, and write the extra files to file sector position 3 on differential VHD virtual disk 1diff2.

[0031] Step S5: Using the same sectors, write the contents of different sectors onto the differential VHD virtual disk 1diff2.

[0032] Step S6: Create a differential VHD virtual disk 1diff1 for VHD virtual disk 1, mount differential VHD virtual disk 1diff1 and differential VHD virtual disk 1diff2 as system boot disks, create a VHD directory for the data folder, and mount it to the corresponding directory of the system disk through a symbolic link to achieve software data synchronization and sharing when switching between the two systems.

[0033] The present invention will be further described below with reference to a specific embodiment:

[0034] A multi-system space storage optimization method,

[0035] 1. Create VHD virtual disk 1 on the VHD master disk and install Windows operating system version 1. Create VHD virtual disk 2 and install Windows operating system version 2.

[0036] For example: 1. Virtual disk 1 (VHD1) has Windows operating system version 1 installed, which includes file A and file B; Virtual disk 2 (VHD2) has Windows operating system version 2 installed, which includes file A, file B and file C, and file B has been updated.

[0037] 2. First, compare the file sizes of the two virtual disks. For files of the same size, perform SHA1 calculation to find the files that are present in virtual disk 2, changed files, and deleted files compared to virtual disk 1.

[0038] For example: 2. Suppose that file A and file B are the same size, and file B and file C are different sizes. After performing SHA1 calculation, we find that file A is the same, but file B has changed.

[0039] 3. Scan similar files in the changed files, organize the sector storage of similar files, store the same sectors of similar files and record them in file sector position 1, and place different sectors independently in file sector position 2;

[0040] 3.1 By comparing the hash values ​​of each sector of the file, if more than half of the sectors are the same, the file is determined to be a similar file. The sector record information of this similar file in the Master File Table (MFT) is modified. The same sectors of the similar files are placed in file sector position 1, and the file sector position in the MFT of the same sector points to file sector position 1. Different sectors are placed independently in file sector position 2, and the file sector position in the MFT of different sectors points to file sector position 2.

[0041] For example: 3. We scan similar sectors in the changed file (file B). Suppose that the sector position of file B in VHD1 is 10-19 and the sector position in VHD2 is 30-39. We find that sectors 10-12 are the same as sectors 30-32, and sectors 13-19 are different from sectors 33-39.

[0042] 4. Create a differential VHD virtual disk 1diff2 based on VHD virtual disk 1, logically delete the extra files, and write the extra files to file sector position 3 on differential VHD virtual disk 1diff2;

[0043] 4.1. Create a differential VHD virtual disk 1diff2 based on VHD virtual disk 1. Delete any extra files from the Master File Table (MFT) of differential VHD virtual disk 1diff2. Create file metadata in the MFT of differential VHD virtual disk 1diff2, and then write the extra file data to file sector position 3 of VHD virtual disk 1diff2. Differential VHD virtual disk 1diff1 is initially empty; content is appended only when modifications are made. If no modifications are made, the content of the VHD master disk is read directly.

[0044] For example: 4.1. Delete the record for file C in the Master File Table (MFT) of Differential Virtual Disk 1diff2. Create the metadata for file C in the Master File Table (MFT) of Differential Virtual Disk 1diff2, pointing to a new sector (e.g., sector 50), and write the data of file C to that sector.

[0045] 5. For files that have changed, different sectors are written to the differential VHD virtual disk 1diff2 using the same sectors;

[0046] 6. Create a differential vhd virtual disk 1diff1 for vhd virtual disk 1, mount differential vhd virtual disk 1diff1 and differential vhd virtual disk 1diff2 as system boot disks, create a vhd directory for the data folder, and mount it to the corresponding directory on the system disk through a symbolic link to achieve software data synchronization and sharing when switching between the two systems.

[0047] For example: 6. Create a differential disk 1diff1 for VHD1, and mount differential virtual disks 1diff1 and 1diff2 as system boot disks. Create a VHD directory for the data folder (e.g., the "Shared Data" folder under drive D), and mount it to the corresponding directory on the system disk (e.g., C:\Users\Public\Documents\SharedData) using a symbolic link. This way, software data can be synchronously shared when switching between the two systems.

[0048] Please see Figure 2 As shown, the present invention also provides a multi-system space storage optimization system, the system including a system installation module, a virtual disk file comparison module, a changed file sector sorting module, an additional file writing module, a changed file writing module, and a data synchronization and sharing module;

[0049] The system installation module: creates a VHD virtual disk 1 on the VHD master disk and installs Windows operating system version 1, and creates a VHD virtual disk 2 and installs Windows operating system version 2.

[0050] For example: 1. Virtual disk 1 (VHD1) has Windows operating system version 1 installed, which includes file A and file B; Virtual disk 2 (VHD2) has Windows operating system version 2 installed, which includes file A, file B and file C, and file B has been updated.

[0051] The virtual disk file comparison module first compares the file sizes of the two virtual disks, and then performs SHA1 calculation on files of the same size to find the files that are present, changed, or deleted in VHD virtual disk 2 compared to VHD virtual disk 1.

[0052] For example: 2. Suppose that file A and file B are the same size, and file B and file C are different sizes. After performing SHA1 calculation, we find that file A is the same, but file B has changed.

[0053] The changed file sector organization module: scans similar files in the changed files, organizes the sector storage of similar files, stores the same sectors of similar files and records them in file sector position 1, and places different sectors independently in file sector position 2;

[0054] 3.1 By comparing the hash values ​​of each sector of the file, if more than half of the sectors are the same, the file is determined to be a similar file. The sector record information of this similar file in the Master File Table (MFT) is modified. The same sectors of the similar files are placed in file sector position 1, and the file sector position in the MFT of the same sector points to file sector position 1. Different sectors are placed independently in file sector position 2, and the file sector position in the MFT of different sectors points to file sector position 2.

[0055] For example: 3. We scan similar sectors in the changed file (file B). Suppose that the sector position of file B in VHD1 is 10-19 and the sector position in VHD2 is 30-39. We find that sectors 10-12 are the same as sectors 30-32, and sectors 13-19 are different from sectors 33-39.

[0056] The extra file writing module: creates a differential VHD virtual disk 1diff2 based on VHD virtual disk 1, logically deletes the extra files, and writes the extra files to file sector position 3 on differential VHD virtual disk 1diff2.

[0057] 4.1. Create a differential VHD virtual disk 1diff2 based on VHD virtual disk 1. Delete any extra files from the Master File Table (MFT) of differential VHD virtual disk 1diff2. Create file metadata in the MFT of differential VHD virtual disk 1diff2, and then write the extra file data to file sector position 3 of VHD virtual disk 1diff2. Differential VHD virtual disk 1diff1 is initially empty; content is appended only when modifications are made. If no modifications are made, the content of the VHD master disk is read directly.

[0058] For example: 4.1. Delete the record for file C in the Master File Table (MFT) of Differential Virtual Disk 1diff2. Create the metadata for file C in the Master File Table (MFT) of Differential Virtual Disk 1diff2, pointing to a new sector (e.g., sector 50), and write the data of file C to that sector.

[0059] The modified file writing module: The modified file uses the same sector to write the contents of different sectors on the differential VHD virtual disk 1diff2;

[0060] The data synchronization and sharing module: creates a differential VHD virtual disk 1diff1 for VHD virtual disk 1, mounts differential VHD virtual disk 1diff1 and differential VHD virtual disk 1diff2 as system boot disks, creates a VHD directory for the data folder, and mounts it to the corresponding directory of the system disk through a soft link, so as to realize software data synchronization and sharing when switching between the two systems.

[0061] For example: 6. Create a differential disk 1diff1 for VHD1, and mount differential virtual disks 1diff1 and 1diff2 as system boot disks. Create a VHD directory for the data folder (e.g., the "Shared Data" folder under drive D), and mount it to the corresponding directory on the system disk (e.g., C:\Users\Public\Documents\SharedData) using a symbolic link. This way, software data can be synchronously shared when switching between the two systems.

[0062] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made within the scope of the claims of the present invention should be included in the scope of the present invention.

Claims

1. A multi-system space storage optimization method, characterized in that, The method includes the following steps: Step S1: Create VHD virtual disk 1 on the VHD master disk and install Windows operating system version 1; create VHD virtual disk 2 and install Windows operating system version 2. Step S2: First, compare the file sizes of the two virtual disks. For files of the same size, perform SHA1 calculation to find the files that are present in VHD virtual disk 2, the changed files, and the deleted files compared to VHD virtual disk 1. Step S3: Scan similar files in the changed files, organize the sector storage of similar files, store the same sectors of similar files and record them in file sector position 1, and place different sectors independently in file sector position 2. Step S4: Create a differential VHD virtual disk 1diff2 based on VHD virtual disk 1, logically delete the extra files, and write the extra files to file sector position 3 on differential VHD virtual disk 1diff2. Step S5: Using the same sectors, write the contents of different sectors onto the differential VHD virtual disk 1diff2. Step S6: Create a differential VHD virtual disk 1diff1 for VHD virtual disk 1, mount differential VHD virtual disk 1diff1 and differential VHD virtual disk 1diff2 as system boot disks, create a VHD directory for the data folder, and mount it to the corresponding directory of the system disk through a symbolic link to achieve software data synchronization and sharing when switching between the two systems.

2. The multi-system space storage optimization method according to claim 1, characterized in that: Step 3 further involves: comparing the hash values ​​of each sector block of the file; if more than half of the blocks are the same, the file is determined to be a similar file; the sector record information of this similar file in the Master File Table (MFT) is modified; the same sectors of the similar files are placed in file sector position 1, where the file sector position in the MFT of the same sector points to file sector position 1; different sectors are placed independently in file sector position 2, where the file sector position in the MFT of the different sectors points to file sector position 2.

3. The multi-system space storage optimization method according to claim 1, characterized in that: Step 4 further comprises: creating a differential VHD virtual disk 1diff2 based on VHD virtual disk 1, deleting the extra files in the Master File Table (MFT) of differential VHD virtual disk 1diff2, creating file metadata in the Master File Table (MFT) of differential VHD virtual disk 1diff2, and then writing the data of the extra files to the file sector position 3 of VHD virtual disk 1diff2.

4. A multi-system space storage optimization system, characterized in that, The system includes a system installation module, a virtual disk file comparison module, a changed file sector sorting module, an extra file writing module, a changed file writing module, and a data synchronization and sharing module; The system installation module: creates a VHD virtual disk 1 on the VHD master disk and installs Windows operating system version 1, and creates a VHD virtual disk 2 and installs Windows operating system version 2. The virtual disk file comparison module first compares the file sizes of the two virtual disks, and then performs SHA1 calculation on files of the same size to find the files that are present, changed, or deleted in VHD virtual disk 2 compared to VHD virtual disk 1. The changed file sector organization module: scans similar files in the changed files, organizes the sector storage of similar files, stores the same sectors of similar files and records them in file sector position 1, and places different sectors independently in file sector position 2; The extra file writing module: creates a differential VHD virtual disk 1diff2 based on VHD virtual disk 1, logically deletes the extra files, and writes the extra files to file sector position 3 on differential VHD virtual disk 1diff2. The modified file writing module: The modified file uses the same sector to write the contents of different sectors on the differential VHD virtual disk 1diff2; The data synchronization and sharing module: creates a differential VHD virtual disk 1diff1 for VHD virtual disk 1, mounts differential VHD virtual disk 1diff1 and differential VHD virtual disk 1diff2 as system boot disks, creates a VHD directory for the data folder, and mounts it to the corresponding directory of the system disk through a soft link, so as to realize software data synchronization and sharing when switching between the two systems.

5. The multi-system space storage optimization system according to claim 4, characterized in that: The modified file sector organization module further involves: comparing the hash values ​​of each sector block of the file; if more than half of the blocks are the same, the file is determined to be a similar file; the sector record information of this similar file in the Master File Table (MFT) is modified; the same sectors of the similar files are placed in file sector position 1, where the file sector position in the Master File Table (MFT) for the same sectors points to file sector position 1; different sectors are placed independently in file sector position 2, where the file sector position in the Master File Table (MFT) for different sectors points to file sector position 2.

6. The multi-system space storage optimization system according to claim 4, characterized in that: The additional file writing module further comprises: creating a differential VHD virtual disk 1diff2 based on VHD virtual disk 1; deleting the additional file in the master file table (MFT) of differential VHD virtual disk 1diff2; creating file metadata in the master file table (MFT) of differential VHD virtual disk 1diff2; and then writing the data of the additional file to the file sector position 3 of VHD virtual disk 1diff2.

Citation Information

Patent Citations

  • Apparatus, system, and method for improved data deduplication

    CN102598020A

  • System and method for reconstructing differencing virtual hard disk file to update operating systems

    CN103729203A