Intelligent recommendation method for complex product assembly knowledge based on knowledge graph
Through the process knowledge graph embedding encoding and graph neural network, the problem of inefficiency in complex product assembly process is solved, fast and accurate assembly recommendations are achieved, and computing efficiency and information utilization are improved.
Patent Information
- Application Number
- CN202311094003.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2043-08-29
AI Technical Summary
The prior art relies on manual experience in the assembly process of complex products, resulting in low efficiency and unstable quality, and the inability to fully utilize new technologies to optimize the assembly process, which is a problem of large amount of calculation and insufficient information acquisition.
Using process knowledge graphs for embedding encoding, combining multi-layer perceptrons and graph neural networks, the similarity is calculated and recommended through rapid screening and sub-graph extraction, and the assembly process of complex products is optimized.
It realizes fast and accurate recommendations for complex product assembly, improves computing efficiency and recommendation effects, and makes full use of the information in the process knowledge graph.
Smart Images

Figure CN117216413B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of computer knowledge graphs and recommendation systems, and in particular to an intelligent recommendation algorithm for complex product assembly knowledge based on knowledge graphs. Background Art
[0002] In modern manufacturing environments, the assembly process of complex products relies on a wealth of knowledge and information, including component design specifications, assembly sequences, appropriate tool selection, potential problems, and corresponding solutions. This information plays a vital role in ensuring product quality, reducing production costs, and improving production efficiency.
[0003] Traditional assembly methods rely heavily on engineers' experience and extensive experimentation. In this approach, engineers accumulate years of experience and conduct repeated trials to find a viable assembly solution. However, this method can result in suboptimal assembly processes. Because it relies primarily on human judgment, it often overlooks potential optimization opportunities. This approach not only consumes considerable time and effort, but also leads to inconsistent assembly quality and efficiency.
[0004] Furthermore, with technological advancements and the emergence of new technologies, past assembly methods may no longer be applicable or may offer the potential for optimization using new technologies. For example, new automated assembly technologies, robotics, and the Internet of Things (IoT) are all expected to have a profound impact on the assembly process. However, how to effectively apply these new technologies to the assembly process to achieve assembly optimization remains a challenge that needs to be researched and addressed.
[0005] Therefore, how to quickly and accurately complete the assembly of complex products has become a pressing issue. Against this backdrop, the application of intelligent recommendation algorithms is gaining increasing attention. These algorithms can deeply analyze the vast amount of knowledge and information in the assembly process, providing intelligent decision support and ultimately optimizing the assembly process. Summary of the Invention
[0006] In response to the above problems, the present invention provides an intelligent recommendation algorithm that fully utilizes the process knowledge graph and the characteristics of the product itself to assist in recommendation while increasing computing efficiency.
[0007] To achieve the above objectives, the present invention provides an intelligent recommendation algorithm for complex product assembly knowledge based on knowledge graph, which includes:
[0008] S1: Acquire triple data representing a process knowledge graph, where the triple data includes two entities and a relationship between the entities;
[0009] S2: Construct an attribute embedding vector of dimension D for each attribute, where the attribute is a characteristic of the entity or relationship;
[0010] S3: Construct a part embedding vector of dimension D for each entity and relationship;
[0011] S4: Add the attribute embedding vector and the part embedding vector to obtain a part embedding code;
[0012] S5: Rapidly screening the embedded codes of the parts, specifically including the following steps:
[0013] S501: embed the part into the coding part n Input to the multi-layer perceptron MLP, and output the part p after calculation n , the calculation formula of the MLP is:
[0014]
[0015] Where W and b are the parameters of the neural network. Specifically, the multilayer perceptron (MLP) consists of a linear part (Wx+b) and a nonlinear part. In this formula, the activation function used in the nonlinear part is ReLU.
[0016] S502: Select a part p n as the target part and with the user part p z Calculate similarity sim nz , and its calculation formula is:
[0017]
[0018] Where p n and p z is a row vector of dimension D, For p z The transposed column vector, sigmoid(·) function is the activation function, which can map numbers between 0 and 1. The specific formula is sigmoid(x) = 1 / (1+e -x );
[0019] S503: Sort all target parts and user parts by similarity, and select target parts with a similarity greater than 0.6. The selected target parts set is recorded as U={part n} simnz>0.6 ;
[0020] S6: By extracting subgraph information from the knowledge graph, the similarity between the candidate target part set U and the user part is refined and calculated, specifically including the following steps:
[0021] S601: Subgraph extraction. First, for the target part node n and the user part node z, obtain the surrounding subgraphs of k-hops around them respectively. Then, find the intersection of the two subgraphs of the target part node n and the user part node z. Finally, remove independent points and points with a distance greater than k from the two nodes. All paths with a maximum distance of k+1 between the target part node n and the user part node z are obtained as closed subgraphs.
[0022] S602: Position-encode the extracted closed subgraph, and for each node in the closed subgraph, find the distance dis between the node i and the target part node. i,target The distance dis from the user part node i,user And in the form of a binary (dis i,target ,dis i,user ) is saved, and then the distance between it and the target part node is dis i,target Generate position code Position i,target And the distance dis from the user part node i,user Generate position code Position i,user ;
[0023] S603: Perform vector addition of the part embedding code corresponding to the subgraph node and the two position codes to obtain the subgraph node code node i , and its calculation formula is:
[0024] node i =unti i +Position i,target +Position i,user
[0025] Where, until n Embed codes for parts;
[0026] S604: Use the graph neural network to transmit the subgraph information. For the l-th layer of the graph neural network, the calculation formula is:
[0027]
[0028] Where, To encode the relation embedding, Encode the subgraph nodes, is the information transmitted by the graph neural network, l=1,…,L is the number of layers of the graph neural network, neighbor i refers to the set of all neighbors of entity i, are the parameters of the neural network, and are all D×D matrices; it should be noted that for the first layer of the graph neural network, its input
[0029] S605: For the closed subgraph of the target part node n and the user part node z, after the data is output from the l-th layer graph neural network, all the relationship embedding codes in the closed subgraph and the subgraph node codes are summed to obtain the subgraph code. The calculation formula is:
[0030]
[0031] S7: For part n in the candidate part set U, use a recursive calculation strategy to calculate its recommendation score for user part z for:
[0032]
[0033] Where, are model parameters, both are D×D matrices, is the latent semantic vector of the target part n, is the latent semantic vector of user part z, Score the recommendation predictions for layer l;
[0034] S8: Calculate prediction scoring metrics The real scoring indicator r n,z The mean square error loss is calculated, and all the above parameters are updated through the torch.optim.Adam function until the loss converges to a certain threshold. The loss calculation formula is:
[0035]
[0036] In the formula, mean(·) represents the mean;
[0037] S9: Select K parts with the largest scoring indicators, and recommend the K parts and the processes associated with them to the user.
[0038] In a preferred manner, the embedding vector is initialized with random numbers that obey a standard normal distribution: for each attribute in the data, a corresponding attribute embedding vector is initialized; for each entity in the data, a corresponding entity embedding vector is initialized; for each relationship in the data, a corresponding relationship embedding vector is initialized.
[0039] In a preferred embodiment, the calculation formula of the position code is:
[0040]
[0041] Where, Position i,target [d] and Position i,user [d] are position codesi,target and Position i,user The d-th element in the vector, d = 1,…,D.
[0042] The beneficial effects of the present invention are: utilizing rapid screening technology to quickly screen out a set of recommended candidates in a simple way, which greatly saves computing time; by extracting subgraph information from the knowledge graph and encoding it in detail, the model can fully consider the similarity between products; and by calculating based on iterative similarity, the model's prediction effect is better. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A schematic diagram of closed subgraph extraction according to the present invention;
[0044] Figure 2 Schematic diagram of the closed subgraph position coding of the present invention. DETAILED DESCRIPTION Specific embodiment:
[0046] Collaborative Filtering (CF) is a common recommendation algorithm that can use collaborative filtering to find products with similar assembly characteristics and then recommend the assembly knowledge and techniques of these products to engineers or automatic assembly systems.
[0047] Although many collaborative filtering-based algorithms exist, they cannot be directly applied to intelligent recommendation of complex product assembly knowledge. This is because complex product assembly knowledge cannot be directly acquired. For example, product characteristics and assembly and processing techniques used can only be extracted from a large amount of literature. Knowledge graphs, however, offer a promising approach for extracting this knowledge, and therefore algorithms based on knowledge graphs are likely to achieve good results. One of the most popular approaches is the GraIL (Graph Inductive Learning) algorithm, a framework that leverages graph neural networks for relationship prediction. It first extracts the subgraph between two products from the knowledge graph, removes independent points and points with a distance greater than K, labels the nodes using one-hot encoding, and then uses a graph neural network to score the subgraph between the products. This predicts the relationship between the two products, ultimately identifying the most similar products and recommending the technologies they employ. For collaborative filtering, see section 2.4.2 of the book "Recommender Systems in Practice"; for GraIL, see the paper "Inductive Relation Prediction by Subgraph Reasoning."
[0048] Disadvantages of existing technology:
[0049] 1. Some recommendation algorithms do not utilize knowledge graphs. For example, recommendation algorithms based on collaborative filtering currently lack the use of knowledge graphs, which results in insufficient information being obtained by the algorithm and poor recommendation results.
[0050] 2. Knowledge graph-based algorithms are computationally intensive. Knowledge graph-based recommendation algorithms, such as GraIL, require a large amount of computation to extract subgraphs between products, resulting in poor algorithm efficiency.
[0051] 3. Previous algorithms were also inadequate for knowledge extraction. Previous algorithms emphasized the use of subgraphs for recommendations. However, for a complex product assembly, it is necessary to consider not only subgraph information but also relevant process information and the characteristics of the product itself.
[0052] The present invention aims to solve the problem that the algorithm needs to make full use of the process knowledge graph, use process information and the characteristics of the product itself to help with recommendations, and at the same time increase the computational efficiency of the algorithm.
[0053] The present invention relates to a knowledge graph-based intelligent recommendation of complex product assembly knowledge, which is used for intelligent knowledge recommendation. The following is a detailed explanation of the specific case of recommending assembly processes for parts:
[0054] At present, a process knowledge graph has been established. By using the knowledge in the knowledge graph, similar parts are recommended for the parts selected by the user, and the assembly process of similar parts is recommended to the user for reference.
[0055] 1. Introduction to process knowledge graph
[0056] In papers such as Li Xiuling, Zhang Shusheng, Huang Rui, et al. "Constructing a process knowledge graph for process reuse" [J]. Journal of Northwestern Polytechnical University, 2019, 37(6): 1174-1183. and Guo L, Yan F, Li T, et al. "An automatic method for constructing machining process knowledge base from knowledge graph" [J]. Robotics and Computer-Integrated Manufacturing, 2022, 73: 102222., process knowledge graphs are constructed and applied. The present invention utilizes the constructed process knowledge graph to perform subsequent recommendation tasks.
[0057] (1) Process knowledge graph: Knowledge graph is a popular method for visualizing knowledge domains, which contains the corresponding domain knowledge. The basic unit of knowledge graph is triple data, which can be expressed as (entity, relationship, entity). In the process knowledge graph of this case, the entity types include parts and processes. The process knowledge graph is a graph composed of these triple data, such as the following triple data:
[0058]
[0059] (2) Entity: In this case, the input format of the entity is (number, label, parameter), and the input type is a dictionary dict format, for example: {"id":0,"labels":["Part"],"properties":{"PartType":"0","PartName":"Steering column","PartDWGNo":"HJS","PartDBID":"45","Category1":"Metal parts","Category2":"Medium parts","Category3":"Transmission system parts","Category4":"Axle"}}, where id is the unique corresponding number in the process knowledge base, labels represents the part type, and properties contains basic information such as part type, part label, and part name. Through the knowledge graph, the properties of the part can be saved.
[0060] (3)iii. Relationship: The input format of the relationship in this case is (number, type, head node, tail node, parameters), and the input type is in dictionary (dict) form, for example: {"id":2,"type":"has_feature_c_slot","start":0,"end":723,"properties":{"b":"3","r":"2","RName":"Has c-type key slot","Amount":"2","h":"1","PartDBID":"45","IT":"7","l":"1","Ra":"1.6"}}, where id is the unique corresponding number in the process knowledge base, type is the relationship name, start is the id of the head node, end is the id of the tail node, and properties contains basic information such as the Chinese name of the relationship, quantity, and size specifications.
[0061] 2. Get the embedded code
[0062] After obtaining the process knowledge graph, the knowledge graph data needs to be embedded and encoded. The entity / relationship embedding encoding consists of the corresponding attribute embedding vector and the entity / relationship embedding vector.
[0063] (1) Attribute Embedding Vector: For each attribute, an embedding vector of dimension D needs to be constructed. Attributes refer to the characteristics of entities and relationships, including part type, part label, relationship type, and relationship label. For example, "metal parts" is a part type, for which an embedding vector of dimension D is constructed. It should be noted that dimension D is an integer greater than 0, and its specific value needs to be determined using a grid search method. In this case, D = 128 was determined using the grid search method.
[0064] (2) Entity / relationship embedding vector: An embedding vector of dimension D needs to be constructed for each entity and relationship using the same method as above.
[0065] (3) Entity / relationship embedding coding: Finally, the embedding coding is obtained by adding the attribute embedding vector and the entity / relationship embedding vector. Specifically, when the object is an entity, find its corresponding entity embedding vector and the attribute embedding vectors corresponding to all the attributes of the entity, and sum them up to get the entity embedding coding of the entity. The same is true for the relationship embedding coding. For example: for the entity with id=n, assume that its attributes are "metal parts", "small parts", "mold parts", and "sets". Then the embedding coding of the entity is n is the sum of the attribute embedding vector to which it belongs, the four attribute embedding vectors corresponding to the four attributes, and the entity embedding vector corresponding to the entity. For the relationship connecting entity id=i and entity id=j, its relationship embedding code is obtained by adding the embedding codes of the connected head entity and tail entity and the relationship embedding vector.
[0066] It should be noted that in this case, entities are divided into parts and processes, so when they need to be distinguished, they will be used separately. n and tec m To represent the embedded code of the part with id=n and the embedded code of the process with id=m, use unti when no distinction is needed n To represent the entity embedding code.
[0067] (4) Other details, embedding vector construction method:
[0068] 1) Initialization: All embedding vectors in this paper are initialized with random numbers from a standard normal distribution. For each attribute in the data, a corresponding attribute embedding vector is initialized; for each entity in the data, a corresponding entity embedding vector is initialized; and for each relationship in the data, a corresponding relationship embedding vector is initialized. For details, see the paper He X, Liao L, Zhang H, et al. Neural collaborative filtering [C] / / Proceedings of the 26th international conference on world wide web. 2017: 173-182.
[0069] 2) Updated during training: All embedding vectors will be updated during the model training process using the Adam algorithm.
[0070] Grid search is a commonly used algorithm for determining hyperparameters. In this paper, the range of values used for determining D is [16, 32, 64, 128, 256, 512]. D is then sequentially varied, and the model is built and trained. Ultimately, the optimal D is determined based on the model's performance, and the loss is used for evaluation, with smaller values being preferred.
[0071] 3. Quick screening
[0072] To speed up calculations, this invention proposes rapid screening. Specifically, the goal of this example is to recommend similar parts to a user-selected part, hereinafter referred to as user parts. Because the process knowledge base contains a large number of parts, meticulously calculating the similarity between each part and the user part would result in excessive computational complexity. Therefore, this invention proposes rapid screening.
[0073] (1) Embed the part into the coding part n Input to the multi-layer perceptron MLP, and output the part p after calculation n The calculation formula of the multilayer perceptron MLP is as follows:
[0074]
[0075] Where W and b are the parameters of the neural network; specifically, the multilayer perceptron (MLP) consists of a linear part (Wx+b) and a nonlinear part (activation function). In this formula, the activation function used is ReLU, and the formula for ReLU is as shown above.
[0076] (2) Select a part p n as the target part and with the user part p z Calculate similarity sim nz , and its calculation formula is:
[0077]
[0078] Where p n and p z is a row vector of dimension D, For p z The transposed column vector, sigmoid(·) function is the activation function, which can map numbers between 0 and 1. The specific formula is sigmoid(x) = 1 / (1+e -x );
[0079] (3) Sort all target parts and user parts by similarity, and select target parts with a similarity greater than 0.6. The selected target parts set is recorded as
[0080] 4. Subgraph Mining
[0081] After a quick screening, a candidate part set U is obtained. The similarity between these parts and the user's parts is then carefully calculated. To capture the relationship between the parts, the present invention extracts a small portion of the graph structure containing the two parts from the original knowledge graph, subsequently referred to as a "subgraph," and extracts knowledge from this to calculate the similarity between the parts.
[0082] (1) Subgraph extraction: First, extract the subgraph between the target part node n and the user part node z. Specifically, for the two part nodes, take the k-hop surrounding subgraph around them, that is, all nodes and all edges within them that are no more than k away from the node, then find the intersection of the two subgraphs, and finally remove independent points and points that are more than k away from the two points. This operation can obtain all paths with a maximum distance of k+1 between the two target nodes as subgraphs, such as Figure 1 As shown in the figure, k is set to 3, that is, only nodes within 3 hops are extracted as subgraphs.
[0083] (2) Position encoding of the extracted closed subgraph: Then the subgraph needs to be position encoded. Find the distance dis between the node i and the target part node i,target The distance dis from the user part node i,userAnd in the form of a binary (dis i,target ,dis i,user ) is saved, and then the distance between it and the target part node is dis i,target Generate position code Position i,target And the distance dis from the user part node i,user Generate position code Position i,user The generation method and principle of position encoding can be found in the paper Vaswani A, Shazeer N, Parmar N, et al. Attention is all you need [J]. Advances in neural information processing systems, 2017, 30. Figure 2 .
[0084] (3) Subgraph node embedding coding: Then embed the subgraph nodes. Specifically, the entity embedding code corresponding to the node is vector-added with the two position codes. The formula is as follows:
[0085] node i =unti i +Position i,target +Position i,user
[0086] (4) Subgraph message passing: The graph neural network is then used to pass the subgraph information. Specifically, for the first layer of the graph neural network, it needs to input the subgraph node code and relationship embedding code output by the previous layer of the graph neural network, and then input them into the graph neural network. The formula of the graph neural network in the present invention is as follows:
[0087]
[0088] Where, To encode the relation embedding, Encode the subgraph nodes, is the information transmitted by the graph neural network, l=1,…,L is the number of layers of the graph neural network, neighbor i refers to the set of all neighbors of entity i, are the parameters of the neural network, and are all D×D matrices; it should be noted that for the l-th layer graph neural network, its input
[0089] (5) Read out the subgraph code: For the closed subgraph of the target part node n and the user part node z, after the data is output from the l-th layer of the graph neural network, all the relationship embedding codes in the closed subgraph and the subgraph node codes are summed to obtain the subgraph code. The calculation formula is:
[0090]
[0091] 5. Recommendation score calculation and recommendation
[0092] In the previous step, the present invention calculates the subgraphs between all parts in the candidate part set U and the user parts, and performs message transmission and encoding. In this step, the recommendation score is calculated for the parts in U, that is, the detailed similarity is calculated, and the recommendation is made.
[0093] (1) Similarity calculation: For part n in the candidate part set U, its recommendation score for user part z is . It uses a recursive calculation strategy, that is, the results of layers 0 to L are added in sequence to obtain the final result. At the same time, considering the part information and subgraph information, the effect is better. The specific formula is as follows:
[0094]
[0095] Where, are model parameters, all of which are D×D matrices. Specifically, the subgraph node encoding of the target part node n in the l=0,…,Lth layer is and subgraph encoding (The closed subgraph of target part node n and user part node z) calculates the latent semantic vector of target part n Then the subgraph nodes of the user part node z of the l=0,…,L layer are numbered and subgraph encoding Calculate the latent semantic vector of user part z Then the target part latent semantic vector of the lth layer is and the transpose of the user part latent semantic vector Multiply them together to get the score of the lth layer Finally, the scores of all layers are added together to get the final recommendation prediction score
[0096] (2) Model Update: The model of the present invention can be trained by using the following loss function and Adam, a model update algorithm commonly used in current deep learning. Refer to the paper "Adam: A Method for Stochastic Optimization" Kingma DP, Ba J. Adam: A method for stochastic optimization [J]. arXiv preprint arXiv:1412.6980, 2014., to update the parameters and embedding vectors in the model. The formula for calculating loss is as follows:
[0097]
[0098] In the formula, mean(·) represents the mean value. The meaning of this function is the score index predicted by the algorithm. The real scoring indicator r n,z , calculate the mean square error.
[0099] The model update algorithm Adam directly uses the pytorch package, refer to the torch.optim.Adam function in the website: https: / / pytorch.org / , to update all parameters in the model of the present invention, including the embedding vector.
[0100] 6. Parts and process recommendations
[0101] Once the model is trained, meaning the loss converges below a certain threshold, it can recommend parts to the user. This is done by finding the K parts with the highest predicted scores. These parts are then recommended, along with the processes associated with these parts.
[0102] Case results:
[0103] Based on the above part recommendation case, this paper conducted corresponding experiments and compared them with common recommendation algorithms. The present invention significantly improved the accuracy while maintaining high computational efficiency. The process knowledge graph used is the same as that in the paper, Li Xiuling, Zhang Shusheng, Huang Rui, et al. "Process Knowledge Graph Construction Method for Process Reuse" [J]. Journal of Northwestern Polytechnical University, 2019, 37(6): 1174-1183.
[0104]
[0105] The reference book for CF collaborative filtering algorithm is chapter 2.4.2 of Xiang Liang. Recommendation System Practice[M].Ren min you dian chuban she,2012.; the reference paper for NCF is He X,Liao L,Zhang H,et al.Neural collaborative filtering[C] / / Proceedings of the 26th international conferenceon world wide web.2017:173-182.; the reference paper for LR-GCCF is Chen L,Wu L,Hong R,etal.Revisiting graph based collaborative filtering:A linear residual graphconvolutional network approach[C] / / Proceedings of the AAAI conference onartificial intelligence.2020,34(01):27-34.
[0106] GraIL reference paper Teru K, Denis E, Hamilton W. Inductive relation prediction by subgraph reasoning[C] / / International Conference on Machine Learning.PMLR, 2020:9448-9457..
[0107] The key point of this invention is to recommend complex product assembly knowledge through the use of a knowledge graph, which is inherently significant. Furthermore, this invention fully utilizes the information in the knowledge graph to make recommendations, while also ensuring computational efficiency through rapid filtering. This invention fully extracts information from the knowledge graph, making recommendations more accurate, while also ensuring computational efficiency through rapid filtering.
[0108] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A method for intelligent recommendation of complex product assembly knowledge based on knowledge graph, characterized by: It includes: S1: Acquire triple data representing a process knowledge graph, where the triple data includes two entities and a relationship between the entities; S2: Construct an attribute embedding vector of dimension D for each attribute, where the attribute is a characteristic of the entity or relationship; S3: Construct a part embedding vector of dimension D for each entity and relationship; S4: Add the attribute embedding vector and the part embedding vector to obtain a part embedding code; S5: quickly screening the embedded codes of the parts; S6: By extracting subgraph information from the knowledge graph, the similarity between the candidate target part set U and the user parts is refined and calculated, which specifically includes the following steps: S601: Subgraph extraction. First, for the target part node n and the user part node z, obtain the surrounding subgraphs of k-hops around them respectively. Then, find the intersection of the two subgraphs of the target part node n and the user part node z. Finally, remove independent points and points with a distance greater than k from the two nodes. All paths with a maximum distance of k+1 between the target part node n and the user part node z are obtained as closed subgraphs. S602: Position-encode the extracted closed subgraph, and for each node in the closed subgraph, find the distance dis between the node i and the target part node. i,target The distance dis from the user part node i,user And in the form of a binary (dis i,target ,dis i,user ) is saved, and then the distance between it and the target part node is dis i,target Generate position code Position i,target And the distance dis from the user part node i,user Generate position code Position i,user ; S603: Perform vector addition of the part embedding code corresponding to the subgraph node and the two position codes to obtain the subgraph node code node i , and its calculation formula is: node i =unti i +Position i,target +Position i,user Where, until n Embed codes for parts; S604: Use the graph neural network to transmit the subgraph information. For the l-th layer of the graph neural network, the calculation formula is: Where, To encode the relation embedding, Encode the subgraph nodes, is the information transmitted by the graph neural network, l=1,…,L is the number of layers of the graph neural network, neighbor i refers to the set of all neighbors of entity i, are the parameters of the neural network, and are all D×D matrices; it should be noted that for the l-th layer graph neural network, its input S605: For the closed subgraph of the target part node n and the user part node z, after the data is output from the l-th layer graph neural network, all the relationship embedding codes in the closed subgraph and the subgraph node codes are summed to obtain the subgraph code. The calculation formula is: S7: For part n in the candidate part set U, use a recursive calculation strategy to calculate its recommendation score for user part z for: Where, are model parameters, both are D×D matrices, is the latent semantic vector of the target part n, is the latent semantic vector of user part z, Score the recommendation predictions for layer l; S8: Calculate prediction scoring metrics The real scoring indicator for playing with engineers n,z The mean square error loss is calculated, and all the above parameters are updated through the torch.optim.Adam function until the loss converges to a certain threshold. The loss calculation formula is: In the formula, mean(·) represents the mean; S9: Select K parts with the largest scoring indicators, and recommend the K parts and the processes associated with them to the user.
2. The complex product assembly knowledge intelligent recommendation method based on knowledge graph according to claim 1 is characterized in that: The embedding vectors are initialized with random numbers that follow a standard normal distribution: for each attribute in the data, a corresponding attribute embedding vector is initialized; for each entity in the data, a corresponding entity embedding vector is initialized; for each relationship in the data, a corresponding relationship embedding vector is initialized.
3. The complex product assembly knowledge intelligent recommendation method based on knowledge graph according to claim 1 is characterized in that: The calculation formula of the position code is: Where, Position i,target [d] and Position i,user [d] are position codes i,target and Position i,user The d-th element in the vector, d = 1,…,D.
4. The complex product assembly knowledge intelligent recommendation method based on knowledge graph according to claim 1 is characterized in that: The step S5 is to quickly screen the embedded codes of the parts, specifically comprising the following steps: S501: embed the part into the coding part n Input to the multi-layer perceptron MLP, and output the part p after calculation n , the calculation formula of the MLP is: Where W and b are the parameters of the neural network. Specifically, the multilayer perceptron (MLP) consists of a linear part (Wx+b) and a nonlinear part. In this formula, the activation function used in the nonlinear part is ReLU. S502: Select a part p n as the target part and with the user part p z Calculate similarity sim nz , and its calculation formula is: Where p n and p z is a row vector of dimension D, For p z The transposed column vector, sigmoid(·) function is the activation function, which can map numbers between 0 and 1. The specific formula is sigmoid(x) = 1 / (1+e -x ); S503: Sort all target parts and user parts by similarity, and select target parts with a similarity greater than 0.
6. The selected target parts set is recorded as
Citation Information
Patent Citations
Knowledge graph processing method and device
CN113312488A
Cultural resource recommendation method based on combination of graph neural network and knowledge graph
CN115062237A