Data recovery method and device and electronic equipment
1. A method for data recovery, the method comprising:
based on a concurrent mode, reading a data block to be restored from the backup file according to a preset reading strategy; wherein the predetermined read strategy comprises: updating an offset address which corresponds to the backup file and is used for representing the initial position of the data to be read based on a preset read data volume; reading a data block to be restored from the backup file based on the offset address before the updating and the read data volume;
decompressing the data block to be restored aiming at each data block to be restored to obtain data to be restored, and setting mark contents for representing a storage sequence for the data to be restored according to an offset address based on reading the data block to be restored;
and storing each data to be recovered into a preset target file according to the mark content set for each data to be recovered.
2. The method according to claim 1, wherein the step of updating the offset address corresponding to the backup file and used for characterizing the start position of the data to be read based on the preset amount of read data comprises:
and on the basis of the offset address which corresponds to the current backup file and is used for representing the initial position of the data to be read, increasing the read data volume to obtain the updated offset address.
3. The method according to claim 1, wherein the step of reading the data block to be restored from the backup file based on the offset address and the read data amount before the current update comprises:
determining an address range for reading data from the backup file based on the offset address before the updating and the read data amount;
and reading the data block to be restored from the backup file according to the address range.
4. The method of claim 3, wherein the step of reading the data blocks to be restored from the backup file according to the address range comprises:
and reading the data block to be restored from the backup file according to the address range in a lock-free mode.
5. The method according to claim 1, wherein the step of setting the content of a flag for characterizing the storage order for the data to be recovered according to the offset address based on which the data block to be recovered is read comprises:
determining an offset address based on reading the data block to be recovered as a mark content, and setting the determined mark content for the data block to be recovered; alternatively, the first and second electrodes may be,
determining an address range for reading data from the backup file as a mark content, and setting the determined mark content for the data to be restored; wherein the address range is determined according to the offset address and the read data amount based on when the data block to be recovered is read.
6. The method according to claim 1, wherein before the step of reading the data blocks to be restored from the backup file according to the predetermined reading policy based on the concurrent manner, the method further comprises:
reading the backup file from a storage node for storing the backup file, and storing the read backup file into a first preset cache;
the step of reading the data block to be restored from the backup file according to the preset reading strategy based on the concurrent mode comprises the following steps:
and reading the data blocks to be restored from the backup files stored in the first preset cache according to a preset reading strategy based on a concurrent mode.
7. The method according to any one of claims 1 to 6,
the step of reading the data block to be restored from the backup file according to the preset reading strategy based on the concurrent mode comprises the following steps:
reading the data blocks to be restored from the backup files according to a preset reading strategy by each preset decompression thread based on a concurrent mode;
the step of decompressing the data block to be restored to obtain data to be restored for each data block to be restored, and setting a flag content for representing a storage sequence for the data to be restored according to an offset address based on when the data block to be restored is read, includes:
each decompression thread decompresses the read data block to be restored to obtain data to be restored, and sets marking content for representing storage sequence for the data to be restored according to the offset address based on reading the data block to be restored;
the step of storing each data to be restored into a preset target file according to the mark content set for each data to be restored comprises the following steps:
and the preset data persistence thread stores each data to be recovered into a preset target file according to the mark content set for each data to be recovered.
8. The method according to claim 7, wherein before the step of the preset data persistence thread storing each data to be restored into a preset target file according to the flag content set for each data to be restored, the method further comprises:
each decompression thread stores the data to be restored with the marked content into a second preset cache corresponding to the decompression thread;
the step that the preset data persistence thread stores each data to be recovered into a preset target file according to the mark content set for each data to be recovered comprises the following steps:
and the preset data persistence thread stores each data to be recovered in the second preset cache into a preset target file according to the mark content set for each data to be recovered.
9. The method of claim 8, wherein the second predetermined cache corresponding to each decompression thread is different; the step of the preset data persistence thread storing each data to be restored in the second preset cache into a preset target file according to the mark content set for each data to be restored includes:
and the preset data persistence thread rounds second preset caches corresponding to the decompression threads, and the data to be recovered in the second preset caches are sequentially stored into a preset target file according to the continuous sequence of the marked contents.
10. An apparatus for data recovery, the apparatus comprising:
the data block reading module is used for reading the data block to be restored from the backup file according to a preset reading strategy based on a concurrent mode; wherein the predetermined read strategy comprises: updating an offset address which corresponds to the backup file and is used for representing the initial position of the data to be read based on a preset read data volume; reading a data block to be restored from the backup file based on the offset address before the updating and the read data volume;
the data marking module is used for decompressing the data block to be recovered aiming at each data block to be recovered to obtain data to be recovered, and setting marking content for representing a storage sequence for the data to be recovered according to an offset address based on reading the data block to be recovered;
and the data storage module is used for storing each data to be recovered into a preset target file according to the mark content set for each data to be recovered.
11. The apparatus of claim 10, wherein the data block reading module comprises:
and the address updating submodule is used for increasing the read data volume on the basis of the offset address which corresponds to the current backup file and is used for representing the initial position of the data to be read, so as to obtain the updated offset address.
12. The apparatus of claim 10, wherein the data block reading module comprises:
an address range determination submodule, configured to determine, based on the offset address and the read data amount before the update, an address range in which data is read from the backup file;
and the data block reading submodule is used for reading the data block to be restored from the backup file according to the address range.
13. The apparatus of claim 12, wherein the data block reading submodule is specifically configured to:
and reading the data block to be restored from the backup file according to the address range in a lock-free mode.
14. The apparatus of claim 10, wherein the data tagging module is specifically configured to:
determining an offset address based on reading the data block to be recovered as a mark content, and setting the determined mark content for the data block to be recovered; alternatively, the first and second electrodes may be,
determining an address range for reading data from the backup file as a mark content, and setting the determined mark content for the data to be restored; wherein the address range is determined according to the offset address and the read data amount based on when the data block to be recovered is read.
15. The apparatus of claim 10, further comprising:
the file cache module is used for reading the backup file from a storage node used for storing the backup file and storing the read backup file into a first preset cache before reading the data block to be restored from the backup file according to a preset reading strategy based on the concurrent mode;
the data block reading module is specifically configured to: and reading the data blocks to be restored from the backup files stored in the first preset cache according to a preset reading strategy based on a concurrent mode.
16. The apparatus according to any one of claims 10 to 15,
the data block reading module is specifically configured to: reading the data blocks to be restored from the backup files according to a preset reading strategy by each preset decompression thread based on a concurrent mode;
the data marking module is specifically configured to: each decompression thread decompresses the read data block to be restored to obtain data to be restored, and sets marking content for representing storage sequence for the data to be restored according to the offset address based on reading the data block to be restored;
the data storage module is specifically configured to: and the preset data persistence thread stores each data to be recovered into a preset target file according to the mark content set for each data to be recovered.
17. The apparatus of claim 16, further comprising:
the data caching module is used for storing the data to be recovered with the set marked content into a second preset cache corresponding to each decompression thread by each decompression thread before the preset data persistence thread stores the data to be recovered into a preset target file according to the set marked content for the data to be recovered;
the data storage module is specifically configured to: and the preset data persistence thread stores each data to be recovered in the second preset cache into a preset target file according to the mark content set for each data to be recovered.
18. The apparatus according to claim 17, wherein the second predetermined cache corresponding to each decompression thread is different; the data storage module is specifically configured to:
and the preset data persistence thread rounds second preset caches corresponding to the decompression threads, and the data to be recovered in the second preset caches are sequentially stored into a preset target file according to the continuous sequence of the marked contents.
19. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-9 when executing a program stored in the memory.
20. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-9.
Background
At present, backing up and restoring files in a database are one of the important bases for high reliability of database services, wherein data restoration time is a key index for restoring the database.
In the related art, a data recovery method includes: and sequentially reading data blocks with the same size from the backup file aiming at the backup file to be restored in the database, and decompressing all the read data blocks, so that the data obtained by decompressing all the data blocks are sequentially stored in the target file according to the reading sequence of all the data blocks. For example, as shown in fig. 1, it is a schematic diagram of the data recovery method.
However, in the above related art, since a sequential reading and sequential storage in the reading order are adopted, there is undoubtedly a problem that the time consumption for data recovery is high.
Disclosure of Invention
The embodiment of the invention aims to provide a data recovery method, a data recovery device and electronic equipment, so that the time consumption of data recovery is reduced, and the efficiency of data recovery is improved. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a data recovery method, where the method includes:
based on a concurrent mode, reading a data block to be restored from the backup file according to a preset reading strategy; wherein the predetermined read strategy comprises: updating an offset address which corresponds to the backup file and is used for representing the initial position of the data to be read based on a preset read data volume; reading a data block to be restored from the backup file based on the offset address before the updating and the read data volume;
decompressing the data block to be restored aiming at each data block to be restored to obtain data to be restored, and setting mark contents for representing a storage sequence for the data to be restored according to an offset address based on reading the data block to be restored;
and storing each data to be recovered into a preset target file according to the mark content set for each data to be recovered.
Optionally, in a specific implementation manner, the step of updating, based on a preset read data amount, an offset address corresponding to the backup file and used for characterizing a start position of the data to be read includes:
and on the basis of the offset address which corresponds to the current backup file and is used for representing the initial position of the data to be read, increasing the read data volume to obtain the updated offset address.
Optionally, in a specific implementation manner, the step of reading the data block to be restored from the backup file based on the offset address and the read data size before the update includes:
determining an address range for reading data from the backup file based on the offset address before the updating and the read data amount;
and reading the data block to be restored from the backup file according to the address range.
Optionally, in a specific implementation manner, the step of reading the data block to be restored from the backup file according to the address range includes:
and reading the data block to be restored from the backup file according to the address range in a lock-free mode.
Optionally, in a specific implementation manner, the step of setting, according to an offset address based on which the data block to be restored is read, a flag content for characterizing a storage sequence for the data block to be restored includes:
determining an offset address based on reading the data block to be recovered as a mark content, and setting the determined mark content for the data block to be recovered; alternatively, the first and second electrodes may be,
determining an address range for reading data from the backup file as a mark content, and setting the determined mark content for the data to be restored; wherein the address range is determined according to the offset address and the read data amount based on when the data block to be recovered is read.
Optionally, in a specific implementation manner, before the step of reading the data block to be restored from the backup file according to the predetermined reading policy based on the concurrent manner, the method further includes:
reading the backup file from a storage node for storing the backup file, and storing the read backup file into a first preset cache;
the step of reading the data block to be restored from the backup file according to the preset reading strategy based on the concurrent mode comprises the following steps:
and reading the data blocks to be restored from the backup files stored in the first preset cache according to a preset reading strategy based on a concurrent mode.
Alternatively, in one particular implementation,
the step of reading the data block to be restored from the backup file according to the preset reading strategy based on the concurrent mode comprises the following steps:
reading the data blocks to be restored from the backup files according to a preset reading strategy by each preset decompression thread based on a concurrent mode;
the step of decompressing the data block to be restored to obtain data to be restored for each data block to be restored, and setting a flag content for representing a storage sequence for the data to be restored according to an offset address based on when the data block to be restored is read, includes:
each decompression thread decompresses the read data block to be restored to obtain data to be restored, and sets marking content for representing storage sequence for the data to be restored according to the offset address based on reading the data block to be restored;
the step of storing each data to be restored into a preset target file according to the mark content set for each data to be restored comprises the following steps:
and the preset data persistence thread stores each data to be recovered into a preset target file according to the mark content set for each data to be recovered.
Optionally, in a specific implementation manner, before the step of storing, by the preset data persistence thread, each to-be-restored data in a preset target file according to the flag content set for each to-be-restored data, the method further includes:
each decompression thread stores the data to be restored with the marked content into a second preset cache corresponding to the decompression thread;
the step that the preset data persistence thread stores each data to be recovered into a preset target file according to the mark content set for each data to be recovered comprises the following steps:
and the preset data persistence thread stores each data to be recovered in the second preset cache into a preset target file according to the mark content set for each data to be recovered.
Optionally, in a specific implementation manner, the second preset cache corresponding to each decompression thread is different; the step of the preset data persistence thread storing each data to be restored in the second preset cache into a preset target file according to the mark content set for each data to be restored includes:
and the preset data persistence thread rounds second preset caches corresponding to the decompression threads, and the data to be recovered in the second preset caches are sequentially stored into a preset target file according to the continuous sequence of the marked contents.
In a second aspect, an embodiment of the present invention provides a data recovery apparatus, where the apparatus includes:
the data block reading module is used for reading the data block to be restored from the backup file according to a preset reading strategy based on a concurrent mode; wherein the predetermined read strategy comprises: updating an offset address which corresponds to the backup file and is used for representing the initial position of the data to be read based on a preset read data volume; reading a data block to be restored from the backup file based on the offset address before the updating and the read data volume;
the data marking module is used for decompressing the data block to be recovered aiming at each data block to be recovered to obtain data to be recovered, and setting marking content for representing a storage sequence for the data to be recovered according to an offset address based on reading the data block to be recovered;
and the data storage module is used for storing each data to be recovered into a preset target file according to the mark content set for each data to be recovered.
Optionally, in a specific implementation manner, the data block reading module includes:
and the address updating submodule is used for increasing the read data volume on the basis of the offset address which corresponds to the current backup file and is used for representing the initial position of the data to be read, so as to obtain the updated offset address.
Optionally, in a specific implementation manner, the data block reading module includes:
an address range determination submodule, configured to determine, based on the offset address and the read data amount before the update, an address range in which data is read from the backup file;
and the data block reading submodule is used for reading the data block to be restored from the backup file according to the address range.
Optionally, in a specific implementation manner, the data block reading sub-module is specifically configured to:
and reading the data block to be restored from the backup file according to the address range in a lock-free mode.
Optionally, in a specific implementation manner, the data marking module is specifically configured to:
determining an offset address based on reading the data block to be recovered as a mark content, and setting the determined mark content for the data block to be recovered; alternatively, the first and second electrodes may be,
determining an address range for reading data from the backup file as a mark content, and setting the determined mark content for the data to be restored; wherein the address range is determined according to the offset address and the read data amount based on when the data block to be recovered is read.
Optionally, in a specific implementation manner, the apparatus further includes:
the file cache module is used for reading the backup file from a storage node used for storing the backup file and storing the read backup file into a first preset cache before reading the data block to be restored from the backup file according to a preset reading strategy based on the concurrent mode;
the data block reading module is specifically configured to: and reading the data blocks to be restored from the backup files stored in the first preset cache according to a preset reading strategy based on a concurrent mode.
Alternatively, in one particular implementation,
the data block reading module is specifically configured to: reading the data blocks to be restored from the backup files according to a preset reading strategy by each preset decompression thread based on a concurrent mode;
the data marking module is specifically configured to: each decompression thread decompresses the read data block to be restored to obtain data to be restored, and sets marking content for representing storage sequence for the data to be restored according to the offset address based on reading the data block to be restored;
the data storage module is specifically configured to: and the preset data persistence thread stores each data to be recovered into a preset target file according to the mark content set for each data to be recovered.
Optionally, in a specific implementation manner, the apparatus further includes:
the data caching module is used for storing the data to be recovered with the set marked content into a second preset cache corresponding to each decompression thread by each decompression thread before the preset data persistence thread stores the data to be recovered into a preset target file according to the set marked content for the data to be recovered;
the data storage module is specifically configured to: and the preset data persistence thread stores each data to be recovered in the second preset cache into a preset target file according to the mark content set for each data to be recovered.
Optionally, in a specific implementation manner, the second preset cache corresponding to each decompression thread is different; the data storage module is specifically configured to:
and the preset data persistence thread rounds second preset caches corresponding to the decompression threads, and the data to be recovered in the second preset caches are sequentially stored into a preset target file according to the continuous sequence of the marked contents.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the steps of any data recovery method provided by the first aspect when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the steps of any one of the data recovery methods provided in the first aspect.
In a fifth aspect, an embodiment of the present invention provides a computer program product containing instructions, which when run on a computer, causes the computer to perform the steps of any of the data recovery methods provided in the first aspect.
The embodiment of the invention has the following beneficial effects:
as can be seen from the above, with the scheme provided in the embodiment of the present invention, when a backup file to be restored in a database is restored, data blocks to be restored may be read from the backup file according to a predetermined read policy based on a concurrent manner, and then, for each data block to be restored, the data blocks to be restored may be decompressed to obtain data to be restored, and a flag content for characterizing a storage sequence is set for the data to be restored according to an offset address based on which the data blocks to be restored are read; in this way, each data to be restored can be stored in a preset target file according to the mark content set for each data to be restored.
Based on this, with the scheme provided by the embodiment of the present invention, since each data block to be restored is read concurrently and based on the predetermined reading policy, compared with a manner of sequentially reading each data block, for each continuous data block in the backup file to be restored, it is not necessary to wait for the previous data block to be read, and then continue to read the next data block, and it is possible to simultaneously read a plurality of data blocks; moreover, each data to be restored can be guaranteed to be written into the target file in order based on each mark content, and the validity of data restoration is guaranteed. Therefore, by the scheme, the reading time of each data block in the backup file can be shortened, so that the time consumption of data recovery is reduced, and the efficiency of data recovery is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by referring to these drawings.
Fig. 1 is a schematic diagram of a data recovery method in the related art;
fig. 2 is a schematic flowchart of a data recovery method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of another data recovery method according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of another data recovery method according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of another data recovery method according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a practical application of a data recovery method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a data recovery apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived from the embodiments given herein by one of ordinary skill in the art, are within the scope of the invention.
In the related art, a data recovery method includes: and sequentially reading data blocks with the same size from the backup file aiming at the backup file to be restored in the database, and decompressing all the read data blocks, so that the data obtained by decompressing all the data blocks are sequentially stored in the target file according to the reading sequence of all the data blocks. However, in the above related art, since a sequential reading and sequential storage in the reading order are adopted, there is undoubtedly a problem that the time consumption for data recovery is high.
In order to solve the above technical problem, an embodiment of the present invention provides a data recovery method.
The data recovery method can be applied to any application scene needing to recover the backup files in the database. Moreover, the data recovery method may be applied to any electronic device associated with a database in which a backup file to be recovered exists, and for example, the data recovery method may be a management node of the database, may also be a data node used for storing the backup file to be recovered, and may also be a data node used for storing a target file obtained after data recovery is performed on the backup file to be recovered, which is reasonable. For convenience of description, an execution subject of the data recovery method provided by the embodiment of the present invention is simply referred to as an electronic device below.
The data recovery method provided by the embodiment of the invention can comprise the following steps:
based on a concurrent mode, reading a data block to be restored from the backup file according to a preset reading strategy; wherein the predetermined read strategy comprises: updating an offset address which corresponds to the backup file and is used for representing the initial position of the data to be read based on a preset read data volume; reading a data block to be restored from the backup file based on the offset address before the updating and the read data volume;
decompressing the data block to be restored aiming at each data block to be restored to obtain data to be restored, and setting mark contents for representing a storage sequence for the data to be restored according to an offset address based on reading the data block to be restored;
and storing each data to be recovered into a preset target file according to the mark content set for each data to be recovered.
Based on this, with the scheme provided by the embodiment of the present invention, since each data block to be restored is read concurrently and based on the predetermined reading policy, compared with a manner of sequentially reading each data block, for each continuous data block in the backup file to be restored, it is not necessary to wait for the previous data block to be read, and then continue to read the next data block, and it is possible to simultaneously read a plurality of data blocks; moreover, each data to be restored can be guaranteed to be written into the target file in order based on each mark content, and the validity of data restoration is guaranteed. Therefore, by the scheme, the reading time of each data block in the backup file can be shortened, so that the time consumption of data recovery is reduced, and the efficiency of data recovery is improved.
A data recovery method provided in an embodiment of the present invention is specifically described below with reference to the accompanying drawings
Fig. 2 is a schematic flow chart of a data recovery method according to an embodiment of the present invention, as shown in fig. 2, the method may include the following steps:
s201: based on a concurrent mode, reading a data block to be restored from the backup file according to a preset reading strategy;
wherein the predetermined read strategy comprises: updating an offset address which corresponds to the backup file and is used for representing the initial position of the data to be read based on the preset read data amount; reading a data block to be restored from the backup file based on the offset address and the read data volume before the updating;
for a backup file to be restored, data to be restored in the backup file may be determined first, and then, when the backup file is restored, the data to be restored in the backup file needs to be read, and the data to be restored is stored in a target file, so as to complete restoration of the backup file.
And the data to be restored in the backup file to be restored is the data to be read in the backup file to be restored. Furthermore, an offset address of the start position of the data to be read in the backup file, that is, an offset address corresponding to the backup file and used for characterizing the start position of the data to be read, may be determined, and the determined offset address may be recorded.
In addition, when the data to be read is read from the backup file, the data can be read according to a preset read data volume, that is, the data with the data volume being the preset read data volume is read each time, and further, the data read each time can be regarded as a data block with the data volume being the preset read data volume.
Therefore, the data blocks to be restored can be read from the backup file according to the preset reading strategy based on the concurrent mode. That is, the offset address corresponding to the backup file and used for representing the start position of the data to be read can be updated in a concurrent manner based on the preset read data amount; and after updating the offset address every time, reading the data block to be recovered from the backup file based on the offset address and the read data volume before the current updating.
The concurrent mode is as follows: in an operating system, several programs are in a period from being started to being completed, and the programs are all run on the same processor. For example, the electronic device may implement the concurrent mode through a plurality of lines, but is not limited thereto.
Therefore, when the data blocks to be restored are read from the backup file, a plurality of data blocks to be restored can be simultaneously read from the backup file. Furthermore, based on the concurrent manner, the process of reading the data block to be restored from the backup file according to the predetermined reading policy may include the following steps:
and (3) link 1: when the data to be read in the backup file is restored, an offset address corresponding to the current backup file and used for representing the starting position of the data to be read may be determined first, and the offset address is recorded.
And (2) link: when data to be read in a backup file is read, firstly, a current recorded offset address is obtained, and after the offset address is obtained, the recorded offset address is updated based on a preset read data volume; furthermore, after the recorded offset address is updated, based on the obtained offset address before the current update and the preset read data amount, the data block with the data amount being the preset read data amount can be read from the backup file, that is, the data block to be restored is read from the backup file.
And (3) link: while reading the data block to be restored from the backup file in the link 2, the offset address recorded at present can be obtained again, and after the offset address is obtained, the recorded offset address is updated based on the preset read data volume; furthermore, after the recorded offset address is updated, the data block to be restored may be read from the backup file based on the acquired offset address before the current update and the preset read data amount.
In this way, in the process of reading the data blocks to be restored from the backup file in the links 2 and 3, if there is a period of time of coincidence, the reading of the two data blocks to be restored can be performed simultaneously within the period of time of coincidence.
Furthermore, after the step 3, the currently recorded offset address may be cyclically acquired, and after the offset address is acquired, the recorded offset address may be updated based on a preset amount of read data; furthermore, after the recorded offset address is updated, the process of reading the data blocks to be restored from the backup file based on the acquired offset address before the current update and the preset read data amount can be performed, so that the reading of each data block to be read in the backup file is completed.
Therefore, the data blocks to be read in the backup file can be read simultaneously, and the next data block to be read does not need to be read continuously after the previous data block to be read is read, so that the reading time of each data block in the backup file can be shortened, the time consumption of data recovery is reduced, and the efficiency of data recovery is improved.
S202: decompressing the data block to be restored aiming at each data block to be restored to obtain data to be restored, and setting marking content for representing a storage sequence for the data to be restored according to an offset address based on reading the data block to be restored;
after each data block to be restored is read, the data block to be read can be decompressed to obtain data to be restored, and the data to be restored is the data to be stored in the target file.
In order to ensure the validity of the finally obtained target file, when the data to be restored is stored in the target file, the storage sequence of the data to be restored in the target file should be the same as the sequence of the data blocks to be restored corresponding to the data to be restored in the backup file.
The offset address based on which each data block to be restored is read can represent the offset address of the initial position of each data block to be restored in the backup file, and the offset address based on which each data block to be restored is read can represent the storage sequence of each data block to be restored in the backup file, so that the offset address based on which each data block to be restored corresponding to each data block to be restored is read can represent the storage sequence of each data block to be restored in the target file.
In this way, after each data block to be restored is decompressed to obtain data to be restored, the marking content for representing the storage sequence can be set for the data to be restored according to the offset address based on when the data block to be restored is read.
That is, the marked content set for each piece of data to be restored can represent the storage sequence of the data to be restored in the target file, and further, when each piece of data to be restored is stored in the target file, each piece of data to be restored can be stored in sequence according to the storage sequence represented by each marked content.
The above-mentioned mark content may be an offset address based on which the data block to be restored is read, or an address range determined based on the offset address based on which the data block to be restored is read and the read data amount, or may be other content determined according to the offset address based on which the data block to be restored is read, for example, arabic numerals determined according to the front-back order of the offset addresses based on which the data block to be restored is read, where the more the offset address based on which the data block to be restored is read, the smaller the determined arabic numeral is, and conversely, the more the offset address based on which the data block to be restored is read, the larger the determined arabic numeral is. This is all reasonable.
Optionally, in a specific implementation manner, the step of setting, according to the offset address based on which the data block to be restored is read, a flag content for characterizing a storage order for the data block to be restored may include the following step a 1:
step A1: and determining the offset address based on which the data block to be recovered is read as the mark content, and setting the determined mark content for the data block to be recovered.
In this specific implementation manner, after each data block to be recovered is decompressed to obtain data to be recovered, the offset address based on which the data block to be recovered is read may be set as the flag content of the data to be recovered.
Optionally, in another specific implementation manner, the step of setting, according to the offset address based on which the data block to be restored is read, a flag content for characterizing a storage sequence for the data block to be restored may include the following step a 2:
step A2: determining an address range for reading data from the backup file as a mark content, and setting the determined mark content for the data to be restored;
wherein the address range is determined according to the offset address and the read data amount based on when the data block to be recovered is read.
In this specific implementation manner, after each data block to be restored is decompressed to obtain data to be restored, an address range for reading data from the backup file may be determined according to the offset address and the read data amount based on when the data block to be restored is read, and thus, the determined address range is set as the mark content of the data to be restored.
The method for determining the address range for reading data from the backup file according to the offset address and the read data amount based on when the data block to be restored is read may be: and increasing the data reading amount on the basis of the offset address based on which the data block to be recovered is read to obtain a target address, wherein the address range between the offset address and the target address is the address range for reading data from the backup file.
S203: and storing each data to be recovered into a preset target file according to the mark content set for each data to be recovered.
After the flag content is set for each data to be restored obtained by decompression, since the flag content set for each data to be restored can represent the storage sequence of the data to be restored in the target file, each data to be restored can be stored in the preset target file according to the flag content set for each data to be restored.
The storage of each to-be-restored data into a preset target file refers to: and persisting each data to be restored into the target file, thereby completing the restoration of the data to be restored.
It should be noted that: in the execution process of step S201, the step S202 may be continuously executed for the data block to be restored that has been completely read, that is, the step S201 and the step S202 may be executed simultaneously, but the data blocks to be read are different; furthermore, during the execution of step S201 and/or step S202, the step S202 may be continuously executed on the data to be restored which is obtained by decompression and has been provided with the mark content, that is, the step S203 may be executed simultaneously with at least one of step S201 and step S202, except that the target of each step is different.
In this case, optionally, after the decompression of the read data block to be restored is completed and the flag content is set for the data to be restored obtained by the decompression, the data to be restored with the flag content set may be stored in a preset storage area, so that the data to be restored with the flag content set is stored in the storage area and waits to be stored in the target file. For example, the data to be restored with the flag content set may be stored in a preset buffer space, and the like.
Based on this, with the scheme provided by the embodiment of the present invention, since each data block to be restored is read concurrently, compared to a manner of sequentially reading each data block, for each consecutive data block in the backup file to be restored, it is not necessary to wait for the previous data block to be read and then continue to read the next data block, and multiple data blocks can be read simultaneously. Therefore, the reading time of each data block in the backup file can be shortened, the time consumption of data recovery is reduced, and the efficiency of data recovery is improved.
Next, the predetermined read strategy in the above step S201 is exemplified.
Optionally, in a specific implementation manner, in the predetermined reading policy, the step of updating the offset address, which corresponds to the backup file and is used for characterizing the start position of the data to be read, based on a preset amount of read data may include the following step B1:
step B1: and on the basis of the offset address which corresponds to the current backup file and is used for representing the initial position of the data to be read, increasing the data reading amount to obtain the updated offset address.
In this specific implementation manner, since the data amount of the data block to be restored read each time is a preset read data amount, that is, for each data block to be read in the backup file. The offset address of the start address of the next to-be-read data block of the to-be-read data block differs from the offset address of the start address of the to-be-read data block by the preset read data amount, so that the offset address of the start address of the next to-be-read data block of the to-be-read data block can be obtained by increasing the preset read data amount on the basis of the offset address of the start address of the to-be-read data block.
Thus, since the current offset address is: and if the offset address corresponds to the current backup file and is used for representing the offset address of the starting position of the data to be read, increasing the data reading amount on the basis of the current offset address, wherein the obtained offset address is the offset address of the starting position of the next data block to be read to be recovered when the data block to be recovered is read based on the current offset address and the preset data amount. Therefore, when the current offset address is updated every time, the offset address obtained by reading the data volume can be increased on the basis of the offset address which corresponds to the current backup file and is used for representing the initial position of the data to be read, namely the updated offset address.
Optionally, in a specific implementation manner, in the predetermined reading policy, the step of reading the data block to be restored from the backup file based on the offset address and the read data amount before the update may include the following steps B2-B3:
step B2: determining an address range for reading data from the backup file based on the offset address and the read data amount before the updating;
step B3: and reading the data block to be restored from the backup file according to the address range.
In this specific implementation, the offset address before this update is: the offset address of the start address of the data block to be recovered to be read is preset as follows: if the data size of the data block to be recovered to be read is increased on the offset address before the update, the offset address of the end address of the data block to be recovered to be read can be obtained, and the data blocks to be recovered to be read sequentially are as follows: and in the backup file, starting from the offset address of the starting address and stopping from the offset address of the ending address.
Thus, the address range for reading data from the backup file can be determined based on the offset address and the read data amount before the update, and the address range is as follows: an address range of offset addresses pointing from the offset address of the start address to the offset address of the end address.
Furthermore, the data block to be restored can be read from the backup file according to the determined address range, that is, the data block starting from the offset address of the start address and stopping from the offset address of the end address in the backup file is read, so as to obtain the data block to be restored.
Optionally, the step B3 may include the following step B31:
step B31: and reading the data block to be restored from the backup file according to the address range in a lock-free mode.
Each data block to be restored is read from the backup file based on the offset address of the data block to be restored in the backup file, the recorded backup file corresponds to the data block to be restored, and the offset address used for representing the initial position of the data block to be read is updated each time the data block to be restored is read, so that when each data block to be restored is read, a repeated range does not exist among the utilized address ranges, and repeated reading of the data is not caused. That is, data in the backup file that is being read or has already been read is not read again.
In this way, when the data block to be restored is read from the backup file according to the determined address range, the data which is being read or has been read does not need to be locked in order to prevent repeated reading of the data, so that the data block to be restored can be read from the backup file according to the determined address range in a lock-free manner.
Optionally, in a specific implementation manner, as shown in fig. 3, the data recovery method provided in the embodiment of the present invention may further include, at S200:
s200: reading the backup file from a storage node for storing the backup file, and storing the read backup file into a first preset cache;
accordingly, in this specific implementation manner, the step S201 of reading the data block to be restored from the backup file according to the predetermined reading policy based on the concurrent manner may include the following step S201A:
S201A: and reading the data block to be restored from the backup file stored in the first preset cache according to a preset reading strategy based on the concurrent mode.
In this specific implementation manner, when the backup file to be restored needs to be restored, the backup file may be read from the storage node for storing the backup file, and then the read backup file is stored in the first preset cache. Therefore, the data block to be restored can be read from the backup file stored in the first preset cache according to the preset reading strategy based on the concurrent mode.
Based on the concurrent manner, the specific implementation manner of reading the data block to be restored from the backup file stored in the first preset cache according to the predetermined reading policy is the same as the specific implementation manner of step S201, and is not described herein again.
In this way, in the process of restoring the backup file, the data block to be restored in the backup file is read from the first preset cache, so that frequent access to the storage node for storing the backup file is not required, and further possible influences on the files stored in the storage node, such as data in other files except the backup file being read by mistake, other files being deleted by mistake, and the like, can be avoided.
It is understood that, during the operation of the electronic device, each step performed by the electronic device may be implemented by a different thread.
Based on this, the electronic device may preset threads for implementing each step in the data recovery method provided by the embodiment of the present invention, so that the recovery of the backup file to be recovered is implemented by using the preset threads.
Optionally, in a specific implementation, as shown in fig. 4:
the step S201, based on the concurrent manner, of reading the data block to be restored from the backup file according to the predetermined reading policy, may include the following steps S201B:
S201B: reading the data blocks to be restored from the backup files according to a preset reading strategy by each preset decompression thread based on a concurrent mode;
and each decompression thread can lock the offset address in the process of updating the offset address which corresponds to the backup file and is used for representing the initial position of the data to be read based on the preset read data volume so as to ensure that the offset address is only read and updated by one decompression thread at one time point.
In the step S202, for each data block to be recovered, decompressing the data block to be recovered to obtain data to be recovered, and setting a flag content for representing a storage sequence for the data to be recovered according to the offset address based on when reading the data block to be recovered, the step S202A may include:
S202A: each decompression thread decompresses the read data block to be restored to obtain data to be restored, and sets marking content for representing storage sequence for the data to be restored according to the offset address based on which the data block to be restored is read;
the step S203 of storing each to-be-restored data into a preset target file according to the flag content set for each to-be-restored data may include the following step S203A:
S203A: and the preset data persistence thread stores each data to be recovered into a preset target file according to the mark content set for each data to be recovered.
In this specific implementation manner, an offset address corresponding to the backup file and used for representing a start position of the data to be read may be recorded in the electronic device.
In this way, each decompression thread can read the currently recorded offset address of the electronic device, and after each time the currently recorded offset address is read, the currently recorded offset address can be updated based on the preset read data amount. After the currently recorded offset address is updated, the decompression thread may read the data block to be restored from the backup file based on the read offset address before the current update and the preset read data amount.
After reading the data block to be restored, each decompression thread can decompress the read data block to be restored to obtain the data to be restored, and sets the marking content for representing the storage sequence for the data to be restored according to the read offset address.
In this way, after the data to be restored with the mark contents are obtained, the preset data persistence thread stores the data to be restored into the preset target file according to the mark contents set for the data to be restored.
In order to further reduce the time consumption of data recovery and improve the efficiency of data recovery, a storage space may be preset to store the data to be recovered with the tag content obtained by each decompression thread. Therefore, after the data to be restored with the marked content is obtained by each decompression thread, the data to be restored can be directly stored in the storage space, so that each decompression thread does not need to read a new data block to be restored after the data to be restored is stored in the target file by the data persistence thread, and the data to be restored can be directly read again after the data to be restored is stored in the storage space regardless of whether the data to be restored is stored in the target file by the data persistence thread. By the method, the problem of time consumption of recovery caused by the short board effect of each decompression thread can be solved, and the concurrent throughput of each decompression thread is improved.
Based on this, optionally, as shown in fig. 5, in the data recovery method provided in the embodiment of the present invention, the following step S204 may also be included:
s204: each decompression thread stores the data to be restored with the marked content into a second preset cache corresponding to the decompression thread;
correspondingly, in this specific implementation manner, in the step S203A, the step S203a1, where the preset data persistence thread stores each to-be-restored data in the preset target file according to the flag content set for each to-be-restored data, may be as follows:
s203a 1: and the preset data persistence thread stores each data to be recovered in the second preset cache into a preset target file according to the mark content set for each data to be recovered.
In this specific implementation manner, after each decompression thread obtains the to-be-restored data with the marked content, the to-be-restored data may be stored in the second preset cache corresponding to the decompression thread. And then, the preset data persistence thread can store each data to be recovered in the second preset cache into a preset target file according to the mark content set for each data to be recovered.
Therefore, after the obtained data to be restored with the marked content is stored in the corresponding second preset cache by each decompression thread, a new data block to be restored can be directly read without waiting for the data persistence thread to store the data to be restored in the target file. Therefore, in the recovery process of the backup data, the time consumption of each decompression thread for waiting for the obtained data to be recovered with the mark content to be stored in the target file can be reduced, so that the time consumption of data recovery is further reduced, and the efficiency of data recovery is improved.
Optionally, the second preset caches corresponding to different decompression threads may be the same cache or different caches.
Based on this, optionally, in a specific implementation manner, the second preset cache corresponding to each decompression thread is different;
correspondingly, in this specific implementation manner, in step S203a1, the step S203a may include that the preset data persistence thread stores each to-be-restored data in the second preset cache into the preset target file according to the flag content set for each to-be-restored data, and the step C includes:
and C: and the preset data persistence thread rounds second preset caches corresponding to the decompression threads, and the data to be recovered in the second preset caches are sequentially stored into a preset target file according to the continuous sequence of the marked contents.
In this specific implementation manner, since the second preset caches corresponding to different decompression threads are different, when the data to be restored with the tag content obtained by each decompression thread is stored by the data persistence thread, the second preset caches corresponding to each decompression thread may be sequentially patrolled, so that the data to be restored in each second preset cache is sequentially stored into the preset target file according to the sequential order of the tag content.
In order to facilitate understanding of the data recovery method provided by the above embodiments of the present invention, a specific example is described below.
Suppose that a data copy thread, a first preset cache, a decompression thread 1, a decompression thread 2, a decompression thread 3, a second preset cache and a data persistence thread are arranged in the electronic device. The decompression thread 1, the decompression thread 2 and the decompression thread 3 form a decompression thread group, and the three decompression threads run in a concurrent mode to achieve concurrent data reading. Also, assume that the preset read data amount is N.
For example, as shown in fig. 6, the BUFFER of backup data in fig. 6 is a first preset BUFFER, three decompression frames are decompression processes corresponding to the decompression thread 1, the decompression thread 2, and the decompression thread 3, respectively, the decompressed data BUFFER is a second preset BUFFER, and the data file is a backup file to be restored.
Based on this, the process of restoring the backup file to be restored is as follows:
and (3) link 1: and the data copying thread reads the backup file from the storage node for storing the backup file to be restored and stores the backup file into a first preset cache.
And (2) link: and recording an initial offset address, corresponding to the backup file, for representing the starting position of the data to be read as A, at the specified storage position by any thread in the data copy thread or the decompression thread group. Any thread in the decompression thread group can be specified in advance.
And (3) link: for the decompression thread 1, if the offset address is read as a, the currently recorded offset address a is updated to be an offset address a + N. Then, the decompression thread 1 reads the data block a0 to be restored from the backup file based on the offset address a and the read data volume N, decompresses the data block a0 to be restored to obtain data a1 to be restored, sets the marked content of the data a1 to be restored as the offset address a, and stores the data a1 to be restored marked with the offset address a into a second preset cache. Then, the decompression thread 1 may read the currently recorded offset address again, and loop the above process until all the data to be read in the backup file is read.
And 4, link 4: for the decompression thread 2, if the read offset address is A + N, updating the currently recorded offset address A + N to an offset address A + 2N; then, the decompression thread 2 reads the data block b0 to be restored from the backup file based on the offset address a + N and the read data amount N, decompresses the data block b0 to be restored to obtain data b1 to be restored, sets the marked content of the data b1 to be the offset address a + N, and stores the data b1 to be restored marked with the offset address a + N in the second preset cache. Then, the decompression thread 2 may read the currently recorded offset address again, and loop the above process until all the data to be read in the backup file is read.
And (5) link: for the decompression thread 3, if the offset address is read as a +2N, the decompression thread 3 updates the offset address a +2N recorded at present to be an offset address a + 3N; then, the decompression thread 3 reads the data block c0 to be restored from the backup file based on the offset address a +2N and the read data amount N, decompresses the data block c0 to be restored to obtain data c1 to be restored, sets the marked content of the data c1 to be the offset address a +2N, and stores the data c1 to be restored, which is marked with the offset address a +2N, in the second preset cache. Then, the decompressing thread 3 may read the currently recorded offset address of the decompressing thread group again, and loop the above process until all the data to be read in the backup file is read.
And 6, link 6: in the operation process of each link, the data persistence thread stores each data to be restored in the second preset cache into the target file according to the storage sequence represented by the mark content set for each data to be restored in the second preset cache.
The data persistence thread stores data to be restored with the marked content being the offset address A into a target file, continuously stores the data to be restored with the marked content being the offset address A + N into the target file, continuously stores the data to be restored with the marked content being the offset address A +2N into the target file, and so on until all the data to be read in the backup file are stored into the target file.
It is to be emphasized that: when there are multiple backup files to be restored, the steps of any data restoring method provided in the above-described embodiment of the present invention may be executed for each backup file, so as to restore the multiple backup files to be restored.
Corresponding to the data recovery method provided by the embodiment of the invention, the embodiment of the invention provides a data recovery device.
Fig. 7 is a schematic structural diagram of a data recovery apparatus according to an embodiment of the present invention, and as shown in fig. 7, the apparatus may include the following modules:
a data block reading module 710, configured to read a data block to be restored from a backup file according to a predetermined reading policy based on a concurrent manner; wherein the predetermined read strategy comprises: updating an offset address which corresponds to the backup file and is used for representing the initial position of the data to be read based on a preset read data volume; reading a data block to be restored from the backup file based on the offset address before the updating and the read data volume;
a data marking module 720, configured to decompress each data block to be recovered to obtain data to be recovered, and set marking content for characterizing a storage sequence for the data to be recovered according to an offset address based on when the data block to be recovered is read;
the data storage module 730 is configured to store each data to be restored into a preset target file according to the flag content set for each data to be restored.
Based on this, with the scheme provided by the embodiment of the present invention, since each data block to be restored is read concurrently and based on the predetermined reading policy, compared with a manner of sequentially reading each data block, for each continuous data block in the backup file to be restored, it is not necessary to wait for the previous data block to be read, and then continue to read the next data block, and it is possible to simultaneously read a plurality of data blocks; moreover, each data to be restored can be guaranteed to be written into the target file in order based on each mark content, and the validity of data restoration is guaranteed. Therefore, by the scheme, the reading time of each data block in the backup file can be shortened, so that the time consumption of data recovery is reduced, and the efficiency of data recovery is improved.
Optionally, in a specific implementation manner, the data block reading module 710 includes:
and the address updating submodule is used for increasing the read data volume on the basis of the offset address which corresponds to the current backup file and is used for representing the initial position of the data to be read, so as to obtain the updated offset address.
Optionally, in a specific implementation manner, the data block reading module 710 includes:
an address range determination submodule, configured to determine, based on the offset address and the read data amount before the update, an address range in which data is read from the backup file;
and the data block reading submodule is used for reading the data block to be restored from the backup file according to the address range.
Optionally, in a specific implementation manner, the data block reading sub-module is specifically configured to:
and reading the data block to be restored from the backup file according to the address range in a lock-free mode.
Optionally, in a specific implementation manner, the data marking module 720 is specifically configured to:
determining an offset address based on reading the data block to be recovered as a mark content, and setting the determined mark content for the data block to be recovered; alternatively, the first and second electrodes may be,
determining an address range for reading data from the backup file as a mark content, and setting the determined mark content for the data to be restored; wherein the address range is determined according to the offset address and the read data amount based on when the data block to be recovered is read.
Optionally, in a specific implementation manner, the apparatus further includes:
the file cache module is used for reading the backup file from a storage node used for storing the backup file and storing the read backup file into a first preset cache before reading the data block to be restored from the backup file according to a preset reading strategy based on the concurrent mode;
the data block reading module 710 is specifically configured to: and reading the data blocks to be restored from the backup files stored in the first preset cache according to a preset reading strategy based on a concurrent mode.
Alternatively, in one particular implementation,
the data block reading module 710 is specifically configured to: reading the data blocks to be restored from the backup files according to a preset reading strategy by each preset decompression thread based on a concurrent mode;
the data tagging module 720 is specifically configured to: each decompression thread decompresses the read data block to be restored to obtain data to be restored, and sets marking content for representing storage sequence for the data to be restored according to the offset address based on reading the data block to be restored;
the data storage module 730 is specifically configured to: and the preset data persistence thread stores each data to be recovered into a preset target file according to the mark content set for each data to be recovered.
Optionally, in a specific implementation manner, the apparatus further includes:
the data caching module is used for storing the data to be recovered with the set marked content into a second preset cache corresponding to each decompression thread by each decompression thread before the preset data persistence thread stores the data to be recovered into a preset target file according to the set marked content for the data to be recovered;
the data storage module 730 is specifically configured to: and the preset data persistence thread stores each data to be recovered in the second preset cache into a preset target file according to the mark content set for each data to be recovered.
Optionally, in a specific implementation manner, the second preset cache corresponding to each decompression thread is different; the data storage module 730 is specifically configured to:
and the preset data persistence thread rounds second preset caches corresponding to the decompression threads, and the data to be recovered in the second preset caches are sequentially stored into a preset target file according to the continuous sequence of the marked contents.
Corresponding to the data recovery method provided by the above embodiment of the present invention, an embodiment of the present invention further provides an electronic device, as shown in fig. 8, including a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete mutual communication through the communication bus 804,
a memory 803 for storing a computer program;
the processor 801 is configured to implement the steps of any data recovery method provided in the above embodiments of the present invention when executing the program stored in the memory 803.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the data recovery methods provided in the embodiments of the present invention.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the steps of any of the data recovery methods provided by the embodiments of the present invention described above.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, apparatus embodiments, electronic device embodiments, computer-readable storage medium embodiments, and computer program product embodiments are described with relative simplicity as they are substantially similar to method embodiments, where relevant only as described in portions of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:一种OTA升级失败回退版本方法