Causal Explanatory Anomaly Analysis and Root Cause Tracing Methods, Apparatus and Their Readable Storage Media
Patent Information
- Application Number
- CN202611089593.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-08-18
AI Technical Summary
[0007]本发明实施例提供了一种因果可解释异常分析与根因溯源方法、装置及其可读存储介质,针对现有方法在快速批量换产场景下存在异常识别稳定性差、根因定位偏重相关性而难以区分伴随变化与真实致因、诊断结果缺乏物理语义可解释性,以及缺乏历史知识迁移能力导致新产品上线后模型冷启动周期长等问题
1.通过引入产品型号相似度、工艺路线相似度和历史异常模式相似度的多维迁移学习机制,可在新产品上线初期快速完成因果结构初始化,缩短模型冷启动时间,降低因换产造成的模型失效风险。
Smart Images

Figure CN122594945A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of industrial intelligent manufacturing and industrial data analysis technology, and in particular to a causal explainable anomaly analysis and root cause tracing method, apparatus and readable storage medium thereof. Background Technology
[0002] As discrete manufacturing, process manufacturing, and flexible production lines continue to evolve towards smaller batches, more diverse products, and faster changeovers, manufacturing systems experience significant changes in operating conditions during product changeovers, tooling replacements, recipe reconfigurations, and equipment parameter adjustments. In such scenarios, production data often exhibits characteristics such as non-stationarity, small sample size, strong temporal coupling, and dynamic changes in process logic.
[0003] Currently, anomaly analysis and root cause localization in industrial manufacturing processes mainly rely on two types of technical approaches:
[0004] One type is based on static thresholds or statistical process control, which monitors production indicators by setting fixed thresholds and triggers an alarm when the indicators exceed the thresholds. Another type is the data-driven black box model method, which uses historical data to train a classification or regression model to identify abnormal states and output anomaly scores.
[0005] In terms of root cause analysis, existing technologies mostly use correlation coefficient analysis, time series similarity matching, or fault tree methods based on empirical rules to locate the cause of anomalies by calculating the correlation between variables or matching predefined fault modes.
[0006] Therefore, there is an urgent need for an anomaly analysis and root cause tracing method, device, and readable storage medium for rapid batch production changeover scenarios to solve the problems existing in the current technology. Summary of the Invention
[0007] This invention provides a causal interpretable anomaly analysis and root cause tracing method, apparatus and readable storage medium, which addresses the problems of existing methods in rapid batch production changeover scenarios, such as poor anomaly identification stability, root cause localization focusing on correlation and difficulty in distinguishing accompanying changes from the true cause, lack of physical semantic interpretability of diagnostic results, and long cold start cycle of model after new product launch due to lack of historical knowledge transfer capability.
[0008] The core technology of this invention is to integrate multidimensional similarity transfer learning with dynamic causal graph construction under the constraints of process mechanism, perform counterfactual perturbation intervention on candidate factors to quantitatively calculate causal contribution, and search in reverse along the causal chain to lock the source root cause, mapping the abstract reasoning path into a natural language diagnostic report with physical semantics.
[0009] In a first aspect, the present invention provides a method for causal explainable anomaly analysis and root cause tracing, the method comprising the following steps: Collect multi-source heterogeneous data in rapid batch production changeover scenarios, and perform cleaning and standardization preprocessing on the multi-source heterogeneous data. Adaptive threshold monitoring is performed on multiple monitoring indicators in the production process, and feature data within the abnormal time window is extracted when abnormal signals are detected. The initial causal structure is migrated from historical batches based on product model similarity, process route similarity, and historical anomaly pattern similarity to quickly initialize the causal graph. The causal graph is then dynamically updated under process mechanism constraints by combining online time-series observation data. Based on the causal graph, perturbation intervention is performed on candidate factors to generate counterfactual scenarios. The causal contribution of each candidate factor to the abnormal results is quantitatively calculated. Based on the causal contribution and causal edge direction constraints, the root cause is located by searching backward along the causal chain. The nodes, causal edges, and inference results in the causal reasoning path are mapped to the corresponding physical equipment and process parameter semantics, generating a natural language diagnostic report that includes abnormal phenomena, causal paths, root cause localization, and handling suggestions.
[0010] Furthermore, multi-source heterogeneous data is collected in rapid batch production changeover scenarios, and the multi-source heterogeneous data is cleaned and standardized preprocessed, including: Collect data from equipment-side sensors, programmable logic controller (PLC) control data, production environment data, and business metadata; By unifying the time base of data from different sources through time synchronization, high-frequency data is interpolated at fixed time intervals through missing data repair, low-frequency sampling data is mapped to the corresponding process time window through nearest neighbor interpolation, and statistical characteristic drift caused by equipment preheating or parameter adjustment in the early stage of production change is reduced by non-stationary component filtering based on process cycle delay compensation. Perform data acquisition anomaly detection, transmission anomaly detection, and storage anomaly detection during the data acquisition process.
[0011] Furthermore, adaptive threshold monitoring is implemented for multiple monitoring indicators during the production process, including: For the transition phase and steady-state production phase, adaptive outlier thresholds are calculated based on the historical statistical mean and standard deviation corresponding to the current phase, respectively. The degree of deviation of multiple monitoring indicators from the current stage baseline distribution is calculated, and the degree of deviation is weighted and fused to obtain a comprehensive anomaly score; When the overall anomaly score exceeds the set threshold, the key variable sequence is extracted from multiple time windows before and after the anomaly occurs, centered on the anomaly determination time, to form an aligned feature sequence corresponding to the anomaly event.
[0012] Furthermore, based on product model similarity, process route similarity, and historical anomaly pattern similarity, the initial causal structure is migrated from historical batches to quickly initialize the causal graph, including: Calculate the degree of matching between the current product and historical batches in terms of product model level, the proportion of the longest common subsequence length of the process route, and the cosine similarity of the feature vectors of the abnormal pattern, respectively. The comprehensive similarity is obtained by weighting and fusing the hierarchical matching degree, length ratio, and cosine similarity. Historical batch causal structures with a comprehensive similarity of not less than 0.7 are selected as the initial causal subgraph, and local causal subgraph initialization is completed by combining abnormal event window data.
[0013] Furthermore, the causal graph is dynamically updated based on online time-series observation data under the constraints of process mechanism, including: Local time series samples are extracted using a sliding time window. Sample variables are aligned and matched with nodes in the cause-effect graph. Newly added variables are added as new nodes, and variables that no longer appear are marked as invalid nodes and removed. The causal edge direction between nodes is determined based on the time-delay maximum correlation method, the edge strength parameter is calculated and incremental weighted update is performed in combination with historical edge weights; Calculate the direct and indirect effects of each upstream node on the abnormal target node to update the node weights; When a contradiction is detected between the causal edge direction and the process sequence, the process is traced back to the data acquisition stage to investigate data anomalies. When a sudden change in edge strength is detected that exceeds the threshold, the conflict region is located and the non-conflict structure is frozen. Under the fixed edge constraint, the causal edge direction and strength of the conflict region are re-estimated.
[0014] Furthermore, perturbation interventions are applied to candidate factors to generate counterfactual scenarios, and the causal contribution of each candidate factor to the abnormal outcome is quantitatively calculated, including: Based on the historical statistical distribution of each candidate factor and the allowable fluctuation range of the process, multiple sets of disturbance samples are constructed. The disturbance samples are input into the abnormal result prediction model to obtain the counterfactual abnormal result prediction value. The mean absolute value of the difference between the anomalous results in the factual scenario and the anomalous results in the counterfactual scenario is calculated as the causal contribution of each candidate factor to the anomalous results.
[0015] Furthermore, based on causal contribution and causal edge direction constraints, a reverse search is performed along the causal chain to pinpoint the root cause, including: Mark the node corresponding to the abnormal result as the target node and initialize the search queue, and filter out the parent node that does not have a valid reverse causal path; The causal contribution score is obtained by normalizing the causal contribution. The confidence level is calculated based on the dispersion of the counterfactual prediction results under multiple perturbation samples. For nodes whose causal contribution score and confidence level are both greater than the set threshold, the comprehensive score is calculated by combining the path weight score and the temporal consistency score. Candidate nodes are sorted according to their overall scores, and the node ranked first is identified as the root cause.
[0016] Secondly, the present invention provides a device for causal explainable anomaly analysis and root cause tracing, comprising: The multi-source industrial data acquisition module is used to collect multi-source heterogeneous data in rapid batch production changeover scenarios, and to perform data cleaning and standardization preprocessing. The production anomaly event response module is used to adaptively monitor multiple monitoring indicators in the production process and extract feature data within the abnormal time window when an abnormal signal is captured. The dynamic cause-effect graph construction module is used to migrate the initial cause-effect structure from historical batches based on product model similarity, process route similarity, and historical anomaly pattern similarity to quickly initialize the cause-effect graph, and to dynamically update the cause-effect graph under the constraints of process mechanism by combining online time series observation data. The counterfactual reasoning module is used to perform perturbation intervention on candidate factors based on the causal graph to generate counterfactual scenarios, quantitatively calculate the causal contribution of each candidate factor to the abnormal results, and search backward along the causal chain to lock the source root cause. The interpretable report generation module is used to map causal reasoning paths into natural language diagnostic reports with clear physical semantics, and output root cause localization results and treatment recommendations.
[0017] Thirdly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the above-described causal explainable anomaly analysis and root cause tracing method.
[0018] Fourthly, the present invention provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the above-described causal explainable anomaly analysis and root cause tracing method.
[0019] The main contributions and innovations of this invention are as follows: 1. By introducing a multi-dimensional transfer learning mechanism based on product model similarity, process route similarity, and historical anomaly pattern similarity, the causal structure initialization can be completed quickly in the early stages of new product launch, shortening the model cold start time and reducing the risk of model failure caused by product changeover.
[0020] 2. The dynamic causal graph model constructed in this invention performs attribution updates by combining real-time observation data under the constraints of process mechanism. It can distinguish between directional conflicts and intensity conflicts of causal edges and adopt different correction strategies respectively. When there is a directional conflict, it backtracks to the data acquisition stage to check for data anomalies. When there is an intensity conflict, it performs local structural re-estimation on the conflict area, thereby ensuring the consistency and robustness of the causal model with the current production change status.
[0021] 3. Compared with traditional correlation analysis methods, this invention applies perturbation intervention to candidate factors through a counterfactual reasoning framework, quantitatively calculates the causal contribution based on the difference between factual and counterfactual scenarios, and then searches backward along the causal chain using the causal graph topology structure. This can effectively distinguish between accompanying changes and true causes, accurately separate the source cause from secondary influencing factors, and improve the accuracy of root cause localization.
[0022] 4. This invention semantically maps abstract causal nodes and causal paths with specific workstations, equipment, and process parameters. It generates natural language reports in a logical order from abnormal phenomena, causal paths, root cause explanations to handling suggestions. This makes it easier for process engineers, equipment engineers, and quality personnel to quickly understand and implement handling plans, reducing the conversion cost between diagnostic results and on-site execution.
[0023] 5. This invention adopts a modular architecture, which is compatible with various industrial system interfaces such as sensors, PLCs, MES and QMS. It can also expand new causal nodes, abnormal modes and knowledge base content according to different production lines and product types. It is suitable for flexible manufacturing scenarios that require frequent production changes, such as electronic assembly, automotive parts, precision machining, semiconductor packaging and testing.
[0024] Details of one or more embodiments of the present invention are set forth in the following drawings and description, so that other features, objects and advantages of the invention will be more readily understood. Attached Figure Description
[0025] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is an overall architecture block diagram of the causal explainable anomaly analysis and root cause tracing method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the internal structure of the dynamic cause-effect graph construction module according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the internal structure of the counterfactual reasoning module according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the internal structure of the interpretable report generation module according to an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the workflow of anomaly analysis and root cause tracing according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0026] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0027] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0028] All English abbreviations used in the embodiments of this invention have meanings known in the art. Among them, PLC stands for Programmable Logic Controller, MES stands for Manufacturing Execution System, QMS stands for Quality Management System, SPI stands for Solder Paste Inspection, and AOI stands for Automated Optical Inspection.
[0029] Example 1 This embodiment provides a causal explanation of anomaly analysis and root cause tracing method for rapid batch changeover manufacturing. For example... Figure 1 As shown, this method is implemented collaboratively through a multi-source industrial data acquisition module, a production anomaly event response module, a dynamic cause-effect graph construction module, a counterfactual reasoning module, and an interpretable report generation module. Each module interacts with the manufacturing execution system via an industrial internet gateway. The following section combines... Figures 1 to 5 This embodiment will be described in detail.
[0030] Step 1: Multi-source industrial data acquisition and preprocessing (i.e.) Figure 5Step 1) This step is achieved through a multi-source industrial data acquisition module.
[0031] 1.1 Data Acquisition Collect multi-source heterogeneous data in rapid batch production changeover scenarios, specifically including the following four types of data sources: 1. Equipment-side sensor data, including temperature, pressure, current, vibration, and image data.
[0032] 2. PLC control data, including speed setpoint, valve opening, alarm position, and operating mode switching signals.
[0033] 3. Production environment data, including temperature, humidity, cleanliness, and voltage fluctuations.
[0034] 4. Business metadata, including batch number, work order number, changeover timestamp, formula version, mold number, material code, etc.
[0035] 1.2 Data Cleaning and Standardization Preprocessing The collected heterogeneous data from multiple sources exhibits significant differences in time base, sampling frequency, and transmission protocol. Data cleaning and standardization are achieved through the following three-level processing chain: 1. Time synchronization: By using an industrial internet gateway, a unified time base is established for data from different sources, forming a unified standard timestamp.
[0036] 2. Missing data repair: Missing data of high-frequency real-time control data is repaired at fixed time intervals, and low-frequency sampling quality data is mapped to the corresponding process time window using nearest neighbor interpolation.
[0037] 3. Non-stationary component filtering: Based on the fixed delay compensation method of process cycle time, the time offset between control variables and quality results is corrected, which reduces the statistical characteristic drift caused by equipment preheating or parameter adjustment in the early stage of production changeover.
[0038] 1.3 Online monitoring of data acquisition quality Furthermore, online quality monitoring is implemented during the data acquisition process, including three levels: acquisition anomaly detection, transmission anomaly detection, and storage anomaly detection. 1.3.1 Anomaly Detection: For image data, the Laplacian variance metric is used to determine image sharpness. When the image sharpness evaluation value is lower than a preset threshold, it is determined to be image distortion. For sensor signals, the signal deviation rate is calculated for distortion determination. The calculation formula is:
[0039] in, The current value of the sensor signal. For calibration values, To prevent extremely small constant terms with a denominator of zero. If the deviation rate... If the value exceeds a pre-set threshold, the sensor signal is considered distorted. For metadata, a field continuity check is used for missing data detection; if any field in the metadata is empty or has an invalid format, the metadata is considered missing.
[0040] 1.3.2 Transmission Anomaly Detection: Transmission delay and packet loss rate are used for detection. If the transmission delay or packet loss rate is greater than a preset threshold, a transmission anomaly is determined to exist.
[0041] 1.3.3 Storage anomaly detection: The remaining capacity rate is used for judgment. The remaining capacity rate is the unused storage space divided by the total storage space. If the remaining capacity rate is lower than the preset safety threshold, a storage anomaly is determined and an early warning is issued.
[0042] Step Two: Adaptive Threshold Monitoring and Anomaly Feature Extraction (i.e.) Figure 5 Step 2) This step is implemented through the production anomaly event response module. This module continuously monitors yield rate, defect rate, cycle time, key quality characteristics, and equipment alarm status, and automatically adjusts the anomaly detection threshold according to the different data distributions during changeover and steady-state production stages.
[0043] 2.1 Adaptive Threshold Calculation For the current time Any of the following monitoring indicators Based on the current stage The corresponding historical statistical distribution is used to adaptively calculate the anomaly detection threshold. :
[0044] in, This indicates the current production stage (transitional production stage or steady-state production stage). and These represent the historical mean and standard deviation of the indicator in the current period, respectively. This is a stage-related threshold coefficient, which automatically adjusts its value according to the different production transition stages. For continuous indicators, individual anomaly scores can be calculated based on the degree to which they deviate from the baseline distribution of the corresponding stage.
[0045] 2.2 Comprehensive Anomaly Score The deviations of multiple monitoring indicators are weighted and fused to obtain a comprehensive anomaly score. :
[0046] in, To monitor the number of indicators, For the first The weights corresponding to each indicator This is a function that maps the degree of deviation of an indicator to anomaly scores.
[0047] 2.3 Extraction of Abnormal Windows When the comprehensive abnormal score When the threshold is exceeded, the key variable sequence is extracted from multiple time windows before and after the anomaly, centered on the anomaly determination time, to form an aligned feature sequence corresponding to the anomaly event, thus avoiding the lack of context caused by judging based on a single snapshot.
[0048] Step 3: Rapid initialization and dynamic attribution update of the cause-effect graph (i.e., Figure 5 Step 3) This step is implemented using a dynamic cause-effect graph construction module. For example... Figure 2 As shown, this module consists of two parts: a fast initialization algorithm for causal graphs and a causal attribution model.
[0049] 3.1 Fast Initialization of Cause-Effect Graphs This step uses three dimensions—product model similarity, process route similarity, and historical anomaly pattern similarity—to migrate the initial causal structure from historical batches to quickly initialize the causal graph.
[0050] First, calculate the similarity between the current product and historical batches of products in three dimensions: 3.1.1 Product Model Similarity: Product model is a hierarchical coded information, represented as... , This indicates the model level. Two products. Product model similarity Calculated through weighted matching based on hierarchical coding:
[0051] in, This represents the total number of levels in the model code. Indicates hierarchical Encoding weights, For indicator functions, when The formula takes a value of 1 if the model number is the same and 0 otherwise. The physical meaning of this formula is: at each level of the model number coding, the two products are judged to be the same, and a weighted average is calculated according to the weight of each level. The closer the result is to 1, the more similar the models of the two products are.
[0052] 3.1.2 Process Route Similarity: A process route is a sequence of operations, represented as... Two products The process routes are respectively represented as follows: and Extract the length of the longest common subsequence of two products. Then the similarity of the process routes The calculation is as follows:
[0053] in, The length of the longest common subsequence of the process routes for the two products. and These represent the process sequence lengths for the two products. The closer the result is to 1, the more similar the process routes of the two products are.
[0054] 3.1.3 Historical Anomaly Pattern Similarity: Anomaly pattern type is represented as anomaly event feature vector. These correspond to three dimensions: location of the abnormal process, type of abnormality, and duration of abnormality. Cosine similarity is used to measure the similarity between the two products. Historical anomaly pattern similarity :
[0055] in, and They represent the products. and products The corresponding numerical vector of the anomaly pattern, i.e., the feature vector. The vector is obtained by quantizing the three dimensions (abnormal process location, abnormal type, and abnormal duration).
[0056] Then, the similarity scores of the three dimensions are weighted and fused to obtain a comprehensive similarity score. The causal structure of historical batches of products with a comprehensive similarity score of not less than 0.7 is selected as the initial causal subgraph.
[0057] When the overall similarity is below 0.7, the deviation between the initial causal structure and the target anomalous scene increases, and the proportion of erroneous causal edges rises significantly, leading to a significant increase in the frequency of structural conflicts during subsequent attribution updates. When the overall similarity is not lower than 0.7, the initial structure matches the target scene well, and the system achieves a better balance between initialization efficiency and root cause localization accuracy. Based on this, the local causal subgraph is initialized by combining the anomalous event window data of the current batch.
[0058] 3.2 Causal Attribution Model and Dynamic Update The causal attribution model, constrained by the technological mechanism and incorporating real-time observation data, employs a sliding time window mechanism to dynamically update the existence, direction, strength, and time-delay relationships of causal edges. The optimal length of the sliding time window is 5 to 20 sampling points. When the window length is less than 5 sampling points, the insufficient sample size makes the determination of causal edge directions susceptible to instantaneous fluctuations and noise, leading to frequent jitter in the causal structure. When the window length is greater than 20 sampling points, although the structure estimation is smoother, there is a significant lag in the response to sudden anomalies, affecting the real-time performance of root cause tracing.
[0059] The dynamic attribution update process includes the following sub-steps: 3.2.1 Node Alignment Local time-series samples of the product being replaced are extracted according to a preset sliding time window. The variables in the samples are matched with nodes in the initial causal graph. Successfully matched node variables retain their node definitions in the causal graph. New variables present in the samples but not included in the initial causal graph are added to the causal graph as new nodes. Nodes present in the initial causal graph but no longer appearing in the samples are marked as failed nodes and removed from the current causal graph. Based on the node alignment results, causal edges associated with failed nodes are removed in batches.
[0060] 3.2.2 Causal Direction Determination and Edge Strength Update For successfully matched nodes and newly added node variables, causal direction determination is performed based on the time-delay maximum correlation method. For nodes... and Calculate the time-delay correlation coefficient :
[0061] in, This represents a point in time within the sliding time window. Indicates the delay time. This represents the standard Pearson correlation coefficient. This represents the maximum delay time. If it exists... Make Greater than the set threshold, and Prior to in time Then the direction of the causal edge is determined as follows. And update the dynamic cause-effect graph accordingly.
[0062] The causal edges obtained from the determination Calculate edge strength parameters :
[0063] in, lagged term The regression coefficients are calculated. After obtaining the edge strength, an incremental weighted update is performed in conjunction with the historical edge weights, so that the causal graph can smoothly reflect the causal relationships under the current production change state.
[0064] 3.2.3 Calculation of Node Path Effect Based on the updated causal graph structure, the path effect value of each upstream node on the anomalous target node is calculated. For the target anomalous node... Upstream node effect size for:
[0065] in, and Representing nodes respectively For the target node The direct and indirect effects, and These are the corresponding weight coefficients. After obtaining the path effect values, the node weights are updated to generate the causal graph at the current time step.
[0066] 3.2.4 Structural Conflict Detection and Correction During the dynamic update of the causal graph, the model detects two types of structural conflicts in real time: Directional conflict: The causal edge direction obtained from online updates contradicts the known process sequence. In normal industrial scenarios, real-world, underlying online observation data should not support causal directions that violate the physical process sequence. If the underlying online data statistically supports a direction that contradicts the process sequence, it indicates an anomaly in the data acquisition itself, rather than a problem with the algorithm's estimation. Therefore, when the model detects a directional conflict, it does not perform forced corrections at the model level, but instead traces back to the data acquisition stage to investigate data anomalies and eliminate the data quality issues causing the conflict at their source.
[0067] Intensity conflict: During online updates, the intensity of causal edges abruptly changes, exceeding a set threshold. When the model detects an intensity conflict, it first locates the conflict region and freezes the non-conflict structures. Then, under the constraint of fixed edges, it re-runs the causal direction determination and edge intensity estimation process to re-estimate the local subgraph of the conflict region. After the corrected local subgraph passes the consistency check, it replaces the original local structure, generating the final causal graph for the next step.
[0068] Step Four: Counterfactual Reasoning and Root Cause Reverse Search (i.e.) Figure 5 Step 4) This step is implemented using the counterfactual reasoning module. For example... Figure 3 As shown, this module consists of two parts: a counterfactual reasoning algorithm and a causal chain reverse search algorithm.
[0069] 4.1 Counterfactual reasoning Based on the input anomalous target events, a counterfactual model is constructed on the basis of a dynamic cause-effect graph. The specific process is as follows: First, determine the set of candidate factors, which includes process parameters, equipment state variables, and environmental variables that have a causal relationship with the abnormal target node in the dynamic causal graph.
[0070] Then, for each candidate factor, based on its historical statistical distribution and the allowable fluctuation range of the process, a... Multiple sets of perturbation samples. The counterfactual inference algorithm applies a perturbation of 5% to 10% to the candidate parameters, generating multiple sets of counterfactual scenarios. Specifically, the perturbation samples... ( Input an anomaly prediction model trained based on historical production data. The corresponding counterfactual anomaly prediction value is obtained. :
[0071] Finally, consider the abnormal results in real-world scenarios. Anomalies in Counterfactual Scenarios The mean absolute value of the differences between the candidates is used as the causal contribution of the candidate factor to the outlier. :
[0072] Contribution The larger the value, the more significant the factor's impact on abnormal results. Factors with a contribution value below a preset threshold are filtered out and not included in subsequent root cause ranking.
[0073] 4.2 Reverse Search of Causal Chains The reverse causal chain search algorithm searches the anomaly chain in reverse based on causal contribution, causal edge direction constraints, and process sequence, outputting the ranking results of the root cause and secondary influencing factors. The specific process is as follows: First, the node corresponding to the abnormal result is recorded as the target node, and the search queue is initialized.
[0074] Then, for each parent node in the search queue, check if a valid reverse causal path exists between it and the target node. If it exists, the node is retained; otherwise, it is removed from the search queue.
[0075] Furthermore, the causal contribution scores of each candidate node are obtained after normalizing the causal contribution scores. The confidence level is calculated based on the dispersion of the counterfactual prediction results under multiple perturbation samples. If causal contribution score and confidence level If all values are greater than their respective set thresholds, then the node is added to the candidate root cause set.
[0076] Finally, for each node in the candidate root cause set Calculate the overall score :
[0077] in, Score the contribution of causality. The path weight score is calculated based on the edge strength of the path between the node and the target node in the causal graph. The temporal consistency score measures the temporal consistency between the abnormal changes of this node and the abnormal results of the target node. The confidence score is... , , and These are the weighting coefficients for each scoring item. Candidate root cause nodes are sorted according to their overall scores, with the node having the highest overall score identified as the primary root cause, and the remaining candidate nodes arranged from highest to lowest overall score as secondary influencing factors.
[0078] Step 5: Generation of interpretable diagnostic reports (i.e. Figure 5 Steps 5 and 6) This step is achieved through the interpretable report generation module. For example... Figure 4 As shown, this module includes a semantic mapping unit and a logical organization unit (i.e., an appendix). Figure 4 (Logical organization).
[0079] The semantic mapping unit has a built-in equipment object library, process parameter library, and anomaly pattern library, used to map nodes, causal edges, and counterfactual intervention results in the dynamic causal graph to corresponding physical equipment, process stations, and parameter semantics. Specifically, each node in the causal graph is associated with a specific equipment number or station name, each causal edge is associated with a corresponding process parameter or quality indicator, and the disturbance operation of the counterfactual intervention is associated with a specific parameter adjustment instruction.
[0080] The logical organization unit assembles the semantically mapped results into a structured natural language diagnostic report, following a logical sequence from anomaly description, causal path analysis, root cause localization and explanation to remediation recommendations. The report can be output as a structured message recognizable by the manufacturing execution system (MES), or as natural language text readable by engineers. The report is then sent to the MES, quality management system, or maintenance terminal to support rapid response.
[0081] Example 2 This embodiment provides a device for causal explainable anomaly analysis and root cause tracing in rapid batch production changeover manufacturing. This system is used to implement the method described in Embodiment 1. Figure 1 As shown, the system includes: 1. Multi-source industrial data acquisition module, used to collect multi-source heterogeneous data in rapid batch production changeover scenarios, and to perform data cleaning and standardization preprocessing.
[0082] 2. Production anomaly event response module, connected to multi-source industrial data acquisition module, is used to adaptively monitor multiple monitoring indicators in the production process and extract feature data within the abnormal time window when an abnormal signal is captured.
[0083] 3. A dynamic cause-effect graph construction module, which is connected to the multi-source industrial data acquisition module and the production anomaly event response module, is used to migrate the initial cause-effect structure from historical batches based on product model similarity, process route similarity and historical anomaly pattern similarity to quickly initialize the cause-effect graph, and dynamically update the cause-effect graph under the constraints of process mechanism by combining online time series observation data.
[0084] 4. Counterfactual reasoning module, connected to dynamic causal graph construction module, is used to perform perturbation intervention on candidate factors based on causal graph to generate counterfactual scenarios, quantitatively calculate the causal contribution of each candidate factor to the abnormal results, and search backward along the causal chain to lock the source root cause.
[0085] 5. An interpretable report generation module, connected to the counterfactual reasoning module, is used to map causal reasoning paths into natural language diagnostic reports with clear physical semantics, and output root cause localization results and treatment suggestions.
[0086] The internal structure and function of each module have been described in detail in Example 1, and will not be repeated here.
[0087] To further demonstrate the feasibility and technical effectiveness of this invention, the following description uses a specific application scenario of a multi-product electronic assembly production line. For example... Figure 5 As shown, the production line includes processes such as board mounting, solder paste printing, SPI testing, chip mounting, reflow soldering, AOI testing, and board unmounting. It requires frequent switching between multiple product models. Within the first 30 minutes after the production line change, abnormalities such as printing misalignment, mounting deviation, increased solder joint defect rate, and dimensional deviation are likely to occur.
[0088] Data Acquisition Phase: The multi-source industrial data acquisition module collects the following data: 1. Equipment operating data, including pick-and-place machine nozzle pressure, placement offset, reflow soldering temperature in each zone, and conveyor speed.
[0089] 2. Process parameter data, including stencil type, squeegee speed, solder paste thickness setting, placement program number, and reflow soldering recipe number.
[0090] 3. Environmental data, including workshop temperature and humidity.
[0091] 4. Business metadata, including work order number, product model, changeover start time, changeover completion time, and batch number.
[0092] 5. Quality inspection data, including SPI solder paste thickness deviation, AOI defect rate, critical dimension inspection values, and final inspection yield.
[0093] All data, after time synchronization, missing data repair, and filtering of non-stationary components, forms a standardized unified time-series dataset.
[0094] Anomaly Detection Phase: During a product changeover from product model A to product model B, 8 minutes after the changeover was completed, the production anomaly event response module detected that the AOI defect rate increased from 1.8% during the steady-state period to 6.9%, while critical dimensional features continuously exceeded the tolerance limit. The overall anomaly score rose from 0.32 to 0.81, exceeding the set threshold of 0.70, thus determining that a quality anomaly event had occurred. The system extracts event window data from 10 minutes before the anomaly to 5 minutes after it, centered on the moment of the anomaly, and generates an anomaly analysis task with the number E-B20260522-03.
[0095] In the cause-effect graph construction phase: the dynamic cause-effect graph construction module retrieves the three most similar historical batches to the current product B from the historical batch model library based on product model similarity, process route similarity, and historical anomaly pattern similarity. Their comprehensive similarity scores are 0.87, 0.83, and 0.79, respectively, all above the threshold of 0.7. The system selects the cause-effect structure of the historical batch with the highest comprehensive similarity as the initial cause-effect subgraph, and then performs local corrections based on the online data of the current batch. The initialized local cause-effect subgraph is updated based on the data from the previous two sliding time windows of the current batch. It was found that the path weight of "stencil model → printing alignment deviation" increased from 0.26 to 0.44, and the path weight of "printing alignment deviation → critical dimension" increased from 0.41 to 0.68, while the path weight of "mounting offset → AOI defect rate" only changed slightly. The trend of path weight changes indicates that this anomaly is more likely caused by the printing process than the mounting process. No directional or intensity conflicts were detected during the update process, and the cause-effect graph structure verification passed.
[0096] Counterfactual Reasoning Phase: The counterfactual reasoning module further intervenes and simulates candidate variables, including stencil model matching status, squeegee speed, solder paste thickness setting, placement offset compensation parameters, and reflow soldering temperature. When counterfactual intervention is applied to "stencil model matching status," i.e., the current stencil is restored from the actual loaded model to the target model corresponding to product B, the system predicts that critical dimensions will return to the tolerance range, and the AOI defect rate will decrease from 6.9% to 2.4%, with a causal contribution significantly higher than other candidate factors. After further superimposing correction intervention on "printing alignment deviation," the AOI defect rate can be further reduced to 1.9%. The causal chain reverse search algorithm sorts the candidate factors based on their comprehensive scores, determining that the root cause of this anomaly is the incorrect loading of the stencil model after the production change, leading to an increased printing alignment deviation, which further causes dimensional deviations and an increase in the defect rate.
[0097] Report Generation and Verification Phase: The interpretable report generation module outputs diagnostic conclusions, including a description of the anomaly, causal path analysis, root cause analysis, and recommended remedial measures. After inspection based on the report, on-site personnel discovered that the stencil currently being used at the printing station was the stencil corresponding to the previous product model A, indicating incorrect replacement after production changeover. After completing the stencil replacement and first-piece recalibration, critical dimensions returned to tolerance ranges, and the AOI defect rate decreased to 2.1% in the subsequent 20 boards, consistent with the root cause analysis results provided by the system.
[0098] In this embodiment, the system is controlled in segments according to the production changeover transition period and the steady state period: the production changeover transition period is within 30 minutes after the production changeover is completed, with the migration structure as the main focus and the dynamic cause-effect graph update cycle not exceeding 5 seconds; the steady state period is after the production changeover transition period ends, when the cause-effect structure tends to stabilize and the update cycle is extended to 30 seconds.
[0099] Example 3 This embodiment also provides an electronic device, see reference. Figure 6 It includes a memory 402 and a processor 401, the memory 402 storing a computer program and the processor 401 being configured to run the computer program to perform the steps in any of the above method embodiments.
[0100] Specifically, the processor 401 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of the present invention.
[0101] The memory 402 may include a mass storage device for data or instructions. For example, and not limitingly, the memory 402 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 402 may include removable or non-removable (or fixed) media. Where appropriate, the memory 402 may be internal or external to a data processing device. In a particular embodiment, the memory 402 is non-volatile memory. In a particular embodiment, the memory 402 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random Access Memory (FPMDRAM), Extended Data Out Dynamic Random Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0102] The memory 402 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 401.
[0103] The processor 401 implements any of the methods described above by reading and executing computer program instructions stored in the memory 402.
[0104] Optionally, the electronic device may further include a transmission device 403 and an input / output device 404, wherein the transmission device 403 is connected to the processor 401 and the input / output device 404 is connected to the processor 401.
[0105] The transmission device 403 can be used to receive or send data via a network. Specific examples of the network described above may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 403 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0106] Input / output device 404 is used for inputting or outputting information. It can be a speaker, microphone, monitor, or keyboard.
[0107] Example 4 This embodiment also provides a readable storage medium storing a computer program, the computer program including program code for controlling a process to execute the process, the process including the causal explainable anomaly analysis and root cause tracing method according to Embodiment 1.
[0108] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0109] Generally, various embodiments can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention can be implemented in hardware, while others can be implemented by firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, by way of non-limiting example, these blocks, apparatuses, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0110] Embodiments of the present invention can be implemented by computer software, which may be executable by a data processor of a mobile device, such as a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets, and / or macros can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. The computer program product may include one or more computer-executable components configured to perform the embodiments when the program is run. The one or more computer-executable components may be at least one piece of software code or a portion thereof. Additionally, it should be noted in this respect that, as Figure 5 Any block in the logical flow can represent a program step, or interconnected logic circuits, blocks and functions, or a combination of program steps and logic circuits, blocks and functions. Software can be stored on physical media such as memory chips or blocks of storage implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as DVDs and their data variants, CDs, etc. The physical medium is a non-transient medium.
[0111] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0112] The above embodiments are merely illustrative of several implementations of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the appended claims.
Claims
1. A method for causal explanation of anomalies and root cause tracing, characterized in that, Includes the following steps: Collect multi-source heterogeneous data in rapid batch production changeover scenarios, and perform cleaning and standardization preprocessing on the multi-source heterogeneous data; Adaptive threshold monitoring is performed on multiple monitoring indicators in the production process, and feature data within the abnormal time window is extracted when abnormal signals are detected. The initial causal structure is migrated from historical batches based on product model similarity, process route similarity, and historical anomaly pattern similarity to quickly initialize the causal graph. The causal graph is then dynamically updated under process mechanism constraints by combining online time-series observation data. Based on the causal graph, perturbation intervention is performed on candidate factors to generate counterfactual scenarios. The causal contribution of each candidate factor to the abnormal results is quantitatively calculated. Based on the causal contribution and causal edge direction constraints, the root cause is located by searching in reverse along the causal chain. The nodes, causal edges, and inference results in the causal reasoning path are mapped to the corresponding physical equipment and process parameter semantics, generating a natural language diagnostic report that includes abnormal phenomena, causal paths, root cause localization, and handling suggestions.
2. The causal explainable anomaly analysis and root cause tracing method as described in claim 1, characterized in that, Collect multi-source heterogeneous data in rapid batch production changeover scenarios, and perform cleaning and standardization preprocessing on the multi-source heterogeneous data, including: Collect data from equipment-side sensors, programmable logic controller (PLC) control data, production environment data, and business metadata; By unifying the time base of data from different sources through time synchronization, high-frequency data is interpolated at fixed time intervals through missing data repair, low-frequency sampling data is mapped to the corresponding process time window through nearest neighbor interpolation, and statistical characteristic drift caused by equipment preheating or parameter adjustment in the early stage of production change is reduced by non-stationary component filtering based on process cycle delay compensation. Perform data acquisition anomaly detection, transmission anomaly detection, and storage anomaly detection during the data acquisition process.
3. The causal explainable anomaly analysis and root cause tracing method as described in claim 1, characterized in that, Adaptive threshold monitoring is implemented for multiple monitoring indicators during the production process, including: For the transition phase and steady-state production phase, adaptive outlier thresholds are calculated based on the historical statistical mean and standard deviation corresponding to the current phase, respectively. Calculate the degree of deviation of multiple monitoring indicators from the current stage baseline distribution, and perform weighted fusion of the deviation degrees to obtain a comprehensive anomaly score; When the comprehensive anomaly score exceeds the set threshold, key variable sequences are extracted from multiple time windows before and after the anomaly occurrence, centered on the anomaly determination time, to form an aligned feature sequence corresponding to the anomaly event.
4. The causal explainable anomaly analysis and root cause tracing method as described in claim 1, characterized in that, The initial causal structure is migrated from historical batches based on product model similarity, process route similarity, and historical anomaly pattern similarity to quickly initialize the causal graph, including: Calculate the degree of matching between the current product and historical batches in terms of product model level, the proportion of the longest common subsequence length of the process route, and the cosine similarity of the feature vectors of the abnormal pattern, respectively. A comprehensive similarity is obtained by weighted fusion of the hierarchical matching degree, the length ratio, and the cosine similarity. The historical batch causal structure with a comprehensive similarity of not less than 0.7 is selected as the initial causal subgraph, and the local causal subgraph is initialized by combining it with the abnormal event window data.
5. The causal explainable anomaly analysis and root cause tracing method as described in claim 1, characterized in that, The causal graph is dynamically updated based on online time-series observation data under the constraints of process mechanism, including: Local time series samples are extracted using a sliding time window. Sample variables are aligned and matched with nodes in the cause-effect graph. Newly added variables are added as new nodes, and variables that no longer appear are marked as invalid nodes and removed. The causal edge direction between nodes is determined based on the time-delay maximum correlation method, the edge strength parameter is calculated and incremental weighted update is performed in combination with historical edge weights; Calculate the direct and indirect effects of each upstream node on the abnormal target node to update the node weights; When a contradiction is detected between the causal edge direction and the process sequence, the process is traced back to the data acquisition stage to investigate data anomalies. When a sudden change in edge strength is detected that exceeds the threshold, the conflict region is located and the non-conflict structure is frozen. Under the fixed edge constraint, the causal edge direction and strength of the conflict region are re-estimated.
6. The causal explainable anomaly analysis and root cause tracing method as described in claim 1, characterized in that, Perturbation interventions are applied to candidate factors to generate counterfactual scenarios, and the causal contribution of each candidate factor to the abnormal outcome is quantitatively calculated, including: Based on the historical statistical distribution of each candidate factor and the allowable fluctuation range of the process, multiple sets of disturbance samples are constructed, and the disturbance samples are input into the abnormal result prediction model to obtain the counterfactual abnormal result prediction value. The mean absolute value of the difference between the anomalous results in the factual scenario and the anomalous results in the counterfactual scenario is calculated as the causal contribution of each candidate factor to the anomalous results.
7. The causal explanation anomaly analysis and root cause tracing method as described in claim 1, characterized in that, Based on causal contribution and causal edge direction constraints, a reverse search is performed along the causal chain to pinpoint the root cause, including: Mark the node corresponding to the abnormal result as the target node and initialize the search queue, and filter out the parent node that does not have a valid reverse causal path; The causal contribution is normalized to obtain the causal contribution score. The confidence level is calculated based on the dispersion of the counterfactual prediction results under multiple perturbation samples. For nodes where both the causal contribution score and the confidence level are greater than a set threshold, a comprehensive score is calculated by combining the path weight score and the temporal consistency score. The candidate nodes are sorted according to the comprehensive score, and the node with the highest score is identified as the root cause.
8. A device for causal explanation of anomalies and root cause tracing, characterized in that, include: The multi-source industrial data acquisition module is used to collect multi-source heterogeneous data in rapid batch production changeover scenarios, and to perform data cleaning and standardization preprocessing. The production anomaly event response module is used to adaptively monitor multiple monitoring indicators in the production process and extract feature data within the abnormal time window when an abnormal signal is captured. The dynamic cause-effect graph construction module is used to migrate the initial cause-effect structure from historical batches based on product model similarity, process route similarity, and historical anomaly pattern similarity to quickly initialize the cause-effect graph, and to dynamically update the cause-effect graph under the constraints of process mechanism by combining online time series observation data. The counterfactual reasoning module is used to perform perturbation intervention on candidate factors based on the causal graph to generate counterfactual scenarios, quantitatively calculate the causal contribution of each candidate factor to the abnormal results, and search backward along the causal chain to lock the source root cause. The interpretable report generation module is used to map causal reasoning paths into natural language diagnostic reports with clear physical semantics, and output root cause localization results and treatment recommendations.
9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the causal explainable anomaly analysis and root cause tracing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the causal explainable anomaly analysis and root cause tracing method according to any one of claims 1 to 7.