CN108933837A - A kind of transmission method and device of image file - Google Patents

A kind of transmission method and device of image file Download PDF

Info

Publication number
CN108933837A
CN108933837A CN201810889446.2A CN201810889446A CN108933837A CN 108933837 A CN108933837 A CN 108933837A CN 201810889446 A CN201810889446 A CN 201810889446A CN 108933837 A CN108933837 A CN 108933837A
Authority
CN
China
Prior art keywords
image file
fragment
merged
openstack
transferred
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810889446.2A
Other languages
Chinese (zh)
Inventor
王德群
孙永杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810889446.2A priority Critical patent/CN108933837A/en
Publication of CN108933837A publication Critical patent/CN108933837A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The embodiment of the invention discloses a kind of transmission methods of image file, comprising: virtual management platform receives the fragment of the first image file from browser end;The fragment of first image file is stored in local, and the fragment of the first image file is merged into the first image file;First image file being merged into is transferred in Openstack.Scheme through the invention realizes fragment and uploads image file to Openstack platform.

Description

A kind of transmission method and device of image file
Technical field
The present invention relates to field of cloud calculation more particularly to the transmission methods and device of a kind of image file.
Background technique
Cloud computing rapidly develops, and present enterprise is all in the privately owned cloud service for building oneself, under normal circumstances, privately owned cloud service It is all by virtual platform creation cluster virtual machine realization, such as Huawei's virtualization, VMware virtualization etc..Virtualization now Platform has been integrated with Openstack platform, and in integrated Openstack platform process, it has been related to image file upload Function, and Openstack provide image file upload interface can not achieve fragment upload, therefore, how to realize on fragment Image file is passed to be a technical problem to be solved urgently to Openstack platform.
Summary of the invention
The main purpose of the present invention is to provide a kind of transmission method of image file and devices, and fragment upload may be implemented Image file is to Openstack platform.
In order to solve the above-mentioned technical problems, the present invention provides a kind of transmission methods of image file, comprising:
Virtual management platform receives the fragment of the first image file from browser end;
The fragment of first image file is stored in local, and the fragment of the first image file is merged into the first mirror As file;
First image file being merged into is transferred in Openstack.
Further, it after first image file that will be merged into is transferred in Openstack, deletes local The first image file that is storing and being transferred in the Openstack.
Further, the fragment of first image file refers to, carries out Fragmentation institute to first image file The data packet of acquisition;The fragment of first image file is two or more.
Further, the fragment by first image file is stored in local, and dividing the first image file Piece is merged into the first image file, comprising:
By multiple fragments of received first image file be stored in local according to the index of each fragment;
After multiple fragments of first image file are stored in local, the first image file is merged into.
Further, first image file that will be merged into is transferred in Openstack, comprising:
Call the coffret of the Openstack image file;
First image file being merged into is transferred in Openstack by the coffret.
To solve the above-mentioned problems, the present invention also provides a kind of transmitting devices of image file, comprising: memory and place Manage device;
The memory, for saving the program of the transmission for managing image file;
The processor for reading the program for executing the transmission for being used to manage image file, and performs the following operations:
Virtual management platform receives the fragment of the first image file from browser end;
The fragment of first image file is stored in local, and the fragment of the first image file is merged into the first mirror As file;
First image file being merged into is transferred in Openstack.
Further, the processor reads the program for executing the transmission for being used to manage image file, also executes such as Lower operation:
After first image file that will be merged into is transferred in Openstack, delete it is being locally stored and The first image file being transferred in the Openstack.
Further, the fragment of first image file refers to, carries out Fragmentation institute to first image file The data packet of acquisition;The fragment of first image file is two or more.
Further, the fragment by first image file is stored in local, and dividing the first image file Piece is merged into the first image file, comprising:
By multiple fragments of received first image file be stored in local according to the index of each fragment;
After multiple fragments of first image file are stored in local, the first image file is merged into.
Further, first image file being merged into is transferred in Openstack, comprising:
Call the coffret of the Openstack image file;
First image file being merged into is transferred in Openstack by the coffret.
The invention proposes a kind of transmission methods of image file, comprising: virtual management platform is received from browser end The fragment of first image file;The fragment of first image file is stored in local, and by the fragment of the first image file It is merged into the first image file;First image file being merged into is transferred in Openstack.Side through the invention Case, solving cannot achieve fragment and uploads the problems such as image file is to Openstack platform.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention can be by specification, right Specifically noted structure is achieved and obtained in claim and attached drawing.
Detailed description of the invention
Attached drawing is used to provide to further understand technical solution of the present invention, and constitutes part of specification, with this The embodiment of application technical solution for explaining the present invention together, does not constitute the limitation to technical solution of the present invention.
Fig. 1 is the flow chart of the transmission method of the image file of the embodiment of the present invention;
Fig. 2 is the schematic diagram of the transmitting device of the image file of the embodiment of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention Embodiment be described in detail.It should be noted that in the absence of conflict, in the embodiment and embodiment in the application Feature can mutual any combination.
Step shown in the flowchart of the accompanying drawings can be in a computer system such as a set of computer executable instructions It executes.Also, although logical order is shown in flow charts, and it in some cases, can be to be different from herein suitable Sequence executes shown or described step.
Fig. 1 is the flow chart of the transmission method of the image file of the embodiment of the present invention, according to the flow chart, the present embodiment The transmission method of image file, comprising:
Step 100: virtual management platform receives the fragment of the first image file from browser end.
In the present embodiment, the first image file can be the mirror image text that any one browser end is sent to Openstack Part.
In the present embodiment, the first image file of user uploads in virtual management platform from browser end, optional Ground, the mode that fragment upload can be used are transferred to virtual management platform from browser end.
In some optional implementations of the present embodiment, the fragment of first image file refers to, to described One image file carries out Fragmentation data packet obtained;The fragment of first image file is two or more.
In one example, step 100 realizes that process can be with are as follows: browser end executes fragment behaviour to first image file Make.
In other implementations, fragment is not limited to the packing forms using data packet;When the first image file is smaller, Also the case where being not excluded for only one fragment.
Optionally, the first image file is obtained according to the fixed size cutting (i.e. progress Fragmentation) of preset value multiple Data packet, such as: it is cut according to 4MB, if the first image file size is 398MB, is cut according to 4MB, this One image file can be cut into 100 data packets;Other than the last one fragment only includes the data of 2MB, other fragments In include 4MB data.
Optionally, according to the size of the first image file, according to the size of memory space either other factors on demand into Row cutting, is arranged the sizes values of each fragment.
After dicing, data packet head can also be increased for each data packet, to carry the relevant information of fragment;For example, the It can be, but not limited to include the size of fragment and the index value of fragment in the data packet head of each fragment of one image file.
Step 101: the fragment of first image file being stored in local, and the fragment of the first image file is merged At the first image file.
In some optional implementations of the present embodiment, by received first image file multiple fragments according to The index of each fragment is stored in local;After multiple fragments of first image file are stored in local, is merged into One image file.
In other implementations, can also other than cutting by the way of obtain fragment, such as by the first image file, As a fragment, the data of even bit in this way when merging, are needed two fragments the data of odd bits as a fragment In data successively combined crosswise, merging obtains the first image file.Other than fragment listed above, merging mode, only It will be in fragment and when merging using corresponding rule, so that it may fragment be obtained by the first image file, and fragment is merged At the first image file.
In a kind of example, the realization process of step 101 can be with are as follows:
The first step determines the total quantity size of the fragment for the first image file that browser end uploads, such as: received the The fragment of one image file has 100;According to the size (such as 4MB) of each fragment, all points of first image file are calculated Total quantity size, that is, the 400MB of data accumulation together in piece.
Second step determines this according to the size for the size and locally available memory space for calculating the data volume obtained The fragment position of ground the first image file to be stored.
Third step, after determining the local position wait store, by multiple fragments of first image file according to each point The sequential storage of the index of piece is in local.
4th step merges into the first image file after multiple fragments of the first image file are stored in local.
Step 102: first image file being merged into is transferred in Openstack.
In the present embodiment, the first image file being merged into is transferred in Openstack by virtual management platform.
In some optional implementations of the present embodiment, the coffret of the Openstack image file is called; First image file being merged into is transferred in Openstack by the coffret.Wherein, described The coffret of Openstack image file does not support fragment to upload, and therefore, virtual management platform is by the first image file Fragment be stored in local after, multiple fragments of storage are merged into the first image file, the first image file can pass through The coffret of Openstack image file is transferred in Openstack.
In some optional implementations of the present embodiment, first image file that will be merged into is transferred to After in Openstack, the first image file that is being locally stored and being transferred in the Openstack is deleted, that is, It says, after the first image file that will be merged into is transferred in Openstack, in first image file being locally stored It is deleted, releases local storage space.
It should be noted that above content is only exemplary embodiment of the present invention, it is same as the previously described embodiments or similar Embodiment and above-described embodiment variant all within protection scope of the present invention.
In addition, this application provides a kind of one embodiment of the transmitting device of image file, the Installation practice and Fig. 1 Shown in embodiment of the method it is corresponding, which specifically can be applied in various electronic equipments.
As shown in Fig. 2, the transmitting device of the image file of the present embodiment, comprising: memory and processor;
The memory, for saving the program of the transmission for managing image file;
The processor for reading the program for executing the transmission for being used to manage image file, and performs the following operations:
Virtual management platform receives the fragment of the first image file from browser end;
The fragment of first image file is stored in local, and the fragment of the first image file is merged into the first mirror As file;
First image file being merged into is transferred in Openstack.
Optionally, the processor reads the program for executing the transmission for being used to manage image file, also executes as follows Operation:
After first image file that will be merged into is transferred in Openstack, delete it is being locally stored and The first image file being transferred in the Openstack.
Optionally, the fragment of first image file refers to, carries out Fragmentation to first image file and is obtained The data packet obtained;The fragment of first image file is two or more.
Optionally, the fragment of first image file is stored in local, and the fragment of the first image file is merged At the first image file, comprising:
By multiple fragments of received first image file be stored in local according to the index of each fragment;
After multiple fragments of first image file are stored in local, the first image file is merged into.
Optionally, first image file that will be merged into is transferred in Openstack, comprising:
Call the coffret of the Openstack image file;
First image file being merged into is transferred in Openstack by the coffret.
Other realization details of Installation practice can be found in embodiment of the method above.
The implementation process of one specific example of the present embodiment is as follows:
Step 1. browser end executes Fragmentation to the first image file, and the fragment of the first image file is uploaded to Virtual management platform;
Step 2. virtual management platform receives the fragment of the first image file;
Step 3. virtual management platform is by multiple fragments of received first image file according to the index of each fragment It is stored in local;And multiple fragments of the first image file are merged into the first image file.
Step 4. will be merged by calling the coffret of Openstack image file by the coffret First image file is transferred in Openstack.
Step 5. deletes the first image file that is being locally stored and being transferred in the Openstack.
A specific example based on the present embodiment, realizes a kind of transmission method of image file, and solving can not be real The problem of existing fragment uploads image file to Openstack platform.After the first image file is transferred to Openstack platform, The first image file being locally stored is deleted, local memory space is released.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
Embodiments of the present invention sequencing is for illustration only, does not represent the advantages or disadvantages of the embodiments.It is any with it is of the invention The same or similar scheme of mentality of designing, and be identical with the embodiment of the present invention or the change of similar scheme and the embodiment of the present invention Body is all within protection scope of the present invention.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of transmission method of image file, which is characterized in that the described method includes:
Virtual management platform receives the fragment of the first image file from browser end;
The fragment of first image file is stored in local, and the fragment of the first image file is merged into the first mirror image text Part;
First image file being merged into is transferred in Openstack.
2. the transmission method of image file according to claim 1, which is characterized in that described first will be merged into After image file is transferred in Openstack, the method also includes:
Delete the first image file that is being locally stored and being transferred in the Openstack.
3. the transmission method of image file according to claim 1, it is characterised in that:
The fragment of first image file refers to, carries out Fragmentation data packet obtained to first image file; The fragment of first image file is two or more.
4. the transmission method of image file according to claim 3, which is characterized in that described by first image file Fragment be stored in local, and the fragment of the first image file is merged into the first image file, comprising:
By multiple fragments of received first image file be stored in local according to the index of each fragment;
After multiple fragments of first image file are stored in local, the first image file is merged into.
5. the transmission method of image file according to claim 1, which is characterized in that described first will be merged into Image file is transferred in Openstack, comprising:
Call the coffret of the Openstack image file;
First image file being merged into is transferred in Openstack by the coffret.
6. a kind of transmitting device of image file, comprising: memory and processor;It is characterized by:
The memory, for saving the program of the transmission for managing image file;
The processor is executed described for managing the program of the transmission of image file, is performed the following operations for reading:
Virtual management platform receives the fragment of the first image file from browser end;
The fragment of first image file is stored in local, and the fragment of the first image file is merged into the first mirror image text Part;
First image file being merged into is transferred in Openstack.
7. the transmitting device of image file as claimed in claim 6, which is characterized in that the processor reads and is used for described in execution The program for managing the transmission of image file, also performs the following operations:
After first image file that will be merged into is transferred in Openstack, deletes being locally stored and passed Defeated the first image file in the Openstack.
8. the transmitting device of image file as claimed in claim 6, which is characterized in that
The fragment of first image file refers to, carries out Fragmentation data packet obtained to first image file; The fragment of first image file is two or more.
9. the transmitting device of image file as claimed in claim 8, which is characterized in that
The fragment by first image file is stored in local, and the fragment of the first image file is merged into the first mirror As file, comprising:
By multiple fragments of received first image file be stored in local according to the index of each fragment;
After multiple fragments of first image file are stored in local, the first image file is merged into.
10. the transmitting device of image file as claimed in claim 6, which is characterized in that
First image file that will be merged into is transferred in Openstack, comprising:
Call the coffret of the Openstack image file;
First image file being merged into is transferred in Openstack by the coffret.
CN201810889446.2A 2018-08-07 2018-08-07 A kind of transmission method and device of image file Pending CN108933837A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810889446.2A CN108933837A (en) 2018-08-07 2018-08-07 A kind of transmission method and device of image file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810889446.2A CN108933837A (en) 2018-08-07 2018-08-07 A kind of transmission method and device of image file

Publications (1)

Publication Number Publication Date
CN108933837A true CN108933837A (en) 2018-12-04

Family

ID=64445167

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810889446.2A Pending CN108933837A (en) 2018-08-07 2018-08-07 A kind of transmission method and device of image file

Country Status (1)

Country Link
CN (1) CN108933837A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111294410A (en) * 2020-05-11 2020-06-16 杭州朗澈科技有限公司 Method for uploading multi-region private mirror image warehouse by local mirror image
WO2021184992A1 (en) * 2020-03-16 2021-09-23 华为技术有限公司 Mirror image file uploading method, related device and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260229A (en) * 2015-10-28 2016-01-20 北京百度网讯科技有限公司 Method and device for pulling mirror image files of virtual machines
CN107426258A (en) * 2016-05-23 2017-12-01 华为技术有限公司 A kind of upload of image file and method for down loading and device
CN107483573A (en) * 2017-08-08 2017-12-15 郑州云海信息技术有限公司 The transmission method and device of image file in cloud platform
US20180159723A1 (en) * 2016-11-22 2018-06-07 Gigamon Inc. Network Visibility Appliances for Cloud Computing Architectures

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260229A (en) * 2015-10-28 2016-01-20 北京百度网讯科技有限公司 Method and device for pulling mirror image files of virtual machines
CN107426258A (en) * 2016-05-23 2017-12-01 华为技术有限公司 A kind of upload of image file and method for down loading and device
US20180159723A1 (en) * 2016-11-22 2018-06-07 Gigamon Inc. Network Visibility Appliances for Cloud Computing Architectures
CN107483573A (en) * 2017-08-08 2017-12-15 郑州云海信息技术有限公司 The transmission method and device of image file in cloud platform

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021184992A1 (en) * 2020-03-16 2021-09-23 华为技术有限公司 Mirror image file uploading method, related device and computer storage medium
CN111294410A (en) * 2020-05-11 2020-06-16 杭州朗澈科技有限公司 Method for uploading multi-region private mirror image warehouse by local mirror image

Similar Documents

Publication Publication Date Title
US9632826B2 (en) Prioritizing deferred tasks in pending task queue based on creation timestamp
US20180027061A1 (en) Method and apparatus for elastically scaling virtual machine cluster
US11150949B2 (en) Resource release method, resource allocation method, devices, and computer program products
US20180006963A1 (en) Network-accessible data volume modification
KR102594657B1 (en) Method and apparatus for implementing out-of-order resource allocation
EP3051408B1 (en) Data operating method and device
US20180004698A1 (en) Network-accessible data volume modification
US9514072B1 (en) Management of allocation for alias devices
CN108829510B (en) Thread binding processing method and device
US20150112935A1 (en) Managing log data using a circular fixed size file
US8903804B2 (en) Data existence judging device and data existence judging method
CN107835986B (en) Data operation method of electronic equipment and electronic equipment
CN108933837A (en) A kind of transmission method and device of image file
CN104991949B (en) Mobile terminal and its file management system and method
CN104052626A (en) Method, device and system for configuring network element data
JP2016533588A (en) Storage processing method, apparatus and terminal
US9715448B2 (en) Efficiently using memory for Java collection objects
CN103491193A (en) Method and device for sharing file
CN103092768A (en) Method and device of data processing in application system
US9858204B2 (en) Cache device, cache system, and cache method
CN113742131B (en) Method, electronic device and computer program product for storage management
CN108959517B (en) File management method and device and electronic equipment
CN109478151B (en) Network accessible data volume modification
CN111176571A (en) Method, device, equipment and medium for managing local object
CN105573846A (en) Inter-process communication method and inter-process communication device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181204