Image download method, device and medium

By sharding the image and storing and downloading it in multiple cloud areas, the problem of low image download efficiency is solved, and a more efficient download process is achieved and the user experience is improved.

CN113315800BActive Publication Date: 2025-03-11HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010124217.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-02-27
Publication Date
2025-03-11
Estimated Expiration
2040-02-27

AI Technical Summary

Technical Problem

Mirror download efficiency is low, affecting the user experience.

Method used

By dividing the image into multiple shard files and storing and copying these shard files in multiple areas of the cloud platform, the downloader can concurrently download shard files from multiple areas, thereby improving download efficiency.

Benefits of technology

It effectively improves the efficiency of mirror download, reduces download time, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113315800B_ABST
    Figure CN113315800B_ABST
Patent Text Reader

Abstract

The present application provides a method, device and medium for image downloading. The method includes: an image storage method, applied to the area of ​​a cloud platform, the cloud platform includes at least two areas, each area includes multiple computing nodes for running a storage module, a sharding module, an object storage module and a copy module, the method includes: the storage module running in the first area stores the image, wherein the image is a copy of a file; the sharding module running in the first area divides the image into multiple shard files, and stores the multiple shard files in the object storage module running in the first area; the copy module running in the first area copies the multiple shard files stored in the object storage module running in the first area to the second area, wherein the first area and the second area are located in different geographical locations. The above method can effectively improve the efficiency of image downloading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud technology, and in particular to an image downloading method, device and medium. Background Art

[0002] Mirroring is a form of file storage and a type of redundancy. The data on one disk has an identical copy on another disk. In actual applications, one or more files can be mirrored, and then restored to one or more files.

[0003] However, mirror downloading often takes a long time and the download efficiency is not high, which greatly affects the user experience. Summary of the invention

[0004] In order to solve the above problems, the present application provides an image downloading method, device and medium, which can effectively improve the efficiency of image downloading.

[0005] In a first aspect, a mirror storage method is provided, which is applied to a region of a cloud platform, wherein the cloud platform includes at least two regions, each region includes a plurality of computing nodes for running a storage module, a sharding module, an object storage module, and a copy module, and the method includes:

[0006] A storage module running in the first region stores an image, wherein the image is a copy of a file;

[0007] The sharding module running in the first area divides the image into a plurality of shard files, and stores the plurality of shard files in the object storage module running in the first area;

[0008] The copy module running in the first area copies the multiple shard files stored in the object storage module running in the first area to the second area, wherein the first area and the second area are located in different geographical locations.

[0009] In some possible designs, the copy module running in the first area copies the multiple shard files stored in the object storage module running in the first area to the second area, including:

[0010] The copy module running in the first area copies the multiple fragment files stored in the object storage module running in the first area to the second area through the high-speed channel between the first area and the second area.

[0011] In some possible designs, the copy module running in the first area copies the multiple shard files stored in the object storage module running in the first area to the second area, including:

[0012] When the usage rate of the high-speed channel is less than a preset threshold, the copy module running in the first area copies the multiple fragment files stored in the object storage module running in the first area to the second area through the high-speed channel between the first area and the second area.

[0013] In some possible designs, the method further includes:

[0014] The encryption module running in the first area inputs the image into the integrity encryption algorithm to obtain a first encrypted value;

[0015] The encryption module running in the first region stores the first encrypted value in an object storage module running in the first region.

[0016] In a second aspect, a mirror download method is provided, comprising:

[0017] The download end receives an image creation request, the image creation request is used to request the cloud platform to download an image, the image includes multiple slice files, the cloud platform includes at least two areas, each area includes multiple computing nodes for storing the multiple slice files, and each area is located in a different geographical location;

[0018] The download end creates at least two threads, and each thread downloads at least one segment file from at least one area, and the at least two threads cooperate to download the multiple segment files;

[0019] The download end merges the multiple downloaded fragment files to obtain the image.

[0020] In some possible designs, the slice files include: a first slice file, a second slice file, ..., an mth slice file, the threads include: a first thread, a second thread, ..., an nth thread, the regions include: a first region, a second region, ..., an nth region, wherein m and n are both positive integers, and m is greater than n; the download end creates at least two threads, and downloads at least one slice file from at least one region through each thread, and the at least two threads cooperate to download the multiple slice files, including:

[0021] At time T0, the download end downloads the first fragment file from the first area through the first thread at the first download rate, downloads the second fragment file from the second area through the second thread at the second download rate, ..., downloads the nth fragment file from the nth area through the nth thread at the nth download rate; wherein the i-th download rate is the maximum download rate among the n download rates, i is a positive integer, and 0 <i≤n;

[0022] At time T1, the download end finishes downloading the i-th fragment file from the i-th area through the i-th thread at the i-th download rate, starts downloading the n+1-th fragment file from the i-th area at the i-th download rate, and the other threads remain unchanged.

[0023] In some possible designs, the slice files include: a first slice file, a second slice file, ..., an mth slice file, the threads include: a first thread, a second thread, ..., an mth thread, the regions include: a first region, a second region, ..., an mth region, the download end creates at least two threads, and downloads at least one slice file from at least one region through each thread, and the at least two threads cooperate to download the multiple slice files, including:

[0024] The download end downloads the first fragment file from the first area through the first thread, downloads the second fragment file from the second area through the second thread, ..., and downloads the mth fragment file from the mth area through the mth thread.

[0025] In some possible designs, the shard files include: a first group of shard files, a second group of shard files, ..., an mth group of shard files, the threads include: a first thread, a second thread, ..., an mth thread, the regions include: a first region, a second region, ..., an mth region, the download end creates at least two threads, and downloads at least one shard file from at least one region through each thread, and the at least two threads cooperate to download the multiple shard files, including:

[0026] The download end downloads a first group of fragment files from a first area through a first thread, downloads a second group of fragment files from a second area through a second thread, ..., and downloads an mth group of fragment files from an mth area through an mth thread.

[0027] In some possible designs, the method further includes:

[0028] The download end downloads a first encrypted value, wherein the first encrypted value is obtained by encrypting the image before sharding using an integrity encryption algorithm;

[0029] The download end encrypts the restored image using the integrity encryption algorithm to obtain a second encrypted value;

[0030] When the first encryption value and the second encryption value are the same, it is determined that the restored image and the image before sharding are the same.

[0031] In a third aspect, a computing node cluster is provided, the computing node cluster constituting a first area, the computing node cluster comprising: a storage module, a sharding module, and an object storage module,

[0032] The storage module is used to store an image, wherein the image is a copy of a file;

[0033] The sharding module is used to divide the image into a plurality of shard files, and store the plurality of shard files in an object storage module running in the first region;

[0034] The copy module copies the multiple shard files stored in the object storage module running in the first area to the second area, wherein the first area and the second area are located in different geographical locations.

[0035] In some possible designs, the copy module is specifically used to copy the multiple shard files stored in the object storage module running in the first area to the second area through a high-speed channel between the first area and the second area.

[0036] In some possible designs, the copy module is specifically used to copy the multiple shard files stored in the object storage module running in the first area to the second area through the high-speed channel between the first area and the second area when the usage rate of the high-speed channel is less than a preset threshold.

[0037] In some possible designs, the computing node cluster further includes an encryption module.

[0038] The encryption module is used to input the image into the integrity encryption algorithm to obtain a first encryption value;

[0039] The encryption module is used to store the first encrypted value in an object storage module running in the first area.

[0040] In a fourth aspect, a download terminal is provided, comprising a receiving module, a downloading module and a merging module.

[0041] The receiving module is used to receive an image creation request, the image creation request is used to request the cloud platform to download an image, the image includes multiple slice files, the cloud platform includes at least two areas, each area includes multiple computing nodes for storing the multiple slice files, and each area is located in a different geographical location;

[0042] The download module is used to create at least two threads, and each thread downloads at least one segment file from at least one area, and the at least two threads cooperate to download the multiple segment files;

[0043] The merging module is used to merge the multiple fragment files obtained by downloading to obtain the image.

[0044] In some possible designs, the slice files include: a first slice file, a second slice file, ..., an mth slice file, the threads include: a first thread, a second thread, ..., an nth thread, the regions include: a first region, a second region, ..., an nth region, wherein m and n are both positive integers, and m is greater than n; the download module is specifically used for:

[0045] At time T0, the download end downloads the first fragment file from the first area through the first thread at the first download rate, downloads the second fragment file from the second area through the second thread at the second download rate, ..., downloads the nth fragment file from the nth area through the nth thread at the nth download rate; wherein the i-th download rate is the maximum download rate among the n download rates, i is a positive integer, and 0 <i≤n;

[0046] At time T1, the download end finishes downloading the i-th fragment file from the i-th area through the i-th thread at the i-th download rate, starts downloading the n+1-th fragment file from the i-th area at the i-th download rate, and the other threads remain unchanged.

[0047] In some possible designs, the shard file includes: a first shard file, a second shard file, ..., an mth shard file; the thread includes: a first thread, a second thread, ..., an mth thread; the region includes: a first region, a second region, ..., an mth region;

[0048] The download module is specifically used to download a first fragment file from a first area through a first thread, download a second fragment file from a second area through a second thread, ..., download an mth fragment file from an mth area through an mth thread.

[0049] In some possible designs, the shard files include: a first group of shard files, a second group of shard files, ..., an mth group of shard files; the threads include: a first thread, a second thread, ..., an mth thread; the regions include: a first region, a second region, ..., an mth region;

[0050] The download module is specifically configured to download a first group of fragment files from a first area through a first thread, download a second group of fragment files from a second area through a second thread, ..., download an mth group of fragment files from an mth area through an mth thread.

[0051] In some possible designs, the download end further includes an encryption module and a determination module.

[0052] The download module is further used to download a first encrypted value, wherein the first encrypted value is obtained by encrypting the image before sharding using an integrity encryption algorithm;

[0053] The encryption module is used to encrypt the restored image by using the integrity encryption algorithm to obtain a second encryption value;

[0054] The determination module is used to determine that the restored image is the same as the image before sharding when the first encryption value and the second encryption value are the same.

[0055] In a fifth aspect, a computing node cluster is provided, comprising at least one computing node, wherein the computing node comprises a processor and a memory, and the processor executes a code in the memory to perform the method as described in any one of the first aspects.

[0056] In a sixth aspect, a method comprising a processor and a memory is provided, wherein the processor executes the code in the memory to perform the method as described in any one of the second aspects.

[0057] In a seventh aspect, a computer-readable storage medium is provided, comprising instructions, which, when executed on a computing device, cause the computing device to execute the method as described in any one of the first aspect or the second aspect.

[0058] In an eighth aspect, a computer program product is provided. When the computer program product is read and executed by a terminal device, the method described in any one of the first aspect or the second aspect will be executed.

[0059] In the above scheme, the image is divided into several fragment files and copied to multiple different areas. The download end can start multiple threads to download the fragments of the image from different areas respectively, that is, the download end can concurrently download the fragment files of the image from multiple channels at the same time, therefore, the efficiency of image downloading can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0061] Figure 1 is a schematic diagram of a cloud platform involved in this application;

[0062] Figure 2 This is a schematic diagram of the download end downloading the image from the cloud platform in this application;

[0063] Figure 3 It is a schematic diagram of the cloud platform in this application copying multiple shard files from one area to multiple areas;

[0064] FIG. 4A to FIG. 4C It is a schematic diagram of the various moments when the download end dynamically downloads multiple fragment files from multiple regions;

[0065] FIG. 5A to FIG. 5D It is a schematic diagram of the download end downloading multiple shard files from multiple areas in a static manner;

[0066] Figure 6 This is a flowchart of a method for uploading and downloading an image provided by the present application;

[0067] Figure 7 It is a structural diagram of a cloud platform involved in this application;

[0068] Figure 8 It is a structural diagram of a download terminal involved in this application;

[0069] Fig. 9 It is a schematic diagram of a mirror download system provided by this application. DETAILED DESCRIPTION

[0070] Cloud platform, also known as cloud computing platform, refers to a platform that provides computing, network and storage capabilities based on hardware and software resources. Figure 1 As shown, the cloud platform usually includes multiple regions, for example, region 1, region 2, ..., region T. Each region includes multiple computing nodes, and there are high-speed channels between different regions to facilitate data transmission between regions. There are many ways to divide the regions, for example, it can be divided into the United States region, the United Kingdom region, the Canadian region, the French region, and the Chinese region, etc., it can be divided into the East China region, the South China region, the West China region, the North China region, and the Central China region, etc., and it can also be divided into the Beijing region, the Shanghai region, the Guangzhou region, the Shenzhen region, and the Chongqing region, etc. It should be understood that the above examples are for illustration only and do not constitute specific limitations.

[0071] like Figure 2 As shown in Figure 1, the cloud platform provides a variety of images for downloaders to choose from. Specifically, the uploader can publish the image to the cloud platform, and the downloader can download the image from the cloud platform, thus completing the transaction between the uploader and the downloader.

[0072] The uploader can be a public cloud, a private cloud, a hybrid cloud or a terminal device, etc. Here, the terminal device can be a smart phone, a handheld processing device, a tablet computer, a personal computer, a mobile notebook, a virtual reality device, an integrated handheld device, a vehicle-mounted device, an intelligent conference device, an intelligent advertising device, an intelligent home appliance, a wearable device, etc., among which a wearable device can also be called a wearable intelligent device, which is a general term for the intelligent design of daily wearables and the development of wearable devices using wearable technology, such as glasses, gloves, watches, clothing and shoes. A wearable device can be a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices can achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable intelligent devices include full-featured, large-size, and can achieve complete or partial functions without relying on smart phones, such as smart watches or smart glasses, etc., as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smart phones, such as various types of smart bracelets and smart jewelry for vital sign monitoring. It should be understood that the above examples are only for illustration and cannot constitute a specific limitation.

[0073] The downloader can also be a public cloud, private cloud, hybrid cloud or terminal device, etc., which will not be described in detail here.

[0074] The cloud platform can be a public cloud, a private cloud, or a hybrid cloud, etc. When the carrier is a public cloud, the cloud market can be called a public cloud market; when the carrier is a private cloud, the cloud market can be called a private cloud market; when the carrier is a hybrid cloud, the cloud market can be called a hybrid cloud market. It should be understood that the above examples of cloud platforms are only used as specific examples. In actual applications, more types of clouds will be derived with the development of technology, and no specific limitation is made here.

[0075] The capacity of the image has many levels, for example, it can be kilo (K) level, mega (M) level, giga (G) level, tera (T) level, peta (P) level, tera (E) level, zeta (Z) level and yaw (Y) level, etc. The files used to make the image can be diverse, for example, operating systems, application software, services and games, etc. In general, the level of the image made by the application software may be mega level, the level of the image made by the operating system may be giga level, the level of the image made by the service may be tera level, etc. It can be understood that the examples of the number of levels of the above images are only used as specific examples. In actual applications, with the rapid development of technology, more and more higher numbers may appear, and no specific limitation is made this time.

[0076] However, as the image becomes larger and larger, the time required to download the image will become longer and longer. Moreover, when the image is updated, it needs to be downloaded again, resulting in unnecessary waste of time.

[0077] In order to solve the above problems, the present application provides an image storage and downloading method, device and system, which can effectively reduce the time required for downloading images.

[0078] When publishing the image, the encryption module running in the first area of ​​the cloud platform inputs the image into the integrity encryption algorithm to obtain a first encryption value. In a specific embodiment, the integrity encryption algorithm can be expressed as:

[0079]

[0080] in, Represented as a mirror image, Represented as the first encrypted value, It is expressed as an encryption algorithm, that is, a mapping relationship between the image and the first encryption value. The encryption algorithm may include SHA-256 and the like. Taking the SHA-256 algorithm as an example, the data is decomposed into blocks of 512 bits in size, assuming that it is divided into n small blocks, the algorithm completes n iterations, and the result of n iterations is the final hash value, that is, a 256-bit digital summary, which is the first encryption value. It should be understood that the above examples of integrity encryption algorithms are only used as specific examples and should not constitute specific limitations.

[0081] The compression module running in the first area of ​​the cloud platform compresses the image input compression algorithm to obtain a compressed file. In a specific embodiment, the compression algorithm can be expressed as:

[0082]

[0083] in, Represented as a mirror image, Represented as a compressed file, It is expressed as a compression algorithm, that is, a mapping relationship between an image and a compressed file. The compression algorithm may be a lossless compression algorithm or a lossy compression algorithm. The lossless compression algorithm may be a Huffman algorithm and an LZW (Lenpel-Ziv & Welch) compression algorithm, etc. The lossy compression algorithm may be a pulse code modulation (PCM), predictive coding, transform coding, interpolation and extrapolation, statistical coding, vector quantization, and subband coding, etc. It should be understood that the above examples of compression algorithms are only used as specific examples and should not constitute specific limitations.

[0084] The sharding module running in the first area of the cloud platform divides the compressed file into multiple sharded files and stores them in the object storage module running in the first area. Here, the sizes of the sharded files can be the same or different. Among them, the size of the sharded file is affected by factors such as the size of the compressed file, the download speed requirement, the size of the bandwidth, the number of threads, and so on. For example, the larger the size of the compressed file, the larger the size of the sharded file; the faster the download speed requirement, the smaller the size of the sharded file; the larger the size of the bandwidth, the larger the size of the sharded file; the more the number of threads, the smaller the size of the sharded file. It should be understood that the above examples of influencing factors are only for specific illustration and should not constitute specific limitations.

[0085] The copy module running in the first area of the cloud platform can copy the multiple sharded files and the first encryption value in the first area to the object storage modules in other areas according to the replication policy. Among them, the replication policy can be to copy the multiple sharded files of the object storage module in the first area to the object storage modules in other areas during idle time. Here, idle time means that the usage rate of the high-speed channel is less than the preset threshold, etc. Taking Figure 3 as an example, the cloud platform includes Area 1, Area 2, …, Area T. Two images are stored in Area 1 of the cloud platform. Among them, Image 1 is divided into Sharded File 1, Sharded File 2, …, Sharded File m, and Image 2 is divided into Sharded File 1, Sharded File 2, …, Sharded File n. The cloud platform copies Image 1 and Image 2 in the object storage module of Area 1 to the object storage modules of Area 2, Area 3, …, Area T during idle time respectively. It can be understood that the above example is only for illustration. In actual applications, Image 1 and Image 2 can also be copied to the object storage modules in Area 1, Area 2, …, Area S respectively, where S < T; Image 1 can also be copied to the object storage modules in Area 1, Area 2, …, Area S respectively, and the object storage module of Image 2 can be copied to the object storage modules in Area S + 1, Area S + 2, …, Area T; Image 1 can also be copied to the object storage modules in Area 1, Area 2, …, Area S respectively, and Image 2 can be copied to the object storage modules in Area S - 2, Area S - 1, Area S, Area S + 1, …, Area T. That is to say, there are object storage modules in some areas that only copy Image 1, object storage modules in some areas that only copy Image 2, and object storage modules in some areas that copy both Image 1 and Image 2 at the same time. No specific limitations are made here.

[0086] The download end starts multiple threads to download the multiple sharded files from multiple areas. Here, the method for the download end to download multiple sharded files through multiple threads can include a dynamic method and a static encryption algorithm.

[0087] The following is a detailed introduction to the specific method of dynamically downloading multiple segment files through multi-threading on the download end.

[0088] In the method of dynamically starting multiple threads to download the multiple slice files from multiple regions at the download end, the principle is followed that whoever finishes downloading first will continue to download the next file slice. The following is explained in conjunction with a specific embodiment. Assume that the image on the cloud platform is divided into slice file 1, slice file 2, ..., slice file m, and the m slice files of the image are copied to the object storage modules of region 2 and region 3 respectively. The download end starts thread 1, thread 2 and thread 3. At time T0, if Figure 4A As shown in the figure, thread 1 downloads fragment file 1 from region 1 at a download rate of 1.52Mb / S, thread 2 downloads fragment file 2 from region 2 at a download rate of 2.58Mb / S, and thread 3 downloads fragment file 3 from region 3 at a download rate of 4.62Mb / S. At time T1, Figure 4B As shown in FIG. 1 , thread 1 continues to download segment file 1 from region 1 at a download rate of 1.52 Mb / S, thread 2 continues to download segment file 2 from region 2 at a download rate of 2.58 Mb / S, and thread 3 has completed downloading segment file 3 from region 3. Therefore, thread 3 continues to download segment file 4 from region 3. At time T2, as shown in FIG. Figure 4C As shown, thread 1 continues to download segment file 1 from area 1 at a download rate of 1.52Mb / S, thread 2 has completed downloading segment file 2 from area 2, thread 3 continues to download segment file 4 from area 3 at a download rate of 4.62Mb / S, then thread 2 continues to download segment file 5 from area 2, and so on, until m files are downloaded. It should be understood that Figure 4A and Figure 4C The embodiment shown is only a specific embodiment. In other embodiments, the number of regions, the number of threads, the download rate, etc. may also be other values, which are not specifically limited here.

[0089] In addition to the above download end dynamically downloading multiple segment files through multi-threading, there are also the following ways to download multiple segment files statically through multi-threading:

[0090] In the first method, Figure 5AAs shown in the example, the image in area 1 of the cloud platform is divided into m slice files, namely slice file 1, slice file 2, ..., slice file m, and the m slice files of the image are copied sequentially to the object storage modules of area 2, area 3 and area m respectively. The download end starts threads 1, 2, ..., and m. Among them, the download end downloads slice file 1 from the object storage module of area 1 through thread 1, downloads slice file 2 from the object storage module of area 2 through thread 2, ..., and downloads slice file m from the object storage module of area m through thread m. It can be understood that this method is suitable for scenarios with a small number of slice files, or scenarios where the object storage modules of many areas in the cloud platform have copied the image files.

[0091] In the second method, Figure 5B As shown in the example, the image on the cloud platform is divided into the first group of shard files, the second group of shard files, ..., the mth group of shard files, and the m groups of shard files of the image are copied to the object storage module of area 2, the object storage module of area 3, and the object storage module of area m respectively. Among them, the first group of shard files includes shard file 1,1, shard file 2,1, ..., shard file n,1; the second group of shard files includes shard file 1,2, shard file 2,2, ..., shard file n,2; ...; the mth group of shard files includes shard file 1,m, shard file 2,m, ..., shard file n,m. The download end starts thread 1, thread 2, ..., thread m. Among them, the download end downloads the first group of shard files from the object storage module of area 1 through thread 1, downloads the second group of shard files from the object storage module of area 2 through thread 2, ..., and downloads the mth group of shard files from the object storage module of area m through thread m. It can be understood that this method is suitable for scenarios with a large number of shard files, or scenarios where image files are copied in object storage modules with fewer regions in a cloud platform.

[0092] The above-mentioned manner is only a specific embodiment, and in practical applications, it can also be modified on the basis of the above-mentioned manner, and is not specifically limited here.

[0093] For the first method, Figure 5CAs shown in the example, the image on the cloud platform is divided into slice file 1, slice file 2, ..., slice file m, and the m slice files of the image are copied to the object storage module of area 2, the object storage module of area 3, and the object storage module of area mn respectively. The download end starts threads 1, 2, ..., and mn. The download end first downloads slice file 1 from the object storage module of area 1 through thread 1, downloads slice file 2 from the object storage module of area 2 through thread 2, ..., downloads slice file mn from the object storage module of area mn through thread mn, downloads slice file m-n+1, ​​..., and downloads slice file m.

[0094] For the second method, Figure 5D As shown in the example, the image on the cloud platform is divided into the first group of shard files, the second group of shard files, ..., the mth group of shard files, and the m groups of shard files of the image are copied to the object storage module of area 2, the object storage module of area 3, and the object storage module of area m respectively. Among them, the first group of shard files includes shard file 1,1, shard file 2,1, ..., shard file n,1; the second group of shard files includes shard file 1,2, shard file 2,2, ..., shard file n,2; ...; the mth group of shard files includes shard file 1,m, shard file 2,m, ..., shard file n-1,m. The download end starts thread 1, thread 2, ..., thread m. Among them, the download end downloads the first group of shard files from the object storage module of area 1 through thread 1, downloads the second group of shard files from the object storage module of area 2 through thread 2, ..., and downloads the mth group of shard files from the object storage module of area m through thread m.

[0095] It should be understood that the above-mentioned deformation modes are only a part of many deformation modes. In practical applications, there may be more deformation modes, which are not specifically limited here.

[0096] In addition to downloading the fragment files of the image, the download end also obtains the integrity encryption algorithm and the first encryption value from one area or multiple areas.

[0097] The download end merges the multiple downloaded fragment files to restore the compressed file. Specifically, the fragment files downloaded to the download end can be stored in a high-speed SSD disk and asynchronously stored in the final storage medium (such as NAS, object storage, etc.) at the back end. In addition, the merged file obtained after merging can also be stored in a high-speed SSD disk.

[0098] The download end inputs the compressed file into the decompression algorithm for compression, thereby restoring the image. In a specific embodiment, the decompression algorithm can be expressed as:

[0099]

[0100] in, Represented as a mirror image, Represented as a compressed file, It is expressed as a decompression algorithm, that is, the mapping relationship between the compressed file and the image. Among them, the decompression algorithm can be the inverse operation of the lossless compression algorithm or the inverse operation of the lossy compression algorithm. The inverse operation of the lossless compression algorithm can be the inverse operation of the Huffman algorithm and the inverse operation of the LZW (Lenpel-Ziv&Welch) compression algorithm, etc. The inverse operation of the lossy compression algorithm can be the inverse operation of pulse code modulation (Pulse Code Modulation, PCM), the inverse operation of predictive coding, the inverse operation of transform coding, the inverse operation of interpolation and the inverse operation of extrapolation, the inverse operation of statistical coding, the inverse operation of vector quantization and the inverse operation of sub-band coding, etc. It should be understood that the above-mentioned examples of decompression algorithms are only used as specific examples and should not constitute specific limitations.

[0101] The download end inputs the restored image of the cloud platform into the integrity encryption algorithm to obtain the second encryption value. In a specific embodiment, the integrity encryption algorithm can be expressed as:

[0102]

[0103] in, Represents a restored image. Represented as the second encrypted value, It is expressed as an integrity encryption algorithm, that is, the mapping relationship between the restored image and the second encryption value. When the first encryption value and the second encryption value are the same, it means that the restored image is correct. When the first encryption value and the second encryption value are different, it means that the restored image has an error and needs to be downloaded again. Here, the integrity encryption algorithm used by the cloud platform and the integrity encryption algorithm used by the download end are the same integrity encryption algorithm.

[0104] like Figure 6 As shown, Figure 6 This is a flowchart of a mirror upload and download method provided by this application. Figure 6 As shown, the image uploading method involved in the present application is applied to the area of ​​the cloud platform, the cloud platform includes at least two areas, each area includes multiple computing nodes for running a storage module, a sharding module, an object storage module and a copy module, here, the storage module running in the first area stores the image, and the method includes:

[0105] S101: A sharding module running in the first area divides the image into multiple shard files, and stores the multiple shard files in an object storage module running in the first area.

[0106] In a specific embodiment of the present application, the sizes of the slice files may be the same or different. The size of the slice files is affected by factors such as the size of the compressed file, the download speed requirement, the size of the bandwidth, the number of threads, and the like. For example, the larger the size of the compressed file, the larger the size of the slice file; the faster the download speed requirement, the smaller the size of the slice file; the larger the size of the bandwidth, the larger the size of the slice file; the more the number of threads, the smaller the size of the slice file. It should be understood that the above examples of influencing factors are merely specific examples and should not constitute specific limitations.

[0107] S102: The copy module running in the first area copies the multiple shard files stored in the object storage module running in the first area to the second area, wherein the first area and the second area are located in different geographical locations.

[0108] In a specific embodiment of the present application, the copy module running in the first area can copy the multiple shard files and the first encrypted value in the object storage module of the first area to the object storage modules of other areas according to the replication strategy. The replication strategy can be to copy the multiple shard files in the object storage module of the first area to the object storage modules of other areas during idle time. Here, idle time refers to the usage rate of the high-speed channel being less than a preset threshold, etc.

[0109] In the specific embodiment of the present application, Figure 3Taking the example shown, the cloud platform includes Region 1, Region 2, …, Region T. Two images are stored in Region 1 of the cloud platform. Among them, Image 1 is divided into shard files 1, shard file 2, …, shard file m, and Image 2 is divided into shard files 1, shard file 2, …, shard file n. The cloud platform copies Image 1 and Image 2 of the object storage module in Region 1 to the object storage modules in Region 2, Region 3, …, Region T respectively during idle time. It can be understood that the above example is only for illustration. In actual applications, Image 1 and Image 2 can also be copied to the object storage modules in Region 1, Region 2, …, Region S respectively, where S < T; Image 1 can also be copied to the object storage modules in Region 1, Region 2, …, Region S respectively, and the object storage module of Image 2 can be copied to the object storage modules in Region S + 1, Region S + 2, …, Region T; Image 1 can also be copied to the object storage modules in Region 1, Region 2, …, Region S respectively, and Image 2 can be copied to the object storage modules in Region S - 2, Region S - 1, Region S, Region S + 1, …, Region T. That is to say, there are object storage modules in some regions that only copy Image 1, there are object storage modules in some regions that only copy Image 2, and there are also object storage modules in some regions that copy both Image 1 and Image 2 at the same time. No specific limitation is made here.

[0110] S103: In the case of receiving an image creation request, the download end creates at least two threads, and downloads at least one shard file from at least one region through each thread, and the at least two threads cooperate to download the multiple shard files.

[0111] In a specific embodiment of the present application, the manner in which the download end creates at least two threads, and downloads at least one shard file from at least one region through each thread, and the at least two threads cooperate to download the multiple shard files can include a dynamic manner and a static manner.

[0112] In the dynamic manner, follow the principle that whoever finishes downloading first will continue to download the next file shard. The following will be described in combination with specific embodiments. Assume that the image is divided into shard files 1, shard file 2, …, shard file m, and the m shard files of the image are respectively copied to the object storage modules in Region 2 and Region 3. The download end starts Thread 1, Thread 2, and Thread 3. At time T0, as Figure 4A shown, Thread 1 downloads shard file 1 from the object storage module in Region 1 at a download rate of 1.52 Mb / S, Thread 2 downloads shard file 2 from the object storage module in Region 2 at a download rate of 2.58 Mb / S, and Thread 3 downloads shard file 3 from the object storage module in Region 3 at a download rate of 4.62 Mb / S. At time T1, as Figure 4BAs shown, thread 1 continues to download fragment file 1 from the object storage module in area 1 at a download rate of 1.52 Mb / S, thread 2 continues to download fragment file 2 from the object storage module in area 2 at a download rate of 2.58 Mb / S, and thread 3 has completed downloading fragment file 3 from the object storage module in area 3. Therefore, thread 3 continues to download fragment file 4 from the object storage module in area 3. At time T2, as shown in FIG. Figure 4C As shown, thread 1 continues to download segment file 1 from the object storage module in area 1 at a download rate of 1.52Mb / S, thread 2 has completed downloading segment file 2 from the object storage module in area 2, thread 3 continues to download segment file 4 from the object storage module in area 3 at a download rate of 4.62Mb / S, then thread 2 continues to download segment file 5 from the object storage module in area 2, and so on, until m files are downloaded. It should be understood that Figure 4A and Figure 4C The embodiment shown is only a specific embodiment. In other embodiments, the number of regions, the number of threads, the download rate, etc. may also be other values, which are not specifically limited here.

[0113] In addition to the above download end to download multiple fragment files dynamically, there are also the following ways to download multiple fragment files statically:

[0114] In the first method, Figure 5A As shown in the example, the image in area 1 of the cloud platform is divided into m slice files, namely slice file 1, slice file 2, ..., slice file m, and the m slice files of the image are copied sequentially to the object storage modules of area 2, area 3 and area m respectively. The download end starts threads 1, 2, ..., and m. Among them, the download end downloads slice file 1 from the object storage module of area 1 through thread 1, downloads slice file 2 from the object storage module of area 2 through thread 2, ..., and downloads slice file m from the object storage module of area m through thread m. It can be understood that this method is suitable for scenarios with a small number of slice files, or scenarios where the object storage modules of many areas in the cloud platform have copied the image files.

[0115] In the second method, Figure 5BAs shown in the example, the image on the cloud platform is divided into the first group of shard files, the second group of shard files, ..., the mth group of shard files, and the m groups of shard files of the image are copied to the object storage module of area 2, the object storage module of area 3, and the object storage module of area m respectively. Among them, the first group of shard files includes shard file 1,1, shard file 2,1, ..., shard file n,1; the second group of shard files includes shard file 1,2, shard file 2,2, ..., shard file n,2; ...; the mth group of shard files includes shard file 1,m, shard file 2,m, ..., shard file n,m. The download end starts thread 1, thread 2, ..., thread m. Among them, the download end downloads the first group of shard files from the object storage module of area 1 through thread 1, downloads the second group of shard files from the object storage module of area 2 through thread 2, ..., and downloads the mth group of shard files from the object storage module of area m through thread m. It can be understood that this method is suitable for scenarios with a large number of shard files, or scenarios where image files are copied in object storage modules with fewer regions in a cloud platform.

[0116] The above-mentioned manner is only a specific embodiment, and in practical applications, it can also be modified on the basis of the above-mentioned manner, and is not specifically limited here.

[0117] For the first method, Figure 5C As shown in the example, the image on the cloud platform is divided into slice file 1, slice file 2, ..., slice file m, and the m slice files of the image are copied to the object storage module of area 2, the object storage module of area 3, and the object storage module of area mn respectively. The download end starts threads 1, 2, ..., and mn. The download end first downloads slice file 1 from the object storage module of area 1 through thread 1, downloads slice file 2 from the object storage module of area 2 through thread 2, ..., downloads slice file mn from the object storage module of area mn through thread mn, downloads slice file m-n+1, ​​..., and downloads slice file m.

[0118] For the second method, Figure 5DAs shown in the example, the image on the cloud platform is divided into the first group of shard files, the second group of shard files, ..., the mth group of shard files, and the m groups of shard files of the image are copied to the object storage module of area 2, the object storage module of area 3, and the object storage module of area m respectively. Among them, the first group of shard files includes shard file 1,1, shard file 2,1, ..., shard file n,1; the second group of shard files includes shard file 1,2, shard file 2,2, ..., shard file n,2; ...; the mth group of shard files includes shard file 1,m, shard file 2,m, ..., shard file n-1,m. The download end starts thread 1, thread 2, ..., thread m. Among them, the download end downloads the first group of shard files from the object storage module of area 1 through thread 1, downloads the second group of shard files from the object storage module of area 2 through thread 2, ..., and downloads the mth group of shard files from the object storage module of area m through thread m.

[0119] It should be understood that the above-mentioned deformation modes are only a part of many deformation modes. In practical applications, there may be more deformation modes, which are not specifically limited here.

[0120] S104: The download end merges the multiple downloaded fragment files to obtain an image.

[0121] In order to ensure that the uploaded image is consistent with the downloaded image, you can use the integrity encryption algorithm for verification. Specifically:

[0122] The cloud platform inputs the image into the integrity encryption algorithm to obtain a first encryption value. In a specific embodiment, the integrity encryption algorithm can be expressed as:

[0123]

[0124] in, Represented as a mirror image, Represented as the first encrypted value, It is expressed as an encryption algorithm, that is, a mapping relationship between the image and the first encrypted value.

[0125] The download end inputs the restored image of the cloud platform into the integrity encryption algorithm to obtain the second encryption value. In a specific embodiment, the integrity encryption algorithm can be expressed as:

[0126]

[0127] in, Represents a restored image. Represented as the second encrypted value, It is expressed as an integrity encryption algorithm, that is, the mapping relationship between the restored image and the second encrypted value.

[0128] When the first encryption value and the second encryption value are the same, it means that the restored image is correct. When the first encryption value and the second encryption value are different, it means that the restored image has an error and needs to be downloaded again. Here, the integrity encryption algorithm used by the cloud platform and the integrity encryption algorithm used by the download end are the same integrity encryption algorithm. Among them, the encryption algorithm may include SHA-256 and the like. Taking the SHA-256 algorithm as an example, the data is decomposed into blocks of 512 bits in size. Assuming that it is divided into n small blocks, the algorithm completes n iterations, and the result of n iterations is the final hash value, that is, a 256-bit digital summary, which is the first encryption value. It should be understood that the above-mentioned examples of integrity encryption algorithms are merely specific examples and should not constitute specific limitations.

[0129] In order to reduce the amount of image data, the image can also be compressed. Specifically:

[0130] The cloud platform compresses the image input into a compression algorithm to obtain a compressed file. In a specific embodiment, the compression algorithm can be expressed as:

[0131]

[0132] in, Represented as a mirror image, Represented as a compressed file, It is expressed as a compression algorithm, that is, a mapping relationship between an image and a compressed file. The compression algorithm may be a lossless compression algorithm or a lossy compression algorithm. The lossless compression algorithm may be a Huffman algorithm and an LZW (Lenpel-Ziv & Welch) compression algorithm, etc. The lossy compression algorithm may be a pulse code modulation (PCM), predictive coding, transform coding, interpolation and extrapolation, statistical coding, vector quantization, and subband coding, etc. It should be understood that the above examples of compression algorithms are only used as specific examples and should not constitute specific limitations.

[0133] The download end inputs the compressed file into the decompression algorithm for compression, thereby restoring the image. In a specific embodiment, the decompression algorithm can be expressed as:

[0134]

[0135] in, Represented as a mirror image, Represented as a compressed file, It is expressed as a decompression algorithm, that is, the mapping relationship between the compressed file and the image. Among them, the decompression algorithm can be the inverse operation of the lossless compression algorithm or the inverse operation of the lossy compression algorithm. The inverse operation of the lossless compression algorithm can be the inverse operation of the Huffman algorithm and the inverse operation of the LZW (Lenpel-Ziv&Welch) compression algorithm, etc. The inverse operation of the lossy compression algorithm can be the inverse operation of pulse code modulation (Pulse Code Modulation, PCM), the inverse operation of predictive coding, the inverse operation of transform coding, the inverse operation of interpolation and the inverse operation of extrapolation, the inverse operation of statistical coding, the inverse operation of vector quantization and the inverse operation of sub-band coding, etc. It should be understood that the above-mentioned examples of decompression algorithms are only used as specific examples and should not constitute specific limitations.

[0136] The present application also provides an image storage and downloading system, including a cloud platform and a download terminal connected to each other. The cloud platform is connected to the download terminal. The cloud platform is used to store images in multiple different areas, and the download terminal is used to download images from multiple different areas of the cloud platform.

[0137] See also Figure 7 , Figure 7 2 is a schematic diagram of a cloud platform involved in the present application. The cloud system of the present application includes: a physical host 210, a computing node 220, a network 230 and an object storage device 240. The physical host 210, the computing node 220 and the object storage device 240 are connected via the network 230.

[0138] The physical host 210 includes a cloud management platform 211. The cloud management platform 211 may be AWS (Amazon Web Service), OpenStack, CloudStack, Hadoop, Apache Mesos, Docker-based kubernetes, swarm, etc., which are not specifically limited here. The cloud management platform 211 may include a computing service 212, a storage service 213, and a network service 214. The computing service 212 may be a computing organization controller in the cloud management platform 211, which is a component for deploying virtual machines, etc. The storage service 213 may be a component in the cloud management platform 211 for providing distributed, persistent virtual object storage, etc. The network service 214 may be a component in the cloud management platform 211 for providing network topology management for network nodes. Taking the cloud management platform 211 as OpenStack as an example, the computing service 212 may be Nova, the storage service 213 may be Swift, and the network service 214 may be Neutron. In addition, the physical body also includes an operating system 215 and hardware 216. The hardware 216 may include a physical network card 217.

[0139] The computing node 220 includes hardware resources 221, virtual software (Hypervisor) 222, virtual machine (VM) 223, operating system 224 and application software (APP) 225 from bottom to top. Among them, the hardware resources 221 are the basic physical hardware in the computing node, which may include processors, memory, disks, networks, etc. The virtual software 222 runs in the middle software layer between the hardware resources and the virtual machine, for example, VMware vSphere, Hyper-V, Citrix XenServer, IBM PowerVM, Red Hat Enterprise Virtulization, HuaweiFusionSphere, KVM, Xen, VirtualBSD, etc., which allows multiple virtual machines to share a set of basic physical hardware. The virtual machine 223 refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. The operating system (OS) 224 is a computer program that manages and controls computer hardware and software resources, an interface between users and computers, and also an interface between computer hardware and other software, such as SUNSolaris, IBM-AIX, HP-UX, FreeBSD, Red Hat Linux, CentOS, Debian, Ubuntu, Windows Server 2003, Windows Server 2008, and Windows Server 2008 R2. The application software 225 is a collection of various programming languages ​​that users can use and application programs compiled in various programming languages, such as office software, ICQ software, and browser software. The virtual software 222 can use a hypervisor, which can coordinate access to all basic physical hardware and virtual machines on the computing node. When the computing node starts and executes the hypervisor, it will allocate appropriate hardware resources to each virtual machine, such as processors, memory, disks, and networks, and load the operating systems of all virtual machines.

[0140] The network 230 provides a data transmission path, for example, an optical fiber data transmission path, a cable data transmission path, etc., which is not specifically limited here.

[0141] The object-based storage device 240 (OSD) has certain intelligence and can automatically manage the data distribution thereon.

[0142] The object storage device 240 is used to store images, wherein the images are copies of files;

[0143] The computing node 220 is used to divide the image into a plurality of slice files, and store the plurality of slice files in the object storage device 240 running in the first area;

[0144] The computing node 220 is used to copy the multiple shard files stored in the object storage device 240 running in the first area to the object storage device 240 in the second area, wherein the first area and the second area are located in different geographical locations.

[0145] The physical server 210, computing node 220 and object storage device 240 cooperate with each other to complete Figure 6 For details on the image upload and download methods shown in Figure 6 And related descriptions, which will not be described in detail here.

[0146] See also Figure 8 , Figure 8 3 is a schematic diagram of a download terminal involved in the present application. The download terminal of the present application includes: a first processor 310, a first memory 320, a smart network card 330 and a bus 340.

[0147] The first processor 310 may be one or more general-purpose processors, wherein the general-purpose processor may be any type of device capable of processing electronic instructions, including a central processing unit (CPU), a microprocessor, a microcontroller, a main processor, a controller, and an application-specific integrated circuit (ASIC), etc. The first processor 310 executes various types of digital storage instructions, such as software or firmware programs stored in the first memory 320. In a specific embodiment, the first processor 310 may be an x86 processor, etc. The first processor 310 sends commands to the first memory 320 through a physical interface to complete storage-related tasks. For example, the commands that the first processor 310 may provide include read commands, write commands, copy commands, and erase commands, etc. The commands may specify operations related to specific pages and blocks of the first memory 320. As an example, a command may request to write data to a specific physical page, or another command may request to erase a specific physical block. Multiple virtual machines may be virtualized in the first processor 310, and a corresponding operating system may be installed on each virtual machine.

[0148] The first memory 320 may include a random access memory (Random Access Memory, RAM), a flash memory (Flash Memory), etc., or may be a RAM, a read-only memory (Read-Only Memory, ROM) or a hard disk (Hard Disk Drive, HDD) or a solid-state drive (Solid-State Drive, SSD).

[0149] Smart NIC 330 is also called a network interface controller, a network interface card or a local area network (LAN) adapter. Each smart NIC 330 has a unique MAC address, which is burned into the read-only memory chip by the smart NIC 330 manufacturer during production. Smart NIC 330 includes a second processor 331, a second memory 332 and a transceiver 333. The second processor 331 is similar to the first processor 320, but the performance requirements of the second processor 331 may be lower than the performance requirements of the first processor 320. In a specific embodiment, the second processor 331 may be an ARM processor or the like. The second memory 332 may also be a flash memory, an HDD or an SDD, and the storage capacity of the second memory 332 may be smaller than the storage capacity of the first memory 320. The transceiver 333 may be used to receive and send messages, and upload the received messages to the second processor 331 for processing. Smart NIC 330 may also include multiple ports, and the ports may be any one or more of the three interface types of a thick cable interface, a thin cable interface and a twisted pair interface.

[0150] The transceiver 333 is used to receive an image creation request, wherein the image creation request is used to request a cloud platform to download an image, wherein the image includes multiple slice files, and the cloud platform includes at least two areas, each area includes multiple computing nodes for storing the multiple slice files, and each area is located in a different geographical location;

[0151] The first processor 310 is used to create at least two threads, and each thread downloads at least one slice file from at least one area, and the at least two threads cooperate to download the multiple slice files;

[0152] The first processor 310 is used to merge the multiple downloaded segment files to obtain the image.

[0153] For the sake of simplicity, the download end is not described in detail here. Figure 6 The image upload and download methods and related descriptions shown are not described in detail here.

[0154] See also Fig. 9 , Fig. 9Schematic diagram of a mirror image download system provided by the present application. The mirror image download system of this embodiment includes a cloud platform and a download terminal connected to each other. The cloud platform includes at least two areas, each area includes multiple computing nodes for running a storage module, a sharding module, an object storage module, and a copy module, and the download terminal is used to download images from multiple different areas of the cloud platform.

[0155] like Fig. 9 As shown, the first area includes: a storage module 410, a sharding module 420, an object storage module 430 and a copy module 440. Among them,

[0156] The storage module 410 is used to store an image, wherein the image is a copy of a file.

[0157] The sharding module 420 is used to divide the image into multiple shard files, and store the multiple shard files in the object storage module running in the first area;

[0158] The copy module 440 is used to copy the multiple segment files stored in the object storage module 430 running in the first area to the second area, wherein the first area and the second area are located in different geographical locations.

[0159] like Fig. 9 As shown, the download end includes: a receiving module 510 , a downloading module 520 and a merging module 530 .

[0160] The receiving module 510 is used to receive an image creation request, the image creation request is used to request the cloud platform to download an image, the image includes multiple slice files, the cloud platform includes at least two areas, each area includes multiple computing nodes for storing the multiple slice files, and each area is located in a different geographical location;

[0161] The download module 520 is used to create at least two threads, and each thread downloads at least one segment file from at least one area, and the at least two threads cooperate to download the multiple segment files;

[0162] The merging module 530 is used to merge the multiple downloaded fragment files to obtain the image.

[0163] For the sake of simplicity, the cloud platform and download end are not described in detail here. Figure 6 The image upload and download methods and related descriptions shown are not described in detail here.

[0164] In the above scheme, the image is divided into several fragment files and copied to multiple different areas. The download end can start multiple threads to download the fragments of the image from different areas respectively, that is, the download end can concurrently download the fragment files of the image from multiple channels at the same time, therefore, the efficiency of image downloading can be effectively improved.

[0165] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a storage disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state storage disk Solid State Disk (SSD)), etc.

Claims

1. A mirror image download method, characterized in that: include: The download end receives an image creation request, the image creation request is used to request the cloud platform to download an image, the image includes multiple slice files, the cloud platform includes at least two areas, each area includes multiple computing nodes for storing the multiple slice files, and each area is located in a different geographical location; The download end creates at least two threads, and each thread downloads at least one segment file from at least one area, and the at least two threads cooperate to download the multiple segment files; The download end merges the multiple downloaded fragment files to obtain the image; The slice files include: a first slice file, a second slice file, ..., an mth slice file; the threads include: a first thread, a second thread, ..., an nth thread; the regions include: a first region, a second region, ..., an nth region, wherein m and n are both positive integers, and m is greater than n; the download end creates at least two threads, and downloads at least one slice file from at least one region through each thread, and the at least two threads cooperate to download the multiple slice files, including: At time T0, the download end downloads the first fragment file from the first area through the first thread at the first download rate, downloads the second fragment file from the second area through the second thread at the second download rate, ..., downloads the nth fragment file from the nth area through the nth thread at the nth download rate; wherein the i-th download rate is the maximum download rate among the n download rates, i is a positive integer, and 0 <i≤n; At time T1, the download end finishes downloading the i-th fragment file from the i-th area through the i-th thread at the i-th download rate, starts downloading the n+1-th fragment file from the i-th area at the i-th download rate, and the other threads remain unchanged.

2. The method according to claim 1, characterized in that The method further comprises: The download end downloads a first encrypted value, wherein the first encrypted value is obtained by encrypting the image before sharding using an integrity encryption algorithm; The download end encrypts the restored image using the integrity encryption algorithm to obtain a second encrypted value; When the first encryption value and the second encryption value are the same, it is determined that the restored image and the image before sharding are the same.

3. A download terminal, characterized in that: Including receiving module, downloading module and merging module, The receiving module is used to receive an image creation request, the image creation request is used to request the cloud platform to download an image, the image includes multiple slice files, the cloud platform includes at least two areas, each area includes multiple computing nodes for storing the multiple slice files, and each area is located in a different geographical location; The download module is used to create at least two threads, and each thread downloads at least one segment file from at least one area, and the at least two threads cooperate to download the multiple segment files; The merging module is used to merge the multiple fragment files obtained by downloading to obtain the image; The slice files include: a first slice file, a second slice file, ..., an mth slice file; the threads include: a first thread, a second thread, ..., an nth thread; the regions include: a first region, a second region, ..., an nth region, wherein m and n are both positive integers, and m is greater than n; the download module is specifically used for: At time T0, the download end downloads the first fragment file from the first area through the first thread at the first download rate, downloads the second fragment file from the second area through the second thread at the second download rate, ..., downloads the nth fragment file from the nth area through the nth thread at the nth download rate; wherein the i-th download rate is the maximum download rate among the n download rates, i is a positive integer, and 0 <i≤n; At time T1, the download end finishes downloading the i-th fragment file from the i-th area through the i-th thread at the i-th download rate, starts downloading the n+1-th fragment file from the i-th area at the i-th download rate, and the other threads remain unchanged.

4. The download terminal according to claim 3, characterized in that: The download end also includes an encryption module and a determination module. The download module is further used to download a first encrypted value, wherein the first encrypted value is obtained by encrypting the image before sharding using an integrity encryption algorithm; The encryption module is used to encrypt the restored image by using the integrity encryption algorithm to obtain a second encryption value; The determination module is used to determine that the restored image is the same as the image before sharding when the first encryption value and the second encryption value are the same.

5. A download terminal, characterized in that: The method comprises a processor and a memory, wherein the processor executes the code in the memory to perform the method according to any one of claims 1 to 2.

6. A computer-readable storage medium, characterized in that: The method comprises instructions, which, when executed on a computing device, cause the computing device to execute the method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • A mirror image management method and a mirror image management module

    CN109344006A

  • File downloading method and system based on cloud storage

    CN110430274A