WO2017032170A1 - Method and apparatus for importing mirror image file - Google Patents
Method and apparatus for importing mirror image file Download PDFInfo
- Publication number
- WO2017032170A1 WO2017032170A1 PCT/CN2016/087703 CN2016087703W WO2017032170A1 WO 2017032170 A1 WO2017032170 A1 WO 2017032170A1 CN 2016087703 W CN2016087703 W CN 2016087703W WO 2017032170 A1 WO2017032170 A1 WO 2017032170A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- file
- data
- target
- image file
- parent
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
Definitions
- the present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for importing an image file.
- an image file In the computer field, in order to facilitate user downloading and use, a series of specific files can be made into an image file according to a preset format by an image file creation tool.
- an image file consists of multiple data files, each of which stores different data of the image file.
- multiple image files on a node are usually saved as a compressed package, and multiple image files in the compressed package may share the same data file.
- you need to import a partial image file on a node to another node you can import the compressed package containing all the image files to another node through the load operation.
- an embodiment of the present invention provides a method and an apparatus for importing an image file.
- the technical solution is as follows:
- a method for importing an image file includes:
- a target data file Acquiring, according to the first description file and the plurality of data files, a target data file, where the target data file stores file data of a target image file to be imported;
- the acquiring the target data file according to the first description file and the multiple data files includes:
- the target data file is acquired according to the leaf node ID and the file ID and the parent ID of the plurality of data files.
- each of the data files includes at least a second description file, where the second description file is used to follow
- the default storage format stores the file ID and parent ID of the data file
- Reading the file ID and the parent ID of each data file from the plurality of data files including:
- the file ID and parent ID of each data file are read from the second description file corresponding to each data file.
- the obtaining, by the first description file, the leaf node ID of the target image file includes:
- the obtaining, according to the leaf node ID and a file ID and a parent ID of the multiple data files Target data files including:
- All the data files between the data file where the leaf node ID is located and the data file where the root node ID is located are used as the target data file.
- the generating, by the target data file, the compressed package of the target image file includes:
- the target data file and the target description file are compressed according to a specific format to obtain a compressed package of the target image file.
- an apparatus for importing an image file comprising:
- a decompression module configured to decompress a compressed package that includes multiple image files to obtain a first description file and multiple data files, where the first description file is used to store between the image file name and the leaf node identity ID Correspondence, the file data of each image file is stored in at least one data file;
- An acquiring module configured to acquire, according to the first description file and the plurality of data files, a target data file, where the target data file stores file data of a target image file to be imported;
- a generating module configured to generate a compressed package of the target image file according to the target data file
- the import module is configured to import the compressed package of the target image file to the target node.
- the acquiring module is configured to read, from a plurality of data files, a file ID and a parent ID of each data file; Obtaining a leaf node ID of the target image file in the description file; acquiring a target data file according to the leaf node ID and a file ID and a parent ID of the plurality of data files.
- the data file includes at least a second description file, where the second description file is used to follow
- the default storage format stores the file ID and parent ID of the data file
- the obtaining module is specifically configured to read a file ID and a parent ID of each data file from a second description file corresponding to each data file.
- the acquiring module is specifically configured to use the first description from the image file name of the target image file.
- the leaf node ID corresponding to the image file name of the target image file is obtained.
- the leaf node ID is used as a starting file ID
- the multiple data files are In the file ID and the parent ID
- the parent ID of the leaf node ID is obtained
- the parent ID of the leaf node ID is the file ID
- the file ID and the parent ID of all data files are looped through until the target mirror is obtained.
- the root node ID of the file; the data file between the data file where the leaf node ID is located and the data file where the root node ID is located is used as the target data file.
- the generating module is specifically configured to: according to the image file name and the leaf node ID of the target image file stored in the first description file Corresponding relationship between the two, generating a target description file; compressing the target data file and the target description file according to a specific format to obtain a compressed package of the target image file.
- FIG. 1(A) is a structural diagram of an image file according to an embodiment of the present invention.
- FIG. 1(B) is a logical architecture diagram of a method for importing an image file according to an embodiment of the present invention
- FIG. 2 is a block diagram of a computer used in another embodiment of the present invention.
- FIG. 3 is a flowchart of a method for importing an image file according to another embodiment of the present invention.
- FIG. 4 is a flowchart of a method for importing an image file according to another embodiment of the present invention.
- FIG. 5 is a schematic diagram of an image file import process according to another embodiment of the present invention.
- FIG. 6 is a schematic structural diagram of an image file according to another embodiment of the present invention.
- FIG. 7 is a schematic structural diagram of an apparatus for importing an image file according to another embodiment of the present invention.
- mirroring is a type of redundancy that is essentially a copy of data on one disk on another.
- UltraISO, winISO and other image file creation tools a series of files on the disk into an image file.
- Common formats for image files are BIN (Binary), DAO (Data Access Object), and so on.
- the data in the image file is stored in a plurality of data files, each data file having a determined file ID (Identity) and a parent ID.
- the data files in the image file are in a tree structure, and the file ID of the upper data file is the parent ID of the lower layer data file.
- the file ID of the underlying data file is generally referred to as the leaf node ID of the image file, and the parent ID of the top-level data file is referred to as the root node ID of the image file.
- FIG. 1(A) there are eight mirror layers on node 1, which constitute three image files, which are image file A, image file B, and image file C.
- the image file A is composed of a data file corresponding to the mirror layer 6, a data file corresponding to the mirror layer 3, a data file corresponding to the mirror layer 2, and a data file corresponding to the mirror layer 1.
- the image file B is correspondingly sent by the mirror layer 7.
- the image file C corresponds to the data file corresponding to the mirror layer 8, the data file corresponding to the mirror layer 5, and the mirror layer. 2 Corresponding data file and data file corresponding to mirror layer 1.
- the data file corresponding to the mirror layer 6 is the mirrored leaf of the image file A
- the data file corresponding to the mirror layer 7 is the mirrored leaf of the image file B
- the data file corresponding to the mirror layer 8 is the image file C.
- the mirrored leaf; the data file corresponding to the mirror layer 1 and the data file corresponding to the mirror layer 2 are the common data files of the image file A, the image file B, and the image file C.
- FIG. 1(B) is a diagram showing the logical architecture of the method for importing an image file provided by this embodiment.
- a tree processing module to process a compressed package containing a plurality of image files, a compressed package containing the required image file can be obtained.
- the computer 100 is a conventional desktop computer or laptop notebook, and the computer 100 includes a central processing unit (CPU) 101, a system memory 104 including a random access memory (RAM) 102 and a read only memory (ROM) 103, And connecting the system memory 104 and the central processing unit System bus 105 of 101.
- the computer 100 also includes a basic input/output system (I/O system) 106 that facilitates the transfer of information between various devices within the computer, and a mass storage device 107 for storing operating systems, applications, and other program modules.
- I/O system basic input/output system
- the central processing unit 101 is configured to execute the following instructions:
- the compressed package containing multiple image files is decompressed to obtain a first description file and a plurality of data files, where the first description file is used to store a correspondence between the image file name and the leaf node identity ID, and each image is mirrored.
- the file data of the file is stored in at least one data file;
- the central processing unit 101 when acquiring the target data file according to the first description file and the plurality of data files, specifically includes:
- the target data file is obtained based on the leaf node ID and the file ID and parent ID of the plurality of data files.
- each data file includes at least a second description file, where the second description file is used to store the file ID and the parent ID of the data file according to the preset storage format;
- the central processing unit 101 when reading the file ID and the parent ID of each data file from the plurality of data files, specifically includes:
- the file ID and parent ID of each data file are read from the second description file corresponding to each data file.
- the method when the central processing unit 101 obtains the leaf node ID of the target image file from the first description file, the method includes:
- the leaf node ID corresponding to the image file name of the target image file is obtained from the mapping between the image file name and the leaf node ID stored in the first description file according to the image file name of the target image file.
- the central processing unit 101 when acquiring the target data file according to the leaf node ID and the file ID and the parent ID of the plurality of data files, specifically includes:
- the leaf ID is used as the starting file ID, and the parent ID of the leaf node ID is obtained from the file ID and the parent ID of the plurality of data files;
- the parent ID of the leaf node ID is the file ID, and the file ID and the parent ID of all the data files are traversed until the root node ID of the target image file is obtained;
- All data files between the data file where the leaf node ID is located and the data file where the root node ID is located are taken as the target data file.
- the central processing unit 101 when generating the compressed package of the target image file according to the target data file, specifically includes:
- the target data file and the target description file are compressed according to a specific format to obtain a compressed package of the target image file.
- the basic input/output system 106 includes a display 108 for displaying information and an input device 109 such as a mouse or keyboard for user input of information.
- the display 108 and input device 109 are both connected to the central processing unit 101 via an input and output controller 110 that is coupled to the system bus 105.
- the basic input/output system 106 can also include an input output controller 110 for receiving and processing input from a plurality of other devices, such as a keyboard, mouse, or electronic stylus.
- input and output controller 110 also provides output to a display screen, printer, or other type of output device.
- the mass storage device 107 is connected to the central processing unit 101 by a mass storage controller (not shown) connected to the system bus 105.
- the mass storage device 107 and its associated computer readable medium provide non-volatile storage for the computer 100. That is, the mass storage device 107 can include a computer readable medium (not shown) such as a hard disk or a CD-ROM drive.
- the computer readable medium can include computer storage media and communication media.
- Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data.
- Computer storage media include RAM, ROM, EPROM, EEPROM, flash memory or other solid state storage technologies, CD-ROM, DVD or other optical storage, tape cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices.
- RAM random access memory
- ROM read only memory
- EPROM Erasable programmable read-only memory
- EEPROM electrically erasable programmable read-only memory
- the computer 100 may also be operated by a remote computer connected to the network via a network such as the Internet. That is, the computer 100 can be connected to the network 112 through a network interface unit 111 connected to the system bus 105, or can be connected to other types of networks or remote computer systems (not shown) using the network interface unit 111. .
- the computer provided by the embodiment of the present invention is decompressed according to a compression package that includes multiple image files.
- the obtained file obtains the image file to be imported, and then the image file is specifically imported to the target node, thereby avoiding the overall import of the compressed package containing multiple image files, which not only saves the import time but also saves the storage. cost.
- the embodiment of the present invention provides a method for importing an image file.
- the method process provided by this embodiment includes:
- Decompress a compressed package that includes multiple image files to obtain a first description file and multiple data files, where the first description file is used to store a correspondence between an image file name and a leaf node identity ID.
- the file data of the image files is stored in at least one data file.
- the method provided by the embodiment of the present invention obtains the image file to be imported according to the file obtained by decompressing the compressed package containing multiple image files, and then the image file is specifically imported to the target node, thereby avoiding the inclusion of the image file.
- the overall import of multiple image file compression packages not only saves import time, but also saves storage costs.
- acquiring the target data file according to the first description file and the plurality of data files includes:
- the target data file is obtained based on the leaf node ID and the file ID and parent ID of the plurality of data files.
- each data file includes at least a second description file, where the second description file is used to store the file ID and the parent ID of the data file according to the preset storage format;
- Read the file ID and parent ID of each data file from multiple data files including:
- the file ID and parent ID of each data file are read from the second description file corresponding to each data file.
- obtaining the leaf node ID of the target image file from the first description file includes:
- the leaf corresponding to the image file name of the target image file is obtained from the correspondence between the image file name and the leaf node ID stored in the first description file according to the image file name of the target image file. Child node ID.
- the target data file is obtained according to the leaf node ID and the file ID and the parent ID of the plurality of data files, including:
- the leaf ID is used as the starting file ID, and the parent ID of the leaf node ID is obtained from the file ID and the parent ID of the plurality of data files;
- the parent ID of the leaf node ID is the file ID, and the file ID and the parent ID of all the data files are traversed until the root node ID of the target image file is obtained;
- All data files between the data file where the leaf node ID is located and the data file where the root node ID is located are taken as the target data file.
- the compressed package of the target image file is generated according to the target data file, including:
- the target data file and the target description file are compressed according to a specific format to obtain a compressed package of the target image file.
- the embodiment of the present invention provides a method for importing an image file, which is an example of any one of the nodes in the computer or the computer system in the Docker environment. Referring to FIG. 4, the method provided in this embodiment is provided. The process includes:
- the first description file is generally a Json file, and can be used for storing the correspondence between the image file name of the plurality of image files included in the compressed package and the leaf nodes, and the creation time of each image file.
- the format of the Json file is generally: "image file”: ⁇ "tag”: “leaf node ID” ⁇ .
- the tag characterizes other information such as the creation time of the image file.
- Example 1 if the specified compressed package contains two image files, and the mirror names of the two image files are nginx and busybox respectively, the first description file format is as follows:
- the creation time of the image file corresponding to the image name nginx is "latest”, and the leaf node ID corresponding to the image file is:
- the creation time of the mirror file corresponding to the mirror name is "latest".
- the leaf node ID corresponding to the image file is:
- the number of data files obtained by decompressing the compressed packet is the same as the number of mirrored layers. If the compressed packet includes six mirroring layers, the number of data files obtained after decompression is six, and each data file corresponds to a tree.
- the storage structure is a mirror layer that can be used to store some or all of the file data of the image file, that is, the file data of each image file is stored in at least one data file.
- the data file includes two files, one file is the second description file, and the other file is the Layer.tar file. Among them, the Layer.tar file is used to store the operation data of the data file.
- the second description file is a Json file for storing the file ID and the parent ID, the creation time, and the like of the data file according to the preset storage format.
- the data stored in the second description file is generally referred to as metadata
- the data stored in the Layer.tar file is referred to as layer data, that is, each data file is composed of metadata and layer data.
- the data structure of the data file is as shown in Table 1 below.
- the data file also includes a VERSION file, which The VERSION file can be used to describe the version number of the operational data in the Layer.tar file.
- the present embodiment is parsed in order to facilitate subsequent acquisition of the data file of the target image file to be imported.
- the correspondence between the file ID of all the data files and the parent ID may be saved in the form of a table or the like.
- the file ID and parent ID of the parsed data file may be stored as shown in Table 2 below.
- Each data file obtained by decompression includes a second description file, and the second description file stores the file ID and the parent ID of the data file according to a preset storage format, and therefore, according to the preset storage format, from the first The file ID and parent ID of each data file are read in the second description file.
- Example 2 the format of the second description file is as follows:
- the file ID of the data file can be obtained from the second description file:
- the leaf node corresponding to the mirror name of the target image file is obtained.
- the leaf node ID corresponding to the image file name busybox is obtained as follows:
- the image file is composed of a plurality of data files between the data file where the leaf node ID is located and the data file where the root node ID is located.
- the data files are in a tree structure, and the data file where the leaf node ID is located constitutes the underlying data file of the image file.
- the data file where the root node ID is located constitutes the top-level data file of the image file. Based on the file ID and parent ID of the multiple data files, the root node ID can be obtained step by step according to the leaf node ID.
- the leaf node ID when the leaf node ID and the file ID and the parent ID of the plurality of data files are obtained, the leaf node ID may be the starting file ID, and the leaf node is obtained from the file ID and the parent ID of the plurality of data files.
- the parent ID of the ID, and then the parent ID of the leaf node ID is the file ID, looping through the file ID and parent ID of all data files until the root node ID of the target image file is obtained, and then the data file of the leaf node ID is located.
- the entire data file between the data file and the data file where the root node ID is located is used as the target data file, and the file data of the target image file is stored in the target data file.
- the file ID and the parent ID of the data file stored in the above Table 2 are taken as an example for description. .
- the leaf node ID is 1004.
- the parent ID of the leaf node ID 1004 is 1002
- the parent ID of the file ID 1002 is 1001
- the parent ID 1001 is the file ID
- the parent ID of the file ID 1001 is NULL
- the NULL is the root node ID of the image file
- the data file where the leaf node ID 1004 is located, the data file where the file node ID 1002 is located, and the data file where the file node ID 1001 is located are used as the target data file.
- the structure of the target data file is leaf node ID1004 Data file > File data ID1002 where the file is located > File node ID1001.
- the leaf node ID corresponding to the image file name of the target image file may be obtained based on the correspondence between the image file name and the leaf node ID stored in the first description file, and the image file name of the obtained target image file is obtained.
- the corresponding leaf node IDs are stored separately in a Json file to obtain the target description file.
- the specific format may be a storage format of data in the image file compression package. Based on the specific storage format, the target data file and the target description file are compressed, and the compressed package of the target image file is obtained. At this time, the data contained in the compressed package of the target image file has the metadata, layer data, and target of the target data file. Describe the data in the file.
- the target node may be any node in the computer, and may be another computer in the computer system. In this embodiment, the target node is not specifically limited.
- the compressed package is imported to the target node by performing a load operation. Since only the data file and the description file corresponding to the target image file are stored in the compressed package, not only the time consumption of the import process is reduced, but also the storage cost of the target node storage target image file is reduced.
- the compressed package containing the image file needs to be decompressed on the first node to obtain the first description file and multiple data. file.
- the file ID and the parent ID of each data file are read from the second description file included in each data file, and the correspondence between the image file name and the leaf node ID stored in the first description file is The leaf node ID corresponding to the name of the specified image file is obtained, and all the data files corresponding to the specified image file are obtained according to the leaf node ID and the file ID and the parent ID of each data file.
- the compressed package of the specified image file can be obtained.
- Last pass The overload operation imports the compressed package of the specified image file onto another node.
- the compressed file containing multiple image files is decompressed, and the first description file and the six data files are obtained.
- the six data files correspond to six mirror layers, and the file ID is 1001 (the parent ID is NULL).
- Data file, data file with file ID 1002 (parent ID 1001), data file with file ID 1003 (parent ID 1002), data file with file ID 1004 (parent ID 1003), file ID is A data file of 1005 (parent ID is 1002) and a data file with a file ID of 1006 (parent ID is 1005).
- the leaf node ID corresponding to the image file A is 1004, and the leaf node ID corresponding to the image file B is 1005.
- the parent ID 1003 of the leaf node ID 1004 is obtained according to the leaf node ID 1004 corresponding to the image file A, and the parent ID 1003 of the leaf node ID 1004 is used as the file ID to obtain the parent ID 1002 of the file ID 1003.
- the parent ID 1002 is used as the file ID
- the parent ID 1001 of the file ID 1002 is obtained
- the parent ID 1001 is used as the file ID
- the parent ID of the file ID 1001 is obtained as NULL
- the parent node ID NULL is the root node ID, which is obtained based on the obtained file ID.
- the target data file corresponding to the image file A is: the data file where the file ID 1004 is located > the data file where the file ID 1003 is located > the data file where the file ID 1002 is located > the data file where the file ID 1001 is located. Then, according to the correspondence between the image file name and the leaf node stored in the first description file, the correspondence between the image file A and the leaf node ID 1004 is obtained, and the target description file is generated based on the correspondence.
- the compressed file corresponding to the image file A can be obtained by compressing the data file in which the file ID 1004 is located, the data file in which the file ID 1003 is located, the data file in which the file ID 1002 is located, the data file in which the file ID 1001 is located, and the target description file in a specific format. Finally, the compression package corresponding to the image file A is imported to the target node by a loading operation.
- the method provided by the embodiment of the present invention obtains the image file to be imported according to the file obtained by decompressing the compressed package containing multiple image files, and then the image file is specifically imported to the target node, thereby avoiding the inclusion of the image file.
- the overall import of multiple image file compression packages not only saves import time, but also saves storage costs.
- an embodiment of the present invention provides an apparatus for importing an image file, where the apparatus includes:
- the decompression module 701 is configured to decompress a compressed package that includes multiple image files to obtain a first description file and multiple data files, where the first description file is used to store the image file name and the leaf segment. Point mapping identifier ID, the file data of each image file is stored in at least one data file;
- the obtaining module 702 is configured to obtain a target data file according to the first description file and the plurality of data files, where the file data of the target image file to be imported is stored in the target data file;
- a generating module 703, configured to generate a compressed package of the target image file according to the target data file;
- the import module 704 is configured to import the compressed package of the target image file to the target node.
- the obtaining module 702 is configured to read a file ID and a parent ID of each data file from a plurality of data files, and obtain a leaf node ID of the target image file from the first description file; The target data file is obtained based on the leaf node ID and the file ID and parent ID of the plurality of data files.
- each data file includes at least a second description file, where the second description file is used to store the file ID and the parent ID of the data file according to the preset storage format;
- the obtaining module 702 is specifically configured to read the file ID and the parent ID of each data file from the second description file corresponding to each data file.
- the obtaining module 702 is specifically configured to obtain the target image from the correspondence between the image file name and the leaf node ID stored in the first description file according to the image file name of the target image file.
- the leaf node ID corresponding to the image file name of the file.
- the obtaining module 702 is specifically configured to obtain the parent ID of the leaf node ID from the file ID and the parent ID of the plurality of data files by using the leaf node ID as the starting file ID;
- the parent ID of the node ID is the file ID. It loops through the file ID and parent ID of all data files until the root node ID of the target image file is obtained.
- the data file where the leaf node ID is located and the data file where the root node ID is located All data files are used as target data files.
- the generating module 703 is specifically configured to generate a target description file according to a correspondence between an image file name of the target image file and the leaf node ID stored in the first description file; The target data file and the target description file are compressed to obtain a compressed package of the target image file.
- the device provided by the embodiment of the present invention obtains an image file to be imported according to a file obtained by decompressing a compressed package that includes multiple image files, and then specifically imports the image file into a target node. This avoids the overall import of compressed packages containing multiple image files, which not only saves import time, but also saves storage costs.
- the image file importing device provided in the foregoing embodiment
- the image file is only exemplified by the division of the above functional modules.
- the functions may be allocated by different functional modules according to requirements.
- the internal structure of the import device of the image file is divided into different functional modules to complete all or part of the functions described above.
- the embodiment of the method for importing the image file provided by the foregoing embodiment is the same as the embodiment of the method for importing the image file, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
- a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
- the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Processing Or Creating Images (AREA)
Abstract
Disclosed are a method and apparatus for importing a mirror image file. The method comprises: decompressing a compressed packet containing a plurality of mirror files to obtain a first description file and a plurality of data files, the first description file being used for storing a corresponding relationship between a mirror file name and a leaf node identity identifier (ID), and file data of each of the mirror files being stored in at least one of the data files (301); acquiring a target data file according to the first description file and the plurality of data files (302); generating a compressed packet of a target mirror file according to the target data file (303); and importing the compressed packet of the target mirror file into a target node (304). According to a file obtained by decompressing a compressed packet containing a plurality of mirror files, a mirror file to be imported is obtained, and thus the mirror file is targetedly imported into a target node, thereby avoiding importing the compressed packet containing a plurality of mirror files as a whole, which not only saves import time but also saves storage cost.
Description
本申请要求于2015年8月21日提交中国专利局、申请号为201510519278.4、发明名称为“镜像文件的导入方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201510519278.4, entitled "Importing Method and Apparatus for Image File", filed on August 21, 2015, the entire contents of which is incorporated herein by reference. .
本发明涉及计算机技术领域,特别涉及一种镜像文件的导入方法及装置。The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for importing an image file.
在计算机领域,为了便于用户下载和使用,可通过镜像文件制作工具将一系列特定的文件按照预设格式制作成一个镜像文件。通常一个镜像文件由多个数据文件构成,每个数据文件中存储着镜像文件的不同数据。In the computer field, in order to facilitate user downloading and use, a series of specific files can be made into an image file according to a preset format by an image file creation tool. Usually an image file consists of multiple data files, each of which stores different data of the image file.
为了节省存储空间,在Docker场景下,通常会将节点上的多个镜像文件保存成一个压缩包,该压缩包中的多个镜像文件可能共享着同一数据文件。当需要将节点上的部分镜像文件导入到另一节点上,可通过加载操作将包含所有镜像文件的压缩包导入到另一节点。In order to save storage space, in a Docker scenario, multiple image files on a node are usually saved as a compressed package, and multiple image files in the compressed package may share the same data file. When you need to import a partial image file on a node to another node, you can import the compressed package containing all the image files to another node through the load operation.
在实现本发明的过程中,发明人发现现有技术至少存在以下问题:In the process of implementing the present invention, the inventors have found that the prior art has at least the following problems:
即便仅需要节点上的部分镜像文件,由于已经将所有镜像文件保存为一个压缩包,则需要对该压缩包整体进行导入,该过程不仅耗时较长,而且增加了另一节点的存储成本。Even if only a part of the image file on the node is needed, since all the image files have been saved as one compressed package, the whole compression package needs to be imported, which is not only time consuming but also increases the storage cost of the other node.
发明内容Summary of the invention
为了解决相关技术的问题,本发明实施例提供了一种镜像文件的导入方法及装置。所述技术方案如下:In order to solve the problem of the related art, an embodiment of the present invention provides a method and an apparatus for importing an image file. The technical solution is as follows:
第一方面,提供了一种镜像文件的导入方法,所述方法包括:In a first aspect, a method for importing an image file is provided, and the method includes:
对包含多个镜像文件的压缩包进行解压缩,得到第一描述文件和多个数据文件,所述第一描述文件用于存储镜像文件名称与叶子节点身份标识ID之间的对应关系,每个镜像文件的文件数据存储于至少一个数据文件中;Decompressing a compressed package that includes multiple image files to obtain a first description file and a plurality of data files, where the first description file is used to store a correspondence between an image file name and a leaf node identity ID, each The file data of the image file is stored in at least one data file;
根据所述第一描述文件和所述多个数据文件,获取目标数据文件,所述目标数据文件中存储了待导入的目标镜像文件的文件数据;
Acquiring, according to the first description file and the plurality of data files, a target data file, where the target data file stores file data of a target image file to be imported;
根据所述目标数据文件,生成所述目标镜像文件的压缩包;Generating a compressed package of the target image file according to the target data file;
将所述目标镜像文件的压缩包导入到目标节点。Import the compressed package of the target image file to the target node.
结合第一方面,在第一方面的第一种可能的实现方式中,所述根据所述第一描述文件和所述多个数据文件,获取目标数据文件,包括:With reference to the first aspect, in a first possible implementation manner of the first aspect, the acquiring the target data file according to the first description file and the multiple data files includes:
从多个数据文件中读取每个数据文件的文件ID及父ID;Read the file ID and parent ID of each data file from multiple data files;
从所述第一描述文件中获取所述目标镜像文件的叶子节点ID;Obtaining, from the first description file, a leaf node ID of the target image file;
根据所述叶子节点ID与所述多个数据文件的文件ID及父ID,获取目标数据文件。The target data file is acquired according to the leaf node ID and the file ID and the parent ID of the plurality of data files.
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述每个数据文件中至少包括第二描述文件,所述第二描述文件用于按照预设存储格式存储数据文件的文件ID及父ID;In conjunction with the first possible implementation of the first aspect, in a second possible implementation of the first aspect, each of the data files includes at least a second description file, where the second description file is used to follow The default storage format stores the file ID and parent ID of the data file;
所述从所述多个数据文件中读取每个数据文件的文件ID及父ID,包括:Reading the file ID and the parent ID of each data file from the plurality of data files, including:
从每个数据文件对应的第二描述文件中读取每个数据文件的文件ID及父ID。The file ID and parent ID of each data file are read from the second description file corresponding to each data file.
结合第一方面的第一种可能的实现方式,在第一方面的第三种可能的实现方式中,所述从所述第一描述文件中获取所述目标镜像文件的叶子节点ID,包括:With reference to the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the obtaining, by the first description file, the leaf node ID of the target image file includes:
根据目标镜像文件的镜像文件名称,从所述第一描述文件存储的镜像文件名称与叶子节点ID之间的对应关系中,获取所述目标镜像文件的镜像文件名称对应的叶子节点ID。And obtaining, according to the image file name of the target image file, the leaf node ID corresponding to the image file name of the target image file, from the correspondence between the image file name and the leaf node ID stored in the first description file.
结合第一方面的第一种可能的实现方式,在第一方面的第四种可能的实现方式中,所述根据所述叶子节点ID与所述多个数据文件的文件ID及父ID,获取目标数据文件,包括:In conjunction with the first possible implementation of the first aspect, in a fourth possible implementation manner of the first aspect, the obtaining, according to the leaf node ID and a file ID and a parent ID of the multiple data files Target data files, including:
以所述叶子节点ID为起始文件ID,从所述多个数据文件的文件ID及父ID中,获取所述叶子节点ID的父ID;Obtaining, from the file ID and the parent ID of the plurality of data files, a parent ID of the leaf node ID, by using the leaf node ID as a starting file ID;
以所述叶子节点ID的父ID为文件ID,循环遍历所有数据文件的文件ID及父ID,直至获取到所述目标镜像文件的根节点ID;Taking the parent ID of the leaf node ID as the file ID, looping through the file ID and the parent ID of all the data files until the root node ID of the target image file is obtained;
将所述叶子节点ID所在的数据文件与所述根节点ID所在的数据文件之间的全部数据文件作为目标数据文件。All the data files between the data file where the leaf node ID is located and the data file where the root node ID is located are used as the target data file.
结合第一方面,在第一方面的第五种可能的实现方式中,所述根据所述目标数据文件,生成所述目标镜像文件的压缩包,包括:
With reference to the first aspect, in a fifth possible implementation manner of the first aspect, the generating, by the target data file, the compressed package of the target image file includes:
根据所述第一描述文件中存储的所述目标镜像文件的镜像文件名称与叶子节点ID之间的对应关系,生成目标描述文件;Generating a target description file according to a correspondence between an image file name of the target image file and a leaf node ID stored in the first description file;
按照特定格式对所述目标数据文件以及所述目标描述文件进行压缩,得到所述目标镜像文件的压缩包。The target data file and the target description file are compressed according to a specific format to obtain a compressed package of the target image file.
第二方面,提供了一种镜像文件的导入装置,所述装置包括:In a second aspect, an apparatus for importing an image file is provided, the apparatus comprising:
解压缩模块,用于对包含多个镜像文件的压缩包进行解压缩,得到第一描述文件和多个数据文件,所述第一描述文件用于存储镜像文件名称与叶子节点身份标识ID之间的对应关系,每个镜像文件的文件数据存储于至少一个数据文件中;a decompression module, configured to decompress a compressed package that includes multiple image files to obtain a first description file and multiple data files, where the first description file is used to store between the image file name and the leaf node identity ID Correspondence, the file data of each image file is stored in at least one data file;
获取模块,用于根据所述第一描述文件和所述多个数据文件,获取目标数据文件,所述目标数据文件中存储了待导入的目标镜像文件的文件数据;An acquiring module, configured to acquire, according to the first description file and the plurality of data files, a target data file, where the target data file stores file data of a target image file to be imported;
生成模块,用于根据所述目标数据文件,生成所述目标镜像文件的压缩包;a generating module, configured to generate a compressed package of the target image file according to the target data file;
导入模块,用于将所述目标镜像文件的压缩包导入到目标节点。The import module is configured to import the compressed package of the target image file to the target node.
结合第二方面,在第二方面的第一种可能的实现方式中,所述获取模块,用于从多个数据文件中读取每个数据文件的文件ID及父ID;从所述第一描述文件中获取所述目标镜像文件的叶子节点ID;根据所述叶子节点ID与所述多个数据文件的文件ID及父ID,获取目标数据文件。With reference to the second aspect, in a first possible implementation manner of the second aspect, the acquiring module is configured to read, from a plurality of data files, a file ID and a parent ID of each data file; Obtaining a leaf node ID of the target image file in the description file; acquiring a target data file according to the leaf node ID and a file ID and a parent ID of the plurality of data files.
结合第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述每个数据文件中至少包括第二描述文件,所述第二描述文件用于按照预设存储格式存储数据文件的文件ID及父ID;In conjunction with the first possible implementation of the second aspect, in a second possible implementation of the second aspect, the data file includes at least a second description file, where the second description file is used to follow The default storage format stores the file ID and parent ID of the data file;
所述获取模块,具体用于从每个数据文件对应的第二描述文件中读取每个数据文件的文件ID及父ID。The obtaining module is specifically configured to read a file ID and a parent ID of each data file from a second description file corresponding to each data file.
结合第二方面的第一种可能的实现方式,在第二方面的第三种可能的实现方式中,所述获取模块,具体用于根据目标镜像文件的镜像文件名称,从所述第一描述文件存储的镜像文件名称与叶子节点ID之间的对应关系中,获取所述目标镜像文件的镜像文件名称对应的叶子节点ID。With reference to the first possible implementation of the second aspect, in a third possible implementation manner of the second aspect, the acquiring module is specifically configured to use the first description from the image file name of the target image file. In the correspondence between the image file name and the leaf node ID, the leaf node ID corresponding to the image file name of the target image file is obtained.
结合第二方面的第一种可能的实现方式,在第二方面的第四种可能的实现方式中,具体用于以所述叶子节点ID为起始文件ID,从所述多个数据文件的文件ID及父ID中,获取所述叶子节点ID的父ID;以所述叶子节点ID的父ID为文件ID,循环遍历所有数据文件的文件ID及父ID,直至获取到所述目标镜
像文件的根节点ID;将所述叶子节点ID所在的数据文件与所述根节点ID所在的数据文件之间的全部数据文件作为目标数据文件。With reference to the first possible implementation of the second aspect, in a fourth possible implementation manner of the second aspect, specifically, the leaf node ID is used as a starting file ID, and the multiple data files are In the file ID and the parent ID, the parent ID of the leaf node ID is obtained; and the parent ID of the leaf node ID is the file ID, and the file ID and the parent ID of all data files are looped through until the target mirror is obtained.
The root node ID of the file; the data file between the data file where the leaf node ID is located and the data file where the root node ID is located is used as the target data file.
结合第二方面,在第二方面的第五种可能的实现方式中,所述生成模块,具体用于根据所述第一描述文件中存储的所述目标镜像文件的镜像文件名称与叶子节点ID之间的对应关系,生成目标描述文件;按照特定格式对所述目标数据文件以及所述目标描述文件进行压缩,得到所述目标镜像文件的压缩包。With reference to the second aspect, in a fifth possible implementation manner of the second aspect, the generating module is specifically configured to: according to the image file name and the leaf node ID of the target image file stored in the first description file Corresponding relationship between the two, generating a target description file; compressing the target data file and the target description file according to a specific format to obtain a compressed package of the target image file.
本发明实施例提供的技术方案带来的有益效果是:The beneficial effects brought by the technical solutions provided by the embodiments of the present invention are:
根据对包含多个镜像文件的压缩包解压缩后得到的文件,获取待导入的镜像文件,进而将该镜像文件有针对性地导入到目标节点,避免了对包含多个镜像文件的压缩包进行整体导入,不仅节省了导入时间,而且节约了存储成本。Obtain the image file to be imported according to the file obtained by decompressing the compressed package containing multiple image files, and then import the image file into the target node in a targeted manner, thereby avoiding the compression of the compressed package containing multiple image files. The overall import not only saves import time, but also saves storage costs.
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in light of the inventive work.
图1(A)是本发明一个实施例提供的一种镜像文件的结构图;FIG. 1(A) is a structural diagram of an image file according to an embodiment of the present invention;
图1(B)是本发明一个实施例提供的一种镜像文件的导入方法的逻辑架构图;FIG. 1(B) is a logical architecture diagram of a method for importing an image file according to an embodiment of the present invention;
图2是本发明另一个实施例所使用的计算机体系结构图;2 is a block diagram of a computer used in another embodiment of the present invention;
图3是本发明另一个实施例提供的一种镜像文件的导入方法流程图;3 is a flowchart of a method for importing an image file according to another embodiment of the present invention;
图4是本发明另一个实施例提供的一种镜像文件的导入方法流程图;4 is a flowchart of a method for importing an image file according to another embodiment of the present invention;
图5是本发明另一个实施例提供的镜像文件导入过程的示意图;FIG. 5 is a schematic diagram of an image file import process according to another embodiment of the present invention; FIG.
图6是本发明另一个实施例提供的镜像文件的结构示意图;FIG. 6 is a schematic structural diagram of an image file according to another embodiment of the present invention;
图7是本发明另一个实施例提供的一种镜像文件的导入装置结构示意图。FIG. 7 is a schematic structural diagram of an apparatus for importing an image file according to another embodiment of the present invention.
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
在计算机领域,镜像是冗余的一种类型,实质上是一个磁盘上的数据在另一个磁盘上的副本。为了节省文件在磁盘上所占用的存储空间,常采用
UltraISO、winISO等镜像文件制作工具,将磁盘上的一系列文件制作成一个镜像文件。镜像文件常见的格式有BIN(Binary,二进制)、DAO(Data Access Object,数据库访问对象)等。当用户需要将磁盘上的多个文件拷贝到另一磁盘上时,用户可直接拷贝多个文件的镜像文件,以节省拷贝、迁移、导入过程的时间。In the computer world, mirroring is a type of redundancy that is essentially a copy of data on one disk on another. In order to save the storage space occupied by files on the disk, it is often used.
UltraISO, winISO and other image file creation tools, a series of files on the disk into an image file. Common formats for image files are BIN (Binary), DAO (Data Access Object), and so on. When users need to copy multiple files on a disk to another disk, users can directly copy the image files of multiple files to save time during copying, migration, and import.
通常镜像文件中的数据存储于多个数据文件中,每个数据文件具有确定的文件ID(Identity,身份标识)和父ID。镜像文件中的多个数据文件呈树形结构,上层数据文件的文件ID为下层数据文件的父ID。在镜像文件的树形结构中,一般将底层数据文件的文件ID称为镜像文件的叶子节点ID,将顶层数据文件的父ID称为镜像文件的根节点ID。如图1(A)所示,节点1上有8个镜像层,构成3个镜像文件,分别为镜像文件A、镜像文件B及镜像文件C。具体地,镜像文件A由镜像层6对应的数据文件、镜像层3对应的数据文件、镜像层2对应的数据文件、镜像层1对应的数据文件构成,镜像文件B由镜像层7对应发的数据文件、镜像层4对应的数据文件、镜像层2对应的数据文件、镜像层1对应的数据文件构成,镜像文件C由镜像层8对应的数据文件、镜像层5对应的数据文件、镜像层2对应的数据文件、镜像层1对应的数据文件构成。在上述图1(A)中,镜像层6对应的数据文件为镜像文件A的镜像叶子,镜像层7对应的数据文件为镜像文件B的镜像叶子,镜像层8对应的数据文件为镜像文件C的镜像叶子;镜像层1对应的数据文件和镜像层2对应的数据文件为镜像文件A、镜像文件B及镜像文件C的公用数据文件。当需要将镜像文件A导入到节点2时,现有技术一般将镜像文件A、镜像文件B及镜像文件C保存成一个压缩包,并将该压缩包导入到节点C。由于采用该种方式在导入镜像文件时,需要对该压缩包整体进行导入,该过程不仅耗时较长,而且增加了节点2的存储成本。Usually the data in the image file is stored in a plurality of data files, each data file having a determined file ID (Identity) and a parent ID. The data files in the image file are in a tree structure, and the file ID of the upper data file is the parent ID of the lower layer data file. In the tree structure of the image file, the file ID of the underlying data file is generally referred to as the leaf node ID of the image file, and the parent ID of the top-level data file is referred to as the root node ID of the image file. As shown in FIG. 1(A), there are eight mirror layers on node 1, which constitute three image files, which are image file A, image file B, and image file C. Specifically, the image file A is composed of a data file corresponding to the mirror layer 6, a data file corresponding to the mirror layer 3, a data file corresponding to the mirror layer 2, and a data file corresponding to the mirror layer 1. The image file B is correspondingly sent by the mirror layer 7. The data file, the data file corresponding to the mirror layer 4, the data file corresponding to the mirror layer 2, and the data file corresponding to the mirror layer 1. The image file C corresponds to the data file corresponding to the mirror layer 8, the data file corresponding to the mirror layer 5, and the mirror layer. 2 Corresponding data file and data file corresponding to mirror layer 1. In the above FIG. 1(A), the data file corresponding to the mirror layer 6 is the mirrored leaf of the image file A, the data file corresponding to the mirror layer 7 is the mirrored leaf of the image file B, and the data file corresponding to the mirror layer 8 is the image file C. The mirrored leaf; the data file corresponding to the mirror layer 1 and the data file corresponding to the mirror layer 2 are the common data files of the image file A, the image file B, and the image file C. When the image file A needs to be imported to the node 2, the prior art generally saves the image file A, the image file B, and the image file C into a compressed package, and imports the compressed package to the node C. In this manner, when the image file is imported, the entire compression package needs to be imported, which is not only time consuming, but also increases the storage cost of the node 2.
为了解决上述问题,本发明实施例提供了一种镜像文件的导入方法。图1(B)示出了本实施例提供的镜像文件的导入方法的逻辑架构图。由图1(B)可知,本实施例通过采用树形化处理模块对包含多个镜像文件的压缩包进行处理,可得到包含所需镜像文件的压缩包。In order to solve the above problem, an embodiment of the present invention provides a method for importing an image file. FIG. 1(B) is a diagram showing the logical architecture of the method for importing an image file provided by this embodiment. As can be seen from FIG. 1(B), in this embodiment, by using a tree processing module to process a compressed package containing a plurality of image files, a compressed package containing the required image file can be obtained.
请参考图2,其示出了本发明的一个实施例中使用的计算机100的说明性计算机体系结构。所述计算机100为常规的台式计算机或者膝上型笔记本,所述计算机100包括中央处理单元(CPU)101、包括随机存取存储器(RAM)102和只读存储器(ROM)103的系统存储器104,以及连接系统存储器104和中央处理单元
101的系统总线105。所述计算机100还包括帮助计算机内的各个器件之间传输信息的基本输入/输出系统(I/O系统)106,和用于存储操作系统、应用程序和其他程序模块的大容量存储设备107。Referring to Figure 2, an illustrative computer architecture of a computer 100 for use in one embodiment of the present invention is shown. The computer 100 is a conventional desktop computer or laptop notebook, and the computer 100 includes a central processing unit (CPU) 101, a system memory 104 including a random access memory (RAM) 102 and a read only memory (ROM) 103, And connecting the system memory 104 and the central processing unit
System bus 105 of 101. The computer 100 also includes a basic input/output system (I/O system) 106 that facilitates the transfer of information between various devices within the computer, and a mass storage device 107 for storing operating systems, applications, and other program modules.
在本实施例中,中央处理单元101用于执行以下指令:In this embodiment, the central processing unit 101 is configured to execute the following instructions:
对包含多个镜像文件的压缩包进行解压缩,得到第一描述文件和多个数据文件,该第一描述文件用于存储镜像文件名称与叶子节点身份标识ID之间的对应关系,每个镜像文件的文件数据存储于至少一个数据文件中;The compressed package containing multiple image files is decompressed to obtain a first description file and a plurality of data files, where the first description file is used to store a correspondence between the image file name and the leaf node identity ID, and each image is mirrored. The file data of the file is stored in at least one data file;
根据第一描述文件和多个数据文件,获取目标数据文件,目标数据文件中存储了待导入的目标镜像文件的文件数据;Obtaining a target data file according to the first description file and the plurality of data files, where the target data file stores file data of the target image file to be imported;
根据目标数据文件,生成目标镜像文件的压缩包;Generating a compressed package of the target image file according to the target data file;
将目标镜像文件的压缩包导入到目标节点。Import the compressed package of the target image file to the target node.
在本发明的另一个实施例中,中央处理单元101在根据第一描述文件和多个数据文件,获取目标数据文件时,具体包括:In another embodiment of the present invention, the central processing unit 101, when acquiring the target data file according to the first description file and the plurality of data files, specifically includes:
从多个数据文件中读取每个数据文件的文件ID及父ID;Read the file ID and parent ID of each data file from multiple data files;
从第一描述文件中获取目标镜像文件的叶子节点ID;Obtaining a leaf node ID of the target image file from the first description file;
根据叶子节点ID与多个数据文件的文件ID及父ID,获取目标数据文件。The target data file is obtained based on the leaf node ID and the file ID and parent ID of the plurality of data files.
在本发明的另一个实施例中,每个数据文件中至少包括第二描述文件,第二描述文件用于按照预设存储格式存储数据文件的文件ID及父ID;In another embodiment of the present invention, each data file includes at least a second description file, where the second description file is used to store the file ID and the parent ID of the data file according to the preset storage format;
中央处理单元101在从多个数据文件中读取每个数据文件的文件ID及父ID时,具体包括:The central processing unit 101, when reading the file ID and the parent ID of each data file from the plurality of data files, specifically includes:
从每个数据文件对应的第二描述文件中读取每个数据文件的文件ID及父ID。The file ID and parent ID of each data file are read from the second description file corresponding to each data file.
在本发明的另一个实施例中,中央处理单元101在从第一描述文件中获取目标镜像文件的叶子节点ID时,具体包括:In another embodiment of the present invention, when the central processing unit 101 obtains the leaf node ID of the target image file from the first description file, the method includes:
根据目标镜像文件的镜像文件名称,从第一描述文件存储的镜像文件名称与叶子节点ID之间的对应关系中,获取目标镜像文件的镜像文件名称对应的叶子节点ID。The leaf node ID corresponding to the image file name of the target image file is obtained from the mapping between the image file name and the leaf node ID stored in the first description file according to the image file name of the target image file.
在本发明的另一个实施例中,中央处理单元101在根据叶子节点ID与多个数据文件的文件ID及父ID,获取目标数据文件时,具体包括:In another embodiment of the present invention, the central processing unit 101, when acquiring the target data file according to the leaf node ID and the file ID and the parent ID of the plurality of data files, specifically includes:
以叶子节点ID为起始文件ID,从多个数据文件的文件ID及父ID中,获取叶子节点ID的父ID;
The leaf ID is used as the starting file ID, and the parent ID of the leaf node ID is obtained from the file ID and the parent ID of the plurality of data files;
以叶子节点ID的父ID为文件ID,循环遍历所有数据文件的文件ID及父ID,直至获取到目标镜像文件的根节点ID;The parent ID of the leaf node ID is the file ID, and the file ID and the parent ID of all the data files are traversed until the root node ID of the target image file is obtained;
将叶子节点ID所在的数据文件与根节点ID所在的数据文件之间的全部数据文件作为目标数据文件。All data files between the data file where the leaf node ID is located and the data file where the root node ID is located are taken as the target data file.
在本发明的另一个实施例中,中央处理单元101在根据目标数据文件,生成目标镜像文件的压缩包时,具体包括:In another embodiment of the present invention, the central processing unit 101, when generating the compressed package of the target image file according to the target data file, specifically includes:
根据第一描述文件中存储的目标镜像文件的镜像文件名称与叶子节点ID之间的对应关系,生成目标描述文件;Generating a target description file according to a correspondence between an image file name of the target image file and the leaf node ID stored in the first description file;
按照特定格式对目标数据文件以及目标描述文件进行压缩,得到目标镜像文件的压缩包。The target data file and the target description file are compressed according to a specific format to obtain a compressed package of the target image file.
所述基本输入/输出系统106包括有用于显示信息的显示器108和用于用户输入信息的诸如鼠标、键盘之类的输入设备109。其中所述显示器108和输入设备109都通过连接到系统总线105的输入输出控制器110连接到中央处理单101。所述基本输入/输出系统106还可以包括输入输出控制器110以用于接收和处理来自键盘、鼠标、或电子触控笔等多个其他设备的输入。类似地,输入输出控制器110还提供输出到显示屏、打印机或其他类型的输出设备。The basic input/output system 106 includes a display 108 for displaying information and an input device 109 such as a mouse or keyboard for user input of information. The display 108 and input device 109 are both connected to the central processing unit 101 via an input and output controller 110 that is coupled to the system bus 105. The basic input/output system 106 can also include an input output controller 110 for receiving and processing input from a plurality of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input and output controller 110 also provides output to a display screen, printer, or other type of output device.
所述大容量存储设备107通过连接到系统总线105的大容量存储控制器(未示出)连接到中央处理单元101。所述大容量存储设备107及其相关联的计算机可读介质为计算机100提供非易失性存储。也就是说,所述大容量存储设备107可以包括诸如硬盘或者CD-ROM驱动器之类的计算机可读介质(未示出)。The mass storage device 107 is connected to the central processing unit 101 by a mass storage controller (not shown) connected to the system bus 105. The mass storage device 107 and its associated computer readable medium provide non-volatile storage for the computer 100. That is, the mass storage device 107 can include a computer readable medium (not shown) such as a hard disk or a CD-ROM drive.
不失一般性,所述计算机可读介质可以包括计算机存储介质和通信介质。计算机存储介质包括以用于存储诸如计算机可读指令、数据结构、程序模块或其他数据等信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动介质。计算机存储介质包括RAM、ROM、EPROM、EEPROM、闪存或其他固态存储其技术,CD-ROM、DVD或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。当然,本领域技术人员可知所述计算机存储介质不局限于上述几种。Without loss of generality, the computer readable medium can include computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, EPROM, EEPROM, flash memory or other solid state storage technologies, CD-ROM, DVD or other optical storage, tape cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage medium is not limited to the above.
根据本发明的各种实施例,所述计算机100还可以通过诸如因特网等网络连接到网络上的远程计算机运行。也即计算机100可以通过连接在所述系统总线105上的网络接口单元111连接到网络112,或者说,也可以使用网络接口单元111来连接到其他类型的网络或远程计算机系统(未示出)。According to various embodiments of the invention, the computer 100 may also be operated by a remote computer connected to the network via a network such as the Internet. That is, the computer 100 can be connected to the network 112 through a network interface unit 111 connected to the system bus 105, or can be connected to other types of networks or remote computer systems (not shown) using the network interface unit 111. .
本发明实施例提供的计算机,根据对包含多个镜像文件的压缩包解压缩后得
到的文件,获取待导入的镜像文件,进而将该镜像文件有针对性地导入到目标节点,避免了对包含多个镜像文件的压缩包进行整体导入,不仅节省了导入时间,而且节约了存储成本。The computer provided by the embodiment of the present invention is decompressed according to a compression package that includes multiple image files.
The obtained file obtains the image file to be imported, and then the image file is specifically imported to the target node, thereby avoiding the overall import of the compressed package containing multiple image files, which not only saves the import time but also saves the storage. cost.
本发明实施例提供了一种镜像文件的导入方法,参见图3,本实施例提供的方法流程包括:The embodiment of the present invention provides a method for importing an image file. Referring to FIG. 3, the method process provided by this embodiment includes:
301、对包含多个镜像文件的压缩包进行解压缩,得到第一描述文件和多个数据文件,该第一描述文件用于存储镜像文件名称与叶子节点身份标识ID之间的对应关系,每个镜像文件的文件数据存储于至少一个数据文件中。301. Decompress a compressed package that includes multiple image files to obtain a first description file and multiple data files, where the first description file is used to store a correspondence between an image file name and a leaf node identity ID. The file data of the image files is stored in at least one data file.
302、根据第一描述文件和多个数据文件,获取目标数据文件,目标数据文件中存储了待导入的目标镜像文件的文件数据。302. Obtain a target data file according to the first description file and the multiple data files, where the target data file stores file data of the target image file to be imported.
303、根据目标数据文件,生成目标镜像文件的压缩包。303. Generate a compressed package of the target image file according to the target data file.
304、将目标镜像文件的压缩包导入到目标节点。304. Import the compressed package of the target image file to the target node.
本发明实施例提供的方法,根据对包含多个镜像文件的压缩包解压缩后得到的文件,获取待导入的镜像文件,进而将该镜像文件有针对性地导入到目标节点,避免了对包含多个镜像文件的压缩包进行整体导入,不仅节省了导入时间,而且节约了存储成本。The method provided by the embodiment of the present invention obtains the image file to be imported according to the file obtained by decompressing the compressed package containing multiple image files, and then the image file is specifically imported to the target node, thereby avoiding the inclusion of the image file. The overall import of multiple image file compression packages not only saves import time, but also saves storage costs.
在本发明的另一个实施例中,根据第一描述文件和多个数据文件,获取目标数据文件,包括:In another embodiment of the present invention, acquiring the target data file according to the first description file and the plurality of data files includes:
从多个数据文件中读取每个数据文件的文件ID及父ID;Read the file ID and parent ID of each data file from multiple data files;
从第一描述文件中获取目标镜像文件的叶子节点ID;Obtaining a leaf node ID of the target image file from the first description file;
根据叶子节点ID与多个数据文件的文件ID及父ID,获取目标数据文件。The target data file is obtained based on the leaf node ID and the file ID and parent ID of the plurality of data files.
在本发明的另一个实施例中,每个数据文件中至少包括第二描述文件,第二描述文件用于按照预设存储格式存储数据文件的文件ID及父ID;In another embodiment of the present invention, each data file includes at least a second description file, where the second description file is used to store the file ID and the parent ID of the data file according to the preset storage format;
从多个数据文件中读取每个数据文件的文件ID及父ID,包括:Read the file ID and parent ID of each data file from multiple data files, including:
从每个数据文件对应的第二描述文件中读取每个数据文件的文件ID及父ID。The file ID and parent ID of each data file are read from the second description file corresponding to each data file.
在本发明的另一个实施例中,从第一描述文件中获取目标镜像文件的叶子节点ID,包括:In another embodiment of the present invention, obtaining the leaf node ID of the target image file from the first description file includes:
根据目标镜像文件的镜像文件名称,从第一描述文件存储的镜像文件名称与叶子节点ID之间的对应关系中,获取目标镜像文件的镜像文件名称对应的叶
子节点ID。The leaf corresponding to the image file name of the target image file is obtained from the correspondence between the image file name and the leaf node ID stored in the first description file according to the image file name of the target image file.
Child node ID.
在本发明的另一个实施例中,根据叶子节点ID与多个数据文件的文件ID及父ID,获取目标数据文件,包括:In another embodiment of the present invention, the target data file is obtained according to the leaf node ID and the file ID and the parent ID of the plurality of data files, including:
以叶子节点ID为起始文件ID,从多个数据文件的文件ID及父ID中,获取叶子节点ID的父ID;The leaf ID is used as the starting file ID, and the parent ID of the leaf node ID is obtained from the file ID and the parent ID of the plurality of data files;
以叶子节点ID的父ID为文件ID,循环遍历所有数据文件的文件ID及父ID,直至获取到目标镜像文件的根节点ID;The parent ID of the leaf node ID is the file ID, and the file ID and the parent ID of all the data files are traversed until the root node ID of the target image file is obtained;
将叶子节点ID所在的数据文件与根节点ID所在的数据文件之间的全部数据文件作为目标数据文件。All data files between the data file where the leaf node ID is located and the data file where the root node ID is located are taken as the target data file.
在本发明的另一个实施例中,根据目标数据文件,生成目标镜像文件的压缩包,包括:In another embodiment of the present invention, the compressed package of the target image file is generated according to the target data file, including:
根据第一描述文件中存储的目标镜像文件的镜像文件名称与叶子节点ID之间的对应关系,生成目标描述文件;Generating a target description file according to a correspondence between an image file name of the target image file and the leaf node ID stored in the first description file;
按照特定格式对目标数据文件以及目标描述文件进行压缩,得到目标镜像文件的压缩包。The target data file and the target description file are compressed according to a specific format to obtain a compressed package of the target image file.
上述所有可选技术方案,可以采用任意结合形成本发明的可选实施例,在此不再一一赘述。All of the above optional technical solutions may be used in any combination to form an optional embodiment of the present invention, and will not be further described herein.
本发明实施例提供了一种镜像文件的导入方法,该方法以Docker环境下计算机中的任一节点或计算机系统中的任一计算机执行本发明为例,参见图4,本实施例提供的方法流程包括:The embodiment of the present invention provides a method for importing an image file, which is an example of any one of the nodes in the computer or the computer system in the Docker environment. Referring to FIG. 4, the method provided in this embodiment is provided. The process includes:
401、对包含多个镜像文件的压缩包进行解压缩,得到第一描述文件和多个数据文件。401. Decompress a compressed package that includes multiple image files to obtain a first description file and multiple data files.
在计算机领域,为了节省存储空间,通常会将节点上的多个镜像文件保存成一个指定压缩包。在将节点上的任一镜像文件导入到另一节点上时,可采用解压缩软件对该压缩包进行解压缩,该过程可得到第一描述文件和多个数据文件。In the computer field, in order to save storage space, multiple image files on a node are usually saved as a specified compressed package. When any image file on the node is imported to another node, the compressed package can be decompressed by using decompression software, which can obtain the first description file and multiple data files.
其中,第一描述文件一般为Json文件,可用于存储压缩包中所包含的多个镜像文件的镜像文件名称与叶子节点之间的对应关系、以及每个镜像文件的创建时间等其他信息。Json文件的格式一般为:“镜像文件”:{“tag”:“叶子节点ID”}。其中,tag表征镜像文件的创建时间等其他信息。
The first description file is generally a Json file, and can be used for storing the correspondence between the image file name of the plurality of image files included in the compressed package and the leaf nodes, and the creation time of each image file. The format of the Json file is generally: "image file": {"tag": "leaf node ID"}. Among them, the tag characterizes other information such as the creation time of the image file.
例1,如果指定压缩包中包含两个镜像文件,且这两个镜像文件的镜像名称分别为nginx和busybox,则第一描述文件格式如下:Example 1, if the specified compressed package contains two image files, and the mirror names of the two image files are nginx and busybox respectively, the first description file format is as follows:
{{
“nginx”:{“latest”:“a785ba7493fd9009be710230457f334486b11a45f7e830652d39665a451”}"nginx": {"latest": "a785ba7493fd9009be710230457f334486b11a45f7e830652d39665a451"}
“busybox”:{“latest”:“b785ba7493fd9009be7102790697f334486b17e830652d39665a4522”}"busybox": {"latest": "b785ba7493fd9009be7102790697f334486b17e830652d39665a4522"}
}}
由上述例1可知,镜像名称nginx对应的镜像文件的创建时间为“latest”,该镜像文件对应的叶子节点ID为:As shown in the above example 1, the creation time of the image file corresponding to the image name nginx is "latest", and the leaf node ID corresponding to the image file is:
“a785ba7493fd9009be710230457f334486b11a45f7e830652d39665a451”;"a785ba7493fd9009be710230457f334486b11a45f7e830652d39665a451";
镜像名称busybox对应的镜像文件的创建时间为“latest”,该镜像文件对应的叶子节点ID为:The creation time of the mirror file corresponding to the mirror name is "latest". The leaf node ID corresponding to the image file is:
“b785ba7493fd9009be7102790697f334486b17e830652d39665a4522”。"b785ba7493fd9009be7102790697f334486b17e830652d39665a4522".
其中,对压缩包进行解压缩得到的数据文件的个数与镜像层的个数相同,如果压缩包包括6个镜像层,则解压缩后得到的数据文件为6个,每个数据文件对应树形存储结构一个镜像层,可用于存储镜像文件的部分或全部文件数据,也即是每个镜像文件的文件数据存储于至少一个数据文件中。通常数据文件中包括两个文件,一个文件为第二描述文件,另一个文件为Layer.tar文件。其中,Layer.tar文件用于存储了数据文件的操作数据。第二描述文件为一个Json文件,用于按照预设存储格式存储数据文件的文件ID及父ID、创建时间等信息。在计算机领域,通常将第二描述文件中所存储的数据称为元数据,将Layer.tar文件中所存储的数据称为层数据,也即是,每个数据文件由元数据及层数据构成。具体地,数据文件的数据结构如下述表1所示。The number of data files obtained by decompressing the compressed packet is the same as the number of mirrored layers. If the compressed packet includes six mirroring layers, the number of data files obtained after decompression is six, and each data file corresponds to a tree. The storage structure is a mirror layer that can be used to store some or all of the file data of the image file, that is, the file data of each image file is stored in at least one data file. Usually the data file includes two files, one file is the second description file, and the other file is the Layer.tar file. Among them, the Layer.tar file is used to store the operation data of the data file. The second description file is a Json file for storing the file ID and the parent ID, the creation time, and the like of the data file according to the preset storage format. In the field of computers, the data stored in the second description file is generally referred to as metadata, and the data stored in the Layer.tar file is referred to as layer data, that is, each data file is composed of metadata and layer data. . Specifically, the data structure of the data file is as shown in Table 1 below.
表1Table 1
为了更全面地描述数据文件,数据文件中还包括一个VERSION文件,该
VERSION文件可用于描述Layer.tar文件中操作数据的版本号。In order to describe the data file more comprehensively, the data file also includes a VERSION file, which
The VERSION file can be used to describe the version number of the operational data in the Layer.tar file.
另外,由于压缩包所包含的镜像文件中的文件数据通常采用树形结构分层存储在不同的数据文件中,因而为了便于后续获取到待导入的目标镜像文件的数据文件,本实施例在解析压缩包的过程中,可采用表格等形式保存所有数据文件的文件ID与父ID之间的对应关系。具体存储时,可将解析后的数据文件的文件ID与父ID采用如下表2的方式进行存储。In addition, since the file data in the image file included in the compressed package is stored in different data files in a tree structure, the present embodiment is parsed in order to facilitate subsequent acquisition of the data file of the target image file to be imported. In the process of compressing the package, the correspondence between the file ID of all the data files and the parent ID may be saved in the form of a table or the like. For specific storage, the file ID and parent ID of the parsed data file may be stored as shown in Table 2 below.
表2Table 2
文件IDFile ID | 父IDParent ID |
10011001 | NULLNULL |
10021002 | 10011001 |
10031003 | 10021002 |
10041004 | 10021002 |
402、从多个数据文件中读取每个数据文件的文件ID及父ID。402. Read a file ID and a parent ID of each data file from a plurality of data files.
由于解压缩得到的每个数据文件中均包含一个第二描述文件,该第二描述文件中按照预设存储格式存储了数据文件的文件ID及父ID,因此,根据预设存储格式,从第二描述文件中读取每个数据文件的文件ID及父ID。Each data file obtained by decompression includes a second description file, and the second description file stores the file ID and the parent ID of the data file according to a preset storage format, and therefore, according to the preset storage format, from the first The file ID and parent ID of each data file are read in the second description file.
例2,第二描述文件的格式如下:Example 2, the format of the second description file is as follows:
则根据该第二描述文件的存储格式,可从第二描述文件中获取该数据文件的文件ID为:According to the storage format of the second description file, the file ID of the data file can be obtained from the second description file:
“1f1cfc8b4072488196bdf2c7638a50940849cca3d36fle35141e82edb0a41789”,
父ID为:"1f1cfc8b4072488196bdf2c7638a50940849cca3d36fle35141e82edb0a41789",
The parent ID is:
“3ec5f57e729cb2f888889bfe90498a49370cf68461ea6913f0cda191f629d738”。"3ec5f57e729cb2f888889bfe90498a49370cf68461ea6913f0cda191f629d738".
403、从第一描述文件中获取目标镜像文件的叶子节点ID。403. Obtain a leaf node ID of the target image file from the first description file.
基于第一描述文件中所存储的镜像文件名称与叶子节点ID之间的对应关系,当获取到待导入的目标镜像文件的镜像文件名称后,可根据该目标镜像文件的镜像文件名称,从第一描述文件所存储的镜像文件名称与叶子节点ID之间的对应关系中,获取该目标镜像文件的镜像名称对应的叶子节点。Based on the correspondence between the image file name and the leaf node ID stored in the first description file, after obtaining the image file name of the target image file to be imported, according to the image file name of the target image file, In the correspondence between the image file name and the leaf node ID stored in the description file, the leaf node corresponding to the mirror name of the target image file is obtained.
仍以上述例1为例,如果待导入的目标镜像文件的镜像文件名称为busybox,则可获取到镜像文件名称busybox对应的叶子节点ID为:If the image file name of the target image file to be imported is busybox, the leaf node ID corresponding to the image file name busybox is obtained as follows:
“b785ba7493fd9009be7102790697f334486b17e830652d39665a4522”。"b785ba7493fd9009be7102790697f334486b17e830652d39665a4522".
404、根据叶子节点ID与多个数据文件的文件ID及父ID,获取目标数据文件。404. Acquire a target data file according to the leaf node ID and the file ID and the parent ID of the plurality of data files.
通常镜像文件由叶子节点ID所在的数据文件与根节点ID所在的数据文件之间多个数据文件构成,这些数据文件呈树形结构,叶子节点ID所在的数据文件构成了镜像文件的底层数据文件,根节点ID所在的数据文件构成了镜像文件的顶层数据文件,基于多个数据文件的文件ID及父ID,可根据叶子节点ID逐步获取到根节点ID。Generally, the image file is composed of a plurality of data files between the data file where the leaf node ID is located and the data file where the root node ID is located. The data files are in a tree structure, and the data file where the leaf node ID is located constitutes the underlying data file of the image file. The data file where the root node ID is located constitutes the top-level data file of the image file. Based on the file ID and parent ID of the multiple data files, the root node ID can be obtained step by step according to the leaf node ID.
在本实施例中,当获取到叶子节点ID及多个数据文件的文件ID及父ID,可以叶子节点ID为起始文件ID,从多个数据文件的文件ID及父ID中,获取叶子节点ID的父ID,再以该叶子节点ID的父ID为文件ID,循环遍历所有数据文件的文件ID及父ID,直至获取到目标镜像文件的根节点ID,进而将叶子节点ID所在的数据文件与根节点ID所在的数据文件之间的全部数据文件作为目标数据文件,该目标数据文件中存储了目标镜像文件的文件数据。In this embodiment, when the leaf node ID and the file ID and the parent ID of the plurality of data files are obtained, the leaf node ID may be the starting file ID, and the leaf node is obtained from the file ID and the parent ID of the plurality of data files. The parent ID of the ID, and then the parent ID of the leaf node ID is the file ID, looping through the file ID and parent ID of all data files until the root node ID of the target image file is obtained, and then the data file of the leaf node ID is located. The entire data file between the data file and the data file where the root node ID is located is used as the target data file, and the file data of the target image file is stored in the target data file.
针对上述根据叶子节点ID与多个数据文件的文件ID及父ID,获取目标数据文件的过程,为了便于理解,下面将以上述表2所存储的数据文件的文件ID及父ID为例进行说明。For the above process of obtaining the target data file according to the leaf node ID and the file ID and the parent ID of the plurality of data files, for the sake of easy understanding, the file ID and the parent ID of the data file stored in the above Table 2 are taken as an example for description. .
例如,叶子节点ID为1004,由表2可知,叶子节点ID1004的父ID为1002,以父ID1002为文件ID,文件ID1002的父ID为1001,以父ID1001为文件ID,文件ID1001的父ID为NULL,该NULL为镜像文件的根节点ID,之后将叶子节点ID1004所在的数据文件、文件节点ID1002所在的数据文件、文件节点ID1001所在的数据文件作为目标数据文件。该目标数据文件的结构为叶子节点ID1004
所在的数据文件>文件节点ID1002所在的数据文件>文件节点ID1001。For example, the leaf node ID is 1004. As shown in Table 2, the parent ID of the leaf node ID 1004 is 1002, the parent ID 1002 is the file ID, the parent ID of the file ID 1002 is 1001, the parent ID 1001 is the file ID, and the parent ID of the file ID 1001 is NULL, the NULL is the root node ID of the image file, and then the data file where the leaf node ID 1004 is located, the data file where the file node ID 1002 is located, and the data file where the file node ID 1001 is located are used as the target data file. The structure of the target data file is leaf node ID1004
Data file > File data ID1002 where the file is located > File node ID1001.
405、根据目标数据文件,生成目标镜像文件的压缩包。405. Generate a compressed package of the target image file according to the target data file.
在根据目标数据文件,生成目标镜像文件的压缩包时,可采用如下(1)~(2):When generating a compressed package of the target image file according to the target data file, the following (1) to (2) can be used:
(1)、根据第一描述文件中存储的镜像文件名称与叶子节点ID之间的对应关系,生成目标描述文件。(1) Generating a target description file according to a correspondence between an image file name stored in the first description file and a leaf node ID.
基于第一描述文件中所存储的镜像文件名称与叶子节点ID之间的对应关系,可获取到目标镜像文件的镜像文件名称对应的叶子节点ID,进而将获取到的目标镜像文件的镜像文件名称对应的叶子节点ID单独存储在一个Json文件中,得到目标描述文件。The leaf node ID corresponding to the image file name of the target image file may be obtained based on the correspondence between the image file name and the leaf node ID stored in the first description file, and the image file name of the obtained target image file is obtained. The corresponding leaf node IDs are stored separately in a Json file to obtain the target description file.
(2)、按照特定格式对目标数据文件以及目标描述文件进行压缩,得到目标镜像文件的压缩包。(2) Compressing the target data file and the target description file according to a specific format to obtain a compressed package of the target image file.
其中,特定格式可以为镜像文件压缩包中数据的存储格式。基于特定存储格式,通过将目标数据文件以及目标描述文件进行压缩,可得到目标镜像文件的压缩包,此时目标镜像文件的压缩包中包含的数据有目标数据文件的元数据、层数据及目标描述文件中的数据。The specific format may be a storage format of data in the image file compression package. Based on the specific storage format, the target data file and the target description file are compressed, and the compressed package of the target image file is obtained. At this time, the data contained in the compressed package of the target image file has the metadata, layer data, and target of the target data file. Describe the data in the file.
406、将目标镜像文件的压缩包导入到目标节点。406. Import the compressed package of the target image file to the target node.
其中,目标节点可以为计算机中的任一节点,还可以为计算机系统中另一计算机,本实施例不对目标节点作具体的限定。当得到目标镜像文件的压缩包后,通过执行加载操作将该压缩包导入到目标节点上。由于该压缩包中仅存储了目标镜像文件对应的数据文件及描述文件,因而不仅减少了导入过程的时间消耗,而且减少了目标节点存储目标镜像文件的存储成本。The target node may be any node in the computer, and may be another computer in the computer system. In this embodiment, the target node is not specifically limited. After obtaining the compressed package of the target image file, the compressed package is imported to the target node by performing a load operation. Since only the data file and the description file corresponding to the target image file are stored in the compressed package, not only the time consumption of the import process is reduced, but also the storage cost of the target node storage target image file is reduced.
针对上述镜像文件导入的整个过程,下面将以图5为例进行详述。For the entire process of importing the above image file, the following will be described in detail with reference to FIG. 5.
参见图5,在将指定镜像文件从一个节点导入到另一个节点上的过程中,需要先在第一节点上对包含制定镜像文件的压缩包进行解压缩,得到第一描述文件及多个数据文件。之后,从每个数据文件所包含的第二描述文件中读取每个数据文件的文件ID及父ID,并从第一描述文件所存储的镜像文件名称与叶子节点ID之间的对应关系中,获取指定镜像文件名称对应的叶子节点ID,进而根据该叶子节点ID及每个数据文件的文件ID及父ID,获取到指定镜像文件对应的所有数据文件。当采用特定格式对指定镜像文件对应的所有数据文件及该指定镜像文件的描述文件进行压缩,可得到指定镜像文件的压缩包。最后通
过加载操作将该指定镜像文件的压缩包导入到另一节点上。Referring to FIG. 5, in the process of importing a specified image file from one node to another, the compressed package containing the image file needs to be decompressed on the first node to obtain the first description file and multiple data. file. After that, the file ID and the parent ID of each data file are read from the second description file included in each data file, and the correspondence between the image file name and the leaf node ID stored in the first description file is The leaf node ID corresponding to the name of the specified image file is obtained, and all the data files corresponding to the specified image file are obtained according to the leaf node ID and the file ID and the parent ID of each data file. When all the data files corresponding to the specified image file and the description file of the specified image file are compressed in a specific format, the compressed package of the specified image file can be obtained. Last pass
The overload operation imports the compressed package of the specified image file onto another node.
基于上述图5所示的镜像文件的导入过程图,下面将以一个具体例子进行说明。Based on the import process diagram of the image file shown in FIG. 5 above, a specific example will be described below.
参见图6,对包含多个镜像文件的压缩包进行解压缩,可得到第一描述文件及6个数据文件,6个数据文件对应6个镜像层,分别为文件ID为1001(父ID为NULL)的数据文件、文件ID为1002(父ID为1001)的数据文件、文件ID为1003(父ID为1002)的数据文件、文件ID为1004(父ID为1003)的数据文件、文件ID为1005(父ID为1002)的数据文件、文件ID为1006(父ID为1005)的数据文件。根据第一描述文件,可获取到镜像文件A对应的叶子节点ID为1004,镜像文件B对应的叶子节点ID为1005。Referring to FIG. 6, the compressed file containing multiple image files is decompressed, and the first description file and the six data files are obtained. The six data files correspond to six mirror layers, and the file ID is 1001 (the parent ID is NULL). Data file, data file with file ID 1002 (parent ID 1001), data file with file ID 1003 (parent ID 1002), data file with file ID 1004 (parent ID 1003), file ID is A data file of 1005 (parent ID is 1002) and a data file with a file ID of 1006 (parent ID is 1005). According to the first description file, the leaf node ID corresponding to the image file A is 1004, and the leaf node ID corresponding to the image file B is 1005.
如果需要将镜像文件A导入到目标节点,则可根据镜像文件A对应的叶子节点ID1004,获取叶子节点ID1004的父ID1003,以叶子节点ID1004的父ID1003为文件ID,获取文件ID1003的父ID1002,再以父ID1002为文件ID,获取文件ID1002的父ID1001,以父ID1001为文件ID,获取到文件ID1001的父ID为NULL,该父节点ID NULL为根节点ID,基于所获取的文件ID,可获取到镜像文件A对应的目标数据文件为:文件ID1004所在的数据文件>文件ID1003所在的数据文件>文件ID1002所在的数据文件>文件ID1001所在的数据文件。之后,根据第一描述文件中存储的镜像文件名称与叶子节点之间的对应关系,获取镜像文件A与叶子节点ID1004之间的对应关系,并基于该对应关系生成目标描述文件。通过采用特定格式对文件ID1004所在的数据文件、文件ID1003所在的数据文件、文件ID1002所在的数据文件、文件ID1001所在的数据文件及目标描述文件进行压缩,可得到镜像文件A对应的压缩包。最后通过加载操作将镜像文件A对应的压缩包导入到目标节点。If the image file A needs to be imported to the target node, the parent ID 1003 of the leaf node ID 1004 is obtained according to the leaf node ID 1004 corresponding to the image file A, and the parent ID 1003 of the leaf node ID 1004 is used as the file ID to obtain the parent ID 1002 of the file ID 1003. The parent ID 1002 is used as the file ID, the parent ID 1001 of the file ID 1002 is obtained, and the parent ID 1001 is used as the file ID, and the parent ID of the file ID 1001 is obtained as NULL, and the parent node ID NULL is the root node ID, which is obtained based on the obtained file ID. The target data file corresponding to the image file A is: the data file where the file ID 1004 is located > the data file where the file ID 1003 is located > the data file where the file ID 1002 is located > the data file where the file ID 1001 is located. Then, according to the correspondence between the image file name and the leaf node stored in the first description file, the correspondence between the image file A and the leaf node ID 1004 is obtained, and the target description file is generated based on the correspondence. The compressed file corresponding to the image file A can be obtained by compressing the data file in which the file ID 1004 is located, the data file in which the file ID 1003 is located, the data file in which the file ID 1002 is located, the data file in which the file ID 1001 is located, and the target description file in a specific format. Finally, the compression package corresponding to the image file A is imported to the target node by a loading operation.
本发明实施例提供的方法,根据对包含多个镜像文件的压缩包解压缩后得到的文件,获取待导入的镜像文件,进而将该镜像文件有针对性地导入到目标节点,避免了对包含多个镜像文件的压缩包进行整体导入,不仅节省了导入时间,而且节约了存储成本。The method provided by the embodiment of the present invention obtains the image file to be imported according to the file obtained by decompressing the compressed package containing multiple image files, and then the image file is specifically imported to the target node, thereby avoiding the inclusion of the image file. The overall import of multiple image file compression packages not only saves import time, but also saves storage costs.
参见图7,本发明实施例提供了一种镜像文件的导入装置,该装置包括:Referring to FIG. 7, an embodiment of the present invention provides an apparatus for importing an image file, where the apparatus includes:
解压缩模块701,用于对包含多个镜像文件的压缩包进行解压缩,得到第一描述文件和多个数据文件,该第一描述文件用于存储镜像文件名称与叶子节
点身份标识ID之间的对应关系,每个镜像文件的文件数据存储于至少一个数据文件中;The decompression module 701 is configured to decompress a compressed package that includes multiple image files to obtain a first description file and multiple data files, where the first description file is used to store the image file name and the leaf segment.
Point mapping identifier ID, the file data of each image file is stored in at least one data file;
获取模块702,用于根据第一描述文件和多个数据文件,获取目标数据文件,目标数据文件中存储了待导入的目标镜像文件的文件数据;The obtaining module 702 is configured to obtain a target data file according to the first description file and the plurality of data files, where the file data of the target image file to be imported is stored in the target data file;
生成模块703,用于根据目标数据文件,生成目标镜像文件的压缩包;a generating module 703, configured to generate a compressed package of the target image file according to the target data file;
导入模块704,用于将目标镜像文件的压缩包导入到目标节点。The import module 704 is configured to import the compressed package of the target image file to the target node.
在本发明的另一个实施例中,获取模块702,用于从多个数据文件中读取每个数据文件的文件ID及父ID;从第一描述文件中获取目标镜像文件的叶子节点ID;根据叶子节点ID与多个数据文件的文件ID及父ID,获取目标数据文件。In another embodiment of the present invention, the obtaining module 702 is configured to read a file ID and a parent ID of each data file from a plurality of data files, and obtain a leaf node ID of the target image file from the first description file; The target data file is obtained based on the leaf node ID and the file ID and parent ID of the plurality of data files.
在本发明的另一个实施例中,每个数据文件中至少包括第二描述文件,第二描述文件用于按照预设存储格式存储数据文件的文件ID及父ID;In another embodiment of the present invention, each data file includes at least a second description file, where the second description file is used to store the file ID and the parent ID of the data file according to the preset storage format;
获取模块702,具体用于从每个数据文件对应的第二描述文件中读取每个数据文件的文件ID及父ID。The obtaining module 702 is specifically configured to read the file ID and the parent ID of each data file from the second description file corresponding to each data file.
在本发明的另一个实施例中,获取模块702,具体用于根据目标镜像文件的镜像文件名称,从第一描述文件存储的镜像文件名称与叶子节点ID之间的对应关系中,获取目标镜像文件的镜像文件名称对应的叶子节点ID。In another embodiment of the present invention, the obtaining module 702 is specifically configured to obtain the target image from the correspondence between the image file name and the leaf node ID stored in the first description file according to the image file name of the target image file. The leaf node ID corresponding to the image file name of the file.
在本发明的另一个实施例中,获取模块702,具体用于以叶子节点ID为起始文件ID,从多个数据文件的文件ID及父ID中,获取叶子节点ID的父ID;以叶子节点ID的父ID为文件ID,循环遍历所有数据文件的文件ID及父ID,直至获取到目标镜像文件的根节点ID;将叶子节点ID所在的数据文件与根节点ID所在的数据文件之间的全部数据文件作为目标数据文件。In another embodiment of the present invention, the obtaining module 702 is specifically configured to obtain the parent ID of the leaf node ID from the file ID and the parent ID of the plurality of data files by using the leaf node ID as the starting file ID; The parent ID of the node ID is the file ID. It loops through the file ID and parent ID of all data files until the root node ID of the target image file is obtained. The data file where the leaf node ID is located and the data file where the root node ID is located All data files are used as target data files.
在本发明的另一个实施例中,生成模块703,具体用于根据第一描述文件中存储的目标镜像文件的镜像文件名称与叶子节点ID之间的对应关系,生成目标描述文件;按照特定格式对目标数据文件以及目标描述文件进行压缩,得到目标镜像文件的压缩包。In another embodiment of the present invention, the generating module 703 is specifically configured to generate a target description file according to a correspondence between an image file name of the target image file and the leaf node ID stored in the first description file; The target data file and the target description file are compressed to obtain a compressed package of the target image file.
综上所述,本发明实施例提供的装置,根据对包含多个镜像文件的压缩包解压缩后得到的文件,获取待导入的镜像文件,进而将该镜像文件有针对性地导入到目标节点,避免了对包含多个镜像文件的压缩包进行整体导入,不仅节省了导入时间,而且节约了存储成本。
In summary, the device provided by the embodiment of the present invention obtains an image file to be imported according to a file obtained by decompressing a compressed package that includes multiple image files, and then specifically imports the image file into a target node. This avoids the overall import of compressed packages containing multiple image files, which not only saves import time, but also saves storage costs.
需要说明的是:上述实施例提供的镜像文件的导入装置在导入镜像文件时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将镜像文件的导入装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的镜像文件的导入装置与镜像文件的导入方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that, when the image file importing device provided in the foregoing embodiment is imported, the image file is only exemplified by the division of the above functional modules. In actual applications, the functions may be allocated by different functional modules according to requirements. Upon completion, the internal structure of the import device of the image file is divided into different functional modules to complete all or part of the functions described above. In addition, the embodiment of the method for importing the image file provided by the foregoing embodiment is the same as the embodiment of the method for importing the image file, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium. The storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.
Claims (12)
- 一种镜像文件的导入方法,其特征在于,所述方法包括:A method for importing an image file, the method comprising:对包含多个镜像文件的压缩包进行解压缩,得到第一描述文件和多个数据文件,所述第一描述文件用于存储镜像文件名称与叶子节点身份标识ID之间的对应关系,每个镜像文件的文件数据存储于至少一个数据文件中;Decompressing a compressed package that includes multiple image files to obtain a first description file and a plurality of data files, where the first description file is used to store a correspondence between an image file name and a leaf node identity ID, each The file data of the image file is stored in at least one data file;根据所述第一描述文件和所述多个数据文件,获取目标数据文件,所述目标数据文件中存储了待导入的目标镜像文件的文件数据;Acquiring, according to the first description file and the plurality of data files, a target data file, where the target data file stores file data of a target image file to be imported;根据所述目标数据文件,生成所述目标镜像文件的压缩包;Generating a compressed package of the target image file according to the target data file;将所述目标镜像文件的压缩包导入到目标节点。Import the compressed package of the target image file to the target node.
- 根据权利要求1所述的方法,其特征在于,所述根据所述第一描述文件和所述多个数据文件,获取目标数据文件,包括:The method according to claim 1, wherein the obtaining the target data file according to the first description file and the plurality of data files comprises:从多个数据文件中读取每个数据文件的文件ID及父ID;Read the file ID and parent ID of each data file from multiple data files;从所述第一描述文件中获取所述目标镜像文件的叶子节点ID;Obtaining, from the first description file, a leaf node ID of the target image file;根据所述叶子节点ID与所述多个数据文件的文件ID及父ID,获取目标数据文件。The target data file is acquired according to the leaf node ID and the file ID and the parent ID of the plurality of data files.
- 根据权利要求2所述的方法,其特征在于,所述每个数据文件中至少包括第二描述文件,所述第二描述文件用于按照预设存储格式存储数据文件的文件ID及父ID;The method according to claim 2, wherein each of the data files includes at least a second description file, and the second description file is configured to store a file ID and a parent ID of the data file according to a preset storage format;所述从所述多个数据文件中读取每个数据文件的文件ID及父ID,包括:Reading the file ID and the parent ID of each data file from the plurality of data files, including:从每个数据文件对应的第二描述文件中读取每个数据文件的文件ID及父ID。The file ID and parent ID of each data file are read from the second description file corresponding to each data file.
- 根据权利要求2所述的方法,其特征在于,所述从所述第一描述文件中获取所述目标镜像文件的叶子节点ID,包括:The method according to claim 2, wherein the obtaining the leaf node ID of the target image file from the first description file comprises:根据目标镜像文件的镜像文件名称,从所述第一描述文件存储的镜像文件名称与叶子节点ID之间的对应关系中,获取所述目标镜像文件的镜像文件名称对应的叶子节点ID。 And obtaining, according to the image file name of the target image file, the leaf node ID corresponding to the image file name of the target image file, from the correspondence between the image file name and the leaf node ID stored in the first description file.
- 根据权利要求2所述的方法,其特征在于,所述根据所述叶子节点ID与所述多个数据文件的文件ID及父ID,获取目标数据文件,包括:The method according to claim 2, wherein the obtaining the target data file according to the leaf node ID and the file ID and the parent ID of the plurality of data files comprises:以所述叶子节点ID为起始文件ID,从所述多个数据文件的文件ID及父ID中,获取所述叶子节点ID的父ID;Obtaining, from the file ID and the parent ID of the plurality of data files, a parent ID of the leaf node ID, by using the leaf node ID as a starting file ID;以所述叶子节点ID的父ID为文件ID,循环遍历所有数据文件的文件ID及父ID,直至获取到所述目标镜像文件的根节点ID;Taking the parent ID of the leaf node ID as the file ID, looping through the file ID and the parent ID of all the data files until the root node ID of the target image file is obtained;将所述叶子节点ID所在的数据文件与所述根节点ID所在的数据文件之间的全部数据文件作为目标数据文件。All the data files between the data file where the leaf node ID is located and the data file where the root node ID is located are used as the target data file.
- 根据权利要求1所述的方法,其特征在于,所述根据所述目标数据文件,生成所述目标镜像文件的压缩包,包括:The method according to claim 1, wherein the generating the compressed package of the target image file according to the target data file comprises:根据所述第一描述文件中存储的所述目标镜像文件的镜像文件名称与叶子节点ID之间的对应关系,生成目标描述文件;Generating a target description file according to a correspondence between an image file name of the target image file and a leaf node ID stored in the first description file;按照特定格式对所述目标数据文件以及所述目标描述文件进行压缩,得到所述目标镜像文件的压缩包。The target data file and the target description file are compressed according to a specific format to obtain a compressed package of the target image file.
- 一种镜像文件的导入装置,其特征在于,所述装置包括:An apparatus for importing an image file, the apparatus comprising:解压缩模块,用于对包含多个镜像文件的压缩包进行解压缩,得到第一描述文件和多个数据文件,所述第一描述文件用于存储镜像文件名称与叶子节点身份标识ID之间的对应关系,每个镜像文件的文件数据存储于至少一个数据文件中;a decompression module, configured to decompress a compressed package that includes multiple image files to obtain a first description file and multiple data files, where the first description file is used to store between the image file name and the leaf node identity ID Correspondence, the file data of each image file is stored in at least one data file;获取模块,用于根据所述第一描述文件和所述多个数据文件,获取目标数据文件,所述目标数据文件中存储了待导入的目标镜像文件的文件数据;An acquiring module, configured to acquire, according to the first description file and the plurality of data files, a target data file, where the target data file stores file data of a target image file to be imported;生成模块,用于根据所述目标数据文件,生成所述目标镜像文件的压缩包;a generating module, configured to generate a compressed package of the target image file according to the target data file;导入模块,用于将所述目标镜像文件的压缩包导入到目标节点。The import module is configured to import the compressed package of the target image file to the target node.
- 根据权利要求7所述的装置,其特征在于,所述获取模块,用于从多个数据文件中读取每个数据文件的文件ID及父ID;从所述第一描述文件中获取所述目标镜像文件的叶子节点ID;根据所述叶子节点ID与所述多个数据文件的文件ID及父ID,获取目标数据文件。 The apparatus according to claim 7, wherein the obtaining module is configured to read a file ID and a parent ID of each data file from a plurality of data files; and obtain the a leaf node ID of the target image file; acquiring the target data file according to the leaf node ID and the file ID and the parent ID of the plurality of data files.
- 根据权利要求8所述的装置,其特征在于,所述每个数据文件中至少包括第二描述文件,所述第二描述文件用于按照预设存储格式存储数据文件的文件ID及父ID;The device according to claim 8, wherein each of the data files includes at least a second description file, and the second description file is configured to store a file ID and a parent ID of the data file according to a preset storage format;所述获取模块,具体用于从每个数据文件对应的第二描述文件中读取每个数据文件的文件ID及父ID。The obtaining module is specifically configured to read a file ID and a parent ID of each data file from a second description file corresponding to each data file.
- 根据权利要求8所述的装置,其特征在于,所述获取模块,具体用于根据目标镜像文件的镜像文件名称,从所述第一描述文件存储的镜像文件名称与叶子节点ID之间的对应关系中,获取所述目标镜像文件的镜像文件名称对应的叶子节点ID。The device according to claim 8, wherein the obtaining module is specifically configured to: correspond to an image file name stored from the first description file and a leaf node ID according to an image file name of the target image file. In the relationship, the leaf node ID corresponding to the image file name of the target image file is obtained.
- 根据权利要求8所述的装置,其特征在于,所述获取模块,具体用于以所述叶子节点ID为起始文件ID,从所述多个数据文件的文件ID及父ID中,获取所述叶子节点ID的父ID;以所述叶子节点ID的父ID为文件ID,循环遍历所有数据文件的文件ID及父ID,直至获取到所述目标镜像文件的根节点ID;将所述叶子节点ID所在的数据文件与所述根节点ID所在的数据文件之间的全部数据文件作为目标数据文件。The device according to claim 8, wherein the obtaining module is configured to obtain, by using the leaf node ID as a starting file ID, a file ID and a parent ID of the plurality of data files. The parent ID of the leaf node ID; the parent ID of the leaf node ID is the file ID, and the file ID and the parent ID of all the data files are traversed until the root node ID of the target image file is obtained; All data files between the data file where the node ID is located and the data file where the root node ID is located are used as the target data file.
- 根据权利要求7所述的装置,其特征在于,所述生成模块,具体用于根据所述第一描述文件中存储的所述目标镜像文件的镜像文件名称与叶子节点ID之间的对应关系,生成目标描述文件;按照特定格式对所述目标数据文件以及所述目标描述文件进行压缩,得到所述目标镜像文件的压缩包。 The device according to claim 7, wherein the generating module is configured to: according to a correspondence between an image file name of the target image file and a leaf node ID stored in the first description file, Generating a target description file; compressing the target data file and the target description file according to a specific format to obtain a compressed package of the target image file.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510519278.4A CN105094924B (en) | 2015-08-21 | 2015-08-21 | The introduction method and device of image file |
CN201510519278.4 | 2015-08-21 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017032170A1 true WO2017032170A1 (en) | 2017-03-02 |
Family
ID=54575434
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/087703 WO2017032170A1 (en) | 2015-08-21 | 2016-06-29 | Method and apparatus for importing mirror image file |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105094924B (en) |
WO (1) | WO2017032170A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112671892A (en) * | 2020-12-22 | 2021-04-16 | 北京百度网讯科技有限公司 | Data transmission method, data transmission device, electronic equipment, medium and computer program product |
CN113778747A (en) * | 2021-08-11 | 2021-12-10 | 江苏深网科技有限公司 | Method for analyzing format of mirror image file of equipment system |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105094924B (en) * | 2015-08-21 | 2018-06-26 | 华为技术有限公司 | The introduction method and device of image file |
CN109976667B (en) * | 2016-01-26 | 2021-09-14 | 华为技术有限公司 | Mirror image management method, device and system |
CN107015995B (en) * | 2016-01-28 | 2021-01-05 | 华为技术有限公司 | Method and device for modifying mirror image file |
WO2018107361A1 (en) * | 2016-12-13 | 2018-06-21 | 华为技术有限公司 | Image processing method and computing device |
CN108509253A (en) * | 2018-04-03 | 2018-09-07 | 南京中兴软创软件技术有限公司 | A kind of method of a large amount of container mirror images of release quickly |
CN114090532B (en) * | 2021-11-10 | 2024-05-14 | 南京信易达计算技术有限公司 | Method and module for constructing mirror image storage based on Linux operating system in cross-system mode |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102546740A (en) * | 2011-06-24 | 2012-07-04 | 奇智软件(北京)有限公司 | Method, device and system used for compression and uncompression and based on cloud compression file |
CN102831001A (en) * | 2012-09-11 | 2012-12-19 | 北京百纳威尔科技有限公司 | Method and device for manufacturing of software upgrading package and method and device for program upgrading |
CN103116654A (en) * | 2013-03-06 | 2013-05-22 | 同方知网(北京)技术有限公司 | Compression method for extensive makeup language (XML) data node coding |
CN103226593A (en) * | 2013-04-17 | 2013-07-31 | 富泰华工业(深圳)有限公司 | File system management method and file storage terminal thereof |
WO2014046650A1 (en) * | 2012-09-19 | 2014-03-27 | Bluearc Uk Limited | System and method for managing deduplication using checkpoints in a file storage system |
CN105094924A (en) * | 2015-08-21 | 2015-11-25 | 华为技术有限公司 | Import method and device of mirror image files |
-
2015
- 2015-08-21 CN CN201510519278.4A patent/CN105094924B/en active Active
-
2016
- 2016-06-29 WO PCT/CN2016/087703 patent/WO2017032170A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102546740A (en) * | 2011-06-24 | 2012-07-04 | 奇智软件(北京)有限公司 | Method, device and system used for compression and uncompression and based on cloud compression file |
CN102831001A (en) * | 2012-09-11 | 2012-12-19 | 北京百纳威尔科技有限公司 | Method and device for manufacturing of software upgrading package and method and device for program upgrading |
WO2014046650A1 (en) * | 2012-09-19 | 2014-03-27 | Bluearc Uk Limited | System and method for managing deduplication using checkpoints in a file storage system |
CN103116654A (en) * | 2013-03-06 | 2013-05-22 | 同方知网(北京)技术有限公司 | Compression method for extensive makeup language (XML) data node coding |
CN103226593A (en) * | 2013-04-17 | 2013-07-31 | 富泰华工业(深圳)有限公司 | File system management method and file storage terminal thereof |
CN105094924A (en) * | 2015-08-21 | 2015-11-25 | 华为技术有限公司 | Import method and device of mirror image files |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112671892A (en) * | 2020-12-22 | 2021-04-16 | 北京百度网讯科技有限公司 | Data transmission method, data transmission device, electronic equipment, medium and computer program product |
CN113778747A (en) * | 2021-08-11 | 2021-12-10 | 江苏深网科技有限公司 | Method for analyzing format of mirror image file of equipment system |
CN113778747B (en) * | 2021-08-11 | 2023-08-29 | 江苏深网科技有限公司 | Equipment system mirror image file format analysis method |
Also Published As
Publication number | Publication date |
---|---|
CN105094924B (en) | 2018-06-26 |
CN105094924A (en) | 2015-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017032170A1 (en) | Method and apparatus for importing mirror image file | |
US11409703B2 (en) | File versions within content addressable storage | |
US11782892B2 (en) | Method and system for migrating content between enterprise content management systems | |
US11360938B2 (en) | Files having unallocated portions within content addressable storage | |
US9195673B2 (en) | Scalable graph modeling of metadata for deduplicated storage systems | |
US11507474B2 (en) | System and method for a backup and recovery of application using containerized backups comprising application data and application dependency information | |
US20160224609A1 (en) | Data replication from a cloud-based storage resource | |
US9977706B2 (en) | System and method of validating data for incremental format of backup archive | |
US9563628B1 (en) | Method and system for deletion handling for incremental file migration | |
US20190391961A1 (en) | Storing Data Files in a File System | |
US11455216B2 (en) | Method and system for generating synthetic backups using pseudo-asset backups | |
CN110347674A (en) | A kind of index creation method, device and equipment based on service identification | |
JP2006211686A (en) | System and method for reconciling image metadata | |
EP3844937B1 (en) | Synchronizing in-use source data and an unmodified migrated copy thereof | |
CN111488242B (en) | Method and system for tagging and routing striped backups to single deduplication instances on a deduplication device | |
US11093350B2 (en) | Method and system for an optimized backup data transfer mechanism | |
US20150347444A1 (en) | Cloud library de-duplication | |
US20220129413A1 (en) | Electronic file migration system and methods of partitioning migrated data between storage systems | |
US10242025B2 (en) | Efficient differential techniques for metafiles | |
US10691557B1 (en) | Backup file recovery from multiple data sources | |
US11874747B2 (en) | Stream optimized backup to cloud object store | |
US10268698B2 (en) | Synchronizing different representations of content | |
TW201403362A (en) | Managing large data sets through page based information tracking in multi-master environments | |
US20240103984A1 (en) | Leveraging backup process metadata for data recovery optimization | |
US20230105023A1 (en) | Deployment migration tool with decoding capabilities |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16838430 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16838430 Country of ref document: EP Kind code of ref document: A1 |