Micro-service dynamic arrangement method based on graph neural network

Through a graph neural network-based method, the microservice node sequence is dynamically orchestrated, which solves the problem that traditional orchestration systems cannot adapt to business changes and realizes intelligent microservice call recommendations.

CN120803726APending Publication Date: 2025-10-17PLA DALIAN NAVAL ACADEMY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510939090.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing technologies cannot dynamically adapt to changes in business scenarios in microservice orchestration, require frequent manual maintenance, cannot integrate multi-dimensional preference constraints, and lack cognitive learning capabilities.

Method used

A graph neural network-based method is adopted to obtain the feature vectors of microservice nodes, utilize the graph neural network layer of the attention mechanism and the branch prediction network, dynamically orchestrate the microservice node sequence, and integrate the decision maker's preferences and business scenario characteristics.

Benefits of technology

It realizes microservice orchestration that can dynamically adapt to various business scenarios, can automatically learn and recommend the best call sequence, and improves the intelligence level of the orchestration system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803726A_ABST
    Figure CN120803726A_ABST
Patent Text Reader

Abstract

The invention discloses a micro-service dynamic arrangement method based on a graph neural network, and relates to the technical field of micro-service dynamic arrangement, and the method comprises the steps: obtaining a set of micro-service nodes based on information data of a decision task; obtaining initial feature vectors of the micro-service nodes in the micro-service node set; according to the graph neural network layer based on the attention mechanism, obtaining the updated feature vectors of the micro-service nodes in the available set of the micro-service nodes, and then according to the branch prediction network, obtaining the probability that the micro-service nodes in the available set of the current micro-service node and the next micro-service node can form edges; and determining a node sequence of an actual decision. According to the method and the device, the problem of knowledge solidification caused by micro-service orchestration under a predefined rule in the prior art is solved, and the method and the device can dynamically adapt to various business scene changes.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of micro-service dynamic arrangement, and particularly relates to a micro-service dynamic arrangement method based on a graph neural network. BACKGROUND

[0002] Micro-service arrangement technology is evolving from system performance optimization to cognitive intelligent decision-making. In critical fields such as intelligent manufacturing process scheduling and medical emergency response, service arrangement decisions need to deeply integrate the experience and knowledge of field experts and the business preferences of operation personnel. Unlike traditional service combination, such scenarios require the arrangement system to have human cognitive learning ability, which can quantify the subjective preference characteristics of decision-makers on service calling order, micro-service processing strategy, and can also pay attention to objective characteristics such as micro-service calling timing constraints. The fusion of such multi-dimensional preference constraints promotes micro-service arrangement into a new stage of "human-computer mutual understanding".

[0003] Current technologies for processing micro-service arrangement mainly include rule engine hard coding technology, which fixes expert experience through predefined strategy templates, so that the decision-making process runs in a fixed way; and interactive reinforcement learning technology, which integrates preference characteristics into strategy networks through artificial feedback reward functions to learn the decision-making preferences of operation personnel. For rule engine hard coding technology, micro-service arrangement is usually performed under predefined rules, which cannot dynamically adapt to changes in business scenarios and requires frequent manual maintenance, which has the risk of knowledge solidification. SUMMARY

[0004] The present application discloses a micro-service dynamic arrangement method based on a graph neural network to overcome the above technical problems.

[0005] To achieve the above purpose, the technical solution of the present application is:

[0006] A micro-service dynamic arrangement method based on a graph neural network, comprising the following steps:

[0007] S1: obtaining a set of micro-service nodes according to information data of a decision-making task;

[0008] S2: obtaining an initial feature vector of a micro-service node in the set of micro-service nodes by using a pre-trained fasttext model according to the set of micro-service nodes;

[0009] S3: obtaining a sequence of micro-service nodes in the set of micro-service nodes based on a graph neural network according to the set of micro-service nodes and the initial feature vector of the micro-service node, to obtain a node sequence of actual decision-making, and further completing the arrangement of micro-service;

[0010] The graph neural network comprises a graph neural network layer based on an attention mechanism and a branch prediction network.

[0011] The attention mechanism-based graph neural network layer is used to obtain the updated feature vector of the microservice node in the available set of microservice nodes according to the initial feature vector of the microservice node in the set of microservice nodes.

[0012] The branch prediction network is used to obtain the probability that the microservice node in the available set of microservice nodes can form an edge with the (c-1)th microservice node according to the updated feature vector of the microservice node in the available set of microservice nodes, so as to determine the cth microservice node in the actual decision node sequence, where c is the index number of the microservice node in the set of microservice nodes, and C is the total number of microservice nodes in the set of microservice nodes.

[0013] Further, in the S3, the method for obtaining the actual decision node sequence is as follows:

[0014] S31: The method for obtaining the available set of microservice nodes is used to obtain the available set of the cth, c=1, 2, …C microservice node in the actual decision node sequence in turn; and the initial feature vector of the microservice node in the available set of the cth microservice node in the actual decision node sequence is obtained.

[0015] S32: The updated feature vector of the microservice node in the available set of the cth microservice node is obtained according to the initial feature vector of the microservice node in the available set of the cth microservice node in the actual decision node sequence and the attention mechanism-based graph neural network layer.

[0016] S33: The probability p ci that the microservice node in the available set of the cth microservice node can form an edge with the (c-1)th microservice node is obtained according to the updated feature vector of the microservice node in the available set of the cth microservice node and the branch prediction network.

[0017] S34: The microservice node in the available set of the cth microservice node when p ci is maximum is taken as the cth microservice node in the actual decision node sequence, and the actual decision node sequence is obtained, and the orchestration of the microservice is completed.

[0018] Further, in the S32, the formula used to obtain the updated feature vector of the microservice node in the available set of the cth microservice node is as follows:

[0019] r c-1,i = softmax i (LeakyReLU(cCONCAT(W1x c-1 ,W2x i )))xi

[0020] x' i =ReLU(r c-1,i )+βx i +(1-β)x c-1 +b

[0021] Where: r c-1,i The feature representation of the meta-path between the c-1th microservice node and the i-th microservice node in the available microservice set; softmax i Represents the calculation of r in graph neural network c-1,i The probability function of the meta-path; LeakyReLU represents the LeakyReLU activation function in the graph neural network; a represents the learnable attention parameter vector; CONCAT represents the vector concatenation function in the graph neural network; W1 and W2 both represent the learnable parameter matrices in the graph neural network; x c-1 Represents the feature vector of the c-1th microservice node; x i Represents the feature vector of the i-th microservice node in the microservice available set; x' i represents the updated feature vector of the i-th microservice node in the available microservice set; ReLU represents the ReLU activation function in the graph neural network; β represents the weight hyperparameter of the graph neural network layer based on the attention mechanism in the graph neural network; b represents the bias term of the graph neural network layer based on the attention mechanism in the graph neural network; c represents the index number of the microservice node in the set of microservice nodes, that is, the index number of the microservice node to be decided; i represents the index number of the microservice node in the available microservice set.

[0022] Furthermore, the formula used to obtain the probability that a microservice node in the available set of the cth microservice node can form an edge with the c-1th microservice node is as follows:

[0023]

[0024] p c-1,i =Sigmoid(W3LeakyReLU(W4CONCAT(x″ c-1 ,x″ i )))

[0025] Where: c represents the index number of the microservice node in the set of microservice nodes, that is, the index number of the microservice node to be decided; i represents the index number of the microservice node in the available microservice set; x″ c-1 represents the feature vector of the c-1th microservice node that integrates the global features; θ1 and θ2 both represent the weight hyperparameters of the branch prediction network in the graph neural network; x c-1represents the feature vector of the c-1th microservice node; n represents the total number of microservice nodes in the microservice available set; x' represents the feature vector of the ith microservice node in the c-1th microservice node available set; Sigmoid represents the activation function Sigmoid in the graph neural network; W3 and W4 both represent the trainable parameter matrix of the branch prediction network in the graph neural network; x' represents the feature vector of the ith microservice node in the microservice available set fused with the global feature. i represents the updated feature vector of the ith microservice node in the microservice available set; k1 and k2 both represent the bias term of the branch prediction network in the graph neural network; p represents the probability that the ith microservice node in the c-1th microservice node available set can form an edge with the c-1th microservice node; Sigmoid represents the activation function Sigmoid in the graph neural network; W3 and W4 both represent the trainable parameter matrix of the branch prediction network in the graph neural network; x' represents the feature vector of the ith microservice node in the microservice available set fused with the global feature. c-1,i represents the updated feature vector of the ith microservice node in the microservice available set; k1 and k2 both represent the bias term of the branch prediction network in the graph neural network; p represents the probability that the ith microservice node in the c-1th microservice node available set can form an edge with the c-1th microservice node; Sigmoid represents the activation function Sigmoid in the graph neural network; W3 and W4 both represent the trainable parameter matrix of the branch prediction network in the graph neural network; x' represents the feature vector of the ith microservice node in the microservice available set fused with the global feature. i represents the feature vector of the ith microservice node in the microservice available set fused with the global feature.

[0026] Further, the method for obtaining the available set of the cth microservice node in the actual decision node sequence is as follows:

[0027] First, obtain the set of microservice nodes that do not belong to the actual decision node sequence in the set of microservice nodes;

[0028] The formula used is as follows:

[0029]

[0030] A S = {A S,1 ,…,A S,c-1}

[0031] In the formula, A' represents the set of microservice nodes that do not belong to the actual decision node sequence; A represents the set of microservice nodes; A S represents the set of microservice nodes in the actual decision node sequence; A S,c-1 represents the c-1th microservice node in the actual decision node sequence; c represents the index number of the microservice node in the actual decision node sequence;

[0032] Secondly, obtain the set of microservice nodes that have a constraint relationship with the c-1th microservice node in the actual decision node sequence from the set of microservice nodes that do not belong to the actual decision node sequence;

[0033] Finally, the formula for obtaining the available set of the cth microservice node in the actual decision node sequence is as follows:

[0034] A c,ky = A 1,ky ∪…∪A c-1,ky ∪A c-1,ys

[0035] In the formula, A c,kyA represents an available set of the cth microservice node; A 1,ky A represents an available set of the 1st microservice node; A c-1,ky A represents an available set of the c-1th microservice node; A c-1,ys A represents a set of microservice nodes having a constraint relationship with the c-1th microservice node in the actual decision node sequence.

[0036] Further, the method of the microservice node having a constraint relationship with the c-1th microservice node in the actual decision node sequence is:

[0037] If the kth microservice node in the set A' of microservice nodes not belonging to the actual decision node sequence is a successor node of the c-1th microservice node in the actual decision node sequence, the c-1th microservice node in the actual decision node sequence has a constraint relationship with the kth microservice node in A', and k represents the index number of the microservice node in the set A' of microservice nodes not belonging to the actual decision node sequence.

[0038] Beneficial effects: the microservice dynamic arrangement method based on the graph neural network of the present application obtains the set of microservice nodes based on the information data of the decision task, obtains the initial feature vector of the microservice node in the set of microservice nodes, obtains the updated feature vector of the microservice node in the available set of microservice nodes based on the graph neural network layer based on the attention mechanism, and further obtains the probability that the microservice node in the available set of the next microservice node can form an edge with the current microservice node based on the branch prediction network, so as to determine the actual decision node sequence. The present application solves the problem of traditional microservice arrangement under pre-defined rules and can dynamically adapt to various business scenario changes. BRIEF DESCRIPTION OF DRAWINGS

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

[0040] Figure 1 The flow chart of the microservice dynamic arrangement method based on the graph neural network of the present application;

[0041] Figure 2 The fasttext model structure diagram in the embodiment of the present application;

[0042] Figure 3 The microservice recommendation link prediction diagram in the embodiment of the present application;

[0043] Figure 4 A flowchart of a graph neural network algorithm in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0044] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the drawings of the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0045] This embodiment introduces a micro-service dynamic arrangement method based on a graph neural network, as shown in Figure 1

[0046] S1: According to the information data of the decision task, a set of micro-service nodes is obtained;

[0047] Specifically, in order to capture the characteristics of the user decision-making process, the interactive data of the user decision-making, i.e. the historical decision-making information generated by the interaction between the user and the micro-service system, is subjected to semantic processing to obtain the data structure of a plurality of operation events based on the decision task. Specifically, the completion of a decision event requires the execution of a plurality of operation events. Based on the information data of the decision task, a set of micro-service nodes based on the decision task is obtained, which is known to those skilled in the art and will not be described in detail here.

[0048] A specific embodiment of the present application is as follows:

[0049] Under the intelligent manufacturing process scheduling task, the information data of the current decision task includes the task name "intelligent manufacturing process scheduling", and based on the common knowledge of those skilled in the art, the task target can be inferred from the task name as "using the sequential execution of micro-services to complete the current task". Based on the current task target, the micro-service nodes required to execute the current decision task include: device management micro-service, resource management micro-service, quality control micro-service, data acquisition and monitoring micro-service, energy management micro-service, etc.

[0050] S2: According to the set of micro-service nodes based on the decision task, a pre-trained fasttext model is used as a feature vector pre-trained model to obtain the initial feature vector of the micro-service node in the set of micro-service nodes;

[0051] ​Specifically, for each microservice node, semantic information such as the microservice name of the microservice node is encoded into a word vector using a natural language processing method. The embodiment uses a fasttext model as a word vector pre-training model to vectorize the information of each microservice node and obtain an initial feature vector of the microservice node. The structure of fasttext is shown in Figure 2 The fasttext model architecture is similar to the CBOW model in word2vec, but fasttext predicts labels while CBOW predicts intermediate words, that is, the model tasks are different. In the fasttext architecture, x1,x2,…,x P-1 ,x P represents a P-gram vector in a text, and each feature is the average word of the feature vector. After transformation by the hidden layer and access to the hierarchical softmax, the fasttext model outputs the feature vector word vector represented by the current node as the feature vector of the node.

[0052] S3: According to the set of microservice nodes, the initial feature vector of the microservice node, and based on the graph neural network, a sequence of microservice nodes in the set of microservice nodes is obtained to obtain a node sequence for actual decision-making, and the microservice orchestration is completed;

[0053] The graph neural network includes a graph neural network layer based on an attention mechanism and a branch prediction network.

[0054] Preferably, in S3, the method for obtaining the node sequence for actual decision-making is as follows:

[0055] S31: Using the method for obtaining the available set of microservice nodes, the available set of the c, c=1,2,…C microservice nodes in the node sequence for actual decision-making is obtained in turn; and the initial feature vector of the microservice node in the available set of the c microservice node in the node sequence for actual decision-making is obtained.

[0056] Preferably, the method for obtaining the available set of the c microservice node in the node sequence for actual decision-making is as follows:

[0057] First, the set of microservice nodes in the set of microservice nodes that do not belong to the set of microservice nodes in the node sequence for actual decision-making is obtained.

[0058] The formula used is as follows:

[0059]

[0060] A S ={A S,1 ,…,A S,c-1}

[0061] Where: A' represents the set of microservice nodes in the node sequence that does not belong to the actual decision; A represents the set of microservice nodes; A S A collection of microservice nodes in a node sequence representing the actual decision; S,c-1 Indicates the c-1th microservice node in the actual decision node sequence; c represents the index number of the microservice node in the actual decision node sequence;

[0062] Secondly, obtain the set of microservice nodes that are not in the actual decision node sequence and have a constraint relationship with the c-1th microservice node in the actual decision node sequence;

[0063] Preferably, the method for obtaining the microservice node having a constraint relationship with the c-1th microservice node in the actual decision node sequence is:

[0064] If the kth microservice node in the set A' of microservice nodes that do not belong to the actual decision-making node sequence is the successor node of the c-1th microservice node in the actual decision-making node sequence, then there is a constraint relationship between the c-1th microservice node in the actual decision-making node sequence and the kth microservice node in A', where k represents the index number of the microservice node in the set A' of microservice nodes that do not belong to the actual decision-making node sequence.

[0065] Finally, the available set of the cth microservice node in the node sequence of the actual decision is obtained using the following formula:

[0066] A c,ky =A 1,ky ∪…∪A c-1,ky ∪A c-1,ys

[0067] Where: A c,ky A represents the available set of the cth microservice node; 1,ky Represents the available set of the first microservice node; A c-1,ky A represents the available set of the c-1th microservice node; c-1,ys Represents the set of microservice nodes that have a constraint relationship with the c-1th microservice node in the actual decision node sequence.

[0068] Specifically, according to the above method, all microservice nodes that have a constraint relationship with the c-1th microservice node in the set of microservice nodes that are not part of the actual decision-making node sequence can be found to form the available set of the i-th microservice node. In this embodiment, when c = 1, the c-1th microservice node, i.e., the 0th microservice node, is the preset starting node; when calculating the available set of the first microservice node, the available set of the 0th microservice node is used and is considered to be an empty set.

[0069] S32: input the initial feature vectors of the microservice nodes in the available set of the cth microservice node in the node sequence of the actual decision into the graph neural network layer based on the attention mechanism by using a message passing algorithm, and obtain updated feature vectors of the microservice nodes in the available set of the cth microservice node;

[0070] Preferably, the formula used to obtain the updated feature vectors of the microservice nodes in the available set of the cth microservice node is as follows:

[0071] r c-1,i = softmax i (LeakyReLU(cCONCAT(W1x c-1 ,W2x i )))x i

[0072] x' i = ReLU(r c-1,i )+ βx i +(1-β)x c-1 +b

[0073] In the formula, r c-1,i represents the feature representation of the meta-path between the c-1th microservice node and the ith microservice node in the microservice available set; softmax i represents a probability function for calculating r c-1,i in the graph neural network; LeakyReLU represents a LeakyReLU activation function in the graph neural network; a represents a learnable attention parameter vector; CONCAT represents a vector concatenation function in the graph neural network; W1 and W2 both represent learnable parameter matrices in the graph neural network; x c-1 represents the feature vector of the c-1th microservice node; x i represents the feature vector of the ith microservice node in the microservice available set; x' i represents the updated feature vector of the ith microservice node in the microservice available set; ReLU represents a ReLU activation function in the graph neural network; β represents a weight hyperparameter of the graph neural network layer based on the attention mechanism in the graph neural network; b represents a bias term of the graph neural network layer based on the attention mechanism in the graph neural network; c represents the index number of the microservice node in the set of microservice nodes, i.e., the index number of the microservice node to be decided; and i represents the index number of the microservice node in the microservice available set.

[0074] S33: Obtain the probability p that the microservice nodes in the available set of the cth microservice node can form edges with the c-1th microservice node according to the updated feature vector of the microservice nodes in the available set of the cth microservice node and the branch prediction network of the cth microservice node. ci ;

[0075] Preferably, the formula used to obtain the probability that the microservice nodes in the available set of the cth microservice node can form edges with the c-1th microservice node is as follows:

[0076]

[0077] p c-1,i =Sigmoid(W3LeakyReLU(W4CONCAT(x" c-1 ,x" i )))

[0078] In the formula, c represents the index number of the microservice node in the set of microservice nodes, i.e., the index number of the microservice node to be decided; i represents the index number of the microservice node in the available set of microservices; x" c-1 represents the feature vector of the c-1th microservice node fused with global features; γ1 and γ2 both represent the weight hyperparameters of the branch prediction network in the graph neural network; x c-1 represents the feature vector of the c-1th microservice node; n represents the total number of microservice nodes in the available set of microservices; x' i represents the updated feature vector of the ith microservice node in the available set of microservices; k1 and k2 both represent the bias term of the branch prediction network in the graph neural network; p c-1,i represents the probability that the ith microservice node in the available set of the c-1th microservice node can form edges with the c-1th microservice node; Sigmoid represents the activation function Sigmoid in the graph neural network; W3 and W4 both represent the trainable parameter matrix of the branch prediction network in the graph neural network; x" i represents the feature vector of the ith microservice node in the available set of microservices fused with global features.

[0079] S34: When p ci is the maximum, the microservice node in the available set of the cth microservice node is taken as the cth microservice node in the actual decision node sequence, and the actual decision node sequence can be obtained, and the orchestration of the microservice is completed.

[0080] In this embodiment, a start microservice node sn start and an end node sn end are added when the service planning graph is constructed for the convenience of unified representation and training.

[0081] In addition, in this embodiment, the probability of each pair of microservice nodes forming an edge is predicted separately, and the probability of being able to form an edge with the previous decision node is determined according to the available set of the cth decision node, that is, the microservice orchestration recommendation problem is modeled as a plurality of binary classification problems. This is because the graph neural network module uses the message passing process to make the feature representation of each microservice node (i.e., the updated feature vector of the microservice node) contain information about the neighbor nodes within a certain range, and the global information is added to the updated feature vector of each microservice node in the branch prediction network. Therefore, it is believed that the final feature map of the microservice node represents a relatively rich information, so that independent prediction of each link can also give a relatively reliable result.

[0082] Specifically, the microservice dynamic orchestration recommendation refers to the constructed user cognitive thinking model that can automatically perform service orchestration according to the current decision task and output a recommended microservice call sequence. To achieve the above goal, a service planning graph SPG=(SN,R SN ,DR SN ) is needed, where SN is a set of microservice nodes, R SN is a set of service call order constraint edges, and DR SN is a set of actual decision call order edges. The problem of dynamic orchestration recommendation of microservices can be regarded as predicting the next microservice to be decided under the condition that the current microservice node and the available node set and the service call order constraint edge set are given, that is, the actual decision call order edge set, so it can be regarded as a link prediction problem for graph data structure, as shown in Figure 3 In Figure 3 , the red arrow is the actual decision call order edge set DR SN , indicating that the interception target microservice, the interception airspace microservice, and the interception tool type microservice are executed in turn. In this graph, the next executable microservice nodes are the interception time domain microservice and the task execution subject quantity microservice. Through link prediction, the probability of selecting the interception time domain microservice next time is w1=0.8, and the probability of selecting the task execution subject quantity microservice next time is w2=0.2. By comparison, it is recommended to select the interception time domain microservice next time, and the cycle is completed to complete the microservice dynamic orchestration recommendation in the entire air defense and anti-missile decision task.

[0083] Specifically, to solve the microservice dynamic orchestration problem, the embodiment proposes a solution algorithm based on graph neural network. The main idea is to model the decision microservice call timing problem as a link prediction problem on a service planning graph, define the nodes and edges in the planning graph, and initially represent the nodes. Then build a graph neural network and train it using supervised learning. When the next decision request arrives, use the trained graph neural network model to predict the probability of each microservice that meets the constraints being selected, and make a decision.

[0084] Specifically, the task of the graph neural network of the embodiment is to extract deep semantic information of each microservice node and predict the probability of the node pair generating an edge according to the deep semantic information. This module is composed of a graph neural network layer based on an attention mechanism and a branch prediction network.

[0085] Specifically, after performing the message passing algorithm, the feature representation of the node is input into the branch prediction network for link prediction. The network structure is as shown in Figure 4 .

[0086] Specifically, first, after obtaining all service node feature representations in the available set in the graph neural network layer, the average value of the vector dimensions of each vector is obtained, and the feature representation that can be regarded as global information in the available set is obtained, and the feature vector fused with the global feature of the available set is used to update the microservice feature vector. Subsequently, the current decision-making microservice node and each microservice feature vector in the available set are spliced to obtain a feature representation with richer semantics. Finally, in the link prediction process, the connection probability of each microservice node pair is solved, the microservice node pair features are spliced and input into the network for calculation, and the predicted connection probability p ci .

[0087] Specifically, the graph neural network layer of the embodiment is a combination of a graph neural network layer based on an attention mechanism and a branch prediction network. The graph neural network layer based on the attention mechanism is used for message passing and extracting node features, and the branch prediction network predicts the selection probability of each available microservice as the next decision-making microservice by using the node features calculated by the current graph neural network layer.

[0088] First, the microservice node feature vector is input into the neural network layer for message passing to extract deep features, and then branch prediction is performed on the current decision-making node, and the microservice node with the highest probability is selected as the final recommended next decision-making microservice node.

[0089] Specifically, in the training process, the graph neural network model is trained using supervised learning, so that the graph neural network can quickly make feedback and predict the probability of each microservice being selected when a new decision-making problem comes by learning historical experience and decision-making preferences. The embodiment regards the microservice prediction problem corresponding to the sample as a plurality of binary classification problems, that is, the link prediction of each available microservice is a separate binary classification problem. The cross-entropy function is used as the loss function of the binary classification problem, and the calculation method is as shown below.

[0090] Loss c =-y c log(p ci )-(1-y c) log (1 - p ci )

[0091] Loss c (y, p) = -log (p) c Loss c (y, p) = -log (p) c y represents a sample data label; p ci Pc(i, c-1) represents the probability that the ith microservice node in the available set of the cth microservice node and the c-1th microservice node can form an edge;

[0092] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A microservice dynamic orchestration method based on graph neural network, characterized in that: The steps include: S1: Obtain a set of microservice nodes based on the information data of the decision task; S2: According to the microservice node set, using the pre-trained FastText model, obtain the initial feature vectors of the microservice nodes in the microservice node set; S3: Based on the microservice node set and the initial feature vectors of the microservice nodes, a sequence of microservice nodes in the microservice node set is obtained based on a graph neural network to obtain a node sequence for actual decision-making, thereby completing the orchestration of the microservices. The graph neural network includes a graph neural network layer based on an attention mechanism and a branch prediction network; The graph neural network layer based on the attention mechanism is used to obtain updated feature vectors of microservice nodes in the available set of microservice nodes based on the initial feature vectors of the microservice nodes in the microservice node set; The branch prediction network is used to obtain the probability that the microservice node in the available set of the cth microservice node, c=1, 2, ... C microservice nodes can form an edge with the c-1th microservice node based on the updated feature vector of the microservice node in the available set of microservice nodes, so as to determine the cth microservice node in the node sequence for actual decision, where c is the index number of the microservice node in the set of microservice nodes, and C is the total number of microservice nodes in the set of microservice nodes.

2. A microservice dynamic orchestration method based on graph neural network according to claim 1, characterized in that: In S3, the method used to obtain the node sequence of the actual decision is as follows: S31: Using a method for obtaining an available set of microservice nodes, sequentially obtain the available sets of the c-th microservice nodes, c=1, 2, ... C, in the actual decision node sequence; and obtain an initial feature vector of the microservice node in the available set of the c-th microservice node in the actual decision node sequence. S32: Obtain an updated feature vector of the microservice node in the available set of the c-th microservice node in the actual decision node sequence based on the initial feature vector of the microservice node in the available set of the c-th microservice node and the graph neural network layer of the attention mechanism; S33: Obtain the probability p that the microservice node in the available set of the cth microservice node and the c-1th microservice node can form an edge based on the updated feature vectors and branch prediction networks of the microservice nodes in the available set of the cth microservice node, c=1, 2, ... C microservice nodes. ci ; S34: Put p ci The microservice node in the available set of the cth microservice node at the maximum is used as the cth microservice node in the actual decision-making node sequence, so that the actual decision-making node sequence can be obtained to complete the orchestration of the microservice.

3. A microservice dynamic orchestration method based on graph neural network according to claim 2, characterized in that: In S32, the formula used to obtain the updated feature vector of the microservice node in the available set of the c-th microservice node is as follows: r c-1,i =softmax i (LeakyReLU(aCONCAT(W1x c-1 ,W2x i )))x i x' i =ReLU(r c-1,i )+βx i +(1−β)x c-1 +b Where: r c-1,i The feature representation of the meta-path between the c-1th microservice node and the i-th microservice node in the available microservice set; softmax i Represents the calculation of r in graph neural network c-1,i The probability function of the meta-path; LeakyReLU represents the LeakyReLu activation function in the graph neural network; a represents the learnable attention parameter vector; CONCAT represents the vector concatenation function in the graph neural network; W1 and W2 both represent the learnable parameter matrices in the graph neural network; x c-1 Represents the feature vector of the c-1th microservice node; x i Represents the feature vector of the i-th microservice node in the microservice available set; x' i represents the updated feature vector of the i-th microservice node in the available microservice set; ReLU represents the ReLU activation function in the graph neural network; β represents the weight hyperparameter of the graph neural network layer based on the attention mechanism in the graph neural network; b represents the bias term of the graph neural network layer based on the attention mechanism in the graph neural network; c represents the index number of the microservice node in the set of microservice nodes, that is, the index number of the microservice node to be decided; i represents the index number of the microservice node in the microservice available set.

4. A microservice dynamic orchestration method based on graph neural network according to claim 2, characterized in that: The formula used to obtain the probability that a microservice node in the available set of the c-th microservice node can form an edge with the c-1-th microservice node is as follows: p c-1,i =Sigmoid(W3LeakyReLU(W4CONCAT(x″ c-1 ,x″ i ))) Where: c represents the index number of the microservice node in the set of microservice nodes, that is, the index number of the microservice node to be decided; i represents the index number of the microservice node in the available microservice set; x″ c-1 represents the feature vector of the c-1th microservice node that integrates the global features; γ1 and γ2 both represent the weight hyperparameters of the branch prediction network in the graph neural network; x c-1 represents the feature vector of the c-1th microservice node; n represents the total number of microservice nodes in the available microservice set; x' i represents the updated feature vector of the i-th microservice node in the available microservice set; k1 and k2 both represent the bias terms of the branch prediction network in the graph neural network; p c-1,i represents the probability that the i-th microservice node in the available set of the c-1-th microservice node can form an edge with the c-1-th microservice node; Sigmoid represents the activation function Sigmoid in the graph neural network; W3 and W4 both represent the trainable parameter matrix of the branch prediction network in the graph neural network; x″ i Represents the feature vector of the i-th microservice node in the available microservice set that integrates global features.

5. The microservice dynamic orchestration method based on graph neural network according to claim 2 is characterized in that: The method used to obtain the available set of the cth microservice node in the node sequence of the actual decision is: First, obtain the set of microservice nodes that are not in the actual decision-making node sequence in the set of microservice nodes; The formula used is as follows: A S ={A S,1 ,…,A S,c-1 } Where: A' represents the set of microservice nodes in the node sequence that does not belong to the actual decision; A represents the set of microservice nodes; A S A collection of microservice nodes in a node sequence representing the actual decision; S,c-1 Indicates the c-1th microservice node in the actual decision node sequence; c represents the index number of the microservice node in the actual decision node sequence; Secondly, obtain the set of microservice nodes that are not in the actual decision node sequence and have a constraint relationship with the c-1th microservice node in the actual decision node sequence; Finally, the available set of the cth microservice node in the node sequence of the actual decision is obtained using the following formula: A c,ky =A 1,ky ∪…∪A c-1,ky ∪A c-1,ys Where: A c,ky A represents the available set of the cth microservice node; 1,ky Represents the available set of the first microservice node; A c-1,ky A represents the available set of the c-1th microservice node; c-1,ys Represents the set of microservice nodes that have a constraint relationship with the c-1th microservice node in the actual decision node sequence.

6. A microservice dynamic orchestration method based on graph neural network according to claim 5, characterized in that: The method of the microservice node that has a constraint relationship with the c-1th microservice node in the node sequence of the actual decision is: If the kth microservice node in the set A' of microservice nodes that do not belong to the actual decision-making node sequence is the successor node of the c-1th microservice node in the actual decision-making node sequence, then there is a constraint relationship between the c-1th microservice node in the actual decision-making node sequence and the kth microservice node in A', where k represents the index number of the microservice node in the set A' of microservice nodes that do not belong to the actual decision-making node sequence.