Dynamic deployment method of microservices based on cloud computing
Through the deep neural network model, the multi-label category, time and location information of user service requests is processed, the problem of unreasonable resource allocation in the dynamic deployment of microservices is solved, flexible adjustment of cloud computing resources is achieved, and the risk of system failure is reduced.
Patent Information
- Application Number
- CN202110536035.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-17
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2041-05-17
AI Technical Summary
In the dynamic deployment of microservices based on cloud computing, the existing technology is difficult to effectively handle the situation that user services may belong to multiple business types, resulting in unreasonable resource allocation and increasing the risk of microservice system failure.
The deep neural network model is adopted to obtain the multi-label category information, request time and location information requested by the user's business, and use the Hidden Markov model to map to the high-dimensional feature space, and perform one-dimensional convolution processing. Combined with the deep neural network of the fully connected layer, the identification number of the cloud computing virtual cluster resource is generated.
It realizes dynamic adjustment of resource allocation according to user business needs, improves resource adjustment flexibility, and reduces the probability of microservice system failure.
Smart Images

Figure CN113515289B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to dynamic deployment of microservices in the field of cloud computing, and more specifically, to a method for dynamic deployment of microservices based on cloud computing, a system for dynamic deployment of microservices based on cloud computing, and an electronic device. Background Art
[0002] Cloud computing is a type of distributed computing, which means breaking down huge data computing programs into countless small programs through the network "cloud", and then processing and analyzing these small programs through a system composed of multiple servers to obtain results and return them to users. Microservices are a variation of the service-oriented architecture (SOA) architectural style, which constructs applications as a set of loosely coupled services.
[0003] With the development of cloud computing technology and the promotion and application of microservices in the telecommunications field, there are many traditional applications in the telecommunications field, various business channels, and fine-grained distributed architecture to a certain extent, which increases the probability of microservice failures (such as response delays, service busyness, etc.) and causes system functions to be unavailable. After a large number of microservices are deployed, how to dynamically adjust service resources according to business needs, improve the flexibility of resource adjustment, and thus reduce microservice system failures has become one of the technical problems that need to be solved.
[0004] At present, in the dynamic deployment of microservices based on cloud computing, it is necessary to determine the cloud computing virtual cluster resources used to execute the corresponding microservices based on the specific type of user services and other related information. Telecom operators generally allocate resources to microservices corresponding to the service based on the single classification label of the service type, thereby realizing dynamic deployment of microservices. However, in actual application scenarios, for a specific user service, there may be multiple classifications, that is, the user service may belong to multiple service types at the same time, such as emergency services and high reliability services.
[0005] Therefore, a technical solution for dynamic deployment of microservices is expected. Summary of the invention
[0006] In order to solve the above technical problems, this application is proposed. The embodiments of this application provide a method for dynamic deployment of microservices based on cloud computing, a system for dynamic deployment of microservices based on cloud computing, and an electronic device, which use a deep neural network model to determine the cloud computing virtual cluster resources to which the corresponding microservice should be allocated based on data related to the business requested by the user, thereby achieving effective dynamic deployment of microservices based on cloud computing.
[0007] According to one aspect of the present application, a method for dynamic deployment of microservices based on cloud computing is provided, which includes:
[0008] Acquire multi-label category information to which a service request initiated by a user belongs, where the multi-label category information is used to indicate multiple service types to which the service request initiated by the user belongs;
[0009] Performing one-hot encoding on each category label in the multi-type label information, and concatenating the one-hot encodings corresponding to the multiple category labels to obtain an input category vector;
[0010] Arranging the request time information corresponding to the service request in a specific order and inputting it into an encoder to obtain an initial time vector;
[0011] Mapping the initial time vector into a high-dimensional feature space using a hidden Markov model to obtain an input time vector;
[0012] Mapping the request location information corresponding to the service request into a high-dimensional feature space using the hidden Markov model to obtain an input location vector;
[0013] splicing the input category vector, the input time vector and the input location vector in the length direction of the vector into a comprehensive vector;
[0014] Performing multiple one-dimensional convolution processes on the comprehensive vector to obtain a coding feature vector; and
[0015] The encoded feature vector is input into an encoder-decoder implemented by a deep neural network including multiple fully connected layers to obtain a decoding result, wherein the decoding result is used to represent the identification number of the cloud computing virtual cluster resource to be classified.
[0016] According to another aspect of the present application, a cloud computing-based microservice dynamic deployment system is provided, which includes:
[0017] An information acquisition unit, used to acquire multi-label category information to which a service request initiated by a user belongs, wherein the multi-label category information is used to indicate multiple service types to which the service request initiated by the user belongs;
[0018] An input category vector generating unit, configured to perform one-hot encoding on each category label in the multi-type label information obtained by the information acquiring unit, and to concatenate the one-hot encodings corresponding to the multiple category labels to obtain an input category vector;
[0019] An initial time vector generating unit, configured to arrange the request time information corresponding to the service request in a specific order and input the order into an encoder to obtain an initial time vector;
[0020] An input time vector generating unit is used to map the initial time vector obtained by the initial time vector generating unit into a high-dimensional feature space by using a hidden Markov model to obtain an input time vector;
[0021] An input location vector generating unit, used to map the request location information corresponding to the service request into a high-dimensional feature space using the hidden Markov model to obtain an input location vector;
[0022] a comprehensive vector generating unit, configured to splice the input category vector obtained by the input category vector generating unit, the input time vector obtained by the input time vector generating unit, and the input location vector obtained by the input location vector generating unit into a comprehensive vector in a length direction of the vector;
[0023] A coding feature vector generating unit, configured to perform multiple one-dimensional convolution processes on the comprehensive vector obtained by the comprehensive vector generating unit to obtain a coding feature vector;
[0024] A decoding result generating unit is used to input the encoding feature vector obtained by the encoding feature vector generating unit into an encoder-decoder implemented by a deep neural network including multiple fully connected layers to obtain a decoding result, wherein the decoding result is used to represent the identification number of the cloud computing virtual cluster resource to be classified.
[0025] According to another aspect of the present application, an electronic device is provided, comprising: a processor; and a memory, in which computer program instructions are stored, and when the computer program instructions are executed by the processor, the processor executes the cloud computing-based microservice dynamic deployment method as described above.
[0026] Compared with the prior art, the cloud computing-based microservice dynamic deployment method, cloud computing-based microservice dynamic deployment system and electronic device provided by the present application use a deep neural network model to determine the cloud computing virtual cluster resources to which the corresponding microservice should be allocated based on data related to the business requested by the user, thereby realizing effective cloud computing-based microservice dynamic deployment. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0028] Figure 1This is an application scenario diagram of a method for dynamic deployment of microservices based on cloud computing according to an embodiment of the present application;
[0029] Figure 2 A flowchart of a method for dynamic deployment of microservices based on cloud computing according to an embodiment of the present application;
[0030] Figure 3 A schematic diagram of the system architecture of a method for dynamic deployment of microservices based on cloud computing according to an embodiment of the present application;
[0031] Figure 4 A flowchart of obtaining multi-label category information to which a service request initiated by a user belongs in a method for dynamic deployment of microservices based on cloud computing according to an embodiment of the present application;
[0032] Figure 5 In the method for dynamic deployment of microservices based on cloud computing according to an embodiment of the present application, the initial time vector is mapped to a high-dimensional feature space using a hidden Markov model to obtain a flow chart of an input time vector;
[0033] Figure 6 In the method for dynamic deployment of microservices based on cloud computing according to an embodiment of the present application, the hidden Markov model is used to map the request location information corresponding to the business request into a high-dimensional feature space to obtain a flow chart of an input location vector;
[0034] Figure 7 A block diagram of a microservice dynamic deployment system based on cloud computing according to an embodiment of the present application;
[0035] Figure 8 A block diagram of an information acquisition unit in a microservice dynamic deployment system based on cloud computing according to an embodiment of the present application;
[0036] Fig. 9 A block diagram of an input time vector generation unit in a microservice dynamic deployment system based on cloud computing according to an embodiment of the present application;
[0037] Fig.10 A block diagram of an input location vector generation unit in a microservice dynamic deployment system based on cloud computing according to an embodiment of the present application;
[0038] Fig.11 is a block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0039] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.
[0040] Scenario Overview
[0041] As mentioned above, in the dynamic deployment process of microservices based on cloud computing, it is necessary to determine the cloud computing virtual cluster resources used to execute the corresponding microservices based on the specific type of user services and other related information. At present, telecom operators generally allocate resources to microservices corresponding to the services based on the single classification label of the service type, thereby realizing the dynamic deployment of microservices. However, in actual application scenarios, for a specific user service, there may be multiple classifications, that is, the user service may belong to multiple service types at the same time, such as emergency services and high reliability services. In addition, the service type label based on a single classification currently only considers the predetermined fields in the request sent by the user when requesting the service, and does not consider other context information related to the other service requests. Therefore, when allocating resources based on this, there may be an unreasonable allocation mechanism.
[0042] Based on this, the applicant of this application considers the powerful performance of deep neural networks based on statistical models in fully mining the statistical correlations within data, and adopts a deep neural network model to determine the cloud computing virtual cluster resources to which the corresponding microservices should be allocated based on data related to the business requested by the user, thereby realizing effective dynamic deployment of microservices based on cloud computing.
[0043] In the embodiment of the present application, when considering the business type, the multi-label category information of the business type is used, which can be obtained by manual annotation or obtained from data related to the business request through other deep neural networks. In addition, after obtaining the multi-label category information, each label category is uniquely encoded, and the corresponding multiple label category encodings are concatenated to obtain the input category vector.
[0044] In addition, when considering the resource allocation problem of microservices, since resource allocation is related to the time dimension and the space dimension in addition to the business type dimension, for example, the cloud computing virtual cluster resources used in the office area during the working hours are relatively tight, while the cloud computing virtual cluster resources used in the residential area during the night time period are relatively tight, the embodiment of the present application further includes time information and space information corresponding to the business request.
[0045] Specifically, for the time information corresponding to the service request, the numerical values in the form of "year, month, day, hour, minute, second" can be arranged and input into the encoder to obtain the initial time vector, and then mapped into the high-dimensional space using the hidden Markov model to obtain the input time vector. In addition, the location information corresponding to the service request is also mapped into the high-dimensional space using the hidden Markov model to obtain the location input vector. Here, in the embodiment of the present application, the hidden Markov model is used to consider that in the corresponding high-dimensional space, the distance between vectors can be set to represent the relationship between vectors. That is, in the embodiment of the present application, when mapping the time information and the space information into the high-dimensional space of the hidden Markov model, on the other hand, the predetermined time reference point and space reference point of the cloud computing virtual cluster resource are set, such as "10 am, office area A", "9 pm, residential area B", etc., and the reference information is also mapped into the high-dimensional space, and the distance between the time input vector and the location input vector in the high-dimensional space corresponding to the reference position corresponds to the actual physical distance, that is, the time distance and the length distance.
[0046] Thus, after obtaining the input category vector, the input event vector, and the input location vector, these input vectors can be concatenated into a single input vector in the length direction, and multiple one-dimensional convolutions are performed to further express the correlation information within the vector and between the vectors. Then, the feature vector after the one-dimensional convolution is input into an encoder-decoder implemented by a deep neural network including multiple fully connected layers to obtain the final decoding result, where the decoding result can represent the identification number of the cloud computing virtual cluster resource to be classified.
[0047] Figure 1 The figure shows an application scenario diagram of a method for dynamic deployment of microservices based on cloud computing according to an embodiment of the present application. Figure 1 As shown, in this application scenario, firstly, the multi-label category information to which the service request initiated by the user belongs is obtained; then, the service request is input into a server deployed with a cloud computing-based microservice dynamic deployment algorithm (for example, Figure 1 The cloud server S shown in the figure), wherein the server can process the business request based on the microservice dynamic deployment algorithm of cloud computing to generate an identification number representing the cloud computing virtual cluster resource to be classified.
[0048] After introducing the basic principles of the present application, various non-limiting embodiments of the present application will be described in detail with reference to the accompanying drawings.
[0049] Exemplary Methods
[0050] Figure 2 The figure shows a flow chart of a dynamic deployment method of microservices based on cloud computing. Figure 2As shown, according to the embodiment of the present application, the method for dynamic deployment of microservices based on cloud computing includes: S110, obtaining multi-label category information to which the business request initiated by the user belongs, and the multi-label category information is used to represent the multiple business types to which the business request initiated by the user belongs; S120, performing unique hot encoding on each category label in the multi-type label information, and cascading the unique hot encodings corresponding to the multiple category labels to obtain an input category vector; S130, arranging the request time information corresponding to the business request in a specific order and inputting it into the encoder to obtain an initial time vector; S140, mapping the initial time vector to a high-dimensional feature space using a hidden Markov model , to obtain an input time vector; S150, using the hidden Markov model to map the request location information corresponding to the business request into a high-dimensional feature space to obtain an input location vector; S160, concatenating the input category vector, the input time vector and the input location vector in the length direction of the vector into a comprehensive vector; S170, performing multiple one-dimensional convolution processes on the comprehensive vector to obtain a coded feature vector; and, S180, inputting the coded feature vector into an encoder-decoder implemented by a deep neural network including multiple fully connected layers to obtain a decoding result, wherein the decoding result is used to represent the identification number of the cloud computing virtual cluster resource to be classified.
[0051] Figure 3 The figure shows a schematic diagram of the architecture of the dynamic deployment method of microservices based on cloud computing according to an embodiment of the present application. Figure 3 As shown, in the network architecture of the microservice dynamic deployment method based on cloud computing, first, the multi-label category information to which the service request initiated by the user belongs is obtained (for example, Figure 3 IN as shown in FIG); then, each category label in the multi-type label information is uniquely encoded, and the uniquely encoded corresponding to the multiple category labels are concatenated to obtain an input category vector (for example, Figure 3 Then, the request time information corresponding to the service request is arranged in a specific order and input into the encoder (for example, Figure 3 ) to obtain an initial time vector (e.g., as Figure 3 Vt1 as shown in FIG. 3 ); then, using a hidden Markov model (e.g., Figure 3 The HMM1 shown in FIG. 1 maps the initial time vector to a high-dimensional feature space to obtain an input time vector (e.g., Figure 3 Vt2 as shown in FIG. 2 ); then, using the hidden Markov model (for example, Figure 3 The HMM2 shown in FIG. 2 maps the requested location information corresponding to the service request to a high-dimensional feature space to obtain an input location vector (for example, Figure 3 Then, the input category vector, the input time vector and the input location vector are concatenated in the length direction of the vector into a comprehensive vector (for example, Figure 3 Vm as shown in FIG); then, the comprehensive vector is subjected to multiple one-dimensional convolution processes to obtain a coding feature vector (for example, Figure 3 Then, the encoded feature vector is input into an encoder-decoder implemented by a deep neural network including multiple fully connected layers (for example, Figure 3 ) to obtain a decoding result (e.g., Figure 3 R) as shown in , wherein the decoding result is used to represent the identification number of the cloud computing virtual cluster resource to be classified.
[0052] In step S110, multi-label category information to which the service request initiated by the user belongs is obtained, and the multi-label category information is used to indicate multiple service types to which the service request initiated by the user belongs. Specifically, in the embodiment of the present application, the multi-label category information is obtained by manual annotation.
[0053] It is worth mentioning that in an embodiment of the present application, the multi-label category information can also be obtained from data related to the business request through a deep neural network. For example, in another embodiment of the present application, the process of obtaining multi-label category information to which a business request initiated by a user belongs includes: first, obtaining the business request data initiated by the user and the context information corresponding to the business request data, wherein the context information includes the user portrait data of the user, the request time information for initiating the business, and the request location information for initiating the business. That is, in order to accurately classify the user business type of the microservice, when obtaining the business request field, its corresponding context information is also considered.
[0054] Next, the business request data is input into the semantic understanding model to obtain a business request semantic vector. Next, the user portrait data is input into the classifier for user classification to obtain a user portrait feature vector. Next, the time-related data in the request time information is arranged in a specific order and input into the encoder to obtain a time input vector. Next, the request location information is mapped into a high-dimensional feature space using a hidden Markov model to obtain a location input vector. That is, considering the multi-dimensionality of the data, each type of data is appropriately processed to be converted into an appropriate input vector.
[0055] Next, the business request semantic vector, the user portrait feature vector, the time input vector, and the location input vector are converted to the same length and spliced into an input matrix in the vector dimension. Next, the input matrix is passed through a deep convolutional neural network to obtain a feature map. That is, a deep convolutional neural network is used to mine high-dimensional correlation features between various data, and before inputting the convolutional neural network, various input vectors are converted to the same length and spliced into a matrix in the vector dimension.
[0056] Next, the service request semantic vector, the user portrait feature vector, the time input vector and the location input vector are used as query vectors to perform matrix multiplication with the feature graph to obtain the service request feature vector, the user feature vector, the time feature vector and the location feature vector. Then, the service request feature vector, the user feature vector, the time feature vector and the location feature vector are concatenated and input into a multi-label classifier to obtain the multi-label category information. It should be understood that after obtaining the feature graph, in order to make the extracted high-dimensional correlation features distinguishable as much as possible in the above-mentioned classification dimensions to avoid overfitting, the above input vectors are used as query vectors to be multiplied with the feature graph to obtain various types of feature vectors. Then, these feature vectors are concatenated and input into a multi-label classifier including multiple fully connected layers to obtain the desired category results.
[0057] Figure 4 The figure shows a flow chart of obtaining multi-label category information of a service request initiated by a user in a method for dynamic deployment of microservices based on cloud computing according to an embodiment of the present application. Figure 4As shown, in an embodiment of the present application, obtaining multi-label category information to which a service request initiated by a user belongs includes: S210, obtaining service request data initiated by a user and context information corresponding to the service request data, wherein the context information includes user portrait data of the user, request time information for initiating the service, and request location information for initiating the service; S220, inputting the service request data into a semantic understanding model to obtain a service request semantic vector; S230, inputting the user portrait data into a classifier for user classification to obtain a user portrait feature vector; S240, arranging the time-related data in the request time information in a specific order and inputting the data into an encoder to obtain a time input vector; S250, mapping the request location information into a high-dimensional feature space using a hidden Markov model, To obtain the location input vector; S260, convert the business request semantic vector, the user portrait feature vector, the time input vector and the location input vector into the same length and splice them into an input matrix in the vector dimension; S270, pass the input matrix through a deep convolutional neural network to obtain a feature map; S280, use the business request semantic vector, the user portrait feature vector, the time input vector and the location input vector as query vectors to perform matrix multiplication with the feature map respectively to obtain a business request feature vector, a user feature vector, a time feature vector and a location feature vector; and, S290, splice the business request feature vector, the user feature vector, the time feature vector and the location feature vector and input them into a multi-label classifier to obtain the multi-label category information.
[0058] In step S120, each category label in the multi-type label information is uniquely encoded, and the uniquely encoded corresponding to the multiple category labels are cascaded to obtain an input category vector. It should be understood that each category label feature in the multi-type label information is not a continuous value, but a categorical value, and uniquely encoded can be used to solve the discrete value problem of categorical data. Uniquely encoded features extend the value of discrete features to Euclidean space, and a certain value of discrete features corresponds to a certain point in Euclidean space. Using uniquely encoded discrete features will make the distance calculation between features more reasonable. After the discrete features are uniquely encoded, the features of each dimension after encoding can be regarded as continuous features.
[0059] In step S130, the request time information corresponding to the business request is arranged in a specific order and input into the encoder to obtain an initial time vector. Specifically, in an embodiment of the present application, the request time information corresponding to the business request is arranged in a specific order and input into the encoder to obtain an initial time vector, comprising: arranging the request time information corresponding to the business request in the form of "year, month, day, hour, minute, second" and inputting into the encoder to obtain an initial time vector. It should be understood that by encoding the arranged time information through the encoder, the time-related data in the request time information can be mapped to the same space to obtain an initial time vector.
[0060] In step S140, the initial time vector is mapped into a high-dimensional feature space using a hidden Markov model to obtain an input time vector.
[0061] Specifically, in an embodiment of the present application, the process of mapping the initial time vector to a high-dimensional feature space using a hidden Markov model to obtain an input time vector includes: first, obtaining a predetermined time reference point of the cloud computing virtual cluster resources to be classified. Then, the predetermined time reference point is mapped to a high-dimensional feature space using the hidden Markov model to obtain a reference time vector. Those of ordinary skill in the art should know that the hidden Markov model (HMM) is a generation model of a dynamic Bayesian network with the simplest structure. The use of the hidden Markov model is to consider that in its corresponding high-dimensional space, the distance between vectors can be set to represent the relationship between vectors. Then, based on the actual time distance between the predetermined time reference point and the request time information and the corresponding relationship between the vector distance between the reference time vector and the initial time input vector, the initial time vector is mapped to a high-dimensional feature space using a hidden Markov model to obtain the time input vector. That is, a predetermined time reference point is set for the cloud computing virtual cluster resources, and the reference information is also mapped into a high-dimensional space, so that the distance between the time input vector and the vector corresponding to the reference position in the high-dimensional space corresponds to the actual physical distance, i.e., the time distance.
[0062] Figure 5 The figure shows a flowchart of mapping the initial time vector to a high-dimensional feature space using a hidden Markov model to obtain an input time vector in a method for dynamic deployment of microservices based on cloud computing according to an embodiment of the present application. Figure 5As shown, in an embodiment of the present application, the initial time vector is mapped to a high-dimensional feature space using a hidden Markov model to obtain an input time vector, including: S310, obtaining a predetermined time reference point of the cloud computing virtual cluster resources to be classified; S320, mapping the predetermined time reference point to a high-dimensional feature space using the hidden Markov model to obtain a reference time vector; and, S330, based on the correspondence between the actual time distance between the predetermined time reference point and the request time information and the vector distance between the reference time vector and the initial time input vector, mapping the initial time vector to a high-dimensional feature space using a hidden Markov model to obtain the time input vector.
[0063] In step S150, the request location information corresponding to the service request is mapped into a high-dimensional feature space using the hidden Markov model to obtain an input location vector.
[0064] Specifically, in an embodiment of the present application, the process of mapping the request location information corresponding to the business request into a high-dimensional feature space using the hidden Markov model to obtain an input location vector includes: first, obtaining a predetermined spatial reference point of the cloud computing virtual cluster resource to be classified. Next, mapping the predetermined spatial reference point into a high-dimensional feature space using the hidden Markov model to obtain a reference space vector. Then, based on the correspondence between the actual physical distance between the predetermined spatial reference point and the request location information and the vector distance between the reference space vector and the initial location input vector, mapping the request location information corresponding to the business request into a high-dimensional feature space using the hidden Markov model to obtain the location input vector. That is, setting a predetermined spatial reference point of the cloud computing virtual cluster resource, and also mapping the reference information into a high-dimensional space, so that the distance between the location input vector and the vector corresponding to the reference position in the high-dimensional space corresponds to the actual physical distance, that is, the length distance.
[0065] Figure 6 The figure shows a flowchart of mapping the request location information corresponding to the service request to a high-dimensional feature space using the hidden Markov model in the dynamic deployment method of microservices based on cloud computing according to an embodiment of the present application to obtain an input location vector. Figure 6As shown, in an embodiment of the present application, the request location information corresponding to the business request is mapped into a high-dimensional feature space using the hidden Markov model to obtain an input location vector, including: S410, obtaining a predetermined spatial reference point of the cloud computing virtual cluster resources to be classified; S420, mapping the predetermined spatial reference point into a high-dimensional feature space using the hidden Markov model to obtain a reference space vector; and, S430, based on the correspondence between the actual physical distance between the predetermined spatial reference point and the request location information and the vector distance between the reference space vector and the initial location input vector, mapping the request location information corresponding to the business request into a high-dimensional feature space using the hidden Markov model to obtain the location input vector.
[0066] In step S160, the input category vector, the input time vector, and the input location vector are spliced into a comprehensive vector in the length direction of the vector. It should be understood that since resource allocation is associated with the time dimension and the space dimension in addition to the business type dimension, the time information and space information corresponding to the business request are further considered in the embodiment of the present application, that is, the above-mentioned input category vector, the input time vector, and the input location vector are spliced into a single input vector in the length direction.
[0067] In step S170, the comprehensive vector is subjected to multiple one-dimensional convolutions to obtain a coding feature vector. A person skilled in the art should know that one-dimensional convolution is often used to process sequence models, and by performing multiple one-dimensional convolutions on the comprehensive vector, the correlation information within the vector and between vectors can be further extracted.
[0068] In step S180, the encoded feature vector is input into an encoder-decoder implemented by a deep neural network including multiple fully connected layers to obtain a decoding result, wherein the decoding result is used to represent the identification number of the cloud computing virtual cluster resource to be classified. That is, the encoded feature vector is encoded by a deep neural network including multiple fully connected layers to make full use of the information at each position in the encoded feature vector, and the number of output bits of the last layer of the multiple fully connected layers is 1 to obtain the identification number representing the cloud computing virtual cluster resource to be classified.
[0069] In summary, the cloud computing-based microservice dynamic deployment method of the embodiment of the present application is explained, which adopts a deep neural network model to determine the cloud computing virtual cluster resources to which the corresponding microservice should be allocated based on data related to the business requested by the user, thereby realizing effective cloud computing-based microservice dynamic deployment.
[0070] Exemplary Systems
[0071] Figure 7FIG. 1 is a block diagram of a microservice dynamic deployment system based on cloud computing according to an embodiment of the present application. Figure 7 As shown, according to the embodiment of the present application, the cloud computing-based microservice dynamic deployment system 700 includes: an information acquisition unit 710, which is used to obtain multi-label category information to which the business request initiated by the user belongs, and the multi-label category information is used to represent multiple business types to which the business request initiated by the user belongs; an input category vector generation unit 720, which is used to perform one-hot encoding on each category label in the multi-type label information obtained by the information acquisition unit 710, and cascade the one-hot encodings corresponding to the multiple category labels to obtain an input category vector; an initial time vector generation unit 730, which is used to arrange the request time information corresponding to the business request in a specific order and input it into the encoder to obtain an initial time vector; an input time vector generation unit 740, which is used to map the initial time vector obtained by the initial time vector generation unit 730 to a high-dimensional feature space using a hidden Markov model to obtain an input time vector; an input location vector generation unit 750, which is used to generate a location vector. The hidden Markov model is used to map the request location information corresponding to the business request into a high-dimensional feature space to obtain an input location vector; a comprehensive vector generation unit 760 is used to splice the input category vector obtained by the input category vector generation unit 720, the input time vector obtained by the input time vector generation unit 740, and the input location vector obtained by the input location vector generation unit 750 into a comprehensive vector in the length direction of the vector; a coding feature vector generation unit 770 is used to perform multiple one-dimensional convolution processes on the comprehensive vector obtained by the comprehensive vector generation unit 760 to obtain a coding feature vector; and a decoding result generation unit 780 is used to input the coding feature vector obtained by the coding feature vector generation unit 770 into an encoder-decoder implemented by a deep neural network including multiple fully connected layers to obtain a decoding result, wherein the decoding result is used to represent the identification number of the cloud computing virtual cluster resource to be classified.
[0072] In one example, in the above-mentioned dynamic deployment system 700, as Figure 8As shown, the information acquisition unit 710 includes: a data acquisition subunit 711, which is used to acquire the service request data initiated by the user and the context information corresponding to the service request data, wherein the context information includes the user portrait data of the user, the request time information of the service initiated and the request location information of the service initiated; a semantic vector generation subunit 712, which is used to input the service request data obtained by the data acquisition subunit 711 into the semantic understanding model to obtain the service request semantic vector; a user portrait feature vector generation subunit 713, which is used to input the user portrait data obtained by the data acquisition subunit 711 into the semantic understanding model for the user The classification classifier is used to obtain a user portrait feature vector; a time input vector generating subunit 714 is used to arrange the time-related data in the request time information obtained by the data acquisition subunit 711 in a specific order and input it into the encoder to obtain a time input vector; a location input vector generating subunit 715 is used to map the request location information obtained by the data acquisition subunit 711 to a high-dimensional feature space using a hidden Markov model to obtain a location input vector; an input matrix generating subunit 716 is used to map the business request semantic vector obtained by the semantic vector generating subunit 712 and the user portrait feature vector generating subunit The user portrait feature vector obtained by the subunit 713, the time input vector obtained by the time input vector generating subunit 714, and the location input vector obtained by the location input vector generating subunit 715 are converted into the same length and concatenated into an input matrix in vector dimension; a feature map generating subunit 717 is used to obtain a feature map by passing the input matrix obtained by the input matrix generating subunit 716 through a deep convolutional neural network; a matrix multiplication subunit 718 is used to obtain a feature map by using the business request semantic vector obtained by the semantic vector generating subunit 712, the user portrait feature vector obtained by the user portrait feature vector generating subunit 713 The feature vector, the time input vector obtained by the time input vector generating subunit 714 and the place input vector obtained by the place input vector generating subunit 715 are used as query vectors to perform matrix multiplication with the feature map obtained by the feature map generating subunit 717 to obtain a business request feature vector, a user feature vector, a time feature vector and a place feature vector; and a classification subunit 719, which is used to concatenate the business request feature vector, the user feature vector, the time feature vector and the place feature vector obtained by the matrix multiplication subunit 718 and input them into a multi-label classifier to obtain the multi-label category information.
[0073] In one example, in the above-mentioned dynamic deployment system 700, the initial time vector generation unit 730 is further used to: arrange the request time information corresponding to the business request in the form of "year, month, day, hour, minute, second" and input it into the encoder to obtain the initial time vector.
[0074] In one example, in the above-mentioned dynamic deployment system 700, as Fig. 9 As shown, the input time vector generating unit 740 includes: a time reference point acquiring subunit 741, used to acquire a predetermined time reference point of a cloud computing virtual cluster resource to be classified; a reference time vector generating subunit 742, used to map the predetermined time reference point acquired by the time reference point acquiring subunit 741 to a high-dimensional feature space using the hidden Markov model to obtain a reference time vector; and a first mapping subunit 743, used to map the initial time vector to a high-dimensional feature space using a hidden Markov model to obtain the time input vector based on the correspondence between the actual time distance between the predetermined time reference point acquired by the time reference point acquiring subunit 741 and the requested time information and the vector distance between the reference time vector acquired by the reference time vector generating subunit 742 and the initial time input vector.
[0075] In one example, in the above-mentioned dynamic deployment system 700, as Fig.10 As shown, the input location vector generating unit 750 includes: a spatial reference point acquiring subunit 751, used to acquire a predetermined spatial reference point of a cloud computing virtual cluster resource to be classified; a reference space vector generating subunit 752, used to map the predetermined spatial reference point acquired by the spatial reference point acquiring subunit to a high-dimensional feature space using the hidden Markov model to obtain a reference space vector; and a second mapping subunit 753, used to map the requested location information corresponding to the business request to a high-dimensional feature space using a hidden Markov model to obtain the location input vector based on the correspondence between the actual physical distance between the predetermined spatial reference point acquired by the spatial reference point acquiring subunit 751 and the requested location information and the vector distance between the reference space vector acquired by the reference space vector generating subunit 752 and the initial location input vector.
[0076] Here, those skilled in the art will appreciate that the specific functions and operations of the various units and modules in the above-mentioned dynamic deployment system 700 have been described in detail above. Figures 1 to 6 The description of the dynamic deployment method of microservices based on cloud computing has been introduced in detail, and therefore, its repeated description will be omitted.
[0077] As described above, the dynamic deployment system 700 according to the embodiment of the present application can be implemented in various terminal devices, such as a server for dynamic deployment of microservices. In one example, the dynamic deployment system 700 according to the embodiment of the present application can be integrated into the terminal device as a software module and / or a hardware module. For example, the dynamic deployment system 700 can be a software module in the operating system of the terminal device, or can be an application developed for the terminal device; of course, the dynamic deployment system 700 can also be one of the many hardware modules of the terminal device.
[0078] Alternatively, in another example, the dynamic deployment system 700 and the terminal device may also be separate devices, and the dynamic deployment system 700 may be connected to the terminal device via a wired and / or wireless network, and transmit the interaction information in a predetermined data format.
[0079] Exemplary Electronic Devices
[0080] Below, reference Fig.11 To describe the electronic device according to the embodiment of the present application. Fig.11 As shown, the electronic device 10 includes one or more processors 11 and a memory 12. The processor 11 may be a central processing unit (CPU) or other processing units having data processing capability and / or instruction execution capability, and may control other components in the electronic device 10 to perform desired functions.
[0081] The memory 12 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may run the program instructions to implement the functions of the microservice dynamic deployment method based on cloud computing of the various embodiments of the present application described above and / or other desired functions. Various contents such as input location vectors, encoded feature vectors, etc. may also be stored in the computer-readable storage medium.
[0082] In one example, the electronic device 10 may further include: an input system 13 and an output system 14, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0083] The input system 13 may include, for example, a keyboard, a mouse, and the like.
[0084] The output system 14 can output various information to the outside, including decoding results, etc. The output system 14 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0085] Of course, to simplify, Fig.11 Only some of the components related to the present application in the electronic device 10 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 10 may also include any other appropriate components.
Claims
1. A method for dynamic deployment of microservices based on cloud computing, characterized in that: include: Acquire multi-label category information to which a service request initiated by a user belongs, where the multi-label category information is used to indicate multiple service types to which the service request initiated by the user belongs; Performing one-hot encoding on each category label in the multi-label category information, and concatenating the one-hot encodings corresponding to the multiple category labels to obtain an input category vector; Arranging the request time information corresponding to the service request in a specific order and inputting it into an encoder to obtain an initial time vector; Mapping the initial time vector into a high-dimensional feature space using a hidden Markov model to obtain an input time vector; Mapping the request location information corresponding to the service request into a high-dimensional feature space using the hidden Markov model to obtain an input location vector; splicing the input category vector, the input time vector and the input location vector in the length direction of the vector into a comprehensive vector; Performing multiple one-dimensional convolution processes on the comprehensive vector to obtain a coding feature vector; Inputting the encoded feature vector into an encoder-decoder implemented by a deep neural network including a plurality of fully connected layers to obtain a decoding result, wherein the decoding result is used to represent an identification number of a cloud computing virtual cluster resource to be classified; The multi-label category information to which the service request initiated by the user belongs is obtained, including: Acquire service request data initiated by a user and context information corresponding to the service request data, wherein the context information includes user portrait data of the user, information on the time of initiating the service request, and information on the location of initiating the service request; Inputting the business request data into a semantic understanding model to obtain a business request semantic vector; Inputting the user portrait data into a classifier for user classification to obtain a user portrait feature vector; Arranging the time-related data in the request time information in a specific order and inputting the data into an encoder to obtain a time input vector; Mapping the requested location information into a high-dimensional feature space using a hidden Markov model to obtain a location input vector; Convert the business request semantic vector, the user portrait feature vector, the time input vector, and the location input vector to the same length and splice them into an input matrix in vector dimension; Passing the input matrix through a deep convolutional neural network to obtain a feature map; Taking the service request semantic vector, the user portrait feature vector, the time input vector and the location input vector as query vectors and performing matrix multiplication with the feature graph respectively, so as to obtain a service request feature vector, a user feature vector, a time feature vector and a location feature vector; and The service request feature vector, the user feature vector, the time feature vector and the location feature vector are concatenated and input into a multi-label classifier to obtain the multi-label category information.
2. The method for dynamic deployment of microservices based on cloud computing according to claim 1, wherein: The multi-label category information is obtained by manual annotation.
3. The method for dynamic deployment of microservices based on cloud computing according to claim 1, wherein: Arranging the request time information corresponding to the service request in a specific order and inputting it into the encoder to obtain an initial time vector, including: The request time information corresponding to the service request is arranged in the form of "year, month, day, hour, minute, second" and then input into the encoder to obtain an initial time vector.
4. The method for dynamic deployment of microservices based on cloud computing according to claim 3, wherein: Mapping the initial time vector into a high-dimensional feature space using a hidden Markov model to obtain an input time vector includes: Obtaining a predetermined time reference point of a cloud computing virtual cluster resource to be classified; Mapping the predetermined time reference point into a high-dimensional feature space using the hidden Markov model to obtain a reference time vector; and Based on the correspondence between the actual time distance between the predetermined time reference point and the requested time information and the vector distance between the reference time vector and the initial time vector, the initial time vector is mapped into a high-dimensional feature space using a hidden Markov model to obtain the time input vector.
5. The method for dynamic deployment of microservices based on cloud computing according to claim 1, wherein: Mapping the request location information corresponding to the service request to a high-dimensional feature space using the hidden Markov model to obtain an input location vector includes: Obtaining a predetermined spatial reference point of a cloud computing virtual cluster resource to be classified; Mapping the predetermined spatial reference point into a high-dimensional feature space using the hidden Markov model to obtain a reference spatial vector; and Based on the correspondence between the actual physical distance between the predetermined spatial reference point and the requested location information and the vector distance between the reference space vector and the initial location vector, the requested location information corresponding to the business request is mapped into a high-dimensional feature space using a hidden Markov model to obtain the location input vector.
6. A microservice dynamic deployment system based on cloud computing, characterized in that: include: An information acquisition unit, used to acquire multi-label category information to which a service request initiated by a user belongs, wherein the multi-label category information is used to indicate multiple service types to which the service request initiated by the user belongs; An input category vector generating unit, configured to perform one-hot encoding on each category label in the multi-label category information obtained by the information acquiring unit, and to concatenate the one-hot encodings corresponding to the multiple category labels to obtain an input category vector; An initial time vector generating unit, configured to arrange the request time information corresponding to the service request in a specific order and input the order into an encoder to obtain an initial time vector; An input time vector generating unit is used to map the initial time vector obtained by the initial time vector generating unit into a high-dimensional feature space by using a hidden Markov model to obtain an input time vector; An input location vector generating unit, used to map the request location information corresponding to the service request into a high-dimensional feature space using the hidden Markov model to obtain an input location vector; a comprehensive vector generating unit, configured to splice the input category vector obtained by the input category vector generating unit, the input time vector obtained by the input time vector generating unit, and the input location vector obtained by the input location vector generating unit into a comprehensive vector in a length direction of the vector; A coding feature vector generating unit, configured to perform multiple one-dimensional convolution processes on the comprehensive vector obtained by the comprehensive vector generating unit to obtain a coding feature vector; A decoding result generating unit, configured to input the encoding feature vector obtained by the encoding feature vector generating unit into an encoder-decoder implemented by a deep neural network including a plurality of fully connected layers, so as to obtain a decoding result, wherein the decoding result is used to represent an identification number of a cloud computing virtual cluster resource to be classified; The multi-label category information to which the service request initiated by the user belongs is obtained, including: Acquire service request data initiated by a user and context information corresponding to the service request data, wherein the context information includes user portrait data of the user, information on the time of initiating the service request, and information on the location of initiating the service request; Inputting the business request data into a semantic understanding model to obtain a business request semantic vector; Inputting the user portrait data into a classifier for user classification to obtain a user portrait feature vector; Arranging the time-related data in the request time information in a specific order and inputting the data into an encoder to obtain a time input vector; Mapping the requested location information into a high-dimensional feature space using a hidden Markov model to obtain a location input vector; Convert the business request semantic vector, the user portrait feature vector, the time input vector, and the location input vector to the same length and splice them into an input matrix in vector dimension; Passing the input matrix through a deep convolutional neural network to obtain a feature map; Taking the service request semantic vector, the user portrait feature vector, the time input vector and the location input vector as query vectors and performing matrix multiplication with the feature graph respectively, so as to obtain a service request feature vector, a user feature vector, a time feature vector and a location feature vector; and The service request feature vector, the user feature vector, the time feature vector and the location feature vector are concatenated and input into a multi-label classifier to obtain the multi-label category information.
7. The cloud computing-based microservice dynamic deployment system according to claim 6, wherein: The input time vector generating unit comprises: A time reference point acquisition subunit, used to acquire a predetermined time reference point of a cloud computing virtual cluster resource to be classified; a reference time vector generating subunit, configured to map the predetermined time reference point obtained by the time reference point obtaining subunit into a high-dimensional feature space using the hidden Markov model to obtain a reference time vector; and A first mapping subunit is used to map the initial time vector into a high-dimensional feature space using a hidden Markov model to obtain the time input vector based on the correspondence between the actual time distance between the predetermined time reference point obtained by the time reference point acquisition subunit and the requested time information and the vector distance between the reference time vector obtained by the reference time vector generation subunit and the initial time vector to obtain the time input vector.
8. The cloud computing-based microservice dynamic deployment system according to claim 6, wherein: The input location vector generating unit comprises: A spatial reference point acquisition subunit, used to acquire a predetermined spatial reference point of a cloud computing virtual cluster resource to be classified; a reference space vector generating subunit, configured to map the predetermined space reference point obtained by the space reference point obtaining subunit into a high-dimensional feature space using the hidden Markov model to obtain a reference space vector; and A second mapping subunit is used to map the requested location information corresponding to the business request into a high-dimensional feature space using a hidden Markov model based on the correspondence between the actual physical distance between the predetermined spatial reference point obtained by the spatial reference point acquisition subunit and the requested location information and the vector distance between the reference space vector obtained by the reference space vector generation subunit and the initial location vector to obtain the location input vector.
9. An electronic device, comprising: processor; as well as A memory, in which computer program instructions are stored, and when the computer program instructions are executed by the processor, the processor executes the method for dynamic deployment of microservices based on cloud computing as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Cloud management platform based on micro-service architecture
CN105162884A
Detection of mission change in conversation
CN110692048A