Virtual machine mirror image processing method and device, electronic equipment and storage medium

By converting large image files into a format with multiple sub-files and using concurrent uploading, the method enhances the efficiency of image file uploads, mitigating the issue of prolonged upload times in Kubernetes and KubeVirt environments.

CN119718536APending Publication Date: 2025-03-28BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311280872.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the context of Kubernetes and KubeVirt virtual machine implementations, large original image files lead to prolonged upload times, negatively impacting user experience due to the lengthy process of uploading and loading these files.

Method used

The method involves converting the original image file into a target format comprising multiple smaller files, which are then uploaded concurrently to a second node for storage, optimizing the upload process by breaking down the file into sub-files and utilizing file structure information to reconstruct the image.

Benefits of technology

This approach significantly reduces the time required for image file uploads by leveraging concurrent uploading and file structure optimization, effectively addressing the issue of large image files causing prolonged upload times.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718536A_ABST
    Figure CN119718536A_ABST
Patent Text Reader

Abstract

The invention provides a virtual machine mirror image processing method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining an original mirror image file in a first node; the original mirror image file is converted into a target file in a target format, and the target file comprises a plurality of sub-files; uploading the plurality of sub-files to a second node through concurrent uploading; and storing the target mirror image file comprising the plurality of sub-files in the second node. According to the method and the device, the uploading of the mirror image file is realized by adopting a mode of concurrent uploading of a plurality of sub-files, so that the uploading speed of the mirror image file can be effectively improved; therefore, the technical problem that the uploading time is long due to the fact that the original mirror image file is large in the prior art can be effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a virtual machine image processing method and device, an electronic device, and a storage medium. Background Art

[0002] In the virtual machine implementation solution based on "Kubernetes (a portable, extensible open source platform for managing containerized workloads and services that promotes declarative configuration and automation) + KubeVirt (a virtual machine management architecture built around Kubernetes)", when the virtual machine is pulled up, it is necessary to pull up and expand the image remotely to complete the initialization and startup of the virtual machine.

[0003] In the related art, due to the large size of the image file itself (especially the image file made by the customer, which contains many files related to customer service, etc.), the virtual machine upload and loading process takes a long time, which will greatly affect the customer experience. Among them, the following problems will have a greater impact on the time of the virtual machine loading process: the original image file is large, resulting in a technical problem that it takes a long time to upload.

[0004] This shows that the related technology has a technical problem that the original image file is large, resulting in a long time required for uploading. Summary of the invention

[0005] The present application provides a virtual machine image processing method and device, an electronic device and a storage medium, so as to at least solve the problem in the related art that the original image file is large, resulting in a long time required for uploading.

[0006] According to one aspect of an embodiment of the present application, a method for processing a virtual machine image is provided, comprising:

[0007] Obtain the original image file in the first node;

[0008] Converting the original image file into a target file in a target format, wherein the target file includes a plurality of sub-files;

[0009] Uploading the multiple sub-files to the second node through concurrent uploading;

[0010] The target image file including the plurality of sub-files is stored in the second node.

[0011] Optionally, as in the aforementioned method, obtaining the original image file in the first node includes:

[0012] Obtaining, in the first node, an original file for making an image;

[0013] Deleting junk data in the original file to obtain optimized data;

[0014] Based on the optimized data, the original image file is generated.

[0015] Optionally, as in the aforementioned method, deleting junk data in the original file to obtain optimized data includes:

[0016] Determining the descriptive information deleted from the original file;

[0017] Determining the data corresponding to the description information in the original file as junk data;

[0018] The junk data is deleted to obtain the optimized data.

[0019] Optionally, as in the aforementioned method, converting the original image file into a target file in a target format includes:

[0020] Generate the target file and file structure information based on the optimized data, wherein the file structure information is used to indicate the manner in which the multiple sub-files constitute the target file;

[0021] The step of uploading the plurality of sub-files to the second node by concurrent uploading includes:

[0022] The multiple sub-files and the file structure information are uploaded to the second node through concurrent uploading.

[0023] Optionally, as in the aforementioned method, after the target image file including the multiple sub-files is saved in the second node through concurrent uploading, the method further includes:

[0024] Obtain a download request for downloading the target image file to a third node;

[0025] In response to the download request, downloading the plurality of sub-files and the file structure information to the third node through concurrent downloading, wherein the file structure information is used to indicate the manner in which the plurality of sub-files constitute the target file;

[0026] Based on the multiple sub-files and the file structure information in the third node, the image to be expanded in the third node is obtained.

[0027] Optionally, as in the aforementioned method, in response to the download request, downloading the plurality of sub-files and the file structure information to the third node by concurrent downloading includes:

[0028] In the event that the concurrent download is interrupted, determining the current download progress;

[0029] According to the current download progress, the concurrent download is retried until the multiple sub-files and the file structure information are downloaded to the third node.

[0030] Optionally, as in the aforementioned method, after obtaining the image to be expanded in the third node based on the multiple sub-files and the file structure information in the third node, the method further includes:

[0031] Acquire currently available resources of the third node;

[0032] Determine a corresponding image deployment strategy according to the currently available resources;

[0033] According to the image deployment strategy, the image to be deployed is deployed in the third node.

[0034] According to another aspect of the embodiment of the present application, a virtual machine image processing device is also provided, including:

[0035] An acquisition module, used to acquire the original image file in the first node;

[0036] A conversion module, used for converting the original image file into a target file in a target format, wherein the target file includes a plurality of sub-files;

[0037] An uploading module, used for uploading the multiple sub-files to the second node through concurrent uploading;

[0038] A saving module is used to save the target image file including the multiple sub-files in the second node.

[0039] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the method steps in any of the above embodiments by running the computer program stored in the memory.

[0040] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the method steps in any of the above embodiments when executed.

[0041] In an embodiment of the present application, an original image file is converted into a target file in a target format; and multiple small file sub-files are uploaded to the second node through concurrent uploading, so as to obtain a target image file including multiple sub-files saved in the second node; thereby, the image file can be uploaded in a concurrent uploading manner, which can effectively improve the speed of uploading the image file; and further, the technical problem that the original image file is large and the uploading time is long existing in the related art can be effectively overcome. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0044] Figure 1 It is a schematic diagram of a hardware environment of an optional virtual machine image processing method according to an embodiment of the present application;

[0045] Figure 2 It is a flowchart of an optional virtual machine image processing method according to an embodiment of the present application;

[0046] Figure 3 It is a flowchart of another optional virtual machine image processing method according to an embodiment of the present application;

[0047] Figure 4 It is a flowchart of another optional virtual machine image processing method according to an embodiment of the present application;

[0048] Figure 5 It is a structural block diagram of an optional virtual machine image processing device according to an embodiment of the present application;

[0049] Figure 6 It is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0050] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0051] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0052] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretation:

[0053] 1. Kubernetes: is a portable, extensible open source platform for managing containerized workloads and services that facilitates declarative configuration and automation.

[0054] 2. KubeVirt: is a virtual machine management architecture built around Kubernetes.

[0055] 3. Node: Node is a concept in the cluster category. As the infrastructure unit that makes up the cluster, it provides basic resources and operating environment for the cluster.

[0056] 4. Image: The system disk image loaded by the system when the virtual machine starts.

[0057] According to one aspect of an embodiment of the present application, a virtual machine image processing method is provided. Optionally, in this embodiment, the virtual machine image processing method can be applied to Figure 1 In the hardware environment composed of terminal 1402 and server 1404 shown in FIG. Figure 1As shown, server 1404 is connected to terminal 1402 via a network, and can be used to provide services (such as data analysis services, application services, etc.) for the terminal or a client installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 1404.

[0058] The above network may include but is not limited to at least one of the following: wired network, wireless network. The above wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the above wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal may not be limited to a PC, a mobile phone, a tablet computer, etc.

[0059] The virtual machine image processing method of the embodiment of the present application can be executed by a server, a terminal, or a server and a terminal together. The terminal can also execute the virtual machine image processing method of the embodiment of the present application by a client installed thereon.

[0060] Taking the virtual machine image processing method in this embodiment executed by the server as an example, Figure 2 An optional virtual machine image processing method provided in an embodiment of the present application includes the following steps:

[0061] Step S101, obtaining the original image file in the first node.

[0062] The virtual machine image processing method in this embodiment can be applied to scenarios where virtual machine services need to be provided to users, for example, scenarios where virtual machines are created in the cloud. For other types of media resources, the above virtual machine image processing method is also applicable if there is no contradiction.

[0063] The first node may be the node where the system disk where the user creates the image is located.

[0064] Furthermore, the user can make an original image file in the first node, and optionally, can select the system for which the image file is to be made, and then implement the device of the method of this embodiment to generate a copy of the system selected by the user, and store it roughly on the system disk for easy processing, retaining the data required by the user, and finally generating the original image file.

[0065] Step S102, converting the original image file into a target file in a target format, wherein the target file includes a plurality of sub-files.

[0066] Specifically, after the original image file is generated, in this embodiment, the original image file is converted to obtain a target file in a target format.

[0067] The target format may be a data format that can support representing a large file (ie, the target file in this embodiment) through multiple sub-files.

[0068] The target file includes multiple sub-files; optionally, the multiple sub-files can be obtained by splitting the target file according to a preset splitting method; and the multiple sub-files can be restored to obtain the target file.

[0069] Step S103: upload multiple sub-files to the second node through concurrent uploading.

[0070] Specifically, after obtaining the target file containing multiple sub-files, the multiple sub-files may be uploaded and stored in the second node.

[0071] The second node may be a node for storing the image file.

[0072] In this embodiment, a method of concurrently uploading multiple sub-files may be adopted, that is, N (N is greater than or equal to 2 and less than or equal to the total number of the multiple sub-files) of the multiple sub-files are uploaded simultaneously.

[0073] Step S104: Save the target image file including the multiple sub-files in the second node.

[0074] Specifically, after the upload of the multiple sub-files is completed, the target image file including the multiple sub-files can be saved in the second node.

[0075] Furthermore, the target image file is the same as the system obtained after the original image file is installed.

[0076] Through the method of this embodiment, the original image file is converted into a target file in a target format; and multiple small file sub-files are uploaded to the second node through concurrent uploading, so as to obtain the target image file including multiple sub-files saved in the second node; thus, the image file can be uploaded by concurrent uploading, which can effectively improve the speed of uploading the image file; and further, the technical problem that the original image file is large and the uploading time is long in the related art can be effectively overcome.

[0077] As an optional embodiment, as in the above method, the step S101 of obtaining the original image file in the first node includes the following steps:

[0078] The original file used for making the image is obtained in the first node; junk data in the original file is deleted to obtain optimized data; and the original image file is generated based on the optimized data.

[0079] Specifically, the user can select the original file corresponding to the target operating system for making the image from all operating systems, and the operating system can be, for example, Windows 10, Windows 11, Linux, etc.

[0080] After the original file is determined, in order to reduce the size of the image file finally generated, junk data in the original file may be deleted.

[0081] In this embodiment, the junk data may be data corresponding to files in the original files that the user does not need to use.

[0082] Therefore, after deleting the junk data in the original file, the optimized data can be obtained.

[0083] After obtaining the optimized data, image creation can be performed based on the optimized data to obtain an image file.

[0084] Through the method in this embodiment, the junk data in the original file is deleted, and the original image file is finally generated, which can effectively compress the data volume and further improve the efficiency of image uploading.

[0085] As an optional embodiment, as in the aforementioned method, the step of deleting junk data in the original file to obtain optimized data includes the following steps:

[0086] Determine the description information deleted in the original file; determine the data corresponding to the description information in the original file as junk data; delete the junk data to obtain optimized data.

[0087] Specifically, after obtaining the original file, the user can select and delete the description information of the file.

[0088] After the user deletes the description information of a file, the file data may still be retained on the system disk. Therefore, the corresponding data can be located in the original file based on the description information. This data usually takes up a large amount of space and may contain recoverable privacy data, which is identified as junk data.

[0089] After the junk data is determined, the junk data may be deleted. Optionally, the invalid data may be cleared using fstrim to further optimize the compressed data to obtain optimized data.

[0090] Through the method of this embodiment, the corresponding junk data can be determined based on the deleted description information, and then the junk data can be deleted to obtain optimized data, thereby further reducing the data volume.

[0091] As an optional embodiment, as in the aforementioned method, the step S102 converts the original image file into a target file in a target format, including:

[0092] A target file and file structure information are generated based on the optimized data, wherein the file structure information is used to indicate how a plurality of sub-files constitute the target file.

[0093] Specifically, after the optimized data is determined, a target file in a target format may be generated based on the optimized data, and file structure information corresponding to a plurality of sub-files in the target file may be obtained.

[0094] The file structure information may be used to indicate how multiple sub-files constitute a target file. The file structure information may include but is not limited to: the order of each sub-file, etc.

[0095] For example, the target format may be an fzs file format; the file size of each sub-file may be preset, and then the optimized data may be divided into N sub-files (i.e., multiple sub-files) according to the optimized file size of the optimized data, thereby maximizing the use of the download bandwidth. The fzs file format may be a file format designed for optimizing image production and expansion.

[0096] The step S103 uploads multiple sub-files to the second node by concurrent uploading, and includes the following steps:

[0097] Through concurrent uploading, multiple sub-files and file structure information are uploaded to the second node.

[0098] Specifically, after a plurality of sub-files are determined, the plurality of sub-files and the file structure information may be uploaded to the second node in a concurrent uploading manner.

[0099] That is, each sub-file in the plurality of sub-files and several files in the file structure information may simultaneously perform an upload operation to the second node.

[0100] Through the method in this embodiment, multiple sub-files and file structure information can be stored in the second node, and the data downloaded from multiple second nodes (ie, multiple sub-files and file structure information) can be restored to the original image file.

[0101] like Figure 3 As shown, as an optional embodiment, as in the aforementioned method, after the step of saving the target image file including multiple sub-files in the second node through concurrent uploading, the method further includes the following steps:

[0102] Step S201: obtaining a download request for downloading a target image file to a third node.

[0103] Specifically, a download request for downloading the target image file to a third node may be obtained, and the third node may be a node for installing the target image file.

[0104] Step S202: In response to the download request, multiple sub-files and file structure information are downloaded to a third node through concurrent downloading, wherein the file structure information is used to indicate how the multiple sub-files constitute the target file.

[0105] After obtaining the download request, multiple sub-files and file structure information can be downloaded to the third node in a concurrent download manner, that is, each sub-file in the multiple sub-files and several files in the file structure information can be downloaded to the third node at the same time.

[0106] Step S203: based on the multiple sub-files and the file structure information in the third node, obtain the image to be expanded in the third node.

[0107] After the multiple sub-files and the file structure information are downloaded to the third node, the multiple sub-files can be combined according to the file structure information, and then the image to be expanded located in the third node can be obtained.

[0108] The image to be deployed may be an image file in the third node for deployment.

[0109] like Figure 4 As shown, as an optional embodiment, as in the above method, the step S202, in response to the download request, downloads multiple sub-files and file structure information to the third node through concurrent downloading, including the following steps:

[0110] Step S301, when a concurrent download is interrupted, determine the current download progress.

[0111] Specifically, during concurrent downloads, if a download is interrupted, a new fzscache file can be added, and the current download progress where the interruption occurred can be determined in the newly added fzscache file, for example, multiple sub-files and files in the file structure information that have been downloaded and files that have not been downloaded.

[0112] Step S302: retry the concurrent download according to the current download progress until the multiple sub-files and the file structure information are downloaded to the third node.

[0113] After determining the current download progress, the concurrent download may be retried, for example, only the uncompleted download files in the determined multiple sub-files and file structure information may be retried until the multiple sub-files and file structure information are downloaded to the third node.

[0114] Through the method of this embodiment, while maximizing the use of bandwidth for downloading, it is possible to resume downloading after an interruption, thereby further improving the efficiency of file downloading and avoiding repeated downloading.

[0115] As an optional embodiment, as in the above method, after obtaining the image to be expanded in the third node based on the multiple sub-files and file structure information in the third node in step S203, the method further includes the following steps:

[0116] The currently available resources of the third node are obtained; a corresponding image deployment strategy is determined according to the currently available resources; and the image to be deployed is deployed in the third node according to the image deployment strategy.

[0117] That is, the currently available resources (for example, available IO) can be determined by counting the total node resources required for installing the image to be deployed and the used resources (for example, used IO).

[0118] After determining the currently available resources, the expansion of the image to be expanded can be dynamically adjusted according to the currently available resources, and the corresponding image expansion strategy can be determined. For example, the resources occupied by the image expansion do not exceed the currently available resources, and too much idleness of the currently available resources is avoided (for example, avoiding idle resources exceeding the preset proportion of the third node, or exceeding the preset resource amount, etc.).

[0119] After the image deployment strategy is determined, the image to be deployed can be deployed in the third node according to the image deployment strategy.

[0120] Through the method of this embodiment, a mechanism is implemented that can flexibly carry out mirroring work according to the limitations of currently available resources, so that the usage of various resources in the current system can be dynamically observed and the currently available resources can be obtained, so as to achieve the purpose of dynamically adjusting the work process and maximizing resource utilization.

[0121] As described below, an application example of applying any of the above embodiments is provided:

[0122] 1. Designing the fzs file format (ie, target format): The fzs file format is used to optimize the file size, maximize the use of download bandwidth, and optimize image creation and expansion.

[0123] 2. Image creation: A method for optimizing image size. When users create images, the original files in the system disk usually contain a large amount of junk data, which usually takes up a large space and may contain recoverable privacy data. After using fstrim to clear invalid junk data and obtain optimized data, the data can be further optimized and compressed.

[0124] 3. Image upload: Utilize the server and file format features to achieve concurrent upload of multiple sub-files, thereby improving the efficiency of image file upload and shortening the time to produce the target image file.

[0125] 4. Image file download: The fzs file contains meta information (i.e., file structure information). The fzs file is a collection of small files. When the meta information is obtained, concurrent block (i.e., sub-file) downloads can be achieved on the basis of ensuring file integrity, thereby maximizing the use of bandwidth. At the same time, in order to ensure that the program can be continued after interruption, a new fzscache file (used to record the current download progress) is added to ensure retry at the interruption point after failure.

[0126] 5. Image deployment: A mechanism is implemented that can flexibly perform image deployment according to resource constraints (i.e., currently available resources). It will dynamically observe the current system resource usage, dynamically adjust the work process, and maximize resource utilization; further, the fzscache file can also be used to record the progress of image deployment.

[0127] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0128] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0129] According to another aspect of an embodiment of the present application, a virtual machine image processing device for implementing the above-mentioned virtual machine image processing method is also provided. Figure 5 is a structural block diagram of an optional virtual machine image processing device according to an embodiment of the present application, such as Figure 5 As shown, the device may include:

[0130] Acquisition module 1, used to acquire the original image file in the first node;

[0131] A conversion module 2, used for converting the original image file into a target file of a target format, wherein the target file includes a plurality of sub-files;

[0132] An upload module 3, used for uploading multiple sub-files to the second node through concurrent uploading;

[0133] The saving module 4 is used to save the target image file including multiple sub-files in the second node.

[0134] It should be noted that the acquisition module 1 in this embodiment can be used to execute the above step S101, the conversion module 2 in this embodiment can be used to execute the above step S102, the upload module 3 in this embodiment can be used to execute the above step S103, and the saving module 4 in this embodiment can be used to execute the above step S104.

[0135] The device in this embodiment, in addition to the above modules, may also include a module for executing any method in any of the aforementioned embodiments of the virtual machine image processing method.

[0136] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.

[0137] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned virtual machine image processing method is also provided. The electronic device may be a server, a terminal, or a combination thereof.

[0138] According to another embodiment of the present application, there is also provided an electronic device, including: Figure 6 As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .

[0139] Memory 1503, used for storing computer programs;

[0140] The processor 1501 is used to implement the following steps when executing the program stored in the memory 1503:

[0141] Step S101, obtaining the original image file in the first node.

[0142] Step S102, converting the original image file into a target file in a target format, wherein the target file includes a plurality of sub-files.

[0143] Step S103: upload multiple sub-files to the second node through concurrent uploading.

[0144] Step S104: Save the target image file including the multiple sub-files in the second node.

[0145] Optionally, in this embodiment, the above-mentioned communication bus can be a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used for communication between the above-mentioned electronic device and other devices.

[0146] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0147] As an example, the memory 1503 may include, but is not limited to, the acquisition module 1, conversion module 2, upload module 3, and storage module 4 in the virtual machine image processing device. In addition, it may also include, but is not limited to, other module units in the virtual machine image processing device, which will not be repeated in this example.

[0148] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0149] An embodiment of the present application further provides a computer-readable storage medium, the storage medium including a stored program, wherein the method steps of the above method embodiment are executed when the program is run.

[0150] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.

[0151] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0152] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.

[0153] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0154] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0155] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.

[0156] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0157] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A virtual machine image processing method, characterized in that: include: Obtain the original image file in the first node; Converting the original image file into a target file in a target format, wherein the target file includes a plurality of sub-files; Uploading the multiple sub-files to the second node through concurrent uploading; The target image file including the plurality of sub-files is stored in the second node.

2. The method according to claim 1, characterized in that The obtaining of the original image file in the first node includes: Obtaining, in the first node, an original file for making an image; Deleting junk data in the original file to obtain optimized data; Based on the optimized data, the original image file is generated.

3. The method according to claim 2, characterized in that The step of deleting junk data in the original file to obtain optimized data includes: Determining the descriptive information deleted from the original file; Determining the data corresponding to the description information in the original file as junk data; The junk data is deleted to obtain the optimized data.

4. The method according to claim 2, characterized in that: The converting the original image file into a target file in a target format comprises: Generate the target file and file structure information based on the optimized data, wherein the file structure information is used to indicate the manner in which the multiple sub-files constitute the target file; The step of uploading the plurality of sub-files to the second node by concurrent uploading includes: The multiple sub-files and the file structure information are uploaded to the second node through concurrent uploading.

5. The method according to claim 1, characterized in that After the target image file including the plurality of sub-files is saved in the second node through concurrent uploading, the method further includes: Obtain a download request for downloading the target image file to a third node; In response to the download request, downloading the plurality of sub-files and the file structure information to the third node through concurrent downloading, wherein the file structure information is used to indicate the manner in which the plurality of sub-files constitute the target file; Based on the multiple sub-files and the file structure information in the third node, the image to be expanded in the third node is obtained.

6. The method according to claim 5, characterized in that The step of downloading the plurality of sub-files and the file structure information to the third node by concurrent downloading in response to the download request includes: In the event that the concurrent download is interrupted, determining the current download progress; According to the current download progress, the concurrent download is retried until the multiple sub-files and the file structure information are downloaded to the third node.

7. The method according to claim 5, characterized in that After obtaining the image to be expanded in the third node based on the multiple sub-files and the file structure information in the third node, the method further includes: Acquire currently available resources of the third node; Determine a corresponding image deployment strategy according to the currently available resources; According to the image deployment strategy, the image to be deployed is deployed in the third node.

8. A virtual machine image processing device, characterized in that: include: An acquisition module, used to acquire the original image file in the first node; A conversion module, used for converting the original image file into a target file in a target format, wherein the target file includes a plurality of sub-files; An uploading module, used for uploading the multiple sub-files to the second node through concurrent uploading; A saving module is used to save the target image file including the multiple sub-files in the second node.

9. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein: The processor, the communication interface and the memory communicate with each other via the communication bus, wherein: The memory is used to store computer programs; The processor is configured to execute the method steps of any one of claims 1 to 7 by running the computer program stored in the memory.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method steps described in any one of claims 1 to 7 when run.