Image file processing methods, apparatus and electronic devices

By generating image files outside of public cloud private networks and managing images using pre-boot execution environments and object storage servers, the problem of cloud computing vendors being unable to support users in deploying data migration themselves is solved, improving data storage availability and reducing operating costs.

CN114356357BActive Publication Date: 2025-10-28BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210002074.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-04
Publication Date
2025-10-28
Estimated Expiration
2042-01-04

AI Technical Summary

Technical Problem

In existing technologies, cloud computing vendors have failed to effectively support the migration or installation of services and configuration files deployed by users themselves, resulting in poor data storage availability and high user operating costs, and failing to meet users' data migration and recovery needs when bare metal servers fail.

Method used

This paper provides a method for processing image files. By generating image files of system disks and data disks outside the public cloud private network environment, the image files are saved and managed using a pre-boot execution environment server and an object storage server, reducing the need for users to migrate or install them themselves.

Benefits of technology

It improves the availability of data storage, reduces user operating costs, simplifies data migration and recovery processes, and meets users' needs for efficient image creation in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114356357B_ABST
    Figure CN114356357B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, and electronic device for image file processing. It receives image creation requests for system disk data and data disk data, operating independently of a public cloud private network environment. Based on the image creation request, it obtains a first image script and a second image script. Based on the first image script, the second image script, and the image configuration parameters carried in the image creation request, it generates a system image file corresponding to the system disk data and a data image file corresponding to the data disk data. This method can obtain image scripts corresponding to system disk data and data disk data respectively based on image creation requests carrying image configuration parameters. Based on the image scripts and image configuration parameters, it creates images of system disk data and data disk data in a bare metal server. Because users do not need to migrate or install data on the data disk using other methods, it improves the availability of data storage and reduces user operating costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus and electronic device for processing image files. Background Art

[0002] Bare metal servers, combining the flexibility and elasticity of virtual machines with high-performance computing capabilities, are a type of scalable high-performance computing server. Users can purchase bare metal servers from cloud computing providers. Considering disaster recovery, users may need to retain the data and configurations on their existing bare metal servers. In related technologies, cloud computing providers can provide users with clean system images so that users can install the system when creating a new instance. However, users' bare metal servers usually contain self-deployed services, configuration files, and other related data. Cloud computing providers do not provide methods for migrating or installing this type of data. Users need to use other methods to migrate or install this data themselves. Therefore, the availability of data storage in this technology is poor, and the user's operating costs are also high. Summary of the Invention

[0003] The purpose of this invention is to provide a method, apparatus, and electronic device for processing image files, so as to improve the availability of data storage and reduce user operating costs.

[0004] In a first aspect, the present invention provides an image file processing method, which is applied to a bare metal server on the user side, the bare metal server being pre-running in a public cloud private network environment; the method includes: receiving an image creation request for pre-stored system disk data and data disk data, detaching from the public cloud private network environment; wherein, the image creation request carries image configuration parameters input by the user; based on the image creation request, obtaining a first image script corresponding to the system disk data and a second image script corresponding to the data disk data; detaching from the public cloud private network environment, generating a system image file corresponding to the system disk data and a data image file corresponding to the data disk data based on the first image script, the second image script, and the image configuration parameters.

[0005] Furthermore, the bare metal server is connected to the pre-boot execution environment server; the pre-boot execution environment database corresponding to the pre-boot execution environment server pre-stores image scripts corresponding to various system disk data and image scripts corresponding to various data disk data; the steps of obtaining the first image script corresponding to the system disk data and the second image script corresponding to the data disk data based on the image creation request include: sending the image creation request to the pre-boot execution environment server, and obtaining the first image script corresponding to the system disk data and the second image script corresponding to the data disk data from the pre-boot execution environment database through the pre-boot execution environment server.

[0006] Furthermore, after the steps of connecting the bare metal server to the preboot execution environment server; connecting the preboot execution environment server to the object storage server; and generating a system image file corresponding to the system disk data and a data image file corresponding to the data disk data, the method further includes: saving the system image file and the data image file to the preboot execution environment database corresponding to the preboot execution environment server via the preboot execution environment server; and saving the system image file and the data image file to the object storage database corresponding to the object storage server sequentially via the preboot execution environment server and the object storage server.

[0007] Furthermore, after the steps of connecting the object storage server to the bare metal backend server and saving the system image file and data image file to the object storage database corresponding to the object storage server, the method also includes: receiving messages indicating successful saving of the system image file and data image file through the object storage server and the bare metal backend server in sequence, and joining the public cloud private network environment to re-run in the public cloud private network environment.

[0008] Furthermore, after joining the public cloud private network environment to re-run the steps in the public cloud private network environment, the method also includes: returning a first processing result to the user corresponding to the image creation request through a bare metal backend server; wherein the first processing result includes: the file identifier corresponding to the system image file, the file identifier corresponding to the data image file, a message indicating whether the system image file was created successfully or failed, and a message indicating whether the data image file was created successfully or failed.

[0009] Furthermore, after joining the public cloud private network environment to re-run in the public cloud private network environment, the method also includes: sending the file identifier corresponding to the system image file and the file identifier corresponding to the data image file to the image management platform corresponding to the bare metal server through the bare metal backend server.

[0010] Secondly, the present invention provides an image file processing method, which is applied to an image management platform; the object storage server of the image management platform stores a target image file, the target image file including a system image file and a data image file generated according to any one of the methods in the first aspect above; the method includes: receiving a processing request for the system image file and the data image file; wherein the processing request includes one of the following: a copy request, a delete request; based on the processing request, performing a processing operation corresponding to the processing request on the file identifier corresponding to the system image file and the file identifier corresponding to the data image file to obtain a second processing result; and returning the second processing result to the user corresponding to the processing request.

[0011] Thirdly, the present invention provides an image file processing device, which is installed on a bare metal server on the user side, and the bare metal server is pre-running in a public cloud private network environment; the device includes: a first receiving module, used to receive an image creation request for pre-stored system disk data and data disk data, detached from the public cloud private network environment; wherein, the image creation request carries image configuration parameters input by the user; an acquisition module, used to acquire a first image script corresponding to the system disk data and a second image script corresponding to the data disk data based on the image creation request; and a generation module, used to generate a system image file corresponding to the system disk data and a data image file corresponding to the data disk data based on the first image script, the second image script, and the image configuration parameters, detached from the public cloud private network environment.

[0012] Fourthly, the present invention provides an image file processing apparatus, which is installed on an image management platform; the object storage server of the image management platform stores target image files, the target image files including system image files and data image files generated according to any one of the methods in the first aspect above; the apparatus includes: a second receiving module, used to receive processing requests for the system image files and data image files; wherein the processing requests include one of the following: a copy request, a delete request; a processing module, used to perform processing operations corresponding to the processing request on the file identifier corresponding to the system image file and the file identifier corresponding to the data image file based on the processing request, to obtain a second processing result; and a return module, used to return the second processing result to the user corresponding to the processing request.

[0013] Fifthly, the present invention provides an electronic device including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the image file processing method of any one of the first or second aspects described above.

[0014] In a sixth aspect, the present invention provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the image file processing method of either the first or second aspect described above.

[0015] The image file processing method, apparatus, and electronic device provided by this invention first receive an image creation request for pre-stored system disk data and data disk data, operating outside of a public cloud private network environment. The image creation request carries image configuration parameters input by the user. Then, based on the image creation request, a first image script corresponding to the system disk data and a second image script corresponding to the data disk data are obtained. Finally, outside of the public cloud private network environment, based on the first image script, the second image script, and the image configuration parameters, a system image file corresponding to the system disk data and a data image file corresponding to the data disk data are generated. This method can obtain image scripts corresponding to the system disk data and data disk data respectively based on an image creation request carrying image configuration parameters, and create images of the system disk data and data disk data in a bare metal server based on the image scripts and image configuration parameters. Since users do not need to migrate or install data in the data disk using other methods, it improves the availability of data storage and reduces user operating costs. Attached Figure Description

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

[0017] Figure 1 A flowchart of an image file processing method provided in an embodiment of the present invention;

[0018] Figure 2 A flowchart of another image file processing method provided in an embodiment of the present invention;

[0019] Figure 3 A flowchart of another image file processing method provided in an embodiment of the present invention;

[0020] Figure 4 A schematic diagram of a front-end console operation interface provided in an embodiment of the present invention;

[0021] Figure 5 A flowchart illustrating the creation of a bare metal server image is provided in this embodiment of the invention.

[0022] Figure 6 A flowchart of another image file processing method provided in an embodiment of the present invention;

[0023] Figure 7 This is a schematic diagram of an image management platform interface provided in an embodiment of the present invention;

[0024] Figure 8 This is a schematic diagram of a new standard image operation interface provided in an embodiment of the present invention;

[0025] Figure 9 This is a schematic diagram of a private image creation operation interface provided in an embodiment of the present invention;

[0026] Figure 10 This is a schematic diagram of the structure of an image file processing device provided in an embodiment of the present invention;

[0027] Figure 11 This is a schematic diagram of another image file processing device provided in an embodiment of the present invention;

[0028] Figure 12 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed Implementation

[0029] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0030] Bare metal servers, combining the elasticity and flexibility of virtual machines with high-performance computing capabilities, are a type of scalable high-performance computing server. Users can purchase bare metal servers from cloud computing providers. In some scenarios, users may need to retain or migrate data and configurations on existing bare metal servers. In this scenario, cloud computing providers and their technical staff have no right to interfere with the user's business operations. Therefore, cloud computing providers only support clean system installation services. They can provide clean system images for users to install when creating new instances. For services, configuration files, and other programs deployed by the user themselves, the user needs to handle these additional tasks. In scenarios where other methods are used to migrate or install this type of data, the services provided by cloud computing vendors fail to meet users' high availability requirements for data storage, and the user's operational costs (including fees, time, and manpower) are too high. In scenarios where a user's bare-metal server fails and data migration to a backup server is required, the user typically activates the backup server, which must be a machine capable of supporting the same business, before migrating the data. After activating the backup server, an end-to-end connection needs to be established to copy the data to the backup server. In this scenario, if the user's business deployment uses only one bare-metal server, data migration and recovery are impossible. In addition, the end-to-end connection requires the user to pay additional traffic fees, resulting in significant overhead.

[0031] As can be seen from the above, in the relevant technologies, cloud computing vendors' product capabilities are insufficient and cannot meet the actual user needs. With the development of cloud computing vendors' business and users' business, the existing functions can no longer meet users' important needs for reducing costs and improving efficiency. If they cannot keep up with users' actual application scenarios, it will also have an adverse impact on the cloud computing vendors' business.

[0032] Based on this, embodiments of the present invention provide a method, apparatus, and electronic device for image file processing. This technology can be applied to applications that require image processing of relevant data in bare metal servers.

[0033] To facilitate understanding of this embodiment, a detailed description of an image file processing method disclosed in this embodiment of the invention is provided first. The method is applied to a bare-metal server on the user side. The bare-metal server is pre-running in a public cloud private network environment, which can be called a VPC (Virtual Private Cloud). This can be understood as a user-customizable network where users can deploy cloud service resources such as cloud hosts, load balancers, and data within the public cloud private network. Figure 1 As shown, the method includes the following steps:

[0034] Step S102: Receive a request to create an image of the pre-stored system disk data and data disk data, outside the public cloud private network environment; wherein, the image creation request carries image configuration parameters input by the user.

[0035] The system disk mentioned above can be understood as the disk used to install the operating system in a bare metal server, and the system disk data can be understood as the data related to system installation stored in the system disk. The data disk mentioned above can be understood as the disk used to store data in a bare metal server, and the data disk data can be understood as the data stored in the data disk. In actual implementation, users can enter relevant image configuration parameters through the console, such as the image name filled in by the user, the region where the base image obtained by the backend is located, the image ID (Identity document), the image type, and other parameter information. Then, a request to create an image for the entire bare metal server is issued, that is, a request to create an image of the system disk data and data disk data pre-stored in the bare metal server. When the bare metal server receives the image creation request, it will usually automatically disconnect from the public cloud private network environment, that is, automatically enter the offline VPC state to create the image in the offline VPC state.

[0036] Step S104: Based on the image creation request, obtain the first image script corresponding to the system disk data and the second image script corresponding to the data disk data.

[0037] The first image script mentioned above can be understood as an executable file that can perform actual image operations on the system disk data; the second image script mentioned above can be understood as an executable file that can perform actual image operations on the data disk data; in actual implementation, when the above image creation request is received and the public cloud private network environment is removed, it is usually necessary to obtain the image scripts corresponding to the system disk data and the data disk data respectively in order to perform image operations on the system disk data and the data disk data.

[0038] Step S106: In a private network environment outside of a public cloud, based on the first image script, the second image script, and the image configuration parameters, generate a system image file corresponding to the system disk data and a data image file corresponding to the data disk data.

[0039] The aforementioned system image file can be understood as a backup of the system disk data, which can be used to preserve and restore the system disk data; the aforementioned data image file can be understood as a backup of the data disk data, which can be used to preserve and restore the data disk data. In actual implementation, based on the obtained first image script, second image script and image configuration parameters, images of the system disk data and data disk data in the bare metal server can be created to obtain the system image file corresponding to the system disk data and the data image file corresponding to the data disk data.

[0040] The aforementioned image file processing method first receives an image creation request for pre-stored system disk data and data disk data, operating outside of a public cloud private network environment. This request carries user-inputted image configuration parameters. Then, based on the request, it retrieves the first image script corresponding to the system disk data and the second image script corresponding to the data disk data. Finally, outside the public cloud private network environment, it generates a system image file for the system disk data and a data image file for the data disk data based on the first image script, the second image script, and the image configuration parameters. This method can retrieve image scripts for system disk data and data disk data respectively based on an image creation request carrying image configuration parameters. Based on these scripts and configuration parameters, it creates images of the system disk data and data disk data in a bare metal server. Since users do not need to migrate or install data on the data disk themselves, it improves data storage availability and reduces user operating costs.

[0041] This invention also provides another image file processing method, which is implemented based on the method of the above embodiments. This method focuses on describing the specific process of obtaining a first image script corresponding to system disk data and a second image script corresponding to data disk data based on an image creation request, specifically corresponding to step S204 below. In this method, the bare metal server is connected to a preboot execution environment server. The preboot execution environment database corresponding to the preboot execution environment server pre-stores image scripts corresponding to various system disk data and image scripts corresponding to various data disk data. This preboot execution environment server can also be called a PXE (Preboot Execute Environment) server. Clients can use the PXE server to automatically install the operating system upon boot. The server can listen for and respond to the client's system installation request and provide DHCP (Dynamic Host Configuration Protocol) and TFTP (Trivial File Transfer Protocol) services. Protocol (e.g., Simple File Transfer Protocol) and other services; among them, DHCP is a local area network protocol; TFTP is a protocol used for simple file transfer between clients and servers; the aforementioned pre-boot execution environment database can also be called a PXE database, which typically stores pre-stored image scripts corresponding to various system disk data and various data disk data; such as Figure 2 As shown, the method includes the following steps:

[0042] Step S202: Receive a request to create an image of pre-stored system disk data and data disk data, outside the public cloud private network environment; wherein, the image creation request carries image configuration parameters input by the user.

[0043] Step S204: Send the image creation request to the pre-boot execution environment server. Through the pre-boot execution environment server, retrieve the first image script corresponding to the system disk data and the second image script corresponding to the data disk data from the pre-boot execution environment database.

[0044] In practice, when a user's bare metal server receives an image creation request from the user, it can send the request to the preboot execution environment server to request the image scripts needed to create the image. After receiving the image creation request, the preboot execution environment server retrieves the first image script corresponding to the system disk data and the second image script corresponding to the data disk data from the connected preboot execution environment database through the script transfer API (Application Programming Interface).

[0045] Step S206: In a private network environment outside of a public cloud, based on the first image script, the second image script, and the image configuration parameters, generate a system image file corresponding to the system disk data and a data image file corresponding to the data disk data.

[0046] The aforementioned image file processing method first receives image creation requests for pre-stored system disk data and data disk data, operating outside of a public cloud private network environment. Then, it sends the image creation request to a pre-boot execution environment server. The server retrieves the first image script corresponding to the system disk data and the second image script corresponding to the data disk data from its database. Finally, outside the public cloud private network environment, based on the first image script, the second image script, and image configuration parameters, it generates the system image file corresponding to the system disk data and the data image file corresponding to the data disk data. This method can obtain the image scripts corresponding to the system disk data and data disk data respectively based on the image creation request carrying image configuration parameters. Based on the image scripts and image configuration parameters, it creates images of the system disk data and data disk data in the bare metal server. Since users do not need to migrate or install data on the data disk using other methods, it improves the availability of data storage and reduces user operating costs.

[0047] This invention also provides another image file processing method, which is implemented based on the method in the above embodiments; in this method, the bare metal server is connected to the pre-boot execution environment server; the pre-boot execution environment server is connected to the object storage server; the object storage server is connected to the bare metal backend server; the bare metal backend server is typically a bare metal backend server from a cloud computing vendor, such as... Figure 3 As shown, the method includes the following steps:

[0048] Step S302: Receive a request to create an image of the pre-stored system disk data and data disk data, outside the public cloud private network environment; wherein, the image creation request carries image configuration parameters input by the user.

[0049] In practice, users can initiate the aforementioned image creation request through the front-end console they are operating. (See [link to relevant documentation]). Figure 4 The diagram shows a front-end console interface. When a user needs to create an image, they can first select the instance to be imaged, fill in the relevant image configuration parameters, and then trigger the image creation button to initiate an image creation request. In other words, the user can trigger the image creation process with one click through the front-end console, and the operation is simple. The front-end console operated by the user is usually connected to the bare metal back-end server of the cloud computing provider. The bare metal back-end server is connected to the user's bare metal server and can receive the image creation request initiated by the user through the bare metal back-end server.

[0050] Step S304: Based on the image creation request, obtain the first image script corresponding to the system disk data and the second image script corresponding to the data disk data.

[0051] Step S306: In a private network environment outside of a public cloud, based on the first image script, the second image script, and the image configuration parameters, generate a system image file corresponding to the system disk data and a data image file corresponding to the data disk data.

[0052] Step S308: Save the system image file and data image file to the pre-boot execution environment database corresponding to the pre-boot execution environment server through the pre-boot execution environment server.

[0053] In practice, once the user's bare metal server has created the system image file corresponding to the system disk data and the data image file corresponding to the data disk data, the created system image file and data image file can be saved to the pre-boot execution environment database through the connected pre-boot execution environment server.

[0054] Step S310: The system image file and data image file are saved to the object storage database corresponding to the object storage server in sequence through the pre-boot execution environment server and the object storage server.

[0055] Once the user's bare-metal server has created the system image file corresponding to the system disk data and the data image file corresponding to the data disk data, it typically saves the created system image file and data image file to the object storage database on the object storage server through a pre-boot execution environment server and an object storage server connected in sequence. The object storage database and the pre-boot execution environment database may use different file storage methods. For example, data in the object storage database can be stored as files in containers, which offers better scalability and higher object storage efficiency. Cloud computing vendors can expand it by adding nodes.

[0056] Step S312: Receive messages from the object storage server and bare metal backend server in sequence indicating successful saving of the system image file and data image file, and join the public cloud private network environment to re-run in the public cloud private network environment.

[0057] After the system image file and data image file are saved to the object storage database corresponding to the object storage server, the object storage server can send a message to the bare metal backend server indicating successful saving. The bare metal backend server then sends this message to the user's bare metal server. Upon receiving this message, the user's bare metal server typically needs to rejoin the public cloud private network environment. For example, the bare metal server may automatically rejoin the public cloud private network environment after a restart. After rejoining the public cloud private network environment, the user's bare metal server can be accessed and used normally.

[0058] Step S314: Return a first processing result to the user corresponding to the image creation request through the bare metal backend server; wherein, the first processing result includes: the file identifier corresponding to the system image file, the file identifier corresponding to the data image file, a message indicating whether the system image file was created successfully or failed, and a message indicating whether the data image file was created successfully or failed.

[0059] In practice, once the user's bare metal server is running again in the public cloud private network environment, it can return the first processing result to the bare metal backend server. This bare metal backend server then feeds back the first processing result to the user who initiated the image creation request. Specifically, it can return the file identifier and status value of the completed system image file and the file identifier and status value of the data image file to the user's front-end console. For example, it can return the ID of the system image file, the ID of the data image file, whether the system image file was created successfully or failed, and whether the data image file was created successfully or failed. The user can view the first processing result through the front-end console.

[0060] Step S316: Send the file identifier corresponding to the system image file and the file identifier corresponding to the data image file to the image management platform corresponding to the bare metal server through the bare metal backend server.

[0061] The aforementioned image management platform can be understood as an internal operation and management platform for cloud computing vendors. This platform manages all images visible to users. Specifically, when a user's bare metal server is re-running in a public cloud private network environment, the system image file's file identifier and the data image file's file identifier can be sent to the image management platform corresponding to the bare metal server via the bare metal backend server. For example, the system image file's ID and the data image file's ID can be sent to the image management platform. The image management platform can save the file identifier corresponding to each received image file. Subsequently, cloud computing vendor staff can use the file identifier of each image file saved by the image management platform to perform operations such as copying and deleting all images visible to users. This provides greater operational flexibility and better meets users' object storage needs.

[0062] The aforementioned image file processing method can save the completed system image file and data image file to the pre-boot execution environment database and object storage database. It can also return the first processing result to the user corresponding to the image creation request via the bare metal backend server. Furthermore, it sends the file identifiers corresponding to the system image file and the data image file to the image management platform corresponding to the bare metal server. In this approach, users can create images independently, improving the availability of object storage. The operation process is simple, increasing the efficiency of image creation in different use cases. Cloud computing vendors can store user-created image data in the database, ensuring practicality and security.

[0063] To further understand the above embodiments, the following provides... Figure 5 The diagram illustrates a bare-metal server image creation process. The process can be summarized as follows: Before creating the image, the user needs to reboot their bare-metal server. After network boot, they enter a diskless environment via PXE and execute the image creation script within this environment. The image file is then created in the diskless environment and uploaded to the corresponding object storage database on the object storage server. Finally, the machine is rebooted again in the diskless environment to re-enter the network, completing the image creation process. Throughout the image creation process, the image is created in a diskless environment using Busybox (a software integrating many commonly used Linux commands and tools) to create a diskless bootable image. Image creation and recovery are performed in this environment, resulting in a single file stored on the PXE server. Additionally, the cloud computing vendor's custom scripts are used to automate image creation and recovery. These scripts are typically stored in the PXE database on the PXE server for automatic download and execution by the user.

[0064] The specific process is described below: The user triggers the image creation process with a single click through the front-end console, issuing an image creation command (corresponding to the image creation request) for all data on the user's bare metal server (corresponding to the system disk data and data disk data mentioned above). This front-end console typically has a webconsole (a web-based application that allows direct execution of shell commands from a browser on the server) or SDK (Software Development Kit) pre-installed. The front-end console executes the image creation command, sending it to the cloud provider's bare metal backend server. The bare metal backend server forwards the command to the user's bare metal server, enabling the server to begin image creation. Typically, upon receiving the command, the user's bare metal server automatically enters offline VPC mode (detached from the public cloud private network environment) and requests the necessary image scripts from the PXE server (corresponding to the pre-boot execution environment server mentioned above). The PXE server retrieves the required image scripts from the PXE database (corresponding to the pre-boot execution environment database mentioned above) via the script transfer API and sends them to the user's bare metal server. The server begins image creation based on the obtained image script and the image configuration parameters carried in the image creation request. After image creation is complete, the created image is saved to the PXE database via the PXE server. Simultaneously, the created image is saved to the corresponding object storage database via the PXE server and the object storage server. After saving, the object storage server sends feedback information to the bare metal backend server, which forwards it to the user's bare metal server. Upon receiving the feedback information, the user's bare metal server rejoins the VPC (joins the public cloud private network environment). Finally, the bare metal backend server sends back the returned parameters (corresponding to the first processing result mentioned above) to the front-end console, which the user can view.

[0065] Figure 5 The "region" in the context refers to a geographical area, describing the location of a cloud computing provider's data center. Different regions are completely independent. An "Availability Zone" refers to a cloud computing provider's physical data center within the same geographical area, where power and network infrastructure are independent. Furthermore, bare metal servers differ from cloud host container images. While bare metal server images still use the traditional PXE installation model, they can be further enhanced with distributed storage technology to optimize high-concurrency installations.

[0066] It's important to note that image files are typically created when users need to back up and migrate all data on a bare metal server or install it on a new bare metal server. For example, all data on bare metal server A can be copied to bare metal server B, or all data can be copied to the corresponding object storage database on an object storage server. If needed later, it can be copied from the object storage database on the object storage server. This is usually a one-time save. If the user adds new data and needs to create another image, a full system image of all data on the bare metal server must be created again and saved to the corresponding object storage database on the object storage server. If the user does not delete the image file through the front-end console, the image file generated for each new image creation will not replace the original image file; that is, each created image file is saved in the object storage database.

[0067] In related technologies, when creating data and configuration backups for bare metal servers, if a user's business process requires the backup of all existing server data at a certain point to ensure disaster recovery efficiency, cloud computing resource providers typically allow bare metal server users to back up a single instance via a front-end console. In user data recovery and online expansion scenarios, if a user's bare metal server fails and another bare metal server needs to be started to handle the failed server's business, data migration to the backup server is necessary. Alternatively, when performing online expansion and copying data from the original bare metal server to the expansion server, this is generally done via a front-end console using a previously backed-up image. However, these related technologies demonstrate that cloud computing providers' service offerings are incomplete, failing to meet user needs and the crucial requirements for cost reduction and efficiency improvement.

[0068] Furthermore, related technologies typically only allow creating images of system disk data, which has a relatively small storage capacity. Copying a small-capacity system disk is relatively easy to implement. However, this solution creates an image of all data on both the system disk and data disk in a bare metal server, resulting in a larger data volume for the entire machine. In addition, the system disk data and data disk data usually reside under different configuration files on the bare metal server, and their storage paths and permissions are relatively complex. Copying, migrating, and installing data with different paths and permissions is relatively complicated.

[0069] From the perspective of cloud computing vendors, the aforementioned image creation methods can assist users in recovering from server cluster failures and other specific scenarios, and also help them quickly expand online servers, reducing waiting time and improving expansion efficiency. From the user's perspective, this approach can improve user satisfaction, directly impacting business performance; it can also reduce the labor costs of image management, automate processes, and reduce unnecessary manpower expenditures.

[0070] Furthermore, in related technologies, cloud computing vendors have not provided superior data security and compute-storage separation product solutions for data storage services, failing to meet users' high availability requirements for data storage. In this solution, users can create images based on their actual business scenarios through the console and support cross-Region replication and migration, achieving data storage security and high availability. Additionally, for user image data storage, cloud computing vendors can provide object storage services. Image files created by users through the front-end console can be stored in the corresponding object storage database on the object storage server. Cloud computing vendors can also continuously update and iterate the object storage server, ensuring on-demand access and reliable security from the user's perspective.

[0071] This invention also provides another image file processing method, applied to an image management platform. The object storage server of the image management platform stores target image files, including system image files and data image files generated according to the method described above. In actual implementation, the image management platform's display interface can show the file identifiers corresponding to the system image files and the data image files. For convenient unified management, system image files and data image files belonging to the same bare metal server of a user can be packaged together, displaying only the corresponding file identifier after packaging. Figure 6 As shown, the method includes the following steps:

[0072] Step S602: Receive processing requests for system image files and data image files; wherein, the processing requests include one of the following: copy request, delete request.

[0073] Cloud computing vendors' staff can manage all images visible to users through the image management platform. The user's front-end console and the image management platform can locate the actual image file through the image file ID. Users can issue processing requests for system image files and data image files through the front-end console, or cloud computing vendors' staff can issue processing requests for system image files and data image files. For example, a user can send a request to the image management platform to copy an image file, or a cloud computing vendor's staff can send a request to the image management platform to delete an image file, etc.

[0074] Step S604: Based on the processing request, perform the processing operation corresponding to the processing request on the file identifier corresponding to the system image file and the file identifier corresponding to the data image file to obtain the second processing result.

[0075] Once the image management platform receives the aforementioned processing request, it can perform the processing operation corresponding to the file identifier of the system image file and the file identifier of the data image file, such as copying or deleting. For example, user A has an image file stored in an object storage database, and user B, who belongs to the same unit as user A, also wants to use this image file. User A authorizes the staff of the operation management platform, and the staff can operate the operation management platform to copy user A's image file ID to user B. Specifically, the staff of the cloud computing vendor can fill in the image file ID, image file display name, target account, etc. through the operation interface of the image management platform. The target account is user B's front-end console account. After the operation is completed, the corresponding second processing result can be obtained.

[0076] In addition, cloud computing vendors' staff can use the image management platform's interface to uniformly filter and record all user image files based on the image file ID. Copying and deleting operations also involve copying and deleting the image file ID. The image management platform is only for internal operation and management and does not involve specific data storage or installation. The image management platform allows control over which image files users can see in the front-end console; the platform itself does not process data in the pre-boot execution environment database or object storage database. If a user-defined image file ID is deleted in the image management platform, the user will not see that image file ID in the front-end console. Standard images are also maintained through the image management platform. If a standard image has a problem and cannot be made available to users, cloud computing vendor staff can delete the image file ID of that standard image through the image management platform, so that the image file ID of that standard image will not be displayed in any user's front-end console. It should be noted that if a user issues a deletion request through the front-end console, they can refer to the above process for generating image files to delete the corresponding image files in the pre-boot execution environment database and object storage database.

[0077] Step S606: Return the second processing result to the user corresponding to the processing request.

[0078] Once the second processing result is obtained, it can be returned to the user corresponding to the processing request. For example, taking the copy request in the previous step as an example, after the staff of the cloud computing vendor can complete the corresponding operation through the operation interface of the image management platform, the image file ID will appear in the front-end console of user b. When installation is required, user b can use the image corresponding to the image file ID.

[0079] The aforementioned image file processing method receives processing requests for system image files and data image files; based on the processing requests, it performs the processing operations corresponding to the file identifiers of the system image files and data image files, obtaining a second processing result. The second processing result is then returned to the user who made the processing request. In this approach, cloud computing vendors can manage all images visible to users, and users can authorize cloud computing vendors to handle certain issues related to system image files and data image files, thereby improving operational efficiency.

[0080] Furthermore, by setting up an image management platform, user image files can be managed based on their file identifiers, offering greater flexibility. This eliminates the need to modify data in the pre-boot execution environment database and object storage database, decoupling them from the actual business development databases. As long as user needs are met, the data in the databases will not be affected. In contrast, related technologies lack a visual management platform and directly modify data in the pre-boot execution environment database and object storage database, resulting in poor flexibility and difficulty in quickly meeting user needs.

[0081] For a further understanding of the above embodiments, please refer to Figure 7 The diagram shown below illustrates an interface of a mirror management platform. Figure 7 The specific functions of the image management platform will be introduced below:

[0082] (1) The image management platform supports data filtering and can quickly find the images that need to be processed. The filtering dimensions support: region, system type (Centos, Ubuntu and other mainstream images), user ID (quickly locate customer images), and image type (standard images are images made by cloud computing vendors, and custom images are images made by users through the front-end console).

[0083] (2) Supports adding new mirrors. For details, click [link / click]. Figure 7 The newly created standard image can display Figure 8 The diagram shown illustrates a new standard image creation interface. From a manual backend perspective, new images can be added. The following section discusses... Figure 8 The fields in the document are explained below:

[0084] Target Region: Specifies the object storage server where the image will be placed (one object storage server cluster under one Region);

[0085] Image Name: A unique identifier for the image created by the cloud computing vendor, used to enable location data and initiate data transfer after the fields are filled on this page;

[0086] Image display name: You can set the name displayed in the console interface;

[0087] Image partition: Supports both standard partition mode and LVS (Linux Virtual Server) partition mode images;

[0088] Image system name: The default operating system system name;

[0089] Image type: This image is available for console users to find in the console tab categories;

[0090] Image tag: This tag indicates whether a container agent is supported. When using an image with this tag for installation, you can choose whether to mount the container agent in the console.

[0091] (3) Supports deletion of standard images;

[0092] (4) Supports manual addition of user-defined images. For details, click [link / link]. Figure 7 The newly added custom image can display Figure 9 The diagram shown illustrates a private image creation interface. The following section discusses... Figure 9 The fields in the document are explained below:

[0093] Image ID: A unique identifier stored on the server, provided by the cloud computing provider, used as the basis for lookup;

[0094] Image display name: The display of the console image;

[0095] Mirrored partition: is a mirror image of a standard partition or an LVS partition;

[0096] Image system name: The default operating system system name;

[0097] Image type: Underlying operating system type;

[0098] Target account: Stored in the user's mirror database based on the user's UID (User Identification).

[0099] Target region: Select the object storage server in which region the data will be stored;

[0100] Image tag: Whether mounting a container agent is supported;

[0101] (5) Copy Image: Copy an image into the image storage database under the corresponding account;

[0102] (6) Mark as a support container: Can be manually marked as a support container Agent.

[0103] The corresponding functions are supported by corresponding algorithms and programs, guaranteeing a 99.99% success rate. By setting up a mirror management platform, user workflow design can be better protected. Through automation and partial manual intervention, the smooth operation of the customer process can be ensured. This mirror management platform supports full data viewing and management under filtered conditions and supports data visualization.

[0104] The interaction logic between the user's front-end console and the image management platform includes the following: After the user clicks the button to automatically create an image, the cloud computing vendor's staff can manage the full image data from the backend; for situations where it is inconvenient for the user to operate, they can contact the cloud computing vendor's staff to create the image, and after completion, it can be pushed to the designated user's database through the backend system; if the user's console operation reports an error, the cloud computing vendor can perform the first step of screening through the backend system, and after identifying the problem, contact the relevant department for handling.

[0105] Corresponding to the above method embodiments, this embodiment of the invention provides a schematic diagram of the structure of an image file processing device, as shown below. Figure 10 As shown, the device is installed on a bare metal server on the user side, which is pre-running in a public cloud private network environment. The device includes: a first receiving module 100, used to receive image creation requests for pre-stored system disk data and data disk data, detached from the public cloud private network environment; wherein, the image creation request carries image configuration parameters input by the user; an acquisition module 101, used to acquire a first image script corresponding to the system disk data and a second image script corresponding to the data disk data based on the image creation request; and a generation module 102, used to generate a system image file corresponding to the system disk data and a data image file corresponding to the data disk data based on the first image script, the second image script, and the image configuration parameters, detached from the public cloud private network environment.

[0106] The aforementioned image file processing device first receives image creation requests for pre-stored system disk data and data disk data, operating outside of a public cloud private network environment. These requests carry user-inputted image configuration parameters. Then, based on the image creation requests, it obtains a first image script corresponding to the system disk data and a second image script corresponding to the data disk data. Finally, operating outside of a public cloud private network environment, it generates a system image file for the system disk data and a data image file for the data disk data based on the first image script, the second image script, and the image configuration parameters. This device can obtain image scripts corresponding to system disk data and data disk data respectively based on image creation requests carrying image configuration parameters, and create images of system disk data and data disk data in a bare metal server based on these image scripts and configuration parameters. Since users do not need to migrate or install data on the data disk using other methods, this improves the availability of data storage and reduces user operating costs.

[0107] Furthermore, the bare metal server is connected to the pre-boot execution environment server; the pre-boot execution environment database corresponding to the pre-boot execution environment server pre-stores image scripts corresponding to various system disk data and image scripts corresponding to various data disk data; the acquisition module is also used to: send the image creation request to the pre-boot execution environment server, and through the pre-boot execution environment server, obtain the first image script corresponding to the system disk data and the second image script corresponding to the data disk data from the pre-boot execution environment database.

[0108] Furthermore, the bare metal server is connected to the preboot execution environment server; the preboot execution environment server is connected to the object storage server; the device is also used to: save the system image file and data image file to the preboot execution environment database corresponding to the preboot execution environment server through the preboot execution environment server; and save the system image file and data image file to the object storage database corresponding to the object storage server in sequence through the preboot execution environment server and the object storage server.

[0109] Furthermore, the object storage server is connected to the bare metal backend server; the device is also used to: receive messages of successful saving of system image files and data image files sequentially through the object storage server and the bare metal backend server, and join the public cloud private network environment to re-run in the public cloud private network environment.

[0110] Furthermore, the device is also used to: return a first processing result to the user corresponding to the image creation request via a bare metal backend server; wherein the first processing result includes: the file identifier corresponding to the system image file, the file identifier corresponding to the data image file, a message indicating whether the system image file was created successfully or failed, and a message indicating whether the data image file was created successfully or failed.

[0111] Furthermore, the device is also used to: send the file identifier corresponding to the system image file and the file identifier corresponding to the data image file to the image management platform corresponding to the bare metal server via the bare metal backend server.

[0112] The image file processing device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned image file processing method embodiment. For the sake of brevity, any parts not mentioned in the image file processing device embodiment can be referred to the corresponding content in the aforementioned image file processing method embodiment.

[0113] Corresponding to the above method embodiments, this embodiment of the invention provides another schematic diagram of an image file processing device. The device is installed on an image management platform; the object storage server of the image management platform stores target image files, which include system image files and data image files generated according to the method of the embodiments; as shown... Figure 11 As shown, the device includes: a second receiving module 110, used to receive processing requests for system image files and data image files; wherein the processing request includes one of the following: a copy request and a delete request; a processing module 111, used to perform processing operations corresponding to the processing request on the file identifier corresponding to the system image file and the file identifier corresponding to the data image file based on the processing request, and obtain a second processing result; and a return module 112, used to return the second processing result to the user corresponding to the processing request.

[0114] The aforementioned image file processing device receives processing requests for system image files and data image files. Based on the processing requests, it performs the processing operations corresponding to the file identifiers of the system image files and data image files, obtaining a second processing result. The second processing result is then returned to the user who made the processing request. In this device, cloud computing vendors can manage all images visible to users, and users can authorize cloud computing vendors to handle certain issues related to system image files and data image files, thereby improving operational efficiency.

[0115] This invention also provides an electronic device, see [link to relevant documentation]. Figure 12 As shown, the electronic device includes a processor 130 and a memory 131. The memory 131 stores machine-executable instructions that can be executed by the processor 130. The processor 130 executes the machine-executable instructions to implement the above-described image file processing method.

[0116] Furthermore, Figure 12 The electronic device shown also includes a bus 132 and a communication interface 133, with the processor 130, the communication interface 133 and the memory 131 connected via the bus 132.

[0117] The memory 131 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 133 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 132 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 12 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0118] Processor 130 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 130 or by instructions in software form. Processor 130 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 131, and processor 130 reads the information in memory 131 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0119] This invention also provides a machine-readable storage medium storing machine-executable instructions. When these machine-executable instructions are invoked and executed by a processor, they cause the processor to implement the aforementioned image file processing method. For specific implementation details, please refer to the method embodiments, which will not be repeated here.

[0120] The computer program products of the image file processing method, apparatus and electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0121] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for processing image files, characterized in that, The method is applied to a bare-metal server on the user side, the bare-metal server being pre-running in a public cloud private network environment; the method includes: Receive image creation requests for pre-stored system disk data and data disk data, outside the public cloud private network environment; wherein, the image creation request carries image configuration parameters input by the user; Based on the image creation request, obtain the first image script corresponding to the system disk data and the second image script corresponding to the data disk data; In a private network environment outside the public cloud, based on the first image script, the second image script, and the image configuration parameters, a system image file corresponding to the system disk data and a data image file corresponding to the data disk data are generated. The bare metal server is connected to the pre-boot execution environment server; the pre-boot execution environment server is connected to the object storage server; after the steps of generating the system image file corresponding to the system disk data and the data image file corresponding to the data disk data, the method further includes: The system image file and the data image file are saved to the pre-boot execution environment database corresponding to the pre-boot execution environment server through the pre-boot execution environment server; The system image file and the data image file are sequentially saved to the object storage database corresponding to the object storage server via the pre-boot execution environment server and the object storage server; wherein, the object storage database stores files in the form of containers; The object storage server is connected to a bare metal backend server; after the step of saving the system image file and the data image file to the object storage database corresponding to the object storage server, the method further includes: The system image file and the data image file are saved successfully via the object storage server and the bare metal backend server, respectively. The system then joins the public cloud private network environment to re-run within that environment.

2. The method according to claim 1, characterized in that, The bare metal server is connected to the pre-boot execution environment server; the pre-boot execution environment database corresponding to the pre-boot execution environment server pre-stores image scripts corresponding to various system disk data and image scripts corresponding to various data disk data. The steps of obtaining the first image script corresponding to the system disk data and the second image script corresponding to the data disk data based on the image creation request include: The image creation request is sent to the pre-boot execution environment server. The pre-boot execution environment server retrieves the first image script corresponding to the system disk data and the second image script corresponding to the data disk data from the pre-boot execution environment database.

3. The method according to claim 1, characterized in that, After the step of joining the public cloud private network environment to re-run within the public cloud private network environment, the method further includes: The bare metal backend server returns a first processing result to the user corresponding to the image creation request; wherein the first processing result includes: the file identifier corresponding to the system image file, the file identifier corresponding to the data image file, a message indicating whether the system image file was created successfully or failed, and a message indicating whether the data image file was created successfully or failed.

4. The method according to claim 1, characterized in that, After the step of joining the public cloud private network environment to re-run within the public cloud private network environment, the method further includes: The bare metal backend server sends the file identifiers corresponding to the system image file and the data image file to the image management platform corresponding to the bare metal server.

5. A method for processing image files, characterized in that, The method is applied to an image management platform; the object storage server of the image management platform stores a target image file, the target image file including a system image file and a data image file generated according to any one of claims 1-4; the method includes: Receive processing requests for the system image file and the data image file; wherein the processing request includes one of the following: a copy request or a delete request; Based on the processing request, the processing operation corresponding to the processing request is performed on the file identifier corresponding to the system image file and the file identifier corresponding to the data image file to obtain a second processing result; The second processing result is returned to the user corresponding to the processing request.

6. A mirror file processing device, characterized in that, The device is installed on a bare-metal server on the user side, and the bare-metal server is pre-running in a public cloud private network environment; the device includes: The first receiving module is used to receive image creation requests for pre-stored system disk data and data disk data, outside the public cloud private network environment; wherein, the image creation request carries image configuration parameters input by the user; The acquisition module is used to acquire, based on the image creation request, the first image script corresponding to the system disk data and the second image script corresponding to the data disk data; The generation module is used to generate a system image file corresponding to the system disk data and a data image file corresponding to the data disk data, based on the first image script, the second image script, and the image configuration parameters, in an environment separate from the public cloud private network. The bare metal server is connected to a pre-boot execution environment server; the pre-boot execution environment server is connected to an object storage server; the device is further configured to: The system image file and the data image file are saved to the pre-boot execution environment database corresponding to the pre-boot execution environment server through the pre-boot execution environment server; The system image file and the data image file are sequentially saved to the object storage database corresponding to the object storage server via the pre-boot execution environment server and the object storage server; wherein, the object storage database stores files in the form of containers; The object storage server is connected to a bare metal backend server; the device is also used for: The system image file and the data image file are saved successfully via the object storage server and the bare metal backend server, respectively. The system then joins the public cloud private network environment to re-run within that environment.

7. A mirror file processing device, characterized in that, The apparatus is installed on an image management platform; the object storage server of the image management platform stores target image files, the target image files including system image files and data image files generated according to the method described in any one of claims 1-4; the apparatus includes: The second receiving module is used to receive processing requests for the system image file and the data image file; wherein the processing request includes one of the following: a copy request or a delete request; The processing module is configured to perform processing operations corresponding to the processing request on the file identifier corresponding to the system image file and the file identifier corresponding to the data image file based on the processing request, and obtain a second processing result; The return module is used to return the second processing result to the user corresponding to the processing request.

8. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the image file processing method according to any one of claims 1-5.

9. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the image file processing method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Bare metal server linux system mirror image generation method, device and equipment

    CN111090439A

  • Cross-domain mirror image generation method and device, cross-domain mirror image installation method and device and electronic equipment

    CN113791796A