A method for deploying multi-cloud applications based on the Seq2Seq model

By using the Seq2Seq model for multi-cloud application deployment in the multi-cloud management platform, the problem of low efficiency of traditional iteration-based algorithms is solved, and a more efficient and generalized resource combination of multi-cloud application deployment resources is achieved.

CN114860428BActive Publication Date: 2025-06-17BEIJING INST OF COMP TECH & APPL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210403348.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-18
Publication Date
2025-06-17
Estimated Expiration
2042-04-18

AI Technical Summary

Technical Problem

Traditional iterative algorithms are inefficient when used in multi-cloud management platforms for application deployment, making it difficult to quickly give a cost-effective and performing infrastructure service combination.

Method used

The multi-cloud application deployment method based on the Seq2Seq model is adopted, and the input virtual component instance attributes are encoded through the encoder, attention mechanism and decoder, and the final virtual component instance combination is generated based on the context information.

Benefits of technology

Compared with traditional methods, the Seq2Seq model has higher efficiency and stronger generalization capabilities. It can quickly provide resource combination solutions for multi-cloud application deployment, improving the application deployment efficiency of multi-cloud management platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860428B_ABST
    Figure CN114860428B_ABST
Patent Text Reader

Abstract

The present invention relates to a multi-cloud application deployment method based on a Seq2Seq model, belonging to the field of cloud computing. The present invention uses an Open Virtual Format (OVF) document to describe virtual application deployment resources, constructs a group of alternative instances of virtual components, constructs a data input structure of an algorithm model based on the group of alternative instances, and uses a neural network model for selecting virtual component instances based on Seq2Seq to select a combination of virtual component instances. Compared with the traditional method of multi-objective optimization based on a non-dominated genetic algorithm and a multi-objective particle swarm optimization algorithm, this method has higher efficiency and stronger generalization ability, and is designed for various types of resource combination problems to give a final resource combination plan.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of cloud computing, and particularly relates to a multi-cloud application deployment method based on the Seq2Seq model. Background Art

[0002] With the advancement of intelligent government affairs work, various units at all levels in many vertical government departments in China have launched achievements in government affairs project construction represented by assisting case handling and data application. However, during the process of application construction at all levels, cloud services provided by different cloud service providers are used, and it is impossible to make overall use of cloud service resources of different providers during the construction of new applications. Inevitably, problems such as limited single resource, unbalanced resource allocation, high implementation cost, and difficulty in achieving the optimal expected goal will be encountered. With the development of multi-cloud technology, more and more research has been conducted on the management of heterogeneous clouds and multi-clouds and cloud resource allocation. On the premise of abstracting and standardizing multi-cloud resources, how to quickly provide an infrastructure service combination with better cost and performance for deployment is a very worthy research issue. From a mathematical perspective, this is essentially a multi-objective optimization problem. Common methods for solving multi-objective optimization problems include non-dominated sorting genetic algorithms and multi-objective particle swarm optimization algorithms. However, traditional iterative-based algorithms often require a lot of time for multiple iterations to obtain an approximate optimal solution. Secondly, if there are minor changes in the multi-objective optimization problem, the iterative-based method needs to re-iterate and optimize to obtain the optimal solution, which seriously affects the efficiency of the multi-cloud management platform in providing application deployment function services. Recently, with the development of machine learning algorithms, using end-to-end deep learning algorithms can directly obtain the final resource combination strategy according to the input target requirements. The Seq2Seq model is widely used in speech recognition. This model essentially converts one sequence into another sequence. The present invention applies the Seq2Seq model to the resource combination problem, which has the characteristics of fast speed and strong generalization ability compared with traditional multi-objective optimization methods. Summary of the Invention

[0003] (1) Technical Problems to be Solved

[0004] The technical problem to be solved by the present invention is how to provide a multi-cloud application deployment method based on the Seq2Seq model to solve the problem that traditional iterative-based algorithms seriously affect the efficiency of the multi-cloud management platform in providing application deployment function services.

[0005] (2) Technical Solutions

[0006] To solve the above technical problems, the present invention proposes a multi-cloud application deployment method based on the Seq2Seq model, and the method includes the following steps:

[0007] S1. Use an Open Virtualization Format (OVF) document to describe the virtual application deployment resources, where the deployed resources include multiple virtual component instances;

[0008] S2. Build a group of alternative instances of the virtual components;

[0009] S3. Build the data input structure of the algorithm model based on the group of alternative instances;

[0010] S4. Use a neural network model for virtual component instance selection based on Seq2Seq to obtain a combination of virtual component instances through model training and model inference; The neural network model for virtual component instance selection based on Seq2Seq includes three parts: an encoder, an attention mechanism, and a decoder. Among them, the encoder part encodes the attributes of the component instances in the input group of component instances, the attention mechanism is used to obtain the context information of the input component instance features, and the decoder is used to obtain the final selected combination of virtual component instances.

[0011] (III) Beneficial effects

[0012] The present invention proposes a method for multi-cloud application deployment based on the Seq2Seq model. In the technical solution proposed by the present invention, the Seq2Seq model is used for multi-cloud application deployment. Compared with the traditional methods for multi-objective optimization based on non-dominated genetic algorithms and multi-objective particle swarm optimization algorithms, this method is more efficient and has stronger generalization ability, and is designed for various types of resource combination problems to give the final resource combination plan. Description of the drawings

[0013] Figure 1 It is the data input structure of the algorithm model of the present invention;

[0014] Figure 2 It is the structural diagram of the neural network model for virtual component instance selection based on Seq2Seq. Detailed implementation manners

[0015] To make the objectives, contents, and advantages of the present invention clearer, the following further describes the detailed implementation manners of the present invention in combination with the drawings and embodiments.

[0016] The objective of the present invention is to propose a method for application deployment in a multi-cloud environment based on the Seq2Seq model. This method can meet various demand objectives of users and give an optimal resource combination for multi-cloud application deployment. At the same time, this method has the characteristics of fast inference speed and strong generalization ability.

[0017] The present invention includes the following steps:

[0018] S1. Use the Open Virtualization Format (OVF) document to describe the virtual application deployment resources, where the deployed resources include multiple virtual component instances.

[0019] Taking the unified case-handling system of the procuratorial organs as an example, the virtual application network deployment resource requirements specifically include the Web layer and the application layer. Among them, the virtual components in the Web layer include an intrusion detection system and a web server; the virtual components in the application layer include a load balancer server, an application server, and a data server. For example, the OVF document of the specific unified case-handling system of the procuratorial organs is described as follows.

[0020]

[0021] S2. Build an alternative instance group of virtual components

[0022] Number the virtual components: the intrusion detection system, the web server, the load balancer server, the application server, and the data server are respectively represented as 1 - 5. According to different cloud service providers, build an alternative instance group for each virtual component. For example, the alternative instance group of virtual component 1 is shown in Table 1, and the attributes of the component instances concerned are monthly cost, performance, and security.

[0023] Table 1 Available instance group of component 1, where the instance number represents different cloud service providers

[0024] Instance Number Monthly Cost Performance Security (4) 107 111 62.918 (1) 55 103 55.143 (2) 60 114 72.228 (6) 94 120 51.221 (9) 75 101 67.920

[0025] S3. Build the data input structure of the algorithm model based on the alternative instance group

[0026] The specific data input structure is as Figure 1 shown. The data input structure of the algorithm model is an optional instance attribute matrix,

[0027]

[0028] where m is the serial number of the virtual component instance group, here m is 1, 2, 3, 4, 5; n m represents the number of optional instances in the m-th virtual component instance group. As shown in Table 1, the number of optional instances of virtual component 1 is 5; a, b,..., z are the attributes for multi-objective optimization in the virtual component alternative instance group.

[0029] S4. Use the neural network model for virtual component instance selection based on Seq2Seq to obtain the virtual component instance combination through model training and model inference

[0030] As Figure 2 shown,

[0031] The Seq2Seq-based virtual component instance selection model consists of three parts: an encoder, an attention mechanism, and a decoder. The encoder encodes the attributes of the component instances in the input group of component instances. The attention mechanism is used to obtain the context information of the input component instance features, and the decoder is used to obtain the final selected combination of virtual component instances.

[0032] Encoder part:

[0033] Since the input virtual component instances have no sequential correlation, a 1-D convolutional layer is used as the encoder layer. We use to represent the attributes of the first instance in the m-th group of component instances For convenience of description, X is used to represent the set of all virtual component instance attributes. The dimension of X is M×N, where M is the sum of the component instances in all component groups and N is the attribute dimension of the component instances. Then the encoder process expression is represented as

[0034] H = 1Dconv(X)

[0035] where H = {h1, h2, … h M}, and the dimension is M×128.

[0036] Attention mechanism:

[0037] The final result of virtual component instance selection is to output a combination of component instances, which contains multiple component instances. Since the Seq2Seq model is used and the model needs to consider the influence of the previously output component instances on the currently selected component instances, the output of the final combination of component instances is carried out in multiple steps. In the process of outputting each component instance, the attention mechanism needs to obtain a context vector to represent the features of all the input instances in this time. The expression of the i-th context vector is as follows, where i is also called the time step.

[0038]

[0039]

[0040] where, h t represents all the component instances t = 1, …, M input to the model, and z i is the hidden state in the decoder.

[0041] Decoder part:

[0042] In the process of outputting virtual component instances, we need to consider the sequential relationship between the output virtual component instances. Therefore, the decoder part is implemented using an RNN model. The expression of the hidden state z i in the decoder is as follows

[0043] z i = RNN(z i-1 , y i-1 , c i-1 )

[0044] where RNN is a 2-layer LSTM network, and y i-1 is the component instance output at the previous time step, obtaining the hidden state z i After that, the probability distribution of all input virtual component instances is

[0045] P(y i |H, y <i ) = Distribution(z i , c i )

[0046] where Distribution is an MLP layer that simultaneously performs softmax on the probabilities of all input virtual component instances, and y <i represents the component instance output at the time step before time step i.

[0047] Model training process:

[0048] During training, the model predicts the output instance result of the next time step through the component instances of the previous output, and at the same time maximizes the prediction probability.

[0049]

[0050] where is the GroundTruth value of the previous output component instance, and θ is the model parameter. According to the GroundTruth value in the training set, we can obtain the one-hot encoding of each output component instance Then the loss function of the model is

[0051]

[0052] where q(x t ) is the one-hot encoding of the GroundTruth when the input is x t , and p(x t ) is the prediction probability of the model output for all input component instances.

[0053] Model inference process:

[0054] During the process of using the trained model for inference, at each time step i, the model obtains a probability distribution for all input virtual component instances, and then selects the component instance to be output according to this probability distribution.

[0055] S41. At the i-th time step, the model obtains the hidden state z at the i-th time step based on the output instance result at the (i - 1)-th time step and the hidden state z at the (i - 1)-th time step i-1 to obtain the hidden state z at the i-th time step i , and then combines it with the context vector c at the i-th time step i to obtain the probability value of the input component instance at the i-th time step

[0056] S42. Calculate the average probability value of each group of component instances:

[0057] S43. Traverse the average probability values of m groups of component instances to obtain the group of component instances with the maximum average probability;

[0058] S431. Determine whether the number of selected component instances in the current instance group is less than the required number;

[0059] S432. If the number of selected component instances in the current instance group is less than the required number of component instances: Traverse the n m instances in this component instance group to find the component instance with the highest probability and not yet selected as the output result at the current time step i, then increment the time step i by 1 and jump back to S41 to continue execution.

[0060] S433. If the number of selected component instances in the current instance group is greater than or equal to the required number of component instances: Traverse the next group of component instances. If the requirements of all groups of component instances have been met, then jump to S44.

[0061] S44. Output the combination of component instances selected by the model for deployment.

[0062] The above is the multi-cloud application deployment method based on the Seq2Seq model. The process of using the Seq2Seq model to solve the problem of multi-category virtual component combination selection above is the protection scope of the present invention.

[0063] The above is only the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and deformations can be made, and these improvements and deformations should also be regarded as the protection scope of the present invention.

Claims

1. A multi-cloud application deployment method based on the Seq2Seq model, characterized in that, The method includes the following steps: S1. Use an Open Virtualization Format (OVF) document to describe virtual application deployment resources, where the deployed resources include multiple virtual component instances; S2. Build a group of alternative instances of virtual components; S3. Build the data input structure of the algorithm model based on the group of alternative instances; S4. Use a neural network model for virtual component instance selection based on Seq2Seq to obtain a virtual component instance combination through model training and model inference; The neural network model for virtual component instance selection based on Seq2Seq includes three parts: an encoder, an attention mechanism, and a decoder. Among them, the encoder part encodes the attributes of the component instances in the input group of component instances, the attention mechanism is used to obtain the context information of the input component instance features, and the decoder is used to obtain the final selected virtual component instance combination; Wherein, In the step S4, a 1-D convolutional layer is used as the encoder layer, and is used to represent the attributes of the first instance in the m-th component instance group Let X represent the set of all virtual component instance attributes. The dimension of X is M×N, where M is the sum of component instances in all component groups, and N is the attribute dimension of component instances. Then the encoder process expression is H = 1Dconv(X) where H = {h1, h2, … h M}, with a dimension of M × 128; In step S4, the final result of virtual component instance selection is to output a component instance combination, which contains multiple component instances. The output of the component instance combination is carried out in multiple times. During the process of outputting component instances each time, the attention mechanism needs to obtain a context vector to represent the features of all input instances this time; The expression of the context vector at the i-th time step is, where i is also called the time step; where h t represents all component instances t = 1, …, M of the model input, and z i is the hidden state in the decoder; In the step S4, when outputting virtual component instances, the sequential relationship between the output virtual component instances is considered, and the decoder part is implemented using an RNN model. The hidden state z i in the decoder has the following expression: z i = RNN(z i-1 , y i-1 , c i-1 ) where the RNN is a 2-layer LSTM network, and y i-1 is the component instance output at the previous time step, obtaining the hidden state z i After that, the probability distribution of all input virtual component instances is P(y i |H,y <i ) = Distribution(z i ,c i ) where Distribution is an MLP layer that simultaneously applies softmax to the probabilities of all input virtual component instances, and y <i represents the component instances output at time steps prior to time step i.

2. The multi-cloud application deployment method based on the Seq2Seq model according to claim 1, characterized in that, In step S1, the virtual application network deployment resource requirements specifically include a Web layer and an application layer. Among them, the virtual components in the Web layer include an intrusion detection system and a web server; The virtual components in the application layer include a load balancer server, an application server, and a data server.

3. The multi-cloud application deployment method based on the Seq2Seq model according to claim 2, characterized in that, Step S2 specifically includes: Number the virtual components: The intrusion detection system, web server, load balancer server, application server, and data server are respectively represented as 1 to 5. According to different cloud service providers, build a group of alternative instances for each virtual component. Among them, the attributes of the component instances are monthly cost, performance, and security.

4. The multi-cloud application deployment method based on the Seq2Seq model according to any one of claims 1-3, characterized in that, Step S3 specifically includes: The data input structure of the algorithm model is an optional instance attribute matrix, where m is the serial number of the virtual component instance group; n m represents the number of optional instances in the m-th virtual component instance group; a, b, …, z are the attributes for multi-objective optimization in the virtual component optional instance group.

5. The multi-cloud application deployment method based on the Seq2Seq model according to claim 4, characterized in that, In step S4, the model training process is as follows: During the training process, the model predicts the output instance result of the next time step through the previously output component instances, and at the same time, it is necessary to maximize the prediction probability, where is the GroundTruth value of the previous output component instance, and θ is the model parameter; the one-hot encoding of each output component instance is obtained according to the GroundTruth value in the training set then the loss function of the model is where q(x t ) is the one-hot encoding of the GroundTruth when the input is x t , and p(x t ) is the predicted probability for all input component instances output by the model.

6. The multi-cloud application deployment method based on the Seq2Seq model according to claim 5, characterized in that, In step S4, the model inference process is as follows: S41. At the i-th time step, the model obtains the hidden state z at the i-th time step based on the output instance result at the (i - 1)-th time step and the hidden state z at the (i - 1)-th time step i-1 and then obtains the hidden state z at the i-th time step i , and then combines it with the context vector c at the i-th time step i to obtain the probability value of the input component instance at the i-th time step S42. Calculate the average probability value of each component instance group: S43. Traverse the average probability values of m groups of component instances to obtain the group of component instances with the maximum average probability; S44. Output the component instance combination selected by the model for deployment.

7. The multi-cloud application deployment method based on the Seq2Seq model according to claim 6, wherein, Step S43 specifically includes: S431. Judge whether the number of selected component instances in the current instance group is less than the required number; S432. If the number of selected current instance group components is less than the required number of component instances: Traverse the n m instances in this component instance group to find the component instance with the highest probability and not yet selected as the output result at the current time step i, then increment the time step i by 1, and jump back to S41 to continue execution; S433. If the number of selected component instances in the current instance group is greater than or equal to the required number of component instances: Traverse the next group of component instances. If the requirements of all groups of component instances are met, then jump to S44.

Citation Information

Patent Citations

  • Method for constructing QoS-based application optimization deployment scheme in multi-cloud environment

    CN110650032A

  • System and method for providing a virtual assembly builder for use with a cloud computing environment

    US20140075437A1