A data backup storage method and system
By setting up the main server and backup server in different geographical locations, and data splitting and different data block transmission on the main server, the high cost, privacy and security problems of data backup storage are solved, and dual storage and efficient backup of data are realized.
Patent Information
- Application Number
- CN202510466593.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-04-15
AI Technical Summary
The prior art has high economic costs, labor costs, data privacy and security problems in data backup and storage, especially when facing natural disasters, data loss and other situations.
By setting the main server and the backup server in different geographical locations, and dividing the storage space of the main server into fixed storage space and temporary storage space, data splitting and different data block transmission are carried out to achieve dual storage and efficient backup of data.
Reduces the cost and time of data backup storage, improves data privacy and security, and ensures enterprise data recovery capabilities when data is lost or inaccessible.
Smart Images

Figure CN119988102B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of computers and data backup, and particularly to a data backup storage method and system. Background Art
[0002] With the development of computer technology, many enterprises have transformed from paper-based data to electronic data. Compared with the physical storage of paper-based data directly, electronic data needs to be virtually stored, and the corresponding electronic data needs to be stored in a server. Then, since a single server can centrally store a large amount of electronic data, when the server suffers from irresistible natural disasters such as fires and floods, or when the server encounters data disasters such as viruses, network communication failures, software and hardware failures, and human operation errors, it may lead to problems such as the server being inaccessible or data loss, directly causing immeasurable losses to the normal operation of the enterprise. Therefore, at present, most enterprises will perform backup storage on the original electronic data to ensure data integrity. However, due to the large amount of electronic data of many enterprises, the economic cost and human cost spent by enterprises in data backup storage are relatively high, so it is necessary to reduce the cost of enterprises in data backup storage. In addition, since the electronic data of many enterprises also involves the business information of the corresponding enterprises, if data leakage occurs, it will also affect the normal operation of the enterprises. Therefore, it is necessary to ensure the data privacy and security issues during data backup storage. Summary of the Invention
[0003] In view of the above-mentioned disadvantages of the prior art, the purpose of the present invention is to provide a data backup storage method and system for solving the technical problems existing in the prior art.
[0004] To achieve the above object and other related objects, the present invention provides a data backup storage method, including the following steps:
[0005] Configure the storage space of the main server, and divide the storage space of the main server into a fixed storage space and a temporary storage space;
[0006] Add the original data to the fixed storage space for permanent storage, and add the original data to the temporary storage space for temporary caching;
[0007] In the temporary storage space, split the original data temporarily cached in the current backup time period to obtain a plurality of data blocks; and, in the temporary storage space, compare the source data blocks and the target data blocks, and use the target data blocks with differences as differential data blocks; wherein, the source data blocks are the data blocks obtained during data splitting in the previous backup time period, and the target data blocks are the data blocks obtained during data splitting in the current backup time period;
[0008] Transferring the differential data blocks from the primary server to the backup server for backup storage includes: sorting and numbering all the differential data blocks in the temporary storage space in the order of the data block generation time; correlating all the differential data blocks in the temporary storage space according to the numbering result to obtain a differential data block sequence; if the transferred differential data blocks are different from the differential data block sequence, locating the last transferred differential data block in the transmission process, and taking the numbering result corresponding to this differential data block as the starting number, and recording all the differential data blocks after the starting number as missing data blocks; retransmitting the missing data blocks to the backup server in the order corresponding to the numbering result until the transferred differential data blocks are exactly the same as the differential data block sequence.
[0009] Optionally, the process of transferring the differential data blocks from the primary server to the backup server for backup storage further includes:
[0010] Recording the transmission time, and comparing the transferred differential data blocks with the differential data block sequence when the transmission time is greater than or equal to a preset time;
[0011] If the transferred differential data blocks are exactly the same as the differential data block sequence, outputting a transmission completion message, so that the primary server deletes the original data temporarily cached in the current backup time period and the data blocks obtained during data splitting in the previous backup time period from the temporary storage space according to the transmission completion message.
[0012] Optionally, the method further includes:
[0013] Establishing a block index for all the differential data blocks in the temporary storage space according to the numbering result, and transmitting all the block indexes to the backup server before transmitting the differential data blocks; wherein, the block index contains the position information of the differential data block, and a single block index corresponds to a single differential data block;
[0014] After completing the transmission of all the block indexes, start transferring the differential data blocks from the primary server to the backup server; and,
[0015] When the transmission time is greater than or equal to the preset time, performing differential data block matching in the backup server according to the block index;
[0016] If there is no uncompleted matching block index, inserting the differential data blocks transmitted in the current backup time period into the data block sequence backed up in the previous backup time period according to the position information contained in the block index to perform backup storage of the original data in the backup server;
[0017] If there is an uncompleted matching block index, mark the uncompleted matching block index as a free index, feedback to the master server that there is a packet loss in the transmission process of the differential data block, and retransmit the differential data block corresponding to the free index through the master server until the differential data block matching for the free index is completed.
[0018] Optionally, the method further includes:
[0019] When retransmitting the missing data blocks to the backup server in the order corresponding to the numbering result, compress the missing data blocks; and / or, when retransmitting the differential data block corresponding to the free index through the master server, compress the differential data block corresponding to the free index;
[0020] The backup server decompresses the received compressed differential data block.
[0021] Optionally, the method further includes:
[0022] Configure an encryption character in the master server and a decryption character corresponding to the encryption character in the backup server;
[0023] Encrypt the original data temporarily cached in the temporary storage space during the current backup period using the encryption character, and perform data splitting based on the encryption result; and,
[0024] After the differential data block transmitted during the current backup period is successfully inserted into the data block sequence backed up in the previous backup period, decrypt the differential data block transmitted during the current backup period using the decryption character to perform backup storage of the original data in the backup server.
[0025] Optionally, the method further includes:
[0026] Obtain the enterprise information of the enterprise, where the enterprise information includes: enterprise credit code information, enterprise organization code information, and / or enterprise industrial and commercial registration number information;
[0027] Generate the encryption character and the decryption character according to the enterprise information.
[0028] Optionally, the method further includes: deleting the original data temporarily cached in the current backup period and the data blocks obtained during data splitting in the previous backup period from the temporary storage space; wherein, the backup server and the master server are set in different geographical locations.
[0029] The present invention also provides a data backup storage system, and the system includes:
[0030] A storage space configuration module for configuring the storage space of the primary server, dividing the storage space of the primary server into a fixed storage space and a temporary storage space;
[0031] A raw data storage module for adding raw data to the fixed storage space for permanent storage and adding the raw data to the temporary storage space for temporary caching;
[0032] A data splitting and comparison module for splitting the raw data temporarily cached in the temporary storage space during the current backup period to obtain a plurality of data blocks; and comparing the source data blocks and the target data blocks in the temporary storage space, and taking the target data blocks with differences as differential data blocks; wherein, the source data blocks are the data blocks obtained during data splitting in the previous backup period, and the target data blocks are the data blocks obtained during data splitting in the current backup period;
[0033] A data backup storage module for transmitting the differential data blocks from the primary server to the backup server for backup storage, including: sorting and numbering all the differential data blocks in the temporary storage space according to the chronological order of the data block generation time; associating all the differential data blocks in the temporary storage space according to the numbering result to obtain a differential data block sequence; if the transmitted differential data blocks are different from the differential data block sequence, locate the last differential data block completed in the transmission process, and take the numbering result corresponding to the differential data block as the starting number, and record all the differential data blocks after the starting number as missing data blocks; and re-transmit the missing data blocks to the backup server in the order corresponding to the numbering result until the transmitted differential data blocks are exactly the same as the differential data block sequence.
[0034] Optionally, the process of the data backup storage module transmitting the differential data blocks from the primary server to the backup server for backup storage further includes:
[0035] Recording the transmission time, and comparing the transmitted differential data blocks with the differential data block sequence when the transmission time is greater than or equal to the preset time;
[0036] If the transmitted differential data blocks are exactly the same as the differential data block sequence, output a transmission completion message, so that the primary server deletes the raw data temporarily cached in the temporary storage space during the current backup period and the data blocks obtained during data splitting in the previous backup period according to the transmission completion message;
[0037] And, delete the original data temporarily cached in the current backup time period and the data blocks obtained during data splitting in the previous backup time period from the temporary storage space; wherein, the backup server and the primary server are set in different geographical locations.
[0038] Optionally, the system further includes:
[0039] Establish a block index for all differential data blocks in the temporary storage space according to the numbering result, and before transmitting the differential data blocks, first transmit all block indexes to the backup server; wherein, the block index contains the location information of the differential data blocks, and a single block index corresponds to a single differential data block;
[0040] After completing the transmission of all block indexes, start transmitting the differential data blocks from the primary server to the backup server; and,
[0041] When the transmission time is greater than or equal to the preset time, perform differential data block matching in the backup server according to the block index;
[0042] If there is no block index that has not completed matching, insert the differential data blocks transmitted in the current backup time period into the data block sequence backed up in the previous backup time period according to the location information contained in the block index, so as to perform backup storage of the original data in the backup server;
[0043] If there is a block index that has not completed matching, record the block index that has not completed matching as an idle index, and feedback that there is a packet loss in the transmission process of the differential data blocks to the primary server, and re-transmit the differential data blocks corresponding to the idle index through the primary server until the idle index completes the differential data block matching.
[0044] As described above, the present invention provides a data backup storage method and system, which has the following beneficial effects: First, the electronic data generated by an enterprise is recorded as original data. Then, the servers preset for storing data are divided into a primary server and a backup server, and the primary server and the backup server are set at different geographical locations, and the geographical distance between the primary server and the backup server is greater than or equal to a preset distance. Next, the storage space of the primary server is configured, and the storage space of the primary server is divided into a fixed storage space and a temporary storage space. At the same time, the original data is added to the fixed storage space for permanent storage, and the original data is added to the temporary storage space for temporary caching. Then, the original data temporarily cached in the temporary storage space during the current backup period is split into multiple data blocks. And, the source data blocks and the target data blocks are compared in the temporary storage space, and the target data blocks with differences are used as differential data blocks. Among them, the source data blocks are the data blocks obtained when data splitting was performed during the previous backup period, and the target data blocks are the data blocks obtained when data splitting was performed during the current backup period. Finally, the differential data blocks are transmitted from the primary server to the backup server for backup storage, and after the transmission is completed, the original data temporarily cached in the temporary storage space during the current backup period and the data blocks obtained when data splitting was performed during the previous backup period are deleted from the temporary storage space. It can be seen from this that by setting the primary server and the backup server, on the one hand, the primary server can be used to permanently store the original data in electronic form generated by the enterprise during the production and operation process, and on the other hand, the backup server can be used for backup storage, so that the original data can be stored doubly by the primary server and the backup server, strengthening the data storage work of the enterprise. Moreover, by setting the primary server and the backup server at different geographical locations, the probability that the primary server and the backup server have problems at the same time can be reduced; and since the backup server makes a complete backup of the original data, even if data loss or inaccessibility occurs after the primary server fails, the enterprise can recover the data through the backup server, thus not affecting the normal operation of the enterprise. At the same time, by splitting the original data into multiple data blocks, then comparing the differences between the data blocks obtained after data splitting between the previous backup period and the current backup period, and only transmitting the data blocks with differences during the current backup period during the backup transmission process, compared with the prior art that needs to transmit the entire original data, the present invention can ensure that while the backup server can backup all the original data, it can also save the communication traffic used by the original data during the backup process, not only reducing the cost of the enterprise in data backup, but also accelerating the backup storage efficiency of the original data and shortening the backup storage time of the original data.After the main server completes the backup storage of the original data for the current backup time period, it will delete the original data temporarily cached for the current backup time period and the data blocks obtained during data splitting in the previous backup time period from the temporary storage space, thereby being able to release the temporary storage space of the main server and reduce the occupation of the storage space of the main server due to the data backup task. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 FIG. is a schematic flow chart of a data backup storage method provided by an embodiment of the present invention;
[0046] Figure 2 FIG. is a schematic connection diagram of a main server and a backup server provided by an embodiment of the present invention;
[0047] Figure 3 FIG. is a schematic hardware structure diagram of a data backup storage system provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0048] The following specifically describes the embodiments of the present invention through specific examples. Those skilled in the art can easily understand the other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0049] It should be noted that the diagrams provided in this embodiment only illustrate the basic concept of the present invention in a schematic manner. Therefore, only the components related to the present invention are shown in the diagrams, rather than being drawn according to the number, shape, and size of the components in actual implementation. The type, quantity, and ratio of each component in actual implementation can be arbitrarily changed, and the component layout type may also be more complex.
[0050] Please refer to Figure 1 As shown, this embodiment provides a data backup storage method, including the following steps:
[0051] S110. Obtain the electronic data generated by the enterprise and record it as the original data. As an example, in this embodiment or other embodiments, the electronic data generated by the enterprise can be specifically defined according to the actual situation of different enterprises, which is not limited here. For example, the code log data and software operation data presented in electronic form during software development by a software enterprise can be used as the original data, or the program code data and product parameter data presented in electronic form during industrial product manufacturing by a manufacturing enterprise can be used as the original data. Additionally, the financial data, contract data, etc. presented in electronic form by a software enterprise, a manufacturing enterprise, or other enterprises can also be used as the original data.
[0052] S120. Divide the pre-set data storage server into a primary server and a backup server, and set the primary server and the backup server at different geographical locations, and the geographical distance between the primary server and the backup server is greater than or equal to the preset distance. As an example, in this embodiment or other embodiments, the primary server and the backup server can use the same type of server or different types of servers. The enterprise can make corresponding selections according to different backup requirements, which will not be elaborated here. If the enterprise selects different types of servers as the primary server and the backup server, the storage space capacity of the backup server needs to be larger than that of the primary server so that the backup server can fully back up the original data. At the same time, the number of backup servers can be set according to the actual situation. For example, when the primary server and the backup server are of the same type of server, two backup servers can be set, and the geographical distance between these two backup servers is equal to the geographical distance between any one of the backup servers and the primary server. As an example, in this embodiment or other embodiments, the preset distance can be set according to the actual situation, and no specific numerical limit is provided here. For example, the preset distance can be set to 50 kilometers, or it can be set to 200 kilometers, or it can also be set to 500 kilometers. As Figure 2 shown, for a certain primary server A, there is a corresponding backup server B, and under the condition that the preset distance is set to 50 kilometers, the geographical distance between the primary server A and the backup server B is 70 kilometers.
[0053] S130. Configure the storage space of the primary server, and divide the storage space of the primary server into a fixed storage space and a temporary storage space. As an example, in this embodiment or other embodiments, the fixed storage space and the temporary storage space can be set according to actual situations, and no specific limitation is made here. For example, 50% of the storage space of the primary server can be used as the fixed storage space, and the other 50% of the storage space can be used as the temporary storage space; or 70% of the storage space of the primary server can be used as the fixed storage space, and the other 30% of the storage space can be used as the temporary storage space; or 85% of the storage space of the primary server can be used as the fixed storage space, and the other 15% of the storage space can be used as the temporary storage space. As an example, in this embodiment or other embodiments, when configuring the storage space of the primary server, it can be configured only once or multiple times. For example, when the fixed storage space is insufficient but there is idle space in the temporary storage space, the storage space of the primary server can be configured again to reduce the capacity of the temporary storage space and increase the capacity of the fixed storage space. Similarly, when there is idle space in the fixed storage space but the temporary storage space is insufficient, the storage space of the primary server can be configured again to reduce the capacity of the fixed storage space and increase the capacity of the temporary storage space. Therefore, the storage space allocation and the number of configurations when configuring the storage space of the primary server can be determined according to actual situations, and no further elaboration is provided here.
[0054] S140. Add the original data to the fixed storage space for permanent storage, and add the original data to the temporary storage space for temporary caching.
[0055] S150. Split the original data temporarily cached in the temporary storage space during the current backup period to obtain multiple data blocks; and compare the source data blocks and the target data blocks in the temporary storage space, and use the target data blocks with differences as differential data blocks. Here, the source data blocks are the data blocks obtained during data splitting in the previous backup period, and the target data blocks are the data blocks obtained during data splitting in the current backup period. As an example, in this embodiment or other embodiments, the specific duration of the backup period can be flexibly set by the enterprise according to different backup requirements, and the total duration of a single backup period needs to ensure that the corresponding data can be completely backed up.
[0056] S160. Transmit the differential data blocks from the primary server to the backup server for backup storage, and delete the original data temporarily cached in the temporary storage space during the current backup period and the data blocks obtained during data splitting in the previous backup period after the transmission is completed.
[0057] According to the above description, in an exemplary embodiment, the process of step S160 for transmitting the differential data blocks from the primary server to the backup server for backup storage includes: sorting and numbering all the differential data blocks in the temporary storage space in the order of the data block generation time. As an example, in this embodiment or other embodiments, when numbering all the differential data blocks in the temporary storage space, the numbering can be performed according to the sorting result, and the earlier the data block generation time, the earlier the corresponding sorting result and the smaller the number. Among them, when numbering, the numbering can start from the number 0, and the subsequent differential data blocks are numbered in an incrementing manner. Then, all the differential data blocks in the temporary storage space are associated according to the numbering result to obtain a differential data block sequence; and, record the transmission time, and when the transmission time is greater than or equal to the preset time, compare the transmitted differential data blocks with the differential data block sequence. If the transmitted differential data blocks are exactly the same as the differential data block sequence, output a transmission completion message, so that the primary server deletes the original data temporarily cached in the current backup period and the data blocks obtained during data splitting in the previous backup period from the temporary storage space according to the transmission completion message. If the transmitted differential data blocks are not the same as the differential data block sequence, locate the last successfully transmitted differential data block during the transmission process, and take the numbering result corresponding to this differential data block as the starting number, and record all the differential data blocks after the starting number as missing data blocks; and re-transmit the missing data blocks to the backup server in the order corresponding to the numbering result until the transmitted differential data blocks are exactly the same as the differential data block sequence. As an example, in this embodiment or other embodiments, the preset time can be set by the enterprise according to actual needs, and no specific numerical limit is provided here. Among them, the duration of the preset time cannot be higher than one-fifth of the total duration of a single backup period, so that when the transmitted differential data blocks are not the same as the differential data block sequence, the primary server can use the remaining backup duration to transmit the missing data blocks. If the total transmission time for transmitting all the differential data blocks in the current backup period exceeds the total duration of the current backup period and the transmitted differential data blocks are still not the same as the differential data block sequence at this time, the primary server can send an alarm message of "backup failure" to the enterprise management personnel, so that the corresponding enterprise management personnel can extend the current backup period to ensure that the original data in each backup period can be fully backed up. It can be seen that when the transmitted differential data blocks are not the same as the differential data block sequence, this embodiment only needs to transmit the remaining differential data blocks and does not need to re-transmit all the differential data blocks in the current backup period, which can not only save the communication traffic during the backup process, reduce the enterprise's cost in data backup, but also improve the backup storage efficiency and shorten the backup storage time.
[0058] According to the above description, in an exemplary embodiment, the data backup storage method may further include: establishing a block index for all differential data blocks in the temporary storage space according to the numbering result, and before transmitting the differential data blocks, first transmitting all the block indexes to the backup server; wherein, the block index includes the position information of the differential data blocks, and a single block index corresponds to a single differential data block; after all the block indexes are transmitted, start transmitting the differential data blocks from the primary server to the backup server; and when the transmission time is greater than or equal to the preset time, perform differential data block matching in the backup server according to the block index; if there is no block index that has not been matched, insert the differential data blocks transmitted during the current backup period into the data block sequence backed up in the previous backup period according to the position information included in the block index, so as to perform backup storage of the original data in the backup server; if there is a block index that has not been matched, mark the unmatched block index as a free index, and feedback to the primary server that there is a packet loss in the transmission process of the differential data blocks, and re-transmit the differential data blocks corresponding to the free index through the primary server until the free index completes the differential data block matching. It can be seen that by establishing a block index for all differential data blocks in the temporary storage space and transmitting all the block indexes before transmitting the differential data blocks, so that after the backup server receives all the differential data blocks, it can directly perform differential data block matching according to the block index, and then insert the corresponding differential data blocks into the data block sequence backed up in the previous backup period according to the position information included in the block index, avoiding situations such as disordered backup in the current backup period. At the same time, for the unmatched block index, the backup server feedbacks to the primary server that there is a packet loss in the transmission process of the differential data blocks, and then the primary server re-transmits the differential data blocks corresponding to the free index, without needing to re-transmit all the differential data blocks in the current backup period. This not only saves the communication traffic in the backup process, reduces the cost of the enterprise in data backup, but also improves the backup storage efficiency and shortens the backup storage time.
[0059] According to the above description, in an exemplary embodiment, the data backup storage method may further include: compressing the missing data blocks when re-transmitting the missing data blocks to the backup server in the order corresponding to the numbering result; and / or, compressing the differential data blocks corresponding to the free index when re-transmitting the differential data blocks corresponding to the free index through the primary server; decompressing the received compressed differential data blocks by the backup server. It can be seen that by compressing the missing data blocks and / or compressing the differential data blocks corresponding to the free index, and then transmitting the compressed differential data blocks, compared with directly transmitting the uncompressed differential data blocks, since the storage capacity of the compressed differential data blocks is smaller than that before compression, the backup storage efficiency can be improved and the backup storage time can be shortened.
[0060] According to the above description, in an exemplary embodiment, the data backup storage method may further include: configuring an encryption character in the primary server and a decryption character corresponding to the encryption character in the backup server; encrypting the original data temporarily cached in the temporary storage space during the current backup time period using the encryption character, and performing data splitting based on the encryption result; and after the differential data blocks transmitted during the current backup time period are successfully inserted into the data block sequence backed up during the previous backup time period, decrypting the differential data blocks transmitted during the current backup time period using the decryption character to perform backup storage of the original data in the backup server. As an example, in this embodiment or other embodiments, the process of generating the encryption character and the decryption character may be: obtaining the enterprise information of the enterprise, where the enterprise information includes but is not limited to enterprise credit code information, enterprise organization code information, and / or enterprise industrial and commercial registration number information; generating the encryption character and the decryption character according to the enterprise information. As an example, in this embodiment or other embodiments, when generating the encryption character and the decryption character according to the enterprise information, existing encryption and decryption algorithm technologies may be used to complete, and the encryption and decryption algorithms are not specifically limited herein. It can be seen that by encrypting the original data temporarily cached in the temporary storage space using the encryption character, it can be ensured that during the backup process of the original data, even if there are situations such as communication hijacking on the communication transmission link, the original data of the enterprise will not be directly leaked, thereby ensuring the data privacy and security of the enterprise during data backup storage. At the same time, by separately setting the encryption character and the decryption character on the primary server and the backup server, the security during data transmission can be further increased. In addition, using the enterprise information to generate the encryption character and the decryption character can ensure the uniqueness of the corresponding encryption character and decryption character and increase the difficulty of password cracking.
[0061] In summary, the present invention provides a data backup storage method. First, the electronic data generated by an enterprise is recorded as original data. Then, the servers preset for storing data are divided into a primary server and a backup server, and the primary server and the backup server are set at different geographical locations, and the geographical distance between the primary server and the backup server is greater than or equal to a preset distance. Next, the storage space of the primary server is configured, and the storage space of the primary server is divided into a fixed storage space and a temporary storage space. At the same time, the original data is added to the fixed storage space for permanent storage, and the original data is added to the temporary storage space for temporary caching. Then, the original data temporarily cached in the temporary storage space during the current backup time period is split into multiple data blocks. And, the source data blocks and the target data blocks are compared in the temporary storage space, and the target data blocks with differences are used as differential data blocks. Among them, the source data blocks are the data blocks obtained when data splitting was performed during the previous backup time period, and the target data blocks are the data blocks obtained when data splitting was performed during the current backup time period. Finally, the differential data blocks are transmitted from the primary server to the backup server for backup storage, and after the transmission is completed, the original data temporarily cached in the temporary storage space during the current backup time period and the data blocks obtained when data splitting was performed during the previous backup time period are deleted from the temporary storage space. It can be seen from this that by setting the primary server and the backup server, on the one hand, the primary server can be used to permanently store the original data in electronic form generated by the enterprise during the production and operation process, and on the other hand, the backup server can be used for backup storage, so that dual storage of the original data can be achieved by using the primary server and the backup server, strengthening the enterprise's data storage work. Moreover, by setting the primary server and the backup server at different geographical locations, the probability of problems occurring in both the primary server and the backup server at the same time can be reduced. And since the backup server makes a complete backup of the original data, even if data loss or inaccessibility occurs after the primary server fails, the enterprise can recover the data through the backup server, thus not affecting the normal operation of the enterprise. At the same time, by splitting the original data into multiple data blocks, then comparing the differences between the data blocks obtained after data splitting between the previous backup time period and the current backup time period, and only transmitting the data blocks with differences during the current backup time period during the backup transmission process, compared with the prior art that needs to transmit the entire original data, this method can ensure that while the backup server can backup all the original data, it can also save the communication traffic used by the original data during the backup process, not only reducing the enterprise's cost in data backup, but also accelerating the backup storage efficiency of the original data and shortening the backup storage time of the original data.After the method completes the backup storage of the original data in the current backup time period on the primary server, it will delete the original data temporarily cached in the current backup time period and the data blocks obtained during data splitting in the previous backup time period from the temporary storage space, thereby being able to free up the temporary storage space of the primary server and reduce the occupation of the storage space of the primary server due to the data backup task.
[0062] As Figure 3 shown, in another exemplary embodiment of the present invention, there is also provided a data backup storage system, including:
[0063] A data acquisition module 310, configured to acquire the electronic data generated by an enterprise and record it as the original data. As an example, in this embodiment or other embodiments, the electronic data generated by the enterprise can be specifically defined according to the actual situation of different enterprises, and no limitation is made here. For example, the code log data and software operation data presented in electronic form during software development by a software enterprise can be used as the original data, or the program code data and product parameter data presented in electronic form during industrial product manufacturing by a manufacturing enterprise can be used as the original data, or the financial data, contract data, etc. presented in electronic form by a software enterprise, a manufacturing enterprise, or other enterprises can be used as the original data.
[0064] A server module 320, configured to divide the servers preset for storing data into a primary server and a backup server, and set the primary server and the backup server at different geographical locations, and the geographical location distance between the primary server and the backup server is greater than or equal to a preset distance. As an example, in this embodiment or other embodiments, the primary server and the backup server can adopt the same type of server or different types of servers, and the enterprise can make corresponding selections according to different backup requirements, which will not be specifically elaborated here. If the enterprise selects different types of servers as the primary server and the backup server, the storage space capacity of the backup server needs to be greater than that of the primary server so that the backup server can perform a complete backup of the original data. At the same time, the number of backup servers can be set according to the actual situation. For example, when the primary server and the backup server are of the same type of server, two backup servers can be set, and the geographical location distance between these two backup servers is equal to the geographical location distance between any one of the backup servers and the primary server. As an example, in this embodiment or other embodiments, the preset distance can be set according to the actual situation, and no specific numerical limitation is made here. For example, the preset distance can be set to 50 kilometers, or it can be set to 200 kilometers, or it can also be set to 500 kilometers. As Figure 2As shown, for a certain master server A, there is a corresponding backup server B, and under the condition that the preset distance is set to 50 kilometers, the geographical location distance between the master server A and the backup server B is 70 kilometers.
[0065] The storage space configuration module 330 is used to configure the storage space of the master server, and divide the storage space of the master server into a fixed storage space and a temporary storage space. As an example, in this embodiment or other embodiments, the fixed storage space and the temporary storage space can be set according to the actual situation, and no specific limitation is made here. For example, 50% of the storage space of the master server can be used as the fixed storage space, and the other 50% of the storage space can be used as the temporary storage space; or 70% of the storage space of the master server can be used as the fixed storage space, and the other 30% of the storage space can be used as the temporary storage space; or 85% of the storage space of the master server can be used as the fixed storage space, and the other 15% of the storage space can be used as the temporary storage space. As an example, in this embodiment or other embodiments, when configuring the storage space of the master server, it can be configured only once or multiple times. For example, when the fixed storage space is not enough, but there is idle space in the temporary storage space, the storage space of the master server can be configured again to reduce the capacity of the temporary storage space and increase the capacity of the fixed storage space. Similarly, when there is idle space in the fixed storage space, but the temporary storage space is not enough, the storage space of the master server can be configured again to reduce the capacity of the fixed storage space and increase the capacity of the temporary storage space. Therefore, the storage space allocation and the number of configurations when configuring the storage space of the master server can be determined according to the actual situation, and will not be elaborated here.
[0066] The original data storage module 340 is used to add the original data to the fixed storage space for permanent storage, and add the original data to the temporary storage space for temporary caching;
[0067] The data splitting and comparison module 350 is used to split the original data temporarily cached in the temporary storage space during the current backup period to obtain multiple data blocks; and, compare the source data block and the target data block in the temporary storage space, and use the target data block with differences as the differential data block; where the source data block is the data block obtained during data splitting in the previous backup period, and the target data block is the data block obtained during data splitting in the current backup period;
[0068] The data backup storage module 360 is used to transfer the differential data block from the master server to the backup server for backup storage, and delete the original data temporarily cached in the temporary storage space during the current backup period and the data block obtained during data splitting in the previous backup period from the temporary storage space after the transfer is completed.
[0069] According to the above description, in an exemplary embodiment, the process of the data backup storage module 360 transmitting differential data blocks from the primary server to the backup server for backup storage includes:
[0070] Sort and number all the differential data blocks in the temporary storage space in the order of the generation time of the data blocks. As an example, in this embodiment or other embodiments, when numbering all the differential data blocks in the temporary storage space, the numbering can be performed according to the sorting result, and the earlier the generation time of the data block, the earlier the corresponding sorting result, and the smaller the number. Among them, when numbering, the numbering can start from the number 0, and the subsequent differential data blocks are numbered in a gradually increasing manner. Then, all the differential data blocks in the temporary storage space are associated according to the numbering result to obtain a differential data block sequence; and, record the transmission time, and when the transmission time is greater than or equal to the preset time, compare the transmitted differential data blocks with the differential data block sequence. If the transmitted differential data blocks are exactly the same as the differential data block sequence, output a transmission completion message, so that the primary server deletes the original data temporarily cached in the current backup period and the data blocks obtained during data splitting in the previous backup period from the temporary storage space according to the transmission completion message. If the transmitted differential data blocks are not the same as the differential data block sequence, locate the last differential data block that has completed transmission during the transmission process, and take the numbering result corresponding to this differential data block as the starting number, and record all the differential data blocks after the starting number as missing data blocks; and re-transmit the missing data blocks to the backup server in the order corresponding to the numbering result until the transmitted differential data blocks are exactly the same as the differential data block sequence. As an example, in this embodiment or other embodiments, the preset time can be set by the enterprise according to actual needs, and no specific numerical limit is provided here. Among them, the duration of the preset time cannot be higher than one-fifth of the total duration of a single backup period, so that when the transmitted differential data blocks are not the same as the differential data block sequence, the primary server can use the remaining backup duration to transmit the missing data blocks. If the total transmission time of all differential data blocks during the current backup period exceeds the total duration of the current backup period, and at this time the transmitted differential data blocks are still not the same as the differential data block sequence, the primary server can send an alarm message of "backup failure" to the enterprise management personnel, so that the corresponding enterprise management personnel can extend the current backup period to ensure that the original data in each backup period can be completely backed up. It can be seen that when the transmitted differential data blocks are not the same as the differential data block sequence, this embodiment only needs to transmit the remaining differential data blocks, and does not need to re-transmit all the differential data blocks in the current backup period, which can not only save the communication traffic in the backup process, reduce the cost of the enterprise in data backup, but also improve the backup storage efficiency and shorten the backup storage time.
[0071] According to the above description, in an exemplary embodiment, the data backup storage system may further include: establishing a block index for all differential data blocks in the temporary storage space according to the numbering result, and before transmitting the differential data blocks, first transmitting all the block indexes to the backup server; wherein, the block index includes the location information of the differential data block, and a single block index corresponds to a single differential data block; after all the block indexes are transmitted, start transmitting the differential data blocks from the primary server to the backup server; and, when the transmission time is greater than or equal to the preset time, perform differential data block matching in the backup server according to the block index; if there is no block index that has not been completed in matching, then according to the location information included in the block index, insert the differential data blocks transmitted in the current backup time period into the data block sequence backed up in the previous backup time period, so as to perform backup storage of the original data in the backup server; if there is a block index that has not been completed in matching, then mark the block index that has not been completed in matching as an idle index, and feedback to the primary server that there is a packet loss in the transmission process of the differential data blocks, and re-transmit the differential data blocks corresponding to the idle index through the primary server until the differential data blocks corresponding to the idle index are completed in matching. It can be seen that by establishing a block index for all differential data blocks in the temporary storage space and transmitting all the block indexes before transmitting the differential data blocks, so that after the backup server receives all the differential data blocks, it can directly perform differential data block matching according to the block index, and then insert the corresponding differential data blocks into the data block sequence backed up in the previous backup time period according to the location information included in the block index, avoiding situations such as disordered backup in the current backup time period. At the same time, for the block indexes that have not been completed in matching, by the backup server feedback to the primary server that there is a packet loss in the transmission process of the differential data blocks, and then the primary server re-transmits the differential data blocks corresponding to the idle index, without re-transmitting all the differential data blocks in the current backup time period, which can not only save the communication traffic in the backup process, reduce the cost of the enterprise in data backup, but also improve the backup storage efficiency and shorten the backup storage time.
[0072] According to the above description, in an exemplary embodiment, the data backup storage system may further include: compressing the missing data blocks when re-transmitting the missing data blocks to the backup server in the order corresponding to the numbering result; and / or, compressing the differential data blocks corresponding to the idle index when re-transmitting the differential data blocks corresponding to the idle index through the primary server; decompressing the received compressed differential data blocks by the backup server. It can be seen that by compressing the missing data blocks and / or compressing the differential data blocks corresponding to the idle index, and then transmitting the compressed differential data blocks, compared with directly transmitting the uncompressed differential data blocks, since the storage capacity of the compressed differential data blocks is smaller than that before compression, the backup storage efficiency can be improved and the backup storage time can be shortened.
[0073] According to the above description, in an exemplary embodiment, the data backup storage system may further include: configuring an encryption character in the primary server and a decryption character corresponding to the encryption character in the backup server; encrypting the original data temporarily cached in the temporary storage space during the current backup time period by using the encryption character, and splitting the data based on the encryption result; and after the differential data block transmitted during the current backup time period is successfully inserted into the data block sequence backed up during the previous backup time period, decrypting the differential data block transmitted during the current backup time period by using the decryption character to perform backup storage of the original data in the backup server. As an example, in this embodiment or other embodiments, the process of generating the encryption character and the decryption character may be: obtaining the enterprise information of the enterprise, where the enterprise information includes but is not limited to enterprise credit code information, enterprise organization code information, and / or enterprise industrial and commercial registration number information; generating the encryption character and the decryption character according to the enterprise information. As an example, in this embodiment or other embodiments, when generating the encryption character and the decryption character according to the enterprise information, existing encryption and decryption algorithm technologies may be used to complete, and the encryption and decryption algorithms are not specifically limited herein. It can be seen that by encrypting the original data temporarily cached in the temporary storage space with the encryption character, it can be ensured that during the backup process of the original data, even if there is a communication hijacking or the like on the communication transmission link, the original data of the enterprise will not be directly leaked, thereby ensuring the data privacy and security of the enterprise during data backup storage. At the same time, by separately setting the encryption character and the decryption character on the primary server and the backup server, the security during data transmission can be further increased. In addition, using the enterprise information to generate the encryption character and the decryption character can ensure the uniqueness of the corresponding encryption character and decryption character and increase the difficulty of password cracking.
[0074] In summary, the present invention provides a data backup storage system. First, the electronic data generated by an enterprise is recorded as the original data. Then, the pre-set servers for storing data are divided into a primary server and a backup server, and the primary server and the backup server are set at different geographical locations, and the geographical distance between the primary server and the backup server is greater than or equal to a preset distance. Next, the storage space of the primary server is configured, and the storage space of the primary server is divided into a fixed storage space and a temporary storage space. At the same time, the original data is added to the fixed storage space for permanent storage, and the original data is added to the temporary storage space for temporary caching. Then, the original data temporarily cached in the temporary storage space during the current backup period is split into multiple data blocks. And, the source data blocks and the target data blocks are compared in the temporary storage space, and the target data blocks with differences are used as differential data blocks. Among them, the source data blocks are the data blocks obtained during data splitting in the previous backup period, and the target data blocks are the data blocks obtained during data splitting in the current backup period. Finally, the differential data blocks are transmitted from the primary server to the backup server for backup storage, and after the transmission is completed, the original data temporarily cached in the temporary storage space during the current backup period and the data blocks obtained during data splitting in the previous backup period are deleted from the temporary storage space. It can be seen from this that by setting the primary server and the backup server, on the one hand, the primary server can be used to permanently store the original data in electronic form generated by the enterprise during the production and operation process, and on the other hand, the backup server can be used for backup storage, so that the original data can be stored doubly by the primary server and the backup server, strengthening the data storage work of the enterprise. Moreover, by setting the primary server and the backup server at different geographical locations, the probability that the primary server and the backup server have problems at the same time can be reduced; and since the backup server makes a complete backup of the original data, even if data loss or inaccessibility occurs after the primary server fails, the enterprise can recover the data through the backup server, thus not affecting the normal operation of the enterprise. At the same time, by splitting the original data into multiple data blocks, then comparing the differences between the data blocks obtained after data splitting between the previous backup period and the current backup period, and only transmitting the data blocks with differences during the current backup period during the backup transmission process, compared with the prior art that needs to transmit the entire original data, the present system can ensure that while the backup server can back up all the original data, it can also save the communication traffic used by the original data during the backup process, not only reducing the cost of the enterprise in data backup, but also accelerating the backup storage efficiency of the original data and shortening the backup storage time of the original data.After the system completes the backup storage of the original data in the current backup time period on the main server, it will delete the original data temporarily cached in the current backup time period and the data blocks obtained during data splitting in the previous backup time period from the temporary storage space, so as to be able to release the temporary storage space of the main server and reduce the occupation of the storage space of the main server due to the data backup task.
[0075] It should be noted that the data backup storage system provided in the above embodiment and the data backup storage method provided in the above embodiment belong to the same concept. The specific ways in which each module and unit perform operations have been described in detail in the method embodiment, and will not be elaborated here. In practical applications, the data backup storage system provided in the above embodiment can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the system into different functional modules to complete all or part of the functions described above, and no limitation is imposed here. Therefore, the present invention effectively overcomes various disadvantages in the prior art and has high industrial utilization value.
[0076] The above embodiments are only illustrative of the principles and effects of the present invention, and are not used to limit the present invention. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes completed by those with ordinary knowledge in the technical field without departing from the spirit and technical idea disclosed by the present invention should still be covered by the claims of the present invention.
Claims
1. A data backup storage method, characterized in that: The method comprises the following steps: Configure storage space for the main server, dividing the storage space of the main server into fixed storage space and temporary storage space; Adding the original data to the fixed storage space for permanent storage, and adding the original data to the temporary storage space for temporary caching; The original data temporarily cached in the current backup time period is split in the temporary storage space to obtain a plurality of data blocks; and the source data block and the target data block are compared in the temporary storage space, and the target data block with differences is used as the differential data block; wherein the source data block is the data block obtained when the data is split in the previous backup time period, and the target data block is the data block obtained when the data is split in the current backup time period; The differential data blocks are transmitted from the main server to the backup server for backup storage, including: sorting and numbering all differential data blocks in the temporary storage space in the order of data block generation time; associating all differential data blocks in the temporary storage space according to the numbering results to obtain a differential data block sequence; if the transmitted differential data blocks are different from the differential data block sequence, locating the last differential data block that has completed transmission during the transmission process, and using the numbering result corresponding to the differential data block as the starting number, and marking all differential data blocks after the starting number as missing data blocks; retransmitting the missing data blocks to the backup server in the order corresponding to the numbering results until the transmitted differential data blocks are exactly the same as the differential data block sequence.
2. The data backup storage method according to claim 1, characterized in that: The process of transmitting the differential data block from the primary server to the backup server for backup storage also includes: Recording the transmission time, and when the transmission time is greater than or equal to a preset time, comparing the transmitted differential data block with the differential data block sequence; If the transmitted differential data blocks are exactly the same as the differential data block sequence, a transmission completion message is output so that the main server deletes the original data temporarily cached in the current backup time period and the data blocks obtained when splitting the data in the previous backup time period from the temporary storage space according to the transmission completion message.
3. The data backup storage method according to claim 2, characterized in that: The method further comprises: Establishing a block index for all differential data blocks in the temporary storage space according to the numbering result, and transmitting all the block indexes to the backup server before transmitting the differential data blocks; wherein the block index includes the location information of the differential data blocks, and a single block index corresponds to a single differential data block; After completing the transmission of all block indexes, starting to transmit the differential data blocks from the primary server to the backup server; and, When the transmission time is greater than or equal to a preset time, performing differential data block matching in the backup server according to the block index; If there is no unmatched block index, insert the differential data block transmitted in the current backup time period into the data block sequence backed up in the previous backup time period according to the position information contained in the block index, so as to back up and store the original data in the backup server; If there is an unmatched block index, the unmatched block index will be recorded as an idle index, and feedback will be given to the main server that there is packet loss in the transmission process of the differential data block, and the differential data block corresponding to the idle index will be retransmitted through the main server until the idle index completes the differential data block matching.
4. The data backup storage method according to claim 3, characterized in that: The method further comprises: When the missing data blocks are retransmitted to the backup server in the order corresponding to the numbering results, the missing data blocks are compressed; and / or when the differential data blocks corresponding to the free indexes are retransmitted through the primary server, the differential data blocks corresponding to the free indexes are compressed; The received compressed differential data block is decompressed by the backup server.
5. The data backup storage method according to claim 3, characterized in that: The method further comprises: Configuring encryption characters in the primary server, and configuring decryption characters corresponding to the encryption characters in the backup server; Encrypting the original data temporarily cached in the temporary storage space during the current backup period using the encryption character, and performing data splitting based on the encryption result; and, After the differential data blocks transmitted in the current backup time period are successfully inserted into the data block sequence backed up in the previous backup time period, the differential data blocks transmitted in the current backup time period are decrypted using the decryption character to back up and store the original data in the backup server.
6. The data backup storage method according to claim 5, characterized in that: The method further comprises: Acquire the enterprise information of the enterprise, the enterprise information including: enterprise credit code information, enterprise organization code information and / or enterprise business registration number information; The encrypted characters and the decrypted characters are generated according to the enterprise information.
7. The data backup storage method according to any one of claims 1 to 6, characterized in that: The method further comprises: deleting the original data temporarily cached in the current backup time period and the data blocks obtained when the data is split in the previous backup time period from the temporary storage space; wherein the backup server and the main server are arranged in different geographical locations.
8. A data backup storage system, characterized in that: The system comprises: A storage space configuration module, used to configure the storage space of the main server, and divide the storage space of the main server into a fixed storage space and a temporary storage space; A data original storage module, used for adding the original data to the fixed storage space for permanent storage, and adding the original data to the temporary storage space for temporary caching; A data splitting and comparing module is used to split the original data temporarily cached in the current backup time period in the temporary storage space to obtain multiple data blocks; and to compare the source data block and the target data block in the temporary storage space, and use the target data block with differences as the differential data block; wherein the source data block is the data block obtained when the data is split in the previous backup time period, and the target data block is the data block obtained when the data is split in the current backup time period; A data backup storage module, used for transmitting the differential data blocks from the main server to the backup server for backup storage, including: sorting and numbering all differential data blocks in the temporary storage space in the order of data block generation time; associating all differential data blocks in the temporary storage space according to the numbering results to obtain a differential data block sequence; if the transmitted differential data blocks are different from the differential data block sequence, locating the last differential data block to complete the transmission process, and using the numbering result corresponding to the differential data block as the starting number, and marking all differential data blocks after the starting number as missing data blocks; and retransmitting the missing data blocks to the backup server in the order corresponding to the numbering results until the transmitted differential data blocks are exactly the same as the differential data block sequence.
9. The data backup storage system according to claim 8, characterized in that: The process in which the data backup storage module transmits the differential data block from the primary server to the backup server for backup storage also includes: Recording the transmission time, and when the transmission time is greater than or equal to a preset time, comparing the transmitted differential data block with the differential data block sequence; If the transmitted differential data blocks are completely identical to the differential data block sequence, a transmission completion message is output, so that the primary server deletes the original data temporarily cached in the current backup time period and the data blocks obtained when the data is split in the previous backup time period from the temporary storage space according to the transmission completion message; And, the original data temporarily cached in the current backup time period and the data blocks obtained when the data was split in the previous backup time period are deleted from the temporary storage space; wherein the backup server and the main server are set in different geographical locations.
10. The data backup storage system according to claim 9, characterized in that: The system further comprises: Establishing a block index for all differential data blocks in the temporary storage space according to the numbering result, and transmitting all the block indexes to the backup server before transmitting the differential data blocks; wherein the block index includes the location information of the differential data blocks, and a single block index corresponds to a single differential data block; After completing the transmission of all block indexes, starting to transmit the differential data blocks from the primary server to the backup server; and, When the transmission time is greater than or equal to a preset time, performing differential data block matching in the backup server according to the block index; If there is no unmatched block index, insert the differential data block transmitted in the current backup time period into the data block sequence backed up in the previous backup time period according to the position information contained in the block index, so as to back up and store the original data in the backup server; If there is an unmatched block index, the unmatched block index will be recorded as an idle index, and feedback will be given to the main server that there is packet loss in the transmission process of the differential data block, and the differential data block corresponding to the idle index will be retransmitted through the main server until the idle index completes the differential data block matching.
Citation Information
Patent Citations
Data backup method, device and system
CN117215826A
SM2-based certificateless identity authentication method and system
CN119402292A