CN115437849A - Data processing method, device, equipment and computer readable storage medium - Google Patents
Data processing method, device, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN115437849A CN115437849A CN202211155403.4A CN202211155403A CN115437849A CN 115437849 A CN115437849 A CN 115437849A CN 202211155403 A CN202211155403 A CN 202211155403A CN 115437849 A CN115437849 A CN 115437849A
- Authority
- CN
- China
- Prior art keywords
- directory
- data
- cloud disk
- backed
- local
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 30
- 230000001360 synchronised effect Effects 0.000 claims abstract description 136
- 230000005540 biological transmission Effects 0.000 claims abstract description 16
- 238000012163 sequencing technique Methods 0.000 claims description 20
- 238000000034 method Methods 0.000 abstract description 18
- 238000004891 communication Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 238000010079 rubber tapping Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1464—Management of the backup or restore process for networked environments
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a data processing method, a device, equipment and a computer readable storage medium, wherein the method comprises the following steps: uploading data to be backed up to a preset local backup catalog, uploading the data to be backed up to a preset incremental catalog of a transmission type cloud disk, and storing the data to be backed up to a cloud disk synchronous catalog in a synchronous type cloud disk; and determining whether the data to be backed up is completely backed up according to the data sizes of the cloud disk synchronous directory, the local backup directory and the incremental directory. The invention can backup the data to be backed up to the transmission type cloud disk, the synchronous type cloud disk and the local backup directory, determine whether the data to be backed up is completely backed up or not by comparing the data sizes of the cloud disk synchronous directory, the local backup directory and the incremental directory, and repair the data to be backed up according to the data size if the data to be backed up is incomplete so as to determine the complete backup of the data to be backed up, so that the data to be backed up has high disaster tolerance and the integrity of the data to be backed up is improved.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data processing method, apparatus, device, and computer readable storage medium.
Background
In recent years, a large number of novel backup technologies emerge, and the real-time performance, granularity, data volume and other aspects are greatly improved. However, these sophisticated technologies are widely used without expensive special equipment, high service fees or trained technicians, and the scope of application is largely limited.
More importantly, the use of backup software or vendor-provided services alone is not sufficient because it does not adequately take into account whether erroneous data is backed up or detected and repaired at a later date when data is corrupted. There is therefore also a need for an excellent backup method that carefully considers future management. However, in terms of backup methods, much attention is paid to the backup method. In the traditional backup method, data pollution is difficult to detect, the location of a recovery point is difficult, and the disaster tolerance capability is poor.
The above is only for the purpose of assisting understanding of the technical solution of the present invention, and does not represent an admission that the above is the prior art.
Disclosure of Invention
The invention mainly aims to provide a data processing method, a data processing device, data processing equipment and a computer readable storage medium, and aims to solve the technical problems that in the prior art, dirty data can be stored, so that data to be backed up is incomplete, and the disaster tolerance of the data to be backed up is poor.
In order to achieve the above object, the present invention provides a data processing method, including the steps of:
acquiring data to be backed up under a preset local synchronous directory;
uploading the data to be backed up to a preset local backup catalog, and uploading the data to be backed up to a preset incremental catalog of a transmission type cloud disk, wherein the preset synchronous cloud disk synchronously acquires the data to be backed up and stores the data to be backed up to the cloud disk synchronous catalog in the synchronous cloud disk;
and determining whether the data to be backed up is completely backed up according to the data sizes of the cloud disk synchronous directory, the local backup directory and the incremental directory.
Further, the step of determining whether the data to be backed up is completely backed up according to the data sizes of the cloud disk synchronization directory, the local backup directory and the incremental directory includes:
creating a local temporary directory and determining whether a first file exists in a preset cloud disk backup directory in the transmission type cloud disk;
if the first file exists, copying the first file and a second file under the incremental directory, and pasting the first file and the second file under the incremental directory to a local temporary directory;
and determining whether the data to be backed up is completely backed up or not according to the cloud disk synchronous directory, the local backup directory and the local temporary directory.
Further, the step of determining whether the data to be backed up is completely backed up according to the cloud disk synchronization directory, the local backup directory and the local temporary directory includes:
determining whether the data sizes of the cloud disk synchronous directory and the local backup directory are the same or not according to the cloud disk synchronous directory and the local backup directory;
determining whether the data sizes of the cloud disk synchronous directory and the local temporary directory are the same or not according to the cloud disk synchronous directory and the local temporary directory;
and if the data size of the cloud disk synchronous directory is the same as that of the local backup directory and the data size of the cloud disk synchronous directory is the same as that of the local temporary directory, determining that the data to be backed up is completely backed up.
Further, the step of determining whether the data sizes of the cloud disk synchronization directory and the local backup directory are the same according to the cloud disk synchronization directory and the local backup directory includes:
comparing the data sizes of the cloud disk synchronous catalog and the local backup catalog to determine whether the data sizes of the cloud disk synchronous catalog and the local backup catalog are consistent;
if the data size of the cloud disk synchronous directory is not consistent with that of the local backup directory, sorting all third files under the cloud disk synchronous directory according to file names to obtain a first sorting result, and sorting all fourth files under the local backup directory according to file names to obtain a second sorting result;
comparing the data size of the first sequencing result with that of the second sequencing result, and determining each file group with inconsistent data size, wherein the file group comprises a first target file in the first sequencing result and a second target file in the second sequencing result;
and determining a third target file corresponding to the file group in a local temporary directory, and adjusting the cloud disk synchronous directory and the local backup directory according to the third target file, the first target file and the second target file so as to enable the data size of the cloud disk synchronous directory to be the same as that of the local backup directory.
Further, the step of adjusting the cloud disk synchronization directory and the local backup directory according to the third target file, the first target file, and the second target file to make the data sizes of the cloud disk synchronization directory and the local backup directory the same includes:
determining whether a fourth target file and a fifth target file with consistent data sizes exist in the third target file, the first target file and the second target file;
if the fourth target file and the fifth target file exist, determining a sixth target file except the fourth target file and the fifth target file from the third target file, the first target file and the second target file;
and replacing the sixth target file with the fourth target file or the fifth target file so as to enable the data size of the cloud disk synchronous directory to be the same as that of the local backup directory.
Further, the step of determining whether the data sizes of the cloud disk synchronization directory and the local temporary directory are the same according to the cloud disk synchronization directory and the local temporary directory includes:
comparing the data sizes of the cloud disk synchronous catalog and the local temporary catalog to determine whether the data sizes of the cloud disk synchronous catalog and the local backup catalog are consistent;
if the data sizes of the cloud disk synchronous directory and the local backup directory are not consistent, the cloud disk synchronous directory and the local temporary directory are adjusted according to fifth files under the cloud disk synchronous directory and sixth files under the local temporary directory, so that the data sizes of the cloud disk synchronous directory and the local temporary directory are the same.
Further, after the step of determining a complete backup of the data to be backed up according to the data sizes of the cloud disk synchronization directory, the local backup directory, and the incremental directory, the method includes:
and according to preset timing time, putting the second file in the incremental catalog in the transmission type cloud disk under a cloud disk backup catalog to update the first file in the cloud disk backup catalog, and emptying the second file in the incremental catalog.
Further, to achieve the above object, the present invention also provides a data processing apparatus comprising:
the acquisition module is used for acquiring data to be backed up under a preset local synchronous directory;
the uploading module is used for uploading the data to be backed up to a preset local backup catalog and uploading the data to be backed up to a preset incremental catalog of a transmission type cloud disk, wherein the preset synchronous cloud disk synchronously acquires the data to be backed up and stores the data to be backed up to the cloud disk synchronous catalog in the synchronous cloud disk;
and the determining module is used for determining whether the data to be backed up is completely backed up according to the data sizes of the cloud disk synchronous directory, the local backup directory and the incremental directory.
Furthermore, to achieve the above object, the present invention also provides a data processing apparatus comprising: a memory, a processor and a data processing program stored on the memory and executable on the processor, the data processing program, when executed by the processor, implementing the steps of the data processing method as described above.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a data processing program which, when executed by a processor, implements the steps of the aforementioned data processing method.
The data to be backed up is determined to be completely backed up through comparing the data sizes of the cloud disk synchronous catalog, the local backup catalog and the incremental catalog, if the data to be backed up is incomplete, the data to be backed up is repaired according to the data size to determine the complete backup of the data to be backed up, so that the data to be backed up has high disaster tolerance and the integrity of the data to be backed up is improved.
Drawings
FIG. 1 is a block diagram of a data processing device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a data processing method according to a first embodiment of the present invention;
FIG. 3 is a functional block diagram of a data processing apparatus according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a data processing device in a hardware operating environment according to an embodiment of the present invention.
The data processing device in the embodiment of the present invention may be a PC, or may be a mobile terminal device having a display function, such as a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer 3) player, an MP4 (Moving Picture Experts Group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4) player, a portable computer, or the like.
As shown in fig. 1, the data processing apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the data processing device may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. In particular, the light sensor may include an ambient light sensor that adjusts the brightness of the display screen based on the ambient light level and a proximity sensor that turns off the display screen and/or backlight when the data processing device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the device is stationary, and can be used for applications of recognizing the posture of data processing equipment (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; of course, the data processing device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a data processing program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting a background server and communicating data with the background server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be used to call a data handler stored in the memory 1005.
In this embodiment, the data processing apparatus includes: the system comprises a memory 1005, a processor 1001 and a data processing program which is stored on the memory 1005 and can run on the processor 1001, wherein when the processor 1001 calls the data processing program stored in the memory 1005, the steps of the data processing method in each embodiment are executed.
The present invention further provides a data processing method, and referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the method of the present invention.
In this embodiment, the data processing method includes the steps of:
step S101, obtaining data to be backed up under a preset local synchronous directory;
it should be noted that, before obtaining data to be backed up in a preset local synchronization directory, environment building is performed, a local synchronization directory and a local backup directory are built in the local, a cloud disk backup directory is built in a preset transmission-type cloud disk, an incremental directory is built in the transmission-type cloud disk, a cloud disk synchronization directory is built in the synchronization-type cloud disk, and a synchronization relationship is built between the cloud disk synchronization directory and the local synchronization directory, where the synchronization relationship is that data in the local synchronization directory is consistent with data in the cloud disk synchronization directory.
In this embodiment, a user may actively upload data to be backed up to a preset local synchronization directory, where the data to be backed up may be source codes packaged by the user, some private data of the user, or mobile phone data, and then obtain the data to be backed up uploaded to the preset local synchronization directory by the user.
Step S102, uploading the data to be backed up to a preset local backup catalog, and uploading the data to be backed up to a preset incremental catalog of a transmission type cloud disk, wherein the preset synchronous cloud disk synchronously acquires the data to be backed up and stores the data to be backed up to the cloud disk synchronous catalog in the synchronous cloud disk;
in this embodiment, after obtaining the data to be backed up, the synchronous cloud disk synchronously obtains the data to be backed up, stores the data to be backed up in a cloud disk synchronous directory in the synchronous cloud disk, then uploads the data to be backed up to a preset local backup directory, and then uploads the data to be backed up to a preset incremental directory of a transmission cloud disk, where it should be noted that the synchronous cloud disk refers to a cloud disk for performing data access in a folder synchronization manner, and the transmission cloud disk refers to a cloud disk for performing data access in an uploading and downloading manner as a main access operation method.
Step S103, determining the complete backup of the data to be backed up according to the data sizes of the cloud disk synchronous directory, the local backup directory and the incremental directory.
In this embodiment, the files in the cloud disk synchronous directory, the files in the local backup directory, and the files in the incremental directory may be compared in data size, and it may be determined through the comparison whether the data to be backed up is completely backed up in the incremental directory of the transmission-type cloud disk, the cloud disk synchronous directory in the synchronous-type cloud disk, and the local backup directory, and if there is an incomplete incremental directory or a cloud disk synchronous directory or a local backup directory, the data to be backed up may be repaired by obtaining two directories other than the incomplete directory, so as to further ensure complete backup of the data to be backed up.
The data processing method provided by this embodiment includes acquiring data to be backed up in a preset local synchronization directory, uploading the data to be backed up to the preset local backup directory, and uploading the data to be backed up to a preset incremental directory of a transmission-type cloud disk, where the preset synchronization-type cloud disk synchronously acquires the data to be backed up, stores the data to be backed up in the cloud disk synchronization directory in the synchronization-type cloud disk, and then determines whether the data to be backed up is completely backed up according to the data sizes of the cloud disk synchronization directory, the local backup directory, and the incremental directory, so that the data to be backed up can be backed up in the transmission-type cloud disk, the synchronization-type cloud disk, and the local backup directory, and the data size of the incremental directory, and whether the data to be backed up is completely backed up is determined by comparing the data sizes of the cloud disk synchronization directory, the local backup directory, and the incremental directory, and if the data to be backed up is incomplete, the data to be backed up is repaired according to the data size, so as to determine that the data to be backed up is completely backed up, so that the data has high disaster tolerance and the integrity of the data to be backed up is also improved.
A second embodiment of the data processing method of the present invention is proposed based on the first embodiment, and in this embodiment, step S103 includes:
step S201, creating a local temporary directory, and determining whether a first file exists in a preset cloud disk backup directory in the transmission-type cloud disk;
step S202, if the first file exists, copying the first file and a second file under the incremental directory, and pasting the first file and the second file under the incremental directory to a local temporary directory;
step S203, determining whether the data to be backed up is completely backed up according to the cloud disk synchronous directory, the local backup directory and the local temporary directory.
In this embodiment, a local temporary directory is created locally, and it is determined whether a first file exists in a preset cloud disk backup directory in the transmission-type cloud disk, if the first file exists, the first file and a second file in the incremental directory are copied and pasted to the local temporary directory, where the first file and the second file exist in the local temporary directory; and if the first file does not exist, directly copying the second file and pasting the second file to a local temporary directory, wherein the local temporary directory only exists in the second file.
And then, according to the cloud disk synchronous directory, the local backup directory and the local temporary directory, determining the complete backup of the data to be backed up.
Further, in an embodiment, step S203 includes:
step a, determining whether the data sizes of the cloud disk synchronous catalog and the local backup catalog are the same according to the cloud disk synchronous catalog and the local backup catalog;
b, determining whether the data sizes of the cloud disk synchronous directory and the local temporary directory are the same according to the cloud disk synchronous directory and the local temporary directory;
and c, if the data sizes of the cloud disk synchronous directory and the local backup directory are the same, and the data sizes of the cloud disk synchronous directory and the local temporary directory are the same, determining that the data to be backed up are completely backed up.
In this embodiment, first, whether the data sizes of the cloud disk synchronization directory and the local backup directory are the same is determined by comparing the size of the file data under the cloud disk synchronization directory with the size of the file data under the local backup directory, and if not, a file with a size different from that of the file data under the cloud disk synchronization directory is determined, and the file may be repaired through the local temporary directory.
Then, comparing the size of the file data under the cloud disk synchronous directory with the size of the file data under the local temporary directory, determining whether the data sizes of the cloud disk synchronous directory and the local temporary directory are the same, if not, determining a file with the size of the file data under the cloud disk synchronous directory different from the size of the file data under the local temporary directory, and repairing the file through the local temporary directory.
And finally, if the data size of the cloud disk synchronous directory is the same as that of the local backup directory, and the data size of the cloud disk synchronous directory is the same as that of the local temporary directory, determining that the data to be backed up is completely backed up.
Further, in one embodiment, step a includes:
step a1, comparing the data sizes of the cloud disk synchronous catalog and the local backup catalog, and determining whether the data sizes of the cloud disk synchronous catalog and the local backup catalog are consistent;
step a2, if the data sizes of the cloud disk synchronous directory and the local backup directory are not consistent, sorting all third files under the cloud disk synchronous directory according to file names to obtain a first sorting result, and sorting all fourth files under the local backup directory according to file names to obtain a second sorting result;
step a3, comparing the data sizes of the first sequencing result and the second sequencing result, and determining each file group with inconsistent data sizes, wherein the file group comprises a first target file in the first sequencing result and a second target file in the second sequencing result;
step a4, determining a third target file corresponding to the file group in the local temporary directory, and adjusting the cloud disk synchronous directory and the local backup directory according to the third target file, the first target file and the second target file, so that the data sizes of the cloud disk synchronous directory and the local backup directory are the same.
In this embodiment, the data size of the cloud disk synchronous directory and the data size of the local backup directory are compared to determine whether the data sizes of the cloud disk synchronous directory and the local backup directory are consistent; and if the data size of the cloud disk synchronous directory is inconsistent with that of the local backup directory, sequencing all third files in the cloud disk synchronous directory according to file names to obtain a first sequencing result, and sequencing all fourth files in the local backup directory according to the file names to obtain a second sequencing result.
Then, comparing the data sizes of the first sorting result with the second sorting result, that is, comparing the data sizes of the files with the same file name according to the sorting results, so as to determine each file group with inconsistent data sizes, where the file group includes a first target file in the first sorting result and a second target file in the second sorting result, and it should be noted that the data sizes of the first target file and the second target file in the file group are inconsistent but the file names are consistent.
And then, determining a third target file corresponding to the file group in the local temporary directory, wherein the third target file refers to a third target file with the same file name as the first target file or the second target file in the local temporary directory.
And finally, adjusting the cloud disk synchronous directory and the local backup directory according to the third target file, the first target file and the second target file, so that the data sizes of the cloud disk synchronous directory and the local backup directory are the same.
Further, in an embodiment, step a4 includes:
step a41, determining whether a fourth target file and a fifth target file with consistent data size exist in the third target file, the first target file and the second target file;
step a42, if the fourth target file and the fifth target file exist, determining a sixth target file except the fourth target file and the fifth target file from the third target file, the first target file and the second target file;
step a43, replacing the sixth target file with the fourth target file or the fifth target file, so that the data size of the cloud disk synchronization directory is the same as that of the local backup directory.
In this embodiment, first, it is determined whether a fourth target file and a fifth target file with the same data size exist in the third target file, the first target file and the second target file, that is, the third target file, the first target file and the second target file are compared in pairs, so as to determine whether the data sizes are the same, specifically, if the data sizes of the third target file and the first target file are the same, the third target file is used as the fourth target file, and the first target file is used as the fifth target file. And if the fourth target file and the fifth target file do not exist, feeding back the third target file, the first target file and the second target file.
If the fourth target file and the fifth target file exist, determining a sixth target file except the fourth target file and the fifth target file from the third target file, the first target file and the second target file, specifically, if the data size of the third target file is the same as that of the first target file, taking the third target file as the fourth target file, taking the first target file as the fifth target file, and taking the second target file as the sixth target file.
And finally, replacing the sixth target file with the fourth target file or the fifth target file so as to enable the data size of the cloud disk synchronous directory to be the same as that of the local backup directory.
Further, in one embodiment, step b includes:
step b1, comparing the data sizes of the cloud disk synchronous catalog and the local temporary catalog, and determining whether the data sizes of the cloud disk synchronous catalog and the local backup catalog are consistent;
and b2, if the data sizes of the cloud disk synchronous directory and the local backup directory are not consistent, adjusting the cloud disk synchronous directory and the local temporary directory according to the fifth files in the cloud disk synchronous directory and the sixth files in the local temporary directory so as to enable the data sizes of the cloud disk synchronous directory and the local temporary directory to be the same.
In this embodiment, the data size of the cloud disk synchronization directory is compared with the data size of the local temporary directory, so as to determine whether the data sizes of the cloud disk synchronization directory and the local backup directory are consistent; and if the data size of the cloud disk synchronous directory is not consistent with that of the local backup directory, determining that the data size of the cloud disk synchronous directory is the same as that of the local temporary directory according to each fifth file under the cloud disk synchronous directory and each sixth file under the local temporary directory.
In the data processing method provided by this embodiment, a local temporary directory is created, it is determined whether a first file exists in a preset cloud disk backup directory in the transmission-type cloud disk, and then, if the first file exists, the first file and a second file in the incremental directory are copied and pasted to the local temporary directory, and then, according to the cloud disk synchronization directory, the local backup directory, and the local temporary directory, a complete backup of data to be backed up is determined.
Based on the above-described respective embodiments, a third embodiment of the data processing method of the present invention is proposed, in which step S103 is followed by:
and G, according to preset timing time, putting the second file under the incremental directory into a cloud disk backup directory in the transmission type cloud disk to update the first file under the cloud disk backup directory, and emptying the second file in the incremental directory.
In this embodiment, according to a manually preset timing time, the second file in the incremental directory is placed in the cloud disk backup directory in the transmission-type cloud disk to update the first file in the cloud disk backup directory, and the second file in the incremental directory is emptied.
According to the data processing method provided by the embodiment, the second file in the incremental directory is placed in the transmission-type cloud disk under the cloud disk backup directory according to the preset timing time so as to update the first file in the cloud disk backup directory and empty the second file in the incremental directory, so that the data in the cloud disk backup directory can be updated through the timing time, the data in the cloud disk backup directory is ensured to be the latest backup data, the local temporary directory is accurately obtained according to the cloud disk backup directory, the data to be backed up is accurately and completely backed up according to the local temporary directory, and the integrity of the data to be backed up is improved.
The present invention also provides a data processing apparatus, referring to fig. 3, the data processing apparatus including:
the obtaining module 10 is configured to obtain data to be backed up in a preset local synchronization directory;
the uploading module 20 is configured to upload the data to be backed up to a preset local backup directory and upload the data to be backed up to a preset incremental directory of a transmission-type cloud disk, where the preset synchronous cloud disk synchronously acquires the data to be backed up and stores the data to be backed up in a cloud disk synchronous directory in the synchronous cloud disk;
and the determining module 30 is configured to determine whether the data to be backed up is completely backed up according to the data sizes of the cloud disk synchronization directory, the local backup directory, and the incremental directory.
Further, the determining module 30 is further configured to:
creating a local temporary directory and determining whether a first file exists in a preset cloud disk backup directory in the transmission type cloud disk;
if the first file exists, copying the first file and a second file under the incremental directory, and pasting the first file and the second file under the incremental directory to a local temporary directory;
and determining whether the data to be backed up is completely backed up or not according to the cloud disk synchronous directory, the local backup directory and the local temporary directory.
Further, the determining module 30 is further configured to:
determining whether the data sizes of the cloud disk synchronous directory and the local backup directory are the same or not according to the cloud disk synchronous directory and the local backup directory;
determining whether the data sizes of the cloud disk synchronous directory and the local temporary directory are the same or not according to the cloud disk synchronous directory and the local temporary directory;
and if the data size of the cloud disk synchronous directory is the same as that of the local backup directory and the data size of the cloud disk synchronous directory is the same as that of the local temporary directory, determining that the data to be backed up is completely backed up.
Further, the determining module 30 is further configured to:
comparing the data sizes of the cloud disk synchronous catalog and the local backup catalog to determine whether the data sizes of the cloud disk synchronous catalog and the local backup catalog are consistent;
if the data size of the cloud disk synchronous directory is not consistent with that of the local backup directory, sorting all third files under the cloud disk synchronous directory according to file names to obtain a first sorting result, and sorting all fourth files under the local backup directory according to file names to obtain a second sorting result;
comparing the data sizes of the first sequencing result with the second sequencing result, and determining each file group with inconsistent data sizes, wherein the file groups comprise a first target file in the first sequencing result and a second target file in the second sequencing result;
and determining a third target file corresponding to the file group in a local temporary directory, and adjusting the cloud disk synchronous directory and the local backup directory according to the third target file, the first target file and the second target file so as to enable the data size of the cloud disk synchronous directory to be the same as that of the local backup directory.
Further, the determining module 30 is further configured to:
determining whether a fourth target file and a fifth target file with consistent data sizes exist in the third target file, the first target file and the second target file;
if the fourth target file and the fifth target file exist, determining a sixth target file except the fourth target file and the fifth target file from the third target file, the first target file and the second target file;
and replacing the sixth target file with the fourth target file or the fifth target file so as to enable the data size of the cloud disk synchronous directory to be the same as that of the local backup directory.
Further, the determining module 30 is further configured to:
comparing the data sizes of the cloud disk synchronous directory and the local temporary directory to determine whether the data sizes of the cloud disk synchronous directory and the local backup directory are consistent;
if the data sizes of the cloud disk synchronous directory and the local backup directory are not consistent, the cloud disk synchronous directory and the local temporary directory are adjusted according to fifth files under the cloud disk synchronous directory and sixth files under the local temporary directory, so that the data sizes of the cloud disk synchronous directory and the local temporary directory are the same.
Further, the data processing apparatus is further configured to:
and according to preset timing time, putting the second file in the incremental directory into a cloud disk backup directory in the transmission type cloud disk so as to update the first file in the cloud disk backup directory and empty the second file in the incremental directory.
The methods executed by the program units can refer to the embodiments of the data processing method of the present invention, and are not described herein again.
In addition, an embodiment of the present invention further provides a data processing apparatus, where the data processing apparatus includes: a memory, a processor and a data processing program stored on the memory and executable on the processor, the data processing program, when executed by the processor, implementing the steps of the data processing method as described above.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a data processing program is stored, and when the data processing program is executed by a processor, the data processing program implements the steps of the data processing method described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of other like elements in a process, method, article, or system comprising the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A data processing method, characterized in that the data processing method comprises the steps of:
acquiring data to be backed up under a preset local synchronous directory;
uploading the data to be backed up to a preset local backup catalog, and uploading the data to be backed up to a preset incremental catalog of a transmission type cloud disk, wherein the preset synchronous cloud disk synchronously acquires the data to be backed up and stores the data to be backed up to a cloud disk synchronous catalog in the synchronous cloud disk;
and determining whether the data to be backed up is completely backed up according to the data sizes of the cloud disk synchronous directory, the local backup directory and the incremental directory.
2. The data processing method of claim 1, wherein the step of determining whether the data to be backed up is completely backed up according to the data sizes of the cloud disk synchronization directory, the local backup directory, and the incremental directory comprises:
creating a local temporary directory and determining whether a first file exists in a preset cloud disk backup directory in the transmission type cloud disk;
if the first file exists, copying the first file and a second file under the incremental directory, and pasting the first file and the second file under the incremental directory to a local temporary directory;
and determining whether the data to be backed up is completely backed up according to the cloud disk synchronous directory, the local backup directory and the local temporary directory.
3. The data processing method as claimed in claim 2, wherein the step of determining whether the data to be backed up is completely backed up according to the cloud disk synchronization directory, the local backup directory, and the local temporary directory comprises:
determining whether the data sizes of the cloud disk synchronous directory and the local backup directory are the same or not according to the cloud disk synchronous directory and the local backup directory;
determining whether the data sizes of the cloud disk synchronous directory and the local temporary directory are the same or not according to the cloud disk synchronous directory and the local temporary directory;
and if the data size of the cloud disk synchronous directory is the same as that of the local backup directory and the data size of the cloud disk synchronous directory is the same as that of the local temporary directory, determining that the data to be backed up is completely backed up.
4. The data processing method of claim 3, wherein the step of determining whether the data sizes of the cloud disk synchronization directory and the local backup directory are the same according to the cloud disk synchronization directory and the local backup directory comprises:
comparing the data sizes of the cloud disk synchronous catalog and the local backup catalog to determine whether the data sizes of the cloud disk synchronous catalog and the local backup catalog are consistent;
if the data size of the cloud disk synchronous directory is not consistent with that of the local backup directory, sorting all third files under the cloud disk synchronous directory according to file names to obtain a first sorting result, and sorting all fourth files under the local backup directory according to file names to obtain a second sorting result;
comparing the data sizes of the first sequencing result with the second sequencing result, and determining each file group with inconsistent data sizes, wherein the file groups comprise a first target file in the first sequencing result and a second target file in the second sequencing result;
and determining a third target file corresponding to the file group in a local temporary directory, and adjusting the cloud disk synchronous directory and the local backup directory according to the third target file, the first target file and the second target file so as to enable the data size of the cloud disk synchronous directory to be the same as that of the local backup directory.
5. The data processing method of claim 4, wherein the step of adjusting the cloud disk synchronization directory and the local backup directory according to the third target file, the first target file and the second target file so that the data size of the cloud disk synchronization directory and the data size of the local backup directory are the same comprises:
determining whether a fourth target file and a fifth target file with consistent data sizes exist in the third target file, the first target file and the second target file;
if the fourth target file and the fifth target file exist, determining a sixth target file except the fourth target file and the fifth target file from the third target file, the first target file and the second target file;
and replacing the sixth target file with the fourth target file or the fifth target file so that the data size of the cloud disk synchronous directory is the same as that of the local backup directory.
6. The data processing method as claimed in claim 3, wherein the step of determining whether the data sizes of the cloud disk synchronization directory and the local temporary directory are the same according to the cloud disk synchronization directory and the local temporary directory comprises:
comparing the data sizes of the cloud disk synchronous directory and the local temporary directory to determine whether the data sizes of the cloud disk synchronous directory and the local backup directory are consistent;
if the data sizes of the cloud disk synchronous directory and the local backup directory are not consistent, the cloud disk synchronous directory and the local temporary directory are adjusted according to the fifth files in the cloud disk synchronous directory and the sixth files in the local temporary directory, so that the data sizes of the cloud disk synchronous directory and the local temporary directory are the same.
7. The data processing method according to any one of claims 1 to 6, wherein the step of determining a full backup of the data to be backed up according to the data sizes of the cloud disk synchronization directory, the local backup directory, and the incremental directory is followed by:
and according to preset timing time, putting the second file in the incremental catalog in the transmission type cloud disk under a cloud disk backup catalog to update the first file in the cloud disk backup catalog, and emptying the second file in the incremental catalog.
8. A data processing apparatus, characterized in that the data processing apparatus comprises:
the acquisition module is used for acquiring data to be backed up under a preset local synchronous directory;
the uploading module is used for uploading the data to be backed up to a preset local backup catalog and uploading the data to be backed up to a preset incremental catalog of a transmission type cloud disk, wherein the preset synchronous cloud disk synchronously acquires the data to be backed up and stores the data to be backed up to the cloud disk synchronous catalog in the synchronous cloud disk;
and the determining module is used for determining whether the data to be backed up is completely backed up or not according to the data sizes of the cloud disk synchronous directory, the local backup directory and the incremental directory.
9. A data processing apparatus, characterized in that the data processing apparatus comprises: memory, processor and data processing program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the data processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a data processing program is stored thereon, which data processing program, when being executed by a processor, carries out the steps of the data processing method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211155403.4A CN115437849A (en) | 2022-09-21 | 2022-09-21 | Data processing method, device, equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211155403.4A CN115437849A (en) | 2022-09-21 | 2022-09-21 | Data processing method, device, equipment and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115437849A true CN115437849A (en) | 2022-12-06 |
Family
ID=84248266
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211155403.4A Pending CN115437849A (en) | 2022-09-21 | 2022-09-21 | Data processing method, device, equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115437849A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107454161A (en) * | 2017-07-31 | 2017-12-08 | 郑州云海信息技术有限公司 | A kind of data back up method and device |
CN109597717A (en) * | 2018-12-07 | 2019-04-09 | 北京金山云网络技术有限公司 | A kind of data backup, restoration methods, device, electronic equipment and storage medium |
WO2021135530A1 (en) * | 2020-07-21 | 2021-07-08 | 平安科技(深圳)有限公司 | Data recovery method and apparatus, electronic device, and medium |
CN113672436A (en) * | 2021-07-30 | 2021-11-19 | 济南浪潮数据技术有限公司 | Disaster recovery backup method, device, equipment and storage medium |
CN114153652A (en) * | 2020-09-07 | 2022-03-08 | 华为云计算技术有限公司 | Directory backup integrity detection method and device |
-
2022
- 2022-09-21 CN CN202211155403.4A patent/CN115437849A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107454161A (en) * | 2017-07-31 | 2017-12-08 | 郑州云海信息技术有限公司 | A kind of data back up method and device |
CN109597717A (en) * | 2018-12-07 | 2019-04-09 | 北京金山云网络技术有限公司 | A kind of data backup, restoration methods, device, electronic equipment and storage medium |
WO2021135530A1 (en) * | 2020-07-21 | 2021-07-08 | 平安科技(深圳)有限公司 | Data recovery method and apparatus, electronic device, and medium |
CN114153652A (en) * | 2020-09-07 | 2022-03-08 | 华为云计算技术有限公司 | Directory backup integrity detection method and device |
CN113672436A (en) * | 2021-07-30 | 2021-11-19 | 济南浪潮数据技术有限公司 | Disaster recovery backup method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9317280B2 (en) | Method, equipment and system of incremental update | |
US20230065189A1 (en) | File Processing Method and Mobile Terminal | |
CN105389076B (en) | Method for providing notification through electronic device and electronic device | |
CN109725933B (en) | Big data document generation method, device, equipment and computer readable storage medium | |
CN107622025B (en) | Data transmission method and equipment | |
CN104066077A (en) | OTA downloading and upgrading method and device thereof | |
CN105607927A (en) | Page display method and apparatus | |
CN111192005B (en) | Government affair service processing method and device, computer equipment and readable storage medium | |
CN109582402B (en) | Page display method and device | |
US20130297563A1 (en) | Timestamp management method for data synchronization and terminal therefor | |
CN102932523A (en) | Systems and methods for incorporating a control connected media frame | |
EP3139645A1 (en) | Method and system for transferring and sharing information among mobile devices | |
EP3340155A1 (en) | Electronic device and method for displaying web page using the same | |
CN104750688A (en) | Photo management method and system | |
CN103873575A (en) | WiFi (wireless fidelity) user interface-based application operation method and device | |
CN103020173A (en) | Video image information searching method and system for mobile terminal and mobile terminal | |
EP2621142A1 (en) | Apparatus and Method for Determining Duplication of Content in Portable Terminal | |
CN110990038B (en) | Method, apparatus, electronic device and medium for applying local update | |
US10848558B2 (en) | Method and apparatus for file management | |
CN106126382B (en) | Identify the method and device of file system error | |
CN110647369B (en) | Page dynamic display method and device, mobile terminal and storage medium | |
CN101674356B (en) | Electronic device and method thereof for shortening operation response time | |
CN115437849A (en) | Data processing method, device, equipment and computer readable storage medium | |
CN105205036B (en) | A kind of method and electronic device of Auto-writing information | |
CN109558408B (en) | Method and device for updating list, electronic equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
AD01 | Patent right deemed abandoned |
Effective date of abandoning: 20240220 |
|
AD01 | Patent right deemed abandoned |