Data backup method, system, device and storage medium

By generating and comparing backup lists, the problem of low data backup quality in the existing technology is solved, and more efficient data backup and error remediation is achieved.

CN115114095BActive Publication Date: 2025-05-06NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210857892.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-20
Publication Date
2025-05-06
Estimated Expiration
2042-07-20

AI Technical Summary

Technical Problem

In the prior art, data backup quality is low, and data omissions or replication errors are prone to occur, which is difficult to detect and remediate.

Method used

By obtaining backup location information and backup range information, a list to be backed up is generated, and after backup is backed up, a backup list is generated based on the backup data, and a comparison is made to find missing or error data, thereby remediating.

Benefits of technology

Improve the quality of data backup, can promptly detect and remediate backup errors, and reduce the risk of data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115114095B_ABST
    Figure CN115114095B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a data backup method, system, device and storage medium, belonging to the field of data management technology. The method includes obtaining backup location information and backup range information after receiving a data backup instruction; the backup location information is used to describe the information of the target location for performing the backup action; the backup range information is used to describe the information of the range of the data to be backed up located in the target location; a list to be backed up is generated based on the backup location information and the backup range information; the data to be backed up is backed up to a target database, and backed up data is formed in the target database; a backed up list is generated according to the backed up data, and the list to be backed up is compared with the backed up list to generate a comparison result. Through the comparison result, it is easy to know the data to be backed up that is missed or copied incorrectly, so as to facilitate remediation and improve the backup quality of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data management, and in particular to a data backup method, system, device and storage medium. Background Art

[0002] With the continuous development of information technology, the scale of data in various fields has grown rapidly, gradually entering the era of big data. Data has changed from a simple processing object to an important basic resource, which has affected the development process of enterprises to a certain extent and played an indispensable role. Based on this, data backup has received increasing attention.

[0003] Data backup refers to the process of copying all or part of a data set to other storage media to prevent data loss due to system operation errors or system failures. The existing data backup method is to perform the backup operation after determining the data to be backed up. During the backup period, data omissions or copy errors are prone to occur, which are difficult to detect and reduce the quality of data backup. Summary of the invention

[0004] In view of this, the present invention provides a data backup method, system, device and storage medium, which are used to solve the problem of low data backup quality in the prior art. In order to achieve one or part or all of the above purposes or other purposes, the present invention proposes a data backup method, system, device and storage medium, in the first aspect:

[0005] A data backup method, comprising:

[0006] After receiving the data backup instruction, the backup location information and the backup range information are obtained; the backup location information is used to describe the information of the target location for performing the backup action; the backup range information is used to describe the information of the range of the data to be backed up located in the target location;

[0007] Generate a to-be-backed-up list based on the backup location information and the backup range information;

[0008] Backing up the data to be backed up to a target database, forming backed-up data in the target database;

[0009] A backed-up list is generated according to the backed-up data, and the to-be-backed-up list is compared with the backed-up list to generate a comparison result.

[0010] Preferably, the step of generating a to-be-backed-up list based on the backup location information and the backup range information comprises:

[0011] Determine the data to be backed up according to the backup location information and the backup range information;

[0012] Acquire first data information of the data to be backed up; the first data information includes first name information, first data volume information and first data type;

[0013] Extracting characteristic data from the data to be backed up; the characteristic data is associated with characteristic location information;

[0014] The first data information, the characteristic data and the characteristic location information are integrated to obtain the to-be-backed-up list.

[0015] Preferably, the step of obtaining the first data information of the data to be backed up includes:

[0016] Determining whether attribute path information of the data to be backed up is pre-stored;

[0017] If not, identifying and extracting the first name information of the data to be backed up according to the name identifier;

[0018] Identify and extract the first data type of the data to be backed up according to the type identifier;

[0019] Identify the number of rows and columns of the data to be backed up to obtain the first data volume information;

[0020] If so, obtain the corresponding first data information according to the attribute path information.

[0021] Preferably, the step of generating a backed-up list according to the backed-up data comprises:

[0022] Acquire second data information of the backed up data; the second data information includes second name information, second data volume information and second data type;

[0023] Extracting data from the backed-up data according to the characteristic position information to obtain verification data;

[0024] The second data information, the verification data and the characteristic location information are integrated to obtain the backed-up list.

[0025] Preferably, the step of comparing the to-be-backed-up list with the backed-up list to generate a comparison result comprises:

[0026] Determining whether the first name information matches the second name information;

[0027] If so, determining whether the second data type matches the first data type;

[0028] If so, determining whether the feature data corresponding to the feature location information matches the verification data;

[0029] If yes, generate a backup of the comparison result without error;

[0030] If the first name information does not match the second name information, generating the comparison result indicating backup failure;

[0031] If the second data type does not match the first data type, generating a comparison result that backs up an error;

[0032] If the feature data does not match the verification data, a comparison result indicating data error is generated.

[0033] Preferably, the method further comprises:

[0034] When the comparison result is that the data is wrong, comparing the feature data and the verification data one by one to obtain error range information;

[0035] Taking a screenshot of the data to be backed up corresponding to the error range information to obtain image data;

[0036] The error range information is stored in association with the corresponding graphic data.

[0037] Preferably, the method further comprises:

[0038] In the process of backing up the data to be backed up to the target database, if the data to be backed up cannot be backed up, taking a screenshot according to a preset screenshot range to obtain retained image data;

[0039] Skipping the data to be backed up within the screenshot range, and determining whether the data can be backed up;

[0040] If not, the screenshot range is expanded according to a preset range threshold to take a screenshot, and the retained image data is updated.

[0041] Second aspect:

[0042] A data backup system, comprising an acquisition module, for acquiring backup location information and backup range information after receiving a data backup instruction; the backup location information is used to describe information about a target location for performing a backup action; the backup range information is used to describe information about a range of data to be backed up located in the target location;

[0043] A list module, used to generate a list to be backed up based on the backup location information and the backup range information;

[0044] A backup module, used for backing up the data to be backed up to a target database, and forming backed up data in the target database;

[0045] The comparison module is used to generate a backed-up list according to the backed-up data, and compare the to-be-backed-up list with the backed-up list to generate a comparison result.

[0046] Preferably, the inventory module includes a determination unit, configured to determine the data to be backed up according to the backup location information and the backup range information;

[0047] A first data unit is used to obtain first data information of the data to be backed up; the first data information includes first name information, first data volume information and first data type;

[0048] A feature unit, used to extract feature data from the data to be backed up; the feature data is associated with feature location information;

[0049] The first integration unit is used to integrate the first data information, the characteristic data and the characteristic location information to obtain the to-be-backed-up list.

[0050] Preferably, the first data unit includes a judgment subunit, which is used to judge whether the attribute path information of the data to be backed up is pre-stored;

[0051] If not, identifying and extracting the first name information of the data to be backed up according to the name identifier;

[0052] Identify and extract the first data type of the data to be backed up according to the type identifier;

[0053] Identify the number of rows and columns of the data to be backed up to obtain the first data volume information;

[0054] If so, obtain the corresponding first data information according to the attribute path information.

[0055] Preferably, the comparison module includes a second data unit, which is used to obtain second data information of the backed up data; the second data information includes second name information, second data volume information and second data type;

[0056] A verification unit, configured to extract data from the backed-up data according to the characteristic position information to obtain verification data;

[0057] The second integration unit is used to integrate the second data information, the verification data and the characteristic location information to obtain the backed-up list.

[0058] Preferably, the comparison module further comprises a judgment unit, configured to judge whether the first name information matches the second name information;

[0059] If so, determining whether the second data type matches the first data type;

[0060] If so, determining whether the feature data corresponding to the feature location information matches the verification data;

[0061] If yes, generate a backup of the comparison result without error;

[0062] If the first name information does not match the second name information, generating the comparison result indicating backup failure;

[0063] If the second data type does not match the first data type, generating a comparison result that backs up an error;

[0064] If the feature data does not match the verification data, a comparison result indicating data error is generated.

[0065] Preferably, the system further comprises a comparison module, which is used to compare the feature data and the verification data one by one to obtain error range information when the comparison result is that the data is wrong;

[0066] A picture module, used for taking a screenshot of the data to be backed up corresponding to the error range information to obtain picture data;

[0067] The storage module is used to associate and store the error range information with the corresponding graphic data.

[0068] Preferably, the system further comprises an image module, which is used for taking a screenshot according to a preset screenshot range to obtain retained image data if the data to be backed up cannot be backed up during the process of backing up the data to be backed up to the target database;

[0069] A verification module, used for skipping the data to be backed up within the screenshot range, and determining whether the backup can be performed;

[0070] If not, the screenshot range is expanded according to a preset range threshold to take a screenshot, and the retained image data is updated.

[0071] The third aspect:

[0072] A data backup device comprises a memory and a processor, wherein the memory stores a data backup method, and the processor is used to adopt the above method when executing the data backup method.

[0073] Fourth aspect:

[0074] A storage medium, characterized in that it stores a computer program that can be loaded by a processor and execute the above-mentioned method.

[0075] Implementing the embodiments of the present invention will have the following beneficial effects:

[0076] Before performing a backup operation, a to-be-backed-up list is generated based on the data to be backed up; after the backup operation is completed, a backed-up list is generated based on the backed-up data; by comparing the to-be-backed-up list with the backed-up list, it is easy to verify the missed data to be backed up or the data to be backed up that was copied incorrectly, thereby facilitating subsequent remediation of the missed or copied incorrect data to be backed up, thereby improving the data backup quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0078] in:

[0079] Figure 1 The figure is a flow chart of a data backup method in an embodiment.

[0080] Figure 2 The figure is a flowchart of generating a list to be backed up in a data backup method in an embodiment.

[0081] Figure 3 The figure is a schematic diagram of a process of obtaining first data information in a data backup method in an embodiment.

[0082] Figure 4 The figure is a structural block diagram of a data backup system in one embodiment. DETAILED DESCRIPTION

[0083] 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.

[0084] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0085] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.

[0086] The embodiment of the present application provides a data backup method. In the existing data backup methods, the system usually automatically performs the backup operation, or manually copies and pastes the data to be backed up into the target database. Regardless of the above method, due to loopholes in the system used to perform the backup operation or negligence of the backup personnel, it is easy to miss the data to be backed up or make a copy error, etc., making it difficult to ensure the backup quality of the data, resulting in data loss.

[0087] In order to overcome the above defects, the present application embodiment provides a data backup method, such as Figure 1 As shown, the backup method includes:

[0088] S101. After receiving a data backup instruction, obtain backup location information and backup range information.

[0089] Among them, the data backup instruction can be automatically triggered by a device, software or program such as a timer, or it can be received by a human-computer interaction device or a mouth interface. In one embodiment, the data in the system is backed up periodically by a timer, and the data that needs to be backed up is called data to be backed up. When the preset time of the timer is reached, the counter directly generates a data backup instruction, or triggers other instruction generation entities to generate data backup instructions, and transmits the data backup instructions to the current execution entity. It should be noted that other instruction generation entities can be programs, software, chips or devices with the function of generating instructions; the current execution entity can be an MCU, an integrated chip, an intelligent terminal, a server, etc.

[0090] In addition, in another embodiment, a timer is integrated in the current execution subject, and after a preset time is reached, a data backup instruction is generated, at which time the current execution subject determines that the data backup instruction has been received.

[0091] In other embodiments, the data backup instruction is received by the human-computer interaction device and transmitted to the current execution subject; or the data backup instruction is received through the functional interface and then obtained by the current execution subject.

[0092] The backup location information is used to describe the target location for performing the backup action, that is, the location of the data to be backed up. For example, if the data to be backed up is located in a database, the backup location information is used to describe the location of the database; if the data to be backed up is located in a certain path, the backup location information is used to describe the path; if the backup data is located in a certain application software, the backup location information is used to describe the location of the application software.

[0093] The backup range information is used to describe the range of the data to be backed up in the target location. In one embodiment, the backup range information is the same as the backup location information, that is, the data to be backed up that needs to be backed up refers to the data in the entire database, the entire table, or the entire folder. In this case, the backup location information is the same as the backup range information. In another embodiment, the backup range information represents part of the location information in the backup location information; for example, several data tables in a database, one or more sheet pages in a table, or certain rows in a document.

[0094] S102: Generate a to-be-backed-up list based on the backup location information and the backup range information.

[0095] The specific location of the data to be backed up and the data to be backed up itself can be locked through the backup location information and the backup range information. In one embodiment, after the specific location of the data to be backed up is locked, a list to be backed up can be generated by retrieving relevant information. For example, in an application scenario, the data to be backed up is the first 10 data tables in database A. The backup location information is used to describe the location information of database A, and the backup range information is used to describe the location information of the first 10 data tables. After locking the first 10 data tables in database A, the relevant information of the first 10 data tables can be extracted under the preset path to generate a list to be backed up.

[0096] In addition, the backup list is used to record the information of the data to be backed up, so as to be able to check the backup status through the backup list and find errors in the backup. Therefore, the backup list may include some data in the data to be backed up, and may include basic information of the data to be backed up.

[0097] S103: Back up the data to be backed up to the target database, forming backed up data in the target database.

[0098] The data to be backed up is backed up by a backup tool, which may be a DBFen backup platform, a Windows built-in backup program, an application system's own backup tool (eg, SQL Server / Oracle), a backup system, or the like.

[0099] S104: Generate a backed-up list based on the backed-up data, and compare the list to be backed up with the backed-up list to generate a comparison result.

[0100] According to the principle of generating the list to be backed up, a backed up list is generated based on the backed up data to obtain relevant information about the backed up data. Then, the backed up list is compared with the list to be backed up to find out whether there are omissions or errors in the backed up data. The comparison results are convenient for relevant personnel to know the backup situation, or for the current execution entity to know the backup situation. According to the comparison results, the data to be backed up is subsequently processed to improve the backed up data and the backup quality of the data.

[0101] Generating a backup list to verify the actual situation of the backup helps to detect backup errors in a timely manner so that remediation can be carried out, reducing the risk of data loss and improving the quality of data backup.

[0102] In order to improve the accuracy of verifying the true status of the backup, in another embodiment of the present application, Figure 2 As shown, the steps of generating a list to be backed up based on the backup location information and the backup range information include:

[0103] S201. Determine data to be backed up according to backup location information and backup range information.

[0104] S202: Obtain first data information of data to be backed up.

[0105] Among them, the first data information includes first name information, first data volume information and first data type. It should be noted that the first data information refers to the basic information of the data to be backed up, and the first is used to distinguish the name of the technical feature, and has no other restrictive effect. The first name information is used to describe the name of the data to be backed up, wherein, in one application scenario, the data to be backed up are the first 10 data tables in database A, then the first name information includes the table names of the first 10 data tables; in another application scenario, the data to be backed up are the third, fifth and tenth sheet pages in the Excel table, then the first name information includes the page names of the third, fifth and tenth sheet pages; in another application scenario, the data to be backed up are all folders on the disk, then the first name information includes the folder names of all folders on the disk.

[0106] The first data volume information is used to describe the data volume information of the data to be backed up. In one embodiment, the first data volume information is the space occupied by the data to be backed up; in another embodiment, the first data volume information is the number of rows and columns of the data to be backed up. For ease of understanding, for example, in one embodiment, the data to be backed up is the first to 100th rows in the first sheet of an Excel table; then the first data volume information includes the number of rows and the maximum number of columns in all rows. In addition, the first data volume information can also be the number of rows and the number of columns corresponding to each row.

[0107] In another embodiment, the data to be backed up is the first 10 data tables in database A, and the first data volume information includes the total number of rows and columns of each of the first 10 data tables. It should be noted that when the data to be backed up includes the number of rows and columns, each row and column is recorded separately.

[0108] S203: Extract characteristic data from the data to be backed up.

[0109] The characteristic data is associated with characteristic position information. It should be noted that the characteristic data is any data in the data to be backed up. That is, the data to be backed up includes a number of characteristic data. When extracting the characteristic data, the data in the data to be backed up can be extracted according to a preset extraction position to form the characteristic data; or the data in the data to be backed up can be randomly extracted to form the characteristic data, and then the characteristic position information of the characteristic data is recorded.

[0110] S204: Integrate the first data information, the characteristic data and the characteristic location information to obtain a list to be backed up.

[0111] In one embodiment, the first data information, characteristic data and characteristic position information are recorded according to the order of traversing the data to be backed up, such as from top to bottom, from left to right, and from large to small, to generate a list to be backed up. For example, if the data to be backed up is the first 10 data tables in database A, the first data information of data tables 1 to 10 are obtained in sequence, and the characteristic data and corresponding characteristic position information extracted from the first data table are recorded after the first data information of the first data table, and so on, which will not be repeated.

[0112] The first data information includes not only the first name information, the first data type and the first data volume information, but also the characteristic data in the data to be backed up. According to the first name information, the first data type and the first data volume information, it can be determined whether there are major errors in the backed up data as a whole. Through the characteristic data and the corresponding characteristic position information, it can be determined whether there are omissions and the omission locations of the backed up data, which helps to improve the accuracy of verifying the actual situation of the backup.

[0113] In another embodiment of the present invention, in order to further define and illustrate, as Figure 3 As shown, the step of obtaining the first data information of the data to be backed up includes:

[0114] S301: Determine whether attribute path information of the data to be backed up is pre-stored.

[0115] In one embodiment, for data to be backed up of types such as data tables, when generating a data table, the basic information of the data table will be recorded in a specified file. For example, the table name, type, data description, etc. of the data table. After determining the data to be backed up based on the backup location information and the backup range information, it is equivalent to obtaining the storage location of the data to be backed up, and the attribute path information can be found based on the storage location of the data to be backed up. For example, when the data to be backed up is mysql data, the storage location of the mysql database can be obtained based on the backup location information and / or the backup range information. Then, according to the storage location, the preset association table is searched to see whether the mysql database is associated with the attribute path information for recording the basic information of the mysql database.

[0116] If not, executing step S302, identifying and extracting the first name information of the data to be backed up according to the name identifier.

[0117] The name identifier is used to identify the data name, and can be a string consisting of at least one of numbers, letters and symbols, or can be field range information used to describe the field where the name is located in the data. When the attribute path information is not pre-stored, the first name information is searched in the data to be backed up according to the name identifier.

[0118] S303: Identify and extract a first data type of the data to be backed up according to the type identifier.

[0119] The data type refers to the type of data to be backed up, such as data tables, Excel spreadsheets, text documents, word documents, etc. The type identifier can be a string consisting of at least one of numbers, letters, and symbols, or it can be field range information used to describe the field where the type is located in the data. For example, query the suffix name to determine the first data type.

[0120] S304: Identify the number of rows and columns of data to be backed up to obtain first data volume information.

[0121] It should be noted that the execution order of steps S302, S303 and S304 is not limited.

[0122] If attribute path information of the data to be backed up is stored, step S305 is executed to obtain corresponding first data information according to the attribute path information.

[0123] That is, the first data information of the data to be backed up is retrieved under the corresponding path according to the attribute path information.

[0124] Priority is given to checking whether the first data information of the data to be backed up is pre-stored. If yes, the first data information is directly obtained, which helps to save computer resources, reduce memory usage, improve backup efficiency, and ensure the accuracy of the first data information. If no, the first data information is obtained according to the name identifier, etc., which is simple and fast, and is convenient for ensuring the integrity of the first data information.

[0125] In another embodiment of the present invention, for further definition and explanation, the step of generating a backed-up list according to the backed-up data includes:

[0126] S401: Obtain second data information of the backed-up data.

[0127] The second is only used to distinguish the name of the technical feature and has no other limiting function. The second data information includes second name information, second data volume information and second data type.

[0128] S402: extract data from the backed-up data according to the characteristic position information to obtain verification data.

[0129] That is, the verification data is data in the backed-up data, and corresponds one-to-one with the feature data according to the feature position information.

[0130] S403: Integrate the second data information, verification data and characteristic location information to obtain a backup list.

[0131] In one embodiment, the principle of the generation process of the backup list and the generation process of the to-be-backed list is the same, and no further description is given. It should be noted that the verification data is obtained based on the characteristic position information of the characteristic data. Through the above means, it is convenient to accurately find the backup error when comparing the backup list and the to-be-backed list.

[0132] In another embodiment of the present invention, for further definition and explanation, the step of comparing the to-be-backed-up list and the backed-up list to generate a comparison result includes:

[0133] S501: Determine whether the first name information matches the second name information.

[0134] In one embodiment, a match is determined when the first name information and the second name information are the same.

[0135] If the first name information matches the second name information, step S502 is executed to determine whether the second data type matches the first data type.

[0136] It should be noted that in some backup operations, the data type or data format of the data to be backed up will be changed. For example, the backed up data is actually compressed data. In this application scenario, the target data type of the backed up data is obtained first; then the second data type is compared with the target data type. If they are the same, the second data type is determined to match the first data type. In other cases where the data type or data format of the backed up data is not changed, the second data type is determined to match the first data type when it is the same.

[0137] If the first name information does not match the second name information, the comparison result indicating backup failure is generated.

[0138] If the second data type matches the first data type, step S503 is executed to determine whether the feature data corresponding to the feature position information matches the verification data.

[0139] The feature data and the verification data have the same feature location information. If the data type of the verification data is different from that of the feature data, the verification data is first converted to the same type as the feature data before comparison. It is considered a match when the feature data corresponding to all feature location information is the same as the verification data.

[0140] If the second data type does not match the first data type, a comparison result indicating a backup error is generated.

[0141] If the feature data and verification data corresponding to each feature position information match, a comparison result with correct backup is generated; otherwise, a comparison result with wrong data is generated.

[0142] By distinguishing the comparison results, the comparison results generated in different situations are different, which facilitates the pre-formulation of corresponding solutions. When a comparison result of backup failure, backup error or data error occurs, the current execution subject executes the corresponding steps according to the preset solution, remediates the backup results of the data to be backed up, improves the backed up data, and improves the backup quality.

[0143] In another embodiment of the present invention, for further definition and explanation, the backup method further includes:

[0144] S601. When the comparison result is that the data is wrong, the feature data and the verification data are compared one by one to obtain error range information.

[0145] Specifically, in one embodiment, the list to be backed up or the list that has been backed up contains at least one characteristic position information, and each characteristic position information corresponds to characteristic data and verification data. According to the order of the characteristic position information, the characteristic data and verification data corresponding to the same characteristic position information are determined as a group, and are compared one by one. When the same group of characteristic data and verification data do not match, the corresponding characteristic position information is marked or recorded until all characteristic data and verification data are compared, and the comparison is stopped. The error range information can be locked according to the marked or recorded characteristic position information. For ease of understanding, for example, there are 10 characteristic position information, corresponding to 10 groups of characteristic data and verification data. During the comparison, the third characteristic position information is marked, which means that the characteristic data of the third characteristic position information is different from the verification data. At this time, the error range information can be determined to be from the second characteristic position information to the fourth characteristic position information.

[0146] S602: Take a screenshot of the data to be backed up corresponding to the error range information to obtain image data.

[0147] The data to be backed up within the error range information is recorded in the form of a screenshot. Specifically, in one embodiment, the screenshot position is determined according to the error range information, the highest and rightmost position in the error range information is used as the first coordinate information, the lowest and leftmost position in the error range information is used as the second coordinate information, the point corresponding to the first coordinate information is used as the starting point of the screenshot, and the point corresponding to the second coordinate information is used as the end point of the screenshot, the screenshot position is determined, and the image data is obtained.

[0148] S603: Store the error range information in association with the corresponding graphic data.

[0149] Saving the backup data by taking screenshots, on the one hand, helps to back up the data normally in the future and ensures the backup efficiency; on the other hand, the backup data that cannot be backed up or has backup errors is not easily lost, which improves data security and backup quality. In addition, after the error range information is stored in association with the graphic data, it is helpful to find loopholes in the backup tool in the future, or accurately find the location of the backup data that has not been backed up normally, and then make accurate remediation.

[0150] After step S603, the backup method further includes:

[0151] S604: Use a text extraction tool to extract text information from the image data to obtain remedial data.

[0152] Automatically identify and extract text information from image data, eliminating the need for staff to manually restore the corresponding data to be backed up based on the image data.

[0153] In another embodiment of the present invention, for further definition and explanation, the backup method further includes:

[0154] S701. In the process of backing up the data to be backed up to the target database, if the data to be backed up cannot be backed up, a screenshot is taken according to a preset screenshot range to obtain retained image data.

[0155] Among them, the inability to back up includes the inability to read, parse or convert the data to be backed up, including the inability to identify the data to be backed up, the inability to convert the format or type of the data to be backed up, etc. The inability to back up also includes the inability to perform the backup operation, which may be because the data to be backed up cannot be backed up, for example, the data type of the data to be backed up does not belong to the data type that the backup tool can back up, or another example is that the backup tool has a vulnerability or failure and can no longer perform the backup operation.

[0156] S702: Skip the data to be backed up within the screenshot range and determine whether the data can be backed up.

[0157] If not, the screenshot range is expanded according to the preset range threshold to take a screenshot, and the retained image data is updated until the data to be backed up after skipping the screenshot range can be backed up, or the retained image data includes all the remaining data to be backed up.

[0158] If so, the subsequent data to be backed up is backed up according to normal backup operations.

[0159] The data to be backed up that cannot be backed up is recorded by taking screenshots, which reduces the risk of loss of the data to be backed up and improves data security.

[0160] Before the backup operation is performed, a list to be backed up is generated based on the data to be backed up, and the list to be backed up contains feature data at random positions; after the backup is performed, a list to be backed up is generated based on the backed up data, and the list to be backed up contains verification data at the same position as the feature data. By comparing the list to be backed up with the backed up list, it is determined whether the backed up data contains missed data to be backed up or erroneous data to be backed up, so that backup errors can be discovered in a timely manner based on the comparison results and remedies can be made for erroneous data to be backed up, thereby improving the quality of data backup.

[0161] The present application also discloses a data backup system. Figure 4 As shown, it includes an acquisition module 1, which is used to acquire backup location information and backup range information after receiving a data backup instruction; the backup location information is used to describe the information of the target location for performing the backup action; the backup range information is used to describe the information of the range of the data to be backed up located in the target location;

[0162] List module 2, used to generate a list to be backed up based on the backup location information and the backup range information;

[0163] A backup module 3, used for backing up the data to be backed up to a target database, and forming backed up data in the target database;

[0164] The comparison module 4 is used to generate a backed-up list according to the backed-up data, and compare the to-be-backed-up list with the backed-up list to generate a comparison result.

[0165] Preferably, the list module 2 includes a determination unit, which is used to determine the data to be backed up according to the backup location information and the backup range information;

[0166] A first data unit is used to obtain first data information of the data to be backed up; the first data information includes first name information, first data volume information and first data type;

[0167] A feature unit, used to extract feature data from the data to be backed up; the feature data is associated with feature location information;

[0168] The first integration unit is used to integrate the first data information, the characteristic data and the characteristic location information to obtain the to-be-backed-up list.

[0169] Preferably, the first data unit includes a judgment subunit, which is used to judge whether the attribute path information of the data to be backed up is pre-stored;

[0170] If not, identifying and extracting the first name information of the data to be backed up according to the name identifier;

[0171] Identify and extract the first data type of the data to be backed up according to the type identifier;

[0172] Identify the number of rows and columns of the data to be backed up to obtain the first data volume information;

[0173] If so, obtain the corresponding first data information according to the attribute path information.

[0174] Preferably, the comparison module 4 includes a second data unit, which is used to obtain second data information of the backed up data; the second data information includes second name information, second data volume information and second data type;

[0175] A verification unit, configured to extract data from the backed-up data according to the characteristic position information to obtain verification data;

[0176] The second integration unit is used to integrate the second data information, the verification data and the characteristic location information to obtain the backed-up list.

[0177] Preferably, the comparison module 4 further comprises a judgment unit, configured to judge whether the first name information matches the second name information;

[0178] If so, determining whether the second data type matches the first data type;

[0179] If so, determining whether the feature data corresponding to the feature location information matches the verification data;

[0180] If yes, generate a backup of the comparison result without error;

[0181] If the first name information does not match the second name information, generating the comparison result indicating backup failure;

[0182] If the second data type does not match the first data type, generating a comparison result that backs up an error;

[0183] If the feature data does not match the verification data, a comparison result indicating data error is generated.

[0184] Preferably, the system further comprises an error range module, which is used to compare the feature data and the verification data one by one to obtain error range information when the comparison result is that the data is wrong;

[0185] A picture module, used for taking a screenshot of the data to be backed up corresponding to the error range information to obtain picture data;

[0186] The storage module is used to associate and store the error range information with the corresponding graphic data.

[0187] Preferably, the system further comprises an image module, which is used for taking a screenshot according to a preset screenshot range to obtain retained image data if the data to be backed up cannot be backed up during the process of backing up the data to be backed up to the target database;

[0188] A verification module, used for skipping the data to be backed up within the screenshot range, and determining whether the data can be backed up;

[0189] If not, the screenshot range is expanded according to a preset range threshold to take a screenshot, and the retained image data is updated.

[0190] It should be noted that the description of the above data backup system embodiment is similar to the above method description and has the same beneficial effects as the method embodiment. For technical details not disclosed in the data backup system embodiment of the present invention, those skilled in the art should refer to the description of the method embodiment of the present invention for understanding.

[0191] It should be noted that, in the embodiment of the present invention, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, Read Only Memory), a magnetic disk or an optical disk. In this way, the embodiment of the present invention is not limited to any specific combination of hardware and software.

[0192] Correspondingly, an embodiment of the present application also discloses a storage medium storing a computer program that can be loaded by a processor and execute the above method.

[0193] The embodiment of the present application also discloses a data backup device, including a processor 100, at least one communication bus 200, a user interface 300, at least one external communication interface 400 and a memory 500. The communication bus 200 is configured to realize connection communication between these components. The user interface 300 may include a display screen, and the external communication interface 400 may include a standard wired interface and a wireless interface. The memory 500 stores a data backup method. The processor 100 is used to adopt the above method when executing the data backup method stored in the memory 500.

[0194] The above description of the data backup device and storage medium embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the data backup device and storage medium embodiment of the present invention, please refer to the description of the method embodiment of the present invention for understanding.

[0195] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present invention, the size of the serial number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention. The serial numbers of the above-mentioned embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.

[0196] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0197] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0198] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0199] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0200] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.

[0201] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a device to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.

[0202] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A data backup method, characterized in that: include: After receiving the data backup instruction, obtaining the backup location information and the backup range information; The backup location information is used to describe the target location information for performing the backup action; The backup range information is used to describe the range of the data to be backed up located in the target location; Generate a to-be-backed-up list based on the backup location information and the backup range information; Backing up the data to be backed up to a target database, forming backed-up data in the target database; Generate a backed-up list according to the backed-up data, and compare the to-be-backed-up list with the backed-up list to generate a comparison result; The generating of the to-be-backed-up list based on the backup location information and the backup range information comprises: determining the to-be-backed-up data according to the backup location information and the backup range information; acquiring first data information of the to-be-backed-up data; the first data information comprising first name information, first data volume information and first data type; extracting feature data from the to-be-backed-up data; the feature data being associated with feature location information; integrating the first data information, the feature data and the feature location information to obtain the to-be-backed-up list; Generating a backed-up list according to the backed-up data includes: acquiring second data information of the backed-up data; the second data information includes second name information, second data volume information, and second data type; extracting data from the backed-up data according to the characteristic position information to obtain verification data; integrating the second data information, the verification data, and the characteristic position information to obtain the backed-up list; The comparing the to-be-backed-up list and the backed-up list to generate a comparison result includes: determining whether the first name information matches the second name information; if so, determining whether the second data type matches the first data type; if so, determining whether the feature data corresponding to the feature position information matches the verification data; if so, generating the comparison result of a correct backup; if the first name information does not match the second name information, generating the comparison result of a failed backup; if the second data type does not match the first data type, generating the comparison result of a backup error; if the feature data does not match the verification data, generating the comparison result of a data error.

2. The data backup method according to claim 1, characterized in that: The step of obtaining the first data information of the data to be backed up includes: Determining whether attribute path information of the data to be backed up is pre-stored; If not, identifying and extracting the first name information of the data to be backed up according to the name identifier; Identify and extract the first data type of the data to be backed up according to the type identifier; Identify the number of rows and columns of the data to be backed up to obtain the first data volume information; If so, obtain the corresponding first data information according to the attribute path information.

3. The data backup method according to claim 1, characterized in that: The method further comprises: When the comparison result is that the data is wrong, comparing the feature data and the verification data one by one to obtain error range information; Taking a screenshot of the data to be backed up corresponding to the error range information to obtain image data; The error range information is associated with the corresponding picture data and stored.

4. The data backup method according to claim 1, characterized in that: The method further comprises: In the process of backing up the data to be backed up to the target database, if the data to be backed up cannot be backed up, taking a screenshot according to a preset screenshot range to obtain retained image data; Skipping the data to be backed up within the screenshot range, and determining whether the data can be backed up; If not, the screenshot range is expanded according to a preset range threshold to take a screenshot, and the retained image data is updated.

5. A data backup system, characterized in that: It includes an acquisition module, which is used to acquire backup location information and backup range information after receiving a data backup instruction; the backup location information is used to describe information of a target location for performing a backup action; The backup range information is used to describe the range of the data to be backed up located in the target location; A list module, used to generate a list to be backed up based on the backup location information and the backup range information; The generating of the to-be-backed-up list based on the backup location information and the backup range information comprises: determining the to-be-backed-up data according to the backup location information and the backup range information; acquiring first data information of the to-be-backed-up data; the first data information comprising first name information, first data volume information and first data type; extracting feature data from the to-be-backed-up data; the feature data being associated with feature location information; integrating the first data information, the feature data and the feature location information to obtain the to-be-backed-up list; A backup module, used for backing up the data to be backed up to a target database, and forming backed up data in the target database; A comparison module is used to generate a backed-up list according to the backed-up data, and compare the list to be backed up with the backed-up list to generate a comparison result; the generating the backed-up list according to the backed-up data includes: obtaining second data information of the backed-up data; the second data information includes second name information, second data volume information and second data type; extracting data in the backed-up data according to the characteristic position information to obtain verification data; integrating the second data information, the verification data and the characteristic position information to obtain the backed-up list; the comparing the list to be backed up with the backed-up list to generate the comparison result includes: judging whether the first name information matches the second name information; if so, judging whether the second data type matches the first data type; if so, judging whether the feature data corresponding to the feature position information matches the verification data; if so, generating the comparison result of backup correctness; if the first name information does not match the second name information, generating the comparison result of backup failure; if the second data type does not match the first data type, generating the comparison result of backup error; if the feature data does not match the verification data, generating the comparison result of data error.

6. A data backup device, comprising a memory and a processor, characterized in that: The memory stores a data backup method, and the processor is used to adopt the method according to any one of claims 1 to 4 when executing the data backup method.

7. A storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Backup data verification method, server and storage medium

    CN111625396A

  • Visual backup and comparison method based on distribution network automation system model

    CN112181715A