CN108322496A - Image file distribution method and system, computer readable storage medium, electronic equipment - Google Patents
Image file distribution method and system, computer readable storage medium, electronic equipment Download PDFInfo
- Publication number
- CN108322496A CN108322496A CN201710036381.2A CN201710036381A CN108322496A CN 108322496 A CN108322496 A CN 108322496A CN 201710036381 A CN201710036381 A CN 201710036381A CN 108322496 A CN108322496 A CN 108322496A
- Authority
- CN
- China
- Prior art keywords
- file
- mirror image
- image block
- identification information
- seed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
Abstract
This disclosure relates to a kind of image file distribution method and system, computer readable storage medium, electronic equipment.The image file distribution method includes:Obtain the image file for needing to be distributed to node;The mirror image block file and configuration file for including according to image file make corresponding seed file;Wherein, each mirror image block file includes identification information, and the identification information of all mirror image block files constitutes basic identification information;Preserve concurrent cloth seed file and basic identification information;Whether the identification information judgment mirror image block file for all mirror image block files for including according to basic identification information locally exists, and obtains the corresponding seed file of mirror image block file being locally not present;Parsing seed file is communicated with index server and other nodes with obtaining index server to carry out the download of the corresponding mirror image block file of seed file.The disclosure can alleviate the host I/O and bandwidth pressure of warehouse server service and memory image, while improve the speed and performance of mirror image distribution.
Description
Technical field
This disclosure relates to which field of computer technology more particularly to a kind of image file distribution method and system, computer can
Read storage medium, electronic equipment.
Background technology
Docker is a kind of application container engine increased income, it can will apply and its rely on environment and be packed into a portable
Container in, realize access control and resource isolation.It needs to create and start Docker appearances when Docker containerization application operations
Device, Docker containers are being created by Docker mirror images as dynamic resource.Due to the diversity of Docker mirror images, can
Transplantability and sharing determine that Docker mirror images need special central point to be stored, therefore Docker Registry
(warehouse server) comes into being, and is mainly responsible for storage and the management operation of mirror image.As shown in Figure 1, needing to transport when on node
Then row containerization passes through mirror image in application, Docker virtual drives on node are mirrored to local from warehouse server download
It creates container and starts container operation application.It is stored in warehouse server after the completion of Docker mirror images structure, usual cluster section
Point needs to download image file from warehouse server simultaneously.
Docker officials provide Filesystem to mirrored storage and mode and S3, azure, swift etc. are locally stored
Cloud storage mode.Docker virtual drives on node are communicated with warehouse server, by http modes by image file
Locally downloading, the securing mechanism of this mirror image can easily realize the shared of mirror image, and under small-scale cluster very
Effectively.But there are a large amount of host nodes (100+) to need to download mirror image from warehouse server simultaneously in actual production environment,
No matter in speed or in performance, the host I/O (input/output) of warehouse server service and memory image can become
The bottleneck of mirror image distribution, therefore the prior art can not solve the mirror image distribution problem in large-scale cluster.
It should be noted that information is only used for reinforcing the reason to the background of the disclosure disclosed in above-mentioned background technology part
Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Invention content
The disclosure is designed to provide a kind of image file distribution method and system, computer readable storage medium, electricity
Sub- equipment, and then one or more caused by the limitation and defect of the relevant technologies is overcome to ask at least to a certain extent
Topic.
Other characteristics and advantages of the disclosure will be apparent from by the following detailed description, or partially by the disclosure
Practice and acquistion.
According to one aspect of the disclosure, a kind of image file distribution method is provided, for being realized in distributed network
The distribution of image file is shared;The image file distribution method includes:
Obtain the image file for needing to be distributed to node;
At least one mirror image block file and configuration file for being included according to the image file, make the mirror image block
File and the corresponding seed file of the configuration file;Wherein, each mirror image block file includes the mirror image block file
Identification information, the identification informations of all mirror image block files constitutes basic identification information;
Preserve and issue the seed file and the basic identification information;
Mirror image described in the identification information judgment for all mirror image block files for being included according to the basic identification information
Whether block file locally exists, and obtains the corresponding seed file of the mirror image block file being locally not present;
The seed file is parsed to obtain index server, and realize and the index server according to bitstream protocol
And the communication of other nodes is to carry out the download of the corresponding mirror image block file of the seed file.
In a kind of exemplary embodiment of the disclosure, the image file that the acquisition needs to be distributed to node includes:
The image file for being distributed to node will be needed to download to seed server end and save as image file compressed package.
In a kind of exemplary embodiment of the disclosure, the making mirror image block file and the configuration file correspond to
Seed file include:
Image file compressed package decompression is exported at least one mirror image block file and configuration file;
At least one mirror image block file and the configuration file are compressed respectively to obtain mirror image block file pressure
Contracting packet and configuration file compressed package;
It parses at least one mirror image block file and obtains the identification information of each mirror image block file, wherein all institutes
The identification information for stating mirror image block file constitutes basic identification information;
Corresponding seed file is made according to the mirror image block file and the configuration file.
In a kind of exemplary embodiment of the disclosure, the preservation simultaneously issues the seed file and the basic identification
Information includes:
By under the seed file and the basic identification information preservation to the root of network server, and issue institute
State seed file.
It is described to obtain corresponding kind of the mirror image block file being locally not present in a kind of exemplary embodiment of the disclosure
Subfile includes:
Obtain the basic identification information;
Mirror image described in the identification information judgment for all mirror image block files for being included according to the basic identification information
Whether block file locally exists;
In the presence of the mirror image block file is non-local, the corresponding seed file of the mirror image block file is obtained.
In a kind of exemplary embodiment of the disclosure, the image file distribution method further includes:
The mirror image block file completed will be downloaded and be directed into virtual drive, to complete the loading of the image file.
According to one aspect of the disclosure, a kind of image file dissemination system is provided, for being realized in distributed network
The distribution of image file is shared;The image file dissemination system includes:
First acquisition module needs to be distributed to the image file of node for obtaining;
Making module, at least one mirror image block file and configuration file for being included according to the image file,
Make the mirror image block file and the corresponding seed file of the configuration file;Wherein, each mirror image block file includes
There are the identification information of the mirror image block file, the identification information of all mirror image block files to constitute basic identification information;
Release module, for preserving and issuing the seed file and the basic identification information;
Second acquisition module, the mark of all mirror image block files for being included according to the basic identification information
Information judges whether the mirror image block file locally exists, and obtains the corresponding kind of Ziwen of the mirror image block file being locally not present
Part;
Third acquisition module, for parsing the seed file to obtain index server, and according to bitstream protocol reality
Now with the communication of the index server and other nodes to carry out the download of the corresponding mirror image block file of the seed file.
In a kind of exemplary embodiment of the disclosure, first acquisition module includes:
First acquisition unit, for the image file for being distributed to node will to be needed to download to seed server end;
Storage unit, for the image file downloaded to be saved as image file compressed package.
In a kind of exemplary embodiment of the disclosure, the making module includes:
Decompression unit, for image file compressed package decompression to be exported at least one mirror image block file and configuration
File;
Compression unit, for being compressed to obtain at least one mirror image block file and the configuration file respectively
Mirror image block file compressed package and configuration file compressed package;
First resolution unit obtains the mark of each mirror image block file for parsing at least one mirror image block file
Information is known, wherein the identification information of all mirror image block files constitutes basic identification information;
Production unit, for making corresponding seed file according to the mirror image block file and the configuration file.
In a kind of exemplary embodiment of the disclosure, the release module includes:
Storage unit, for by the root mesh of the seed file and the basic identification information preservation to network server
Under record;
Release unit, for issuing the seed file.
In a kind of exemplary embodiment of the disclosure, second acquisition module includes:
Second acquisition unit, for obtaining the basic identification information;
Judging unit, the identification information of all mirror image block files for being included according to the basic identification information
Judge whether the mirror image block file locally exists;
Third acquiring unit is corresponded in the presence of the mirror image block file is non-local, obtaining the mirror image block file
Seed file.
In a kind of exemplary embodiment of the disclosure, the third acquisition module includes:
Second resolution unit, for parsing the seed file to obtain index server;
4th acquiring unit, for realizing the communication with the index server and other nodes according to bitstream protocol
To carry out the download of the corresponding mirror image block file of the seed file.
In a kind of exemplary embodiment of the disclosure, the image file dissemination system further includes:
It insmods, virtual drive is directed into for the mirror image block file completed will to be downloaded, to complete the mirror image
The loading of file.
According to one aspect of the disclosure, a kind of non-transient computer readable storage medium is provided, calculating is stored thereon with
Machine program, the computer program realize above-mentioned image file distribution method when being executed by processor.
According to one aspect of the disclosure, a kind of electronic equipment is provided, including:
Processor;And
Memory, the executable instruction for storing the processor;
Wherein, the processor is configured to execute above-mentioned image file distributor via the executable instruction is executed
Method.
The image file distribution method and system that disclosure illustrative embodiments are provided, utilize peer-to-peer network (Peer
To Peer, abbreviation P2P) technology forms distributed network between different host nodes, to realize image file it is quick altogether
It enjoys.So, each host node not only taker that obtains as the supplier of resource but also as resource, on the one hand can be effective
The host I/O and bandwidth pressure for alleviating warehouse server service and memory image, to improve network throughput, on the other hand also
The speed and performance that mirror image distribution can be improved in large-scale cluster, to obtain better user experience.
It should be understood that above general description and following detailed description is only exemplary and explanatory, not
The disclosure can be limited.
Description of the drawings
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and together with specification for explaining the principles of this disclosure.It should be evident that the accompanying drawings in the following description is only the disclosure
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.
Fig. 1 schematically shows the communication structure schematic diagram of prior art interior joint and warehouse server;
Fig. 2 schematically shows the flow chart of image file distribution method in disclosure exemplary embodiment;
Fig. 3 schematically shows the storage organization schematic diagram of the Docker image files in disclosure exemplary embodiment;
Fig. 4 schematically shows the production flow diagram of the seed file in disclosure exemplary embodiment;
Fig. 5 schematically shows the Organization Chart of image file dissemination system in disclosure exemplary embodiment;
Fig. 6 schematically shows the module diagram of the electronic equipment in disclosure exemplary embodiment.
Specific implementation mode
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes
Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the disclosure will more
Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.Described feature, knot
Structure or characteristic can be in any suitable manner incorporated in one or more embodiments.
In addition, attached drawing is only the schematic illustrations of the disclosure, it is not necessarily drawn to scale.Identical attached drawing mark in figure
Note indicates same or similar part, thus will omit repetition thereof.Some block diagrams shown in attached drawing are work(
Energy entity, not necessarily must be corresponding with physically or logically independent entity.Software form may be used to realize these work(
Energy entity, or these functional entitys are realized in one or more hardware modules or integrated circuit, or at heterogeneous networks and/or place
These functional entitys are realized in reason device device and/or microcontroller device.
This example embodiment proposes a kind of image file distribution method, for realizing mirror image text in distributed network
The distribution of part is shared;As shown in Fig. 2, the image file distribution method may include mainly:
S1, acquisition need the image file for being distributed to node;
S2, at least one mirror image block file and configuration file for being included according to the image file, make the mirror
As block file and the corresponding seed file of the configuration file;Wherein, each mirror image block file includes the mirror image block
The identification information of the identification information of file, all mirror image block files constitutes basic identification information;
S3, preservation simultaneously issue the seed file and the basic identification information;
S4, all mirror image block files for being included according to the basic identification information identification information judgment described in mirror
As the corresponding seed file of the mirror image block file that whether block file locally exists, and acquisition is locally not present;
S5, the parsing seed file are realized according to bitstream protocol and are taken with the index to obtain index server
The communication of business device and other nodes is to carry out the download of the corresponding mirror image block file of the seed file.
The image file distribution method and system that disclosure illustrative embodiments are provided, utilize peer-to-peer network (Peer
To Peer, abbreviation P2P) technology forms distributed network between different host nodes, to realize image file it is quick altogether
It enjoys.So, each host node not only taker that obtains as the supplier of resource but also as resource, on the one hand can be effective
The host I/O and bandwidth pressure for alleviating warehouse server service and memory image, to improve network throughput, on the other hand also
The speed and performance that mirror image distribution can be improved in large-scale cluster, to obtain better user experience.
The image file distribution method in this example embodiment will be described in detail below.
In step sl, the image file for needing to be distributed to node is obtained.
In this example embodiment, the node refers to having independent address and transmission/reception data function with one
The connected individual of network, can be specifically to be completed under image file using bit stream (Bit Torrent, abbreviation BT) agreement
The BT clients of load.The image file refers to the image file being stored in Docker warehouse servers, is used to create
Docker containers.
Described obtain needs to be distributed to the image file of node and may include:It will need to be distributed under the image file of node
Seed server (Seed servers) is downloaded to hold and save as image file compressed package;Wherein, the seed server can be used for
It completes the download of image file and makes seed file to be issued.
For example, the application programming interfaces (Application that Seed servers pass through Docker virtual drives
Programming Interface, abbreviation API) obtain image file, it would be desirable to and the image file for being distributed to node passes through
Docker pull (docker download commands) download to Seed server ends, and (docker preserves life by docker save
Enable) image file is saved as into tar compressed packages.It should be noted that should first start index server (Tracker before this
Server), realize the communication between each node in P2P networks;Wherein, the Tracker servers are for storing BT client
All nodes and metadata information in downloading process are held, BT clients is assisted to complete entire communication process.If clustered node number
More than a certain setting value such as 500, for example every 500 nodes of multiple Tracker servers can be started at this time and start one
Tracker servers can greatly mitigate the pressure load of Tracker servers in this way.
In step s 2, at least one mirror image block file and configuration file for being included according to the image file, system
Make the mirror image block file and the corresponding seed file of the configuration file;Wherein, each mirror image block file includes
The identification information of the identification information of the mirror image block file, all mirror image block files constitutes basic identification information.
In this example embodiment, as shown in figure 3, the storage organization of Docker image files is by one or more mirror
As block file composition, mirror image block file is the part in image file;Wherein, each mirror image block file has unique
Identification information (i.e. id information), according to the identification information i.e. can recognize that corresponding mirror image block file;All mirror image block files
Identification information constitutes basic identification information, and the function of the basic identification file is equivalent to image file catalogue.
As shown in figure 4, the making mirror image block file and the corresponding seed file of the configuration file can wrap
Include following steps:
S21, image file compressed package decompression is exported at least one mirror image block file and configuration file;
S22, at least one mirror image block file and the configuration file are compressed respectively to obtain mirror image block text
Part compressed package and configuration file compressed package;
S23, parsing at least one mirror image block file obtain the identification information of each mirror image block file, wherein institute
There is the identification information of the mirror image block file to constitute basic identification information;
S24, corresponding seed file is made according to the mirror image block file and the configuration file.
For example, use Linux tar-xvf orders that image file tar compressed packages decompression is exported each mirror image block first
File and configuration file, and by after decompression each mirror image block file and configuration file repack compression respectively;Then analytic solutions
The id information for all mirror image blocks that the current image file of id.json file acquisitions under pressure catalogue is included simultaneously is stored in info files
In, obtain whole basic identification information;Last Seed server ends call P2P to make the API of seed file by all mirror images
Block file and configuration file generate corresponding .torrent suffix seed file respectively.
In step s3, preserve and issue the seed file and the basic identification information.
In this example embodiment, the seed file and the basic identification information are issued jointly, are conducive to node root
According to the basic identification information inquiry and obtain the seed files of needs.
The preservation simultaneously issues the seed file and the basic identification information may include:By the seed file
And under the basic identification information preservation to the root of network server, and issue the seed file;Wherein, the net
Network server is the server for providing seed file.
For example, using Nginx servers as the network server (Web service for providing torrent seed files
Device), so that node downloads seed file;Wherein, Nginx is the Web server/Reverse Proxy and electricity of a lightweight
Sub- mail (IMAP/POP3) proxy server.Detailed process is:Start Nginx servers and will be generated in previous step
Torrent seed files and info files (i.e. basic identification information) are all put under the root of the server, in order to
Node downloads the seed file needed;Then the API of P2P is called to issue seed file, in order to which node is according under seed file
Carry corresponding mirror image block file.
In step s 4, the identification information for all mirror image block files for being included according to the basic identification information is sentenced
Whether the mirror image block file that breaks locally exists, and obtains the corresponding seed file of the mirror image block file being locally not present.
In this example embodiment, since the storage organization of Docker image files is by one or more mirror image block text
Part composition, mirror image block file therein can carry out multiplexing between multiple mirror images and share, therefore the identical mirror of different mirror images
As block file need to only be locally stored one;On this basis, by examining whether each mirror image block file locally exists, just
It can be to avoid the identical mirror image block file of repeated downloads, to improve the download efficiency of image file.
The corresponding seed file of the mirror image block file that is locally not present of obtaining may include:
Obtain the basic identification information;
Mirror image described in the identification information judgment for all mirror image block files for being included according to the basic identification information
Whether block file locally exists;
In the presence of the mirror image block file is non-local, the corresponding seed file of the mirror image block file is obtained.
For example, node downloads info files from Web server and obtains the basic identification information of image file, root first
The id information of all mirror image block files is obtained according to the basic identification information;Whether the id information for then verifying all mirror image blocks is local
In the presence of;Wherein, verify id information whether local in the presence of:For the version before Dokcer 1.10, all mirror image block files
Id information layId in node, there are Ddocker installation directories/var/lib/docker/graph to be corresponding to it, therefore can be with
By examining the file named with layId, to verify, whether the mirror image block file for needing to download is local to exist;For
Docker 1.10 and later version, the id information of all mirror image block files are somebody's turn to do according to id.json file acquisitions
Id.json files describe the json message informations of current mirror image block file, wherein in diff_ids fields and node/var/
Content in lib/docker/image/*/layerdb/sha256/*/diff files is corresponding, therefore can be tested by comparison
Card needs whether the mirror image block file downloaded is local to exist;The mirror image being locally not present finally is downloaded from Web server
The corresponding seed file of block file.Assuming that Seed servers have issued id.tar.gz.torrent seed files, the sheet of node A
The id layers of content is had existed in ground warehouse, then need not download this seed file, the id is not present in the ware-house here of node B
Layer content, then download this seed file.
In step s 5, the seed file is parsed to obtain index server, and according to bitstream protocol realization and institute
The communication of index server and other nodes is stated to carry out the download of the corresponding mirror image block file of the seed file.
In this example embodiment, Tracker servers are for storing BT clients node all in downloading process
And metadata information, assist BT clients to complete entire communication process.
For example, BT clients obtain Tracker services by parsing the corresponding seed file of the mirror image block file
The metadata information of device and file, and communicated with Tracker servers and other nodes, to form P2P distributions
Network completes the download of the mirror image block file.
On this basis, the image file distribution method of this example embodiment proposition can also include:
S6, the mirror image block file that will download completion are directed into virtual drive, to complete the loading of the image file.
In this example embodiment, the mirror image block file downloaded is a part for image file, only will be all
Mirror image block file is directed into the loading that virtual drive completes the image file, could form the image file of a completion.
For example, the mirror image block file completed will be downloaded by the API of Docker virtual drives and is directed into Docker void
In quasi- CD-ROM drive, to complete image file loading, the distribution of all node image files is so far completed.
It can realize that the image file between each host node is distributed in distributed network based on above-mentioned steps S1-S6
It is shared.Compared with the prior art, this example embodiment can not only alleviate the host of warehouse server service and memory image
IO and bandwidth pressure, while the speed and performance of mirror image distribution can also be improved.
Experiments have shown that:It is 744s that the image file that size is 4G, which is distributed to 100 taking for machine, is distributed to 352 machines
The time-consuming of device is only 285s.Since the connection number that Tracker servers are supported is limited, single Tracker servers are tested at present
The quantity of the concurrent Seed servers or node client supported is 3500 or so, can if machine scale is more than 3500
The quantity of Tracker servers extending transversely reduces the load of single Tracker servers.
On time, the image file distribution method provided using this example embodiment can greatly improve mirror image
Distribute efficiency, and as the time of the increase consumption of cluster scale is shorter and shorter.
Spatially, the prior art takes the mode of warehouse server extending transversely, structure warehouse server cluster to reduce
Warehouse server pressure, the image file distribution method that this example embodiment is provided is merely with single warehouse server
Achieve the effect that build warehouse server cluster.
A kind of image file dissemination system is also proposed in this example embodiment, for realizing mirror in distributed network
As the distribution of file is shared, basic framework is as shown in Figure 5.Wherein, the warehouse server (Docker Registry) is available
Storage in mirror image and management operation;The seed server (Seed servers) can be used for completing the download of image file and system
Make seed file to be issued;The index server (Tracker servers) is used to store during BT client downloads
All nodes and metadata information assist BT clients to complete entire communication process;Configuration management server (the Salt-
Master servers) for creating high speed, safe both-way communication network for clustered node, to promote the communication energy of clustered node
Power.
The image file dissemination system may include:
First acquisition module needs to be distributed to the image file of node for obtaining;
Making module, at least one mirror image block file and configuration file for being included according to the image file,
Make the mirror image block file and the corresponding seed file of the configuration file;Wherein, each mirror image block file includes
There are the identification information of the mirror image block file, the identification information of all mirror image block files to constitute basic identification information;
Release module, for preserving and issuing the seed file and the basic identification information;
Second acquisition module, the mark of all mirror image block files for being included according to the basic identification information
Information judges whether the mirror image block file locally exists, and obtains the corresponding kind of Ziwen of the mirror image block file being locally not present
Part;
Third acquisition module, for parsing the seed file to obtain index server, and according to bitstream protocol reality
Now with the communication of the index server and other nodes to carry out the download of the corresponding mirror image block file of the seed file;
It insmods, virtual drive is directed into for the mirror image block file completed will to be downloaded, to complete the mirror image
The loading of file.
Wherein, first acquisition module, the module and the function of the release module of making can pass through seed
Server and network server are realized;Second acquisition module, the third acquisition module and the work(to insmod
It can be realized by the BT clients of node.
The image file distribution method and system that disclosure illustrative embodiments are provided, utilize Peer-to-Peer Network P2P skill
Art forms distributed network between different host nodes, to realize being quickly shared for image file.So, Ge Gezhu
The machine node not only taker that obtains as the supplier of resource but also as resource, on the one hand can effectively alleviate warehouse server service
It on the other hand can also be carried in large-scale cluster with the host IO and bandwidth pressure of memory image to improve network throughput
The speed and performance of high mirror image distribution, to obtain better user experience.
First acquisition module may include:
First acquisition unit, for the image file for being distributed to node will to be needed to download to seed server end;
Storage unit, for the image file downloaded to be saved as image file compressed package.
The making module may include:
Decompression unit, for image file compressed package decompression to be exported at least one mirror image block file and configuration
File;
Compression unit, for being compressed to obtain at least one mirror image block file and the configuration file respectively
Mirror image block file compressed package and configuration file compressed package;
First resolution unit obtains the mark of each mirror image block file for parsing at least one mirror image block file
Information is known, wherein the identification information of all mirror image block files constitutes basic identification information;
Production unit, for making corresponding seed file according to the mirror image block file and the configuration file.
The release module may include:
Storage unit, for by the root mesh of the seed file and the basic identification information preservation to network server
Under record;
Release unit, for issuing the seed file.
Second acquisition module may include:
Second acquisition unit, for obtaining the basic identification information;
Judging unit, the identification information of all mirror image block files for being included according to the basic identification information
Judge whether the mirror image block file locally exists;
Third acquiring unit is corresponded in the presence of the mirror image block file is non-local, obtaining the mirror image block file
Seed file.
The third acquisition module may include:
Second resolution unit, for parsing the seed file to obtain index server;
4th acquiring unit, for realizing the communication with the index server and other nodes according to bitstream protocol
To carry out the download of the corresponding mirror image block file of the seed file.
It should be noted that:The detail of each modular unit is in corresponding mirror in the image file dissemination system
As being described in detail in document distribution method, which is not described herein again.
It should be noted that although being referred to several modules or list for acting the equipment executed in above-detailed
Member, but this division is not enforceable.In fact, according to embodiment of the present disclosure, it is above-described two or more
The feature and function of module either unit can embody in a module or unit.Conversely, an above-described mould
Either the feature and function of unit can be further divided into and embodied by multiple modules or unit block.
In addition, although describing each step of method in the disclosure with particular order in the accompanying drawings, this does not really want
These steps must be executed according to the particular order by asking or implying, or the step having to carry out shown in whole could be realized
Desired result.Additional or alternative, it is convenient to omit multiple steps are merged into a step and executed by certain steps, and/
Or a step is decomposed into execution of multiple steps etc..
It also proposed a kind of non-transient computer readable storage medium in this example embodiment, be stored thereon with computer
Program, the computer program realize above-mentioned image file distribution method when being executed by processor.
Computer readable storage medium may include in a base band or as the data-signal that a carrier wave part is propagated,
In carry readable program code.The data-signal of this propagation may be used diversified forms, including but not limited to electromagnetic signal,
Optical signal or above-mentioned any appropriate combination.Computer readable storage medium can send, propagates or transmit for by referring to
Enable execution system, device either device use or program in connection.
The program code for including in computer readable storage medium can transmit with any suitable medium, including but unlimited
In wireless, wired, optical cable, radio frequency etc. or above-mentioned any appropriate combination.
A kind of electronic equipment is also proposed in this example embodiment, as shown in fig. 6, the electronic equipment 10 includes:Processing
Component 11 can further include one or more processors, and by the memory resource representated by memory 12, be used for
Store the instruction that can be executed by processing component 11, such as application program.The application program stored in memory 12 may include one
It is a or it is more than one each correspond to one group of instruction module.In addition, processing component 11 is configured as executing instruction, to hold
The row above method.
The electronic equipment 10 can also include:One power supply module, power supply module are configured to executing electronic equipment 10
Carry out power management;One wired or wireless network interface 13 is configured to electronic equipment 10 being connected to network;And one
Input and output (I/O) interface 14.The electronic equipment 10 can be operated based on the operating system for being stored in memory 12, such as
Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented
Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the disclosure
The technical solution of embodiment can be expressed in the form of software products, the software product can be stored in one it is non-volatile
Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating
Equipment (can be personal computer, server, mobile terminal or network equipment etc.) is executed according to disclosure embodiment
Method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or
Person's adaptive change follows the general principles of this disclosure and includes the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by appended
Claim is pointed out.
Claims (15)
1. a kind of image file distribution method, the distribution for realizing image file in distributed network is shared;Its feature exists
In the image file distribution method includes:
Obtain the image file for needing to be distributed to node;
At least one mirror image block file and configuration file for being included according to the image file, make the mirror image block file
And the corresponding seed file of the configuration file;Wherein, each mirror image block file includes the mark of the mirror image block file
Know information, the identification information of all mirror image block files constitutes basic identification information;
Preserve and issue the seed file and the basic identification information;
Mirror image block text described in the identification information judgment for all mirror image block files for being included according to the basic identification information
Whether part locally exists, and obtains the corresponding seed file of the mirror image block file being locally not present;
The seed file is parsed to obtain index server, and according to bitstream protocol realize with the index server and
The communication of other nodes is to carry out the download of the corresponding mirror image block file of the seed file.
2. image file distribution method according to claim 1, which is characterized in that the acquisition needs to be distributed to node
Image file includes:
The image file for being distributed to node will be needed to download to seed server end and save as image file compressed package.
3. image file distribution method according to claim 2, which is characterized in that it is described make the mirror image block file with
And the corresponding seed file of the configuration file includes:
Image file compressed package decompression is exported at least one mirror image block file and configuration file;
At least one mirror image block file and the configuration file are compressed respectively to obtain mirror image block file compressed package
With configuration file compressed package;
It parses at least one mirror image block file and obtains the identification information of each mirror image block file, wherein all mirrors
As the identification information of block file constitutes basic identification information;
Corresponding seed file is made according to the mirror image block file and the configuration file.
4. image file distribution method according to claim 1, which is characterized in that the preservation simultaneously issues described kind of Ziwen
Part and the basic identification information include:
By under the seed file and the basic identification information preservation to the root of network server, and issue described kind
Subfile.
5. image file distribution method according to claim 1, which is characterized in that the acquisition is locally not present described
The corresponding seed file of mirror image block file includes:
Obtain the basic identification information;
Mirror image block text described in the identification information judgment for all mirror image block files for being included according to the basic identification information
Whether part locally exists;
In the presence of the mirror image block file is non-local, the corresponding seed file of the mirror image block file is obtained.
6. image file distribution method according to any one of claims 1 to 5, which is characterized in that the image file point
Forwarding method further includes:
The mirror image block file completed will be downloaded and be directed into virtual drive, to complete the loading of the image file.
7. a kind of image file dissemination system, the distribution for realizing image file in distributed network is shared;Its feature exists
In the image file dissemination system includes:
First acquisition module needs to be distributed to the image file of node for obtaining;
Module is made, at least one mirror image block file and configuration file for being included according to the image file make
The mirror image block file and the corresponding seed file of the configuration file;Wherein, each mirror image block file includes this
The identification information of the identification information of mirror image block file, all mirror image block files constitutes basic identification information;
Release module, for preserving and issuing the seed file and the basic identification information;
Second acquisition module, the identification information of all mirror image block files for being included according to the basic identification information
Judge whether the mirror image block file locally exists, obtains the corresponding seed file of the mirror image block file being locally not present;
Third acquisition module, for parsing the seed file to obtain index server, and according to bitstream protocol realize with
The communication of the index server and other nodes is to carry out the download of the corresponding mirror image block file of the seed file.
8. image file dissemination system according to claim 7, which is characterized in that first acquisition module includes:
First acquisition unit, for the image file for being distributed to node will to be needed to download to seed server end;
Storage unit, for the image file downloaded to be saved as image file compressed package.
9. image file dissemination system according to claim 8, which is characterized in that the making module includes:
Decompression unit, for image file compressed package decompression to be exported at least one mirror image block file and configuration text
Part;
Compression unit, for being compressed at least one mirror image block file and the configuration file to obtain mirror image respectively
Block file compressed package and configuration file compressed package;
First resolution unit obtains the mark letter of each mirror image block file for parsing at least one mirror image block file
Breath, wherein the identification information of all mirror image block files constitutes basic identification information;
Production unit, for making corresponding seed file according to the mirror image block file and the configuration file.
10. image file dissemination system according to claim 7, which is characterized in that the release module includes:
Storage unit, for by the root of the seed file and the basic identification information preservation to network server
Under;
Release unit, for issuing the seed file.
11. image file dissemination system according to claim 7, which is characterized in that second acquisition module includes:
Second acquisition unit, for obtaining the basic identification information;
Judging unit, the identification information judgment of all mirror image block files for being included according to the basic identification information
Whether the mirror image block file locally exists;
Third acquiring unit, in the presence of the mirror image block file is non-local, obtaining corresponding kind of the mirror image block file
Subfile.
12. image file dissemination system according to claim 7, which is characterized in that the third acquisition module includes:
Second resolution unit, for parsing the seed file to obtain index server;
4th acquiring unit, for realized according to bitstream protocol the communication with the index server and other nodes with into
The download of the corresponding mirror image block file of the row seed file.
13. according to claim 7 to 12 any one of them image file dissemination system, which is characterized in that the image file
Dissemination system further includes:
It insmods, virtual drive is directed into for the mirror image block file completed will to be downloaded, to complete the image file
Loading.
14. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
Claim 1-6 any one of them image file distribution methods are realized when being executed by processor.
15. a kind of electronic equipment, which is characterized in that including:
Processor;And
Memory, the executable instruction for storing the processor;
Wherein, the processor is configured to carry out perform claim requirement 1-6 any one of them via the execution executable instruction
Image file distribution method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710036381.2A CN108322496A (en) | 2017-01-17 | 2017-01-17 | Image file distribution method and system, computer readable storage medium, electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710036381.2A CN108322496A (en) | 2017-01-17 | 2017-01-17 | Image file distribution method and system, computer readable storage medium, electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108322496A true CN108322496A (en) | 2018-07-24 |
Family
ID=62892128
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710036381.2A Pending CN108322496A (en) | 2017-01-17 | 2017-01-17 | Image file distribution method and system, computer readable storage medium, electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108322496A (en) |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109005232A (en) * | 2018-08-10 | 2018-12-14 | 腾讯科技(深圳)有限公司 | Method for down loading, providing method and the equipment of container image file |
CN109491758A (en) * | 2018-10-11 | 2019-03-19 | 深圳市网心科技有限公司 | Docker mirror image distribution method, system, data gateway and computer readable storage medium |
CN109787888A (en) * | 2019-01-25 | 2019-05-21 | 上海创景信息科技有限公司 | Support more equipment message distribution stocking systems and method and storage medium |
CN109783193A (en) * | 2018-12-27 | 2019-05-21 | 南京优速网络科技有限公司 | A kind of mirror image file management method that can be multiplexed in multiple domain cloud platform |
CN111107135A (en) * | 2019-12-02 | 2020-05-05 | 国电南瑞科技股份有限公司 | Container mirror image parallel distribution method, scheduler and storage medium |
CN111385325A (en) * | 2018-12-28 | 2020-07-07 | 中国移动通信集团浙江有限公司 | File distribution system and method based on P2P |
CN111443992A (en) * | 2020-03-31 | 2020-07-24 | 高新兴科技集团股份有限公司 | Docker mirror image difference derivation method, computer storage medium and electronic device |
CN111654528A (en) * | 2020-05-19 | 2020-09-11 | 无锡江南计算技术研究所 | Container mirror image distribution method for Shenwei platform |
CN111866099A (en) * | 2020-07-07 | 2020-10-30 | 锐捷网络股份有限公司 | Method, device, system, equipment and storage medium for downloading mirror image file |
CN112437157A (en) * | 2020-11-24 | 2021-03-02 | 中国工商银行股份有限公司 | Mirror image warehouse reconciliation method and system |
CN112433810A (en) * | 2020-11-05 | 2021-03-02 | 北京浪潮数据技术有限公司 | Docker container mirror image storage and pulling method and device and computer readable storage medium |
CN112637365A (en) * | 2021-01-06 | 2021-04-09 | Oppo广东移动通信有限公司 | Terminal resource issuing and acquiring method and device and electronic equipment |
CN113127430A (en) * | 2019-12-30 | 2021-07-16 | 北京懿医云科技有限公司 | Mirror image information processing method and device, computer readable medium and electronic equipment |
CN113746881A (en) * | 2020-05-29 | 2021-12-03 | 电科云(北京)科技有限公司 | Container mirror image downloading method and system |
WO2022001203A1 (en) * | 2020-06-30 | 2022-01-06 | 中兴通讯股份有限公司 | Mirror image distribution method, electronic device, and storage medium |
CN114780820A (en) * | 2022-04-28 | 2022-07-22 | 广州高专资讯科技有限公司 | Open source platform-based target matching system and method |
TWI777219B (en) * | 2020-08-12 | 2022-09-11 | 鴻海精密工業股份有限公司 | Distributed storage method, server, and storage medium |
CN113127430B (en) * | 2019-12-30 | 2024-05-03 | 北京懿医云科技有限公司 | Mirror image information processing method, mirror image information processing device, computer readable medium and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090182815A1 (en) * | 2007-10-15 | 2009-07-16 | General Electric Company | Accelerating peer-to-peer content distribution |
CN102291458A (en) * | 2011-08-12 | 2011-12-21 | 乐视网信息技术(北京)股份有限公司 | Method for peer-to-peer (p2p) server framework |
CN102413185A (en) * | 2011-11-25 | 2012-04-11 | 广州杰赛科技股份有限公司 | Cloud platform automatic updating system based on BT technology |
CN103685496A (en) * | 2013-12-06 | 2014-03-26 | 华为技术有限公司 | Transmission method and device of file data |
CN104902000A (en) * | 2015-04-03 | 2015-09-09 | 易云捷讯科技(北京)有限公司 | Method for using p2p technology to fast transmit virtual machine template |
-
2017
- 2017-01-17 CN CN201710036381.2A patent/CN108322496A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090182815A1 (en) * | 2007-10-15 | 2009-07-16 | General Electric Company | Accelerating peer-to-peer content distribution |
CN102291458A (en) * | 2011-08-12 | 2011-12-21 | 乐视网信息技术(北京)股份有限公司 | Method for peer-to-peer (p2p) server framework |
CN102413185A (en) * | 2011-11-25 | 2012-04-11 | 广州杰赛科技股份有限公司 | Cloud platform automatic updating system based on BT technology |
CN103685496A (en) * | 2013-12-06 | 2014-03-26 | 华为技术有限公司 | Transmission method and device of file data |
CN104902000A (en) * | 2015-04-03 | 2015-09-09 | 易云捷讯科技(北京)有限公司 | Method for using p2p technology to fast transmit virtual machine template |
Cited By (25)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109005232A (en) * | 2018-08-10 | 2018-12-14 | 腾讯科技(深圳)有限公司 | Method for down loading, providing method and the equipment of container image file |
CN109491758A (en) * | 2018-10-11 | 2019-03-19 | 深圳市网心科技有限公司 | Docker mirror image distribution method, system, data gateway and computer readable storage medium |
CN109783193A (en) * | 2018-12-27 | 2019-05-21 | 南京优速网络科技有限公司 | A kind of mirror image file management method that can be multiplexed in multiple domain cloud platform |
CN111385325A (en) * | 2018-12-28 | 2020-07-07 | 中国移动通信集团浙江有限公司 | File distribution system and method based on P2P |
CN109787888B (en) * | 2019-01-25 | 2021-06-29 | 上海创景信息科技有限公司 | System and method for supporting multi-device message distribution and storage medium |
CN109787888A (en) * | 2019-01-25 | 2019-05-21 | 上海创景信息科技有限公司 | Support more equipment message distribution stocking systems and method and storage medium |
CN111107135A (en) * | 2019-12-02 | 2020-05-05 | 国电南瑞科技股份有限公司 | Container mirror image parallel distribution method, scheduler and storage medium |
CN111107135B (en) * | 2019-12-02 | 2022-07-29 | 国电南瑞科技股份有限公司 | Container mirror image parallel distribution method, scheduler and storage medium |
CN113127430B (en) * | 2019-12-30 | 2024-05-03 | 北京懿医云科技有限公司 | Mirror image information processing method, mirror image information processing device, computer readable medium and electronic equipment |
CN113127430A (en) * | 2019-12-30 | 2021-07-16 | 北京懿医云科技有限公司 | Mirror image information processing method and device, computer readable medium and electronic equipment |
CN111443992A (en) * | 2020-03-31 | 2020-07-24 | 高新兴科技集团股份有限公司 | Docker mirror image difference derivation method, computer storage medium and electronic device |
CN111443992B (en) * | 2020-03-31 | 2023-04-07 | 高新兴科技集团股份有限公司 | Docker mirror image difference derivation method, computer storage medium and electronic device |
CN111654528A (en) * | 2020-05-19 | 2020-09-11 | 无锡江南计算技术研究所 | Container mirror image distribution method for Shenwei platform |
CN113746881A (en) * | 2020-05-29 | 2021-12-03 | 电科云(北京)科技有限公司 | Container mirror image downloading method and system |
WO2022001203A1 (en) * | 2020-06-30 | 2022-01-06 | 中兴通讯股份有限公司 | Mirror image distribution method, electronic device, and storage medium |
CN111866099A (en) * | 2020-07-07 | 2020-10-30 | 锐捷网络股份有限公司 | Method, device, system, equipment and storage medium for downloading mirror image file |
CN111866099B (en) * | 2020-07-07 | 2022-09-20 | 锐捷网络股份有限公司 | Method, device, system, equipment and storage medium for downloading mirror image file |
TWI777219B (en) * | 2020-08-12 | 2022-09-11 | 鴻海精密工業股份有限公司 | Distributed storage method, server, and storage medium |
CN112433810B (en) * | 2020-11-05 | 2023-12-26 | 北京浪潮数据技术有限公司 | Method and device for mirror image storage and pulling of docker container and computer readable storage medium |
CN112433810A (en) * | 2020-11-05 | 2021-03-02 | 北京浪潮数据技术有限公司 | Docker container mirror image storage and pulling method and device and computer readable storage medium |
CN112437157B (en) * | 2020-11-24 | 2022-10-18 | 中国工商银行股份有限公司 | Mirror image warehouse reconciliation method and system |
CN112437157A (en) * | 2020-11-24 | 2021-03-02 | 中国工商银行股份有限公司 | Mirror image warehouse reconciliation method and system |
CN112637365A (en) * | 2021-01-06 | 2021-04-09 | Oppo广东移动通信有限公司 | Terminal resource issuing and acquiring method and device and electronic equipment |
CN114780820A (en) * | 2022-04-28 | 2022-07-22 | 广州高专资讯科技有限公司 | Open source platform-based target matching system and method |
CN114780820B (en) * | 2022-04-28 | 2022-11-01 | 广州高专资讯科技有限公司 | Open source platform-based target matching system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108322496A (en) | Image file distribution method and system, computer readable storage medium, electronic equipment | |
CN109725909B (en) | Code file packaging deployment method, continuous integrated server and system | |
US9531802B2 (en) | Data transmission and reception system | |
CN107172187B (en) | A kind of SiteServer LBS and method | |
US8739175B2 (en) | System and method for rerouting a request between virtualization services | |
CN107590001A (en) | Load-balancing method and device, storage medium, electronic equipment | |
WO2019144761A1 (en) | Data synchronization method, distributed system and device | |
WO2019056913A1 (en) | Container login method and device and storage medium | |
US10075549B2 (en) | Optimizer module in high load client/server systems | |
US8914804B2 (en) | Handling queues associated with web services of business processes | |
JP2009087361A (en) | System and method of creating and communicating with component-based wireless application | |
JP2006512694A (en) | System and method for building and running a platform neutral generic service client application | |
US8135785B2 (en) | System and method for processing messages using pluggable protocol processors in a service-oriented pipeline architecture | |
CN106713469B (en) | Dynamic loading method, device and system for distributed container | |
CN111355983B (en) | Service data processing method, device, server and storage medium | |
CN111818194A (en) | Domain name based access system and method | |
WO2014066114A2 (en) | Book thinning | |
CN110442601A (en) | A kind of method and apparatus that Openstack mirror image data accelerates parallel | |
CN117194562A (en) | Data synchronization method and device, electronic equipment and computer readable medium | |
US11929933B2 (en) | Ephemeral data stream routing service | |
CN110019059B (en) | Timing synchronization method and device | |
CN113268272B (en) | Application delivery method, device and system based on private cloud | |
CN115567547A (en) | Mirror image distribution method, system and equipment | |
CN111984616A (en) | Method, device and system for updating shared file | |
KR101155203B1 (en) | Device and the method for installing application while downloading package files |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |