A large rotating unit micro-service component recommendation method based on a knowledge graph
By combining a knowledge graph-based water wave model and a graph neural network, the problem of insufficient feature extraction in the recommendation of microservice components for large rotating units was solved, which improved the accuracy of high-order feature representation and component recommendation, and enhanced the automatic matching capability of the recommendation system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JILIN UNIVERSITY
- Filing Date
- 2023-08-01
- Publication Date
- 2026-07-07
AI Technical Summary
Existing knowledge graph recommendation algorithms suffer from problems such as insufficient feature extraction and random sampling of domain information, which leads to reduced recommendation accuracy, especially in the recommendation of microservice components of large rotating units, where effective matching and recommendation are difficult.
A knowledge graph-based microservice component recommendation method for large rotating units is adopted. The method uses a water wave model to perform high-order modeling of functional description features, combines the message passing mechanism of graph neural networks to aggregate neighborhood information, utilizes the latent information in the knowledge graph to perform component feature representation and preference propagation, and adopts an importance-based sampling method to generate high-order feature representations to improve recommendation accuracy.
It improves the accuracy and efficiency of microservice component recommendations for large rotating units, enhances the automatic matching capability under functional descriptions, maximizes the utilization of knowledge graph information, and improves recommendation performance.
Smart Images

Figure CN116955848B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a microservice component recommendation method, and more particularly to a knowledge graph-based microservice component recommendation method for large rotating airframes. Background Technology
[0002] Currently, traditional recommendation methods, such as collaborative filtering, suffer from data sparsity and cold-start problems. Collaborative filtering assumes similar users share similar preferences; however, its accuracy decreases when historical user data is scarce. Furthermore, when a new user appears, effective prediction is impossible due to the lack of prior recommendation records. To compensate for the initial lack of data and increase the accuracy and understandability of recommendations, additional details, such as textual information and product evaluations, can be added by enriching knowledge graphs. Knowledge graphs not only provide attribute information but also the relationships between attributes, and the knowledge graph created from this information can serve as input to the algorithm. While the introduction of knowledge graphs has helped recommendation systems, it also presents challenges, such as how to effectively extract auxiliary information features and how to delve deeper into the entity information within the knowledge graph. Existing knowledge graph recommendation algorithms suffer from insufficient feature extraction and random sampling of domain information.
[0003] This application proposes a knowledge graph-based microservice component recommendation method for large rotating air conditioners. The method is applied to the recommendation of microservice components for large rotating air conditioners. The model comprehensively models both functional description information and component information. It studies the mapping mechanism between health management functional descriptions and model components in the large rotating air conditioner system platform, maximizes the utilization of knowledge graph information, improves the ability to automatically match and accurately recommend components under functional descriptions, and enhances recommendation performance. Summary of the Invention
[0004] The purpose of this invention is to address the numerous problems in existing knowledge graph recommendation algorithms, such as insufficient feature extraction and random sampling of domain information, and to provide a recommendation method for microservice components of large rotating units based on knowledge graphs.
[0005] The present invention provides a method for recommending microservice components for large rotating air units based on knowledge graphs, the method comprising the following steps:
[0006] Step 1: Obtain the functional description, component interaction matrix, and knowledge graph information;
[0007] Step 2: Obtain the set of entities and sets of triples describing the functions during each ripple propagation process from the knowledge graph, as follows:
[0008] The functional description-component interaction matrix is used to obtain all components that have historical interaction records with the functional description, forming an initial entity set. During the propagation process, each entity in the entity set is connected to the tail entity through the connection relationship, denoted as (h,r)→t. The new entity set obtained after h propagations is called the h-hop entity set of functional description u, specifically represented by Formula 1:
[0009]
[0010] Where ε u (h) ε represents the h-hop entity set of the functional description u. u (h-1) Let h represent the h-1 hop entity set of the functional description u, G represent the knowledge graph, and (h,r,t) represent the knowledge graph triple.
[0011] The set of triples corresponding to the entity set of each hop is represented as shown in Formula 2:
[0012]
[0013] Step 3: Calculate the similarity probability between the component embedding vectors of the triples and the entities, as follows:
[0014] After obtaining the entity set and triplet set of functional descriptions for each ripple propagation process, the component embedding vector is operated on with the head entity and relation vector in the triplet obtained in each hop to obtain a numerical value, which is then normalized to obtain a probability value between 0 and 1. The specific calculation formula is as follows:
[0015]
[0016] Among them, h i It is the head entity embedding vector in the triple, r i It is the relation entity embedding vector in the triple, v T It is the transpose of the component embedding vector. It is the set of triples corresponding to the set of entities in the h-th hop;
[0017] Step 4: Weight the probability values and the tail entities in the triples to obtain the feature vector representation of the functional description of each layer, as follows:
[0018] After obtaining the probability values, they are processed with the tail entities in the triples, and then weighted and summed to obtain the feature vectors describing the functions of each layer. The calculation formula is as follows:
[0019]
[0020] Where pi In the h-jump ripple propagation, the component embedding vector v of the i-th triple and the entity h are... i similarity, t i The embedding vector of the tail entity in the i-th triple is weighted and summed for all triples propagated over the h-th hop to obtain the functional description feature vector u. (h) ;
[0021] Step 5: The feature vectors of the functional description obtained from each layer are weighted and summed with a correlation coefficient assigned according to the number of hops to obtain the final high-order representation of the functional description, as follows:
[0022] By adding a weight, the feature vectors of the functional description obtained from each layer are weighted and summed with a correlation coefficient assigned according to the number of hops to obtain the final high-order representation of the functional description. The calculation formula is as follows:
[0023]
[0024] Where u (h) This represents the feature vector describing the function, where h represents the number of propagation layers, L represents the total number of propagation layers, and w h These are hyperparameters that can be adjusted during training, such as w. h Set to 1 / (1+h);
[0025] Step 6: Obtain the entity set and triple set of the component during each ripple propagation process based on the knowledge graph, as follows:
[0026] First, locate the target component v. Then, based on the knowledge graph, find one or more entities corresponding to the target component v, forming an entity set. Specifically, Formula 6 is used to represent the h-hop entity set of component v:
[0027]
[0028] With sets Centered on the entity in the diagram, the set of h-hop triples for component v is obtained by aggregating neighborhood information from the outermost layer towards the center. The formula used is as follows:
[0029]
[0030] Step 7: Take the inner product of the functional description feature vector and the relation vector to obtain a weight, and then normalize the weight as follows:
[0031] During the aggregation process, a weight is calculated from the relation vector, and the relation vector is represented by a weight. The calculation formula is shown in Formula 8:
[0032]
[0033] Where u is a vector describing the function, r i It is the relation vector connecting the i-th neighbor;
[0034] After obtaining the weights A softmax operation will be needed later for normalization, as shown in Equation 9:
[0035]
[0036] Where N(v) represents the first-order neighbor set of node V, and the normalized weights are sorted from largest to smallest.
[0037] Step 8: Calculate the component feature vector by weighting the weight values and their corresponding neighbor entity vectors, as follows:
[0038] Using Formula 10, the feature vector is obtained by performing a weighted summation of the weights and the corresponding neighbor entity vectors:
[0039]
[0040] Where ei is the feature vector of the i-th neighbor;
[0041] Step 9: Perform message aggregation and a fully connected layer operation on the component feature vectors to obtain the final component feature vector representation, as follows:
[0042] The component feature vectors are used for message aggregation, and a fully connected layer operation is performed. This process is described as follows:
[0043]
[0044] Where σ(·) is the nonlinear activation function, using the ReLU activation function, W is the linear transformation matrix, and b is the bias term; these are all basic elements of a full-level sequence. This indicates that message aggregation will be performed on component V again, where the message aggregation is shown in Formula 12:
[0045]
[0046] Step 10: Predict the degree of preference of the target function description for the target component, as follows:
[0047] The enhanced functional description feature representation u is obtained through the above steps. w and enhanced component feature representation v N The input is used to predict the degree of preference of the target function description u for the target component v, as shown in Formula 13:
[0048]
[0049] Where σ(x) is the Sigmoid function.
[0050] The beneficial effects of this invention are:
[0051] This invention provides a knowledge graph-based microservice component recommendation method for large rotating units. By introducing knowledge graph information, it automatically acquires latent information from the knowledge graph, enriching both functional description and component representations. It utilizes the preference propagation mechanism of a water wave model to enrich the feature representation of functional descriptions, performing high-order modeling on these features. Simultaneously, at the component level, it leverages the message passing mechanism of a graph neural network to aggregate neighborhood information, further enriching the component feature representation. The knowledge graph is viewed as a weighted graph, where relationships between entities are calculated as weights to represent the influence of these relationships on the degree of preference for functional descriptions. When sampling the weights among multiple relationships related to entities, importance-based sampling is used to aggregate neighborhood information at each layer, resulting in a high-order component representation. Finally, the generated high-order functional description and component feature representations are input into a prediction function to predict the degree of preference of the target functional description for the target component.
[0052] In the generation of high-order functional description feature vectors, to obtain more accurate high-order functional description feature representations, a correlation coefficient based on the number of hops was added to the water wave model. In the generation of high-order component feature vectors, improvements were made to the KGCN algorithm. The entities corresponding to the components were used to transform the relationships between entities into weights through computation via the message passing mechanism of a graph neural network. The magnitude of the weights affects the final recommendation result. Secondly, when sampling the weights between multiple relationships related to entities, importance-based sampling was used to aggregate neighborhood information at each layer. Then, high-order neighborhood information was aggregated to obtain high-order component feature vectors. Finally, the obtained enhanced functional description feature representations and enhanced component feature representations were input into the prediction function to predict the degree of preference of the target functional description for the target component. The KGCN-RN model studies the mapping mechanism between health management functional descriptions and model components in a large rotating airframe system platform, maximizing the utilization of knowledge graph information and improving the ability to automatically match and accurately recommend components under functional descriptions. This allows for deeper integration into the large rotating airframe component recommendation system, enhancing recommendation performance. Attached Figure Description
[0053] Figure 1 This is a schematic diagram of the recommendation method for microservice components of large rotating units based on knowledge graphs, as described in this invention.
[0054] Figure 2 This is a schematic diagram of a sub-graph obtained from a single graph sampling as described in this invention.
[0055] Figure 3This is a schematic diagram of a subgraph after the relationship between entities is transformed into a weight during the aggregation process, as described in this invention. Detailed Implementation
[0056] Please see Figures 1 to 3 As shown:
[0057] The present invention provides a method for recommending microservice components for large rotating air units based on knowledge graphs, the method comprising the following steps:
[0058] Step 1: Obtain the functional description and component interaction matrix, as well as the knowledge graph information. Based on the functional description and component interaction matrix, obtain the components that are potentially associated with the target functional description. These components are mapped to multiple entities in the knowledge graph. All entities and their surrounding neighboring entities constitute a knowledge graph.
[0059] Step 2: Obtain the entity set and triple set of the functional description during each ripple propagation process from the knowledge graph. Then, obtain all components that have historical interaction records with the functional description u through the functional description-component interaction matrix. These components can correspond to multiple entities in the knowledge graph, forming an initial entity set ε. u (0) Each entity propagates through multi-hop ripples, aggregating multi-layered information to enrich its functional description features. A new set of entities is obtained in each propagation process. The set ε u (0) Each entity in the set ε, during the propagation process, u (0) All entities in the first layer are treated as head entities. The tail entity is found through the connection relationship, denoted as (h,r)→t. Therefore, the second propagation is to take the tail entity obtained from the first layer as the head entity of this layer, thereby finding the corresponding tail entity of this layer, and so on. The new set of entities obtained after h propagations is called the h-hop entity set of the functional description u, which is specifically represented by Formula 1.
[0060]
[0061] Where ε u (h) ε represents the h-hop entity set of the functional description u. u (h-1) Let G represent the h-1 hop entity set of the functional description u, G represent the knowledge graph, and (h,r,t) represent the knowledge graph triple.
[0062] Since each outward diffusion of the ripple network actually generates new entities on the order of a Cartesian product, in order to reduce computation and improve efficiency, a value can be set to limit the upper limit of the number of new entities obtained in each diffusion, fixing the number of neighbors. Let's assume this value is n_memory.
[0063] The set of triples corresponding to the entity set of each hop is represented as shown in Equation 2:
[0064]
[0065] Step 3: Calculate the similarity probability between the component embedding vector of the triple and the entity, given the relation entity embedding vector in the triple. Specifically, after obtaining the h-hop entity set and triple set of the functional description u, the component embedding vector v is compared with the head entity h in the triple obtained from each hop. i and relation vector r i The calculation yields a numerical value, which is then normalized to obtain a probability value between 0 and 1. This value can be viewed as a probability value in the relation vector r. i Below, the component embedding vector v and entity h i Similarity helps to aggregate preference information, and incorporating relation vectors during calculation is crucial because different relations r i For the same component-entity pair, there are different similarities, and the specific calculation formula is as follows:
[0066]
[0067] Among them, h i It is the head entity embedding vector in the triple, r i It is the relation entity embedding vector in the triple, v T It is the transpose of the component embedding vector. It is the set of triples corresponding to the set of entities in the h-th hop.
[0068] Step 4: Weight the probability values and the tail entities in the triples to obtain the feature vector representation of each layer. Specifically, after obtaining the probability values, sum them with the tail entities t in the triples. i Perform calculations and then weighted summation to obtain the functional description feature vector u of layer h. (h) Formula 4 is as follows:
[0069]
[0070] Where p i In the h-jump ripple propagation, the component embedding vector v of the i-th triple and the entity h are... i similarity, t iThe embedding vector of the tail entity in the i-th triple is weighted and summed for all triples propagated over the h-th hop to obtain the functional description feature vector u. (h) .
[0071] Step 5: The functional description feature vectors obtained from each layer are weighted and summed with a correlation coefficient assigned based on the number of hops to obtain the final high-order representation of the functional description. Specifically, to obtain a more accurate high-order functional description feature representation, a weight is added because, during water wave propagation, the more propagation layers there are, the weaker the correlation between entities and components. Therefore, the functional description feature vectors u obtained from each layer are weighted... (h) With a correlation coefficient w assigned based on the number of hops h The weighted summation yields the final higher-order representation u of the functional description. w Formula 5 is as follows:
[0072]
[0073] Where h represents the number of propagation layers, L represents the total number of propagation layers, and w h These are hyperparameters that can be adjusted during training. Experiments have shown that w h Setting it to 1 / (1+h) yields the best results.
[0074] Step 6: Obtain the entity set and triple set of the component during each ripple propagation process based on the knowledge graph. Specifically, first find the target component v, and then find one or more entities corresponding to the target component v based on the knowledge graph to form the entity set. Specifically, Formula 6 is used to represent the h-hop entity set of component v.
[0075]
[0076] With set ε v (0) Centered on an entity, neighboring information is aggregated from the outermost layer towards the center. Entity set During the aggregation process, the set of h-hop triples for component v can be obtained. The formula used is as follows:
[0077]
[0078] Step 7: Take the inner product of the feature vector and the relation vector to obtain a weight, and normalize the weight to obtain the degree of preference of the feature vector for the relation. Specifically, during the aggregation process, the relation vector r... i A weight is obtained through calculation; the transformation process is shown below. Figure 3 .
[0079] Assumption Figure 3This is a subgraph obtained from a single graph sampling, where the central node is the target component v to be predicted, Ni represents the neighbors of V, and r i To represent a relation, if a relation vector r is used... i As the weight for message passing, it is inconvenient to calculate, so the relation vector r is used instead. i It is represented by a weight w, and the calculation formula is shown in Formula 8:
[0080]
[0081] Where u is a vector describing the function, r i It is a relation vector connecting the i-th neighbor, and a function g (e.g., calculating the inner product) is used to compute the target function description of relation r. i The degree of preference, that is, after r i The weights for edge-time message passing are optimized because a functional description vector is added with each message pass, resulting in a weight that is naturally better than directly taking the relation vector r. i It better reflects the attention of the functional description u, and like all attention mechanisms, it obtains the weights. A softmax operation will be needed later for normalization, as shown in Equation 9:
[0082]
[0083] Where N(v) represents the first-order neighbor set of node V. The normalized weights are sorted from largest to smallest to facilitate subsequent priority sampling of the larger weights.
[0084] Step 8: Perform a weighted summation of the weight values and their corresponding neighbor entity vectors to obtain the component feature vector. Specifically, using Formula 10, perform a weighted summation of the weight values and their corresponding neighbor entity vectors to obtain the feature vector.
[0085]
[0086] Where e i The feature vector of the i-th neighbor, according to the idea of graph sampling, means that message passing is done from the outside in. So, for example, when nodes e4 and e5 in the graph pass the message to e1, e1 will be the feature vector of the i-th neighbor as shown in the above formula. e1 aggregates the features of e4 and e5, and then the resulting feature vector e1 is passed through a message passing mechanism to the center position V to obtain the feature vector.
[0087] Step 9: Perform message aggregation and a fully connected layer operation on the component feature vectors to obtain the final component feature vector representation. Specifically, the feature vectors obtained in the previous step... It is not yet the final feature vector v representing the target component V, because message aggregation and a fully connected layer operation are still required.
[0088] This process can be described as follows:
[0089]
[0090] Where σ(·) is the nonlinear activation function (ReLU activation function is used in this paper), W is the linear transformation matrix, and b is the bias term; these are all basic elements of a full-level system. In particular, This indicates that message aggregation will be performed on component V again.
[0091] The KGCN model mentions three aggregation methods: summation aggregation, concatenation aggregation, and neighbor aggregation. Experiments show that summation aggregation has the best effect, so this paper adopts the summation aggregation method, as shown in Equation 12.
[0092]
[0093] At this point, the aggregated vector is substituted into Equation 11 to obtain the final high-order component feature representation v.
[0094] Step 10: Predict the degree of preference of the target functional description for the target component. Specifically, this is done by obtaining the enhanced functional description feature representation u from the previous steps. w and enhanced component feature representation v N The input is used to predict the degree of preference of the target function description u for the target component v, as shown in Formula 13:
[0095]
[0096] Where σ(x) is the Sigmoid function.
Claims
1. A method for recommending microservice components for large rotating airframes based on knowledge graphs, characterized in that: The method includes the following steps: Step 1: Obtain the functional description, component interaction matrix, and knowledge graph information; Step 2: Obtain the set of entities and sets of triples describing the functions during each ripple propagation process from the knowledge graph, as follows: The functional description-component interaction matrix is used to obtain all components that have historical interaction records with the functional description, forming an initial entity set. During the propagation process, each entity in the set, with all entities in the set acting as the head entity, finds the tail entity through connection relationships, denoted as... The new set of entities obtained after h propagations is called the h-hop entity set of the functional description u. Specifically, the h-hop entity set of the functional description u is represented by Formula 1: (1) in The h-hop entity set represents the functional description u. Let G represent the h-1 hop entity set of the functional description u, and let G represent the knowledge graph. Represents a knowledge graph triple; The set of triples corresponding to the entity set of each hop is represented as shown in Formula 2: (2) Step 3: Calculate the similarity probability between the component embedding vectors of the triples and the entities, as follows: After obtaining the entity set and triplet set of functional descriptions for each ripple propagation process, the component embedding vector is operated on with the head entity and relation vector in the triplet obtained in each hop to obtain a numerical value, which is then normalized to obtain a probability value between 0 and 1. The specific calculation formula is as follows: (3) in, It is the head entity embedding vector in the triple. It is the embedding vector of the relation entity in the triple. It is the transpose of the component embedding vector. It is the set of triples corresponding to the set of entities in the h-th hop; Step 4: Weight the probability values and the tail entities in the triples to obtain the feature vector representation of the functional description of each layer, as follows: After obtaining the probability values, they are processed with the tail entities in the triples, and then weighted and summed to obtain the feature vectors describing the functions of each layer. The calculation formula is as follows: (4) in In the h-jump ripple propagation, the component embedding vector v of the i-th triple is the entity. similarity, The embedding vector of the tail entity in the i-th triple is weighted and summed, and all triples are propagated over the h-th hop to obtain the functional description feature vector. ; Step 5: The feature vectors of the functional description obtained from each layer are weighted and summed with a correlation coefficient assigned according to the number of hops to obtain the final high-order representation of the functional description, as follows: By adding a weight, the feature vectors of the functional description obtained from each layer are weighted and summed with a correlation coefficient assigned according to the number of hops to obtain the final high-order representation of the functional description. The calculation formula is as follows: (5) in Let h represent the feature vector describing the function, and L represent the number of propagation layers and the total number of propagation layers. These are hyperparameters that can be adjusted during training. Set to 1 / (1+h); Step 6: Obtain the entity set and triple set of the component during each ripple propagation process based on the knowledge graph, as follows: First, locate the target component v. Then, based on the knowledge graph, find one or more entities corresponding to the target component v, forming an entity set. Specifically, Formula 6 is used to represent the h-hop entity set of component v: (6) With sets Centered on the entity in the diagram, the set of h-hop triples for component v is obtained by aggregating neighborhood information from the outermost layer towards the center. The formula used is as follows: (7) Step 7: Take the inner product of the functional description feature vector and the relation vector to obtain a weight, and then normalize the weight as follows: During the aggregation process, a weight is calculated from the relation vector, and the relation vector is represented by a weight. The calculation formula is shown in Formula 8: (8) Where u is a vector describing the function. It is the relation vector connecting the i-th neighbor; After obtaining the weight I need to do it again later. The operation is normalized, as shown in Formula 9: (9) Where N(v) represents the first-order neighbor set of node V, and the normalized weights are sorted from largest to smallest. Step 8: Calculate the component feature vector by weighting the weight values and their corresponding neighbor entity vectors, as follows: Using Formula 10, the feature vector is obtained by performing a weighted summation of the weights and the corresponding neighbor entity vectors: (10) in Let i be the feature vector of the i-th neighbor; Step 9: Perform message aggregation and a fully connected layer operation on the component feature vectors to obtain the final component feature vector representation, as follows: The component feature vectors are used for message aggregation, and a fully connected layer operation is performed. This process is described as follows: (11) in For non-linear activation functions, use The activation function, W (linear transformation matrix), and b (bias term) are all fundamental elements of a full-level system. This indicates that message aggregation will be performed on component V again, where the message aggregation is shown in Formula 12: (12) Step 10: Predict the degree of preference of the target function description for the target component, as follows: The enhanced functional description feature representations are obtained through the above steps. and enhanced component feature representation The input is used to predict the degree of preference of the target function description u for the target component v, as shown in Formula 13: (13) in yes function.