Image upload method, system and computer-readable storage medium

By using the Samba service of empty image files and NFS storage devices in the cloud platform, the problem of slow uploading of image files and stability is solved, and more efficient image file uploading is achieved.

CN113688114BActive Publication Date: 2025-08-26JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110930671.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-13
Publication Date
2025-08-26
Estimated Expiration
2041-08-13

AI Technical Summary

Technical Problem

In the prior art, the upload speed of mirror files to the cloud platform is slow and prone to failure, resulting in poor user experience, mainly due to the large image files and limited bandwidth of the cloud management platform.

Method used

By uploading the original image file to the Glance control module and storing it in the NFS storage device, the original image file is directly uploaded using the Samba service preset by the NFS storage device to avoid uploading through the cloud management platform.

Benefits of technology

It improves the speed and stability of image file upload, improves the efficiency of Glance control module allocating storage locations, and reduces dependence on cloud management platform bandwidth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113688114B_ABST
    Figure CN113688114B_ABST
Patent Text Reader

Abstract

The present invention provides an image upload method, system, and medium. The method comprises: a user terminal device uploading an empty image file to a Glance control module via a cloud management platform; the Glance control module storing the empty image file in an NFS storage device and recording the storage location of the empty image file in the NFS storage device; the NFS storage device being pre-installed with a Samba service; the user terminal device obtaining the storage location from the Glance control module via the cloud management platform, and uploading the original image file to the storage location via the Samba service. The present invention can improve the efficiency of the Glance control module in allocating storage locations by utilizing the empty image file, and can directly upload the original image file via the Samba service pre-installed on the NFS storage device, eliminating the need to use the cloud management platform to upload the original image file. This can effectively avoid the influence of the management network on image upload, thereby effectively improving upload speed and stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud platforms, and in particular to an image uploading method, system, and computer-readable storage medium. Background Art

[0002] Virtual machine management is one of the common functions provided by cloud platforms. When a user creates a virtual machine on a cloud platform, the corresponding image file needs to be uploaded to the cloud platform. In related technologies, users generally need to upload the image file to the Glance control module through the cloud management platform so that the Glance control module can save the image file to the storage device and record the image information. Since image files are usually large and the management network bandwidth used by the cloud management platform is limited and relatively busy, it is easy to encounter slow upload speeds, upload failures, etc. when uploading image files, thereby reducing the user experience of uploading image files using the cloud platform. Summary of the Invention

[0003] The purpose of the present invention is to provide an image uploading method, system and computer-readable storage medium, which can improve the efficiency of allocating storage locations by the Glance control module by utilizing empty image files, and can directly upload the original image file through the Samba service preset by the NFS storage device, without using the cloud management platform to upload the original image file, which can effectively improve the upload speed and stability.

[0004] To solve the above technical problems, the present invention provides a mirror image uploading method, comprising:

[0005] The user device uploads the empty image file to the Glance control module through the cloud management platform;

[0006] The Glance control module stores the empty image file in an NFS storage device and records the storage location of the empty image file in the NFS storage device; the NFS storage device is preset with a Samba service;

[0007] The user terminal device obtains the storage location from the Glance control module through the cloud management platform, and uploads the original image file to the storage location through the Samba service.

[0008] Optionally, recording the storage location of the empty image file in the NFS storage device includes:

[0009] The Glance control module establishes a correspondence between the file name of the empty image file and the storage location, and saves the correspondence to a database;

[0010] Accordingly, the user terminal device obtains the storage location from the Glance control module through the cloud management platform, including:

[0011] The user terminal device sends the file name of the empty image file to the Glance control module through the cloud management platform, so that the Glance control module searches the database for a corresponding storage location according to the file name and sends the storage location to the user terminal device.

[0012] Optionally, the Glance control module stores the empty image file in an NFS storage device, including:

[0013] The Glance control module reads the preset space information from the empty image file, and allocates the storage location and the corresponding storage space in the NFS storage device according to the preset space information;

[0014] The empty image file is stored in the storage location.

[0015] Optionally, the user terminal device uploads the empty image file to the Glance control module through the cloud management platform, including:

[0016] The user terminal device encapsulates the empty image file and user information into a data stream, and sends the data stream to the cloud management platform;

[0017] The cloud management platform performs user verification on the user information in the data stream, and after the user verification is passed, sends the empty image file in the data stream to the Glance control module.

[0018] Optionally, before sending the empty image file in the data stream to the Glance control module, the method further includes:

[0019] The cloud management platform determines the number of stored images corresponding to the user information, and determines whether the number of stored images is greater than a preset threshold;

[0020] If not, the empty image file in the data stream undergoes file name verification, and after the file name verification passes, the step of sending the empty image file in the data stream to the Glance control module is executed.

[0021] Optionally, sending the empty image file in the data stream to the Glance control module includes:

[0022] The cloud management platform uses the Ingress load balancing service to determine an idle Glance control node in the Glance control module, and sends the empty image file to the Glance control node.

[0023] Optionally, uploading the original image file to the storage location through the Samba service includes:

[0024] The user terminal device uses the CIFS client and the Samba service to access the NFS storage device, and uploads the original image file to the storage location.

[0025] The present invention also provides an image upload system, comprising: a user terminal device, a cloud management platform, a Glance control module and an NFS storage device, wherein:

[0026] The user terminal device is configured to upload the empty image file to the Glance control module through the cloud management platform; obtain the storage location from the Glance control module through the cloud management platform, and upload the original image file to the storage location through the Samba service;

[0027] The cloud management platform is used to transmit the empty image file to the Glance control module;

[0028] The Glance control module is configured to store the empty image file in the NFS storage device and record the storage location of the empty image file in the NFS storage device;

[0029] The NFS storage device is used to store the empty image file or the original image file, and is preset with the Samba service.

[0030] Optionally, the Glance control module is further configured to establish a correspondence between the file name of the empty image file and the storage location, and save the correspondence to a database;

[0031] Correspondingly, the user terminal device is further configured to send the file name of the empty image file to the Glance control module through the cloud management platform;

[0032] The Glance control module is further configured to query a corresponding storage location in the database according to the file name, and send the storage location to the user terminal device.

[0033] The present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the server software downloading method described above is implemented.

[0034] The present invention provides an image uploading method, comprising: a user terminal device uploading an empty image file to a Glance control module through a cloud management platform; the Glance control module storing the empty image file in an NFS storage device and recording the storage location of the empty image file in the NFS storage device; the NFS storage device is preset with a Samba service; the user terminal device obtains the storage location from the Glance control module through the cloud management platform, and uploads the original image file to the storage location through the Samba service.

[0035] As can be seen, the user terminal device in the present invention first uploads the empty image file to the Glance control module through the cloud management platform, so that the Glance control module saves the empty image file to the NFS storage device and records the corresponding storage location. Since the volume of the empty image file is much smaller than the original image file, the present invention can achieve rapid uploading and storage of the empty image file; after the Glance control module completes recording the storage location, the user terminal device further obtains the storage location from the Glance control module through the cloud management platform, and directly uploads the original image file to the storage location through the Samba service preset by the NFS storage device, completing the replacement of the empty image file with the original image file. In other words, the present invention can use the empty image file to improve the efficiency of the Glance control module in allocating the storage location, and can directly upload the original image file through the Samba service preset by the NFS storage device, without using the cloud management platform to upload the original image file, which can effectively avoid the influence of the management network on the image upload, thereby effectively improving the upload speed and stability. The present invention also provides an image upload system and a computer-readable storage medium with the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0037] Figure 1 A flowchart of an image uploading method provided by an embodiment of the present invention;

[0038] Figure 2 A flowchart of another image uploading method provided by an embodiment of the present invention;

[0039] Figure 3 This is a structural block diagram of an image upload system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0041] In the related art, users generally need to upload image files to the Glance control module through the cloud management platform, so that the Glance control module saves the image files to the storage device and records the image information. Since image files are usually large, and the management network bandwidth used by the cloud management platform is limited and relatively busy, it is easy to encounter slow upload speeds, upload failures, etc. when uploading image files, thereby reducing the user experience of uploading image files using the cloud platform. In view of this, the present invention provides an image upload method, which can use empty image files to improve the efficiency of the Glance control module in allocating storage locations, and can directly upload the original image file through the Samba service preset by the NFS storage device, without using the cloud management platform to upload the original image file, which can effectively improve the upload speed and stability. Please refer to Figure 1 , Figure 1 A flowchart of an image uploading method provided by an embodiment of the present invention may include:

[0042] S101. The user device uploads the empty image file to the Glance control module through the cloud management platform.

[0043] In an embodiment of the present invention, an empty image file is a basic image file that is much smaller than the original image file and has the basic features of an image file, such as a file format. Since the empty image file is mainly used for the Glance control module to configure the storage location, the empty image file may not have any file content that can be installed and run, as long as it can pass the file verification of the Glance control module, wherein Glance is the image management service of Openstack, Openstack is a cloud computing management platform project, and the Glance control module is used to provide a series of services related to image files. It should be noted that the embodiment of the present invention does not limit the generation method of the empty image file, and reference may be made to the relevant technology of the empty image; the embodiment of the present invention also does not limit the specific size of the empty image file. First of all, the empty image file must be smaller than the original image file. At the same time, it can be understood that the smaller the size of the empty image file, the faster the upload and verification speed, and the better the effect on improving the efficiency of storage location configuration. Furthermore, it is understandable that in order to replace the empty image file with the original image file, the empty image file can have the same file name as the original image file; of course, since the volume of the original image file is much larger than the empty image file, in order to avoid the storage location allocated by the Glance control module being unable to store the original image file, preset space information can also be set in the empty image file according to the file size of the original image file, so that the Glance control module allocates storage space according to the preset space information.

[0044] Furthermore, it should be noted that the cloud management platform is a processing platform between the user end and the Openstack framework. In the embodiment of the present invention, the basic function of the cloud management platform is to transmit the empty image file uploaded by the user end and to connect with the Glance control module of the Openstack framework. Generally speaking, the cloud management platform can provide a user interface (User Interface) for the user end, and can also have an image module (Image) specifically for connecting with the Glance control module. When the cloud management platform is developed using a microservice framework, the user interface and image modules can also be set as two sub-services for separate deployment. The microservice architecture is an emerging network application development framework, and a single network application is composed of multiple loosely coupled and independently deployable components or services. The embodiment of the present invention does not limit the specific form of the user interface module and the image module. Reference can be made to the relevant technologies of the user interface and Openstack. Of course, the cloud management platform can also be developed using other network application development frameworks and have other software forms, which can be selected according to actual application requirements. In addition to transmitting empty image files, the embodiments of the present invention do not limit other functions of the cloud management platform. For example, it can perform user verification on the user information sent by the user-end device, or perform file name verification on the empty image file. Of course, it can also manage the image files stored in the user-end device, etc., which can be set according to actual application needs. In order to ensure the security of the data flow, the cloud management platform can perform user verification on the user information of the user-end device. Specifically, the user-end device can encapsulate the user information and the empty image file into the same data stream, and when the cloud management platform receives the data stream, it will perform user verification on the user information contained therein, and only when the verification is passed will it perform subsequent operations on the empty image file contained therein.

[0045] In one possible scenario, a user device uploads an empty image file to the Glance control module through the cloud management platform, including:

[0046] Step 11: The user-end device encapsulates the empty image file and user information into a data stream and sends the data stream to the cloud management platform;

[0047] Step 12: The cloud management platform verifies the user information in the data stream and sends the empty image file in the data stream to the Glance control module after the user verification passes.

[0048] It should be noted that the embodiments of the present invention do not limit the specific content contained in the user information, for example, it may include a user name, password, etc., and may also include user permission information, which can be set according to actual application requirements; the present invention does not limit the specific content of user verification, for example, user name and password verification can be performed, and user permission verification can also be performed to determine whether the user has sufficient permissions to upload the image file, which can also be set according to actual application requirements.

[0049] Furthermore, the cloud management platform can also manage image files stored on user devices. It's understood that there should be an upper limit on the number of image files that each user can store. Once the upper limit is reached, no further uploads are possible. Furthermore, to ensure that the Glance control module can effectively store empty image files, the file names of empty image files can also be verified to ensure that they have valid file names.

[0050] In a possible scenario, before sending the empty image file in the data stream to the Glance control module, the following steps are further included:

[0051] Step 21: The cloud management platform determines the number of stored images corresponding to the user information and determines whether the number of stored images is greater than a preset threshold; if so, the empty image file is ignored or no operation is performed; if not, step 22 is performed;

[0052] Step 22: The empty image file in the data stream is verified for its file name. After the file name verification passes, the step of sending the empty image file in the data stream to the Glance control module is executed.

[0053] It should be noted that the embodiment of the present invention does not limit the specific preset threshold value, which can be set according to actual application requirements; the embodiment of the present invention does not limit the specific content of the file name verification. For example, it can verify whether the empty image file name has a legal image file suffix, or it can verify whether the length of the file name exceeds another preset threshold value, which can be set according to actual application requirements.

[0054] Furthermore, it is understandable that, since the cloud management platform may process empty image files uploaded by multiple user-end devices at the same time, and a single Glance control module may find it difficult to cope with the storage location allocation and storage tasks of a large number of empty image files, the Glance control module can be divided into multiple Glance control nodes, and the load balancing service is used to load balance the Glance control nodes. It should be noted that the embodiment of the present invention does not limit the number of Glance control nodes, which can be set according to actual application requirements; the embodiment of the present invention does not limit the specific load balancing service, for example, it can be an Ingress load balancing service, where Ingress is a global load balancing service set up to proxy different back-end services; the embodiment of the present invention does not limit the workflow of Ingress, and reference can be made to the relevant technology of Ingress.

[0055] In one possible scenario, sending an empty image file in a data stream to the Glance control module includes:

[0056] The cloud management platform uses the Ingress load balancing service to determine the idle Glance control node in the Glance control module and sends the empty image file to the Glance control node.

[0057] Of course, the cloud management platform can also be divided into several cloud management nodes. When a user-end device sends an empty image file to the cloud platform, the Ingress load balancing service can also determine an idle cloud management node and then send the empty image file of the user-end device to the idle cloud management node. It should be noted that the embodiment of the present invention does not limit the specific number of cloud management nodes, and can be set according to actual application requirements.

[0058] S102. The Glance control module stores the empty image file in the NFS storage device and records the storage location of the empty image file in the NFS storage device; the NFS storage device is pre-installed with a Samba service.

[0059] The Network File System (NFS) is one of the most popular shared file systems for heterogeneous platforms. It's primarily used in Unix environments and supports file sharing between different types of systems over the network. Furthermore, the NFS system is a backend storage system supported by the Glance control module. In other words, the embodiments of the present invention utilize an NFS storage device to store empty image files and, leveraging the NFS storage device's file sharing mechanism, upload the original image file via other data paths. This avoids uploading the original image file via the management network, effectively avoiding management network restrictions on uploading the original image file, and effectively improving upload efficiency and stability. Furthermore, to facilitate access by client devices running Windows and Linux operating systems, the NFS storage device runs the Samba service. Samba is software that implements the SMB protocol on Linux and Unix systems. SMB (Server Message Block) is a communication protocol for sharing files and printers on local area networks. In other words, client devices simply need to utilize the Samba service pre-configured by the NFS storage device to access the NFS storage device and upload the original image file.

[0060] It should be noted that the embodiment of the present invention does not limit the configuration method of the Samba service on the NFS storage device. Please refer to the relevant technologies of NFS and Samba, for example, configuring the access directory of SAMBA to point to the NFS directory configured by GLANCE; the embodiment of the present invention does not limit the configuration method of the NFS storage device and the Glance control module. Please refer to the relevant technologies of NFS and Glance.

[0061] Furthermore, to effectively manage the storage location of empty image files in NFS storage devices, the Glance control module can specifically record the storage location. It is understood that due to the large number of image files, the Glance control module can save the correspondence between empty image files and their storage locations in a database. The embodiments of the present invention do not limit the specific data identifying an empty image file; for example, it can be the file name of an empty image file or the file number of an empty image file. To facilitate queries, the specific data identifying an empty image file can be the file name, and the Glance control module can save the correspondence between the file name and the storage location in the database.

[0062] In one possible scenario, recording the storage location of the empty image file in the NFS storage device may include:

[0063] Step 31: The Glance control module establishes a correspondence between the file name of the empty image file and the storage location, and saves the correspondence to the database.

[0064] Furthermore, if the empty image file contains preset space information, the Glance control module can also extract the information before storage, allocate a storage location and storage space according to the information, and then save the empty image file to the storage location to ensure that the original image file has sufficient storage space.

[0065] In one possible scenario, the Glance control module stores the empty image file in the NFS storage device, including:

[0066] Step 41: The Glance control module reads the preset space information from the empty image file and allocates a storage location and corresponding storage space in the NFS storage device according to the preset space information;

[0067] Step 42: Store the empty image file to a storage location.

[0068] S103: The user terminal device obtains the storage location from the Glance control module through the cloud management platform, and uploads the original image file to the storage location through the Samba service.

[0069] After the empty image file is successfully saved, the user-end device can query the Glance control module for the corresponding storage location through the cloud management platform, and then directly upload the original image file to the NFS storage device through the Samba service. It can be understood that the Samba service requires the use of a corresponding client to be accessible. The embodiment of the present invention does not limit the specific client. For example, a Samba client can be used directly, or a CIFS client can be used, where CIFS (Common Internet File System) is another sharing protocol based on the SMB protocol and can access storage systems that support the SMB protocol. Considering that the CIFS client is a native client of the Windows operating system and does not require additional installation, and the Windows operating system is a widely used operating system, in the embodiment of the present invention, the user-end device can use the CIFS client and the Samba service to access the NFS storage device.

[0070] In one possible scenario, uploading the original image file to a storage location through the Samba service includes:

[0071] Step 51: The user terminal device uses the CIFS client and Samba service to access the NFS storage device and upload the original image file to the storage location.

[0072] Furthermore, it should be noted that the embodiments of the present invention do not limit how a user-end device queries the storage location of an empty image file. The query method is related to the specific identifier of the empty image file stored in the Glance control module. For example, the query can be performed by file name or file number. Considering that file names facilitate querying, in embodiments of the present invention, the specific identifier of the empty image file stored in the Glance control module can be the file name, and the user-end device can query the corresponding storage location based on the file name.

[0073] In one possible scenario, the user terminal device obtains the storage location from the Glance control module through the cloud management platform, including:

[0074] Step 61: The client device sends the file name of the empty image file to the Glance control module through the cloud management platform, so that the Glance control module searches the database for the corresponding storage location according to the file name and sends the storage location to the client device.

[0075] Based on the above embodiment, the user terminal device in the present invention first uploads the empty image file to the Glance control module through the cloud management platform, so that the Glance control module saves the empty image file to the NFS storage device and records the corresponding storage location. Since the volume of the empty image file is much smaller than the original image file, the present invention can realize the rapid uploading and storage of the empty image file; after the Glance control module completes the recording of the storage location, the user terminal device further obtains the storage location from the Glance control module through the cloud management platform, and directly uploads the original image file to the storage location through the Samba service preset by the NFS storage device, completing the replacement of the empty image file with the original image file. In other words, the present invention can use the empty image file to improve the efficiency of the Glance control module in allocating the storage location, and can directly upload the original image file through the Samba service preset by the NFS storage device without using the cloud management platform to upload the original image file, which can effectively avoid the influence of the management network on the image upload, thereby effectively improving the upload speed and stability.

[0076] The following is a detailed flowchart to describe the image upload method. Figure 2 , Figure 2 This is a flowchart of another image uploading method provided by an embodiment of the present invention. The specific process is as follows:

[0077] 1. Preparation: When deploying the Glance module of OpenStack, select NFS backend storage and deploy Samba service on this backend storage. Configure Samba's access directory to point to the NFS directory configured by Glance.

[0078] 2. The user uploads an empty image through the cloud management platform. At this time, the web page will read the user's local image data, load shunting the local image data through the Ingress, and then passing the gateway authentication (i.e. user authentication) and finally uploading it to the cloud management user interface platform (UI, User Interface) server (such as Figure 2 Step 1).

[0079] 3. The cloud management platform UI server uploads the data stream to the cloud management platform Image module (mirror module) after the data stream passes the gateway authentication.

[0080] 4. The cloud image management platform (Image) verifies the image data for quota validity and other factors (such as file name verification and the number of stored images) and then uploads the data to the OpenStack Glance module (Glance-api). This requires Ingress load balancing and gateway authentication in the OpenStack module.

[0081] 5. After receiving the data stream, the OpenStack Glance module stores the image file in the backend storage configured in step 1 and registers the image information in the database (DB). At this time, the Glance module creates an empty image file on the storage node. Since the data stream uploaded in these steps is an empty file, it does not take too long.

[0082] 6. The user directly accesses the mirror backend storage node configured by Samba through the CIFS client, finds the location of the empty file uploaded in step 5, and directly overwrites this empty file with the real mirror by copying it.

[0083] The following describes an image upload system and a computer-readable storage medium provided by an embodiment of the present invention. The image upload system and the computer-readable storage medium described below may correspond to the image upload method described above.

[0084] Please refer to Figure 3 , Figure 3 This is a structural block diagram of an image upload system provided by an embodiment of the present invention. The system may include: a user terminal device 301, a cloud management platform 302, a Glance control module 303 and an NFS storage device 304, wherein:

[0085] The user terminal device 301 can be used to upload the empty image file to the Glance control module 303 through the cloud management platform 302; obtain the storage location from the Glance control module 303 through the cloud management platform 302, and upload the original image file to the storage location through the Samba service;

[0086] The cloud management platform 302 can be used to transfer the empty image file to the Glance control module 303;

[0087] The Glance control module 303 may be used to store the empty image file in the NFS storage device 304 and record the storage location of the empty image file in the NFS storage device 304;

[0088] The NFS storage device 304 can be used to store empty image files or original image files, and has a preset Samba service.

[0089] Optionally, the Glance control module 303 may also be used to establish a correspondence between the file name of the empty image file and the storage location, and save the correspondence to the database;

[0090] Correspondingly, the user terminal device 301 can also be used to send the file name of the empty image file to the Glance control module 303 through the cloud management platform 302;

[0091] The Glance control module 303 may also be used to query a corresponding storage location in the database according to the file name, and send the storage location to the user terminal device 301 .

[0092] Optionally, the Glance control module 303 may also be configured to read preset space information from the empty image file, allocate a storage location and corresponding storage space in the NFS storage device 304 according to the preset space information, and store the empty image file in the storage location.

[0093] Optionally, the user terminal device 301 may also be used to encapsulate the empty image file and user information into a data stream and send the data stream to the cloud management platform 302;

[0094] The cloud management platform 302 may also be used to perform user verification on the user information in the data stream, and send the empty image file in the data stream to the Glance control module 303 after the user verification is passed.

[0095] Optionally, the cloud management platform 302 can also be used to determine the number of stored images corresponding to the user information and judge whether the number of stored images is greater than a preset threshold; if not, the empty image file in the data stream is subjected to file name verification, and after the file name verification is passed, the step of sending the empty image file in the data stream to the Glance control module 303 is executed.

[0096] Optionally, the cloud management platform 302 may also be configured to use the Ingress load balancing service to determine an idle Glance control node in the Glance control module 303 and send the empty image file to the Glance control node.

[0097] Optionally, the user terminal device 301 can also be used to access the NFS storage device 304 using a CIFS client and a Samba service, and upload the original image file to a storage location.

[0098] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the image uploading method of any of the above embodiments are implemented.

[0099] Since the embodiments of the computer-readable storage medium part correspond to the embodiments of the server fault detection method part, the embodiments of the storage medium part refer to the description of the embodiments of the image upload method part, and are not repeated here.

[0100] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0101] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0102] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0103] The above is a detailed introduction to the image uploading method, system, and computer-readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only intended to help understand the method and core ideas of the present invention. It should be noted that for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. A mirror image uploading method, characterized in that: include: The user device uploads the empty image file to the Glance control module through the cloud management platform; The Glance control module stores the empty image file in an NFS storage device and records the storage location of the empty image file in the NFS storage device; the NFS storage device is preset with a Samba service; The user terminal device obtains the storage location from the Glance control module through the cloud management platform, and directly uploads the original image file to the storage location in the NFS storage device through the Samba service.

2. The image uploading method according to claim 1, wherein: The recording of the storage location of the empty image file in the NFS storage device includes: The Glance control module establishes a correspondence between the file name of the empty image file and the storage location, and saves the correspondence to a database; Accordingly, the user terminal device obtains the storage location from the Glance control module through the cloud management platform, including: The user terminal device sends the file name of the empty image file to the Glance control module through the cloud management platform, so that the Glance control module searches the database for a corresponding storage location according to the file name and sends the storage location to the user terminal device.

3. The image uploading method according to claim 1, wherein: The Glance control module stores the empty image file in the NFS storage device, including: The Glance control module reads the preset space information from the empty image file, and allocates the storage location and the corresponding storage space in the NFS storage device according to the preset space information; The empty image file is stored in the storage location.

4. The image uploading method according to claim 1, wherein: The client device uploads the empty image file to the Glance control module through the cloud management platform, including: The user terminal device encapsulates the empty image file and user information into a data stream, and sends the data stream to the cloud management platform; The cloud management platform performs user verification on the user information in the data stream, and after the user verification is passed, sends the empty image file in the data stream to the Glance control module.

5. The image uploading method according to claim 4, characterized in that: Before sending the empty image file in the data stream to the Glance control module, the method further includes: The cloud management platform determines the number of stored images corresponding to the user information, and determines whether the number of stored images is greater than a preset threshold; If not, the empty image file in the data stream undergoes file name verification, and after the file name verification passes, the step of sending the empty image file in the data stream to the Glance control module is executed.

6. The image uploading method according to claim 4, characterized in that: The sending of the empty image file in the data stream to the Glance control module includes: The cloud management platform uses the Ingress load balancing service to determine an idle Glance control node in the Glance control module, and sends the empty image file to the Glance control node.

7. The image uploading method according to any one of claims 1 to 6, characterized in that: The uploading of the original image file to the storage location through the Samba service includes: The user terminal device uses the CIFS client and the Samba service to access the NFS storage device, and uploads the original image file to the storage location.

8. A mirror upload system, characterized in that: include: Client devices, cloud management platform, Glance control module and NFS storage devices, including: The user terminal device is used to upload the empty image file to the Glance control module through the cloud management platform; obtain the storage location from the Glance control module through the cloud management platform, and directly upload the original image file to the storage location in the NFS storage device through the Samba service; The cloud management platform is used to transmit the empty image file to the Glance control module; The Glance control module is configured to store the empty image file in the NFS storage device and record the storage location of the empty image file in the NFS storage device; The NFS storage device is used to store the empty image file or the original image file, and is preset with the Samba service.

9. The image upload system according to claim 8, characterized in that: The Glance control module is further configured to establish a correspondence between the file name of the empty image file and the storage location, and save the correspondence to a database; Correspondingly, the user terminal device is further configured to send the file name of the empty image file to the Glance control module through the cloud management platform; The Glance control module is further configured to query a corresponding storage location in the database according to the file name, and send the storage location to the user terminal device.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by the processor, the image uploading method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method for accessing network storage and network access device

    CN103384257A

  • Method of cloud platform to create mirror image, and cloud platform device

    CN107888695A