Cloud service adaptive combination method based on decision transformer and decision support system
By adopting a cloud service adaptive composition method based on Decision Transformer, the problems of multi-source service data integration and cross-environment policy generalization are solved, and efficient, stable and intelligent decision support for cloud service composition is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies struggle to effectively integrate multi-source service data, model complex dependencies between services, and generalize cross-environment strategies, resulting in insufficient efficiency and stability in the intelligent management of cloud services.
We adopt a cloud service adaptive composition method based on Decision Transformer. Through hierarchical tokenization and service representation, multi-scale interactive feature extraction and semantic enhancement mechanism, we generate cloud service adaptive composition strategy. Combined with compatibility weighting and multi-objective optimization, we construct an adaptive composition optimization and backtracking adjustment mechanism to realize the self-learning and self-repair capabilities of the strategy.
It significantly improves the ability to discriminate cloud service descriptions and the clarity of their semantics, ensuring that strategies conform to actual operational constraints, maintaining efficiency, stability and robustness in dynamic environments, and providing intelligent and automated cloud service combination decision support.
Smart Images

Figure CN121433916B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of cloud computing and cloud service management, and particularly relates to a cloud service adaptive combination method based on a Decision Transformer and a decision support system. BACKGROUND
[0002] With the continuous evolution of cloud computing technology and the increasing popularity of service-oriented architecture, cloud service adaptive combination for complex business scenarios has become a key research direction to support enterprise application agility and resource optimization efficiency. In recent years, the integration of cloud native technology and artificial intelligence methods has injected new vitality into this field, and in particular, sequence decision models based on deep learning have shown significant potential in complex system control.
[0003] A Chinese invention patent with publication number CN117933483A discloses an industrial cloud service combination optimization method considering energy consumption and service flexibility, which includes: constructing an industrial cloud service combination evaluation index system containing service quality, energy consumption and service combination flexibility; determining service providers according to the manufacturing tasks of service demand parties; quantifying the service capabilities of each service provider through the industrial cloud service combination evaluation index system; constructing a corresponding industrial cloud service optimization selection model according to the service capabilities of all service providers; solving the industrial cloud service optimization selection model to obtain the optimal industrial cloud service path through the fusion algorithm of adaptive grid multi-objective particle swarm and clone selection; and executing the manufacturing tasks of the service demand parties through the optimal industrial cloud service path.
[0004] At the same time, the research in the cross fields of service computing, resource scheduling and intelligent decision-making in the academic and industrial circles is deepening, and the focus is gradually shifted from static service orchestration to dynamic and context-aware adaptive combination methods. Under this background, how to effectively integrate multi-source service data, model complex dependency relationships between services, and realize cross-environment strategy generalization has become a key issue to promote the intelligent management of cloud services, and also constitutes an important basis for the research work. SUMMARY
[0005] The application aims to solve the problems in the background art and proposes a cloud service adaptive combination method based on a Decision Transformer and a decision support system.
[0006] The technical solution of the application is a cloud service adaptive combination method based on a Decision Transformer, which includes the following specific implementation steps:
[0007] S1, unified structured representation of heterogeneous service data is constructed by hierarchical tokenization and service representation construction, functional, interface, resource and quality information are extracted from multi-source data, normalized, bucket quantized, embedded mapped and compatibility matrix generated to form hierarchical service vector representation;
[0008] S2, multi-scale interaction feature extraction and semantic enhancement mechanism is constructed, semantic and behavioral dependencies between cloud services are captured at different granularities by constructing multi-scale interaction graph, intra-scale diffusion and cross-scale attention coupling, semantic prototype contrast enhancement and uncertainty perception fusion, enhanced service representation is generated and compatibility matrix is refined;
[0009] S3, based on enhanced service representation and compatibility matrix, conditional sequence input is constructed, Decision Transformer is inputted by state-action-target joint embedding, cloud service adaptive combination strategy sequence is generated, and strategy executable and meeting multi-objective optimization is generated by combining compatibility weighting and multi-objective evaluation;
[0010] S4, adaptive combination optimization and backtracking adjustment mechanism is constructed, based on decision candidate sequence, execution feedback and environmental changes of service combination are dynamically evaluated, through target-oriented adaptive optimization, multi-round strategy backtracking adjustment and stability judgment, cloud service combination scheme with self-learning and self-repairing ability is formed;
[0011] S5, through multi-instance feature representation alignment, strategy migration based on similarity, generalization training fine-tuning and online adaptive optimization, Decision Transformer completes strategy knowledge reuse and generalization ability in different cloud instances and multi-business scenarios.
[0012] Preferably, step S1 specifically comprises:
[0013] Service registration, monitoring and log data are collected, functional, interface, resource key fields are extracted, numerical parameters are hierarchically normalized and sliding window statistics are calculated, stable mean and variance baselines are calculated;
[0014] The normalized results are converted into hierarchical token sequences covering function, interface, resource and compatibility dimensions, adaptive quantization of continuous values is performed by quantile, and a trace-time scalar is attached to each token to express data credibility and timeliness;
[0015] Discrete tokens are mapped into embedding vectors, scaled with trace scalars, and double hierarchical position encoding is used to distinguish intra-layer order and inter-layer depth relationship, while constraint saliency scalar is introduced to highlight key resources and SLA constraint information;
[0016] The service token embedding is weighted-pooled to generate a service vector, a compatibility matrix is constructed by fusing semantic similarity, historical coexistence rate and rule score, and an online token library maintenance and cold start completion mechanism is set.
[0017] Preferably, the hierarchical normalization adopts segmented exponential sliding window and quantile scaling to map the numerical value to a stable numerical token.
[0018] The hierarchical token sequence specifically includes a function layer, an interface layer, a resource layer, a quality layer, a compatibility layer and a traceability layer.
[0019] Preferably, step S2 specifically includes:
[0020] By multi-dimensional modeling of the service vector and the compatibility relationship, a multi-scale interaction graph is constructed to describe the service level, interface level and resource level association characteristics, and the semantic similarity, historical coexistence and rule factor weighted graph structure are introduced at each scale.
[0021] On each scale graph, local to medium range interaction features are extracted by using limited order diffusion convolution, and different granularity features are coupled and complementary through cross-scale cross-attention.
[0022] On the basis of multi-scale interaction features, a semantic prototype contrast enhancement mechanism is introduced to dynamically maintain service class prototypes and improve intra-class consistency and inter-class separability through traceability weighted contrast learning.
[0023] Based on the uncertainty estimation of multi-scale features, a gating fusion mechanism is designed to adaptively adjust the feature weight through scale confidence and neighborhood variance, generate an enhanced service representation and refine the compatibility score.
[0024] Preferably, the construction of the multi-scale interaction graph includes defining a scale set, calculating the original similarity weight matrix weighted by semantic similarity, historical coexistence rate and rule score for each scale, and performing row normalization to obtain the adjacency matrix.
[0025] The limited order diffusion convolution is realized by Chebyshev approximation.
[0026] Preferably, step S3 specifically includes:
[0027] The multi-scale enhanced service representation and the compatibility score are converted into a sequence form that can be processed by the Decision Transformer, and a combined target vector is introduced as a conditional input.
[0028] The selected service sequence is mapped to a state vector, the candidate service is mapped to an action vector, and the target vector is projected and embedded to generate a state-action-target joint embedding.
[0029] The Decision Transformer is used to perform forward calculation on the embedded sequence to generate the action probability distribution of the next service selection, and the compatibility matrix is combined to correct the weight;
[0030] A final cloud service combination sequence is generated according to the corrected strategy probability, and a comprehensive evaluation is performed through a multi-objective function to form a combination return value.
[0031] Preferably, step S4 specifically comprises:
[0032] A quantifiable feedback signal is constructed through real-time performance difference modeling, and a feedback update mechanism with a smoothing coefficient is introduced;
[0033] An adaptive weight dynamic update mechanism based on the feedback signal dynamically corrects the weights of each target in the service combination by calculating the gradient offset between the current combination and the optimal performance;
[0034] A backtracking strategy update mechanism is introduced, which records the historical optimal sequence, performance feedback and environment state, compares the multiple combination results through weighted comparison, uses the strategy deviation for gradient correction and update, and maintains an experience memory pool;
[0035] A stability and feasibility verification mechanism is constructed to dynamically verify the optimized service combination, and whether the model retraining is triggered is determined by calculating the performance fluctuation standard deviation.
[0036] Preferably, step S5 specifically comprises:
[0037] The service sequence, state and target vector of each instance are embedded and normalized to realize the unified representation of the characteristics of heterogeneous instances;
[0038] A weight matrix is constructed based on the similarity matrix between instances, and the strategy parameters of the source instance with a similarity higher than a set threshold are weighted and migrated to the target instance;
[0039] A joint loss function is constructed based on the experience of the source instance and a small amount of data of the target instance to perform strategy generalization training, and the Decision Transformer parameters are fine-tuned through gradient update;
[0040] The performance deviation is monitored in real time during the actual operation of the target instance and online parameter fine-tuning is performed, and the long-term stability of the generalization strategy is ensured through a closed-loop adaptive mechanism.
[0041] Preferably, the similarity matrix between instances is obtained by calculating the cosine similarity of the normalized instance embedding vectors and multiplying the similarity decay coefficient;
[0042] The joint loss function is composed of the weighted source instance task loss and target instance actual execution loss.
[0043] The technical scheme of the present application: a cloud service adaptive combination decision support system based on Decision Transformer, which is used to execute the above-mentioned cloud service adaptive combination method based on Decision Transformer, comprising:
[0044] A hierarchical tokenization and service representation construction module is used to uniformly encode and embed the multi-dimensional state information, action sequence and business target of the cloud service.
[0045] A multi-scale interaction feature extraction and semantic enhancement module is used to capture the dependency relationship and potential interaction mode between different services and different instances through a multi-scale attention mechanism and an interaction feature extraction network, and generate a multi-scale feature vector with rich semantics.
[0046] A decision generation and strategy generalization module is used to generate a service combination decision sequence based on the multi-scale feature vector using the Decision Transformer core strategy network, and to achieve strategy generalization through cross-instance knowledge transfer and joint training.
[0047] An adaptive combination optimization and backtracking adjustment module is used to adaptively optimize the preliminary strategy and evaluate the actual performance of the strategy under different instance and load conditions through a backtracking adjustment mechanism to correct the combination scheme.
[0048] A multi-instance knowledge transfer and online strategy generalization module is used to perform multi-instance knowledge transfer and strategy generalization, allowing the strategy to be reused across different cloud instances and business scenarios, and dynamically adjusting the strategy parameters through online performance feedback.
[0049] Compared with the prior art, the above technical scheme of the present application has the following beneficial technical effects:
[0050] The application designs a cloud service adaptive combination method and a decision support system based on Decision Transformer, which unifies heterogeneous multi-source service data into structured and learnable vector representation through hierarchical tokenization and service representation construction, effectively solving the feature alignment and compatibility judgment problems caused by large differences in cloud service description and multiple information dimensions; further, with the help of multi-scale interactive feature extraction and semantic enhancement mechanism, the system can deeply mine the complex dependency relationship between services at multiple granularities such as service level, interface level and resource level, significantly improving the discrimination ability and semantic clarity of service representation; on this basis, the Decision Transformer model is used to generate service combination strategies in a sequence decision manner, and the compatibility constraint weighting and multi-objective optimization evaluation are used to ensure that the output strategy not only meets the actual operation constraints, but also can comprehensively trade off multiple objectives such as cost, performance and reliability; and the combination strategy can be dynamically corrected according to real-time operation feedback, and with the help of multi-instance knowledge transfer and online generalization mechanism, the learned strategy can be quickly adapted to new cloud environment or business scenario, so as to continuously maintain the efficiency, stability and robustness of service combination in dynamic and variable cloud environment with different loads, and finally provide intelligent, automated and long-term self-evolution cloud service combination decision support for users. BRIEF DESCRIPTION OF DRAWINGS
[0051] Figure 1 A flowchart of a cloud service adaptive combination method based on Decision Transformer is provided for the application.
[0052] Figure 2 A system architecture diagram of a cloud service adaptive combination decision support system based on Decision Transformer is provided for the application. DETAILED DESCRIPTION
[0053] Embodiment one, as shown in the figure, the application provides a cloud service adaptive combination method based on Decision Transformer, which includes the following specific implementation steps: Figure 1
[0054] S1, through hierarchical tokenization and service representation construction, the unified structured expression of heterogeneous service data is extracted from multi-source data, and the function, interface, resource and quality information is extracted, and the normalized, bucket quantization, embedding mapping and compatibility matrix generation are performed to form a hierarchical service vector representation that can be directly used by the model, and the specific implementation process is as follows:
[0055] S11, collect service registration, monitoring and log data, extract key fields such as functions, interfaces, resources, etc., perform hierarchical normalization and sliding window statistics on numerical parameters, calculate stable mean and variance baselines, provide standardized input for subsequent tokenization, perform unified structured cleaning and dynamic smoothing processing on multi-source data, specifically:
[0056] Collect from three types of data sources:
[0057] Data source 1, registry / description document: function identifier F i , interface signature set I i , image tag M i ;
[0058] Data source 2, monitoring time series stream:
[0059] Resource usage snapshot ;
[0060] Fault event stream;
[0061] Data source 3, orchestration log and observation: historical QoS (Quality of Service) statistics q i (t), including but not limited to instantiation times, average delay, error rate;
[0062] Wherein, r i (t) represents the resource usage vector of service i at time t, including: CPU usage cpu i (t), memory usage mem i (t), bandwidth usage bw i (t);
[0063] And perform hierarchical normalization on numerical quantities, use piecewise exponential sliding window and quantile scaling to map numerical values to stabilized values token:
[0064] ;
[0065] ;
[0066] Wherein, represents the sliding mean of a numerical feature (CPU, delay, etc.) of service i at time t; represents the sliding variance of a numerical feature of service i at time t; represents the exponential sliding coefficient, controlling the weight of historical and current data; x i (t) represents the original observation value (CPU, delay, etc.) of service i at time t; represents the sliding mean of a numerical feature of service i at time t-1; a sliding variance of a certain numerical feature of service i at time t-1;
[0067] S12, the normalized result is converted into a hierarchical token sequence, covering the dimensions of function, interface, resource and compatibility, the continuous value is quantified by quantile adaptive bucketing, and a provenance-time scalar is introduced to express the data credibility and timeliness, so that the token sequence has the ability of learning, explanation and dynamic adjustment in heterogeneous scenarios, specifically:
[0068] On the basis of normalization, the multi-source data of the service is mapped into a structured token sequence, and a multi-level token structure is constructed: function layer, interface layer, resource layer, quality layer, compatibility layer and provenance layer. Each layer of data is discretized into a symbolic token b by a quantile adaptive bucketing function ;
[0069] At the same time, in order to reflect the freshness and reliable source of data, a provenance-time scalar (representing the credibility and freshness of the information) is added to each token: ;
[0070] , wherein represents a set of numerical quantile points, for example ; represents a quantile adaptive bucketing function that maps a numerical value x to a discrete bucket token; s meta represents a provenance-time scalar representing the credibility and freshness of the token information; trust represents the credibility score of the data source, which is set according to the data source type, for example, registry high = 0.9, simulation low = 0.5; represents the difference between the data time and the current time; α represents the weight of balancing provenance and timeliness; represents an adjustment coefficient that controls the timeliness decay rate;
[0071] S13, map the discrete token to an embedding vector, scale it with the provenance scalar, and use double-level position encoding to distinguish intra-layer order and inter-layer depth relationship; At the same time, introduce a constraint saliency scalar to highlight key resources and SLA (Service Level Agreement) constraint information, and enhance the model's ability to recognize key dependencies and constraint semantics, that is:
[0072] For each discrete token t, use a lookup table to get vector E t , use a double position encoding mechanism to encode the intra-layer position encoding P in and the hierarchical depth encoding P depth , and finally embed it as:
[0073] ;
[0074] injecting constraint saliency scalar, computing constraint saliency s of certain service c (for amplifying resource / compatibility token in subsequent attention):
[0075] ;
[0076] Accordingly, all token embeddings are arranged in order to form a matrix V as the input of Transformer;
[0077] wherein, E t represents the vector embedding corresponding to discrete token t; v t represents the final token vector, containing embedding, trace scaling, intra-layer position and hierarchical position encoding; β represents the scaling coefficient of trace scalar on embedding; P in (pos) represents the intra-layer position encoding vector; P depth (depth) represents the hierarchical depth position encoding vector; s c represents the constraint saliency scalar, measuring SLA urgency and QoS fluctuation; and represent weight coefficients, controlling the contribution of SLA urgency and historical fluctuation to saliency; represents the SLA urgency metric; var(q i ) represents the variance of historical QoS indicators;
[0078] S14, weighted pooling of service token embedding to generate service vector, constructing compatibility matrix by fusing semantic similarity, historical coexistence rate and rule score, and setting online token library maintenance and cold start completion mechanism to complete dynamic update of service representation and availability guarantee of new service, namely:
[0079] After completing the embedding, all token vectors under the same service are weighted and aggregated to obtain the comprehensive representation vector of service i:
[0080] ;
[0081] ;
[0082] ;
[0083] Subsequently, to support compatibility judgment and combination generation between services, a hybrid score matrix C is constructed:
[0084] ;
[0085] wherein, s ifinal vector representation (pooled token embeddings) of service i; token set of service i; w t token weight determined by provenance and constraint saliency; Z denotes weight normalization factor, ; γ1 denotes provenance saliency weight coefficient; γ2 denotes constraint saliency weight coefficient; constraint indicator function; C ij compatibility score (probability) of service i and service j; sim(s i ,s j ) denotes semantic similarity of service vectors; historical coexistence success rate; rule ij explicit rule compatibility score; and fusion weight, controlling the contribution of semantics, historical experience and rules in compatibility score;
[0086] It should be noted that the embodiment sets a token library online maintenance mechanism, maintains a timestamp and version number for each token, triggers weight adjustment or token replacement when the provenance-time indicator s meta is lower than the threshold or the version is updated; and when a new service is registered, the existing service is copied with the initial vector by K-nearest neighbor and is labeled with a low trust label (low s meta ), so as to ensure that the initial generation is not blank.
[0087] S2, a multi-scale interaction feature extraction and semantic enhancement mechanism is constructed, which captures the semantic and behavioral dependencies between cloud services at different granularities by constructing a multi-scale interaction graph, coupling scale-in diffusion and cross-scale attention, enhancing semantic prototype comparison, and fusing uncertainty perception, and strengthens the discriminability and stability of service representation, and the specific implementation process is as follows:
[0088] S21, by multi-dimensional modeling of service vectors and compatibility relations, a multi-scale interaction graph is constructed to describe service-level, interface-level and resource-level association features, and a graph structure weighted by semantic similarity, historical coexistence and rule factors is introduced at each scale to finely describe the complex interaction relationship between cloud services, specifically:
[0089] Set the scale set as {1,…,l,…,L}, for each scale l, define the original similarity weight matrix:
[0090] ;
[0091] Where L denotes the number of scales, used to define different granularities of service interaction (such as service level, interface level, and resource level); s ivector representation of service i; α (l) , β (l) , and ρ (l) represent the fusion weights of the three types of information (semantics, historical experience, rules) at scale l; represents the temperature coefficient at scale l, used to control the sharpness of the weight distribution; represents the original similarity weight matrix at scale l;
[0092] Subsequently, row normalization is performed to obtain the adjacency matrix (random walk normalization):
[0093] ; ;
[0094] wherein, represents the degree value of service node i at scale l, i.e., the sum of the connection strength of this node with all other nodes at this scale; N represents the total number of service nodes modeled in the system (i.e., the number of cloud services); A (l) represents the row-normalized adjacency matrix, used for graph diffusion; D (l) represents the degree matrix; represents the original adjacency weight matrix at scale l;
[0095] S22, local to medium-range interaction features are extracted on each scale graph using a finite-order diffusion convolution, and coupling and complementation of different granularity features are realized through cross-scale cross-attention, both preserving physical compatibility and fusing semantic layer dependence, forming multi-level expression capability of interaction features, specifically:
[0096] For each scale, a Chebyshev approximation is used to do a finite-order filter:
[0097] ;
[0098] wherein, K (l) represents the order of graph convolution / diffusion steps at scale l; represents the Chebyshev filter coefficient; represents the Chebyshev polynomial function acting on the approximate Laplacian matrix; represents the approximate graph Laplacian matrix at scale l; S represents all service vector matrices ; F (l) represents the feature representation after coupling at scale l;
[0099] For scale p and scale q( ), cross-attention is calculated to capture cross-scale interaction:
[0100] ;
[0101] wherein, , and denotes the linear projection matrix of cross-scale attention; d denotes the attention scaling factor (set to the projection dimension in this embodiment);
[0102] Accordingly, the self-features of each scale are combined in residual with the attention outputs from other scales to generate scale-coupled features ;
[0103] S23, a semantic prototype contrast enhancement mechanism is introduced on the basis of multi-scale interactive features, a service class prototype is dynamically maintained, and a trace weighted contrast learning is used to improve the intra-class consistency and inter-class separability, to suppress the interference of low confidence samples, and to complete stable semantic clustering structure in the feature space, specifically:
[0104] For each semantic class , a prototype vector p c is maintained, which is periodically updated by a momentum update strategy:
[0105] ;
[0106] wherein p c denotes the prototype vector of the semantic class c; m denotes the momentum coefficient for updating the prototype; denotes the projection head that maps the feature to the contrast space; Index c denotes the instance index set belonging to class c in the current batch; denotes the coupled enhanced feature of scale l service i, which is output by step S22;
[0107] The similarity between each instance i (whose feature ) in the batch and its positive prototype is calculated, and compared with all other prototypes:
[0108] ;
[0109] wherein L proto denotes the prototype contrast loss, which measures the consistency of the sample feature with its class prototype, while pulling apart the distance between different classes; denotes the total number of all samples in the current batch; zf i denotes the feature representation of sample i; denotes the prototype vector of the class y i to which the sample i belongs; denotes the temperature coefficient for scaling the similarity, controlling the smoothness of softmax; denotes all prototype vectors, used as negative samples in contrast learning, and the momentum updated whole prototype set;
[0110] It should be noted that when the trace-aging scalar of the sample i is lower than the set threshold, the weight of the prototype update or loss is reduced;
[0111] S24, the uncertainty estimation design gate fusion mechanism based on multi-scale features, the feature weight is adjusted adaptively through the scale confidence and the neighborhood variance, the enhanced service representation is generated and the compatibility score is refined, so as to realize robust semantic fusion and dynamic compatibility optimization at the feature layer, specifically:
[0112] Calculate the uncertainty scalar for each scale l :
[0113] ;
[0114] Wherein, represents the uncertainty scalar of service i at scale l; represents the neighborhood feature set of service i at scale l; represents the compatibility confidence weight, which is set according to experience in this embodiment; represents the neighborhood feature variance of service i at scale l; represents a nonlinear activation function, which maps the bias to a positive number interval to avoid negative uncertainty;
[0115] Calculate the scale gate value for each service i and fuse:
[0116] ;
[0117] ;
[0118] Wherein, represents the gate weight (0~1) of scale l; represents the gate linear mapping matrix; represents the scale aggregation function (mean / max / attention pooling), the details can be selected according to the scale and channel; and represent the linear transformation parameters of the gate network, which need to be learned; represents the splicing operation; represents the enhanced service representation after fusion, which is output to the Decision Transformer; W (l) represents the scale mapping matrix, which transforms the scale feature to a unified fusion space;
[0119] Update the compatibility score with the enhanced representation : ;
[0120] Wherein, W b , b crespectively represent the bilinear projection parameters and bias of the compatibility score, learned from the training data; represent the updated compatibility score.
[0121] S3, based on the enhanced service representation and compatibility matrix output in step S2, construct the conditional sequence input, input the state-action-goal joint embedding into the Decision Transformer, generate the cloud service adaptive combination strategy sequence, and combine the compatibility weighting and multi-objective evaluation to generate a strategy that is executable and meets the multi-objective optimization, the specific implementation process is as follows:
[0122] S31, convert the multi-scale enhanced service representation and the compatibility score into a sequence form that can be processed by the Decision Transformer (DT), and introduce a combination goal vector g as a conditional input, so that the strategy generated by the DT considers the historical state, optional action and target preference, specifically:
[0123] Build a service sequence: ;
[0124] Build a goal vector: ;
[0125] Where S represents the service sequence set, which is the input sequence formed by the preliminary sorting of candidate services, and is the main input object of the Decision Transformer; N represents the number of candidate services, the number of candidate services participating in combination in the cloud service library; is the input sequence formed by the preliminary sorting, and its arrangement order in the sequence is sorted according to the compatibility score ; g represents the goal vector, representing the multi-objective requirements of the current combination task, including but not limited to cost, performance, and energy consumption; g m represents the mth target component, i.e., the quantitative index value of the specific target; M represents the number of targets, i.e., the number of optimization targets defined by the system;
[0126] S32, map the selected service sequence to a state vector, map the candidate service to an action vector, and project and embed the goal vector to generate a state-action-goal joint embedding, specifically:
[0127] Define the state vector: ;
[0128] Define the action vector: ;
[0129] Perform state-action-goal joint embedding: ;
[0130] Where s tdenotes the state vector, representing the overall feature state of the selected service sequence at time step t; denotes the overall feature state of the selected service sequence at time step t, and the embodiment adopts a trainable nonlinear mapping, i.e., MLP, to embed the set of selected services into a fixed-dimensional state representation space;a t denotes the action vector, representing the embedding feature of the candidate service i t+1 at the current moment, used to describe the executable action in the next step; denotes the action encoding function, i.e., mapping the candidate service feature vector into a one-dimensional representation in the action embedding space, used to capture the potential attributes of the selectable action;e t denotes the joint embedding vector; W g denotes the target mapping matrix, a trainable parameter matrix that projects the target vector g into a space with the same dimension as the state and action embedding, achieving feature space alignment;
[0131] S33, forward calculation of the embedding sequence using Decision Transformer to generate the action probability distribution of the next step service selection, and combined with the compatibility matrix for weighted correction, so that the generated strategy meets the actual feasibility constraints, realizing executable strategy prediction under multi-objective conditions, specifically:
[0132] Perform Transformer forward calculation: ;
[0133] Complete strategy output (action probability distribution):
[0134] ;
[0135] Complete compatibility weighted correction: ; ;
[0136] wherein, denotes the Transformer model structure, and in the embodiment, the Decision Transformer model structure is adopted, with the input being the embedding sequence , and the global dependency relationship is calculated through multi-head attention;h t denotes the Transformer hidden state, representing the context information at time step t, which integrates historical state, action and target information, and is used to generate strategy output; W o and b o denote the output layer parameters, which are trainable linear mapping parameters; denotes the original strategy distribution; denotes the modified strategy distribution, which is modified based on the original strategy distribution by introducing compatibility constraint weights;ct represents the current compatibility vector; represents the policy function defined by the parameters at time t+1, characterizing the decision output of the Decision Transformer (DT) model after receiving the current state sequence and target embedding information, which is the decision output of the Decision Transformer (DT) model after receiving the current state sequence and target embedding information. t+1
[0137] S34, generate a final cloud service combination sequence according to the revised strategy probability, and perform comprehensive evaluation through a multi-objective function to form a combination return value, which can be used for strategy optimization feedback, and realize the overall goal of generating an executable, multi-objective optimized and closed-loop adaptive strategy, specifically:
[0138] perform action selection: ;
[0139] complete combination target evaluation: ;
[0140] where i t+1 represents the next selected service index, characterizing the specific service number selected by the strategy distribution at time step t+1; R represents the comprehensive return value, i.e. the comprehensive score of the final combination scheme on multiple objectives; represents the mth objective function, used to calculate the combination result function of a specific objective (such as performance or cost); represents the target weight, the importance weight of the mth objective in the total return calculation, which can be dynamically adjusted; step represents the combination length, characterizing the total number of service combinations.
[0141] S4, construct an adaptive combination optimization and backtracking adjustment mechanism, based on the decision candidate sequence output in step S3, dynamically evaluate the execution feedback and environmental changes of the service combination, and through target-oriented adaptive optimization, multiple rounds of strategy backtracking adjustment and stability judgment, form a cloud service combination scheme with self-learning and self-repairing ability, so as to ensure that the system continuously maintains the optimal state under dynamic load and multi-objective constraints, and the specific implementation process is as follows:
[0142] S41, construct a quantifiable feedback signal through real-time performance difference modeling, specifically:
[0143] After each round of service combination execution is completed, calculate the performance deviation according to the predicted utility output by the DT and the actual running result: ;
[0144] In order to prevent excessive reaction caused by single fluctuation, a feedback update mechanism with smoothing coefficient is introduced: ;
[0145] wherein R t represents the comprehensive score on multiple targets at the current time step t; represents the comprehensive performance prediction value at the previous time step t-1, output by the Decision Transformer value function head; represents the performance deviation; F t represents the feedback intensity at the current time t, which is the driving force for regulating adaptive weight updating and policy rollback; represents the feedback smoothing factor; F t-1 represents the feedback intensity at the previous time t-1;
[0146] S42, an adaptive weight dynamic updating mechanism based on the feedback signal, dynamically corrects the part with performance bottleneck or incompatibility in the service combination by calculating the gradient offset between the current combination and the optimal performance, so as to realize performance gain at the minimum cost, that is, under the action of the performance feedback F t , the target weight is automatically corrected according to the target sensitivity: , in order to maintain numerical stability and relative balance between targets, the weight is normalized;
[0147] wherein, represents the updated mthtarget weight; represents the weight of the mthtarget (such as cost, delay, reliability, etc.) at time step t; represents the sensitivity gradient of the current combination on the target g m ; represents the weight learning rate;
[0148] S43, a rollback policy updating mechanism is introduced, the historical optimal sequence, performance feedback and environment state are recorded, the multiple combination results are compared by weighting, and the historical experience is used to guide the fine tuning of model parameters, that is:
[0149] The policy deviation term is defined as: ;
[0150] Gradient correction and updating are performed using the policy deviation:
[0151] ;
[0152] wherein, represents the policy deviation, representing the difference between the actual performance and the model prediction value; represents the expected reward or performance prediction value output by the DT value function head, which comes from the value function network inside the Decision Transformer model structure, and is predicted according to the state s t and the current target g represents the policy learning rate; represents the action selection probability distribution, i.e., the DT in state s t selects the action a t according to the policy;
[0153] Meanwhile, an experience memory pool MP is maintained to store historical successful combination samples and failure samples in a weighted form, and is periodically played back to strengthen the optimal policy;
[0154] S44, a stability and feasibility verification mechanism is constructed to dynamically verify the optimized service combination, and through fitting of a variance matrix and constraint consistency detection, it is ensured that the adjusted combination still has robustness, reliability and cross-period consistency in a complex cloud environment, and provides executability guarantee for decision-making, specifically:
[0155] According to the performance fluctuation in a time window, a stability index is calculated:
[0156] ;
[0157] According to the stability threshold, it is judged whether to trigger retraining: if , retraining is triggered;
[0158] wherein, represents the standard deviation of performance fluctuation, which is used to measure the stability of the output of the combination strategy; represents the average performance value in the sliding window; T represents the length of the observation window, i.e., the number of time steps used to calculate the stability index; represents the set performance stability threshold;
[0159] Once retraining is triggered, representative samples are extracted from the experience pool MP, and the Decision Transformer parameters and the target weight parameters are retrained to ensure that the model converges to a high-efficiency and stable policy space.
[0160] S5, through multi-instance feature representation alignment, similarity-based policy migration, generalization training fine-tuning and online adaptive optimization, the Decision Transformer realizes policy knowledge reuse and generalization ability in different cloud instances and multiple business scenarios, and ensures that the system can generate adaptive combination decisions efficiently and stably under the conditions of cross-instance and cross-environment. The specific implementation process is as follows:
[0161] S51, the service sequence, state and target vector of each instance are embedded and normalized to realize unified representation of features among heterogeneous instances, and provide compatibility and comparability for cross-instance knowledge migration and policy generalization, specifically:
[0162] The service series j of each instance I and state features Perform embedding encoding:
[0163] ;
[0164] Align the embedding and eliminate the difference in feature scale between instances:
[0165] ;
[0166] wherein, represents the instance I j State vector at time t, including but not limited to CPU usage, memory occupation, network delay, storage occupation, task queue length; represents the action sequence selected in step S3;g j represents the instance target vector, including but not limited to cost minimization, performance maximization, reliability optimization; 、 and respectively represent the embedding mapping functions of state, action and target, which are realized by neural networks in this embodiment, for mapping different types of features to a unified vector space; represents the fused embedding vector, as a unified representation of the instance; represents the normalized unified representation, ensuring that different instance embeddings are comparable under the same scale; represents the instance I j Mean of embedding vector; represents the instance I j Standard deviation of embedding vector; represents the instance I j Target vector (such as cost, performance, reliability index) of the instance I
[0167] S52, based on the embedding similarity between instances, construct a weight matrix, and weight the strategy parameters of the source instance with high similarity to the target instance, realize cross-instance experience reuse, speed up the convergence of new instance strategy, improve the efficiency of generalization initialization, specifically:
[0168] Define the similarity matrix between instances: ;
[0169] And the strategy experience of the high similarity instance (higher than the set threshold) is migrated to the target instance: ;
[0170] wherein, S jk represents the similarity between the instance I j and I k , range [0, 1], used to determine the weight of knowledge transfer between instances; and denotes a normalized instance embedding vector; denotes a similarity decay coefficient, controlling the decay rate of the contribution of instances with large distances to the migration strategy; denotes the initial strategy parameters of the target instance;N j denotes a set of source instances with high similarity to the target instance, used for selecting the migration source; denotes the trained strategy parameters of the source instance I k ;
[0171] S53, combined with the source instance experience and a small amount of data of the target instance, a joint loss function is constructed for strategy generalization training, and the Decision Transformer parameters are updated through gradient to fine-tune the strategy, realize the efficient adaptation and reusability of the strategy in multiple instances and multiple scenarios, specifically:
[0172] Define the generalization loss function, taking into account the performance of the source instance and the target instance:
[0173] ;
[0174] Update the strategy parameters using gradient descent: ;
[0175] wherein, denotes the set of migrated source instances;w j denotes the source instance weight, which is set according to the similarity S jk , to ensure that similar instances contribute more; denotes the task loss function of the source instance I j ; denotes the actual execution loss of the target instance, used for local fine-tuning; denotes an importance hyperparameter that balances the source instance knowledge and the importance of the target instance fine-tuning; denotes the training learning rate; Loss denotes the joint loss function, which is used to measure the source instance task loss and the target instance execution loss at the same time, and is the optimization target of the strategy training. In this embodiment, by minimizing Loss, the strategy parameters are optimized so that the strategy is generalized to multiple source instances and adapted to the target instance; denotes the gradient of the joint loss with respect to the strategy parameters;
[0176] S54, real-time monitoring of performance deviation and online parameter fine-tuning during actual operation of the target instance, through a closed-loop adaptive mechanism to ensure the long-term stability and efficiency of the generalized strategy, realizing dynamic optimization and continuous self-learning after strategy migration, that is:
[0177] Calculate the real-time performance deviation: ;
[0178] Online fine-tuning updates the strategy parameters:
[0179] ;
[0180] wherein, denotes the performance deviation, used for online calibration strategy; denotes the actual observed performance indicators of the target instance at time t, including but not limited to response time, throughput, cost; denotes the performance indicators predicted by the current generalization strategy; denotes the current strategy parameters; denotes the strategy parameters updated online; β online denotes the online fine-tuning learning rate, which ensures smooth parameter update and does not cause policy shock; denotes the strategy function, which outputs the probability of selecting action a t under the target g in state s t .
[0181] Embodiment two, as shown in Figure 2 , the present application proposes a cloud service adaptive combination decision support system based on Decision Transformer, which is used to execute the cloud service adaptive combination method based on Decision Transformer proposed in embodiment one, including: hierarchical tokenization and service representation construction module, multi-scale interaction feature extraction and semantic enhancement module, decision generation and strategy generalization module, adaptive combination optimization and backtracking adjustment module, and multi-instance knowledge transfer and online strategy generalization module.
[0182] The hierarchical tokenization and service representation construction module is responsible for unified coding and embedded representation of multi-dimensional state information, action sequence and business target of cloud services; through hierarchical tokenization processing of different types of features (such as resource utilization rate, delay, task queue length, etc.), standardized instance embedding vectors are generated, providing consistent representation basis for subsequent feature interaction and strategy learning;
[0183] The multi-scale interaction feature extraction and semantic enhancement module captures the dependency relationship and potential interaction mode between different services and different instances through a multi-scale attention mechanism and an interaction feature extraction network, and combines a semantic enhancement mechanism to integrate service targets, historical performance and priority information into feature representation, generating multi-scale feature vectors with rich semantics, enhancing the accuracy and generalization ability of subsequent decisions;
[0184] The decision generation and strategy generalization module generates a service combination decision sequence based on a multi-scale feature vector by using a Decision Transformer core strategy network, and realizes strategy generalization through cross-instance knowledge transfer and joint training; during the training process, source instance data and target instance data are jointly optimized to realize efficient and reusable combination strategy output;
[0185] The adaptive combination optimization and backtracking adjustment module is responsible for adaptive optimization of the preliminary strategy, and in the execution process, the actual performance of the strategy under different instances and load conditions is evaluated through a backtracking adjustment mechanism to correct the combination scheme to optimize resource utilization, reduce delay and guarantee performance targets;
[0186] The multi-instance knowledge transfer and online strategy generalization module is responsible for multi-instance knowledge transfer and strategy generalization, enabling the strategy to be reused across different cloud instances and business scenarios; when the target instance goes online, strategy transfer and fine-tuning driven by similarity are used to realize rapid convergence, and strategy parameters are dynamically adjusted through online performance feedback during actual operation to ensure long-term stable operation of the strategy in multiple instances and multiple scenarios.
[0187] The embodiments of the application are described in detail above in combination with the drawings, but the application is not limited thereto, and various changes can be made within the knowledge of those skilled in the art without departing from the purpose of the application.
Claims
1. A cloud service adaptive combination method based on Decision Transformer, characterized in that, The specific implementation steps include the following: S1, unified structured expression of heterogeneous service data is performed through hierarchical tokenization and service representation construction, function, interface, resource and quality information is extracted from multi-source data, normalized, bucket quantized, embedded and mapped, and a compatibility matrix is generated to form a hierarchical service vector representation, which specifically includes: Collect service registration, monitoring and log data, extract function, interface, resource key fields, perform hierarchical normalization and sliding window statistics on numerical parameters, and calculate stable mean and variance baselines; The normalized results are converted into hierarchical token sequences covering function, interface, resource and compatibility dimensions, adaptive quantization of continuous values is performed using quantile-based bucketing, and a trace-time scalar is attached to each token to express data credibility and timeliness; Discrete tokens are mapped to embedding vectors, scaled with trace scalars, and double hierarchical position encoding is used to distinguish intra-layer order and inter-layer depth relationship, while introducing a constraint saliency scalar to highlight key resources and SLA constraint information; The service token embedding is weighted and pooled to generate a service vector, a compatibility matrix is constructed by fusing semantic similarity, historical coexistence rate and rule score, and an online token library maintenance and cold start completion mechanism is set; S2, a multi-scale interaction feature extraction and semantic enhancement mechanism is constructed, which captures the semantic and behavioral dependencies between cloud services at different granularities by constructing multi-scale interaction graphs, coupling intra-scale diffusion and cross-scale attention, semantic prototype comparison enhancement and uncertainty perception fusion, generates enhanced service representations and refines the compatibility matrix; S3, based on the enhanced service representation and the compatibility matrix, a conditional sequence input is constructed, a Decision Transformer is inputted with state-action-target joint embedding, an adaptive combination strategy sequence of cloud services is generated, and the strategy is executable and meets multi-objective optimization after compatibility weighting and multi-objective evaluation, which specifically includes: The multi-scale enhanced service representation and compatibility score are converted into a sequence form that can be processed by the Decision Transformer, and a combination target vector is introduced as a conditional input; The selected service sequence is mapped to a state vector, the candidate service is mapped to an action vector, and the target vector is projected and embedded to generate a state-action-target joint embedding; The Decision Transformer is used to perform forward calculation on the embedded sequence to generate the action probability distribution of the next service selection, and the compatibility matrix is weighted and corrected; According to the corrected strategy probability, a final cloud service combination sequence is generated, which is comprehensively evaluated by a multi-objective function to form a combination return value; S4, an adaptive combination optimization and backtracking adjustment mechanism is constructed, which dynamically evaluates the execution feedback and environmental changes of the service combination based on the decision candidate sequence, and forms a cloud service combination scheme with self-learning and self-repairing capabilities through target-oriented adaptive optimization, multi-round strategy backtracking adjustment and stability determination. S5, through multi-instance feature representation alignment, similarity-based policy migration, generalization training fine-tuning and online adaptive optimization, the Decision Transformer completes the policy knowledge reuse and generalization ability in different cloud instances and multiple service scenarios.
2. The cloud service adaptive combination method based on the Decision Transformer according to claim 1, characterized in that, The hierarchical normalization adopts segmented exponential sliding window and quantile scaling to map the numerical value to a stable numerical token. The hierarchical token sequence specifically includes a function layer, an interface layer, a resource layer, a quality layer, a compatibility layer and a traceability layer.
3. The cloud service adaptive combination method based on the Decision Transformer according to claim 2, characterized in that, Step S2 specifically includes: By modeling the service vector and compatibility relationship in multiple dimensions, a multi-scale interaction graph is constructed to describe the associated features at the service level, interface level and resource level, and a graph structure is introduced at each scale with semantic similarity, historical coexistence and rule factor weighting; On each scale graph, local to medium range interaction features are extracted using limited order diffusion convolution, and different granularity features are coupled and complementary through cross-scale cross-attention; On the basis of multi-scale interaction features, a semantic prototype comparison enhancement mechanism is introduced to dynamically maintain service class prototypes and improve intra-class consistency and inter-class separability through traceability weighted comparison learning; Based on the uncertainty estimation of multi-scale features, a gating fusion mechanism is designed to adaptively adjust the feature weight through scale confidence and neighborhood variance, and an enhanced service representation is generated to refine the compatibility score.
4. The cloud service adaptive combination method based on the Decision Transformer according to claim 3, characterized in that, The construction of the multi-scale interaction graph includes defining a scale set, calculating the original similarity weight matrix weighted by semantic similarity, historical coexistence rate and rule score for each scale, and performing row normalization to obtain the adjacency matrix; The limited order diffusion convolution is realized using Chebyshev approximation.
5. The cloud service adaptive combination method based on the Decision Transformer according to claim 4, characterized in that, Step S4 specifically includes: By modeling the real-time performance difference, a quantifiable feedback signal is constructed, and a feedback update mechanism with a smoothing coefficient is introduced; Based on the adaptive weight dynamic update mechanism of the feedback signal, the gradient offset between the current combination and the optimal performance is calculated to dynamically correct the weight of each target in the service combination; A backtracking policy update mechanism is introduced to record the historical optimal sequence, performance feedback and environment state, compare the weighted results of multiple combinations, use policy deviation for gradient correction and update, and maintain an experience memory pool; A stability and feasibility verification mechanism is constructed to dynamically verify the optimized service combination, calculate the performance fluctuation standard deviation and determine whether to trigger model retraining.
6. The cloud service adaptive combination method based on the Decision Transformer according to claim 5, characterized in that, Step S5 specifically includes: Embedding coding and normalization processing are performed on the service sequence, state and target vector of each instance to realize unified representation of features between heterogeneous instances; Based on the similarity matrix between instances, a weight matrix is constructed to weight the policy parameters of the source instance to the target instance if the similarity is higher than a certain threshold; Combined with the experience of the source instance and a small amount of data of the target instance, a joint loss function is constructed for policy generalization training, and the Decision Transformer parameters are fine-tuned through gradient update; In the actual running process of the target instance, the performance deviation is monitored in real time and the online parameter fine-tuning is performed to ensure the long-term stability of the generalized policy through a closed-loop adaptive mechanism.
7. The cloud service adaptive combination method based on the Decision Transformer according to claim 6, characterized in that, The inter-instance similarity matrix is obtained by calculating the cosine similarity of the normalized instance embedding vectors and multiplying the similarity decay coefficient; The joint loss function is composed of the source instance task loss and the target instance actual execution loss.
8. A Decision Transformer-based cloud service adaptive combination decision support system for performing the Decision Transformer-based cloud service adaptive combination method of any one of claims 1-7. Comprise: A hierarchical tokenization and service representation construction module for unified encoding and embedding representation of multi-dimensional state information, action sequences and business objectives of cloud services; A multi-scale interaction feature extraction and semantic enhancement module for capturing dependency relationships and potential interaction patterns between different services and instances through a multi-scale attention mechanism and an interaction feature extraction network, and generating a semantic-rich multi-scale feature vector; A decision generation and strategy generalization module for generating a service combination decision sequence based on the multi-scale feature vector using a Decision Transformer core strategy network, and achieving strategy generalization through cross-instance knowledge transfer and joint training; An adaptive combination optimization and backtracking adjustment module for adaptive optimization of the preliminary strategy and evaluation of the actual performance of the strategy under different instance and load conditions through a backtracking adjustment mechanism to correct the combination scheme; A multi-instance knowledge transfer and online strategy generalization module for multi-instance knowledge transfer and strategy generalization to enable the strategy to be reused across different cloud instances and business scenarios, and dynamically adjust the strategy parameters through online performance feedback.
Citation Information
Patent Citations
Cloud service performance adaptive action type selection method based on deep learning
CN104951425A
Industrial cloud service combination optimization method considering energy consumption and service flexibility
CN117933483A