A method for data incremental backup and restoration based on bit operation

By using a bitwise operation-based incremental backup and restore method, the storage cost problem caused by duplicate data in traditional full backup is solved, achieving efficient data backup and restore and reducing physical storage costs.

CN115237677BActive Publication Date: 2025-12-23GUANGZHOU FAISCO INFORMATON TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210958123.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-11
Publication Date
2025-12-23
Estimated Expiration
2042-08-11

AI Technical Summary

Technical Problem

In traditional full backup and restore methods, duplicate data leads to a surge in physical storage costs, necessitating optimization of storage costs.

Method used

We adopt a bitwise operation-based incremental data backup and restore method. By using bit fields as the carrier for storing different versions of backup tasks, we leverage the efficiency advantage of bitwise operations to achieve smooth execution of data backup and restore functions.

Benefits of technology

It effectively reduces expensive physical storage costs and improves the efficiency of data backup and restoration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115237677B_ABST
    Figure CN115237677B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of data incremental backup and restoration, and particularly relates to a data incremental backup and restoration method based on bit operation. The method comprises the following steps: 1. New backup: allocating a bit value to a new backup task, and matching the bit value with the existing data in the backup library, and using the bit of the repeated data in the matching result and the bit of the new differential data of the backup task; 2. Restoring backup: querying the backup data with the set bit in the backup library according to the bit value of the backup task to restore; 3. Deleting backup: removing the position of the backup data record with the set bit value of the backup task until 0, and then physically deleting. The present application uses a bit field as a carrier for storing the differential version of the backup task, and uses bit operation to process the data storage and extraction task of the backup and restoration process, thereby saving the rapid increase of the storage space occupied by the repeated data in the full backup, and effectively simplifying the logical design cost and physical storage cost of the data backup and restoration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of incremental data backup and restoration, and particularly relates to a method for incremental data backup and restoration based on bitwise operations. Background Technology

[0002] With the frequent iterations and developments in the field of internet content data, content applications need to provide backup and restore functions for data version management in order to quickly publish innovative content and promptly revert content data (such as article data, product data, etc.). Traditional full backup and restore designs often suffer from a surge in physical storage costs due to the large amount of duplicate data. These physical storage costs, such as commonly used disks and memory, are quite expensive. Therefore, it is necessary to solve or optimize this technical problem of skyrocketing storage costs caused by duplicate data backups. Summary of the Invention

[0003] This invention addresses the aforementioned data backup and restore functions by designing and implementing a bitwise incremental data backup and restore method. This method flexibly utilizes the characteristics of bitwise operations to smoothly implement the function, while effectively reducing the physical storage cost of traditional full backup and restore.

[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0005] A method for incremental data backup and restoration based on bitwise operations, specifically including the following steps:

[0006] A. Initiate a new backup;

[0007] B. Initiate a backup restore;

[0008] C. Initiate the deletion of backup.

[0009] Preferably, step A is as follows: When a new backup is initiated, the task is pushed to the backup task queue. The backup task consumption unit reads the queue data and allocates an available bit value for the backup task through a bit right shift operation. The source data of the current backup task is matched with the existing data in the backup library. The bit of the backup task is used to perform a bitwise OR operation with the bit of the duplicate data in the matching result, and the result sets the bit of the duplicate data. For the difference data in the matching result, a new backup data record is added, and the position of the backup task is used to set the bit of the difference backup data record.

[0010] Preferably, step B is as follows: if a restore backup is initiated, the task is pushed to the restore task queue, the restore task consumption unit reads the queue data, extracts the bit value of the current restore task, and queries the backup data record that has set the bit value in the backup library for restoration based on the bit value.

[0011] As preferred, the step C is initiating to delete the backup, then pushing the task to the deletion task queue, the deletion task consumption unit reading the queue data, extracting the bit value of the current deletion task, using the bit value to delete the backup data record in the backup library with the bit set, until the bit value of the backup data record is 0, and then physically deleting the backup data record.

[0012] As preferred, the step A mainly uses the bit value allocated to the new backup task as the version association identification of the backup task and the backup data record in the backup library, so as to realize that there is only one differential data in the backup library, and the repeated data record has been simplified as a single data occupied by the result value after the bit or operation.

[0013] As preferred, the step B is that in the restoration task, the bit value of the current task is subjected to bit and operation with the bit of the backup data record in the backup library to query and filter out the backup data record corresponding to the restoration task for restoration.

[0014] As preferred, the step C is that in the deletion task, the backup data record corresponding to the current task is filtered out according to the step B, and the bit value of the current task is subjected to bit inversion operation, and then the result is subjected to bit and operation with the bit of the backup data record, which is equivalent to deleting the position corresponding to the task in the backup data record.

[0015] As preferred, in the step C, if all the backup tasks associated with the backup data record are operated to be deleted, the bit of the backup data record will be finally set to 0, and at this time, the backup data record can be physically deleted.

[0016] Compared with the prior art, the application has the advantages and positive effects that,

[0017] 1. The application uses the bit field as the carrier for storing the differential version of the backup task, has light space occupation, and has the efficiency advantage of bit operation, so as to ensure the smooth execution of the data backup and restoration function, and further reduce the cost of expensive physical storage. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0019] Figure 1 It is a schematic diagram of traditional full backup and restoration.

[0020] Figure 2 It is a schematic diagram of the data incremental backup and restoration method based on bit operation. Detailed Implementation

[0021] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0022] Numerous specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways than those described herein, and therefore the invention is not limited to the specific embodiments disclosed in the following specification.

[0023] Example 1, such as Figure 1 As shown, traditional full backup and restore designs may generate a large amount of duplicate data, putting pressure on physical storage costs. Figure 2 As shown, this invention provides a method for incremental data backup and restoration based on bitwise operations, which mainly solves the problem of soaring costs for duplicate data storage that may result when backup data versions increase.

[0024] Please see Figure 2 The diagram illustrates the flow of data between source data, backup tasks, and the backup database. In the source data, "data" refers to content data (such as article data, product data, etc., with the number following "data" indicating a data identifier). This content data is assigned a flag bit by the backup task and then stored in the backup database. The diagram shows two backup tasks, task1 and task2. During these two backup tasks, data1, data2, and data3 in the source data remain unchanged, while data4 is new source data added in task2. After bitwise operations by the backup task, bak_data1_flag3, bak_data2_flag3, and bak_data3_flag3 in the backup database correspond to the duplicate backups of data1, data2, and data3 in both tasks, while bak_data4_flag2 only corresponds to data4 in task2. The backup database retains only one copy of the differing data from the source data. Furthermore, the flag bit for each backup task is allocated a usable bit value through a right bit shift operation.

[0025] The functional steps implemented by this invention based on the flow design include:

[0026] Step s1, initiate to add backup, then push the task to the backup task queue, the backup task consumption unit reads the queue data, and assigns an available bit value to the backup task through bit right shift operation, matches the source data of the current backup task with the existing data in the backup library, performs bit or operation on the bit of the backup task and the bit of the repeated data in the matching result, and sets the bit of the repeated data.

[0027] Step s2, initiate to restore backup, then push the task to the restore task queue, the restore task consumption unit reads the queue data, extracts the bit value of the current restore task, and queries the backup data record with the set bit in the backup library according to the bit value to restore.

[0028] Step s3, initiate to delete backup, then push the task to the delete task queue, the delete task consumption unit reads the queue data, extracts the bit value of the current delete task, and sets the bit of the backup data record in the backup library to 0 until the bit value of the backup data record is 0, that is, the backup data record can be physically deleted.

[0029] The application uses a bit field as a carrier for storing backup task difference versions, has a light space occupation, has an efficiency advantage of bit operation, ensures smooth execution of data backup and restoration functions, and further reduces the cost of expensive physical storage.

[0030] Specifically, the step s1 mainly uses the bit value assigned to the new backup task as the version association identifier of the backup task and the backup data record in the backup library, so that only one difference data exists in the backup library, and the repeated data record is simplified as a single data occupied by the result value after bit or operation.

[0031] Specifically, the step s2 is that in the restore task, the bit value of the current task is subjected to bit and operation with the bit of the backup data record in the backup library to filter out the backup data record corresponding to the restore task for restoration.

[0032] Specifically, the step s3 is that in the delete task, the backup data record corresponding to the current task is filtered out according to step s2, and the bit value of the current task is subjected to bit inversion operation, and the result is subjected to bit and operation with the bit of the backup data record, which is equivalent to setting the position corresponding to the task in the backup data record to 0.

[0033] Specifically, in the step s3, if all the backup tasks associated with the backup data record are deleted, the final result of the bit of the backup data record will be set to 0, and at this time, the backup data record can be physically deleted.

[0034] The above merely describes preferred embodiments of the present application, but is not intended to limit the present application to other forms, any person skilled in the art can make changes or modifications to the above disclosed technical contents into equivalent embodiments with equivalent changes, and apply to other fields, but any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present application without departing from the technical solution content of the present application still belongs to the protection scope of the present application technical solution.

Claims

1. A method for data incremental backup and restore based on bit operation, characterized in that, Specifically comprising the following steps: A, initiate to add backup; B, initiate to restore backup; C, initiate to delete backup; The step A is: initiating to add backup, then pushing the task to the backup task queue, the backup task consumption unit reading the queue data, and allocating an available bit value to the backup task through bit right shift operation, matching the source data of the current backup task with the existing data in the backup library, and using the bit of the backup task to do bit or operation with the bit of the repeated data in the matching result, and the result setting the bit of the repeated data; for the difference data in the matching result, the backup data record is newly added, and the bit of the difference backup data record is also set by the bit of the backup task; The step B is: initiating to restore backup, querying the backup data in the backup library which sets the bit of the backup task for restoration according to the bit value of the backup task; The step C is: initiating to delete backup, setting the bit of the backup data record to 0, and then physically deleting it; The step A mainly uses the bit value allocated to the new backup task as the version association identifier of the backup task and the backup data record in the backup library, so as to realize that there is only one difference data in the backup library; The step B is: in the restoration task, the bit value of the current task is compared with the bit of the backup data record in the backup library through bit and operation to query and filter out the backup data record corresponding to the restoration task for restoration; The step C is: in the deletion task, referring to step B to filter out the backup data record corresponding to the current task, and performing bit inversion operation on the bit value of the current task, and then performing bit and operation with the bit of the backup data record, that is, setting the bit corresponding to the task in the backup data record to 0; In the step C, if all the backup tasks associated with the backup data record are deleted, the bit of the backup data record will be set to 0, and the backup data record can be physically deleted at this time.

Citation Information

Patent Citations

  • Method for incremental backup and whole roll recovery method based on block-stage

    CN101149694A

  • Method and client of data backup based on version vectors

    CN103095843A