CN112015594A - Backup method, device and equipment of rollback file and storage medium - Google Patents

Backup method, device and equipment of rollback file and storage medium Download PDF

Info

Publication number
CN112015594A
CN112015594A CN202010880807.4A CN202010880807A CN112015594A CN 112015594 A CN112015594 A CN 112015594A CN 202010880807 A CN202010880807 A CN 202010880807A CN 112015594 A CN112015594 A CN 112015594A
Authority
CN
China
Prior art keywords
file
byte data
backed
rollback
byte
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
Application number
CN202010880807.4A
Other languages
Chinese (zh)
Inventor
田祥博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202010880807.4A priority Critical patent/CN112015594A/en
Publication of CN112015594A publication Critical patent/CN112015594A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Power Engineering (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the field of research and development management, and discloses a backup method, a backup device, backup equipment and a backup storage medium for a rollback file, which are used for solving the problem of low efficiency of searching the rollback file when a file is rolled back by gray release. The backup method of the rollback file comprises the following steps: acquiring byte data of a file to be backed up, wherein the byte data is the size of a storage space occupied by the file to be backed up; supplementing the byte data by adopting a message digest algorithm to obtain initialized byte data; performing cyclic linear calculation on the initialized byte data by using a preset buffer to obtain a safety information code; acquiring a time stamp of a file to be backed up; and splicing the timestamp and the safety information code by using a combination algorithm to obtain the name of the file to be backed up, determining the name of the file to be backed up as the name of the file to be backed up to obtain a rollback file, and storing the rollback file into a rollback folder. In addition, the invention also relates to a block chain technology, and the files to be backed up can be stored in the block chain.

Description

Backup method, device and equipment of rollback file and storage medium
Technical Field
The present invention relates to the field of research and development management, and in particular, to a method, an apparatus, a device, and a storage medium for backing up a rollback file.
Background
With the continuous development and progress of computer technology, the network project in computer technology also needs to be updated continuously. The gray release is a common updating mode in the updating of the network project, and the gray release refers to that a part of users are selected to access a new version of the project according to a specific rule, a part of users still access an old version of the project, and after the function verification of the new version of the project is successful, all the users are accessed and migrated to the new version of the project, so that the updating of the network project is completed.
After the gray release project, once a new version of the project is found to have a problem, the old version needs to be switched. In the prior art, when a server executes a function of file rollback, a file name of a file to be rolled back cannot be accurately found, so that the efficiency of searching for the rolled back file is low.
Disclosure of Invention
The invention mainly aims to solve the problem that the efficiency of searching for the rollback file is low when the grey release is used for rolling back the file.
The first aspect of the present invention provides a backup method for a rollback file, including: acquiring byte data of a file to be backed up, wherein the byte data is the size of a storage space occupied by the file to be backed up; supplementing the byte data by adopting a message digest algorithm to obtain initialized byte data; performing cyclic linear calculation on the initialized byte data by using a preset buffer to obtain a safety information code; acquiring a time stamp of the file to be backed up, wherein the time stamp is used for indicating the time corresponding to the last change instruction executed by the file to be backed up; and splicing the timestamp and the safety information code by using a combination algorithm to obtain a name of a file to be backed up, determining the name of the file to be backed up as the name of the file to be backed up to obtain a rollback file, and storing the rollback file into a rollback folder.
Optionally, in a first implementation manner of the first aspect of the present invention, the supplementing the byte data by using a message digest algorithm to obtain initialized byte data includes: judging whether the length of the byte data is equal to a preset byte length by adopting a message digest algorithm; if the length of the byte data is smaller than the preset byte length, supplementing the length of the byte data until the length of the byte data reaches the preset byte length to obtain supplemented byte data; if the length of the byte data is equal to the preset byte length, determining the byte data as byte data to be supplemented; and adding extension data after the last bit of the byte data to be supplemented to obtain initialized byte data, wherein the extension data is data for recording the length of the byte data.
Optionally, in a second implementation manner of the first aspect of the present invention, if the length of the byte data is smaller than the preset byte length, the supplementing the length of the byte data until the length of the byte data reaches the preset byte length, and obtaining supplemented byte data includes: if the length of the byte data is less than the preset byte length, calculating the length n of the byte data needing to be supplemented according to a preset formula, wherein the preset formula is as follows: (n + m) mod512 ═ 448, where m is the length of byte data, n is the length of byte data to be supplemented, and n and m are both positive integers; and supplementing the supplementary bytes with the length of n behind the byte data to obtain the byte data to be supplemented.
Optionally, in a third implementation manner of the first aspect of the present invention, the performing a cyclic linear calculation on the initialized byte data by using a preset buffer to obtain a security information code includes: initializing the preset buffer to obtain an initial input value, and inputting the initial input value into a preset linear function to obtain a first calculation result; averagely dividing the initialization byte data into four groups to respectively obtain first grouping byte data, second grouping byte data, third grouping byte data and fourth grouping byte data; adding the first calculation result and the first grouped byte data and inputting the result into the preset linear function to obtain a second calculation result; adding the second calculation result and the second byte data to be input into the preset linear function to obtain a third calculation result; adding the third calculation result and the third packet byte data, and inputting the result into the preset linear function to obtain a fourth calculation result; adding the fourth calculation result and the fourth grouped byte data and inputting the result into the preset linear function to obtain a fifth calculation result; and combining the second calculation result, the third calculation result, the fourth calculation result and the fifth calculation result to obtain a safety information code.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the obtaining a timestamp of the file to be backed up, where the timestamp is used to indicate a time corresponding to a last change instruction executed by the file to be backed up, includes: respectively extracting the last time and the current time of the file to be backed up, wherein the last time comprises the last access time, the last modification time and the last change time; respectively calculating a first time interval between the last access time and the current time, a second time interval between the last modification time and the current time and a third time interval between the last modification time and the current time; and screening a target time interval with the smallest time interval value from the first time interval, the second time interval and the third time interval, and determining the last time corresponding to the target time interval as a time stamp of the file to be backed up, wherein the time stamp is used for indicating the time corresponding to the last change instruction executed by the file to be backed up.
Optionally, in a fifth implementation manner of the first aspect of the present invention, the splicing the timestamp and the security information code by using a combination algorithm to obtain a name of a file to be backed up, determining that the name of the file to be backed up is the name of the file to be backed up, obtaining a rollback file, and saving the rollback file in a rollback folder includes: respectively extracting the time stamp and the safety information code of the file to be backed up by adopting a combination algorithm; splicing the safety information code after the time stamp by using a preset connector to obtain a name of a file to be backed up, determining the name of the file to be backed up as the name of the file to be backed up to obtain a rollback file, and storing the rollback file into a rollback folder.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the obtaining byte data of the file to be backed up, where the byte data is a size of a storage space occupied by the file to be backed up, includes: reading a file to be backed up, and acquiring a plurality of file data information in the file to be backed up; respectively counting the byte number of each file data information in the plurality of file data information according to a counting algorithm to obtain a plurality of basic byte numbers; summarizing the basic byte numbers to obtain byte data of the file to be backed up, wherein the byte data is the size of the storage space occupied by the file to be backed up.
A second aspect of the present invention provides a backup apparatus for rolling back a file, including: the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring byte data of a file to be backed up, and the byte data is the size of a storage space occupied by the file to be backed up; the supplement module is used for supplementing the byte data by adopting a message digest algorithm to obtain initialized byte data; the calculation module is used for performing cyclic linear calculation on the initialized byte data by utilizing a preset buffer to obtain a safety information code; the second obtaining module is used for obtaining a timestamp of the file to be backed up, wherein the timestamp is used for indicating the moment corresponding to the last change instruction executed by the file to be backed up; and the determining and storing module is used for splicing the timestamp and the safety information code by using a combination algorithm to obtain a name of the file to be backed up, determining the name of the file to be backed up as the name of the file to be backed up to obtain a rollback file, and storing the rollback file into a rollback folder.
Optionally, in a first implementation manner of the second aspect of the present invention, the supplementary module includes: the judging unit is used for judging whether the length of the byte data is equal to the preset byte length by adopting a message digest algorithm; a first determining unit, configured to, if the length of the byte data is smaller than the preset byte length, supplement the length of the byte data until the length of the byte data reaches the preset byte length, to obtain byte data to be supplemented; a second determining unit, configured to determine the byte data as byte data to be supplemented if the length of the byte data is equal to the preset byte length; and the adding unit is used for adding extension data after the last bit of the supplementary byte data to obtain initialized byte data, wherein the extension data is data for recording the length of the byte data.
Optionally, in a second implementation manner of the second aspect of the present invention, the first determining unit is specifically configured to: if the length of the byte data is less than the preset byte length, calculating the length n of the byte data needing to be supplemented according to a preset formula, wherein the preset formula is as follows: (n + m) mod512 ═ 448, where m is the length of byte data, n is the length of byte data to be supplemented, and n and m are both positive integers; and supplementing the supplementary bytes with the length of n behind the byte data to obtain the byte data to be supplemented.
Optionally, in a third implementation manner of the second aspect of the present invention, the calculation module is specifically configured to: initializing the preset buffer to obtain an initial input value, and inputting the initial input value into a preset linear function to obtain a first calculation result; averagely dividing the initialization byte data into four groups to respectively obtain first grouping byte data, second grouping byte data, third grouping byte data and fourth grouping byte data; adding the first calculation result and the first grouped byte data and inputting the result into the preset linear function to obtain a second calculation result; adding the second calculation result and the second byte data to be input into the preset linear function to obtain a third calculation result; adding the third calculation result and the third packet byte data, and inputting the result into the preset linear function to obtain a fourth calculation result; adding the fourth calculation result and the fourth grouped byte data and inputting the result into the preset linear function to obtain a fifth calculation result; and combining the second calculation result, the third calculation result, the fourth calculation result and the fifth calculation result to obtain a safety information code.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the second obtaining module is specifically configured to: respectively extracting the last time and the current time of the file to be backed up, wherein the last time comprises the last access time, the last modification time and the last change time; respectively calculating a first time interval between the last access time and the current time, a second time interval between the last modification time and the current time and a third time interval between the last modification time and the current time; and screening a target time interval with the smallest time interval value from the first time interval, the second time interval and the third time interval, and determining the last time corresponding to the target time interval as a time stamp of the file to be backed up, wherein the time stamp is used for indicating the time corresponding to the last change instruction executed by the file to be backed up.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the determining and saving module is specifically configured to: respectively extracting the time stamp and the safety information code of the file to be backed up by adopting a combination algorithm; splicing the safety information code after the time stamp by using a preset connector to obtain a name of a file to be backed up, determining the name of the file to be backed up as the name of the file to be backed up to obtain a rollback file, and storing the rollback file into a rollback folder.
Optionally, in a sixth implementation manner of the second aspect of the present invention, the first obtaining module is specifically configured to: reading a file to be backed up, and acquiring a plurality of file data information in the file to be backed up; respectively counting the byte number of each file data information in the plurality of file data information according to a counting algorithm to obtain a plurality of basic byte numbers; summarizing the basic byte numbers to obtain byte data of the file to be backed up, wherein the byte data is the size of the storage space occupied by the file to be backed up.
A third aspect of the present invention provides a backup device for rolling back a file, including: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line; the at least one processor invokes the instructions in the memory to cause the backup device of the rollback file to perform the backup method of the rollback file described above.
A fourth aspect of the present invention provides a computer-readable storage medium that may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like. The computer-readable storage medium has stored therein instructions that, when executed on a computer, cause the computer to perform the above-described backup method of a rollback file.
In the technical scheme provided by the invention, byte data of a file to be backed up is acquired, wherein the byte data is the size of a storage space occupied by the file to be backed up; supplementing the byte data by adopting a message digest algorithm to obtain initialized byte data; performing cyclic linear calculation on the initialized byte data by using a preset buffer to obtain a safety information code; acquiring a time stamp of the file to be backed up, wherein the time stamp is used for indicating the time corresponding to the last change instruction executed by the file to be backed up; and splicing the timestamp and the safety information code by using a combination algorithm to obtain a name of a file to be backed up, determining the name of the file to be backed up as the name of the file to be backed up to obtain a rollback file, and storing the rollback file into a rollback folder. In the embodiment of the invention, the rollback file is named by combining the timestamp with the safety information code, so that the name of the rollback file has uniqueness, and the efficiency of searching the rollback file by the server is improved.
Drawings
FIG. 1 is a diagram of an embodiment of a backup method for a rollback file in an embodiment of the present invention;
FIG. 2 is a diagram of another embodiment of a backup method for a rollback file in an embodiment of the present invention;
FIG. 3 is a diagram of an embodiment of a backup device for rolling back files in an embodiment of the invention;
FIG. 4 is a diagram of another embodiment of a backup device for rolling back files in an embodiment of the invention;
fig. 5 is a schematic diagram of an embodiment of a backup device for rolling back files in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a backup method, a backup device, equipment and a storage medium of a rollback file.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of the embodiment of the present invention is described below, and referring to fig. 1, an embodiment of the backup method for rolling back a file in the embodiment of the present invention includes:
101. acquiring byte data of a file to be backed up, wherein the byte data is the size of a storage space occupied by the file to be backed up;
it is to be understood that the execution subject of the present invention may be a backup device of a rollback file, and may also be a terminal or a server, which is not limited herein. The embodiment of the present invention is described by taking a server as an execution subject.
The server obtains byte data of the size of the storage space occupied by the file to be backed up.
When a file to be backed up is named, the uniqueness of the name of the file to be backed up must be ensured, so the server firstly acquires the byte data of the file to be backed up, the acquired byte data clearly indicates the size of the space occupied by the file to be backed up, and the security information code is calculated by utilizing the byte data of the file to be backed up, and finally the security information code is combined with the timestamp of the file to be backed up to be used as the unique name of the file to be backed up. It should be emphasized that, in order to further ensure the integrity and security of the file to be backed up, the file to be backed up may be stored in a block chain.
102. Supplementing the byte data by adopting a message digest algorithm to obtain initialized byte data;
the server supplements the byte data by adopting a message digest algorithm to obtain initialized byte data.
When the file to be backed up is named, a message abstract algorithm is adopted, a safety information code related to byte data of the file to be backed up is calculated by utilizing the message abstract algorithm, and the safety information code is used as a part of the name of the file to be backed up. The message digest algorithm is MD5 message digest algorithm (MD5 message-digest algorithm, MD5), MD5 is a widely used cryptographic hash function that generates a 128-bit (16-byte) hash value based on input data, and the hash value is uniquely determined to ensure the integrity and consistency of information transmission.
It is further explained that the safety information code is generated by the MD5 algorithm according to the byte data of the file to be backed up, the MD5 code processes the input byte data in 512-bit packets, and each packet is divided into 16 32-bit sub-packets, after the processing of bit complementing, expanding and cyclic linear operation, an output value is obtained by combining four 32-bit packets, and after the four 32-bit packets are concatenated, a 128-bit hash value is generated, so that the safety information code is obtained.
103. Performing cyclic linear calculation on the initialized byte data by using a preset buffer to obtain a safety information code;
the server utilizes the preset buffer to perform circular linear calculation on the initialized byte data to obtain the safety information code.
After acquiring the initialized byte data of the file to be backed up, the server needs to perform cyclic linear calculation on the initialized byte data by using a preset buffer, the server firstly initializes the preset buffer to obtain four groups of initial input values, then the four groups of initial input values are respectively input into a preset linear function to obtain a first calculation result, then the first calculation result and the initialized byte data are subjected to cyclic linear calculation to obtain the other four calculation results, and finally the obtained calculation results are combined to obtain the final safety information code.
104. Acquiring a time stamp of the file to be backed up, wherein the time stamp is used for indicating the time corresponding to the last change instruction executed by the file to be backed up;
and the server acquires a time stamp which is used for indicating the time corresponding to the last change instruction executed by the file to be backed up.
It is understood that a timestamp (timestamp) refers to a complete, verifiable piece of data that indicates that a piece of data existed before a particular time, and typically represents a unique time using a sequence of characters. The timestamp representation format here is: the time of year, month, day, hour, minute and second, and the time when the file to be backed up executes the last operation is taken as a time stamp, wherein the time stamp is used for indicating the time when the file to be backed up executes the last change instruction, and one time is taken as a part of the naming of the file to be backed up, so that the overlapping performance of the naming of the file to be backed up is reduced, and the uniqueness standard of the naming of the file to be backed up is improved.
105. And splicing the timestamp and the safety information code by using a combination algorithm to obtain the name of the file to be backed up, determining the name of the file to be backed up as the name of the file to be backed up to obtain a rollback file, and storing the rollback file into a rollback folder.
The server uses a combination algorithm to splice the time stamp and the safety information code to obtain the name of the file to be backed up, determines the name of the file to be backed up to obtain the rollback file, and stores the rollback file in the rollback folder.
It should be noted that, after the server calculates the time stamp and the security information code of the file to be backed up, the server combines the time stamp and the security information code by using a combination algorithm, so as to obtain the unique name of the file to be backed up. The combined algorithm is an algorithm for splicing the time stamps and the safety information codes together according to the arrangement sequence of the time stamps in front of the safety information codes in back of the safety information codes, and then the server determines the spliced time stamps and the safety information codes as the names of the files to be backed up. When the name of the file to be backed up is queried, the timestamp is queried first, and then the unique safety information code is determined, so that the file to be backed up can be queried accurately.
In the embodiment of the invention, the rollback file is named by combining the timestamp with the safety information code, so that the name of the rollback file has uniqueness, and the efficiency of searching the rollback file by the server is improved.
Referring to fig. 2, another embodiment of the backup method for rolling back files in the embodiment of the present invention includes:
201. acquiring byte data of a file to be backed up, wherein the byte data is the size of a storage space occupied by the file to be backed up;
the server obtains byte data of the size of the storage space occupied by the file to be backed up. Specifically, the method comprises the following steps:
firstly, a server reads a file to be backed up and acquires a plurality of file data information in the file to be backed up; then the server respectively counts the byte number of each file data information in the plurality of file data information according to a statistical algorithm to obtain a plurality of basic byte numbers; and finally, the server collects a plurality of basic byte numbers to obtain byte data used for indicating the size of the storage space occupied by the file to be backed up.
When a file to be backed up is named, the uniqueness of the name of the file to be backed up must be ensured, so the server firstly acquires the byte data of the file to be backed up, the acquired byte data clearly indicates the size of the space occupied by the file to be backed up, and the security information code is calculated by utilizing the byte data of the file to be backed up, and finally the security information code is combined with the timestamp of the file to be backed up to be used as the unique name of the file to be backed up. It should be emphasized that, in order to further ensure the integrity and security of the file to be backed up, the file to be backed up may be stored in a block chain.
When obtaining byte data of a file to be backed up, firstly, a server reads the file to be backed up, a plurality of file data information in the file to be backed up is inquired and obtained, at least one file data information is stored in the file to be backed up, the file data information refers to file content stored in the file to be backed up, then the server respectively counts byte numbers in the file data information according to a statistical algorithm and obtains a plurality of basic byte numbers, the byte number refers to the byte number occupied by the content in the file data information, the statistical algorithm is that a punctuation point under an English letter, a number and an English format in the file content is 1 byte, a Chinese character and a Chinese punctuation point are 2 bytes, the byte number occupied by the content in the file data information can be calculated by using the statistical algorithm, the server summarizes the basic byte numbers after obtaining a plurality of basic byte numbers, that is, all the basic byte numbers are added to obtain the byte data of the file to be backed up, in general, the statistical algorithm can achieve the effect of calculating the byte number occupied by the information content of the file data, and the statistical algorithm is a conventional means in the technical field and is not described in detail in this application.
202. Supplementing the byte data by adopting a message digest algorithm to obtain initialized byte data;
the server supplements the byte data by adopting a message digest algorithm to obtain initialized byte data. Specifically, the method comprises the following steps:
the server firstly adopts a message digest algorithm to judge whether the length of byte data is equal to a preset byte length; if the length of the byte data is smaller than the preset byte length, the server supplements the length of the byte data until the length of the byte data reaches the preset byte length to obtain byte data to be supplemented; if the length of the byte data is equal to the preset byte length, the server determines the byte data as byte data to be supplemented; and finally, adding length extension data for recording byte data after the last bit of the byte data to be supplemented by the server to obtain initialized byte data.
And if the length of the byte data is smaller than the preset byte length, the server supplements the length of the byte data until the length of the byte data reaches the preset byte length to obtain supplemented byte data. Specifically, the method comprises the following steps: if the length of the byte data is less than the preset byte length, the server calculates the length n of the byte data needing to be supplemented according to a preset formula, wherein the preset formula is as follows: (n + m) mod512 ═ 448, where m is the length of byte data, n is the length of byte data to be supplemented, and n and m are both positive integers; and the server supplements the supplementary bytes with the length of n behind the byte data to obtain the byte data to be supplemented.
When the file to be backed up is named, a message abstract algorithm is adopted, a safety information code related to byte data of the file to be backed up is calculated by utilizing the message abstract algorithm, and the safety information code is used as a part of the name of the file to be backed up. The message digest algorithm is MD5 message digest algorithm (MD5 message-digest algorithm, MD5), MD5 is a widely used cryptographic hash function that generates a 128-bit (16-byte) hash value based on input data, and the hash value is uniquely determined to ensure the integrity and consistency of information transmission.
It is further described that if there are two files to be backed up with the same MD5 information code, which indicate that the two files to be backed up are completely the same, and as long as there is a difference in the files to be backed up, the MD5 codes generated correspondingly are completely different, for example: the file content of the file A to be backed up is one space more than that of the file B to be backed up, and the MD5 generated by the two files to be backed up are different.
When the safety information code is calculated by using the MD5 algorithm, the server firstly needs to judge whether the byte data length of the file to be backed up is equal to the preset byte length, if the byte data length of the file to be backed up is equal to the preset byte length, the server can directly perform the next calculation, and if the byte data length of the file to be backed up is less than the preset byte length, the server needs to supplement the byte data. It should be noted that the preset byte length is much longer than the byte data length of the file to be backed up, and therefore, the situation that the byte data length of the file to be backed up is larger than the preset byte length does not occur.
In the process that the server supplements the byte data, firstly, the length n of the byte data needing to be supplemented is calculated according to a preset formula, namely the byte data is supplemented according to bits, wherein the utilized preset formula is as follows: (n + m) mod512 ═ 448, where: the above formula shows that the supplemented byte data needs to satisfy the condition that the final bit number of the byte data is 448 as a result of modulo 512, that is, after the byte data is supplemented, the length of the bit number is only 64 bits (bit) which is an integral multiple of 512, and even if the bit number of the byte data is exactly 448 as a result of modulo 512, the bit must be complemented. Byte data when complementing byte digits, the server firstly complements the byte data with a digit 1, then complements n-1 digits 0 after the byte data until the result of modulo 512 by the number of digits of the whole complemented byte data is just 448, wherein the complemented byte digits are at least 1 digit and can be at most 512 digits.
After completing the operation of supplementing the bit number of the byte data, the server needs to supplement 64-bit data which represents the original length of the data at the end, the 64-bit data describes the length of the supplemented byte data without bit supplementation by using binary system, when completing the description of supplementing and expanding the data, the length of the obtained initialized byte data is an integral multiple of 512, and then the server performs circular linear calculation on the initialized byte data to obtain the safety information code. It is further described that, if the length of the byte data satisfies the preset byte length, the server also needs to supplement the byte data, and the 64-bit data that identifies the original length of the data is supplemented after the byte data, so as to obtain the initialized byte data.
203. Performing cyclic linear calculation on the initialized byte data by using a preset buffer to obtain a safety information code;
the server utilizes the preset buffer to perform circular linear calculation on the initialized byte data to obtain the safety information code. Specifically, the method comprises the following steps:
the server initializes a preset buffer to obtain an initial input value, and inputs the initial input value into a preset linear function to obtain a first calculation result; secondly, the server averagely divides the initialization byte data into four groups to respectively obtain first grouping byte data, second grouping byte data, third grouping byte data and fourth grouping byte data; then the server adds the first calculation result and the first packet byte data and inputs the result into a preset linear function to obtain a second calculation result; the server adds the second calculation result and the second grouped byte data and inputs the result into a preset linear function to obtain a third calculation result; the server adds the third calculation result and the third packet byte data and inputs the result into a preset linear function to obtain a fourth calculation result; the server adds the fourth calculation result and the fourth grouping byte data and inputs the result into a preset linear function to obtain a fifth calculation result; and finally, the server combines the second calculation result, the third calculation result, the fourth calculation result and the fifth calculation result to obtain the safety information code.
After acquiring the initialized byte data of the file to be backed up, the server needs to perform cyclic linear calculation on the initialized byte data by using a preset buffer, the server firstly initializes the preset buffer to obtain four groups of initial input values, then the four groups of initial input values are respectively input into a preset linear function to obtain a first calculation result, then the first calculation result and the initialized byte data are subjected to cyclic linear calculation, and finally the obtained plurality of calculation results are combined to obtain a final safety information code.
When the server performs the cyclic linear calculation, the server firstly initializes a preset buffer to obtain four groups of initial input values, which are respectively A: 01234567; b: 89ab cd ef; c: fe dc ba 98; d: 76543210. then the server inputs four groups of initial input values into a preset linear function respectively, wherein the operation is to process the initial values by taking 512-bit data segments as units, and the server obtains a first calculation result after the processing. After the server obtains a first calculation result, the initialized byte data are averagely divided into four groups to respectively obtain first grouped byte data, second grouped byte data, third grouped byte data and fourth grouped byte data, the server adds the first calculation result and the first grouped byte data and inputs the result into a preset linear function to obtain a second calculation result, the server adds the second calculation result and the second grouped byte data and inputs the result into the preset linear function to obtain a third calculation result, the server adds the third calculation result and the third grouped byte data and inputs the result into the preset linear function to obtain a fourth calculation result, the server adds the fourth calculation result and the fourth grouped byte data and inputs the result into the preset linear function to obtain a fifth calculation result, and after four-wheel linear processing, the server equally divides the obtained second calculation result into four groups, And combining the third calculation result, the fourth calculation result and the fifth calculation result to obtain the final safety information code.
204. Acquiring a time stamp of the file to be backed up, wherein the time stamp is used for indicating the time corresponding to the last change instruction executed by the file to be backed up;
and the server acquires a time stamp which is used for indicating the time corresponding to the last change instruction executed by the file to be backed up. Specifically, the method comprises the following steps:
the method comprises the steps that firstly, a server respectively extracts the last time and the current time of a file to be backed up, wherein the last time comprises the last access time, the last modification time and the last change time; secondly, the server respectively calculates a first time interval between the last access time and the current time, a second time interval between the last modification time and the current time and a third time interval between the last modification time and the current time; and finally, the server screens a target time interval with the minimum time interval value in the first time interval, the second time interval and the third time interval, and determines the last time corresponding to the target time interval as the time stamp of the file to be backed up, wherein the time stamp is used for indicating the time corresponding to the last change instruction executed by the file to be backed up.
It is understood that a timestamp (timestamp) refers to a complete, verifiable piece of data that indicates that a piece of data existed before a particular time, and typically represents a unique time using a sequence of characters. The timestamp representation format here is: the time of year, month, day, hour, minute and second, and the time when the file to be backed up executes the last operation is taken as a time stamp, wherein the time stamp is used for indicating the time when the file to be backed up executes the last change instruction, and one time is taken as a part of the naming of the file to be backed up, so that the overlapping performance of the naming of the file to be backed up is reduced, and the uniqueness standard of the naming of the file to be backed up is improved.
It should be noted that, here, the last operation performed by the server on the file to be backed up may be: and accessing, modifying or changing, wherein the corresponding time is the last access time, the last modification time and the last change time respectively. The last access time is used for indicating the last time when the file to be backed up is accessed, and the last access time refers to the time when the content in the file to be backed up is read and does not include the time when the content on the node of the file to be backed up is read; the last modification time is used for indicating the last modified time of the file to be backed up, wherein the modification refers to the modification of the content in the file to be backed up by the server; the last change time is used to indicate the time when the file to be backed up is modified for the last time, where the modification means that the property of the file to be backed up is modified by the server, such as: the owner or authority of the file to be backed up is modified. And the server acquires the last operation for executing the instructions, compares the last operation time with the current time, and screens out the last operation time with the shortest time interval with the current time as the time stamp of the file to be backed up.
For example, the server obtains, at a plurality of last operation times in the file to be backed up, 24 minutes and 30 seconds when the last access time is 2019, 05, 06, 12, 25 minutes and 30 seconds when the last modification time is 2019, 05, 06, 12, 25 minutes and 30 seconds, 26 minutes and 30 seconds when the last modification time is 2019, 05, 06, 12, 28 minutes and 30 seconds when the current time is 2019, 05, 06, 12, 28 and 30 seconds, and according to different time information, a first time interval between the current time and the last access time is 4 minutes, a second time interval between the current time and the last modification time is 3 minutes, and a third time interval between the current time and the last modification time is 2 minutes, so that data of the last modification time is selected as a timestamp of the file to be backed up, and a format of the timestamp is 20190506122630.
205. Respectively extracting the time stamp and the safety information code of the file to be backed up by adopting a combination algorithm;
the server adopts a combination algorithm to respectively extract the time stamp and the safety information code of the file to be backed up.
It should be noted that after the server obtains the time stamp and the security information code of the file to be backed up through calculation, the time stamp and the security information code need to be combined to obtain the unique name of the file to be backed up. Before splicing the time stamp and the safety information code by using a combination algorithm, the time stamp and the safety information code of the file to be backed up need to be acquired first.
206. And splicing the safety information codes after the time stamp by using a preset connector to obtain the name of the file to be backed up, determining the name of the file to be backed up as the name of the file to be backed up to obtain the rollback file, and storing the rollback file into the rollback folder.
The server splices the safety information code behind the time stamp by using a preset connector to obtain the name of the file to be backed up, determines the name of the file to be backed up, obtains the rollback file, and stores the rollback file in the rollback folder.
It can be understood that the combination algorithm is an algorithm that splices the time stamps and the security information codes together according to the arrangement sequence of the time stamps before and the security information codes after, and then the server determines the spliced time stamps and security information codes as the names of the files to be backed up. When the name of the file to be backed up is queried, the timestamp is queried first, and then the unique safety information code is determined, so that the file to be backed up can be queried accurately. It should be noted that, in order to better distinguish the timestamp from the security information code, when the timestamp and the security information code are spliced, a preset connector needs to be added between the timestamp and the security information code, and the preset connector in the present application is "_", so that the generated name of the file to be backed up is more intuitive and has a higher recognition degree.
For example: the timestamp calculated by the server is: 20190910180245, the security information code is: 3b4ea74b42c390e3dd526ef0c488364e, the finally obtained file name to be backed up is: 20190910180245_3b4ea74b42c390e3dd526ef0c488364 e.
It is further explained that rollback refers to the action of restoring a program or data to the latest correct version when the program or data has an error. In the process of rollback, it is required to determine which correct version is to be rolled back specifically, generally, the query of the rolled back version is screened by the file name, and the unique file name corresponds to the unique version, so that the phenomena of error of the rolled back version and failure of the rolled back can be avoided in the process of rolling back. If the server encounters a problem in the test after the gray release and needs to execute a file rollback operation, the server first obtains a required file rollback request, where the file rollback request is used to indicate that the server needs to specifically rollback to a certain file to be backed up, the content of the file rollback request is a name that clearly indicates that the server needs to rollback to a certain file to be backed up, and after the server queries a file to be backed up corresponding to the rollback file request, the server respectively transmits the file to be backed up to each server under the deployment unit to cover the original file, so that the file to be backed up is rolled back and replaced, and a file rollback instruction issued by the server is completed.
In the embodiment of the invention, the rollback file is named by combining the timestamp with the safety information code, so that the name of the rollback file has uniqueness, and the efficiency of searching the rollback file by the server is improved.
With reference to fig. 3, the method for backing up a rollback file in the embodiment of the present invention is described above, and a backup device for a rollback file in the embodiment of the present invention is described below, where an embodiment of the backup device for a rollback file in the embodiment of the present invention includes:
a first obtaining module 301, configured to obtain byte data of a file to be backed up, where the byte data is a size of a storage space occupied by the file to be backed up;
a supplement module 302, configured to supplement the byte data by using a message digest algorithm to obtain initialized byte data;
a calculation module 303, configured to perform cyclic linear calculation on the initialized byte data by using a preset buffer to obtain a security information code;
a second obtaining module 304, configured to obtain a timestamp of the file to be backed up, where the timestamp is used to indicate a time when the file to be backed up executes the last change instruction;
the determining and saving module 305 is configured to splice the timestamp and the security information code by using a combination algorithm to obtain a name of a file to be backed up, determine that the name of the file to be backed up is the name of the file to be backed up to obtain a rollback file, and save the rollback file into a rollback folder.
In the embodiment of the invention, the rollback file is named by combining the timestamp with the safety information code, so that the name of the rollback file has uniqueness, and the efficiency of searching the rollback file by the server is improved.
Referring to fig. 4, another embodiment of the backup apparatus for rolling back files according to the embodiment of the present invention includes:
a first obtaining module 301, configured to obtain byte data of a file to be backed up, where the byte data is a size of a storage space occupied by the file to be backed up;
a supplement module 302, configured to supplement the byte data by using a message digest algorithm to obtain initialized byte data;
a calculation module 303, configured to perform cyclic linear calculation on the initialized byte data by using a preset buffer to obtain a security information code;
a second obtaining module 304, configured to obtain a timestamp of the file to be backed up, where the timestamp is used to indicate a time when the file to be backed up executes the last change instruction;
the determining and saving module 305 is configured to splice the timestamp and the security information code by using a combination algorithm to obtain a name of a file to be backed up, determine that the name of the file to be backed up is the name of the file to be backed up to obtain a rollback file, and save the rollback file into a rollback folder.
Optionally, the supplementary module 302 includes:
a judging unit 3021, configured to judge whether the length of the byte data is equal to a preset byte length by using a message digest algorithm;
a first determining unit 3022, configured to, if the length of the byte data is smaller than the preset byte length, supplement the length of the byte data until the length of the byte data reaches the preset byte length, to obtain byte data to be supplemented;
a second determining unit 3023, configured to determine the byte data as byte data to be supplemented if the length of the byte data is equal to the preset byte length;
an adding unit 3024, configured to add extension data after the last bit of the byte data to be supplemented, to obtain initialized byte data, where the extension data is data that records the length of the byte data.
Optionally, the first determining unit 3022 may be further specifically configured to:
if the length of the byte data is less than the preset byte length, calculating the length n of the byte data needing to be supplemented according to a preset formula, wherein the preset formula is as follows: (n + m) mod512 ═ 448, where m is the length of byte data, n is the length of byte data to be supplemented, and n and m are both positive integers;
and supplementing the supplementary bytes with the length of n behind the byte data to obtain the byte data to be supplemented.
Optionally, the calculating module 303 may be further specifically configured to:
initializing the preset buffer to obtain an initial input value, and inputting the initial input value into a preset linear function to obtain a first calculation result;
averagely dividing the initialization byte data into four groups to respectively obtain first grouping byte data, second grouping byte data, third grouping byte data and fourth grouping byte data;
adding the first calculation result and the first grouped byte data and inputting the result into the preset linear function to obtain a second calculation result;
adding the second calculation result and the second byte data to be input into the preset linear function to obtain a third calculation result;
adding the third calculation result and the third packet byte data, and inputting the result into the preset linear function to obtain a fourth calculation result;
adding the fourth calculation result and the fourth grouped byte data and inputting the result into the preset linear function to obtain a fifth calculation result;
and combining the second calculation result, the third calculation result, the fourth calculation result and the fifth calculation result to obtain a safety information code.
Optionally, the second obtaining module 304 may be further specifically configured to:
respectively extracting the last time and the current time of the file to be backed up, wherein the last time comprises the last access time, the last modification time and the last change time;
respectively calculating a first time interval between the last access time and the current time, a second time interval between the last modification time and the current time and a third time interval between the last modification time and the current time;
and screening a target time interval with the smallest time interval value from the first time interval, the second time interval and the third time interval, and determining the last time corresponding to the target time interval as a time stamp of the file to be backed up, wherein the time stamp is used for indicating the time corresponding to the last change instruction executed by the file to be backed up.
Optionally, the determining and saving module 305 may be further specifically configured to:
respectively extracting the time stamp and the safety information code of the file to be backed up by adopting a combination algorithm;
splicing the safety information code after the time stamp by using a preset connector to obtain a name of a file to be backed up, determining the name of the file to be backed up as the name of the file to be backed up to obtain a rollback file, and storing the rollback file into a rollback folder.
Optionally, the first obtaining module 301 may be further specifically configured to:
reading a file to be backed up, and acquiring a plurality of file data information in the file to be backed up;
respectively counting the byte number of each file data information in the plurality of file data information according to a counting algorithm to obtain a plurality of basic byte numbers;
summarizing the basic byte numbers to obtain byte data of the file to be backed up, wherein the byte data is the size of the storage space occupied by the file to be backed up.
In the embodiment of the invention, the rollback file is named by combining the timestamp with the safety information code, so that the name of the rollback file has uniqueness, and the efficiency of searching the rollback file by the server is improved.
Fig. 3 and fig. 4 describe the backup apparatus for the rollback file in the embodiment of the present invention in detail from the perspective of the modular functional entity, and the backup device for the rollback file in the embodiment of the present invention is described in detail from the perspective of the hardware processing.
Fig. 5 is a schematic structural diagram of a backup device for rolling back files, where the backup device 500 for rolling back files may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) for storing applications 533 or data 532. Memory 520 and storage media 530 may be, among other things, transient or persistent storage. The program stored on the storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations in the backup device 500 for rolling back files. Still further, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the backup device 500 that rolls back files.
The backup appliance 500 for rollback files may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input-output interfaces 560, and/or one or more operating systems 531, such as Windows server, Mac OS X, Unix, Linux, FreeBSD, and the like. Those skilled in the art will appreciate that the backup appliance configuration for a rollback file shown in fig. 5 does not constitute a limitation of the backup appliance for a rollback file, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
Further, the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, and which may also be a volatile computer-readable storage medium, having stored therein instructions, which, when run on a computer, cause the computer to perform the steps of the backup method for the rollback file.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. 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 and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A backup method of a rollback file is characterized by comprising the following steps:
acquiring byte data of a file to be backed up, wherein the byte data is the size of a storage space occupied by the file to be backed up;
supplementing the byte data by adopting a message digest algorithm to obtain initialized byte data;
performing cyclic linear calculation on the initialized byte data by using a preset buffer to obtain a safety information code;
acquiring a time stamp of the file to be backed up, wherein the time stamp is used for indicating the time corresponding to the last change instruction executed by the file to be backed up;
and splicing the timestamp and the safety information code by using a combination algorithm to obtain a name of a file to be backed up, determining the name of the file to be backed up as the name of the file to be backed up to obtain a rollback file, and storing the rollback file into a rollback folder.
2. The method for backing up a rollback file according to claim 1, wherein said supplementing said byte data with a message digest algorithm to obtain initialized byte data comprises:
judging whether the length of the byte data is equal to a preset byte length by adopting a message digest algorithm;
if the length of the byte data is smaller than the preset byte length, supplementing the length of the byte data until the length of the byte data reaches the preset byte length to obtain byte data to be supplemented;
if the length of the byte data is equal to the preset byte length, determining the byte data as byte data to be supplemented;
and adding extension data after the last bit of the byte data to be supplemented to obtain initialized byte data, wherein the extension data is data for recording the length of the byte data.
3. The method for backing up a rollback file according to claim 2, wherein if the length of the byte data is smaller than the preset byte length, the length of the byte data is supplemented until the length of the byte data reaches the preset byte length, and obtaining byte data to be supplemented includes:
if the length of the byte data is less than the preset byte length, calculating the length n of the byte data needing to be supplemented according to a preset formula, wherein the preset formula is as follows: (n + m) mod512 ═ 448, where m is the length of byte data, n is the length of byte data to be supplemented, and n and m are both positive integers;
and supplementing the supplementary bytes with the length of n behind the byte data to obtain the byte data to be supplemented.
4. The method for backing up a rollback file according to claim 1, wherein said performing a circular linear calculation on said initialization byte data using a pre-buffer to obtain a security information code comprises:
initializing the preset buffer to obtain an initial input value, and inputting the initial input value into a preset linear function to obtain a first calculation result;
averagely dividing the initialization byte data into four groups to respectively obtain first grouping byte data, second grouping byte data, third grouping byte data and fourth grouping byte data;
adding the first calculation result and the first grouped byte data and inputting the result into the preset linear function to obtain a second calculation result;
adding the second calculation result and the second byte data to be input into the preset linear function to obtain a third calculation result;
adding the third calculation result and the third packet byte data, and inputting the result into the preset linear function to obtain a fourth calculation result;
adding the fourth calculation result and the fourth grouped byte data and inputting the result into the preset linear function to obtain a fifth calculation result;
and combining the second calculation result, the third calculation result, the fourth calculation result and the fifth calculation result to obtain a safety information code.
5. The method for backing up a rollback file according to claim 1, wherein the obtaining a timestamp of the file to be backed up, wherein the timestamp is used to indicate a time corresponding to a last change instruction executed by the file to be backed up, includes:
respectively extracting the last time and the current time of the file to be backed up, wherein the last time comprises the last access time, the last modification time and the last change time;
respectively calculating a first time interval between the last access time and the current time, a second time interval between the last modification time and the current time and a third time interval between the last modification time and the current time;
and screening a target time interval with the smallest time interval value from the first time interval, the second time interval and the third time interval, and determining the last time corresponding to the target time interval as a time stamp of the file to be backed up, wherein the time stamp is used for indicating the time corresponding to the last change instruction executed by the file to be backed up.
6. The method for backing up a rollback file according to claim 1, wherein the splicing the timestamp and the security information code using a binding algorithm to obtain a name of a file to be backed up, determining that the name of the file to be backed up is the name of the file to be backed up, obtaining the rollback file, and storing the rollback file in a rollback folder comprises:
respectively extracting the time stamp and the safety information code of the file to be backed up by adopting a combination algorithm;
splicing the safety information code after the time stamp by using a preset connector to obtain a name of a file to be backed up, determining the name of the file to be backed up as the name of the file to be backed up to obtain a rollback file, and storing the rollback file into a rollback folder.
7. The method for backing up a rollback file according to any one of claims 1-6, wherein the obtaining byte data of the file to be backed up, wherein the byte data is the size of the storage space occupied by the file to be backed up, comprises:
reading a file to be backed up, and acquiring a plurality of file data information in the file to be backed up;
respectively counting the byte number of each file data information in the plurality of file data information according to a counting algorithm to obtain a plurality of basic byte numbers;
summarizing the basic byte numbers to obtain byte data of the file to be backed up, wherein the byte data is the size of the storage space occupied by the file to be backed up.
8. A backup apparatus for a rollback file, comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring byte data of a file to be backed up, and the byte data is the size of a storage space occupied by the file to be backed up;
the supplement module is used for supplementing the byte data by adopting a message digest algorithm to obtain initialized byte data;
the calculation module is used for performing cyclic linear calculation on the initialized byte data by utilizing a preset buffer to obtain a safety information code;
the second obtaining module is used for obtaining a timestamp of the file to be backed up, wherein the timestamp is used for indicating the moment corresponding to the last change instruction executed by the file to be backed up;
and the determining and storing module is used for splicing the timestamp and the safety information code by using a combination algorithm to obtain a name of the file to be backed up, determining the name of the file to be backed up as the name of the file to be backed up to obtain a rollback file, and storing the rollback file into a rollback folder.
9. A backup device for a rollback file, the backup device comprising: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line;
the at least one processor invokes the instructions in the memory to cause the rollback file backup device to perform the rollback file backup method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of backing up a rollback file according to any one of claims 1-7.
CN202010880807.4A 2020-08-27 2020-08-27 Backup method, device and equipment of rollback file and storage medium Pending CN112015594A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010880807.4A CN112015594A (en) 2020-08-27 2020-08-27 Backup method, device and equipment of rollback file and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010880807.4A CN112015594A (en) 2020-08-27 2020-08-27 Backup method, device and equipment of rollback file and storage medium

Publications (1)

Publication Number Publication Date
CN112015594A true CN112015594A (en) 2020-12-01

Family

ID=73503809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010880807.4A Pending CN112015594A (en) 2020-08-27 2020-08-27 Backup method, device and equipment of rollback file and storage medium

Country Status (1)

Country Link
CN (1) CN112015594A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113037854A (en) * 2021-03-22 2021-06-25 平安国际智慧城市科技股份有限公司 Method, device and equipment for monitoring tail gas of motor vehicle and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113037854A (en) * 2021-03-22 2021-06-25 平安国际智慧城市科技股份有限公司 Method, device and equipment for monitoring tail gas of motor vehicle and storage medium
CN113037854B (en) * 2021-03-22 2024-01-23 平安国际智慧城市科技股份有限公司 Method, device, equipment and storage medium for monitoring tail gas of motor vehicle

Similar Documents

Publication Publication Date Title
JP6884128B2 (en) Data deduplication device, data deduplication method, and data deduplication program
AU2001296665B2 (en) System for identifying common digital sequences
US7636824B1 (en) System and method for efficient backup using hashes
CN103699585B (en) Methods, devices and systems for file metadata storage and file recovery
CN110855761B (en) Data processing method and device based on block chain system
US9305005B2 (en) Merging entries in a deduplication index
US20090228680A1 (en) Combined hash for variable data chunks
US10235134B1 (en) Rotating bit values while generating a large, non-compressible data stream
US20080275847A1 (en) Scalable minimal perfect hashing
AU2001296665A1 (en) System for identifying common digital sequences
EP3770770A1 (en) Index generation program, index generation device and index generation method, search program
US10218764B2 (en) Generating a large, non-compressible data stream
US10853324B2 (en) Generating a data stream with a predictable change rate
CN110781028B (en) Data backup method, data recovery method, data backup device, data recovery device and computing equipment
US9094195B2 (en) Protecting de-duplication repositories against a malicious attack
US20200089576A1 (en) Method of Detecting Source Change for File Level Incremental Backup
US10163371B1 (en) Rotating bit values based on a data structure while generating a large, non-compressible data stream
CN112015594A (en) Backup method, device and equipment of rollback file and storage medium
WO2022087237A1 (en) Code similarity search
US9256503B2 (en) Data verification
CN113806803B (en) Data storage method, system, terminal equipment and storage medium
WO2018156503A1 (en) Methods for performing data deduplication on data blocks at granularity level and devices thereof
CN112380174B (en) XFS file system analysis method containing deleted files, terminal device and storage medium
CN111625186B (en) Data processing method, device, electronic equipment and storage medium
US20220405160A1 (en) Anomaly detection from log messages

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