A manufacturing service recommendation method based on knowledge graph and graph convolutional network
By using a method based on knowledge graph and graph convolutional network, utilizing degree centrality to select neighbors and combining it with the self-attention mechanism, the problems of information overload and insufficient modeling representation in the manufacturing service platform are solved, and more accurate manufacturing service recommendations are achieved.
Patent Information
- Application Number
- CN202411699371.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-11-26
AI Technical Summary
There are problems of information overload and inaccurate recommendation results in manufacturing service platforms, especially in the case of cold start and insufficient modeling representation, the recommendation results have limitations.
A method based on knowledge graph and graph convolutional network is adopted to select neighbors through degree centrality and combine with self-attention mechanism to generate feature representation of manufacturing services and tasks, reduce noise and perform two-end modeling representation.
The accuracy of manufacturing service recommendations and the quality of recommendation results are improved, noise is reduced, and more efficient information aggregation and recommendation effects are achieved.
Smart Images

Figure CN119598150B_ABST
Abstract
Description
Technical field
[0001] The present invention relates to the field of service recommendation technology, and in particular to a manufacturing service recommendation method based on knowledge graph and graph convolutional network. [Background Technology]
[0002] Service-oriented manufacturing is a new manufacturing model that has emerged as traditional manufacturing transitions to service-oriented manufacturing. This model operates on a manufacturing service platform. Manufacturing service providers on the platform package their manufacturing resources and capabilities into manufacturing services and upload them to the platform. The platform then reviews each manufacturing service and incorporates it into a service resource pool. Users with manufacturing needs (task requesters) publish tasks on the manufacturing service platform. After the platform responds to the tasks, it pushes manufacturing services selected from the resource pool to the task requester for selection. However, with the deepening of manufacturing transformation and the expansion of manufacturing scale, the number of manufacturing service providers on the manufacturing service platform has skyrocketed, resulting in a massive amount of manufacturing services stored in the service resource pool. This makes it difficult for the platform to select appropriate manufacturing services for push in a timely manner, and task requesters are unable to select from the chaotic array of manufacturing service information, leading to information overload.
[0003] Although the research and application of traditional recommendation algorithms in manufacturing service platforms have achieved certain results, the problems of cold start and insufficient information utilization still affect the accuracy of recommendation results.
[0004] Although incorporating knowledge graphs as auxiliary information into recommendation methods can achieve better recommendation performance, a large amount of information irrelevant to the recommendation can also introduce noise problems. At the same time, most recommendation methods based on knowledge graphs suffer from insufficient modeling representation. Specifically, when capturing knowledge associations on the graph, no distinction is made between knowledge selection and aggregation, which introduces some noise. Secondly, most recommendation methods only aggregate information about manufacturing services in the knowledge graph to enrich the vector representation of the manufacturing service side. Task information in the knowledge graph is rarely considered, resulting in insufficient modeling representation of task information and certain limitations in the recommendation results. [Summary of the invention]
[0005] To address these shortcomings, this paper proposes a manufacturing service recommendation method based on a knowledge graph and graph convolutional networks. This method fully exploits the information contained in the manufacturing service-task information knowledge graph for manufacturing services and tasks, and implements feature representations for manufacturing services and tasks through a graph convolutional network. When aggregating manufacturing service and task neighbor information, neighbors are selected based on their degree centrality rather than random sampling. Neighbor information is selectively aggregated based on the relationship scores and self-attention scores of manufacturing service neighbor nodes, reducing noise and generating a manufacturing service representation. A self-attention mechanism is then used to aggregate task neighbor information and generate a task representation. This effectively addresses the issue of limited recommendation results due to insufficient modeling representation on the other end.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] A manufacturing service recommendation method based on knowledge graph and graph convolutional network, characterized by comprising:
[0008] Step S1: Construct a manufacturing service-task information knowledge graph G through manufacturing service history data and task data, and process the manufacturing service-task information knowledge graph G to read information;
[0009] Step S2: Calculate the degree centrality DC of each node in G, sample a fixed number of neighbors according to the calculated results, and construct the adjacency matrix of entities and relationships.
[0010] Step S3: Input the data obtained in step S1 and step S2 into the manufacturing service neighborhood information representation unit, and calculate the manufacturing service relationship score through preference propagation And normalize it, according to the normalized score Get the weighted neighbor vector Then, the self-attention mechanism is used on the processed neighbor vectors to obtain the linear combination of the manufacturing service neighborhood representation vectors.
[0011] Step S4: Input the data obtained in steps S1 and S2 into the task neighborhood information representation unit, and obtain a weighted task neighborhood representation vector based on the self-attention mechanism.
[0012] Step S5: The linear combination of the manufacturing service neighborhood representation vector obtained in steps S3 and S4 is input into the graph convolutional neural network model together with the task neighborhood representation vector, the manufacturing service, and the initial task vectors. The feature extraction is performed using the summation and aggregation method to obtain the final representation vector of the manufacturing service and task.
[0013] Step S6: Apply the inner product to the final representation vector of the manufacturing service and task obtained in step S5 to predict the interaction probability, and make recommendations based on the interaction probability.
[0014] Optionally, the manufacturing service-task information knowledge graph G in step S1 includes manufacturing service information and task information; the manufacturing service information includes manufacturing service capabilities, historical tasks, historical task objects, and the industry neighborhood to which they belong; and the task information includes the required manufacturing service capabilities, task objects, and the industry neighborhood of the task. The read information includes the number of manufacturing services z, the number of tasks, the number of entities and relations r contained in G, and the proportional division of training, validation, and test sets.
[0015] Manufacturing service relationship score in step S3 Calculate using the inner product function g:R d ×R d →R calculates the score, the formula is as follows:
[0016]
[0017] In the formula, z0 represents the initial vector of manufacturing service, r0 represents the initial vector of relationship;
[0018] Normalized score The calculation is as follows:
[0019]
[0020] Where N(z) is the neighbor set of manufacturing service z after degree centrality processing;
[0021] Neighbor vector after normalized score calculation The calculation is as follows:
[0022]
[0023] where e z The initial vector of neighbors for manufacturing service z is collectively referred to;
[0024] The formula for calculating the linear combination of weighted manufacturing service neighborhood representation vectors is as follows:
[0025]
[0026] in is the self-attention score, and d is the vector dimension.
[0027] The linear combination of the weighted task neighborhood representation vectors in step S4 is calculated as follows:
[0028]
[0029] in is the self-attention score of the neighbor vector of task t, e tis the initial neighbor vector of task t, d is the vector dimension; N(t) is the neighbor set of the target node of task t after degree centrality processing.
[0030] Furthermore, the calculation method of the final representation vector of the manufacturing service and task obtained by the summation and aggregation method in step S5 is as follows:
[0031] agg z =σ(W Z ·(Z0+u k s(z) )+b z )
[0032] agg t =σ(W t ·(Z t +u k s(t) )+b t )
[0033] where agg z 、agg t are the final representation vectors of manufacturing services and tasks respectively, σ is a nonlinear function such as ReLU, and W Z 、W t and b z 、b t They are the transformation weights of manufacturing service aggregation and task aggregation and the deviations of manufacturing service aggregation and task aggregation, u k s(z) is the k-layer neighborhood combination vector of manufacturing service z, u k s(t) is the k-layer neighborhood combination vector of task t.
[0034] Optionally, step S6 recommends the top K manufacturing services according to the interaction probability, namely, Top-K recommendation.
[0035] Compared with the existing technology, the beneficial effects of the present invention are as follows: the present invention proposes a manufacturing service recommendation method based on knowledge graph and graph convolutional network. When selecting the neighborhood, this method divides the importance of each neighbor in the neighborhood by the degree centrality index that measures the importance of the node, and selects according to the degree centrality, thereby reducing noise. At the same time, on the basis of the existing service-side neighborhood information representation unit, a task neighborhood information representation unit is added and combined with the self-attention mechanism to selectively and biasedly aggregate the manufacturing service neighbor information and the task neighbor information, and realize the feature representation of manufacturing services and tasks through the graph convolutional network. The present invention can not only fully learn the structural information and semantic information of the knowledge graph, but also realize the dual-end modeling representation, thereby improving the accuracy of the recommendation results.
Brief Description of the Drawings
[0036] Figure 1 It is a schematic flow chart of the main steps of the method of the present invention.
[0037] Figure 2 It is a schematic diagram of the knowledge graph of an embodiment of the method of the present invention.
[0038] Figure 3 Schematic diagram of neighbor sampling of degree centrality in an embodiment of the method of the present invention. [Specific implementation method]
[0039] To make the objects, technical solutions, and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with the examples and drawings. It should be understood that the exemplary embodiments of the present invention and their descriptions are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined in any manner as long as they do not conflict with each other.
[0040] See Figure 1-3 The present invention provides a manufacturing service recommendation method based on knowledge graph and graph convolutional network, which is characterized by comprising:
[0041] Step S1: Construct a manufacturing service-task information knowledge graph G using manufacturing service history data and historical task data; and read data information from the manufacturing service-task information knowledge graph G;
[0042] In an exemplary embodiment, as shown in the attached Figure 2 As shown, the manufacturing service-task information knowledge graph G in step 1 includes manufacturing service information and task information; the manufacturing service information includes manufacturing service skills, historical service task status, historical tasks, historical task objects and the industry neighborhood to which they belong; the task information includes the manufacturing service skills required for the task, the task object, and the task industry neighborhood.
[0043] Optionally, when a manufacturing service and a task have the same information, they can point to the same neighborhood entity in the manufacturing service-task information knowledge graph G.
[0044] In one embodiment, as shown in Table 1, the data information reading includes processing and reading the number of manufacturing services, the number of tasks, the number of triples, the number of neighborhoods, the number of skill types, the number of relationship types, and the relationship information between each data in the knowledge graph, dividing the data information according to the set ratio set according to actual needs, and using it as a training set, a validation set, and a test set for model training, verification, and testing, respectively.
[0045] Table 1 Information reading data
[0046]
[0047] Step S2: Calculate the degree centrality DC of each node in the manufacturing service-task information knowledge graph G, and perform a set number of neighbor sampling based on the calculated result;
[0048] In an exemplary embodiment, the DC calculation formula in the prior art may be used:
[0049]
[0050] Where K e is the number of edges connected to node e or the degree of node e, N is the total number of nodes including node e and its connected nodes, and N-1 is the number of edges connecting node e to all other nodes.
[0051] By sampling the neighbor relationship information, the adjacency matrix of entities and relationships is constructed, the node and relationship vectors are initialized, and an initialized low-dimensional vector is assigned to each entity and relationship according to actual needs.
[0052] Optionally, U services correspond to U rows of the matrix, and the first C neighbors are selected according to the degree centrality DC. The matrix is [U×C], and the adjacency matrix of entities and relationships is constructed through software modules or programming.
[0053] In an exemplary embodiment, the target node selects a neighbor sample with a neighbor number of 2 as shown in the following Figure 3 As shown, the two dotted lines represent two layers of information transmission, where DC i is the sorted degree centrality, for example: DC1>DC2>DC3>DC4.
[0054] Step S3: Input the manufacturing service neighbor data obtained in steps S1-S2 into the manufacturing service neighborhood information representation unit, and calculate the manufacturing service relationship score through preference propagation And normalized, according to the normalized manufacturing service relationship score Get the weighted manufacturing service neighbor vector For the weighted manufacturing service neighbor vector Use the self-attention mechanism to obtain the linear combination μ of the manufacturing service neighborhood representation vector s(z) ;
[0055] The service relationship score is generated in step S3 The formula is as follows:
[0056]
[0057] In the formula, z0 represents the initial vector of manufacturing service, r0 represents the initial vector of relationship, and g:R d ×R d →R is the score calculated by the inner product function, and d is the vector dimension;
[0058] During model training, each entity and relation is assigned an initialization vector based on the training.
[0059] Normalized manufacturing-service relationship score The calculation is as follows:
[0060]
[0061] Where N(z) is the neighbor set of the manufacturing service z target node after degree centrality processing;
[0062] Weighted manufacturing service neighbor vector after normalized score calculation The calculation is as follows:
[0063]
[0064] where e z To create the initial vector of neighbors of service z, the vector is read and vectorized in step S1;
[0065] The linear combination calculation formula of the manufacturing service neighborhood representation vector is as follows:
[0066]
[0067] in is the self-attention score of the manufacturing service z neighbor vector, and d is the vector dimension.
[0068] Step S4: Input the task neighborhood data obtained in steps S1-S2 into the task neighborhood information representation unit, and obtain a weighted linear combination of task neighborhood representation vectors based on the self-attention mechanism;
[0069] The linear combination of the weighted task neighborhood representation vectors in step S4 is calculated as follows:
[0070]
[0071] in is the self-attention score of the neighbor vector of task t, e t is the initial neighbor vector of task t, which is the vectorized after reading in step S1, and d is the vector dimension; N(t) is the neighbor set of the target node of task t after degree centrality processing.
[0072] Step S5: Input the linear combination of the manufacturing service neighborhood representation vectors obtained in steps S3-S4 and the manufacturing service initial vector into the graph convolutional neural network model. Input the weighted linear combination of the task neighborhood representation vectors and the task initial vector into the graph convolutional neural network model. Use the summation and aggregation method to extract features to obtain the final representation vector of the manufacturing service and the final representation vector of the task.
[0073] Optionally, the graph convolution in step S5 is a two-layer neural network structure, in which the calculation method of obtaining the final representation vector of the manufacturing service and task by summing and aggregating is as follows:
[0074] agg z =σ(W Z ·(Z0+u k s(z) )+b z )
[0075] agg t =σ(W t ·(Z t +u k s(t) )+b t )
[0076] where agg z The final representation vector for manufacturing services, agg t is the final representation vector of the task, σ is a nonlinear function such as ReLU, and W Z Transform weight for service aggregation, W t is the task aggregation transformation weight, b z Aggregate deviation for manufacturing services, b t is the task aggregation deviation, u k s(z) The k-th manufacturing service neighborhood representation vector linear combination of manufacturing service z, u k s(t) is the linear combination of the weighted task neighborhood representation vectors of task t at the kth layer, z0 represents the initial vector of the manufacturing service, z t Represents the initial vector of the task.
[0077] Step S6: Predict the interaction probability by inner product between the final representation vector of the manufacturing service obtained in step S5 and the final representation vector of the task Recommend manufacturing services based on interaction probability;
[0078] Optionally, the top K manufacturing services are recommended based on the interaction probability, i.e., Top-K recommendation, to obtain a reliable recommendation effect.
[0079] In step S6, the interaction probability between the manufacturing service and the task is calculated, and the top K manufacturing services are recommended to the task from high to low according to the interaction probability; K can be 1, 2, 5, 10, 20, 50, or 100.
[0080] In order to verify the effectiveness of the method of the present invention, the method of the present invention was compared with other conventional methods in terms of click-through rate (CTR) and Top-K recommendation.
[0081] The experimental environment of the method of the present invention is a 64-bit Windows 10 operating system, using an Intel(R) Core(TM) i5-9400 CPU, an NVIDIA GeForce GTX 1650 GPU, 24GB of memory, and 4GB of video memory; the number of model training rounds is 15, the entity embedding vector dimension is 32, the number of graph convolution layers is 2, the learning rate is 0.01, the regularization term coefficient is 0.0005, the batch size is 128, and the number of neighbor sampling is 20;
[0082] The methods used for comparison include: a recommendation method combining knowledge graphs and graph convolutions (KGCN), a knowledge graph convolutional network for recommendation systems with label smoothness regularization (KGNN-LS), a recommendation method based on collaborative knowledge-aware attention networks (CKAN), and a knowledge-aware graph convolutional network method with collaborative guidance for personalized recommendations (CG-KGR). Click-through rate (CTR) was compared using the AUC and F1 metrics, while Top-K (Top-20) classification was compared using Precision@20 and Recall@20. AUC is the area under the receiver operating characteristic (ROC) curve; the F1 metric is the harmonic mean of precision and recall, used to comprehensively evaluate the classification performance of the model. Precision@20 refers to the proportion of positive samples among the top 20 most likely samples predicted by the model; and Recall@20 refers to the proportion of positive samples among the top 20 most likely samples predicted by the model. This method performs better than conventional methods, as shown in Table 2.
[0083] Table 2 Comparison of click-through rate and Top-20
[0084]
[0085] The present invention proposes a manufacturing service recommendation method based on knowledge graph and graph convolutional network. When selecting the neighborhood, the degree centrality index for measuring the importance of nodes in network analysis is introduced to divide the importance of each neighbor in the neighborhood, and the neighbors are selected according to the degree centrality, which reduces noise, optimizes data quality, and improves input accuracy. On the basis of the existing service-side neighborhood information representation unit, a task neighborhood information representation unit is added, and the graph convolutional network and the self-attention mechanism are combined to selectively and biasedly aggregate the manufacturing service neighbor information and the task neighborhood information, so as to fully learn the structural information and semantic information of the knowledge graph. By selectively and biasedly aggregating the manufacturing service neighbor information and the task neighborhood information, a dual-end modeling representation is realized, thereby improving the accuracy of the recommendation results.
[0086] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A manufacturing service recommendation method based on knowledge graph and graph convolutional network, characterized in that: The following steps are involved: Step S1: Construct a manufacturing service-task information knowledge graph G using manufacturing service history data and historical task data; and read data information from the manufacturing service-task information knowledge graph G; Step S2: Calculate the degree centrality DC of each node in the manufacturing service-task information knowledge graph G, sample a set number of neighbors based on the calculated result, construct the entity and relationship adjacency matrix based on the sampled information, and initialize the node and relationship vectors; Step S3: Input the manufacturing service neighbor data obtained in steps S1-S2 into the manufacturing service neighborhood information representation unit, and calculate the manufacturing service relationship score through preference propagation And normalized, according to the normalized manufacturing service relationship score Get the weighted manufacturing service neighbor vector For the weighted manufacturing service neighbor vector Use the self-attention mechanism to obtain the linear combination μ of the manufacturing service neighborhood representation vector s(z) ; Step S4: Input the task neighborhood data obtained in steps S1-S2 into the task neighborhood information representation unit, and obtain a weighted linear combination of task neighborhood representation vectors based on the self-attention mechanism; The linear combination of the weighted task neighborhood representation vectors in step S4 is calculated as follows: in is the self-attention score of the neighbor vector of task t, e t is the initial neighbor vector of task t, d is the vector dimension; N(t) is the neighbor set of the target node of task t after degree centrality processing; Step S5: Input the linear combination of the manufacturing service neighborhood representation vector obtained in steps S3-S4 and the manufacturing service initial vector into the graph convolutional neural network model, and input the weighted task neighborhood representation vector linear combination and the task initial vector into the graph convolutional neural network model, and use the summation aggregation method to extract features to obtain the final representation vector agg of the manufacturing service. z And the final representation vector agg of the task t ; Step S6: Predict the interaction probability by inner product between the final representation vector of the manufacturing service obtained in step S5 and the final representation vector of the task Manufacturing service recommendations based on interaction probability.
2. The manufacturing service recommendation method based on knowledge graph and graph convolutional network according to claim 1 is characterized by: The service relationship score is generated in step S3 The formula is as follows: In the formula, z0 represents the initial vector of manufacturing service, r0 represents the initial vector of relationship, and g:R d ×R d →R is the score calculated by the inner product function, and d is the vector dimension; Normalized manufacturing-service relationship score The calculation is as follows: Where N(z) is the neighbor set of the manufacturing service z target node after degree centrality processing; Weighted manufacturing service neighbor vector after normalized score calculation The calculation is as follows: where e z The initial vector of neighbors for manufacturing service z; The linear combination calculation formula of the manufacturing service neighborhood representation vector is as follows: in is the self-attention score of the manufacturing service z neighbor vector, and d is the vector dimension.
3. The manufacturing service recommendation method based on knowledge graph and graph convolutional network according to claim 2 is characterized by: The method of obtaining the final representation vector of the manufacturing service and task by summing and aggregating in step S5 is as follows: agg z =σ(W Z ·(Z0+u k s(z) )+b z ) agg t =σ(W t ·(Z t +u k s(t) )+b t ) where agg z The final representation vector for manufacturing services, agg t is the final representation vector of the task, σ is a nonlinear function such as ReLU, and W Z Transform weight for service aggregation, W t is the task aggregation transformation weight, b z Aggregate deviation for manufacturing services, b t is the task aggregation deviation, u k s(z) is the k-layer neighborhood combination vector of manufacturing service z, u k s(t) is the k-layer neighborhood combination vector of task t, z0 represents the initial vector of manufacturing service, z t Represents the initial vector of the task.