Method and device for importing image files

A technology of mirroring files and files, which is applied in the computer field, can solve the problems of long time consumption and increased storage costs, and achieve the effect of saving storage costs and saving import time

Active Publication Date: 2018-06-26
HUAWEI CLOUD COMPUTING TECH CO LTD
View PDF3 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Even if only part of the image files on the node are needed, since all the image files have been saved as a compressed package, the compressed package needs to be imported as a whole, which not only takes a long time, but also increases the storage cost of another node

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for importing image files
  • Method and device for importing image files
  • Method and device for importing image files

Examples

Experimental program
Comparison scheme
Effect test

example 1

[0108] Example 1, if the specified compressed package contains two image files, and the image names of the two image files are nginx and busybox respectively, the format of the first description file is as follows:

[0109] {

[0110] "nginx": {"latest": "a785ba7493fd9009be710230457f334486b11a45f7e830652d39665a451"}

[0111] "busybox": {"latest": "b785ba7493fd9009be7102790697f334486b17e830652d39665a4522"}

[0112]}

[0113] From the above example 1, we can see that the creation time of the image file corresponding to the image name nginx is "latest", and the ID of the leaf node corresponding to the image file is:

[0114] "a785ba7493fd9009be710230457f334486b11a45f7e830652d39665a451";

[0115] The creation time of the image file corresponding to the image name busybox is "latest", and the ID of the leaf node corresponding to the image file is:

[0116] "b785ba7493fd9009be7102790697f334486b17e830652d39665a4522".

[0117] Among them, the number of data files obtained by decom...

example 2

[0126] Example 2, the format of the second description file is as follows:

[0127] {"ID":"1f1cfc8b4072488196bdf2c7638a50940849cca3d36fle35141e82edb0a41789",

[0128] "patent ID": "3ec5f57e729cb2f888889bfe90498a49370cf68461ea6913f0cda191f629d738",

[0129] "created": "2015-05-27T 16:59:52.607276406Z",

[0130] "container_config": {},

[0131] "architecture": "amd64",

[0132] "os": "linux",

[0133] "size": 7654020}

[0134]}

[0135] Then according to the storage format of the second description file, the file ID of the data file that can be obtained from the second description file is:

[0136] "1f1cfc8b4072488196bdf2c7638a50940849cca3d36fle35141e82edb0a41789",

[0137] The parent ID is:

[0138] "3ec5f57e729cb2f888889bfe90498a49370cf68461ea6913f0cda191f629d738".

[0139] 403. Obtain the leaf node ID of the target image file from the first description file.

[0140] Based on the corresponding relationship between the image file name stored in the first description ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

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

technical field [0001] The invention relates to the field of computer technology, in particular to a method and device for importing image files. Background technique [0002] In the computer field, in order to facilitate users to download and use, a series of specific files can be made into a mirror file according to a preset format through a mirror file making tool. Usually a mirror file is composed of multiple data files, and each data file stores different data of the mirror file. [0003] In order to save storage space, in the Docker scenario, multiple image files on the node are usually saved as a compressed package, and multiple image files in the compressed package may share the same data file. When it is necessary to import part of the image files on a node to another node, the compressed package containing all image files can be imported to another node through the loading operation. [0004] In the process of realizing the present invention, the inventor finds t...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/445G06F9/455
CPCG06F9/445
Inventor 刘基薄海线超博
Owner HUAWEI CLOUD COMPUTING TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products