Service deployment method, system, device and storage medium

By creating user-customized images through a combination of image description information and image layer files, the problem of duplicate content stored in the cloud is solved, and the maintenance costs of cloud application or cloud desktop images are reduced.

CN119621163BActive Publication Date: 2026-01-23HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311175011.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-12
Publication Date
2026-01-23
Estimated Expiration
2043-09-12

AI Technical Summary

Technical Problem

In existing technologies, storing a large number of cloud application or cloud desktop virtual machine images in the cloud presents problems such as high storage space consumption and high maintenance costs due to duplicate content.

Method used

The image description information describes the multiple image layers required by the user. The service deployer finds and combines the image layer files to create the target image. The user combines the images according to their needs and only needs to maintain the image layer files.

Benefits of technology

While meeting diverse user needs, it reduces the maintenance costs of cloud applications or cloud desktop images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621163B_ABST
    Figure CN119621163B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a service deployment method, system, device and storage medium. The method comprises the following steps: obtaining a service deployment request of a deployment user related to a cloud desktop or a cloud application; the service deployment request carries image description information; the image description information is used to describe a plurality of image layers corresponding to a target image required by the deployment user; according to the image description information, searching for image layer files of the plurality of image layers corresponding to the target image; creating the target image according to the image layer files of the plurality of image layers corresponding to the target image; and deploying a corresponding service in the cloud according to the target image. The technical solution provided by the embodiments of the present application can meet the diversified needs of users for cloud application images or cloud desktops, and can reduce the maintenance cost of cloud application images or cloud desktop images.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the computer technical field, and in particular to a service deployment method, system, device and storage medium. BACKGROUND

[0002] With the continuous development of cloud computing technology, it is the mainstream development trend to configure program modules originally located on terminal devices, such as mobile phones and computers, on the cloud to achieve thinning of the terminal devices. Based on this, cloud desktops, cloud applications and other products are derived. Cloud desktop, also known as desktop virtualization or cloud computer, is a new mode to replace traditional computers. It refers to a desktop of a cloud server node that is pushed to a destination in a video stream manner in a cloud network, and a keyboard and mouse operation on the destination can be responded by the streaming desktop. Such a desktop on the cloud server node is called a cloud desktop. Cloud application is a service that changes the use mode of traditional software "local installation and local operation" to "take and use", connects and controls a remote server cluster through the Internet or a local area network, and completes a new type of application for processing logic or operation tasks.

[0003] In actual application, before providing a cloud desktop service or a cloud application service to a user, a virtual machine needs to be deployed on the cloud according to a virtual machine image of the cloud desktop or the cloud application to provide the corresponding service. In order to facilitate user deployment, the cloud can provide various cloud application images or cloud desktop images for the user to select. SUMMARY

[0004] The present application provides a service deployment method, system, device and storage medium, which is used to meet the diversified needs of users for cloud application images or cloud desktops while reducing the maintenance cost of cloud application images or cloud desktop images.

[0005] Therefore, in an embodiment of the present application, a service deployment method is provided, which includes:

[0006] Obtaining a service deployment request of a deployment user related to a cloud desktop or a cloud application; the service deployment request carries image description information; the image description information is used to describe a plurality of image layers corresponding to a target image required by the deployment user;

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

[0008] According to the image layer files of the plurality of image layers corresponding to the target image, creating the target image;

[0009] According to the target image, deploying a corresponding service on the cloud.

[0010] In another embodiment of the present application, a service deployment method is provided, which includes:

[0011] in response to a mirror layer selection operation triggered by a deployment user on a mirror layer selection interface related to a cloud desktop or a cloud application, determining a plurality of mirror layers corresponding to a target mirror image required by the user; the mirror layer selection interface is used to provide the deployment user with selectable mirror layers;

[0012] According to the plurality of mirror layers corresponding to the target mirror image, a service deployment request is generated; the service deployment request carries mirror description information; the mirror description information is used to describe the plurality of mirror layers corresponding to the target mirror image;

[0013] The service deployment request is sent to a service deployment server for service deployment by the service deployment server.

[0014] The service deployment server is configured to: according to the mirror description information, find the mirror layer files of the plurality of mirror layers corresponding to the target mirror image; according to the mirror layer files of the plurality of mirror layers corresponding to the target mirror image, create the target mirror image; and according to the target mirror image, deploy a corresponding service in the cloud.

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

[0016] The memory is configured to store a program.

[0017] 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 in the first embodiment.

[0018] In another embodiment of the present application, a computer readable storage medium storing a computer program is provided. The computer program is executed by a computer to implement the service deployment method provided in the first embodiment.

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

[0020] The memory is configured to store a program.

[0021] 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.

[0022] In another embodiment of the present application, a computer readable storage medium storing a computer program is provided. The computer program is executed by a computer to implement the service deployment method provided in the second embodiment.

[0023] In the technical scheme provided by the embodiment of the present application, the user describes a plurality of image layers corresponding to the cloud application image or cloud desktop image required by the user through the image description information, the service provider finds the image layer files of the plurality of image layers corresponding to the image required by the user according to the image description information, and creates the image required by the user according to the image layer files. By using the technical scheme provided by the embodiment of the present application, only the image layer files of various image components, i.e., image layers, need to be maintained, and the user can combine them according to actual needs during deployment. It can be seen that the present scheme can meet the diversified needs of the user for the cloud application image or cloud desktop image, and can also reduce the maintenance cost of the cloud application image or cloud desktop image. BRIEF DESCRIPTION OF DRAWINGS

[0024] In order to more clearly illustrate the technical scheme in the embodiments of the present application or the prior art, the drawings needed in the embodiment or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0025] Figure 1 The system schematic diagram of the service deployment system provided by an embodiment of the present application;

[0026] Figure 2 The flowchart of the service deployment method provided by an embodiment of the present application;

[0027] Figure 3 The flowchart of the service deployment method provided by another embodiment of the present application;

[0028] Figure 4 The flowchart of the service deployment method provided by another embodiment of the present application;

[0029] Figure 5 The structural block diagram of the electronic device provided by an embodiment of the present application;

[0030] Figure 6 The structural block diagram of the electronic device provided by another embodiment of the present application. DETAILED DESCRIPTION

[0031] At present, in order to meet the diversified needs of users, the cloud stores a large number of virtual machine images related to cloud applications or cloud desktops. There is a large amount of repeated content among these virtual machine images, for example, virtual machine image A and virtual machine image B both involve application program APP1; virtual machine image A and virtual machine image C both involve operating system OS1, and so on. The repeated storage of these repeated contents will inevitably increase the consumption of cloud storage space and increase the maintenance cost.

[0032] To solve the above technical problems, the embodiment of the present application provides a new service deployment scheme. In the scheme, a user describes a plurality of image layers corresponding to a cloud application image or a cloud desktop image required by the user through image description information, a service deployment party finds the image layer files of the plurality of image layers corresponding to the image required by the user according to the image description information, and creates the image required by the user according to the image layer files. By using the technical scheme provided by the embodiment of the present application, only the image layer files of various image components, i.e., image layers, need to be maintained, and the user can combine them according to actual needs during deployment. It can be seen that the scheme can meet the diversified needs of the user for the cloud application image or the cloud desktop image, and can also reduce the maintenance cost of the cloud application image or the cloud desktop image.

[0033] To enable personnel in the technical field to better understand the scheme of the present application, the technical scheme in the embodiment of the present application will be described clearly and completely below according to the drawings in the embodiment of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by the personnel in the technical field without creative labor fall within the scope of protection of the present application.

[0034] In addition, in some of the processes described in the specification, claims, and drawings of the present application, a plurality of operations appear in a specific order, which can not be executed in the order in which they appear in the text or in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes can include more or fewer operations, and the operations can be executed in sequence or in parallel. It should be noted that the descriptions of “first”, “second”, etc. in the text are used to distinguish different messages, devices, modules, etc., and do not represent the order of sequence, nor do they limit that “first” and “second” are different types.

[0035] 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 for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0036] 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 FIG. 1, the system architecture includes a user terminal 100, a service deployment platform 200, and a cloud service platform 300. Figure 1As shown, the service deployment system comprises a service deployment client 1 and a service deployment server 2;

[0037] The service deployment client 1 is configured to send a service deployment request of a user about a cloud desktop or a cloud application to the service deployment server 2, wherein the service deployment request carries image description information, and the image description information is used to describe a plurality of image layers corresponding to a target image required by the user.

[0038] The service deployment server 2 is configured to: according to the image description information, search for image layer files of the plurality of image layers corresponding to the target image respectively; create the target image according to the image layer files of the plurality of image layers corresponding to the target image respectively; and deploy a corresponding service in the cloud according to the target image.

[0039] The service deployment client 1 can be connected with the service deployment server 2 through the Internet, or can be connected with the service deployment server 2 through a mobile network. If the service deployment client 1 is connected with the service deployment server 2 through the mobile network, the network mode of the mobile network can be any one of 2G, 2.5G, 3G, 4G, 4G+, WiMax (World Interoperability for Microwave Access) and the like.

[0040] The service deployment client 1 can be a hardware with an embedded program integrated on a terminal, can be an application software installed in the terminal, or can be a tool software embedded in an operating system of the terminal, and the embodiments of the present application do not limit the service deployment client 1.

[0041] In the embodiment, the service deployment client 1 is mainly oriented to users and can provide an interface to the users. The terminal where the service deployment client 1 is located can have various forms of implementation, for example, can be a smart phone, a smart speaker, a personal computer, a wearable device, a tablet computer, etc. The terminal generally includes at least one processing unit and at least one memory. The number of processing units and memories depends on the modification and type of the terminal. The memory can include volatile, for example, RAM (Random Access Memory), and can also include non-volatile, for example, ROM (Read-Only Memory), flash memory, etc., or can also include both types. The memory generally stores an operating system (OS), one or more application programs, and can also store program data, etc. In addition to the processing unit and the memory, the terminal also includes some basic modifications, for example, a network card chip, an I / O (Input / Output) bus, an audio and video component (for example, a microphone), etc. Optionally, the terminal can also include some peripheral devices, for example, a keyboard, a mouse, an input pen, a printer, etc. These peripheral devices are well known in the art and will not be described here.

[0042] The service deployment server 2 can be any device that can provide a computing service, respond to a service request, and process the service request, for example, can be a conventional server, a cloud server, a cloud host, a virtual center, etc. The server is mainly composed of a processor, a hard disk, a memory, a system bus, etc., and is similar to a general computer architecture.

[0043] In the technical scheme provided by the embodiment, the user describes a plurality of image layers corresponding to the cloud application image or the cloud desktop image required by the user through the image description information, the service deployment party finds the image layer files of the plurality of image layers corresponding to the image required by the user according to the image description information, and creates the image required by the user according to the image layer files. According to the technical scheme provided by the embodiment, only the image layer files of various image components, image layers, need to be maintained, and the user can combine them according to actual needs during deployment. It can be seen that the scheme can meet the diversified needs of the user for the cloud application image or the cloud desktop image, and can also reduce the maintenance cost of the cloud application image or the cloud desktop image.

[0044] In one example, the aforementioned 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 multiple alternative image layers. Typically, image layers can be divided into four categories: operating system layer, middleware layer, application layer, and user data layer. Among these, the operating system layer, middleware layer, and application layer are read-only layers, while the user data layer is a read-write layer. Middleware is software that provides a connection between system software and application software, facilitating communication between various software components. The image layer files stored on the image layer management server can be uploaded to the image layer management server by the publishing user.

[0045] After receiving the service deployment request, the service deployment server can request the image layer management server to locate the image layer files of each of the multiple image layers corresponding to the target image, based on the image description information. In one example, the image description information may include: the image layer identifiers of each of the multiple image layers corresponding to the target image; the service deployment server can send the image layer identifiers of each of the multiple image layers corresponding to the target image to the image layer management server; the image layer management server locates the image layer files of each of the multiple image layers corresponding to the target image based on the image layer identifiers. The image layer management server can associate and store the image layer identifier and the image layer file for each image layer. Specifically, the image layer identifier can be used as the filename of the image layer file. The image layer identifiers can be set according to actual needs, as long as the image layer identifiers of different image layers are different. 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; the image layer identifier of the application layer consists of the application name and version number.

[0046] Optionally, the service deployment system described above may further include a service cluster, which may include multiple service nodes. The service deployment node can select a target service node from the multiple service nodes for a target image; and deploy the corresponding service on the target service node according to the target image. In one example, the service deployment node can select a service node with a lower load from the multiple service nodes as the target service node. Taking cloud desktops as an example, after the target service node has deployed the cloud desktop service, it can act as a cloud desktop server to provide cloud desktop services to cloud desktop clients. Taking cloud applications as an example, after the target service node has deployed the cloud application service, it can act as a cloud application server to provide cloud application services to cloud application clients.

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

[0048] Figure 2A flowchart illustrating a service deployment method provided in an embodiment of this application is shown. The executing entity of this method can be a service deployment server in the aforementioned system. For example... Figure 2 As shown, the method includes:

[0049] 201. Obtain service deployment requests from users regarding cloud desktops or cloud applications.

[0050] 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 required by the deployment user.

[0051] 202. Based on the image description information, locate the image layer files of each of the multiple image layers corresponding to the target image.

[0052] 203. Create the target image based on the image layer files of each of the multiple image layers corresponding to the target image.

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

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

[0055] The target image can have multiple image layers, including an operating system layer, a middleware layer, an application layer, and a user data layer. Typically, an image involves an operating system, one or more middleware layers, and one or more applications. 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.

[0056] The aforementioned image description information may specifically be an image description file, the format of which can be set according to actual needs, and this application embodiment does not specifically limit it. In one feasible solution, the image description information may include: the image layer identifiers of each 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. 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, its application layer depends on its middleware layer and its operating system layer, and there may be dependencies between different middleware layers and different application layers. Typically, the multiple image layers corresponding to an image, from bottom to top, are: operating system layer, middleware layer, application layer, and user data layer.

[0057] In practical applications, service deployment requests may include not only image description information but also the user identifier of the deploying user and their deployment requirements. These requirements may include the number of virtual machines required for the cloud desktop or cloud application. This requirement indicates how many virtual machines need to be deployed in the cloud based on the target image.

[0058] In one example of 202 above, the image layer files of the multiple image layers corresponding to the target image can be found based on the image layer identifiers of the multiple image layers corresponding to the target image in the image description information.

[0059] Specifically, the image layer identifiers of each 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 find the image layer files of each of the multiple image layers corresponding to the target image and send the found image layer files of each of the multiple image layers corresponding to the target image to the service deployment server.

[0060] In step 203 above, the image layer files of each of the multiple image layers corresponding to the target image can be loaded sequentially according to the hierarchical relationship between them to obtain a virtual machine; an image of the virtual machine is then generated as the target image. Here, "loading sequentially" refers to loading from the bottom layer to the top layer of the multiple image layers corresponding to the target image.

[0061] It should be noted that in practical applications, the hierarchical relationship between different image layers can be determined based on their respective categories. For example, the operating system layer is below the middleware layer, the middleware layer is below the application layer, and the application layer is below the user data layer. Therefore, when there is only one middleware layer and one application layer among the multiple image layers corresponding to the target image, the service deployment request does not need to include the above hierarchical relationship. When there are multiple middleware layers or multiple application layers among the multiple image layers corresponding to the target image, the service deployment request can include the above hierarchical relationship.

[0062] In the above 204 scenario, based on the target image, corresponding virtual machines are deployed in the cloud to provide the corresponding services. Taking cloud desktop as an example, based on the target image, cloud desktop virtual machines are deployed in the cloud to improve cloud desktop services. Taking cloud application as an example, based on the target image, cloud application virtual machines are deployed in the cloud to improve cloud application services.

[0063] In the technical solution provided in this application embodiment, the user describes multiple image layers corresponding to the cloud application image or cloud desktop image they need using image description information. The service deployment provider finds the image layer files of each of the multiple image layers corresponding to the image needed by the user based on the image description information, and creates the image needed by the user based on these image layer files. Using the technical solution provided in this application embodiment, only the image layer files of various image component units—image layers—need to be maintained. Users can combine them according to their actual needs during deployment. Therefore, this solution not only meets the diverse needs of users for cloud application images or cloud desktop images, but also reduces the maintenance costs related to cloud application images or cloud desktop images.

[0064] In one example, the aforementioned cloud desktop and cloud application can be based on the Windows operating system. That is, the cloud desktop is a Windows cloud desktop, and the cloud application is a Windows cloud application. Currently, in the deployment schemes of Windows cloud applications or Windows cloud desktops, the cloud provides users with complete cloud desktop or cloud application images for selection. This scheme suffers from the problem of repeatedly storing the same content, resulting in significant storage space consumption and high maintenance costs. The technical solution provided in this application can solve the problem of repeatedly storing the same content in existing Windows cloud application or Windows cloud desktop deployment schemes, thereby reducing maintenance costs. Specifically, the "obtaining the service deployment request from the user regarding the cloud desktop or cloud application" in step 201 above can include:

[0065] 2011. Obtain service deployment requests from deploying users regarding Windows cloud desktops or Windows cloud applications.

[0066] In practical applications, the target image corresponds to multiple image layers, including an operating system layer and at least one non-operating system layer. The operating system layer image file includes a base operating system image file; the non-operating system layer image file includes a virtual hard disk file. The base operating system image file is used to start / create a base virtual machine. It is understood that this base virtual machine only contains the operating system and does not contain any middleware or application 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 image layer files of the middleware layer, application layer, and user data layer are all in Virtual Hard Disk (VHD) format. Therefore, the step 203 above, "creating the target image based on the image layer files of the multiple image layers corresponding to the target image," can be achieved using the following steps:

[0067] 2031. Load the base operating system image file to obtain the initial virtual machine.

[0068] 2032. Mount the virtual hard disk files of each of the at least one non-operating system layer into the initial virtual machine to obtain a virtual machine.

[0069] 2033. Create an image of the virtual machine as the target image.

[0070] In step 2031 above, the base operating system image file is loaded to obtain the initial virtual machine. This initial virtual machine can also be referred to as the base virtual machine.

[0071] In the above 2032, the virtual machine disk files of each non-operating system layer may contain: the runtime files that the non-operating system layer depends on and registry information.

[0072] Mounting a non-operating system layer virtual hard disk file in the initial virtual machine involves adding the runtime files that the non-operating system layer depends on to the initial virtual machine and modifying the registry of the initial virtual machine according to the registry information that the non-operating system layer depends on, thereby achieving mounting.

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

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

[0075] In practical applications, to ensure that the final deployed service can provide services to users normally, after obtaining the virtual machine, the application mounted on it can be run in the virtual machine; if the application can run normally, an image of the virtual machine can be created as the target image; otherwise, an exception notification can be returned to the deployment user.

[0076] In addition, if the above loading and mounting processes fail, it indicates that the image described by the deployment user is unreasonable and not operable, and an exception notification can be returned to the deployment user.

[0077] In practical applications, building an image by loading the image layer files of each image layer requires a certain amount of loading time and computational resources. To minimize image build time and computational resource consumption, the above method may further include:

[0078] 205. Based on the image description information, search the cache for the first image that matches the image description information.

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

[0080] 206. If no first image matching the image description information is 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.

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

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

[0083] In one instance, the first image that matches the image description information can be the same image as the target image.

[0084] In another example, the step 205 above, "searching for a first image in the cache that matches the image description information based on the image description information," can be achieved using the following steps:

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

[0086] 2052. Using a preset hash algorithm, 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 the first image identifier corresponding to the first image layer.

[0087] The plurality of target image layers include: the first image layer and other image layers located below the first image layer among the plurality of image layers corresponding to the target image.

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

[0089] The image identifier of each image in the at least one image is obtained by hashing 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.

[0090] 2054. If there is an image in the cache with the same image identifier as the first image identifier, then the image in the cache with the same image identifier as the first image identifier is determined as the first image.

[0091] In practical applications, the first image layer can be selected from at least one non-operating system layer corresponding to the target image in the above 2051.

[0092] In one instance, multiple first image layers can be identified at once, and then steps 2052 to 2054 above 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 most image layers among the multiple first images.

[0093] In another example, in step 2051 above, an unused first image layer can be determined from multiple image layers corresponding to the target image. Then, steps 2052 and 2053 are executed. If an image with the same image identifier as the first image identifier exists in the cache, it is identified as the first image, and the search process ends. If no image with the same image identifier as the first image identifier exists in the cache, step 2051 is returned, and the process continues until an image with the same image identifier as the first image is found in the cache or until no unused image layer exists among the multiple image layers corresponding to the target image. In practical applications, the first image layer can be selected sequentially from the top to the bottom of the multiple image layers.

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

[0095] The aforementioned preset hash algorithm can be selected according to actual needs, and this application embodiment does not impose specific limitations on it.

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

[0097] In step 206 above, if no first image matching the image description information is found in the cache, the step of searching for the respective image layer files of the multiple image layers corresponding to the target image based on the image description information is triggered. That is, steps 202, 203, and 204 above will only be executed when no first image matching the image description information is found in the cache.

[0098] In one feasible implementation, the phrase "if a first image matching the image description information is found in the cache, then the target image is determined based on the first image" in step 207 above may include:

[0099] 2071. If a first image matching the image description information is found in the cache and the first image layer is the top layer among multiple image layers corresponding to the target image, then the first image is determined as the target image.

[0100] 2072. If a first image matching the image description information is found in the cache and the first image layer is not the top layer among the multiple image layers corresponding to the target image, then according to the first image, the corresponding first virtual machine is started, and according to the hierarchical relationship of at least one second image layer corresponding to the target image, the image layer files of at least one second image layer corresponding to the target image are loaded sequentially in the first virtual machine to obtain the target image.

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

[0102] In the above 2071, the first image layer is the top layer among multiple image layers corresponding to the target image. Therefore, the first image that matches the image description information found according to the above scheme is the same as the target image. Thus, the first image can be directly used as the target image.

[0103] In the above 2072, the first image layer is not the top layer among the multiple image layers corresponding to the target image. Therefore, compared with the target image, the first image found according to the above scheme that matches the image description information lacks the relevant content of at least one second image layer 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 according to the hierarchical relationship of the at least one second image layer corresponding to the target image, sequentially load the image layer files of the at least one second image layer corresponding to the target image into the first virtual machine to obtain a second virtual machine; create the image of the second virtual machine as the target image. The image files of each of the at least one second image layer corresponding to the target image can also be obtained from the image layer management server.

[0104] Figure 3 A flowchart illustrating the service deployment method provided in an embodiment of this application is shown. The execution subject of this method is the aforementioned service deployment client. Figure 3 As shown, the service deployment method includes:

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

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

[0107] 302. Generate a service deployment request based on the multiple image layers corresponding to the target image.

[0108] 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.

[0109] 303. Send the service deployment request to the service deployment server so that the service deployment server can deploy the cloud service.

[0110] The service deployment server is configured to: locate the image layer files of each of the multiple image layers corresponding to the target image based on the image description information; create the target image based on the image layer files of each of the multiple image layers corresponding to the target image; and deploy the corresponding service in the cloud based on the target image.

[0111] In the aforementioned 301, the image layer selection interface can provide deployment users with a variety of optional image layers. In practical applications, if the number of optional image layers provided by the image layer management server is limited, the image layer selection interface can display all optional image layers available to the deployment user; if the number of optional image layers provided by the image layer management server is large, the image layer selection interface can respond to the deployment user's image layer search operation and display the corresponding optional image layers. The image layer search operation can specifically include: the deployment user entering search keywords in the search box provided by the image layer selection interface; thus, the service deployment client can request the image layer management server to search for and display the corresponding optional image layers based on the keywords.

[0112] In the above 302 scenario, in one instance, a service deployment request can be generated based on the image layer identifiers of multiple image layers corresponding to the target image. In another instance, a service deployment request can be generated based on the image layer identifiers of multiple image layers corresponding to the target image and the hierarchical relationship between these multiple image layers.

[0113] In step 303 above, the service deployment request is sent to the service deployment server via the network. The specific service deployment process of the service deployment server can be found in the corresponding content of the above embodiments, and will not be repeated here.

[0114] Figure 4 A flowchart illustrating a service deployment method provided in an embodiment of this application is shown. Figure 4 As shown, the method includes:

[0115] S1. User 401 uploads the image file of the image layer to the image layer management server 403 through the image layer publishing client 402.

[0116] Publisher 401 can upload image layer files for the operating system layer, middleware layer, or application layer. After publisher 401 uploads the image layer files to the cloud, deploying users can retrieve the desired image layer from the cloud as needed to create their required images. The middleware layer and application layer image layer files are both VHD files under the Windows operating system, which include: files that depend on the application's execution and registry information.

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

[0118] After receiving an optional image layer retrieval request sent by the service deployment client 405, the image layer management server 403 can provide an optional image layer to the service deployment client 405.

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

[0120] 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 required to deploy the user 404.

[0121] S4. 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.

[0122] S5, Service Deployment Server 406: Create target image.

[0123] The service deployment server 406 creates the target image based on the image layer files of the multiple image layers corresponding to the target image.

[0124] S6. Service Deployment: Server 406 sends the target image to the service node in service cluster 410.

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

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

[0127] In practical applications, the service deployment server (406) can pre-store some frequently used images and provide them to users for selection, thus improving service deployment efficiency. In some cases, these frequently used images may need improvement. In this case, publishing users can obtain the frequently used images from the service deployment server (406), modify them, and then send the modified images back to the service deployment server (406) for storage and use by deployment users.

[0128] In practical 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.

[0129] In this solution, a user-defined image is generated based on an image description file that describes multiple image layers corresponding to the user-defined image, and then the service is deployed. As can be seen, this solution only needs to manage the base operating system image file, middleware VHD file, application VHD file, and user data VHD file, instead of managing various complete images, thus reducing maintenance costs.

[0130] Figure 5 A schematic diagram of the structure of an electronic device according to an embodiment of this application is shown. Figure 5 As shown, the electronic device includes a memory 1101 and a processor 1102. The memory 1101 can be configured to store various other data to support operation on the electronic device. Examples of such data include instructions for any application or method used to operate 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), Electrically Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

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

[0132] The processor 1102 is coupled to the memory 1101 and is used to execute the program stored in the memory 1101 to implement the service deployment method provided in the above-described method embodiments.

[0133] Furthermore, such as Figure 5 As shown, the electronic device also includes: communication component 1103, display 1104, power supply component 1105, audio component 1106, and other components. Figure 5 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 5 The components shown.

[0134] Accordingly, embodiments of this application also provide 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 methods provided in the above-described method embodiments.

[0135] Figure 6 A schematic diagram of the structure of an electronic device according to an embodiment of this application is shown. Figure 6 As shown, 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 operation on the electronic device. Examples of this data include instructions for any application or method used to operate on the electronic device. The memory 1201 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), Electrically Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

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

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

[0138] Furthermore, such as Figure 6 As shown, the electronic device also includes other components such as a display 1204, a power supply component 1205, and an audio component 1206. Figure 6 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 6 The components shown.

[0139] Accordingly, embodiments of this application also provide 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 methods provided in the above-described method embodiments.

[0140] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0141] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM (Read Only Memory) / RAM (Random Access Memory), magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0142] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A service deployment method, characterized in that, include: Obtain service deployment requests from deploying users regarding cloud desktops or cloud applications; The service deployment request carries image description information; The image description information includes the image layer identifiers of each of the multiple image layers corresponding to the target image required by the deployment user, as well as the hierarchical relationship of the multiple image layers corresponding to the target image. The process of searching for a first image that matches the image description information in the cache, based on the image description information, includes: selecting a first image layer from multiple image layers corresponding to the target image; performing a hash calculation on the image layer file identifiers of the multiple target image layers and the hierarchical relationship of the multiple target image layers using a preset hash algorithm to obtain a first image identifier corresponding to the first image layer; obtaining the image identifiers of at least one image stored in the cache; and identifying the image in the cache whose image identifier is the same as the first image identifier as the first image. If a first image matching the image description information is found in the cache, the target image is determined based on the first image. Based on the target image, deploy the corresponding services in the cloud.

2. The method according to claim 1, characterized in that, Obtain service deployment requests from users regarding cloud desktops or cloud applications, including: Obtain service deployment requests from the deploying user regarding Windows Cloud Desktop or Windows Cloud Applications.

3. The method according to claim 1 or 2, characterized in that, Also includes: If no first image matching the image description information is found in the cache, then the image layer files of each of the multiple image layers corresponding to the target image are searched according to the image description information, and the target image is created according to the image layer files of each of the multiple image layers corresponding to the target image.

4. The method according to claim 3, characterized in that, The target image corresponds to multiple image layers, including an operating system layer and at least one non-operating system layer; the operating system layer image layer file includes: a base operating system image file; the non-operating system layer image layer file includes a virtual hard disk file; The target image is created based on the image layer files of each of the multiple image layers corresponding to the target image, including: Load the base operating system image file to obtain the initial virtual machine; The virtual hard disk files of each of the at least one non-operating system layer are mounted in the initial virtual machine to obtain the virtual machine; Create an image of the virtual machine to serve as the target image.

5. The method according to claim 1, characterized in that, If a first image matching the image description information is found in the cache, the target image is determined based on the first image, including: If a first image matching the image description information is found in the cache and the first image layer is the top layer among multiple image layers corresponding to the target image, then 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 not the top layer among the multiple image layers corresponding to the target image, then according to the first image, the corresponding first virtual machine is started, and according to the hierarchical relationship of at least one second image layer corresponding to the target image, the image layer files of at least one second image layer corresponding to the target image are loaded sequentially in the first virtual machine 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.

6. A service deployment method, characterized in that, include: In response to an image layer selection operation triggered by a user on an image layer selection interface for a cloud desktop or cloud application, multiple image layers corresponding to the target image required by the user are determined; the image layer selection interface is used to provide the user with selectable image layers. Based on the multiple image layers corresponding to the target image, a service deployment request is generated; The service deployment request carries image description information; the image description information includes the image layer identifiers of each of the multiple image layers corresponding to the target image and the hierarchical relationship of the multiple image layers corresponding to the target image. The service deployment request is sent to the service deployment server so that the service deployment server can perform the service deployment. The service deployment server is configured to: search for a first image in the cache that matches the image description information based on the image description information, including: selecting a first image layer from multiple image layers corresponding to the target image; performing a hash calculation on the image layer file identifiers of the multiple target image layers and the hierarchical relationship of the multiple target image layers using a preset hash algorithm to obtain a first image identifier corresponding to the first image layer; obtaining the image identifiers of at least one image stored in the cache; and identifying the image in the cache whose image identifier is the same as the first image identifier as the first image. The service deployment server is further configured to: if a first image matching the image description information is found in the cache, determine the target image based on the first image; and deploy the corresponding service in the cloud based on the target image.

7. 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 for a user's cloud desktop or cloud application to the service deployment server; the service deployment request carries image description information; the image description information includes the image layer identifiers of each of the multiple image layers corresponding to the target image required by the user and the hierarchical relationship of the multiple image layers corresponding to the target image; The service deployment server is used to: based on the image description information, The process of finding a first image in the cache that matches the image description information includes: selecting a first image layer from multiple image layers corresponding to the target image; using a preset hash algorithm to perform hash calculation on the image layer file identifiers of the 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; obtaining the image identifiers of at least one image stored in the cache; and identifying the image in the cache whose image identifier is the same as the first image identifier as the first image. The service deployment server is further configured to: if a first image matching the image description information is found in the cache, determine the target image based on the first image; and deploy the corresponding service in the cloud based on the target image.

8. An electronic device, characterized in that, include: Memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the service deployment method according to any one of claims 1 to 5.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a computer, it can implement the service deployment method according to any one of claims 1 to 5.

10. An electronic device, characterized in that, include: Memory, processor, and communication components, among which, The memory is used to store programs; The processor, coupled to the memory and the communication component, is used to execute the program stored in the memory to implement the service deployment method of claim 6.

11. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a computer, it can implement the service deployment method of claim 6.

Citation Information

Patent Citations

  • Construction method and system of cloud computing mirror image document

    CN105404506A