An industrial product quality risk association method based on a graph neural network

By constructing a heterogeneous graph of industrial elements and introducing a meta-path self-learning layer and Bayesian deep learning methods, the problem of insufficient heterogeneous relationship modeling in existing technologies is solved, enabling accurate tracing of industrial quality risks and dynamic analysis of risk paths, and providing a reliability assessment of risk prediction.

CN121390890BActive Publication Date: 2026-04-10CHINA NAT INST OF STANDARDIZATION
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA NAT INST OF STANDARDIZATION
Filing Date
2025-10-27
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies have failed to fully utilize the diverse heterogeneous entities and rich semantic relationships within industrial data in industrial manufacturing, resulting in limited accuracy in quality risk correlation and traceability analysis.

Method used

A graph neural network-based approach is used to construct a heterogeneous graph of industrial elements. Node representation learning is performed through a graph attention network, and a meta-path self-learning layer is introduced to adaptively weight and fuse edge relationships. Finally, a Bayesian deep learning method based on Monte Carlo Dropout is used for risk prediction and source tracing analysis.

Benefits of technology

It enables automatic, accurate, and interpretable correlation analysis and source tracing of industrial quality risks, dynamically generates optimal message transmission paths, provides an inherent confidence metric for risk prediction, and identifies risk paths for specific raw materials and target products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121390890B_ABST
    Figure CN121390890B_ABST
Patent Text Reader

Abstract

The application discloses an industrial product quality risk correlation method based on a graph neural network, relates to the field of industrial manufacturing, and comprises the following steps: collecting multi-source industrial data, preprocessing the multi-source industrial data, obtaining a standardized data table, constructing an industrial element heterogeneous graph based on the standardized data table, inputting the industrial element heterogeneous graph into a graph attention network base model for node representation learning, setting a product batch node in the industrial element heterogeneous graph as a prediction target, and setting a historical quality detection result as a supervised label of a supervised learning task, and introducing a meta-path self-learning layer in a message passing process of the graph attention network base model. The application upgrades deterministic prediction to probabilistic inference, provides an inherent confidence measure for each risk prediction value, and realizes automatic, accurate and interpretable correlation analysis and traceability positioning of industrial quality risks.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of industrial manufacturing, and particularly relates to an industrial product quality risk correlation method based on a graph neural network. BACKGROUND

[0002] In the field of industrial manufacturing, traditional quality risk management methods mainly rely on statistical process control and offline analysis of a single data source. With the popularity of industrial Internet of Things and manufacturing execution systems, multi-source heterogeneous data acquisition has become possible, which has promoted the development of data-driven quality risk analysis technology. In recent years, graph structure learning methods have been introduced into this field because they can naturally represent complex correlation relationships between entities. By constructing a homogeneous graph with product batches as nodes and production process flows as edges, graph convolution networks are used to aggregate neighbor node information to achieve batch quality prediction.

[0003] However, the above prior art solution still has limitations in dealing with the complexity and uncertainty of real industrial scenarios. The core of this solution is to construct a relatively simplified homogeneous graph structure, which has a single node type and edge relationship. It fails to fully utilize the various entities and rich semantic relationships between them in industrial data. Industrial production elements include devices, personnel, raw materials, and environment, which have different influence paths and strengths on the final product quality. SUMMARY

[0004] In view of the above existing problems, the present application is proposed.

[0005] Therefore, the present application provides an industrial product quality risk correlation method based on a graph neural network to solve the problem of insufficient modeling of heterogeneous relationships between industrial elements in the prior art, which limits the accuracy of risk correlation and traceability analysis.

[0006] To solve the above technical problems, the present application provides the following technical solutions:

[0007] In a first aspect, the present application provides an industrial product quality risk correlation method based on a graph neural network, which includes collecting multi-source industrial data and preprocessing the multi-source industrial data to obtain a standardized data table, constructing an industrial element heterogeneous graph based on the standardized data table;

[0008] inputting the industrial element heterogeneous graph into a graph attention network base model for node representation learning, and setting a product batch node in the industrial element heterogeneous graph as a prediction target and a historical quality detection result as a supervised learning task with a supervision label;

[0009] In the message passing process of the graph attention network base model, a meta-path self-learning layer is introduced, the meta-path self-learning layer adaptively weights and fuses different types of edge relations through a learnable attention mechanism, and dynamically generates an optimal message passing path for each product batch node;

[0010] A Bayesian deep learning method based on Monte Carlo Dropout is used to perform forward inference sampling on the graph attention network base model of the meta-path self-learning layer, to obtain a sampling result, calculate the mean and variance of the quality risk prediction value of each product batch node according to the sampling result, and generate a product batch node quality risk report;

[0011] Based on the product batch node quality risk report, in combination with the attention weights generated by the meta-path self-learning layer, a high-risk product batch node is subjected to risk source correlation analysis and visualized traceability positioning.

[0012] As a preferred scheme of the industrial product quality risk correlation method based on the graph neural network, wherein: multi-source industrial data is collected, and the multi-source industrial data is preprocessed to obtain a standardized data table, including the following steps:

[0013] Multi-source industrial data is collected from manufacturing execution units, quality management units, enterprise resource planning units and Internet of Things sensors;

[0014] The multi-source industrial data is subjected to data cleaning to process missing values and abnormal values, and the multi-source industrial data after data cleaning is subjected to data alignment to be correlated to a unified product batch identifier;

[0015] The multi-source industrial data after data alignment is subjected to data normalization to scale numerical features to a common interval, and the multi-source industrial data after data normalization is integrated to generate a standardized data table.

[0016] As a preferred scheme of the industrial product quality risk correlation method based on the graph neural network, wherein: based on the standardized data table, an industrial element heterogeneous graph is constructed, including the following steps:

[0017] Based on the standardized data table, product batches, production equipment, operating personnel, raw material batch entity objects and the correlation between entity objects are identified and extracted;

[0018] The extracted entity objects are mapped to nodes of the industrial element heterogeneous graph with type attributes and feature attributes, and according to the extracted correlation, directed edges of a specific semantic type are created between the nodes of the industrial element heterogeneous graph;

[0019] Relationship description information is extracted from the standardized data table, edge attribute features are added to the created directed edges, nodes and edges with attributes are integrated, and an industrial element heterogeneous graph is obtained.

[0020] As a preferred scheme of the industrial product quality risk correlation method based on the graph neural network, wherein: the industrial element heterogeneous graph is input into a graph attention network base model for node representation learning, and a supervised learning task is set with a product batch node in the industrial element heterogeneous graph as a prediction target and a historical quality detection result as a supervised label, including the following steps:

[0021] The industrial element heterogeneous graph is converted into a weighted projection homogeneous graph composed of product batch nodes based on a pre-defined semantic path, and an initial feature vector is generated for each product batch node by aggregating adjacent node attributes;

[0022] The weighted projection homogeneous graph is input into the graph attention network base model, the priority of node feature similarity and graph topology structure attention is defined through a domain knowledge rule base, and the fusion weight of similarity attention and graph topology structure attention is adjusted in coordination according to a dynamic context scenario, to generate an updated product batch node representation containing complex neighborhood semantic information;

[0023] Based on the updated product batch node representation and the historical quality detection result as a label, the graph attention network base model is trained and learned for a quality risk pattern by minimizing a composite loss function combining a prediction error and a topology preservation loss, and after convergence in the optimization process, a trained graph attention network base model is obtained.

[0024] As a preferred scheme of the industrial product quality risk correlation method based on the graph neural network, wherein: in the message passing process of the graph attention network base model, a meta-path self-learning layer is introduced, the meta-path self-learning layer adaptively weights and fuses different types of edge relationships through a learnable attention mechanism, dynamically generates an optimal message passing path for each product batch node, including the following steps:

[0025] Third-order feature interaction encoding is adopted for each meta-path instance, product batch nodes, intermediate nodes and product batch nodes are connected based on the meta-path instance, a linear transformation is performed on the feature vectors of the nodes through a learnable weight matrix, the transformed features are multiplied element by element, and then an activation function is processed to obtain a meta-path instance feature vector;

[0026] The transformed features of the nodes and the path feature vectors are spliced from the perspectives of the start node and the end node of the path, a score is calculated through an attention vector, and the scores of the start node and the end node are added to obtain an original attention score of the path instance;

[0027] The initial attention weight is obtained by using a softmax function based on the original score of the path instance connecting the same pair of nodes, and the attention weight is adjusted according to a decay factor based on the path length;

[0028] The important path is sparsified by using a dynamic threshold, and the weight output by the attention head is geometrically averaged to obtain the path instance level attention weight by using a multi-head attention mechanism;

[0029] The path instance level attention weight is pruned to obtain the pruned attention weight;

[0030] A dynamic updating strategy is adopted to recalculate the complete attention weight, the change of the weight is smoothed by using an exponential moving average, and the optimal message passing path is dynamically generated for each product batch node.

[0031] As a preferred scheme of the industrial product quality risk association method based on the graph neural network, wherein: the Bayesian deep learning method based on Monte Carlo Dropout is used to perform forward inference sampling on the graph attention network base model of the meta-path self-learning layer, and a sampling result is obtained, including the following steps:

[0032] The Dropout layer is activated in the graph attention network base model of the meta-path self-learning layer, and the dropout probability is set, the independent forward propagation is performed for each product batch node, the random sub-model of the meta-path self-learning layer is generated through different Dropout masks each time, and different path attention weights and node prediction results are output;

[0033] Based on the sampled path attention weight set, the stability evaluation rule library is used to map the empirical mean and variance estimation value of the attention weight set of each meta-path instance, and the stable key path is screened;

[0034] The prediction result of each product batch node is converted into a probability distribution result of the risk level by using a Softmax function;

[0035] The meta-path instance is associated with the corresponding node prediction result to generate a sampling result report.

[0036] As a preferred scheme of the industrial product quality risk association method based on the graph neural network, wherein: the mean and variance of the quality risk prediction value of each product batch node are calculated according to the sampling result, and a product batch node quality risk report is generated, including the following steps:

[0037] Based on the product batch node prediction result set obtained by Monte Carlo Dropout sampling, the mean and variance of the quality risk prediction of each product batch node are calculated;

[0038] The mean and variance of the quality risk prediction value of each product batch node are used to obtain a standardized score of each product batch node;

[0039] By analyzing the statistical distribution of the mean and standardized score of the quality risk prediction value of the product batch node in the historical data, a standard threshold is set, and according to the mean and standardized score of the quality risk prediction value of the product batch node, the risk level of each product batch node is dynamically divided in combination with the standard threshold;

[0040] From the meta-path instance with high average attention weight in the multiple sampling results of the meta-path self-learning layer, the mean of the quality risk prediction value of the product batch node, the standardized score, the risk level and the key risk path are integrated to generate a product batch node quality risk report.

[0041] As a preferred scheme of the industrial product quality risk correlation method based on the graph neural network, wherein: based on the product batch node quality risk report, the attention weight generated by the meta-path self-learning layer is combined to perform risk source correlation analysis and visualized traceability positioning on the high-risk product batch node, including the following steps:

[0042] Based on the risk level marked in the product batch node quality risk report, a product batch node set with a high risk level is screened out;

[0043] For each high-risk product batch node, the meta-path instance of the attention weight is extracted from the attention weight generated by the meta-path self-learning layer to perform risk propagation path;

[0044] Based on the high-risk product batch node, all nodes and edges involved in the meta-path instance are combined to construct a risk propagation subgraph;

[0045] In the risk propagation subgraph, according to the attention weight generated by the meta-path self-learning layer, the risk contribution of adjacent nodes to the high-risk product batch node is calculated;

[0046] The risk propagation subgraph and the node risk contribution are mapped to a visual interface, and color depth and path highlighting are used for visual rendering of risk traceability positioning.

[0047] In a second aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and wherein the computer program is executed by the processor to implement any step of the industrial product quality risk correlation method based on the graph neural network according to the first aspect of the present application.

[0048] In a third aspect, the present application provides a computer readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements any step of the industrial product quality risk association method based on a graph neural network according to the first aspect of the present application.

[0049] The present application has the beneficial effects that: by introducing the meta-path self-learning layer, the complex semantic relationship in the industrial element heterogeneous graph can be adaptively learned, and the optimal message passing path is dynamically generated, so that deep association analysis of multiple risk propagation chains is realized, the risk path of a specific raw material and target product is accurately identified, the Bayesian inference method based on Monte Carlo Dropout is used to upgrade the deterministic prediction to probabilistic inference, to provide an inherent confidence measure for each risk prediction value, and automatic, accurate and interpretable association analysis and traceability positioning of industrial quality risk are realized. BRIEF DESCRIPTION OF DRAWINGS

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

[0051] Fig. 1 The flowchart of the industrial product quality risk association method based on a graph neural network.

[0052] Fig. 2 The flowchart of the graph attention network base model training.

[0053] Fig. 3 The flowchart of the industrial element heterogeneous graph construction.

[0054] Fig. 4 The inference flowchart of the Bayesian deep learning method. DETAILED DESCRIPTION

[0055] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings of the specification.

[0056] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, but the present application can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the scope of the present application, therefore the present application is not limited to the specific embodiments disclosed below.

[0057] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0058] Reference Figs. 1-4 As one embodiment of the present invention, this embodiment provides an industrial product quality risk association method based on graph neural networks, comprising the following steps:

[0059] S1. Collect multi-source industrial data and preprocess the multi-source industrial data to obtain a standardized data table.

[0060] S1.1 Collect multi-source industrial data from manufacturing execution units, quality management units, enterprise resource planning units, and IoT sensors.

[0061] Furthermore, in industrial environments, data records containing product batch numbers, process codes, and production timestamps are collected from the Manufacturing Execution Unit (MLU); data records containing product batch numbers, inspection items, measured values, and judgment conclusions are collected from the Quality Management Unit (QM); material master data containing raw material batch numbers, supplier information, and warehousing time are collected from the Enterprise Resource Planning (ERP) Unit; and time-series data streams containing equipment numbers, timestamps, temperature, pressure, and vibration intensity are collected from IoT sensors. These collectively constitute multi-source industrial data, ensuring the comprehensiveness of data collection and covering core elements affecting product quality such as production, inspection, material, and equipment status.

[0062] S1.2 Perform data cleaning on multi-source industrial data to handle missing and outlier values, and perform data alignment on the cleaned multi-source industrial data to associate it with a unified product batch identifier.

[0063] Furthermore, data cleaning is performed on the multi-source industrial data to identify and handle missing and outlier values. For missing values, the average sensor readings of the same equipment at adjacent time points are used to fill in the gaps; for outliers, they are identified and corrected based on the control lines of the process parameters. Data alignment is then performed on the cleaned multi-source industrial data, using the product batch number as the core key to associate data records from different sources under a unified product batch identifier. This ensures that all data within the same batch are consistent in temporal logic, improves data quality and consistency, eliminates noise and misaligned data interference with subsequent modeling, and guarantees that all analyses can accurately correlate to the correct production batch.

[0064] S1.3. Normalize the multi-source industrial data after data alignment to scale the numerical features to a common range, and integrate the normalized multi-source industrial data to generate a standardized data table.

[0065] Further, data normalization operation is performed on the data-aligned multi-source industrial data, and numerical features with different dimensions are scaled to a common numerical interval. For example, numerical features such as temperature sensor readings, pressure sensor readings, etc. are uniformly mapped to a range of zero to one through linear transformation. The multi-source industrial data after data normalization is integrated, and is organized into structured records according to product batch identifiers to generate a normalized data table that is standardized and can be directly used for subsequent graph construction operations.

[0066] S2, based on the normalized data table, an industrial element heterogeneous graph is constructed.

[0067] S2.1, based on the normalized data table, product batches, production equipment, operating personnel, raw material batch entity objects, and the association relationships between the entity objects are identified and extracted.

[0068] Further, based on the normalized data table, all record rows are scanned to identify entity objects with unique identifiers, including product batch entity objects, production equipment entity objects, operating personnel entity objects, and raw material batch entity objects. The coexistence relationships between the entity objects in the record rows are analyzed, the association relationships between the entity objects are extracted, and the association relationships include production relationships between product batch entity objects and production equipment entity objects, operation relationships between product batch entity objects and operating personnel entity objects, and source relationships between product batch entity objects and raw material batch entity objects. The basic connections between the entity elements constituting the graph are accurately extracted from the structured data, and the necessary nodes and edges of the heterogeneous graph are provided.

[0069] S2.2, the extracted entity objects are mapped to nodes of the industrial element heterogeneous graph with type attributes and feature attributes, and directed edges with explicit semantic types are created between the nodes of the industrial element heterogeneous graph according to the extracted association relationships.

[0070] Further, the extracted entity objects are mapped as nodes of the industrial element heterogeneous graph, and each node is assigned a type attribute, including product batch node type, production equipment node type, operator node type, and raw material batch node type. Static features related to the entity objects are extracted from the normalized data table as feature attributes of the nodes. The product batch node feature attributes include planned yield, and the production equipment node feature attributes include equipment model. According to the extracted correlation relationship, a directed edge is created between the nodes of the industrial element heterogeneous graph having the correlation relationship. The semantic type of the directed edge is determined by the correlation relationship. A directed edge with a semantic type of production is created between the production equipment node and the product batch node. The data entities and their relationships are converted into nodes and edges with clear semantics in the graph data structure, and a topological skeleton reflecting the real interaction relationship between the industrial site elements is established.

[0071] S2.3, relationship description information is extracted from the normalized data table, edge attribute features are attached to the created directed edges, nodes and edges with attributes are integrated, and an industrial element heterogeneous graph is obtained.

[0072] Further, information describing the characteristics of the relationship itself is extracted from the normalized data table as relationship description information. Edge attribute features are attached to the created directed edges, and the edge attribute features are derived from the relationship description information. For example, the production duration is attached to the production directed edge as an edge attribute feature, and the raw material feeding ratio is attached to the derived directed edge as an edge attribute feature. All nodes of the industrial element heterogeneous graph with type attributes and feature attributes and all directed edges with attached edge attribute features are integrated to form a graph structure data object containing complete node information and edge information, and an industrial element heterogeneous graph is obtained.

[0073] S3, the industrial element heterogeneous graph is input into the graph attention network base model for node representation learning, and a supervised learning task is set with the product batch node in the industrial element heterogeneous graph as the prediction target and the historical quality detection result as the supervision label.

[0074] S3.1, the industrial element heterogeneous graph is converted into a weighted projection homogeneous graph composed of product batch nodes based on a pre-defined semantic path, and the attributes of adjacent nodes are aggregated to generate an initial feature vector for each product batch node.

[0075] Further, based on the predefined semantic path, the product batch production in the equipment production in the product batch converts the industrial element heterogeneous graph, and all instances satisfying the semantic path are identified, for example, product batch A production in equipment X production in product batch B, a connection weight is calculated for each pair of product batch nodes connected by the path, the connection weight can be determined based on the number of path instances or the attribute similarity of the intermediate nodes on the path, the product batch nodes are taken as nodes, the semantic path instance connection weight is taken as an edge, and a weighted projection homogeneous graph is constructed, the attribute characteristics of the directly adjacent equipment nodes, personnel nodes, and raw material batch nodes of each product batch node in the original industrial element heterogeneous graph are aggregated, the initial feature vector of the product batch node is generated by taking the mean value or splicing operation, the complex heterogeneous graph is simplified into a form suitable for the processing of the graph attention network basic model, and the initial feature of the product batch node contains the context information of the direct production elements by aggregating the neighbor information.

[0076] S3.2, input the weighted projection homogeneous graph into the graph attention network basic model, define the priority of node feature similarity and graph topological structure attention through the domain knowledge rule library, and cooperatively adjust the fusion weight of the similarity attention and the graph topological structure attention according to a dynamic context scene, to generate an updated product batch node representation containing complex neighborhood semantic information.

[0077] Further, the priority of node feature similarity and graph topological structure attention is defined through the domain knowledge rule library, for example, a rule can stipulate that when the node feature difference is less than a specific threshold, the topological structure attention is more dependent, the fusion weight of the similarity attention and the graph topological structure attention is cooperatively adjusted according to a dynamic context scene, for example, different stages of model training, a higher weight is given to the topological structure attention in the early stage of training to quickly establish a correlation framework, and the weight of the feature similarity attention is increased in the later stage of training to make fine distinction. The adjustment of the fusion weight is realized through a learnable scalar parameter, the parameter is optimized through gradient descent in the training process, so that the graph attention network basic model can flexibly combine semantic similarity and network structure characteristics, dynamically adjust the information aggregation strategy, and generate an updated product batch node representation that more comprehensively and accurately reflects the semantic position of the node in the graph.

[0078] S3.3, based on the updated product batch node representation and the historical quality detection result as a label, the graph attention network basic model is trained and learned by minimizing a composite loss function combining a prediction error and a topological preservation loss, a quality risk pattern is learned, after convergence in the optimization process, the trained graph attention network basic model is obtained.

[0079] Further, based on the updated product batch node representation and historical quality detection results as labels, a supervised learning task is constructed, a composite loss function is defined, which is composed of a prediction error loss and a topology preservation loss. The prediction error loss measures the difference between the model's predicted value of the product batch node risk and the true value of the historical quality detection result, and the mean square error or cross-entropy loss is adopted. The topology preservation loss encourages the nodes originally connected by edges in the weighted projected homogeneous graph to be closer in the representation space. For example, a graph reconstruction loss based on node representation is adopted, and the parameters in the graph attention network base model are iteratively optimized by minimizing the composite loss function through the gradient descent algorithm, so as to learn the mode of product quality risk in the graph representation space. After the optimization process converges, that is, the loss function value is stable and no longer significantly decreases, the trained graph attention network base model is obtained. By jointly optimizing the prediction accuracy and topology structure preservation, it is ensured that the learned node representation not only has strong prediction ability but also can reflect the inherent structural relationship of the original graph data, thereby enhancing the generalization ability and robustness of the graph attention network base model.

[0080] S4. In the message passing process of the graph attention network base model, a meta-path self-learning layer is introduced. The meta-path self-learning layer adaptively weights and fuses different types of edge relationships through a learnable attention mechanism, and dynamically generates the optimal message passing path for each product batch node.

[0081] S4.1, a three-order feature interaction encoding is adopted for each meta-path instance. Based on the connection of the product batch node, the intermediate node and the product batch node, the feature vectors of the nodes are linearly transformed through a learnable weight matrix, the transformed features are multiplied element by element, and then processed through an activation function to obtain the meta-path instance feature vector.

[0082] Further, a three-order feature interaction encoding is adopted for each meta-path instance. The meta-path instance, such as the product batch node produced in the equipment node produced in the product batch node, connects the starting product batch node, the intermediate equipment node and the ending product batch node. Through the learnable weight matrix, the starting weight matrix, the intermediate weight matrix and the ending weight matrix, the feature vectors of the starting product batch node, the intermediate equipment node and the ending product batch node are linearly transformed, the transformed three feature vectors are multiplied element by element, and the result of the element-by-element multiplication is processed through a nonlinear activation function such as ReLU to obtain a fixed-dimensional meta-path instance feature vector.

[0083] S4.2, from the perspective of the starting node and the ending node of the path respectively, the transformed features of the nodes are spliced with the path feature vector, the score is calculated through the attention vector, and the scores of the starting node and the ending node are added to obtain the original attention score of the path instance.

[0084] The expression for the overall attention score is:

[0085] ;

[0086] in, For metapath instances The overall attention score, To convert a column vector into a row vector, Query the transformation matrix starting from the point of view. For metapath instances starting node eigenvectors, The starting side key transformation matrix, For metapath instances Path feature vectors, To query the transformation matrix at the endpoint, The endpoint side key transformation matrix, For metapath instances End point eigenvectors.

[0087] Furthermore, path importance is calculated from the perspectives of the starting and ending nodes. From the starting node perspective, the starting query vector (obtained by multiplying the starting query transformation matrix by the feature vector of the starting product batch node) is concatenated with the starting sidekey vector (obtained by multiplying the starting sidekey transformation matrix by the feature vector of the meta-path instance). A shared attention vector is then used to perform a dot product operation with the concatenated vector, and the LeakyReLU activation function is applied to obtain the attention score from the starting node's perspective. From the ending node perspective, the ending query vector (obtained by multiplying the ending query transformation matrix by the feature vector of the ending product batch node) is concatenated with the ending sidekey vector (obtained by multiplying the ending sidekey transformation matrix by the feature vector of the meta-path instance). A shared attention vector is then used to perform a dot product operation with the concatenated vector, and the LeakyReLU activation function is applied to obtain the attention score from the ending node's perspective. Finally, the attention scores from the starting and ending nodes are added together to obtain the original attention score for the meta-path instance.

[0088] It should be noted that by calculating path importance from the perspectives of both the starting and ending nodes of the meta-path instance, a two-way evaluation of the path's semantic value is achieved. Specifically, the starting node perspective evaluates the importance of the path as an information source, while the ending node perspective evaluates the importance of the path as an information receiving target. The scores from both perspectives are added together to obtain the comprehensive raw attention score, ensuring that the assessment of path importance considers both the starting contribution of information propagation and the needs of the ending point, thus reflecting the semantic role and connection strength of the meta-path instance in the overall graph structure more comprehensively and evenly.

[0089] The fundamental difference between the present technology and the prior art is that a bidirectional attention evaluation framework is introduced. The method of the prior art is essentially unidirectional, only capable of evaluating the contribution of neighboring nodes to the center node. The present technology innovatively regards the meta-path instance as a whole, independently calculates the importance scores from the start node and the end node of the path, and fuses them. This bidirectional evaluation mechanism enables the present technology to perceive the bidirectional semantic flow of the path, thus more accurately identifying key paths that are important to both parties in a complex heterogeneous graph. This breaks through the limitation of the prior art that only measures one-way influence, and improves the ability to describe complex relationships.

[0090] S4.3, based on the original scores of the path instances connecting the same pair of nodes, using a softmax function to obtain the initial attention weight, and introducing a decay factor according to the path length to adjust the attention weight.

[0091] Further, based on the original attention scores of all meta-path instances connecting the same pair of product batch nodes, a softmax function is used for normalization to obtain the initial attention weight of each meta-path instance. According to the path length of the meta-path instance, a decay factor is introduced, and the longer the path length, the smaller the decay factor. The initial attention weight is scaled to obtain the adjusted attention weight.

[0092] S4.4, using a dynamic threshold to sparsify important paths, and using a multi-head attention mechanism to perform geometric mean operation on the weights output by the attention heads to obtain path instance-level attention weights.

[0093] Further, a dynamic threshold is used to sparsify important paths, and the dynamic threshold takes the mean of the top-k values of all adjusted attention weights. The weights below the dynamic threshold are set to zero, and the weights above the dynamic threshold are retained. The retained weights are re-normalized using a softmax function, and a multi-head attention mechanism is used to independently repeat the above process multiple times, each time using different learnable parameters to obtain multiple sets of attention weights. The weights output by each attention head in the multi-head attention mechanism are geometrically averaged to obtain more stable path instance-level attention weights.

[0094] S4.5, clipping the path instance-level attention weights to obtain clipped attention weights.

[0095] Further, the path instance-level attention weights are clipped to limit the numerical range of the weights within a predetermined interval, such as between zero and one, to obtain the clipped attention weights.

[0096] S4.6, Recompute the complete attention weights with dynamic update strategy, smooth the weight changes by exponential moving average, and dynamically generate the optimal message passing path for each product batch node.

[0097] Further, the complete attention weights are recomputed every fixed number of iterations with a dynamic update strategy, the weight changes are smoothed by exponential moving average, the mixing ratio of new and old weights is controlled using a smoothing coefficient, the latest attention weights after pruning are used to select the path instance set with the highest attention weight for each product batch node, and the optimal message passing path is dynamically generated.

[0098] S5, use the Bayesian deep learning method based on Monte Carlo Dropout to perform forward inference sampling on the graph attention network base model of the meta-path self-learning layer, and obtain the sampling results.

[0099] S5.1, activate the Dropout layer in the graph attention network base model of the meta-path self-learning layer and set the dropout probability, independently forward propagate each product batch node, and generate different random sub-models of the meta-path self-learning layer by different Dropout masks each time, output different path attention weights and node prediction results.

[0100] Further, multiple independent forward propagations are performed for each product batch node, different random Dropout masks are generated during each forward propagation, resulting in partial random dropout of random sub-model parameters and thus different meta-path self-learning layer sub-models, and each sampling output contains two parts: the attention weight set of all meta-path instances under the current Dropout mask and the product batch node prediction result generated based on the current attention weight aggregation.

[0101] S5.2, based on the sampled path attention weight set, map the empirical mean and variance estimates of each meta-path instance's attention weight set through the stability evaluation rule library, and select stable key paths.

[0102] Further, based on the path attention weight sets obtained through multiple samplings, the stability evaluation rule library is applied for analysis, the mean and variance of the attention weight of each meta-path instance in all samplings are calculated, the mean reflects the overall importance of the path, and the variance represents the weight stability, based on the statistical distribution characteristics of the mean and variance of the attention weight of all meta-path instances in the historical data, threshold values are set, and meta-path instances with a mean higher than the preset threshold and a variance lower than the preset threshold are marked as stable key paths.

[0103] S5.3, use the Softmax function to convert the prediction results of each product batch node into a probability distribution result of risk levels.

[0104] Further, the Softmax function is applied to process the multiple prediction result sets of each product batch node. If the prediction task is a classification problem, the average of the class probability vectors output by each sampling is taken to obtain the final risk level probability distribution. If the prediction task is a regression problem, the mean of the sampling output is directly taken as the final risk score. The random prediction results obtained by Monte Carlo sampling are converted into deterministic outputs with statistical significance to provide clear and interpretable evaluation conclusions for the risk report.

[0105] S5.4, associate the meta-path instance with the corresponding node prediction result, and generate a sampling result report.

[0106] Further, the stable critical path set is associated and integrated with the final prediction result of the product batch node. The attention weight mean and variance statistics are added to each stable critical path to form a path stability description. The risk level probability distribution or risk score and prediction variance are added to each product batch node. The integrated data is organized according to the product batch number to generate a structured sampling result report.

[0107] S6, calculate the mean and variance of the quality risk prediction value of each product batch node according to the sampling result, and generate a product batch node quality risk report.

[0108] S6.1, based on the prediction result set of the product batch node obtained by Monte Carlo Dropout sampling, calculate the mean and variance of the quality risk prediction of each product batch node.

[0109] The mean expression of the quality risk prediction is:

[0110] ;

[0111] wherein, is the mean of the quality risk prediction of the product batch node , is the number of Monte Carlo sampling, is is the th Monte Carlo Dropout sampling number of the prediction output of the product batch node , is the index of the sampling number;

[0112] The variance expression of the quality risk prediction value is:

[0113] ;

[0114] wherein, is the variance of the quality risk prediction value of the product batch node ;

[0115] Further, the mean and variance of the quality risk prediction value of each product batch node are independently calculated. The mean of the quality risk prediction value is calculated as the arithmetic mean of all sampling prediction results, and the specific formula is that the mean of the quality risk prediction value is equal to one divided by the sampling number multiplied by the sum of each sampling prediction value. The variance of the quality risk prediction value is calculated as the average of the square sum of the difference between all sampling prediction values and the mean, and the specific formula is that the variance of the quality risk prediction value is equal to one divided by the sampling number multiplied by the sum of the square of each sampling prediction value minus the mean.

[0116] The fundamental difference between the present technical solution and the prior art is that the prior art usually only performs a deterministic forward propagation on the graph neural network to output a single risk prediction value, while the present technical solution obtains multiple prediction results through Monte Carlo Dropout sampling, and calculates the prediction mean and variance of each product batch node based thereon. This difference enables the present technical solution to not only provide point estimation of the risk level, but also realize the leap from predicting risk to evaluating the reliability of the prediction.

[0117] S6.2, using the mean and variance of the quality risk prediction value of each product batch node, to obtain the standardized score of each product batch node.

[0118] Further, the variance of the quality risk prediction value is divided by the sum of the mean of the quality risk prediction value and a very small constant, and the constant is used to prevent the case where the divisor is zero. The quotient obtained is the standardized score. This standardized score is a dimensionless value.

[0119] S6.3, by analyzing the statistical distribution of the mean and standardized score of the quality risk prediction value of the product batch node in the historical data, setting a standard threshold, and dynamically dividing the risk level of each product batch node according to the mean and standardized score of the quality risk prediction value of the product batch node in combination with the standard threshold.

[0120] Further, by analyzing the joint distribution of the mean and standardized score of the quality risk prediction value of the product batch node in the historical data, setting a standard threshold for risk level division, the standard threshold includes a mean high threshold for distinguishing between high risk and medium risk, a mean low threshold for distinguishing between low risk and medium risk, and a standardized score threshold for distinguishing between high uncertainty and low uncertainty, and dynamically dividing the risk level of each product batch node according to the mean and standardized score of the quality risk prediction value of the product batch node in combination with the standard threshold.

[0121] S6.4, extracting meta-path instances with high average attention weight from the multiple sampling results of the meta-path self-learning layer, integrating the mean of the quality risk prediction value, the standardized score, the risk level and the key risk path of the product batch node, and generating a quality risk report of the product batch node.

[0122] Further, from the multiple sampling results of the meta-path self-learning layer, the meta-path instances with high average attention weight are extracted as key risk paths. The mean value, standardized score, risk level of the quality risk prediction value of each product batch node, and the information of the associated key risk path are integrated. The information is organized in a structured format, such as generating a record for each product batch node, which contains the node identifier, the predicted mean value, the standardized score, the risk level, and the key path list. Finally, all node records are summarized to generate a complete product batch node quality risk report.

[0123] S7, based on the product batch node quality risk report, combined with the attention weight generated by the meta-path self-learning layer, the risk source correlation analysis and visual traceability positioning of high-risk product batch nodes are carried out.

[0124] S7.1, based on the risk level marked in the product batch node quality risk report, the product batch node set with high risk level is screened out.

[0125] Further, based on the risk level field marked in the product batch node quality risk report, all product batch node records in the report are scanned, and the product batch nodes with high risk level in the risk level field value are screened out. The identifiers of the high-risk product batch nodes are collected to form a high-risk product batch node set.

[0126] S7.2, for each high-risk product batch node, the meta-path instance of the attention weight is extracted from the attention weight generated by the meta-path self-learning layer to carry out the risk propagation path.

[0127] Further, for each node in the high-risk product batch node set, from the attention weight data generated by the meta-path self-learning layer in multiple samplings, all meta-path instances with the high-risk product batch node as the starting point or the terminal point are extracted, and the paths with the average attention weight of the meta-path instance higher than the preset threshold are screened out. These paths are marked as key risk propagation paths.

[0128] S7.3, taking the high-risk product batch node as the core, and combining all nodes and edges involved in the meta-path instance, a risk propagation subgraph is constructed.

[0129] Further, taking each high-risk product batch node as the core, the key risk propagation path is traversed, and all nodes involved in the path, including other product batch nodes, equipment nodes, personnel nodes, raw material batch nodes, and directed edges connecting these nodes, are extracted to construct a risk propagation subgraph with the high-risk product batch node as the center, containing the complete risk conduction topological relationship.

[0130] S7.4、In the risk propagation subgraph, according to the attention weight generated by the meta-path self-learning layer, the risk contribution degree of the adjacent node to the high-risk product batch node is calculated.

[0131] Further, in the constructed risk propagation subgraph, for each node directly adjacent to the high-risk product batch node, according to the average value of the attention weight of the meta-path instance connecting the adjacent node and the high-risk node generated by the meta-path self-learning layer, the risk contribution degree of the adjacent node to the high-risk product batch node, the contribution degree can be directly represented by the average value of the attention weight or normalized.

[0132] S7.5, mapping the risk propagation subgraph and the node risk contribution degree to the visualization interface, using color depth and path highlighting for risk trace positioning visualization rendering.

[0133] Further, the topological structure of the risk propagation subgraph and the risk contribution degree value of each node are mapped to the visualization interface, the color depth is used to render the risk contribution degree of the node, the color of the node with higher contribution degree is darker, the key risk propagation path is highlighted, and a visual map showing the risk source and propagation chain is formed.

[0134] The embodiment also provides a computer device suitable for the industrial product quality risk association method based on a graph neural network, including a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to realize the industrial product quality risk association method based on the graph neural network proposed in the above embodiment.

[0135] The computer device can be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be achieved through WIFI, operator network, NFC (near field communication) or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device. It can also be an external keyboard, touchpad or mouse, etc.

[0136] The embodiment also provides a storage medium on which a computer program is stored, the program being executed by a processor to implement the method for correlating industrial product quality risks based on a graph neural network as proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk, or an optical disk.

[0137] To sum up, by introducing the meta-path self-learning layer, the complex semantic relationship in the industrial element heterogeneous graph can be adaptively learned, and the optimal message passing path can be dynamically generated, so that deep correlation analysis of multiple risk propagation chains is realized, and the risk path of a specific raw material and a target product is accurately identified, the Bayesian inference method based on Monte Carlo Dropout is used to upgrade the deterministic prediction to probabilistic inference, and an inherent confidence measure is provided for each risk prediction value, and automatic, accurate and interpretable correlation analysis and traceability positioning of industrial quality risks are realized.

[0138] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application but not limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application, and all of them should be covered in the scope of the claims of the present application.

Claims

1. An industrial product quality risk association method based on a graph neural network, characterized in that: Comprising, Collecting multi-source industrial data, and preprocessing the multi-source industrial data to obtain a standardized data table, and constructing an industrial element heterogeneous graph based on the standardized data table; Inputting the industrial element heterogeneous graph into a graph attention network base model for node representation learning, and setting a product batch node in the industrial element heterogeneous graph as a prediction target and a historical quality detection result as a supervised label for a supervised learning task; In the message passing process of the graph attention network base model, a meta-path self-learning layer is introduced, which adaptively weights and fuses different types of edge relationships through a learnable attention mechanism, and dynamically generates an optimal message passing path for each product batch node; A Bayesian deep learning method based on Monte Carlo Dropout is used to perform forward inference sampling on the graph attention network base model of the meta-path self-learning layer to obtain a sampling result, and the mean and variance of the quality risk prediction value of each product batch node are calculated based on the sampling result to generate a product batch node quality risk report; Based on the product batch node quality risk report, in combination with the attention weights generated by the meta-path self-learning layer, a correlation analysis and visualized traceability positioning of the risk source of high-risk product batch nodes are performed; Inputting the industrial element heterogeneous graph into a graph attention network base model for node representation learning, and setting a product batch node in the industrial element heterogeneous graph as a prediction target and a historical quality detection result as a supervised label for a supervised learning task, comprising the following steps: Based on a pre-defined semantic path, the industrial element heterogeneous graph is converted into a weighted projection homogeneous graph composed of product batch nodes, and the initial feature vector of each product batch node is generated by aggregating the attributes of adjacent nodes; Inputting the weighted projection homogeneous graph into the graph attention network base model, defining the priority of node feature similarity and graph topology structure attention through a domain knowledge rule base, and dynamically adjusting the fusion weights of similarity attention and graph topology structure attention according to the dynamic context scene to generate updated product batch node representations containing complex neighborhood semantic information; Based on the updated product batch node representations and historical quality detection results as labels, the graph attention network base model is trained to learn the quality risk pattern by minimizing a composite loss function combining the prediction error and topology preservation loss, and after convergence in the optimization process, a trained graph attention network base model is obtained; In the message passing process of the graph attention network base model, a meta-path self-learning layer is introduced, which adaptively weights and fuses different types of edge relationships through a learnable attention mechanism, and dynamically generates an optimal message passing path for each product batch node, comprising the following steps: For each meta-path instance, a three-order feature interaction encoding is adopted, the product batch nodes, intermediate nodes and product batch nodes connected by the meta-path instance are encoded based on a learnable weight matrix, the feature vectors of the nodes are linearly transformed respectively, the transformed features are multiplied element by element, and then processed by an activation function to obtain a meta-path instance feature vector; The features of the transformed nodes are spliced with the path feature vectors from the perspective of the start node and the end node of the path respectively, a score is calculated through an attention vector, and the scores of the start node and the end node are added to obtain the original attention of the path instance; Based on the original scores of the path instances connecting the same pair of nodes, an initial attention weight is obtained using a softmax function, and the attention weight is adjusted according to a decay factor based on the path length; The important paths are sparsified using a dynamic threshold, and a multi-head attention mechanism is used to perform geometric mean operation on the weights output by the attention heads to obtain the path instance level attention weight; The path instance level attention weight is pruned to obtain the pruned attention weight; A dynamic updating strategy is adopted to recalculate the complete attention weight, the change of the weight is smoothed through an exponential moving average, and the optimal message passing path is dynamically generated for each product batch node.

2. The industrial product quality risk association method based on a graph neural network according to claim 1, wherein: Collecting multi-source industrial data, and preprocessing the multi-source industrial data to obtain a normalized data table, including the following steps: Collecting multi-source industrial data from manufacturing execution units, quality management units, enterprise resource planning units and Internet of Things sensors; Data cleaning is performed on the multi-source industrial data to handle missing values and outliers, and data alignment is performed on the multi-source industrial data after data cleaning to associate to a unified product batch identifier; Data normalization is performed on the multi-source industrial data after data alignment to scale numerical features to a common interval, and the multi-source industrial data after data normalization is integrated to generate a normalized data table.

3. The industrial product quality risk association method based on a graph neural network according to claim 2, wherein: Based on the normalized data table, an industrial element heterogeneous graph is constructed, including the following steps: Based on the normalized data table, product batches, production equipment, operators, raw material batch entity objects and the association relationships between the entity objects are identified and extracted; The extracted entity objects are mapped to nodes of the industrial element heterogeneous graph with type attributes and feature attributes, and directed edges with explicit semantic types are created between the nodes of the industrial element heterogeneous graph according to the extracted association relationships; Relationship description information is extracted from the normalized data table, edge attribute features are added to the created directed edges, nodes and edges with attributes are integrated, and an industrial element heterogeneous graph is obtained.

4. The industrial product quality risk association method based on a graph neural network according to claim 1, wherein: A Bayesian deep learning method based on Monte Carlo Dropout is used to perform forward inference sampling on the graph attention network base model of the meta-path self-learning layer to obtain a sampling result, including the following steps: In the graph attention network base model of the meta-path self-learning layer, activate the Dropout layer and set the dropout probability, independently forward propagate each product batch node, and generate random sub-models of the meta-path self-learning layer through different Dropout masks each time to output different path attention weights and node prediction results; Based on the sampled path attention weight set, through a stability evaluation rule library, the attention weight set of each meta-path instance is mapped to an empirical mean and variance estimate value, and stable key paths are screened; The prediction result of each product batch node is converted into a probability distribution result of the risk level using a Softmax function; The meta-path instance is associated with the corresponding node prediction result to generate a sampling result report.

5. The industrial product quality risk association method based on a graph neural network according to claim 4, wherein: According to the sampling result, the mean and variance of the quality risk prediction value of each product batch node are calculated to generate a product batch node quality risk report, including the following steps: Based on the prediction result set of the product batch node obtained by Monte Carlo Dropout sampling, the mean and variance of the quality risk prediction of each product batch node are calculated. The mean and variance of the quality risk prediction value of each product batch node are used to obtain the standardized score of each product batch node. By analyzing the statistical distribution of the mean of the product batch node quality risk prediction value and the standardized score in the historical data, a standard threshold is set, and according to the mean and standardized score of the product batch node quality risk prediction value, the risk level of each product batch node is dynamically divided in combination with the standard threshold. From the meta-path instance with high average attention weight extracted from the multiple sampling results of the meta-path self-learning layer, the mean of the product batch node quality risk prediction value, the standardized score, the risk level and the key risk path are integrated to generate a product batch node quality risk report.

6. The industrial product quality risk association method based on a graph neural network according to claim 5, wherein, Based on the product batch node quality risk report, in combination with the attention weight generated by the meta-path self-learning layer, the risk source of the high-risk product batch node is analyzed and visualized, including the following steps: Based on the risk level marked in the product batch node quality risk report, the product batch node set with high risk level is screened out. For each high-risk product batch node, the attention weight meta-path instance is extracted from the attention weight generated by the meta-path self-learning layer to perform risk propagation path. Based on the high-risk product batch node, all nodes and edges involved in the meta-path instance are combined to construct a risk propagation subgraph. In the risk propagation subgraph, according to the attention weight generated by the meta-path self-learning layer, the risk contribution of adjacent nodes to the high-risk product batch node is calculated. The risk propagation subgraph and the node risk contribution are mapped to the visualization interface, and the color depth and path highlight are used for visual rendering of risk traceability positioning. 7.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is characterized in that: The processor executes the computer program to realize the steps of the industrial product quality risk association method based on the graph neural network according to any one of claims 1-6.

8. A computer readable storage medium having stored thereon a computer program, characterized in that: The computer program is executed by the processor to realize the steps of the industrial product quality risk association method based on the graph neural network according to any one of claims 1-6.