A method and system for manufacturing quality defect prediction and traceability

By constructing a dynamic diagram of the manufacturing process and using a time-series graph neural network for defect prediction and tracing, the problem of limited defect prediction accuracy and reliance on human experience in existing technologies is solved, achieving efficient quality control and online optimization.

CN123032243APending Publication Date: 2026-11-03FUZHOU JIAYUN NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611543095.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-08
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing technologies have limited accuracy in defect prediction in discrete manufacturing and process manufacturing scenarios, rely on human experience and lack closed-loop linkage mechanisms, making it difficult to achieve highly reliable quality decisions.

Method used

By constructing a dynamic graph of the manufacturing process entities and their influencing relationships, a time-series graph neural network is used for defect prediction. Based on contribution analysis, interpretable traceability and process parameter adjustment are achieved, forming a closed loop of prediction, traceability, adjustment, and optimization.

Benefits of technology

It improves the accuracy of defect prediction and traceability efficiency, realizes online self-optimization of quality control, has interpretable root cause localization capabilities, and reduces manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123032243A_ABST
    Figure CN123032243A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of manufacturing quality intelligent management and control, and provides a manufacturing quality defect prediction and tracing method and system, which comprises the following steps: acquiring manufacturing process entity state data, constructing a manufacturing process dynamic graph with manufacturing process entities as nodes and influence relationships between the manufacturing process entities as edges; processing the manufacturing process dynamic graph through a time sequence graph neural network, outputting quality defect prediction probabilities of workpieces in each process; identifying key space-time nodes based on contribution degree analysis of the time sequence graph neural network, generating a tracing report by reversely tracing a defect influence path along the influence relationship edges; generating process parameter adjustment information based on the tracing report and outputting the process parameter adjustment information to a manufacturing execution end, updating the manufacturing process dynamic graph and the time sequence graph neural network based on the received adjusted quality detection data. The application can improve defect prediction accuracy, tracing efficiency and the automation degree of quality optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent manufacturing quality control technology, specifically to a method and system for predicting and tracing manufacturing quality defects. Background Technology

[0002] In discrete and process manufacturing scenarios, the prediction and tracing of product quality defects are core tasks of quality control. Currently, defect prediction mainly relies on statistical process control, empirical rules, or traditional machine learning models based on tabular features. These methods treat data from each process as independent and identically distributed samples, ignoring the temporal dependencies and topological relationships formed by workpieces as they move through the production line. This makes it difficult to capture the propagation paths and dynamic evolution patterns of quality defects across processes, resulting in limited prediction accuracy. Furthermore, most existing deep learning-based defect prediction models are black-box models, only outputting defect probabilities without providing interpretable root cause information. The tracing process still relies on human experience and post-event analysis, leading to low efficiency and highly subjective results. In addition, existing methods lack a closed-loop linkage mechanism with the manufacturing execution end; prediction and tracing results cannot be automatically translated into process parameter adjustments, making online quality optimization difficult. These problems make it difficult for existing technologies to meet the requirements of highly reliable quality decision-making. Summary of the Invention

[0003] To address the limitations of existing technologies in defect prediction accuracy, reliance on human experience for traceability, and lack of closed-loop linkage mechanisms, this application proposes a manufacturing quality defect prediction and traceability method and system. This system constructs a dynamic graph of the manufacturing process entities and their influencing relationships, outputs the quality defect prediction probability using a time-series graph neural network, and achieves closed-loop output of interpretable traceability and process parameter adjustment information based on contribution analysis. This improves defect prediction accuracy, traceability efficiency, and the automation level of quality optimization.

[0004] To achieve the above objectives, this application adopts the following technical solution:

[0005] A method for predicting and tracing manufacturing quality defects includes: acquiring entity state data of the manufacturing process; constructing a dynamic diagram of the manufacturing process based on the entity state data, wherein the dynamic diagram uses manufacturing process entities as nodes and the influence relationships between manufacturing process entities as edges; processing the dynamic diagram of the manufacturing process using a temporal graph neural network to output the predicted probability of quality defects in each process of the workpiece; identifying key spatiotemporal nodes based on the contribution analysis of the temporal graph neural network, tracing the defect influence path backward along the influence relationship edges in the dynamic diagram of the manufacturing process, and generating a traceability report; generating process parameter adjustment information based on the traceability report and outputting it to the manufacturing execution end for the manufacturing execution end to adjust the process parameters, updating the dynamic diagram of the manufacturing process based on the adjusted quality inspection data fed back by the manufacturing execution end, and optimizing the temporal graph neural network.

[0006] The above solution unifies the representation of manufacturing process entities and their influencing relationships as a dynamic graph, and uses a temporal graph neural network to extract spatiotemporal features from this dynamic graph. This captures the temporal dependencies and topological relationships across processes, thereby improving the accuracy of defect prediction. Simultaneously, based on contribution analysis, it traces the defect impact path backward along the edges of the influencing relationships, enabling the prediction results to have interpretable root cause localization capabilities. Furthermore, the traceability report is transformed into process parameter adjustment information and output to the manufacturing execution end. The dynamic graph and optimization model are updated based on the quality inspection data after execution, forming a closed loop of prediction, traceability, adjustment, and optimization, achieving online self-optimization of quality control.

[0007] In one implementation, the manufacturing process entity state data is obtained by mapping the manufacturing process entity to a digital twin; the nodes of the manufacturing process dynamic diagram include workpiece nodes, workstation nodes, equipment nodes, process parameter nodes, and environmental state nodes, and the influence relationship edges include process flow edges and parameter effect edges; the node features are the feature vectors of the corresponding entities at the corresponding time, and the edge weights are set according to the inter-process flow time and / or the influence intensity of the parameters.

[0008] The above scheme maps the entity state data of the manufacturing process to a digital twin and clarifies the determination method of node type, edge type, node features and edge weight in the dynamic graph. This enables the dynamic graph to fully express the spatiotemporal topological relationship between workpiece, workstation, equipment, process parameters and environmental state in the manufacturing process, providing a structured input basis for feature extraction of the subsequent time-series graph neural network.

[0009] As one implementation method, the step of processing the manufacturing process dynamic graph using a temporal graph neural network to output the predicted probability of quality defects in each process of the workpiece includes: whenever new manufacturing process entity state data arrives, adding new nodes and edges incrementally to the manufacturing process dynamic graph, and deleting expired nodes and edges that exceed the time window to update the manufacturing process dynamic graph; dividing the updated manufacturing process dynamic graph according to a fixed time window to generate multiple temporal subgraphs; inputting the multiple temporal subgraphs into a temporal graph neural network composed of gated recurrent units and graph attention networks stacked together, and outputting the predicted probability of quality defects in each process of the workpiece; wherein, the node feature vector is determined by the corresponding feature data according to the node type, the node feature vector of the process parameter node includes the process parameter feature vector, the node feature vector of the equipment node includes the vibration frequency domain feature vector, the node feature vector of the environmental state node includes the environmental temperature and humidity data, and the node feature vector of the workpiece node includes the workpiece geometric dimension data.

[0010] The above scheme enables the dynamic graph to be continuously updated as the manufacturing process progresses by incrementally adding new nodes and edges and deleting expired nodes and edges, thus maintaining a real-time representation of the current production line status. By dividing the graph into multiple temporal subgraphs according to fixed time windows, it provides temporal input samples for the temporal graph neural network. Through the stacked structure of gated recurrent units and graph attention networks, it extracts the temporal dependencies and spatial correlations of node features, thereby improving the accuracy of defect prediction probability.

[0011] As one implementation method, the step of identifying key spatiotemporal nodes based on the contribution analysis of the time-series graph neural network, tracing the defect impact path in reverse along the influence relationship edges in the manufacturing process dynamic graph, and generating a traceability report includes: performing time attention weight analysis and input gradient attribution analysis on each layer of the time-series graph neural network to identify the key time window and key process parameter nodes that contribute the most to the predicted probability of the quality defect, wherein the key time window and the key process parameter nodes together constitute the key spatiotemporal node; tracing the defect impact path in reverse along the process flow edges and parameter action edges in the manufacturing process dynamic graph, and generating a traceability report containing the root cause process, abnormal parameters, and the defect impact path.

[0012] The above-mentioned scheme, by performing temporal attention weight analysis and input gradient attribution analysis on each layer of the temporal graph neural network, can locate the key spatiotemporal nodes that contribute the most to the defect prediction probability from both temporal and spatial dimensions, thus providing a clear quantitative basis for the traceability process. By tracing the defect impact path backward along the process flow edge and parameter action edge, it can reconstruct the defect propagation link in the manufacturing process and generate a traceability report containing the root cause process, abnormal parameters, and defect impact path, replacing the ex-post analysis that relies on human experience and improving traceability efficiency and objectivity.

[0013] As one implementation, generating a traceability report containing root cause processes, abnormal parameters, and the defect impact paths includes: marking nodes whose contribution exceeds a preset contribution threshold as high-contribution nodes, and mapping the high-contribution nodes to a pre-constructed manufacturing causal graph, wherein the manufacturing causal graph uses manufacturing process entities as nodes and causal relationships between manufacturing process entities as edges; extracting a subgraph from the manufacturing causal graph containing the high-contribution nodes, and performing a reverse search along the causal edges in the subgraph to locate the root cause processes and root cause process parameter sets; calculating the confidence level of each root cause path, wherein the confidence level is determined by the geometric mean of the gradient contribution levels of each node on the path obtained through input gradient attribution analysis; outputting the root cause paths in descending order of confidence level, and overlaying the root cause paths on the manufacturing process dynamic graph, and incorporating them into the traceability report.

[0014] The above scheme maps high-contribution nodes to the manufacturing cause-effect graph and searches in reverse along the cause-effect edges to locate the root cause process and root cause process parameter set. This makes the traceability results not only reflect statistical correlation, but also conform to the inherent causal logic of the manufacturing process. By calculating the confidence of the root cause path and outputting it in descending order of confidence, the scheme provides a quantitative confidence ranking of the traceability results, which makes it easier for quality management personnel to prioritize the most likely root cause path.

[0015] As one implementation method, the step of generating process parameter adjustment information based on the traceability report and outputting it to the manufacturing execution end for the manufacturing execution end to adjust the process parameters, and updating the manufacturing process dynamic graph based on the adjusted quality inspection data fed back by the manufacturing execution end, and optimizing the time-series graph neural network, includes: inputting the traceability report into a strategy network, the strategy network being trained based on deep reinforcement learning, and outputting the adjustment amount of each process parameter based on the current manufacturing process entity state data and the traceability report; constructing incremental training samples using the adjusted quality inspection data; and updating the parameters of the time-series graph neural network online using the incremental training samples.

[0016] The above solution uses a strategy network to output adjustment amounts for each process parameter based on the current manufacturing process entity status data and traceability reports. This allows the traceability results to be automatically converted into specific process parameter adjustment actions, reducing manual intervention. By using the adjusted quality inspection data to construct incremental training samples and updating the parameters of the time-series graph neural network online, the model can continuously adapt to changes in the production line status and maintain the stability of its predictive performance.

[0017] As one implementation, the step of updating the parameters of the temporal graph neural network online using the incremental training samples includes: applying constraints to the weight parameters of the temporal graph neural network using an elastic weight consolidation method to suppress catastrophic forgetting during the online update process; if the predicted probability of quality defects after adjustment does not drop below a preset probability threshold, then the key spatiotemporal nodes are re-identified and the defect impact path is traced backward along the influence relationship edge in the manufacturing process dynamic graph, a traceability report is regenerated, and the parameters of the strategy network are adjusted.

[0018] The above scheme imposes constraints on the weight parameters of the time-series graph neural network through the elastic weight consolidation method, retains the learned historical knowledge during online updates, and suppresses catastrophic forgetting. By setting a preset probability threshold for the adjusted defect prediction probability, and triggering re-tracing and adjustment of strategy network parameters when the threshold is not met, a closed-loop self-optimization triggering mechanism is formed to ensure the effectiveness of process adjustment.

[0019] As one implementation, the method further includes: selecting a target defect sample and its corresponding manufacturing process dynamic diagram; applying multiple counterfactual perturbations to the values ​​of key process parameter nodes, wherein the perturbation amplitude is determined according to the allowable tolerance range of the process parameters; generating multiple perturbed manufacturing process dynamic diagrams; inputting the multiple perturbed manufacturing process dynamic diagrams into the time-series graph neural network; calculating the difference in the predicted probability of quality defects before and after the perturbation; ranking the process parameters by sensitivity based on the absolute value of the difference; identifying sensitive process parameters; taking the union of the sensitive process parameters and the root cause process parameter set, removing duplicate parameters, and using the union as the updated process parameter set; updating the traceability report; and outputting the final traceability report.

[0020] The above scheme can identify the most sensitive process parameters that have the greatest impact on the defect probability from the perspective of causal inference by applying counterfactual perturbations to key process parameter nodes and calculating the difference in defect prediction probabilities before and after the perturbations. By taking the union of the sensitive process parameters and the root cause process parameter set obtained by causal path tracing, the results of the two tracing perspectives can be integrated, duplicate parameters can be removed and complementary information can be retained, thereby improving the completeness and accuracy of the tracing report.

[0021] As one implementation method, the output of the workpiece's quality defect prediction probability in each process includes: processing each of the time-series subgraphs using a deep ensemble model to obtain multiple quality defect prediction probabilities, wherein the deep ensemble model consists of multiple time-series graph neural networks with the same structure but different initializations; using the mean of the multiple quality defect prediction probabilities as the final quality defect prediction probability, and using the standard deviation of the multiple quality defect prediction probabilities as the prediction uncertainty; when the prediction uncertainty exceeds a preset uncertainty threshold, marking the corresponding workpiece as an object to be manually re-inspected, and outputting process parameter adjustment information marked with uncertainty warning, so that the manufacturing execution terminal can temporarily suspend the automatic execution of the adjustment action corresponding to the process parameter adjustment information.

[0022] The above solution outputs multiple predicted probabilities of quality defects through a deep integration model, and uses the mean as the final predicted probability and the standard deviation as the predicted uncertainty, so that the prediction results are accompanied by a confidence measure. When the predicted uncertainty exceeds the preset uncertainty threshold, the corresponding workpiece is marked as an object to be manually re-inspected, and process parameter adjustment information marked with uncertainty warning is output. This allows the manufacturing execution end to temporarily suspend the automatic execution of the adjustment action corresponding to the process parameter adjustment information, so as to avoid automatically executing unreliable process adjustment actions under low confidence conditions and improve the reliability of quality decisions.

[0023] This application also provides a manufacturing quality defect prediction and traceability system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the manufacturing quality defect prediction and traceability method as described in any of the above solutions.

[0024] The aforementioned system implements the manufacturing quality defect prediction and traceability method by executing computer programs through a processor. It can integrate dynamic graph construction, time-series neural network prediction, contribution analysis and traceability, and closed-loop process parameter self-optimization into a unified execution carrier, providing the manufacturing site with complete quality defect prediction and traceability capabilities.

[0025] The beneficial effects of this application are as follows: By constructing the manufacturing process entities and their influencing relationships into a dynamic graph of the manufacturing process, the temporal dependencies and topological relationships between manufacturing process entities are uniformly expressed in the same graph structure. The temporal graph neural network extracts spatiotemporal features based on this dynamic graph, which can capture the propagation path and dynamic evolution law of cross-process quality defects, thereby improving the accuracy of defect prediction. This application analyzes the contribution of the temporal graph neural network to identify the key spatiotemporal nodes that contribute the most to the probability of defect prediction, and traces the defect influence path backward along the influence relationship edge of the manufacturing process dynamic graph to generate a traceability report containing the defect influence path. This enables the prediction results to have interpretable root cause localization capabilities, replacing the ex-post analysis that relies on human experience, and improving traceability efficiency and objectivity. This application generates process parameter adjustment information based on the traceability report and outputs it to the manufacturing execution end. It receives the adjusted quality inspection data fed back from the manufacturing execution end and updates the manufacturing process dynamic graph and optimizes the temporal graph neural network based on the data, forming an online closed loop of prediction, traceability, adjustment, and optimization. This transforms quality control from passive response to proactive optimization, realizing the integration and self-optimization of manufacturing quality defect prediction and traceability. Attached Figure Description

[0026] Figure 1 This is a flowchart of the manufacturing quality defect prediction and traceability method according to an embodiment of this application;

[0027] Figure 2 This is a schematic diagram of the manufacturing quality defect prediction and traceability system according to an embodiment of this application. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application.

[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0030] Embodiment 1 of this application is as follows:

[0031] like Figure 1 As shown, this embodiment provides a method for predicting and tracing manufacturing quality defects. This method uses a dynamic diagram of the manufacturing process as a unified data organization carrier, integrating state information scattered across different processes, equipment, and times during the manufacturing process into a single spatiotemporal topology. Based on this, it sequentially completes closed-loop output of quality defect prediction, interpretable traceability, and process parameter adjustment information.

[0032] Step S100: Obtain the entity status data of the manufacturing process, and construct a dynamic diagram of the manufacturing process based on the entity status data of the manufacturing process. The dynamic diagram of the manufacturing process uses the entities of the manufacturing process as nodes and the influence relationships between the entities of the manufacturing process as edges.

[0033] Manufacturing process entity status data refers to data generated by various manufacturing process entities during the manufacturing process that reflects the current operating or processing status of those entities. Manufacturing process entities can be physical or logical entities participating in the manufacturing process, such as workpieces, processing equipment, workstations, process parameter carriers, and environmental monitoring points. The specific form of manufacturing process entity status data can be flexibly determined according to the actual configuration of the production line. For example, manufacturing process entity status data can be equipment operating parameters, including spindle speed, load current, vibration signals, and temperature signals; it can also be workpiece geometric dimension data, including the measured values ​​of diameter, thickness, flatness, and position after a certain processing step; and it can also be environmental temperature and humidity data, including the temperature and relative humidity of the area where the production line is located. In addition, manufacturing process entity status data can also include information reflecting the manufacturing process status, such as tooling wear, material batch information, and buffer queue length. Manufacturing process entity status data can be acquired by directly reading from sensors, testing instruments, and data acquisition terminals deployed on the production line, retrieving historical data records from the manufacturing execution end, or importing from a third-party quality inspection system; this embodiment does not impose any restrictions on this method.

[0034] A manufacturing process dynamic diagram is a graph structure built with manufacturing process entities as nodes and the influence relationships between them as edges. An influence relationship refers to the relationship where a change in the state of one manufacturing process entity affects the state or processing result of another. The specific type of influence relationship can be determined based on the actual characteristics of the manufacturing process. For example, an influence relationship can be an inter-process flow relationship, where the processing result of the previous process serves as the input condition for the subsequent process, thus affecting the processing quality of the latter. An influence relationship can also be the effect of process parameters on processing quality, where a change in the value of a certain process parameter directly affects the processing quality of the workpiece in the corresponding process. Furthermore, an influence relationship can also be an indirect effect of equipment state on processing quality; for example, increased equipment vibration can indirectly affect the surface roughness of the workpiece through tool wear. By combining nodes and edges, the manufacturing process dynamic diagram unifies the originally scattered temporal and topological data in the manufacturing process into a single structure, allowing subsequent prediction and tracing to be performed on the same data basis, avoiding the problem of the separation of temporal and topological information in traditional methods.

[0035] Step S200: Process the dynamic diagram of the manufacturing process using a time-series graph neural network to output the predicted probability of quality defects of the workpiece in each process.

[0036] A temporal graph neural network (TMN) is a type of neural network capable of processing both graph-structured data and temporal data. The dynamic graph of a manufacturing process inherently contains nodes, edges, and attribute information about node and edge changes over time. When processing this dynamic graph, the TMN can extract both the spatial correlation features between nodes and the temporal features of node state evolution along the time dimension, thereby capturing the propagation path and dynamic evolution of quality defects across processes. The quality defect prediction probability is a measure of the likelihood of a workpiece exhibiting a quality defect at a given process stage; its value typically ranges from 0 to 1. For a workpiece node in the dynamic graph of the manufacturing process, the TMN can output the predicted probability of a quality defect in the current process and subsequent processes. For example, for a workpiece being processed in the third process, the TMN can output a probability of 0.12 for the third process, 0.31 for the fourth process, and 0.28 for the fifth process. The specific output form of the quality defect prediction probability can be a single numerical value or a probability distribution corresponding to different defect types; this embodiment does not impose any limitations on this.

[0037] Step S300: Based on the contribution analysis of the time-series graph neural network, identify key spatiotemporal nodes, trace the defect impact path in reverse along the influence relationship edge in the manufacturing process dynamic graph, and generate a traceability report.

[0038] Contribution analysis refers to the reverse analysis of the predicted output of a time-series graph neural network to determine the contribution of each node and time step in the dynamic graph of the manufacturing process to the probability of predicting quality defects. Specific implementations of contribution analysis can include attention weight-based analysis, attribution analysis based on input gradients, or other analytical methods that can quantify the influence of nodes on the predicted output. Through contribution analysis, key spatiotemporal nodes that contribute the most to the probability of predicting quality defects can be identified. Key spatiotemporal nodes are those nodes that have a significant impact on the defect prediction results in both the temporal and spatial dimensions; that is, the state changes of the manufacturing process entities corresponding to these nodes within a specific time window are the main reasons for the increased probability of predicting quality defects.

[0039] After identifying key spatiotemporal nodes, the defect impact path is traced backward along the influence relationship edges in the manufacturing process dynamic diagram. Backward tracing refers to starting from a workpiece node predicted to have a high probability of defect, tracing back in the opposite direction of the influence relationship edges to the node at the next higher level that affects the defect, and then continuing back to the node at the next higher level until the source of the defect is located. The defect impact path refers to the sequence of nodes and edges that the defect passes through from the source node to the target workpiece node. For example, if a workpiece has a high predicted probability of quality defects, backward tracing reveals that the machining quality of the workpiece in the fifth process is affected by insufficient machining allowance in the fourth process. The insufficient machining allowance in the fourth process originates from tool wear in the third process. Therefore, the defect impact path can be represented as a complete link from the tool wear node to the machining quality node in the third process, then to the machining allowance node in the fourth process, then to the machining quality node in the fifth process, and finally to the workpiece defect node.

[0040] A traceability report is a collection of information generated based on reverse tracing results, used to describe the root cause and propagation process of a defect. A traceability report includes at least the defect impact path, and may also include information such as the root cause process, abnormal parameters, and critical time windows. The specific format of the traceability report can be structured text, tables, graphical displays, or a combination thereof; this embodiment does not impose any limitations on this.

[0041] Step S400: Generate process parameter adjustment information based on the traceability report and output it to the manufacturing execution end for the manufacturing execution end to adjust the process parameters, and update the manufacturing process dynamic diagram and the optimized timing diagram neural network according to the adjusted quality inspection data fed back by the manufacturing execution end.

[0042] Process parameter adjustment information refers to information generated based on the root cause processes and abnormal parameters located in the traceability report, used to guide the manufacturing execution end in correcting process parameters. This information may include the name of the process parameter requiring adjustment, its current value, suggested adjustment direction, and adjustment amount. The manufacturing execution end is the entity that receives the process parameter adjustment information and executes the corresponding adjustments; it can be a manufacturing execution system, process controller, programmable logic controller, or other equipment or system capable of adjusting process parameters. After receiving the process parameter adjustment information, the manufacturing execution end adjusts the corresponding process parameters according to the suggestions in the information and collects quality inspection data during the adjusted production process.

[0043] Adjusted quality inspection data refers to the data obtained from quality inspection of subsequently processed workpieces after the process parameters have been adjusted. This data reflects the actual effect of the process parameter adjustment. Updating the manufacturing process dynamic diagram using adjusted quality inspection data involves adding newly collected quality inspection data and associated manufacturing process entity state data to the dynamic diagram, enabling it to reflect the adjusted production line status. Updating the parameters of the time-series graph neural network using adjusted quality inspection data involves using the adjusted quality inspection data as incremental training samples to update the parameters of the time-series graph neural network online, allowing the model to adapt to the adjusted production line status and maintain the stability of its predictive performance.

[0044] Through steps S100 to S400, this embodiment forms a complete closed loop from dynamic graph construction, defect prediction, interpretable traceability to process parameter adjustment and online model updates. The dynamic graph, as a unified spatiotemporal topological representation, preserves temporal dependencies and topological relationships in the manufacturing process within the same structure, providing a common data foundation for prediction and traceability. Contribution analysis makes the prediction results of the black-box model interpretable, and reverse tracing transforms statistically high-contribution nodes into defect impact paths with actual physical meaning in the manufacturing process. The closed-loop update mechanism allows the prediction model and traceability results to be continuously optimized as the production line status changes, avoiding the problem of model performance declining with production line drift after a one-time modeling.

[0045] It should be understood that the specific types of entity state data in the manufacturing process, the specific forms of influence relationships, the specific algorithms for contribution analysis, and the specific implementation methods of the manufacturing execution end in this embodiment can all be selected and combined according to the actual application scenario. This embodiment is only used to illustrate the basic principles of the technical solution and does not constitute a limitation on the scope of protection.

[0046] Embodiment 2 of this application is as follows:

[0047] This embodiment, based on Embodiment 1, further elaborates on the construction method of the manufacturing process dynamic graph and the processing procedure of the temporal graph neural network. Embodiment 1 has already described the acquisition of manufacturing process entity state data and the basic construction logic of the manufacturing process dynamic graph. This embodiment focuses on explaining the specific sources of manufacturing process entity state data, the specific types of nodes and edges in the manufacturing process dynamic graph, the determination methods of node features and edge weights, and the specific implementation of the temporal graph neural network for incremental maintenance, time window segmentation, and spatiotemporal feature extraction of the dynamic graph.

[0048] In step S100 of Example 1, the manufacturing process entity state data is obtained by mapping the manufacturing process entity to a digital twin. A digital twin is a virtual mapping model that maintains state synchronization with the physical or logical entities in the manufacturing process. The digital twin acquires state data from data sources such as sensors, testing instruments, and manufacturing execution terminals in the production line through a data acquisition interface, and organizes this data into structured information associated with the corresponding manufacturing process entity. For example, the digital twin of a processing equipment can map the spindle speed, load current, vibration signal, and temperature signal of the equipment in real time; the digital twin of a workstation can aggregate the operating status, tooling wear, and workpiece positioning accuracy data of each piece of equipment within the workstation; the digital twin of a production line can integrate the material flow path, cycle time, and buffer queue length between workstations. The manufacturing process entity state data obtained by mapping the digital twin provides a continuously updated and structurally consistent data source for constructing the dynamic diagram of the manufacturing process.

[0049] The nodes in the manufacturing process dynamic diagram include workpiece nodes, workstation nodes, equipment nodes, process parameter nodes, and environmental status nodes. Influencing edges include process flow edges and parameter effect edges. Workpiece nodes correspond to workpieces currently being processed on the production line. Each workpiece node can carry information such as the current process position, completed processing steps, and cumulative processing time. Workstation nodes correspond to various processing stations on the production line and can carry information such as the current occupancy status of the station, tooling wear level, and positioning accuracy. Equipment nodes correspond to the specific processing equipment within the workstation and can carry the equipment's operating parameters and health status information. Process parameter nodes correspond to various process parameters affecting processing quality, such as cutting speed, feed rate, depth of cut, spindle speed, processing temperature, and pressure. Each process parameter node can carry the set value and actual value of the parameter at the current moment. Environmental status nodes correspond to environmental conditions such as temperature, humidity, and cleanliness in the production line environment.

[0050] Process flow edges are used to express the flow relationship of workpieces between processes, that is, the processing sequence of workpieces moving from one station to the next. Parameter action edges are used to express the effect of process parameters on machining quality, that is, the association between a certain process parameter node and the workpiece node or station node affected by it. For example, the cutting speed parameter node of a certain turning process is connected to the corresponding workpiece node of that process through a parameter action edge, indicating that changes in the cutting speed value will directly affect the machining quality of the workpiece in that process. By combining process flow edges and parameter action edges, the manufacturing process dynamic diagram can simultaneously express the spatial flow path of the workpiece in the production line and the physical effect of process parameters on machining quality, enabling subsequent prediction and traceability to be performed within the same graph structure.

[0051] Node features are the feature vectors of the corresponding entity at a given time, with edge weights set based on the inter-process flow time and / or the strength of parameter influence. A node feature vector is a numerical representation of the node's state information at a given moment. The construction of feature vectors can differ for different types of nodes. For example, the feature vector of a workpiece node can include workpiece geometric dimension data, such as measured values ​​for diameter, thickness, flatness, and position; the feature vector of an equipment node can include a vibration frequency domain feature vector, i.e., the frequency domain amplitude features extracted after performing a fast Fourier transform on the equipment vibration signal; the feature vector of an environmental state node can include environmental temperature and humidity data; the feature vector of a process parameter node can include a process parameter feature vector, i.e., a numerical vector obtained after normalizing the process parameters. The feature vector of a workstation node can include information such as the current processing status of the workstation, tooling wear, and buffer queue length.

[0052] The method for setting edge weights can be flexibly determined according to the edge type. For process flow edges, the edge weight can be set based on the inter-process flow time. For example, if the actual flow time required for a workpiece to move from one station to the next is 30 seconds, the edge weight of the corresponding process flow edge can be set to 30, or the flow time can be normalized and set to a value between 0 and 1. For parameter effect edges, the edge weight can be set based on the parameter's influence intensity. The parameter's influence intensity can be determined through correlation analysis between the process parameter and the processing quality in historical quality data, or it can be assigned a value based on the degree of influence of the parameter on the processing quality in the process mechanism knowledge. For example, in a certain grinding process, the influence intensity of grinding pressure on surface roughness is higher than that of grinding fluid flow on surface roughness, so the edge weight of the parameter effect edge corresponding to the grinding pressure parameter node can be set to a larger value, and the edge weight of the parameter effect edge corresponding to the grinding fluid flow parameter node can be set to a smaller value. The specific value of the edge weight is not limited to the above examples; it is also possible to consider both the inter-process flow time and the parameter influence intensity simultaneously, and then use the weighted combination of the two as the edge weight.

[0053] During the construction and updating of the manufacturing process dynamic graph, whenever new manufacturing process entity state data arrives, new nodes and edges are incrementally added to the dynamic graph, and expired nodes and edges beyond the time window are deleted to update the dynamic graph. Incremental addition means that the entire dynamic graph is not reconstructed; instead, the nodes and edges corresponding to the newly arrived data are appended to the graph based on the existing graph structure. For example, when a workpiece flows from the third process to the fourth process, a new workpiece node corresponding to the fourth process is added to the dynamic graph, along with a process flow edge from the node corresponding to the third process to the node corresponding to the fourth process. Simultaneously, expired nodes and edges beyond the time window are deleted from the dynamic graph. The time window is a preset duration used to limit the time range covered by the dynamic graph. For example, the time window can be set to the most recent 2 hours; then, only nodes and edges generated within the most recent 2 hours are retained in the dynamic graph, and earlier nodes and edges are deleted. By combining incremental addition and expired deletion, the dynamic manufacturing process diagram can continuously maintain a real-time representation of the current production line status, avoiding the consumption of computing resources and the degradation of model performance caused by the infinite growth of the diagram size over time.

[0054] The updated manufacturing process dynamic graph is divided into multiple temporal subgraphs by fixed time windows. A fixed time window refers to a preset time interval used to divide the dynamic graph. For example, a fixed time window can be set to 10 minutes, thus dividing the updated dynamic graph into windows every 10 minutes. The nodes and edges within each window constitute a temporal subgraph. Multiple temporal subgraphs are arranged in chronological order, collectively forming the input sample sequence for the temporal graph neural network. Through time window segmentation, the continuously evolving manufacturing process in the dynamic graph is discretized into multiple subgraphs with clear time boundaries. Each subgraph corresponds to a snapshot of the manufacturing process state within a time period, and the multiple subgraphs retain the evolutionary information of the state along the time dimension.

[0055] Multiple temporal subgraphs are input into a temporal graph neural network (TPN) composed of stacked gated recurrent units (ROUs) and graph attention networks (GANs), which outputs the predicted probability of quality defects in each process of the workpiece. A gated recurrent unit (ROU) is a recurrent neural network unit capable of processing sequential data. It controls the retention and forgetting of information through a gating mechanism, making it suitable for extracting temporal dependencies in temporal subgraph sequences. A graph attention network (GAN) is a graph neural network based on an attention mechanism. It can assign different attention weights based on the importance of neighbor nodes when aggregating neighbor node information, making it suitable for extracting spatial relationships between nodes within a single temporal subgraph. The stacked structure of the gated recurrent units and the GAN refers to using the GAN as a spatial feature extraction layer and the gated recurrent units as a temporal feature extraction layer, alternating between them or sequentially chained together. This allows the temporal graph neural network to simultaneously extract both spatial relationship features and temporal evolution features from the dynamic graph of the manufacturing process.

[0056] Node feature vectors are determined by corresponding feature data based on node type. The feature vector for a process parameter node includes the process parameter feature vector; for an equipment node, it includes the vibration frequency domain feature vector; for an environmental state node, it includes environmental temperature and humidity data; and for a workpiece node, it includes workpiece geometric dimension data. Specifically, for process parameter nodes, the original values ​​of the process parameters can be normalized to eliminate the influence of dimensional differences between different process parameters, and then the normalized values ​​are used as the process parameter feature vector. For equipment nodes, a Fast Fourier Transform can be performed on the equipment vibration signal to convert the time-domain vibration signal into a frequency-domain signal, and then the amplitude of the main frequency components can be extracted as the vibration frequency domain feature vector. For environmental state nodes, environmental temperature and relative humidity can be directly used as feature vectors. For workpiece nodes, the geometric dimension detection values ​​of the workpiece after processing in the corresponding process can be used as feature vectors. Feature vectors of different node types can undergo dimension alignment processing before being input into the time-series graph neural network. For example, padding or linear transformation can be used to map the feature vectors of each type of node to the same dimension, so that the graph attention network can perform unified message passing and feature aggregation.

[0057] This embodiment maps manufacturing process entity state data to digital twins, ensuring the real-time nature and consistency of the dynamic graph's data source. By clearly defining the determination methods for node types, edge types, node features, and edge weights, the dynamic graph can structurally express the spatiotemporal topological relationships within the manufacturing process. Through incremental addition and expired deletion maintenance mechanisms, the dynamic graph maintains a real-time representation of the current production line status. Multiple temporal subgraphs are generated by time window segmentation, providing temporal input samples for the temporal graph neural network. A stacked structure of gated recurrent units and graph attention networks extracts the temporal dependencies and spatial relationships of node features, thereby improving the accuracy of quality defect prediction probabilities.

[0058] It should be understood that the specific division of node and edge types, the specific composition of feature vectors, the specific calculation method of edge weights, and the specific duration of time windows in this embodiment can all be adjusted according to the characteristics of the actual production line and the predicted needs. This embodiment is only used to illustrate the specific implementation of the technical solution and does not constitute a limitation on the scope of protection.

[0059] Embodiment 3 of this application is as follows:

[0060] This embodiment, based on step S300 of embodiment 1, further elaborates on the specific implementation of contribution analysis and the causal constraint mechanism of reverse tracing. Embodiment 1 has already described the basic concepts of contribution analysis, the identification of key spatiotemporal nodes, and the overall process of generating a tracing report by reverse tracing along the influence relationship edges. This embodiment focuses on explaining the specific calculation methods of time attention weight analysis and input gradient attribution analysis, the composition of key spatiotemporal nodes, the types of edges used in reverse tracing, and the role of creating a causal graph in root cause localization and confidence ranking.

[0061] In step S300 of Example 1, based on the contribution analysis of the time-series graph neural network, key spatiotemporal nodes are identified, and the defect impact path is traced backward along the influence relationship edge in the manufacturing process dynamic graph to generate a traceability report. In this example, the contribution analysis specifically includes performing time attention weight analysis and input gradient attribution analysis on each layer of the time-series graph neural network to identify the key time windows and key process parameter nodes that contribute the most to the probability of quality defect prediction. The key time windows and key process parameter nodes together constitute key spatiotemporal nodes.

[0062] Temporal attention weight analysis refers to the statistical comparison of the attention weights generated by a temporal graph neural network when processing temporal subgraph sequences to determine which time steps or time windows have a greater impact on the final quality defect prediction probability. When processing temporal subgraph sequences, the gated recurrent units in a temporal graph neural network assign different weights to features at different time steps through an attention mechanism. These weights reflect the model's dependence on information from each time step when making predictions. Temporal attention weight analysis can take the average of the attention weights at each time step as a measure of the overall contribution of that time window. For example, averaging the attention weights of all time steps within a certain time window yields the average attention weight for that time window; a time window with a larger average attention weight contributes more to the quality defect prediction probability. Alternatively, the maximum value or weighted sum of the attention weights at each time step can be used as a contribution measure; this embodiment does not impose any limitations on this. The key time windows identified through temporal attention weight analysis correspond to time periods in the manufacturing process that have a significant impact on defect formation, such as the processing period of a certain step or a period when a certain process parameter fluctuates abnormally.

[0063] Input gradient attribution analysis refers to calculating the gradient of the predicted output of a time-series graph neural network relative to the features of its input nodes to determine the degree of influence of each input node feature on the predicted output. Specifically, for the probability of predicting quality defects, the partial derivatives of this probability with respect to the feature vectors of each node in the manufacturing process dynamic graph can be calculated. The larger the absolute value of the partial derivative, the greater the impact of a small change in the feature vector of that node on the prediction probability, and the higher the node's contribution to the prediction result. For example, for a certain process parameter node, the partial derivatives of the probability of predicting quality defects with respect to each element in the feature vector of that process parameter node are calculated, and the sum or maximum of the absolute values ​​of the partial derivatives is taken as the gradient contribution of that process parameter node. A process parameter node with a higher gradient contribution indicates that the change in the value of that process parameter has a more significant impact on the probability of predicting quality defects. Input gradient attribution analysis can be completed during the backpropagation process of the time-series graph neural network without requiring additional modifications to the model structure.

[0064] Temporal attention weight analysis and input gradient attribution analysis can reveal the decision-making basis of time-series graph neural networks from different perspectives. Temporal attention weight analysis focuses on the temporal dimension, answering which time period information the model pays more attention to when making predictions; input gradient attribution analysis focuses on the spatial dimension, answering which manufacturing process entities' states the model pays more attention to when making predictions. Using both together, it is possible to locate the key spatiotemporal nodes that contribute the most to the probability of predicting quality defects from both temporal and spatial dimensions. Key time windows and key process parameter nodes together constitute key spatiotemporal nodes, where key time windows provide the temporal location of defect formation, and key process parameter nodes provide the spatial location of defect formation. They complement each other, ensuring that the traceability results include both temporal and entity information.

[0065] After identifying key spatiotemporal nodes, the defect impact path is traced backward along the process flow edge and parameter effect edge in the manufacturing process dynamic diagram to generate a traceability report containing the root cause process, abnormal parameters, and defect impact path.

[0066] The specific process of reverse tracing is as follows: starting from the workpiece node predicted to have a high probability of quality defects, tracing back level by level along the opposite directions of the process flow edge and the parameter effect edge. The process flow edge connects the flow relationship of the workpiece between different processes. Tracing back along the process flow edge can determine in which process the defect was introduced and the propagation process of the defect in subsequent processes. The parameter effect edge connects the process parameter node with the workpiece node or station node affected by it. Tracing back along the parameter effect edge can determine which abnormal value of the process parameter caused the processing quality degradation of the corresponding process. By alternately tracing back along the process flow edge and the parameter effect edge, the complete propagation link of the defect from the source process parameter abnormality to the final workpiece quality defect can be reconstructed.

[0067] A defect impact path refers to the sequence of nodes and edges a defect travels from its source to the target workpiece. For example, a workpiece is predicted to have a high probability of quality defects in the fifth machining process. Backtracking reveals that during the third machining process, the cutting speed parameter deviated from the normal range, resulting in excessive surface roughness in that process. This excessive roughness, in turn, led to insufficient machining allowance in the fourth process, ultimately resulting in a dimensional defect in the fifth process. The corresponding defect impact path can be represented as follows: the cutting speed parameter node connects to the third process machining quality node via a parameter action edge; the third process machining quality node connects to the fourth process machining allowance node via a process flow edge; the fourth process machining allowance node connects to the fifth process machining quality node via a process flow edge; and the fifth process machining quality node connects to the workpiece defect node via a process flow edge.

[0068] The root cause process refers to the process in the defect's impact path where the anomaly first occurs, i.e., the process where the defect is introduced. Anomaly parameters are process parameters that play a major role in the formation of the defect within the root cause process. The traceability report outputs the root cause process, anomaly parameters, and defect impact path as core content, enabling quality management personnel to directly locate the processes and parameters requiring attention without the need for manual investigation from large amounts of test data.

[0069] In the process of generating the traceability report, this embodiment further introduces a manufacturing causal graph as a constraint for reverse tracing. Specifically, nodes whose contribution exceeds a preset contribution threshold are marked as high-contribution nodes, and high-contribution nodes are mapped to a pre-constructed manufacturing causal graph. The manufacturing causal graph uses manufacturing process entities as nodes and causal relationships between manufacturing process entities as edges.

[0070] The preset contribution threshold is a quantitative standard used to select high-contribution nodes. Contribution can be measured by the gradient contribution obtained from gradient attribution analysis, or by combining it with the attention weight obtained from time-based attention weight analysis. For example, the gradient contributions of all nodes can be sorted from largest to smallest, and a certain percentage of nodes can be selected as high-contribution nodes. Alternatively, an absolute threshold can be set, and nodes with gradient contributions exceeding this threshold can be marked as high-contribution nodes. The specific value of the preset contribution threshold can be adjusted based on the accuracy of historical tracing results; this embodiment does not impose any restrictions on this.

[0071] A manufacturing causal graph is a pre-constructed graph structure used to express the causal relationships between entities in a manufacturing process. Unlike a dynamic manufacturing process graph, where edges represent influence relationships (including process flow relationships and parameter interaction relationships reflecting the actual flow and physical effects during manufacturing), edges in a manufacturing causal graph represent causal relationships—that is, a change in the state of one entity is a direct cause of a change in the state of another entity. A manufacturing causal graph can be obtained by applying causal discovery algorithms to historical quality data to generate candidate causal graphs, which are then refined using process mechanism knowledge and process expert experience. Nodes in the manufacturing causal graph correspond to nodes in the dynamic manufacturing process graph; therefore, high-contribution nodes identified in the dynamic graph can be mapped to the manufacturing causal graph.

[0072] After mapping high-contribution nodes to the manufacturing causal graph, extract the subgraph containing high-contribution nodes from the manufacturing causal graph, and search backwards along the causal edges in the subgraph to locate the root cause process and root cause process parameter set.

[0073] A subgraph is a local graph structure in the manufacturing cause-effect graph, consisting of high-contribution nodes and their causal relationships. Extracting subgraphs aims to narrow the root cause search scope from the entire manufacturing cause-effect graph to a local region directly related to the current defect prediction result, reducing the search space and improving the efficiency of root cause localization. Reverse searching along the causal edges in the subgraph involves starting from a high-contribution node and tracing back in the opposite direction of the causal edge, searching for the cause node of the high-contribution node, then the cause node of the cause node, and so on, until a node with no further upstream cause nodes is reached. The processes and process parameters corresponding to these nodes at the very top of the causal chain are the root cause processes and root cause process parameter sets.

[0074] For example, a workpiece is predicted to have a high probability of quality defects in the fifth process. Contribution analysis identifies the machining quality node in the fifth process and the machining allowance node in the fourth process as high-contribution nodes. These two high-contribution nodes are mapped onto a manufacturing cause-effect graph, and a subgraph containing these two nodes and their causal relationships is extracted. A backward search along the causal edges in the subgraph reveals that the machining allowance node in the fourth process is caused by the excessive surface roughness in the third process. The excessive surface roughness in the third process is caused by the cutting speed parameter deviating from the normal range, and there is no upstream causal node for the deviation of the cutting speed parameter from the normal range. Therefore, the root cause process is identified as the third process, and the root cause process parameter set is the cutting speed parameter.

[0075] After locating the root cause process and root cause parameter set, the confidence level of each root cause path is calculated. The confidence level is determined by the geometric mean of the gradient contribution of each node on the path obtained through input gradient attribution analysis.

[0076] A root cause path refers to a complete causal link from a root cause node to a target defect node. A root cause path contains multiple nodes, each with a corresponding gradient contribution. The confidence level is calculated by multiplying the gradient contributions of each node in the root cause path, then taking the square root of the product with the number of nodes in the path as the exponent, and using the result as the confidence level of the root cause path. Using the geometric mean preserves the contribution information of each node while avoiding the exponential decay of confidence level due to the increasing number of nodes in the path, ensuring a high confidence level even when the contributions of each node in a long causal link are high. A higher confidence level indicates a higher degree of credibility for the root cause path.

[0077] Root cause paths are output in descending order of confidence level and overlaid on the manufacturing process dynamic diagram, and included in the traceability report.

[0078] Outputting root cause paths in descending order of confidence level means arranging multiple candidate root cause paths according to their confidence level from highest to lowest, prioritizing the display of the root cause path with the highest confidence level. In actual manufacturing processes, the same quality defect may have multiple candidate root cause paths. For example, a dimensional deviation of a workpiece may be affected by both abnormal cutting speed and abnormal coolant temperature. By sorting by confidence level, quality management personnel can prioritize investigating the root cause path with the highest confidence level, improving traceability efficiency. Overlaying root cause paths on the manufacturing process dynamic diagram means highlighting or specially marking the nodes and edges on the root cause path in the visualization of the manufacturing process dynamic diagram, allowing quality management personnel to intuitively see the defect propagation chain and root cause location.

[0079] To illustrate the necessity of manufacturing cause-effect graphs in root cause localization, a comparative example is provided here. If backward tracing is performed solely based on statistical correlation without using manufacturing cause-effect graph constraints—that is, determining the direction of backward tracing based only on the statistical correlation between nodes in the manufacturing process dynamics graph—non-causal spurious correlation nodes may be misidentified as root causes. For example, in a production line, the ambient temperature recorded by an environmental temperature sensor and the surface roughness detection value of a workpiece show a high statistical correlation. However, this correlation is not causal; it is due to the combined influence of changes in production line load over the same period. If backward tracing is performed solely based on statistical correlation, the ambient temperature node may be misidentified as the root cause of surface roughness defects, when the true root cause is actually the deviation of equipment processing parameters caused by changes in production line load. Manufacturing cause-effect graphs constrain the direction of backward tracing through pre-established causal relationship edges, ensuring that the backward search only proceeds along paths with causal basis. This avoids including spurious correlation nodes with only statistical correlation in the root cause path, improving the accuracy and reliability of root cause localization.

[0080] This embodiment combines time attention weight analysis and input gradient attribution analysis to quantify the contribution of each node to the probability of quality defect prediction from both temporal and spatial dimensions, providing clear numerical basis for the identification of key spatiotemporal nodes. By tracing back along process flow edges and parameter action edges, the propagation path of defects in the manufacturing process is reconstructed. Through the mapping of the manufacturing cause-effect graph and the reverse search of causal edges, the root cause localization conforms to the inherent causal logic of the manufacturing process, avoiding false attributions caused by statistical correlation. Through confidence calculation and descending output, a quantitative confidence ranking of the traceability results is provided, making it easier for quality management personnel to prioritize the most likely root cause path.

[0081] Embodiment 4 of this application is as follows:

[0082] This embodiment, based on step S400 of Embodiment 1, further elaborates on the generation method of process parameter adjustment information and the forgetting suppression and closed-loop trigger mechanism in the online update process. Embodiment 1 has already described the overall process of generating process parameter adjustment information based on traceability reports and outputting it to the manufacturing execution end, updating the manufacturing process dynamic diagram and optimizing the time sequence graph neural network according to the adjusted quality inspection data. This embodiment focuses on explaining the specific usage of the policy network as an adjustment quantity generation tool, the construction method of incremental training samples, the constraint application method of the elastic weight consolidation method in online updates, and the closed-loop mechanism that triggers re-traceability when the adjustment effect is not up to standard.

[0083] In step S400 of Embodiment 1, process parameter adjustment information is generated based on the traceability report and output to the manufacturing execution end for process parameter adjustment. The manufacturing execution end also updates the manufacturing process dynamic graph and the optimized timing graph neural network based on the adjusted quality inspection data fed back from the manufacturing execution end. In this embodiment, the traceability report is input into the strategy network, which is trained using deep reinforcement learning and outputs the adjustment amount of each process parameter based on the current manufacturing process entity state data and the traceability report.

[0084] A policy network is a neural network model that takes the current state of the manufacturing process and traceability results as input and outputs decisions on adjusting process parameters. Trained using deep reinforcement learning, the policy network learns which process parameter adjustments should be made under different production line conditions through interaction with the manufacturing process environment during training. The network receives rewards for decreasing the probability of quality defect prediction or increasing the pass rate of quality inspection. The specific architecture of the policy network can be flexibly chosen according to actual needs. For example, a policy network can use a deep reinforcement learning model based on an Actor-Critic architecture. The Actor network is responsible for outputting the adjustment amount of each process parameter based on the current manufacturing process entity state data and traceability reports, while the Critic network is responsible for evaluating the expected benefit of making the adjustment in the current state. Through alternating updates of the Actor and Critic networks, the policy network can gradually learn the adjustment strategy that maximizes long-term quality benefits. Alternatively, a policy network can use a deep reinforcement learning model based on a DQN architecture. The DQN network approximates the value function of each process parameter adjustment action, and the policy network selects the adjustment action with the highest value function as the output at each time step. In addition, the policy network can also be implemented using deep reinforcement learning architectures such as proximal policy optimization or soft actor critic, and this embodiment does not impose any restrictions on this.

[0085] The inputs to the strategy network include current manufacturing process entity status data and traceability reports. The current manufacturing process entity status data reflects the actual operating status of the production line at the moment of adjustment decision-making, including the operating parameters of each piece of equipment, the processing progress of each workpiece, the current values ​​of each process parameter, and environmental conditions. The traceability report provides information on the location of the root cause of defects, including the root cause process, abnormal parameters, and the defect impact path. After receiving these two inputs, the strategy network outputs the adjustment amount for each process parameter based on its learned strategy. The adjustment amount refers to the magnitude and direction of the change in the process parameter. For example, the strategy network might output that the cutting speed parameter needs to be reduced by 5%, the feed rate parameter needs to be increased by 3%, and the coolant flow rate parameter needs to remain unchanged. The output of the adjustment amount can be a continuous numerical value or a discrete adjustment level; this embodiment does not impose any restrictions on this.

[0086] Incremental training samples were constructed using the adjusted quality inspection data.

[0087] After receiving the adjustment amount, the manufacturing execution unit adjusts the corresponding process parameters accordingly. The adjustment can be performed automatically by the manufacturing execution unit, or it can generate an adjustment command which is then confirmed and executed by the operator. The adjusted quality inspection data refers to the data obtained from quality inspection of subsequently processed workpieces after the process parameters have been adjusted. There are various ways to construct incremental training samples. For example, the adjusted quality inspection data can be combined with the corresponding manufacturing process entity state data before adjustment, root cause localization information from the traceability report, and the adjustment amount output by the strategy network to form a complete incremental training sample. This sample simultaneously includes state information, traceability information, adjustment actions, and the adjusted quality results, and can be used to simultaneously update the temporal graph neural network and the strategy network. Alternatively, the adjusted quality inspection data can be combined only with the corresponding manufacturing process entity state data to form an incremental training sample for updating the temporal graph neural network, while the adjusted quality inspection data can be combined with the state and adjustment amount before adjustment to form an incremental training sample for updating the strategy network. The specific construction method of the incremental training samples can be flexibly determined according to the design of the online update strategy; this embodiment does not impose any restrictions on this.

[0088] The parameters of the time-series graph neural network are updated online using incremental training samples.

[0089] Updating the manufacturing process dynamic graph using adjusted quality inspection data refers to adding new nodes and edges to the dynamic graph by incrementally adding the newly generated manufacturing process entity state data and quality inspection data according to the method described in Example 2, while deleting expired nodes and edges that are outside the time window, so that the dynamic graph reflects the adjusted production line state. Updating the parameters of the time-series graph neural network online using incremental training samples means that instead of retraining the entire time-series graph neural network, the model parameters are fine-tuned using incremental training samples based on the existing model parameters, so that the model can adapt to the adjusted production line state. The specific implementation of online updating can be stochastic gradient descent, mini-batch gradient descent, or other parameter update methods suitable for online learning.

[0090] In the process of updating the parameters of a temporal graph neural network online, an elastic weight consolidation method is used to constrain the weight parameters of the temporal graph neural network in order to suppress catastrophic forgetting during the online update process.

[0091] Catastrophic forgetting refers to the phenomenon where, when a neural network learns new tasks or data, previously learned knowledge is significantly overwritten or lost due to parameter updates. In the scenario of manufacturing quality defect prediction, the temporal graph neural network has already learned the mapping relationship between various defect patterns and the physical state of the manufacturing process before online updates. If the parameters are updated directly using incremental training samples without constraints, the model may overfit the adjusted new data, causing it to lose its predictive ability for defect patterns that were accurately identified before the adjustment. The resilient weight consolidation method suppresses catastrophic forgetting by imposing additional constraints on important weights during parameter updates. Specifically, the resilient weight consolidation method first determines the importance of each weight parameter in the temporal graph neural network to the historical task; the more important the weight, the less likely it is to be significantly changed in subsequent updates. The constraint can be imposed by applying a secondary penalty term to important weights, that is, adding a regularization term to the loss function. This term is proportional to the square of the difference between the current value and the historical best value of the weight, and the proportionality coefficient is determined by the importance of the weight. For example, for a weight parameter with high importance, its corresponding quadratic penalty term coefficient is large. When online updates attempt to adjust this weight parameter to a position far from its historical optimum, the penalty term in the loss function will increase significantly, thereby suppressing large shifts in this weight parameter. For weight parameters with low importance, their corresponding quadratic penalty term coefficients are small, allowing for relatively free adjustment of these weight parameters to adapt to new data during online updates. In this way, time-series graphical neural networks can retain historical knowledge while learning new data during online updates, avoiding catastrophic forgetting.

[0092] If the predicted probability of quality defects after adjustment does not decrease below the preset probability threshold, then the key spatiotemporal nodes are re-identified and the defect impact path is traced backward along the influence relationship edge in the manufacturing process dynamic diagram. The traceability report is regenerated and the parameters of the strategy network are adjusted.

[0093] The preset probability threshold is a quantitative standard used to determine whether the process parameter adjustment has achieved the expected results. After the process parameter adjustment is performed at the manufacturing execution end, the updated manufacturing process dynamic graph and the updated time-series neural network are used to re-predict the quality defects of the adjusted workpiece, obtaining the re-predicted quality defect prediction probability. If the prediction probability drops below the preset probability threshold, it indicates that the process parameter adjustment has achieved the expected results, the adjustment amount output by the root cause and strategy network in the current traceability report is effective, and the closed-loop process can continue to operate normally. If the prediction probability does not drop below the preset probability threshold, including both cases where the adjusted prediction probability decreases but is still higher than the preset probability threshold, and cases where the adjusted prediction probability increases instead of decreasing, it indicates that the process parameter adjustment has failed to achieve the expected results, and there may be issues such as inaccurate root cause location, insufficient adjustment amount, or incorrect adjustment direction. At this time, the re-identification of key spatiotemporal nodes is triggered, that is, the time attention weight analysis and input gradient attribution analysis described in Example 3 are re-executed, and the key time window and key process parameter nodes that contribute the most to the quality defect prediction probability are re-determined based on the updated dynamic graph and model parameters. Then, following the method described in Example 3, the re-identified high-contribution nodes are mapped to the manufacturing causal graph. The root cause process and root cause process parameter set are located by reverse searching along the causal edges in the manufacturing causal graph, and the defect impact path is traced backward along the influence relationship edges in the manufacturing process dynamic graph, thus regenerating the traceability report. This process of regenerating the traceability report is based on a complete rerun of the contribution analysis and causal graph search using the updated dynamic graph and model parameters, without directly reusing the key spatiotemporal nodes and root cause path results from the previous round. The regenerated traceability report may locate different root cause processes or abnormal parameters than before, providing a corrected basis for the next round of adjustments. Simultaneously, the parameters of the strategy network are adjusted, enabling the strategy network to learn from the experience of unsatisfactory adjustment results and output more reasonable adjustment amounts when facing similar situations in the future. Through the above-mentioned mechanism of triggering re-tracing and adjusting strategy network parameters, this embodiment forms a closed-loop self-optimization process with self-correction capabilities. Even if a single adjustment fails to achieve the expected results, the system can automatically initiate a new round of tracing and adjustment, continuously approaching the optimal process parameter configuration. To prevent the closed-loop triggering mechanism from oscillating when the adjustment consistently fails to meet expectations, this embodiment sets anti-oscillation constraints: when the number of consecutive triggers for re-tracing of the same workpiece reaches the preset maximum number of retries, the online update of the workpiece is suspended and an alarm message is output to prompt manual intervention; when the adjustment effect is not up to standard, the strategy network parameters are updated with a learning rate smaller than the normal update step size to avoid the strategy network being over-corrected under similar conditions.In addition, for workpieces whose prediction uncertainty exceeds the preset uncertainty threshold, the system marks the corresponding workpiece as an object to be manually re-inspected and outputs process parameter adjustment information marked with uncertainty warning. The manufacturing execution end temporarily suspends the automatic execution of the adjustment action corresponding to the process parameter adjustment information. Since the automatic execution of the workpiece is temporarily suspended, no quality inspection data after the process parameter adjustment is generated. Therefore, the model optimization update based on the adjusted quality inspection data is not triggered, thus avoiding low confidence data from polluting the prediction model.

[0094] This embodiment automatically converts traceability reports into adjustment values ​​for various process parameters through a strategy network, enabling traceability results to directly drive process parameter adjustments at the manufacturing execution end, reducing manual intervention. By constructing incremental training samples using adjusted quality inspection data and updating the parameters of the time-series neural network online, the prediction model can continuously adapt to changes in production line status. By applying constraints to important weights through an elastic weight consolidation method, historical knowledge is retained during online updates, suppressing catastrophic amnesia. By setting preset probability thresholds and triggering re-traceability and strategy network parameter adjustments when the adjustment effect is unsatisfactory, a closed-loop triggering mechanism with self-correction capabilities is formed, ensuring the effectiveness of process adjustments and continuous optimization capabilities.

[0095] It should be understood that the specific architecture of the policy network, the specific construction method of the incremental training samples, the determination method of the weight importance in the elastic weight consolidation method, and the specific value of the preset probability threshold in this embodiment can all be adjusted according to the characteristics of the actual production line and the quality management requirements. This embodiment is only used to illustrate the specific implementation method of the technical solution and does not constitute a limitation on the scope of protection.

[0096] Embodiment 5 of this application is as follows:

[0097] This embodiment, building upon the traceability report generation in Embodiment 3, further introduces counterfactual perturbation sensitivity analysis. From a causal inference perspective, it identifies the sensitive process parameters that have the greatest impact on the predicted probability of quality defects. These sensitive process parameters are then fused with the root cause process parameter set obtained through manufacturing causal graph localization in Embodiment 3 to improve the completeness and accuracy of the traceability report. Embodiment 3 already described the complete process of identifying key spatiotemporal nodes through time attention weight analysis and input gradient attribution analysis, locating root cause processes and root cause process parameter sets through manufacturing causal graph mapping and causal edge reverse search, and outputting root cause paths in descending confidence order. This embodiment focuses on explaining the generation method of counterfactual perturbations, the calculation method of the difference in predicted probability before and after the perturbation, the implementation method of sensitivity ranking, and the fusion method of sensitive process parameters and root cause process parameter sets.

[0098] Based on the traceability report generated in Example 3, target defect samples and corresponding manufacturing process dynamic diagrams are selected. Multiple counterfactual perturbations are applied to the values ​​of key process parameter nodes. The perturbation amplitude is determined according to the allowable tolerance range of the process parameters, and multiple perturbation-enhanced manufacturing process dynamic diagrams are generated.

[0099] The target defect sample refers to a workpiece sample predicted by the time-series graph neural network to have a high probability of quality defect prediction. The manufacturing process dynamic graph corresponding to this sample contains the nodes, edges, and feature information of each node at each time step involved in the manufacturing process of the workpiece. The key process parameter nodes refer to the process parameter nodes that contribute significantly to the probability of quality defect prediction, identified by contribution analysis in Example 3. The process parameters corresponding to these nodes are the main objects of the counterfactual perturbation analysis.

[0100] Counterfactual perturbation refers to artificially altering the values ​​of key process parameters while keeping other conditions constant, to observe the impact of this change on the probability of quality defect prediction. The core idea of ​​counterfactual perturbation originates from intervention analysis in causal inference, which involves actively changing the value of a variable and observing the changes in the resulting variable to determine whether a causal relationship exists between the variable and the resulting variable, and the strength of the causal effect. Unlike the contribution measurement based on input gradient attribution analysis in Example 3, counterfactual perturbation analysis does not rely on backpropagation calculations within the model. Instead, it directly modifies the input data and observes changes in the output to determine sensitivity. Therefore, it can independently verify the degree of influence of each process parameter on the defect prediction results from a data perspective.

[0101] The disturbance amplitude is determined based on the allowable tolerance range of the process parameters. The allowable tolerance range of a process parameter refers to the upper and lower limits of its permissible fluctuation under normal production conditions; exceeding this range may adversely affect processing quality. The sources of the allowable tolerance range for process parameters can be various. For example, it can be derived from the permissible deviation range specified in the process specification document. The process specification document typically provides clear tolerance bands for key process parameters of each operation. For instance, if the permissible cutting speed range for a turning operation is 800 to 1200 revolutions per minute, the corresponding allowable tolerance range is 20% to 20% of the nominal value of 1000 revolutions per minute. Alternatively, it can be derived from the recommended operating range given in the equipment manual or process manual. Furthermore, the allowable tolerance range can also be determined based on the statistical relationship between the process parameter and quality defects in historical quality data, using the fluctuation range of parameters in historical data that did not lead to quality defects as the allowable tolerance range.

[0102] There are several ways to generate counterfactual perturbations. For example, a perturbation of 5% (positive) and 5% (negative) can be applied to the value of a key process parameter node, that is, multiplying the current value of the parameter by 1.05 and 0.95 respectively to obtain two perturbed values. Alternatively, a perturbation of 10% (positive) and 10% (negative) can be applied to obtain two values ​​with larger perturbation amplitudes. Multiple perturbation values ​​can also be generated at equal intervals within the allowable tolerance range, for example, generating 10%, 5%, 5%, and 14% perturbation values ​​at 5% intervals within the range of 10% (negative) to 10%. The number of perturbation values ​​can be flexibly determined according to computing resources and traceability accuracy requirements; this embodiment does not impose any restrictions on this.

[0103] For each perturbation value, the perturbation value is replaced in the feature vector of the corresponding key process parameter node in the manufacturing process dynamic diagram, while keeping the feature vectors of other nodes unchanged, thus generating a perturbed manufacturing process dynamic diagram. For example, if a perturbation of +5% is applied to the cutting speed parameter node, the element value corresponding to the cutting speed in the feature vector of this node is replaced with the original value multiplied by 1.05. The attributes of other nodes and edges in the dynamic diagram remain unchanged, thus obtaining a perturbed manufacturing process dynamic diagram. By performing the above replacement operation on multiple perturbation values, multiple perturbed manufacturing process dynamic diagrams can be generated.

[0104] Multiple perturbation-induced manufacturing process dynamic graphs are input into a time-series graph neural network to calculate the difference in the predicted probability of quality defects before and after the perturbation.

[0105] Specifically, for each perturbation-triggered manufacturing process dynamic diagram, it is input into the same time-series graph neural network as in Example 1 to obtain the perturbation-triggered quality defect prediction probability. The perturbation-triggered quality defect prediction probability is compared with the pre-perturbation quality defect prediction probability, and the difference between the two is calculated. The difference can be calculated by subtracting the pre-perturbation prediction probability from the perturbation-triggered probability, or vice versa, as long as the absolute value of the difference is used consistently in the subsequent sensitivity ranking. For example, if the pre-perturbation quality defect prediction probability for a workpiece is 0.72, and a positive 5% perturbation is applied to the cutting speed parameter node, the prediction probability becomes 0.58, then the difference is -0.14, and the absolute value of the difference is 0.14. Applying a negative 5% perturbation to the same parameter node, the prediction probability becomes 0.81, then the difference is positive 0.09, and the absolute value of the difference is 0.09.

[0106] The sensitivity of process parameters is ranked based on the absolute value of the difference, and sensitive process parameters are identified.

[0107] Sensitivity ranking refers to arranging process parameters from largest to smallest based on the absolute value of the difference between the predicted probabilities of quality defects before and after the disturbance. The larger the absolute value of the difference, the more significant the impact of the change in the value of the process parameter on the predicted probability of quality defects, and the higher the sensitivity of the process parameter to defect formation. When multiple disturbance values ​​are applied to the same process parameter node, the maximum value of the absolute value of the difference corresponding to each disturbance value can be taken as the sensitivity measure of the process parameter, or the average value of the absolute values ​​of the difference corresponding to each disturbance value can be taken as the sensitivity measure. This embodiment does not impose any restrictions on this.

[0108] For example, applying perturbations of ±5% and ±10% to the cutting speed parameter node yields four absolute differences of 0.14, 0.09, 0.22, and 0.17, respectively. The maximum value of 0.22 is taken as the sensitivity measure of the cutting speed parameter. Applying the same perturbation to the feed rate parameter node yields four absolute differences of 0.05, 0.03, 0.08, and 0.06, respectively. The maximum value of 0.08 is taken as the sensitivity measure of the feed rate parameter. Applying the same perturbation to the coolant flow rate parameter node yields four absolute differences of 0.02, 0.01, 0.03, and 0.02, respectively. The maximum value of 0.03 is taken as the sensitivity measure of the coolant flow rate parameter. Arranged from highest to lowest sensitivity, the cutting speed parameter has the highest sensitivity, followed by the feed rate parameter, and the coolant flow rate parameter has the lowest. A sensitivity threshold can be set to identify process parameters whose sensitivity measures exceed this threshold as sensitive process parameters, or the top-ranked process parameters in terms of sensitivity can be directly selected as sensitive process parameters. Sensitive process parameters refer to process parameters identified through counterfactual perturbation analysis that have a significant causal impact on the probability of predicting quality defects.

[0109] The sensitive process parameters and the root cause process parameters are combined into a union, duplicate parameters are removed, and the union is used as the updated set of process parameters. The traceability report is then updated, and the final traceability report is output.

[0110] The root cause process parameter set refers to the set of root cause process parameters obtained in Example 3 through manufacturing causal graph mapping and causal edge reverse search. The fusion method for sensitive process parameters and the root cause process parameter set is union, which involves merging the two sets of process parameters, removing duplicate parameters, and retaining all different parameters. The purpose of union is to integrate the results from two tracing perspectives. The tracing method based on the manufacturing causal graph in Example 3 locates root cause process parameters from the perspective of causal paths. Its advantage is that the tracing results conform to the inherent causal logic of the manufacturing process, but it may be limited by the coverage of the manufacturing causal graph, and cannot locate causal relationships not included in the manufacturing causal graph. In this example, the sensitivity ranking method based on counterfactual perturbation analysis identifies sensitive process parameters from the perspective of data intervention. Its advantage is that it does not rely on a pre-constructed causal graph structure and can discover sensitive parameters not covered in the manufacturing causal graph, but it may be affected by the perturbation amplitude setting and the nonlinear characteristics of the model. The two methods are complementary; union can retain the effective parameters identified by each method, avoiding omissions.

[0111] Removing duplicate parameters means that when a process parameter appears in both the sensitive process parameter set and the root cause process parameter set, it is retained only once in the union set. For example, if the cutting speed parameter is simultaneously identified as a root cause process parameter by the manufacturing cause-effect graph tracing and as a sensitive process parameter by the counterfactual perturbation analysis, then the cutting speed parameter will only appear once in the union set. The updated process parameter set contains the union of the sensitive process parameter set and the root cause process parameter set, and this set serves as the basis for updating the process parameter-related content in the final tracing report. Updating the tracing report means incorporating the updated process parameter set into the tracing report generated in Example 3, making the abnormal parameter information in the tracing report more complete. Outputting the final tracing report means using the updated tracing report as the final output of this example, for use by the strategy network in Example 4 when generating process parameter adjustment information.

[0112] This embodiment identifies sensitive process parameters from a causal inference perspective through counterfactual perturbation analysis, complementing the root cause localization based on the manufacturing causal graph in Embodiment 3. Counterfactual perturbation analysis determines the sensitivity of process parameters by directly intervening in the input data and observing changes in the output. It does not rely on backpropagation calculations within the model and is not limited by the coverage of the manufacturing causal graph, enabling it to discover sensitive parameters not included in the manufacturing causal graph. By unifying the sets of sensitive process parameters with the root cause process parameters, the results from both causal path tracing and data intervention analysis are integrated. After removing duplicate parameters, complementary information is retained, improving the completeness and accuracy of the tracing report and providing a more comprehensive parameter basis for the generation of subsequent process parameter adjustment information.

[0113] It should be understood that the specific magnitude of the counterfactual disturbance, the number of disturbance values, the setting method of the sensitivity threshold, and the fusion method of the sensitive process parameters and root cause process parameter sets in this embodiment can all be adjusted according to the characteristics of the actual production line and the traceability accuracy requirements. This embodiment is only used to illustrate the specific implementation method of the technical solution and does not constitute a limitation on the scope of protection.

[0114] Embodiment 6 of this application is as follows:

[0115] This embodiment further elaborates on the output method of the quality defect prediction probability based on the temporal graph neural network prediction steps in Embodiment 2. Embodiment 2 has already described the overall process of inputting multiple temporal subgraphs into a temporal graph neural network composed of gated recurrent units and graph attention networks, and outputting the quality defect prediction probability of the workpiece in each process. This embodiment focuses on explaining the specific implementation method of obtaining prediction results with an attached uncertainty metric through a deep ensemble model, and the role of prediction uncertainty in quality decision-making.

[0116] In the prediction output stage of Example 2, each time series subgraph is processed by a deep ensemble model to obtain multiple quality defect prediction probabilities. The deep ensemble model consists of multiple time series graph neural networks with the same structure but different initializations.

[0117] A deep ensemble model is a model structure composed of multiple sub-models operating in parallel, where each sub-model provides a prediction result for the same input, and then the prediction results are aggregated. In this embodiment, each sub-model of the deep ensemble model is a temporal graph neural network, and the network structures of each sub-model are identical, meaning they have the same number of layers, the same stacking method of gated recurrent units and graph attention networks, the same node feature dimensions, and the same output dimensions. The difference between the sub-models lies in their initialization parameters. Different initialization parameters mean that the weight parameters of each sub-model have different values ​​at the beginning of training. This difference can be achieved by initializing the parameters with different random seeds. Because each sub-model starts with different initial parameters during training, even when faced with the same training data, the parameters learned by each sub-model will differ, resulting in slightly different prediction results for the same input.

[0118] The number of sub-models in a deep ensemble model can be flexibly set according to actual needs. For example, the number of sub-models can be set to 5, meaning the deep ensemble model consists of 5 time-series graph neural networks with the same structure but different initializations. The number of sub-models can also be set to 10, meaning it consists of 10 time-series graph neural networks with the same structure but different initializations. The choice of the number of sub-models needs to consider the balance between prediction accuracy and computational cost. If the number of sub-models is too small, the differences between the prediction results of each sub-model may not be sufficient to stably reflect the uncertainty of the model; if the number of sub-models is too large, the computational and storage costs will increase accordingly. In practical applications, the number of sub-models can also be set to 3, 8, or other suitable values; this embodiment does not impose any restrictions on this.

[0119] Processing each time-series subgraph separately means taking the multiple time-series subgraphs obtained by time window segmentation in Example 2 as input and feeding them into each sub-model of the deep ensemble model. Each sub-model independently extracts spatiotemporal features from each time-series subgraph and outputs its own predicted probability of quality defects. For example, for a workpiece being processed in the fourth process, the deep ensemble model contains 5 sub-models. The 5 sub-models output the predicted probability of quality defects for the workpiece in the fourth process, resulting in 5 predicted probability values. These 5 predicted probability values ​​may not be exactly the same, for example, 0.31, 0.28, 0.35, 0.29, and 0.33 respectively. The differences between the prediction results of each sub-model arise from the differences in the parameters of each sub-model, and this difference reflects, to some extent, the uncertainty of the model regarding the current input data.

[0120] The mean of multiple quality defect prediction probabilities is used as the final quality defect prediction probability, and the standard deviation is used as the prediction uncertainty.

[0121] The mean is calculated by summing the predicted quality defect probabilities output by each sub-model in the deep ensemble model and dividing by the number of sub-models. For example, if the predicted probabilities output by the five sub-models are 0.31, 0.28, 0.35, 0.29, and 0.33, the mean is 0.312, which is used as the final predicted quality defect probability output. The standard deviation is calculated as the square root of the sum of the squares of the differences between the predicted probabilities output by each sub-model and the mean. For example, the standard deviation of the five predicted probabilities is the square root of the sum of the squares of the differences between each predicted probability and 0.312. A larger standard deviation indicates that the prediction results of each sub-model for the same input are more dispersed, and the model has a higher degree of uncertainty about that input; a smaller standard deviation indicates that the prediction results of each sub-model are more consistent, and the model has a greater grasp of that input.

[0122] By using a deep ensemble model to output multiple predicted probabilities and employing the mean and standard deviation as the final predicted probability and prediction uncertainty, respectively, the prediction results are accompanied by a measure of reliability. A single model can only output a single predicted probability value, which cannot reflect the reliability of the prediction result. The deep ensemble model uses the dispersion between the prediction results of multiple sub-models to measure uncertainty, without requiring additional changes to the model structure or making additional assumptions about the data distribution. The implementation is simple and has clear statistical meaning.

[0123] When the prediction uncertainty exceeds the preset uncertainty threshold, the corresponding workpiece is marked as an object to be manually re-inspected, and process parameter adjustment information marked with uncertainty warning is output so that the manufacturing execution end can temporarily suspend the automatic execution of the adjustment action corresponding to the process parameter adjustment information.

[0124] A preset uncertainty threshold is a quantitative standard used to determine whether the prediction result is sufficiently reliable. There are several ways to set the preset uncertainty threshold. For example, the threshold can be determined based on the relationship between prediction uncertainty and prediction accuracy in historical data, selecting the upper limit of uncertainty that maintains the prediction accuracy above an acceptable level as the threshold. Alternatively, the threshold can be set according to the stringency of quality control. For production lines with high quality requirements, a lower threshold can be set, allowing more workpieces with higher prediction uncertainty to enter the manual re-inspection process; for production lines with relatively relaxed quality requirements, a higher threshold can be set to reduce the workload of manual re-inspection. The specific value of the preset uncertainty threshold can be adjusted according to the actual application scenario; this embodiment does not impose any restrictions on this.

[0125] When the prediction uncertainty of a certain workpiece exceeds a preset uncertainty threshold, it indicates that there is a significant discrepancy in the quality defect prediction results of the various sub-models within the deep integration model, and the reliability of the current prediction results is insufficient. At this point, the workpiece is marked as requiring manual re-inspection. Quality management personnel then manually inspect and judge the workpiece, outputting process parameter adjustment information marked with uncertainty warnings. This allows the manufacturing execution end to temporarily suspend the automatic execution of the corresponding adjustment actions. The purpose of outputting process parameter adjustment information marked with uncertainty warnings is to prevent the manufacturing execution end from automatically performing adjustments based on unreliable prediction results, thus preventing unnecessary process parameter changes or even the introduction of new quality risks.

[0126] To illustrate the necessity of deeply integrated models and uncertainty metrics in quality decision-making, a comparative example is presented here. If only a single model outputs predicted probabilities without calculating uncertainty, unreliable process adjustment instructions may be generated in low-confidence scenarios. Specifically, a single time-series graphical neural network, under conditions of insufficient training data coverage, may give a seemingly definite value for the predicted probability of quality defects for certain workpieces, such as 0.45. Since a single model cannot provide information on the reliability of this prediction result, the quality control system may directly generate process parameter adjustment information based on this predicted probability and send it to the manufacturing execution end. However, this predicted probability may be an unreliable result given by a model that has not sufficiently learned about this operating condition; the actual defect probability may be much higher or much lower than 0.45. If the actual defect probability is much lower than 0.45, the process parameter adjustments made based on this prediction result are unnecessary, causing production line disturbances; if the actual defect probability is much higher than 0.45, the adjustment amount generated based on this prediction result may be insufficient and unable to effectively eliminate defect risks. In contrast, the deep integration model measures uncertainty by using the standard deviation of the prediction results of multiple sub-models. When there is a large discrepancy in the prediction results of the sub-models for the same workpiece, the standard deviation increases and the prediction uncertainty exceeds the threshold. The system then marks the workpiece as an object to be manually re-inspected and outputs process parameter adjustment information marked with uncertainty warnings. This allows the manufacturing execution end to temporarily suspend the automatic execution of the adjustment action corresponding to the process parameter adjustment information, thereby avoiding the automatic execution of unreliable process adjustment instructions in low-confidence scenarios.

[0127] This embodiment processes each time-series subgraph separately using a deep ensemble model. Multiple time-series neural networks with the same structure but different initializations are used to obtain multiple quality defect prediction probabilities. The mean is used as the final prediction probability and the standard deviation is used as the prediction uncertainty, so that the prediction results are accompanied by a confidence metric. By setting a preset uncertainty threshold, when the prediction uncertainty exceeds the threshold, the corresponding workpiece is marked as an object to be manually re-inspected, and process parameter adjustment information marked with uncertainty warning is output. This allows the manufacturing execution end to temporarily suspend the automatic execution of the adjustment action corresponding to the process parameter adjustment information, avoiding the automatic execution of unreliable process adjustment instructions in low-confidence scenarios and improving the reliability of quality decisions.

[0128] It should be understood that the number of sub-models in the deep integration model, the specific value of the preset uncertainty threshold, and the specific calculation method of uncertainty in this embodiment can all be adjusted according to the characteristics of the actual production line and the quality management requirements. This embodiment is only used to illustrate the specific implementation of the technical solution and does not constitute a limitation on the scope of protection.

[0129] Embodiment 7 of this application is as follows:

[0130] like Figure 2As shown, this embodiment provides a manufacturing quality defect prediction and traceability system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the manufacturing quality defect prediction and traceability method of any one of Embodiments 1 to 6.

[0131] The memory is a hardware unit in the system used to store data. In this embodiment, the memory is used to store manufacturing process entity state data, manufacturing process dynamic graphs, parameters of the time-series graph neural network, and traceability reports. Manufacturing process entity state data is the basic input for constructing the manufacturing process dynamic graph. It can come from the mapping results of the manufacturing process entity from the digital twin, or from data records from sensors, testing instruments, or manufacturing execution terminals deployed on the production line. The manufacturing process dynamic graph is stored in the memory in the form of a graph data structure, including a set of nodes, a set of edges, and attribute information of nodes and edges that changes over time. The parameters of the time-series graph neural network include the weight parameters and bias parameters of each layer in the gated recurrent unit and the graph attention network. These parameters change with the input of incremental training samples during online updates, and the memory needs to continuously store the updated parameter values. The traceability report is the output of the contribution analysis and reverse tracing steps, containing information such as root cause processes, abnormal parameters, and defect impact paths. The memory stores this information for use when the strategy network generates process parameter adjustment information, and also for quality management personnel to review later. In addition, the memory can also be used to store configuration information such as the parameters of the policy network, the parameters of each sub-model in the deep ensemble model, preset contribution thresholds, preset probability thresholds, and preset uncertainty thresholds, as well as auxiliary data needed in the traceability process, such as manufacturing causal graphs and allowable tolerance ranges of process parameters. The specific type of memory can be volatile memory, non-volatile memory, or a combination thereof, and this embodiment does not limit this.

[0132] The processor is the hardware unit in the system used to perform computation and control logic. When the processor executes a computer program, it sequentially completes processing steps such as dynamic graph construction, prediction, tracing, adjustment information generation, and online updating. Specifically, the processor reads the entity state data of the manufacturing process from memory, constructs the dynamic graph of the manufacturing process according to the method described in Example 1, and writes the construction result back to memory. In the prediction stage, the processor divides the dynamic graph of the manufacturing process into multiple temporal subgraphs according to a fixed time window, inputs the temporal subgraphs into a temporal graph neural network, and calculates the predicted probability of quality defects of the workpiece in each process through forward propagation. In the tracing stage, the processor performs time attention weight analysis and input gradient attribution analysis on each layer of the temporal graph neural network, identifies key spatiotemporal nodes, traces the defect influence path backward along the influence relationship edge in the dynamic graph of the manufacturing process, and generates a tracing report. In the adjustment information generation stage, the processor inputs the tracing report into the strategy network, which outputs the adjustment amount of each process parameter based on the current entity state data of the manufacturing process and the tracing report, and outputs the adjustment amount as process parameter adjustment information to the manufacturing execution end. During the online update phase, the processor receives adjusted quality inspection data from the manufacturing execution end, uses this data to update the dynamic graph of the manufacturing process, and constructs incremental training samples to update the parameters of the time-series graph neural network online. The execution order and specific implementation of the above processing steps in the processor are consistent with the descriptions of the corresponding steps in Examples 1 to 6, and will not be repeated here.

[0133] The processor and memory are connected via a data bus or communication interface. During the execution of the computer program, the processor reads data from memory or writes processing results to memory as needed for each processing step. For example, in the dynamic graph construction phase, the processor reads the entity state data of the manufacturing process from memory, and writes the manufacturing process dynamic graph to memory after construction. In the prediction phase, the processor reads the parameters of the manufacturing process dynamic graph and the time-series neural network from memory, and writes the predicted probability of quality defects to memory after forward propagation. In the online update phase, the processor reads the incremental training samples and the current model parameters from memory, and writes the new parameter values ​​back to memory after parameter updates. Through data interaction between the processor and memory, the system integrates dynamic graph construction, time-series neural network prediction, contribution analysis and tracing, and closed-loop process parameter self-optimization into a unified execution carrier, enabling the quality defect prediction and tracing functions on the manufacturing site to be completed within the same system without the need for data transfer and function switching between multiple independent devices or systems.

[0134] It should be understood that the specific hardware models, storage capacity, processing power, and communication methods between the processor and the manufacturing execution end in this embodiment can all be selected and configured according to the scale of the actual production line and the quality management requirements. This embodiment is only used to illustrate the basic composition and execution relationship of the system and does not constitute a limitation on the scope of protection.

[0135] Embodiment 8 of this application is as follows:

[0136] This embodiment uses a discrete manufacturing production line with multiple processing steps as an application scenario to illustrate the operation of the manufacturing quality defect prediction and traceability method described in the previous embodiments in an actual production line. The production line includes several processing stations arranged sequentially, such as a blanking station, a roughing station, a semi-finishing station, a finishing station, and an inspection station. Workpieces are processed sequentially through each station according to the process route. Each station is equipped with processing equipment, environmental sensors, and inspection instruments. The manufacturing execution terminal is connected to the data acquisition interface of each station, enabling real-time acquisition of the physical status data of the manufacturing process.

[0137] During production line operation, manufacturing process entity status data is continuously collected from equipment, environmental sensors, and inspection stations at each workstation. Equipment operating parameters include spindle speed, load current, vibration signals, and temperature signals. Environmental sensors collect temperature and relative humidity data for the production line area. Inspection stations collect geometric dimensional data of workpieces after processing in each step, such as diameter, thickness, flatness, and position. This data is mapped to structured status information associated with each manufacturing process entity via a digital twin, and a manufacturing process dynamic diagram is constructed as described in Example 1. In the dynamic diagram, workpiece nodes correspond to the various workpieces being processed in the production line, workstation nodes correspond to each processing station, equipment nodes correspond to the processing equipment within each workstation, process parameter nodes correspond to process parameters such as cutting speed, feed rate, and depth of cut, and environmental status nodes correspond to the production line environmental conditions. Process flow nodes connect the flow relationships of workpieces between different workstations, and parameter action nodes connect process parameter nodes with the workpiece nodes or workstation nodes affected by them.

[0138] A temporal graph neural network processes a dynamic diagram of the manufacturing process and outputs the predicted probability of quality defects for each workpiece at each stage. For example, before a workpiece enters the finishing stage after semi-finishing, the temporal graph neural network outputs a probability of 0.68 for dimensional deviation defects in the finishing stage, based on the workpiece's processing status in previous stages, equipment operating parameters, and process parameter values. This predicted probability exceeds a preset defect warning threshold of 0.5, triggering a traceability process.

[0139] After the traceability process is initiated, the contribution analysis of the time-series graph neural network is performed as described in Example 3. By performing time attention weight analysis and input gradient attribution analysis on each layer of the time-series graph neural network, the key time windows and key process parameter nodes that contribute the most to the probability of predicting quality defects are identified. In this scenario, the key time window corresponds to the processing period of the semi-finishing process, and the key process parameter node corresponds to the cutting speed parameter node of the semi-finishing process. By tracing the defect impact path backward along the process flow edge and parameter action edge in the manufacturing process dynamic diagram, it is found that when the workpiece is processed in the semi-finishing process, the cutting speed parameter deviates from the normal range, resulting in excessive surface roughness of the semi-finished part, which in turn affects the machining allowance allocation of the finishing process, and may ultimately lead to dimensional deviations after finishing. The generated traceability report includes the root cause process as the semi-finishing process, the abnormal parameter as the cutting speed parameter, and the complete defect impact path.

[0140] After the traceability report is generated, it is input into the strategy network as described in Example 4. Based on the current manufacturing process entity status data and the traceability report, the strategy network outputs an adjustment amount for the cutting speed parameter, for example, reducing the cutting speed parameter by eight percent. This adjustment amount is output as process parameter adjustment information to the manufacturing execution end, which then adjusts the cutting speed parameter of the semi-finishing station accordingly.

[0141] After the adjustment is executed, subsequent workpieces continue to be processed at the semi-finishing station. The inspection station performs quality inspection on the adjusted workpieces, obtaining adjusted quality inspection data. This data is fed back to the manufacturing quality defect prediction and traceability system. The system uses the adjusted quality inspection data to update the manufacturing process dynamic graph, adding newly generated nodes and edge increments to the dynamic graph and deleting expired nodes and edges that are outside the time window. Simultaneously, incremental training samples are constructed using the adjusted quality inspection data to update the parameters of the time-series graph neural network online. During the update process, an elastic weight consolidation method is used to suppress catastrophic forgetting. After the update is completed, the system re-predicts quality defects for subsequent workpieces. If the re-predicted quality defect prediction probability drops below the preset probability threshold, it indicates that the process parameter adjustment has achieved the expected effect, and the closed-loop process continues to operate normally. If the re-predicted quality defect prediction probability does not drop below the preset probability threshold, it triggers the re-identification of key spatiotemporal nodes and regenerates the traceability report, while simultaneously adjusting the parameters of the strategy network, initiating a new round of traceability and adjustment. Furthermore, if the prediction uncertainty of a certain workpiece exceeds the preset uncertainty threshold, the workpiece is marked as an object to be manually re-inspected and process parameter adjustment information marked with uncertainty warning is output. The manufacturing execution end temporarily suspends the automatic execution of the adjustment action corresponding to the process parameter adjustment information. Since the automatic execution of the workpiece is temporarily suspended, no quality inspection data after the process parameter adjustment is generated, and therefore it does not enter the above-mentioned model optimization and update stage based on the adjusted quality inspection data.

[0142] Through the above process, this embodiment demonstrates a complete closed-loop operation process from the acquisition of physical state data in the manufacturing process, dynamic graph construction, defect prediction, interpretable traceability, to process parameter adjustment and online model updates. In an actual production line, this closed loop can run continuously. With each round of adjustment and update, the predictive model's adaptability to the current production line state is enhanced, and the accuracy of the traceability results gradually improves with the continuous use of the manufacturing causal graph and the continuous learning of the strategy network. This enables the quality control of the production line to gradually shift from passive post-event detection to proactive online prediction and self-optimization.

[0143] It should be understood that the number of production line workstations, process types, defect warning thresholds, and adjustment values ​​in this embodiment are merely examples to illustrate how the technical solution operates in a real-world scenario. In actual applications, adjustments can be made based on the specific process route, product type, and quality management requirements of the production line. This embodiment does not constitute a limitation on the scope of protection.

[0144] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A method for predicting and tracing manufacturing quality defects, characterized in that, include: Obtain entity status data of the manufacturing process, and construct a dynamic diagram of the manufacturing process based on the entity status data of the manufacturing process. The dynamic diagram of the manufacturing process uses the entities of the manufacturing process as nodes and the influence relationships between the entities of the manufacturing process as edges. The manufacturing process dynamic graph is processed by a time-series graph neural network to output the predicted probability of quality defects of the workpiece in each process. Based on the contribution analysis of the time-series graph neural network, key spatiotemporal nodes are identified, and the defect impact path is traced backward along the influence relationship edge of the manufacturing process dynamic graph to generate a traceability report; Based on the traceability report, process parameter adjustment information is generated and output to the manufacturing execution end for the manufacturing execution end to adjust the process parameters. The manufacturing process dynamic diagram is updated according to the adjusted quality inspection data fed back by the manufacturing execution end, and the time sequence neural network is optimized.

2. The manufacturing quality defect prediction and traceability method according to claim 1, characterized in that, The entity status data of the manufacturing process is obtained by mapping the manufacturing process entity to a digital twin; The nodes of the manufacturing process dynamic diagram include workpiece nodes, workstation nodes, equipment nodes, process parameter nodes, and environmental status nodes, and the influence relationship edges include process flow edges and parameter effect edges. The node features are the feature vectors of the corresponding entities at the corresponding time, and the edge weights are set according to the flow time and / or the influence of parameters between processes.

3. The manufacturing quality defect prediction and traceability method according to claim 2, characterized in that, The process of processing the manufacturing process dynamic graph using a time-series graph neural network to output the predicted probability of quality defects in the workpiece at each process includes: Whenever new manufacturing process entity state data arrives, new nodes and edges are incrementally added to the manufacturing process dynamic graph, and expired nodes and edges that have exceeded the time window are deleted to update the manufacturing process dynamic graph. The updated manufacturing process dynamic diagram is divided into multiple time-series sub-diagrams according to fixed time windows. The multiple temporal subgraphs are input into a temporal graph neural network composed of a stacked gated recurrent unit and a graph attention network, and the predicted probability of quality defects of the workpiece in each process is output. Among them, the node feature vector is determined by the corresponding feature data according to the node type. The node feature vector of the process parameter node includes the process parameter feature vector, the node feature vector of the equipment node includes the vibration frequency domain feature vector, the node feature vector of the environmental state node includes the environmental temperature and humidity data, and the node feature vector of the workpiece node includes the workpiece geometric dimension data.

4. The manufacturing quality defect prediction and traceability method according to claim 2, characterized in that, The step of analyzing the contribution of the time-series graph neural network to identify key spatiotemporal nodes, tracing the defect impact path backward along the influence relationship edges in the manufacturing process dynamic graph, and generating a traceability report includes: Temporal attention weight analysis and input gradient attribution analysis are performed on each layer of the temporal graph neural network to identify the key time window and key process parameter node that contribute the most to the prediction probability of the quality defect. The key time window and the key process parameter node together constitute the key spatiotemporal node. Tracing the defect impact path backward along the process flow edge and parameter effect edge in the manufacturing process dynamic diagram generates a traceability report containing the root cause process, abnormal parameters, and the defect impact path.

5. The manufacturing quality defect prediction and traceability method according to claim 4, characterized in that, The generation of a traceability report, which includes the root cause process, abnormal parameters, and the defect impact path, includes: Nodes whose contribution exceeds a preset contribution threshold are marked as high contribution nodes, and the high contribution nodes are mapped to a pre-constructed manufacturing causal graph, wherein the manufacturing causal graph uses manufacturing process entities as nodes and causal relationships between manufacturing process entities as edges. Extract the subgraph containing the high-contribution nodes from the manufacturing causal graph, and perform a reverse search along the causal edges in the subgraph to locate the root cause process and the root cause process parameter set; Calculate the confidence score for each root cause path, which is determined by the geometric mean of the gradient contributions of each node on the path obtained through input gradient attribution analysis; The root cause paths are output in descending order of confidence level and overlaid on the manufacturing process dynamic diagram, and included in the traceability report.

6. The manufacturing quality defect prediction and traceability method according to claim 1, characterized in that, The process of generating process parameter adjustment information based on the traceability report and outputting it to the manufacturing execution end for process parameter adjustment, updating the manufacturing process dynamic graph based on the adjusted quality inspection data fed back by the manufacturing execution end, and optimizing the time-series neural network includes: The traceability report is input into the policy network, which is trained based on deep reinforcement learning and outputs the adjustment amount of each process parameter according to the current manufacturing process entity state data and the traceability report. Incremental training samples are constructed using the adjusted quality inspection data; The parameters of the time-series graph neural network are updated online using the incremental training samples.

7. The manufacturing quality defect prediction and traceability method according to claim 6, characterized in that, The step of updating the parameters of the temporal graph neural network online using the incremental training samples includes: An elastic weight consolidation method is used to constrain the weight parameters of the time-series graph neural network in order to suppress catastrophic forgetting during the online update process; If the predicted probability of quality defects after adjustment does not decrease below the preset probability threshold, then the key spatiotemporal nodes are re-identified and the defect impact path is traced in reverse along the influence relationship edge in the manufacturing process dynamic diagram. The traceability report is regenerated and the parameters of the strategy network are adjusted.

8. The manufacturing quality defect prediction and traceability method according to claim 5, characterized in that, Also includes: Select target defect samples and corresponding manufacturing process dynamic diagrams, apply multiple counterfactual perturbations to the values ​​of key process parameter nodes, and determine the perturbation amplitude according to the allowable tolerance range of process parameters to generate multiple perturbation-based manufacturing process dynamic diagrams. The multiple perturbed manufacturing process dynamic diagrams are input into the time-series graph neural network to calculate the difference in the predicted probability of quality defects before and after the perturbed process. The process parameters are ranked by sensitivity based on the absolute value of the difference to identify sensitive process parameters. The sensitive process parameters and the root cause process parameters are combined to form a union, duplicate parameters are removed, and the union is used as the updated process parameter set. The traceability report is then updated, and the final traceability report is output.

9. The manufacturing quality defect prediction and traceability method according to claim 3, characterized in that, The predicted probability of quality defects in the output workpiece at each process includes: Each of the aforementioned time-series subgraphs is processed by a deep ensemble model to obtain multiple quality defect prediction probabilities. The deep ensemble model consists of multiple time-series graph neural networks with the same structure but different initializations. The mean of the multiple quality defect prediction probabilities is used as the final quality defect prediction probability, and the standard deviation of the multiple quality defect prediction probabilities is used as the prediction uncertainty. When the predicted uncertainty exceeds the preset uncertainty threshold, the corresponding workpiece is marked as an object to be manually re-inspected, and process parameter adjustment information marked with uncertainty warning is output so that the manufacturing execution terminal can temporarily suspend the automatic execution of the adjustment action corresponding to the process parameter adjustment information.

10. A manufacturing quality defect prediction and traceability system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the manufacturing quality defect prediction and tracing method according to any one of claims 1 to 9.