A hard disk data backup method
By classifying and processing the data to be backed up, identifying and optimizing duplicate and compressing data, the problem of inefficient data backup in the prior art is solved, and more efficient storage and safer data backup are achieved.
Patent Information
- Application Number
- CN202411932951.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-26
AI Technical Summary
The prior art fails to fully consider the diversity and complexity of data during the data backup process, resulting in low backup efficiency, low storage resource utilization and difficulty in data recovery and management.
By classifying the data to be backed up, calculating the hash value to identify duplicate data, and secondary classification of the data types process conventional and unconventional data. Compress and bundle conventional data, generate replacement templates for duplicate data, and store them in segments and encrypted according to data time and capacity.
It improves the efficiency of data backup and the utilization of storage space, ensures data traceability and integrity, and improves the security of data backup.
Smart Images

Figure CN119356948B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of data backup, in particular to a hard disk data backup method. Background Art
[0002] With the rapid development of information technology, the amount of data generated by enterprises and individuals has exploded. As the main data storage device, the security and efficient management of hard disk data are becoming increasingly important. In the process of data backup, there are many challenges.
[0003] The patent with publication number CN114546723A discloses a data backup method for a mobile solid-state hard disk and a mobile solid-state hard disk. The data backup method for the mobile solid-state hard disk is provided with a mode switch. In the normal storage mode, the backup function of the backup area is not started, and only the storage area is used to operate the data, thereby improving the data access operation efficiency of the storage area; and in the backup mode, the backup area is started, and the storage area is coordinated with the backup area to realize the backup of incremental data in the storage area, the recovery of data in the backup area, and the deletion of related data in the backup area.
[0004] Traditional data backup methods often simply copy or compress the data in full, without fully considering the diversity and complexity of data. For example, a large amount of duplicate data takes up too much storage space during backup, reducing the utilization rate of storage resources. Different types of data have different importance and usage frequencies, and the existing backup methods fail to deal with them in a targeted manner. Moreover, for some special types of data, such as data formats that are difficult for the system to recognize or redundant compressed files generated during the backup process, there is a lack of effective screening and optimization mechanisms, resulting in inefficient backup processes and chaotic storage structures, which is not conducive to subsequent data recovery and management. Summary of the invention
[0005] In view of the deficiencies of the prior art, the present invention provides a hard disk data backup method, which solves the problem of inefficiency in the backup process due to insufficient consideration of the diversity and complexity of data and lack of effective screening and optimization mechanisms.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: a hard disk data backup method, the method specifically comprising the following steps:
[0007] Step 1: Obtain all the data to be backed up, and classify the data to be backed up to obtain classification information, and the data to be backed up includes the data type and data time of the data to be backed up;
[0008] Step 2: Process the obtained classification information and identify duplicate data by calculating hash values. At the same time, perform secondary classification on non-duplicate data according to data types to obtain regular data and non-regular data.
[0009] Step 3: Eliminate the obtained unconventional data and analyze the obtained conventional data, identify the compressed data in the conventional data and perform bundling processing to obtain a compressed bundle;
[0010] Step 4: Perform backup storage analysis on the acquired duplicate data, classify the duplicate data, replace the same duplicate data to generate a replacement template, store the replacement template, and generate backup storage information;
[0011] Step 5: Perform backup storage analysis on the obtained compressed bundle and regular data, analyze and segment the data time, split them according to the corresponding data capacity, insert encryption into the segmented data packets, and encrypt and store them in combination with the corresponding data capacity to generate backup storage information.
[0012] As a further solution of the present invention, the specific method of obtaining the classification information in step 1 is:
[0013] All the data to be backed up are labeled as i, where i=1, 2, ..., j, where j represents the number of data to be backed up. Then the data to be backed up are classified into the same type according to the data type, and the classified data of the same type are labeled as n, where n=1, 2, ..., m, where m represents the data type of the data of the same type. At the same time, the data to be backed up in the same type of data are sorted from far to near according to the data time to generate classification information.
[0014] As a further solution of the present invention, the specific method of processing the classification information in step 2 is:
[0015] Obtain classification information, and at the same time obtain any group of classification information as the analysis target, label the corresponding data to be backed up in the analysis target as a, and a=1, 2, ..., b, where b represents the number of data to be backed up of the same type, then calculate the hash value of the data to be backed up a, and filter the data to be backed up with the same hash value as duplicate data, and record the remaining data to be backed up as non-duplicate data;
[0016] Acquire all non-duplicate data, and at the same time acquire the data type of the non-duplicate data, and identify the data type to determine whether the system can identify the data type. If it can be identified, mark the corresponding non-duplicate data as regular data; if it cannot be identified, mark the corresponding non-duplicate data as unconventional data.
[0017] As a further solution of the present invention, the specific method of analyzing the conventional data in step 3 is:
[0018] Obtain all the unconventional data and directly delete the unconventional data, then obtain all the regular data and analyze whether there is compressed data in the regular data. If there is compressed data in the regular data, classify the corresponding regular data as regular compressed data; if there is no compressed data in the regular data, classify the corresponding regular data as regular non-compressed data;
[0019] Then the conventional compressed data is analyzed to determine whether there is corresponding decompressed data in the conventional compressed data. If so, the corresponding compressed data is deleted; if not, the corresponding compressed data is retained. Similarly, all conventional compressed data are analyzed to obtain all compressed data, and the compressed data is bundled to obtain a compressed bundle package.
[0020] As a further solution of the present invention, the specific method of performing backup storage analysis on duplicate data in step 4 is:
[0021] Get all duplicate data and part of the storage space on the hard disk. Get the types of duplicate data and label them as k, where k=1, 2, ..., h, where h represents the number of types of duplicate data. Then get any group of data types as analysis targets, get all duplicate data corresponding to the analysis targets, and get the data time corresponding to the duplicate data. Take the latest data time as the storage standard, generate labels for the remaining duplicate data from far to near according to the data time, store the generated labels as replacement data, and generate backup storage information.
[0022] As a further solution of the present invention, the specific method of performing backup storage analysis on the compressed bundle and conventional data in step 5 is:
[0023] Obtain the compressed bundle and regular data, and obtain the remaining storage space of the hard disk, and label the compressed bundle as N, where N=1, 2, ..., and label the regular data as M, where M=1, 2, ..., then obtain the data time corresponding to the compressed bundle N and the regular data M, and divide the data time into time periods according to time T;
[0024] Then, any time period is segmented into a target time period, and then the corresponding compressed bundle packages and regular data in the target time period are obtained, and all the compressed bundle packages and regular data are respectively combined to obtain compressed combination packages and regular data packets, and the data capacity corresponding to the compressed combination packages and regular data packets is obtained, and at the same time, the compressed combination packages and regular data packets are evenly divided according to the data capacity to obtain evenly divided compressed combination packages and evenly divided regular data packets, and the two are stored and analyzed.
[0025] As a further solution of the present invention, the specific method of storing and analyzing the equally divided compressed combined package and the equally divided regular data package in step 5 is:
[0026] Calculate the sum of the number of equally divided compressed combination packages and equally divided regular data packets, and determine the numerical property of the sum of the number. If the numerical property is an odd number, select two groups of equally divided compressed combination packages in order from small to large, and select two groups of equally divided regular data packets in order from large to small, reassemble the selected two groups of equally divided compressed combination packages and equally divided regular data packets to obtain an equally divided reassembled package, and back up and store the equally divided reassembled package to generate backup storage information;
[0027] If the numerical property is an even number, two groups of equally divided compressed combination packages are selected in order from large to small, and two groups of equally divided regular data packets are selected in order from small to large. The two selected groups of equally divided compressed combination packages and the equally divided regular data packets are reassembled to obtain an equally divided reassembled package, and backup storage is performed at the same time to generate backup storage information.
[0028] The present invention provides a hard disk data backup method. Compared with the prior art, it has the following beneficial effects:
[0029] The present invention can quickly locate and process different types of data by carefully classifying the backup data according to data type and time. For example, by sorting the same type of data by time, it is helpful to prioritize the backup of important or recent data and improve the efficiency of data management. The present invention uses hash value calculation to accurately identify duplicate data, and retains the latest data based on data time. The remaining duplicate data is generated and stored in a replacement template, which not only saves a lot of storage space, but also can restore data according to the replacement template when needed, ensuring the traceability and integrity of the data.
[0030] The regular data and the unconventional data are processed separately, and the unconventional data that the system cannot identify is eliminated. The compressed data in the regular data is further analyzed and compared with the decompressed data. Only the compressed data without corresponding decompressed data is retained and bundled, which reduces the backup data volume and improves the standardization of the data. The compressed bundle and regular data are processed according to the data time segment, and the data capacity is combined for segmentation, reorganization and encrypted storage. This can not only make full use of the hard disk storage space, but also improve the security of data backup. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a diagram of the steps of the present invention. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] Example 1: Please refer to Figure 1 The present application provides a hard disk data backup method, which specifically includes the following steps:
[0034] Step 1: Obtain all the data to be backed up, and classify the data to be backed up to obtain classification information, and the data to be backed up includes the data type and data time of the data to be backed up.
[0035] All the data to be backed up are labeled as i, where i=1, 2, ..., j, where j represents the number of data to be backed up. Then the data to be backed up are classified into the same type according to the data type, and the classified data of the same type are labeled as n, where n=1, 2, ..., m, where m represents the data type of the data of the same type. At the same time, the data to be backed up in the same type of data are sorted from far to near according to the data time to generate classification information.
[0036] For example, in an enterprise's file backup scenario, data types may include office documents (such as Word, Excel, PowerPoint files, etc.), project design (such as CAD drawings, Photoshop source files, etc.), email data, etc., where a contract document was created on March 1, 2018, a report document was created on May 10, 2020, and a meeting minutes was created on September 15, 2022. After sorting, the contract document will be ranked first and the meeting minutes will be ranked last.
[0037] Step 2: Process the obtained classification information and identify duplicate data by calculating hash values. At the same time, perform secondary classification on non-duplicate data according to data type to obtain regular data and unconventional data.
[0038] The classification information is obtained, and any group of classification information is obtained as the analysis target. The corresponding data to be backed up in the analysis target is labeled as a, and a=1, 2, ..., b, where b represents the number of data to be backed up of the same type. Then the hash value of the data to be backed up a is calculated, and there are many ways to calculate the hash value. Here, the calculation is performed by the multiplication hash method, and the data to be backed up with the same hash value are filtered and recorded as duplicate data, and the remaining data to be backed up are recorded as non-duplicate data; for example, for a group of image file classification information, there are three landscape pictures numbered a=1, a=2 and a=3 respectively, and the hash values of the three pictures are calculated. If the hash values of picture 1 and picture 3 are the same, it means that picture 1 and picture 3 are duplicate data, and the hash value of picture 2 is different from the two, then picture 2 is marked as non-duplicate data.
[0039] Acquire all non-duplicate data, and at the same time acquire the data type of the non-duplicate data, and identify the data type, and determine whether the system can identify the data type. If it can be identified, mark the corresponding non-duplicate data as regular data, and if it cannot be identified, mark the corresponding non-duplicate data as unconventional data. Specifically, for example, when using CAD for drawing, a corresponding BAK file will be generated after the CAD drawing is saved, and the generated BAK file cannot be identified by the system, and it will be further marked as unconventional data.
[0040] Step three: Eliminate the obtained unconventional data and analyze the obtained regular data at the same time, and obtain a compressed bundle package by identifying and bundling the compressed data in the regular data.
[0041] Get all the unconventional data, and directly delete the unconventional data, then get all the regular data, and analyze whether there is compressed data in the regular data. Specifically, the compressed data here refers to the compression package. If there is compressed data in the regular data, the corresponding regular data is classified as regular compressed data. If there is no compressed data in the regular data, the corresponding regular data is classified as regular non-compressed data. Specifically, if there are five groups of data in the regular data, two of which are compressed data, and the data types of the compressed data include ZIP, RAR, 7Z, TAR and GZ, etc., if the corresponding data ends with the above, it means that it is compressed data, and it is classified as regular compressed data.
[0042] Then the conventional compressed data is analyzed to determine whether there is corresponding decompressed data in the conventional compressed data. If so, the corresponding compressed data is deleted; if not, the corresponding compressed data is retained. Similarly, all conventional compressed data are analyzed to obtain all compressed data, and the compressed data is bundled to obtain a compressed bundle package.
[0043] Step 4: Perform backup storage analysis on the acquired duplicate data, classify the duplicate data, replace the same duplicate data to generate a replacement template, store the replacement template, and generate backup storage information.
[0044] All duplicate data are obtained, and part of the storage space of the hard disk is obtained, and the size of the part of the storage space here is set by the operator. At the same time, the data types of the duplicate data are obtained and labeled as k, and k=1, 2, ..., h, where h represents the number of types of duplicate data. Specifically, the same data type here contains multiple duplicate data. Then, any group of data types is obtained and recorded as the analysis target, all duplicate data corresponding to the analysis target are obtained, and the data time corresponding to the duplicate data is obtained. At the same time, the latest data time is used as the storage standard, and the remaining duplicate data is labeled from far to near according to the data time, and the generated labels are stored as replacement data, and backup storage information is generated; specifically, the replacement data represents that the data time corresponding to the duplicate data is labeled from far to near as 1, 2, ..., and finally the obtained labels are stored.
[0045] For example, if there are five groups of duplicate data in the analysis target, and the corresponding times are January 5, April 12, May 3, August 18, and November 20, the latest time, November 20, is selected as the storage standard for storage. For the remaining duplicate data, labels are generated in chronological order. Specifically, January 5 corresponds to number 1, April 12 is number 2, May 3 is number 3, and August 18 is number 4. The corresponding labels are further stored.
[0046] Step 5: Perform backup storage analysis on the obtained compressed bundle and regular data, analyze and segment the data time, split them according to the corresponding data capacity, insert encryption into the segmented data packets, and encrypt and store them in combination with the corresponding data capacity to generate backup storage information.
[0047] Obtain the compressed bundle and regular data, and obtain the remaining storage space of the hard disk, where the remaining storage space is the remaining storage space in step 4, and label the compressed bundle as N, where N=1, 2, ..., label the regular data as M, where M=1, 2, ..., then obtain the data time corresponding to the compressed bundle N and the regular data M, and divide the data time into time periods according to time T, and the specific value of time T is set by the operator;
[0048] Then, any time period is obtained to be segmented into a target time period, and then the corresponding compressed bundle packages and regular data in the target time period are obtained, and all the compressed bundle packages and regular data are respectively combined to obtain compressed combination packages and regular data packets, and the data capacities corresponding to the compressed combination packages and regular data packets are obtained, and at the same time, the compressed combination packages and regular data packets are equally divided according to the data capacities to obtain equally divided compressed combination packages and equally divided regular data packets, and the number of equally divided packets here is determined by the greatest common factor of the data capacities of the corresponding compressed combination packages and regular data packets, for example, if the greatest common factor of the compressed combination packages is 7, then the number of compressed combination packages is 7 groups, and if the greatest common factor of the regular data packets is 8, then the number of regular data packets is 8 groups;
[0049] Calculate the sum of the numbers of evenly divided compressed combination packages and evenly divided regular data packets, and the sum here is expressed as the sum of the numbers after equal division, and judge the numerical property of the sum. If the numerical property is an odd number, select two groups of evenly divided compressed combination packages in order from small to large, and select two groups of evenly divided regular data packets in order from large to small, reassemble the two selected groups of evenly divided compressed combination packages and evenly divided regular data packets to obtain an evenly divided reassembled package, and back up and store the evenly divided reassembled package to generate backup storage information. If the numerical property is an even number, select two groups of evenly divided compressed combination packages in order from large to small, and select two groups of evenly divided regular data packets in order from small to large, reassemble the two selected groups of evenly divided compressed combination packages and evenly divided regular data packets to obtain an evenly divided reassembled package, and back up and store them at the same time to generate backup storage information.
[0050] Embodiment 2: Embodiment 2 of the present invention is implemented on the basis of Embodiment 1, and the difference from Embodiment 1 is as follows:
[0051] The division of the hard disk storage space is different from that in the first embodiment. In this embodiment, the division is performed by analyzing the data capacity ratio of duplicate data to non-duplicate data, and the non-duplicate data here mainly includes compressed data and regular data.
[0052] Embodiment 3: As the embodiment 3 of the present invention, the focus is on combining the implementation processes of embodiment 1 and embodiment 2 for implementation.
[0053] Some of the data in the above formulas are numerically calculated by removing their dimensions. Meanwhile, the contents not described in detail in this specification belong to the prior art known to those skilled in the art.
[0054] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A hard disk data backup method, characterized in that: The method specifically comprises the following steps: Step 1: Obtain all the data to be backed up, and classify the data to be backed up to obtain classification information, and the data to be backed up includes the data type and data time of the data to be backed up; Step 2: Process the obtained classification information and identify duplicate data by calculating the hash value. At the same time, perform secondary classification on the non-duplicate data according to the data type to obtain regular data and irregular data. The specific processing method is as follows: Obtain classification information, and at the same time obtain any group of classification information as the analysis target, label the corresponding data to be backed up in the analysis target as a, and a=1, 2, ..., b, where b represents the number of data to be backed up of the same type, then calculate the hash value of the data to be backed up a, and filter the data to be backed up with the same hash value as duplicate data, and record the remaining data to be backed up as non-duplicate data; Acquire all non-duplicate data, and at the same time acquire the data type of the non-duplicate data, and identify the data type to determine whether the system can identify the data type. If it can be identified, mark the corresponding non-duplicate data as regular data; if it cannot be identified, mark the corresponding non-duplicate data as irregular data; Obtain all the unconventional data and directly delete the unconventional data, then obtain all the regular data and analyze whether there is compressed data in the regular data. If there is compressed data in the regular data, classify the corresponding regular data as regular compressed data; if there is no compressed data in the regular data, classify the corresponding regular data as regular non-compressed data; Then, the conventional compressed data is analyzed to determine whether the compressed data in the conventional compressed data has corresponding decompressed data. If so, the corresponding compressed data is deleted; if not, the corresponding compressed data is retained. All conventional compressed data are analyzed in this way, and all compressed data are obtained. At the same time, the compressed data are bundled to obtain a compressed bundle package. Step 3: Eliminate the obtained unconventional data and analyze the obtained conventional data, identify the compressed data in the conventional data and perform bundling processing to obtain a compressed bundle; Step 4: Perform backup storage analysis on the acquired duplicate data, classify the duplicate data, replace the same duplicate data to generate a replacement template, store the replacement template, and generate backup storage information; Step 5: Perform backup storage analysis on the compressed bundle and regular data obtained, analyze and segment the data time, and segment according to the corresponding data capacity, insert and encrypt the segmented data packets, and encrypt and store them in combination with the corresponding data capacity to generate backup storage information. The specific processing method is as follows: Obtain the compressed bundle and regular data, and obtain the remaining storage space of the hard disk, and label the compressed bundle as N, where N=1, 2, ..., and label the regular data as M, where M=1, 2, ..., then obtain the data time corresponding to the compressed bundle N and the regular data M, and divide the data time into time periods according to time T; Then, any time period is segmented into a target time period, and then the corresponding compressed bundle packages and regular data in the target time period are obtained, and all the compressed bundle packages and regular data are respectively combined to obtain compressed combination packages and regular data packets, and the data capacity corresponding to the compressed combination packages and regular data packets is obtained, and at the same time, the compressed combination packages and regular data packets are evenly divided according to the data capacity to obtain evenly divided compressed combination packages and evenly divided regular data packets, and the two are stored and analyzed; Calculate the sum of the number of equally divided compressed combination packages and equally divided regular data packets, and determine the numerical property of the sum of the number. If the numerical property is an odd number, select two groups of equally divided compressed combination packages in order from small to large, and select two groups of equally divided regular data packets in order from large to small, reassemble the selected two groups of equally divided compressed combination packages and equally divided regular data packets to obtain an equally divided reassembled package, and back up and store the equally divided reassembled package to generate backup storage information; If the numerical property is an even number, two groups of equally divided compressed combination packages are selected in order from large to small, and two groups of equally divided regular data packets are selected in order from small to large. The two selected groups of equally divided compressed combination packages and the equally divided regular data packets are reassembled to obtain an equally divided reassembled package, and backup storage is performed at the same time to generate backup storage information.
2. A hard disk data backup method according to claim 1, characterized in that: The specific method of obtaining the classification information in step 1 is: All the data to be backed up are labeled as i, where i=1, 2, ..., j, where j represents the number of data to be backed up. Then the data to be backed up are classified into the same type according to the data type, and the classified data of the same type are labeled as n, where n=1, 2, ..., m, where m represents the data type of the data of the same type. At the same time, the data to be backed up in the same type of data are sorted from far to near according to the data time to generate classification information.
3. A hard disk data backup method according to claim 1, characterized in that: The specific method of backing up and storing duplicate data in step 4 is as follows: Get all duplicate data and part of the storage space on the hard disk. Get the types of duplicate data and label them as k, where k=1, 2, ..., h, where h represents the number of types of duplicate data. Then get any group of data types as analysis targets, get all duplicate data corresponding to the analysis targets, and get the data time corresponding to the duplicate data. Take the latest data time as the storage standard, generate labels for the remaining duplicate data from far to near according to the data time, store the generated labels as replacement data, and generate backup storage information.
Citation Information
Patent Citations
Data backup method of mobile solid state disk and mobile solid state disk
CN114546723A
Three-dimensional model data management system and method for engineering surveying and mapping
CN118885545A
Workshop production data management method and system
CN119089281A