Service deployment method, system, and device, and storage medium

Through the image layer combination and search described by the user, the service deployer creates and deploys cloud applications or cloud desktop images, solving the problem of high maintenance costs in cloud service deployment and achieving efficient image combination and deployment.

WO2025055510A1PCT designated stage expired Publication Date: 2025-03-20HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD

Patent Information

Application Number
PCT/CN2024/104379
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-12
Filing Date
2024-07-09
Publication Date
2025-03-20

AI Technical Summary

Technical Problem

While meeting the diverse needs of users, existing cloud service deployment solutions lead to high maintenance costs for cloud application images or cloud desktop images, mainly due to the storage of a large number of duplicate content.

Method used

Through the image description information provided by the user, the service deployer searches and combines the corresponding image layer files, creates a target image, and deploys the corresponding services on the cloud. This method only requires maintaining the files of the mirror layer, and users can combine the images according to their needs.

Benefits of technology

It effectively reduces the maintenance cost of cloud application mirroring or cloud desktop mirroring, while meeting users' needs for diversified mirroring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024104379_20032025_PF_FP_ABST
    Figure CN2024104379_20032025_PF_FP_ABST
Patent Text Reader

Abstract

A service deployment method, system, and device, and a storage medium. The method comprises the following steps: obtaining a service deployment request of a deployment user, the service deployment request being related to a cloud desktop or a cloud application, the service deployment request carrying image description information, and the image description information being used for describing multiple image layers corresponding to a target image required by the deployment user; on the basis of the image description information, searching for an image layer file for each of the multiple image layers corresponding to the target image; on the basis of the image layer file of each of the multiple image layers corresponding to the target image, creating the target image; and on the basis of the target image, deploying a corresponding service at a cloud end.
Need to check novelty before this filing date? Find Prior Art

Description

Service deployment method, system, device and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on September 12, 2023, with application number 202311175011.9 and application name “Service Deployment Method, System, Device and Storage Medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computer technology, and in particular to a service deployment method, system, device, and storage medium. Background Art

[0003] With the continuous development of cloud computing technology, the current mainstream trend is to relocate program modules originally located on terminal devices, such as mobile phones and computers, to the cloud to achieve device slimming. This has led to the development of products such as cloud desktops and cloud applications. Cloud desktops, also known as desktop virtualization or cloud computers, are a new alternative to traditional computers. In a cloud network, the desktop of a cloud server node is streamed to the destination via a video stream. Keyboard and mouse operations on the destination are then responded to by the streamed desktop. This type of desktop on a cloud server node is called a cloud desktop. Cloud applications transform the traditional "local installation and local computing" model of software into a "ready-to-use" service. These applications connect to and control remote server clusters via the internet or a local area network to complete logical or computational processing tasks.

[0004] In practice, before providing cloud desktop services or cloud application services to users, it is necessary to deploy virtual machines in the cloud based on the virtual machine images of the cloud desktop or cloud application to provide the corresponding services. To facilitate user deployment, the cloud can provide users with a variety of cloud application images or cloud desktop images for them to choose from.

[0005] Summary of the Invention

[0006] The present application provides a service deployment method, system, device and storage medium for reducing the maintenance cost of cloud application images or cloud desktop images while meeting users' diverse needs for cloud application images or cloud desktops.

[0007] Therefore, in one embodiment of the present application, a service deployment method is provided, including:

[0008] Obtaining a service deployment request for a cloud desktop or cloud application from a deployment user; the service deployment request carries image description information; the image description information is used to describe multiple image layers corresponding to a target image required by the deployment user;

[0009] According to the image description information, searching for the image layer files of the plurality of image layers corresponding to the target image;

[0010] Creating the target image according to the image layer files of the respective multiple image layers corresponding to the target image;

[0011] Deploy corresponding services in the cloud based on the target image.

[0012] In another embodiment of the present application, a service deployment method is provided, comprising:

[0013] In response to an image layer selection operation triggered by a deployment user on an image layer selection interface of a cloud desktop or cloud application, determining a plurality of image layers corresponding to a target image required by the user; the image layer selection interface is used to provide optional image layers to the deployment user;

[0014] Generate a service deployment request according to the multiple image layers corresponding to the target image; the service deployment request carries image description information; the image description information is used to describe the multiple image layers corresponding to the target image;

[0015] Sending the service deployment request to a service deployment server, so that the service deployment server performs service deployment;

[0016] Among them, the service deployment server is used to: search for the image layer files of each of the multiple image layers corresponding to the target image according to the image description information; create the target image according to the image layer files of each of the multiple image layers corresponding to the target image; and deploy corresponding services on the cloud according to the target image.

[0017] In another embodiment of the present application, an electronic device is provided. The electronic device includes: a memory and a processor, wherein:

[0018] The memory is used to store programs;

[0019] The processor is coupled to the memory and is configured to execute the program stored in the memory to implement the service deployment method provided by the first embodiment.

[0020] In another embodiment of the present application, a computer-readable storage medium storing a computer program is provided. When the computer program is executed by a computer, the service deployment method provided in the first embodiment described above can be implemented.

[0021] In another embodiment of the present application, an electronic device is provided. The electronic device includes: a memory, a processor, and a communication component, wherein:

[0022] The memory is used to store programs;

[0023] The processor is coupled to the memory and the communication component, and is configured to execute the program stored in the memory to implement the service deployment method provided in the second embodiment.

[0024] In another embodiment of the present application, a computer-readable storage medium storing a computer program is provided. When the computer program is executed by a computer, the service deployment method provided in the second embodiment described above can be implemented.

[0025] In the technical solution provided by the embodiment of the present application, the user describes the multiple image layers corresponding to the cloud application image or cloud desktop image he or she requires through image description information. The service deployment party searches for the image layer files of the multiple image layers corresponding to the image required by the user based on the image description information, and creates the image required by the user based on these image layer files. By adopting the technical solution provided by the embodiment of the present application, it is only necessary to maintain the image layer files of various image component units - image layers, and the user can combine them according to their actual needs during deployment. It can be seen that this solution can meet the diverse needs of users for cloud application images or cloud desktop images while reducing the maintenance costs of related cloud application images or cloud desktop images. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0027] FIG1 is a system diagram of a service deployment system provided by an embodiment of the present application;

[0028] FIG2 is a flow chart of a service deployment method according to an embodiment of the present application;

[0029] FIG3 is a flow chart of a service deployment method provided in another embodiment of the present application;

[0030] FIG4 is a flow chart of a service deployment method provided in another embodiment of the present application;

[0031] FIG5 is a structural block diagram of an electronic device provided in an embodiment of the present application;

[0032] FIG6 is a structural block diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION

[0033] Currently, to meet diverse user needs, the cloud stores a large number of virtual machine images related to cloud applications or cloud desktops. These virtual machine images often have a high level of duplicate content. For example, virtual machine images A and B both contain application APP1; virtual machine images A and C both contain operating system OS1, and so on. This duplicate storage inevitably increases cloud storage space consumption and increases maintenance costs.

[0034] In order to solve the above technical problems, the embodiment of the present application provides a new service deployment solution. In this solution, the user uses image description information to describe the multiple image layers corresponding to the cloud application image or cloud desktop image he needs. The service deployment party searches for the image layer files of the multiple image layers corresponding to the image required by the user based on the image description information, and creates the image required by the user based on these image layer files. By adopting the technical solution provided by the embodiment of the present application, it is only necessary to maintain the image layer files of various image component units - image layers, and users can combine them according to their actual needs when deploying. It can be seen that this solution can meet the diverse needs of users for cloud application images or cloud desktop images while reducing the maintenance costs of related cloud application images or cloud desktop images.

[0035] In order to enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below based on the 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 in the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0036] In addition, some of the processes described in the specification, claims and the above-mentioned figures of this application include multiple operations that appear in a specific order. These operations may not be executed in the order in which they appear in this document or may be executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this document are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit "first" and "second" to be different types.

[0037] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0038] Before introducing the service deployment method provided by the embodiment of the present application, the system architecture involved in the service deployment method provided by the embodiment of the present application is introduced. As shown in Figure 1, the service deployment system includes: a service deployment client 1 and a service deployment server 2;

[0039] The service deployment client 1 is used to send a user's service deployment request for a cloud desktop or cloud application to the service deployment server 2; the service deployment request carries image description information; the image description information is used to describe multiple image layers corresponding to the target image required by the user;

[0040] The service deployment server 2 is used to: search for the image layer files of each of the multiple image layers corresponding to the target image according to the image description information; create the target image according to the image layer files of each of the multiple image layers corresponding to the target image; and deploy corresponding services on the cloud according to the target image.

[0041] The service deployment client 1 may communicate with the service deployment server 2 via the Internet, or may communicate with the service deployment server 2 via a mobile network. If the service deployment client 1 communicates with the service deployment server 2 via a mobile network, the mobile network may be of any one of 2G, 2.5G, 3G, 4G, 4G+, and WiMax (World Interoperability for Microwave Access).

[0042] Among them, the service deployment client 1 can be a hardware with an embedded program integrated on the terminal, or it can be an application software installed in the terminal, or it can be a tool software embedded in the terminal operating system, etc., which is not limited in the embodiment of the present application.

[0043] In this embodiment, the service deployment client 1 is primarily user-facing and can provide a user interface. The terminal in which it resides can be implemented in a variety of forms, such as a smartphone, smart speaker, personal computer, wearable device, tablet computer, etc. The terminal typically includes at least one processing unit and at least one memory. The number of processing units and memory depends on the terminal's configuration and type. The memory can include volatile memory, such as RAM (Random Access Memory), non-volatile memory, such as read-only memory (ROM), flash memory, etc., or a combination of both. The memory typically stores an operating system (OS), one or more application programs, and may also store program data. In addition to the processing unit and memory, the terminal also includes some basic components, such as a network card chip, an I / O (Input / Output) bus, and audio and video components (such as a microphone). Optionally, the terminal may also include peripheral devices, such as a keyboard, mouse, stylus, printer, etc. These peripheral devices are well known in the art and will not be described in detail here.

[0044] The service deployment server 2 can be any device that can provide computing services, respond to service requests, and perform processing. For example, it can be a conventional server, cloud server, cloud host, virtual center, etc. The server mainly includes a processor, hard disk, memory, system bus, etc., which is similar to the general computer architecture.

[0045] In the technical solution provided by the embodiment of the present application, the user describes the multiple image layers corresponding to the cloud application image or cloud desktop image he or she requires through image description information. The service deployment party searches for the image layer files of the multiple image layers corresponding to the image required by the user based on the image description information, and creates the image required by the user based on these image layer files. By adopting the technical solution provided by the embodiment of the present application, it is only necessary to maintain the image layer files of various image component units - image layers, and the user can combine them according to their actual needs during deployment. It can be seen that this solution can meet the diverse needs of users for cloud application images or cloud desktop images while reducing the maintenance costs of related cloud application images or cloud desktop images.

[0046] In one embodiment, the above-mentioned service deployment system may further include: an image layer management server; the image layer management server is used to store the image layer files of each of the multiple candidate image layers. Generally, image layers can be divided into the following four categories: operating system layer, middleware layer, application layer, and user data layer. Among them, the operating system layer, middleware layer, and application layer are read-only layers, and the user data layer is a read-write layer. Middleware is software that provides a connection between system software and application software to facilitate communication between various software components. The image layer files stored by the image layer management server can be uploaded to the image layer management server by the publishing user.

[0047] After receiving the service deployment request, the service deployment server may, based on the image description information, request the image layer management server to search for the image layer files for each of the multiple image layers corresponding to the target image. In one example, the image description information may include image layer identifiers for each of the multiple image layers corresponding to the target image. The service deployment server may send the image layer identifiers for each of the multiple image layers corresponding to the target image to the image layer management server. The image layer management server may search for the image layer files for each of the multiple image layers corresponding to the target image based on the image layer identifiers. The image layer management server may associate and store, for each image layer, the image layer identifier and the image layer file for that layer. Specifically, the image layer identifier of the image layer may be used as the file name of the image layer file. The image layer identifier of each image layer can be set as needed, ensuring that it is unique for each image layer. For example, the image layer identifier of the operating system layer consists of the operating system name and version number; the image layer identifier of the middleware layer consists of the middleware name and version number; and the image layer identifier of the application layer consists of the application name and version number.

[0048] Optionally, the above-mentioned service deployment system may further include: a service cluster, which may include multiple service nodes. The service deployment node may select a target service node from multiple service nodes based on the target image; and deploy the corresponding service on the target service node based on the target image. In one embodiment, the service deployment node may select a service node with a smaller load from multiple service nodes as the target service node. Taking cloud desktop as an example, after the target service node deploys the cloud desktop service, it can serve as a cloud desktop server to provide cloud desktop services to cloud desktop clients. Taking cloud application as an example, after the target service node deploys the cloud application service, it can serve as a cloud application server to provide cloud application services to cloud application clients.

[0049] The specific processing process of each unit in the above system and the interaction process between the units will be described in detail in the following embodiments.

[0050] FIG2 shows a flow chart of the service deployment method provided by an embodiment of the present application. The execution subject of the method may be the service deployment server in the above system. As shown in FIG2, the method includes:

[0051] 201. Obtain a service deployment request for a cloud desktop or cloud application from a deployment user.

[0052] The service deployment request carries image description information; the image description information is used to describe multiple image layers corresponding to the target image required by the deployment user.

[0053] 202. Search for image layer files of respective image layers corresponding to the target image according to the image description information.

[0054] 203. Create the target image according to the image layer files of the respective multiple image layers corresponding to the target image.

[0055] 204. Deploy corresponding services in the cloud based on the target image.

[0056] In the above 201, when the service deployment request is related to the cloud desktop, the target image required by the deployment user is the cloud desktop image; when the service deployment request is related to the cloud application, the target image required by the deployment user is the cloud application image.

[0057] The multiple image layers corresponding to the target image may include: an operating system layer, a middleware layer, an application layer, and a user data layer. Generally speaking, an image involves an operating system, one or more middleware layers, and one or more application layers. Therefore, among the multiple image layers corresponding to the target image, there can be one operating system layer, one or more middleware layers, one or more application layers, and one user data layer. Different middleware layers correspond to different middleware, and different application layers correspond to different applications.

[0058] The above-mentioned image description information can specifically be an image description file, and the format of the image description file can be set according to actual needs, and the embodiments of the present application do not specifically limit this. In a feasible solution, the image description information may include: the image layer identifiers of the multiple image layers corresponding to the target image. In addition, the image description information may also include the hierarchical relationship between the multiple image layers corresponding to the target image. Among them, the hierarchical relationship between the multiple image layers corresponding to the target image is used to characterize the dependency relationship between these multiple image layers. For any image, its middleware layer depends on its operating system layer, and its application layer depends on its middleware layer and its operating system layer. There may be dependencies between its different middleware layers, and there may be dependencies between its different application layers. Usually, among the multiple image layers corresponding to an image, from the bottom to the top, they are: operating system layer, middleware layer, application layer and user data layer.

[0059] In practice, a service deployment request may carry not only the image description but also the user ID of the deploying user and their deployment requirements. These requirements may include the number of virtual machines required for a cloud desktop or cloud application. This number of virtual machines indicates how many virtual machines are required to be deployed in the cloud based on the target image.

[0060] In the above 202 , in one example, the image layer files of the multiple image layers corresponding to the target image may be searched according to the image layer identifiers of the multiple image layers corresponding to the target image in the image description information.

[0061] Specifically, the image layer identifiers of the multiple image layers corresponding to the target image can be sent to the image layer management server, so that the image layer management server can search for the image layer files of the multiple image layers corresponding to the target image, and send the found image layer files of the multiple image layers corresponding to the target image to the service deployment server.

[0062] In the above 203, the image layer files of the multiple image layers corresponding to the target image can be loaded sequentially according to the hierarchical relationship between the multiple image layers corresponding to the target image to obtain a virtual machine; and the image of the virtual machine is generated to serve as the target image. The sequential loading refers to loading from the bottom layer to the top layer of the multiple image layers corresponding to the target image.

[0063] It should be noted that in actual applications, the hierarchical relationship between image layers of different categories can be determined based on the respective categories of the multiple image layers corresponding to the target image. For example, the operating system layer is lower than the middleware layer, the middleware layer is lower than the application layer, and the application layer is lower than the user data layer. Therefore, when the target image has only one middleware layer and one application layer, the service deployment request does not need to carry the above hierarchical relationship. When the target image has multiple middleware layers or multiple application layers, the service deployment request can carry the above hierarchical relationship.

[0064] In step 204 above, a corresponding virtual machine is deployed in the cloud based on the target image to provide the corresponding service. For example, in the case of a cloud desktop, a cloud desktop virtual machine is deployed in the cloud based on the target image to improve the cloud desktop service. For example, in the case of a cloud application, a cloud application virtual machine is deployed in the cloud based on the target image to improve the cloud application service.

[0065] In the technical solution provided by the embodiment of the present application, the user describes the multiple image layers corresponding to the cloud application image or cloud desktop image he or she requires through image description information. The service deployment party searches for the image layer files of the multiple image layers corresponding to the image required by the user based on the image description information, and creates the image required by the user based on these image layer files. By adopting the technical solution provided by the embodiment of the present application, it is only necessary to maintain the image layer files of various image component units - image layers, and the user can combine them according to their actual needs during deployment. It can be seen that this solution can meet the diverse needs of users for cloud application images or cloud desktop images while reducing the maintenance costs of related cloud application images or cloud desktop images.

[0066] In one instance, the cloud desktop and cloud application can be based on the Windows operating system. That is to say, the cloud desktop is a Windows cloud desktop, and the cloud application is a Windows cloud application. At present, in the deployment scheme of Windows cloud applications or Windows cloud desktops, the cloud provides users with a complete cloud desktop image or cloud application image for selection by the user. There is a problem of repeated storage of the same content in the scheme, which consumes a lot of storage space and has high maintenance costs. The technical solution provided by the embodiment of the present application can solve the problem of repeated storage of the same content in the existing deployment scheme of Windows cloud applications or Windows cloud desktops, thereby reducing maintenance costs. Specifically, the "obtaining the service deployment request of the deployment user for the cloud desktop or cloud application" in the above 201 may include:

[0067] 2011. Get the service deployment request of the deployment user for Windows cloud desktop or Windows cloud application.

[0068] In actual applications, the multiple image layers corresponding to the target image include an operating system layer and at least one non-operating system layer; the image layer files of the operating system layer include: a basic operating system image file; the image layer files of the non-operating system layer include a virtual hard disk file. The basic operating system image file is used to start / create a basic virtual machine. It can be understood that the basic virtual machine only contains an operating system and does not contain any middleware, application and other software. At least one non-operating system layer may include: a middleware layer, an application layer and / or a user data layer. Under the Windows operating system, the format of the image layer files of the middleware layer, application layer and user data layer are all virtual hard disk format (Virtual Hard Disk, VHD), and the image layer files in the virtual hard disk format are also virtual hard disk files. Therefore, the above 203 "create the target image according to the image layer files of the multiple image layers corresponding to the target image" can be implemented by the following steps:

[0069] 2031. Load the basic operating system image file to obtain an initial virtual machine.

[0070] 2032. Mount the virtual hard disk file of each of the at least one non-operating system layers in the initial virtual machine to obtain a virtual machine.

[0071] 2033. Create an image of the virtual machine to serve as the target image.

[0072] In the above 2031, the basic operating system image file is loaded to obtain an initial virtual machine, which can also be called a basic virtual machine.

[0073] In the above 2032 , the virtual machine disk file of each non-operating system layer may include: the running files and registry information that the non-operating system layer depends on.

[0074] The virtual hard disk file of the non-operating system layer is mounted in the initial virtual machine. Specifically, the running files that the non-operating system layer depends on are added to the initial virtual machine, and the registry of the initial virtual machine is modified according to the registry information that the non-operating system layer depends on to achieve mounting.

[0075] In the above 2032 , the virtual hard disk files of the at least one non-operating system layer can be mounted in the initial virtual machine according to the hierarchical relationship between the at least one non-operating system layer to obtain the virtual machine.

[0076] In the above 2033, the image of the virtual machine is used as the target image.

[0077] In actual applications, in order to ensure that the service finally deployed can provide services to users normally, after obtaining the above-mentioned virtual machine, the mounted application can be run in the above-mentioned virtual machine; if the application can run normally, an image of the virtual machine is created as the target image; otherwise, an exception notification is returned to the deployment user.

[0078] In addition, if the above-mentioned loading and mounting processes fail, it means that the image described by the deploying user is unreasonable and not operable, and an abnormal notification may be returned to the deploying user.

[0079] In actual applications, building an image by loading the image layer files of each image layer requires a certain amount of loading time and computing resources. In order to minimize the image building time and computing resource consumption, the above method may also include:

[0080] 205. According to the image description information, search a cache for a first image that matches the image description information.

[0081] The cache stores at least one image that has been created in the past.

[0082] 206. If the first image matching the image description information is not found in the cache, trigger the step of searching for image layer files of each of the multiple image layers corresponding to the target image according to the image description information.

[0083] 207. If a first image matching the image description information is found in the cache, determine the target image based on the first image.

[0084] In the above 205, generally speaking, the storage space of the cache is small and can only store at least one image created in the most recent period of time.

[0085] In one example, the first image that matches the image description information may be the same image as the target image.

[0086] In another example, the above step of “searching for a first image matching the image description information in the cache according to the image description information” in step 205 can be implemented by the following steps:

[0087] 2051. Select a first image layer from multiple image layers corresponding to the target image.

[0088] 2052. Use a preset hash algorithm to perform hash calculation on the image layer file identifiers of multiple target image layers and the hierarchical relationship of the multiple target image layers to obtain a first image identifier corresponding to the first image layer.

[0089] The multiple target image layers include: the first image layer and other image layers below the first image layer among the multiple image layers corresponding to the target image.

[0090] 2053. Obtain an image identifier of each of at least one image stored in the cache.

[0091] The image identifier of each image in the at least one image is obtained by performing hash calculation on the image layer identifiers of the multiple image layers corresponding to the image and the hierarchical relationship of the multiple image layers corresponding to the image using the preset hash algorithm.

[0092] 2054. If an image with an image identifier identical to the first image identifier exists in the cache, determine the image with an image identifier identical to the first image identifier in the cache as the first image.

[0093] In the above 2051, in actual application, the first image layer may be selected from at least one non-operating system layer corresponding to the target image.

[0094] In one example, multiple first image layers can be determined at one time, and then steps 2052 to 2054 are performed for each first image layer. If multiple first images are found, the target image is determined based on the first image with the largest number of image layers among the multiple first images.

[0095] In another example, in the above 2051, an unused first image layer can be determined from the multiple image layers corresponding to the target image; then steps 2052 to 2053 are executed. If an image with the same image identifier as the first image identifier exists in the cache, the image with the same image identifier as the first image identifier in the cache is determined as the first image, and the search process ends; if an image with the same image identifier as the first image identifier does not exist in the cache, the process returns to step 2051 until an image with the same image identifier as the first image identifier is found in the cache or until no unused image layers exist in the multiple image layers corresponding to the target image. In actual applications, the first image layer can be selected sequentially from the top to the bottom of the multiple image layers.

[0096] In the above 2052, the image layer file identifiers of the multiple target image layers and the hierarchical relationship of the multiple target image layers may be input into a preset hash algorithm to obtain a first image identifier corresponding to the first image layer output by the preset hash algorithm.

[0097] The above-mentioned preset hash algorithm can be selected according to actual needs, and the embodiments of the present application do not make specific limitations on this.

[0098] In the above 2053, the image identifier of each of the at least one image stored in the cache may be pre-calculated. Specifically, for each of the at least one image, the image layer identifiers of the multiple image layers corresponding to the image and the hierarchical relationship of the multiple image layers corresponding to the image are input into a preset hash algorithm to obtain the image identifier of the image output by the preset hash algorithm.

[0099] In step 206 above, if the first image matching the image description information is not found in the cache, the step of searching for the image layer files of each of the multiple image layers corresponding to the target image based on the image description information is triggered. In other words, steps 202, 203, and 204 above are only executed when the first image matching the image description information is not found in the cache.

[0100] In one feasible solution, the above step 207 of “if a first image matching the image description information is found in the cache, determining the target image based on the first image” may include:

[0101] 2071. If a first image matching the image description information is found in the cache and the first image layer is the top layer of multiple image layers corresponding to the target image, determine the first image as the target image.

[0102] 2072. If a first image matching the image description information is found in the cache and the first image layer is a non-top layer among the multiple image layers corresponding to the target image, then according to the first image, start the corresponding first virtual machine, and according to the hierarchical relationship of the at least one second image layer corresponding to the target image, load the image layer files of the at least one second image layer corresponding to the target image in sequence in the first virtual machine to obtain the target image.

[0103] Among the multiple image layers corresponding to the target image, the at least one second image layer is located above the first image layer.

[0104] In the above 2071, the first image layer is the top layer of the multiple image layers corresponding to the target image. Therefore, the first image matching the image description information found according to the above solution is the same as the target image. Therefore, the first image can be directly used as the target image.

[0105] In the above 2072, the first image layer is a non-top layer among the multiple image layers corresponding to the target image. Then, compared with the target image, the first image that matches the image description information found according to the above scheme lacks the relevant content of at least one second image layer located above the first image layer among the multiple image layers corresponding to the target image. Therefore, it is necessary to start the corresponding first virtual machine based on the first image, and load the image layer files of the at least one second image layer corresponding to the target image in sequence in the first virtual machine according to the hierarchical relationship of the at least one second image layer corresponding to the target image to obtain a second virtual machine; and create an image of the second virtual machine to serve as the target image. The image files of the at least one second image layer corresponding to the target image can also be obtained from the image layer management server.

[0106] FIG3 shows a flow chart of the service deployment method provided by an embodiment of the present application. The execution subject of the method is the above-mentioned service deployment client. As shown in FIG3, the service deployment method includes:

[0107] 301. In response to an image layer selection operation triggered by a deployment user on an image layer selection interface of a cloud desktop or cloud application, determine a plurality of image layers corresponding to a target image required by the user.

[0108] The image layer selection interface is used to provide optional image layers to the deployment user.

[0109] 302. Generate a service deployment request according to multiple image layers corresponding to the target image.

[0110] The service deployment request carries image description information; the image description information is used to describe multiple image layers corresponding to the target image.

[0111] 303. Send the service deployment request to a service deployment server, so that the service deployment server performs cloud service deployment.

[0112] Among them, the service deployment server is used to: search for the image layer files of each of the multiple image layers corresponding to the target image according to the image description information; create the target image according to the image layer files of each of the multiple image layers corresponding to the target image; and deploy corresponding services on the cloud according to the target image.

[0113] In the above 301, the image layer selection interface can provide the deployment user with a variety of optional image layers. In actual applications, if the image layer management server provides a small number of optional image layers, the image layer selection interface can display all optional image layers available to the deployment user. If the image layer management server provides a large number of optional image layers, the image layer selection interface can respond to the deployment user's image layer search operation and display the corresponding optional image layers to the deployment user. The image layer search operation can specifically include: the deployment user enters a search keyword in the search box provided in the image layer selection interface; then, the service deployment client can request the image layer management server to search for the corresponding optional image layers based on the keyword and display them.

[0114] In the above 302, in one example, a service deployment request may be generated based on the image layer identifiers of the multiple image layers corresponding to the target image. In another example, a service deployment request may be generated based on the image layer identifiers of the multiple image layers corresponding to the target image and the hierarchical relationships between the multiple image layers.

[0115] In the above 303, the service deployment request is sent to the service deployment server via the network. The service deployment process of the service deployment server can be specifically referred to the corresponding content in the above embodiments, which will not be repeated here.

[0116] FIG4 shows a flow chart of a service deployment method provided by an embodiment of the present application. As shown in FIG4 , the method includes:

[0117] S1. A publishing user 401 uploads an image file of an image layer to an image layer management server 403 through an image layer publishing client 402.

[0118] Publishing user 401 can upload image layer files for the operating system layer, the middleware layer, or the application layer. After publishing user 401 uploads the image layer files to the cloud, deploying users can retrieve the desired image layers from the cloud as needed to create their desired images. The middleware layer and application layer image layer files are both VHD files under the Windows operating system, which include the files and registry information required for operation.

[0119] S2. The image layer management server 403 provides an optional image layer to the service deployment client 405.

[0120] After receiving the optional image layer acquisition request sent by the service deployment client 405 , the image layer management server 403 may provide the optional image layer to the service deployment client 405 .

[0121] S3. The deployment user 404 sends a service deployment request for the cloud application or cloud desktop to the service deployment server 406 through the service deployment client 405.

[0122] The service deployment request carries image description information; the image description information is used to describe multiple image layers corresponding to the target image required by the deployment user 404.

[0123] S4. The service deployment server 406 obtains the image layer files of multiple image layers corresponding to the target image from the image layer management server 403.

[0124] S5. The service deployment server 406 creates a target image.

[0125] The service deployment server 406 creates a target image according to the image layer files of the multiple image layers corresponding to the target image.

[0126] S6. The service deployment server 406 sends the target image to the service node in the service cluster 410.

[0127] S7. The service node starts the cloud application virtual machine or cloud desktop virtual machine according to the target image.

[0128] S8. The service node sends the cloud application interface running on the cloud application virtual machine to the cloud application client 407 in the form of a video stream; or, the service node sends the cloud desktop running on the cloud desktop virtual machine to the cloud application server 408 in the form of a video stream.

[0129] In actual applications, the service deployment server 406 can pre-store some frequently used images and provide them to users for selection, which helps improve service deployment efficiency. In some cases, these frequently used images may need to be improved. In this case, the publishing user can obtain the frequently used images from the service deployment server 406, modify them within the images, and then send the modified images back to the service deployment server 406 for storage and use by the deploying user.

[0130] In actual applications, these processes can be quickly deployed to CI (Continuous Integration) / CD (Continuous Deployment) to accelerate the deployment of services related to cloud applications or cloud desktops.

[0131] In this solution, a user-defined image is generated based on an image description file that describes the multiple image layers corresponding to the user-defined image, and then the service is deployed. This solution only requires the management of the base operating system image file, middleware VHD files, application VHD files, and user data VHD files, eliminating the need to manage a variety of complete images, reducing maintenance costs.

[0132] FIG5 shows a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. As shown in FIG5 , the electronic device includes a memory 1101 and a processor 1102. The memory 1101 can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device. The memory 1101 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0133] The memory 1101 is used to store programs;

[0134] The processor 1102 is coupled to the memory 1101 and is configured to execute the program stored in the memory 1101 to implement the service deployment method provided by the above-mentioned method embodiments.

[0135] 5 , the electronic device further includes other components such as a communication component 1103, a display 1104, a power supply component 1105, and an audio component 1106. FIG5 only schematically illustrates some components, which does not mean that the electronic device only includes the components shown in FIG5 .

[0136] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing a computer program, which, when executed by a computer, can implement the steps or functions of the service deployment method provided by the above-mentioned method embodiments.

[0137] FIG6 shows a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. As shown in FIG6 , the electronic device includes a memory 1201, a processor 1202, and the communication component 1103. The memory 1201 can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device. The memory 1101 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0138] The memory 1201 is used to store programs;

[0139] The processor 1202 is coupled to the memory 1201 and the communication component 1203, and is configured to execute the program stored in the memory 1101 to implement the service deployment method provided by the above-mentioned method embodiments.

[0140] Furthermore, as shown in Figure 6, the electronic device also includes other components such as a display 1204, a power supply component 1205, and an audio component 1206. Figure 6 only schematically illustrates some components, which does not mean that the electronic device only includes the components shown in Figure 6.

[0141] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing a computer program, which, when executed by a computer, can implement the steps or functions of the service deployment method provided by the above-mentioned method embodiments.

[0142] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0143] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM (Read Only Memory) / RAM (Random Access Memory), a disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A service deployment method, characterized in that: include: Obtain the service deployment request of the deployment user for cloud desktop or cloud application; The service deployment request carries image description information; The image description information is used to describe multiple image layers corresponding to the target image required by the deployment user; According to the image description information, searching for image layer files of each of the multiple image layers corresponding to the target image; Creating the target image according to the image layer files of the respective multiple image layers corresponding to the target image; According to the target image, corresponding services are deployed in the cloud.

2. The method according to claim 1, characterized in that Get the deployment user's service deployment request for cloud desktops or cloud applications, including: Gets the service deployment request for Windows cloud desktop or Windows cloud application from the deployment user.

3. The method according to claim 2, characterized in that The multiple image layers corresponding to the target image include an operating system layer and at least one non-operating system layer; the image layer files of the operating system layer include: a basic operating system image file; the image layer files of the non-operating system layer include a virtual hard disk file; Creating the target image according to the image layer files of the respective multiple image layers corresponding to the target image includes: Loading the basic operating system image file to obtain an initial virtual machine; Mounting the respective virtual hard disk files of the at least one non-operating system layer in the initial virtual machine to obtain a virtual machine; An image of the virtual machine is created to serve as the target image.

4. The method according to any one of claims 1 to 3, characterized in that: Also includes: According to the image description information, searching in a cache for a first image that matches the image description information; The cache stores at least one image created in the past; If the first image matching the image description information is not found in the cache, triggering the step of searching for image layer files of each of the multiple image layers corresponding to the target image according to the image description information; If a first image matching the image description information is found in the cache, the target image is determined according to the first image.

5. The method according to claim 4, characterized in that The image description information includes: image layer identifiers of the multiple image layers corresponding to the target image and the hierarchical relationship of the multiple image layers corresponding to the target image; searching the cache for a first image matching the image description information according to the image description information, including: Selecting a first image layer from multiple image layers corresponding to the target image; Using a preset hash algorithm, hash calculation is performed on the image layer file identifiers of multiple target image layers and the hierarchical relationship of the multiple target image layers to obtain a first image identifier corresponding to the first image layer; the multiple target image layers include: the first image layer and other image layers located below the first image layer in the multiple image layers corresponding to the target image; Obtaining the image identifier of each of at least one image stored in the cache; The image identifier is obtained by performing hash calculation on the image layer identifiers of the multiple image layers corresponding to the image and the hierarchical relationship of the multiple image layers corresponding to the image using the preset hash algorithm; The image in the cache whose image identifier is the same as the first image identifier is determined as the first image.

6. The method according to claim 5, characterized in that If a first image matching the image description information is found in the cache, determining the target image according to the first image includes: If a first image matching the image description information is found in the cache and the first image layer is the top layer of multiple image layers corresponding to the target image, the first image is determined as the target image; If a first image matching the image description information is found in the cache and the first image layer is a non-top layer among the multiple image layers corresponding to the target image, a corresponding first virtual machine is started according to the first image, and image layer files of at least one second image layer corresponding to the target image are sequentially loaded in the first virtual machine according to the hierarchical relationship of at least one second image layer corresponding to the target image, so as to obtain the target image; Among the multiple image layers corresponding to the target image, the at least one second image layer is located above the first image layer.

7. A service deployment method, characterized in that: include: In response to an image layer selection operation triggered by a deployment user on an image layer selection interface of a cloud desktop or cloud application, a plurality of image layers corresponding to a target image required by the user are determined; the image layer selection interface is used to provide optional image layers to the deployment user; Generate a service deployment request according to multiple image layers corresponding to the target image; The service deployment request carries image description information; The image description information is used to describe multiple image layers corresponding to the target image; Sending the service deployment request to a service deployment server so that the service deployment server performs service deployment; Among them, the service deployment server is used to: search for the image layer files of each of the multiple image layers corresponding to the target image according to the image description information; create the target image according to the image layer files of each of the multiple image layers corresponding to the target image; and deploy corresponding services in the cloud according to the target image.

8. A service deployment system, characterized in that: include: Service deployment client and service deployment server; The service deployment client is used to: send a service deployment request of a deployment user for a cloud desktop or cloud application to a service deployment server; the service deployment request carries image description information; the image description information is used to describe multiple image layers corresponding to the target image required by the deployment user; The service deployment server is used to: search for the image layer files of the respective multiple image layers corresponding to the target image according to the image description information; Creating the target image according to the image layer files of the respective multiple image layers corresponding to the target image; According to the target image, corresponding services are deployed in the cloud.

9. An electronic device, characterized in that: include: A memory and a processor, wherein The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the right The service deployment method described in any one of claims 1 to 6.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a computer, the service deployment method according to any one of claims 1 to 6 can be implemented.

11. An electronic device, characterized in that: include: memory, processor and communication components, wherein, The memory is used to store programs; The processor is coupled to the memory and the communication component, and is used to execute the program stored in the memory to implement the service deployment method described in claim 7.

12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a computer, the service deployment method according to claim 7 can be implemented.

Citation Information

Patent Citations

  • Method for deploying program

    CN107797806A

  • Mirror image processing method and device, electronic equipment and readable storage medium

    CN113209633A

  • Safe container operation method and device, mirror image data downloading method and device and storage medium

    CN113886004A

  • Container mirror image deployment method and device

    CN116257323A

Cited By

  • Mirror image dependency relationship judgment method and system, electronic equipment and readable storage medium

    CN120780343A