Intelligent manufacturing exception processing method and system
Patent Information
- Application Number
- CN202610930171.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-10-13
AI Technical Summary
然而,工业现场异常事件往往同时表现在视觉图像、声学信号、工艺参数等多种模态数据上,单模态检测方法无法同时利用多源信息,存在检测盲区
通过以知识图谱中的先验因果边关系指导跨模态变换器的注意力分配,使具有因果关联的模态特征获得更高的融合权重,相比于多源数据孤立使用的模式,本申请可以实现多种模态数据的协同利用,提高异常处理的全面性;
Smart Images

Figure CN122902437A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent manufacturing, and specifically to an intelligent manufacturing anomaly handling method and system. Background Technology
[0002] In intelligent manufacturing production lines, anomaly detection and handling are crucial for ensuring production continuity and product quality. Traditional anomaly handling methods primarily rely on rule-based SCADA alarm systems, which monitor equipment operating parameters using preset thresholds and trigger alarms when parameters exceed limits. These methods depend on manually set fixed thresholds, making them ill-suited to changing operating conditions and limited to handling single-variable anomalies. They also have limited ability to identify complex anomalies caused by multi-variable coupling. In recent years, single-modal temporal anomaly detection methods based on Long Short-Term Memory (LSTM) networks have been widely adopted. This method identifies trend anomalies and early fault signs by performing time-series modeling on a single type of data (such as vibration signals or temperature sequences). However, industrial anomalies often manifest simultaneously in multiple modalities of data, including visual images, acoustic signals, and process parameters. Single-modal detection methods cannot utilize multi-source information simultaneously, resulting in detection blind spots. Furthermore, knowledge graph-based industrial fault diagnosis methods construct a graph of relationships between equipment, parameters, and anomaly types, and use graph convolutional networks for multi-hop reasoning to locate the root cause. However, their reasoning process usually relies on a static graph topology. When the graph structure is incomplete or has redundant connections, it is easy to generate reasoning paths that deviate from reality. Summary of the Invention
[0003] To address the aforementioned issues, this invention provides an intelligent manufacturing anomaly handling method and system, which improves the comprehensiveness, accuracy, and security of anomaly handling.
[0004] In a first aspect, the technical solution of the present invention provides a method for handling anomalies in intelligent manufacturing, comprising the following steps: The edge device collects multi-source heterogeneous data in real time and performs anomaly detection. When an anomaly is detected, the device takes the abnormal device node as the center, extracts the associated subgraph within the N-hop neighborhood from the local lightweight knowledge subgraph, and packages it with the multimodal feature data of the abnormal period and uploads it to the cloud. The cloud receives the associated subgraph and multimodal feature data, extracts the prior causal edge relationships in the associated subgraph, transforms them into a causal attention bias vector, and performs cross-modal transformer weighted fusion on the multimodal feature data based on this bias vector to obtain the fused multimodal feature vector. Using physical sensor signals and fused multimodal feature vectors as physical constraints, GCN multi-hop inference is performed in a dynamic knowledge graph maintained in the cloud. The inference process includes: during message transmission, calculating temporal alignment using physical sensor signals and semantic similarity using fused multimodal feature vectors; weighting and fusing the two as a gating factor to screen propagation paths and obtain candidate root cause paths; performing counterfactual verification on candidate root cause paths, calculating the decrease in anomaly probability after virtual cutoff, and confirming the root cause when the decrease exceeds a preset threshold, thus obtaining the root cause node. Using the root cause node as input, the regulatory relationship edges connected to the root cause node are extracted from the dynamic knowledge graph; the relationship edges are mapped to the legal action space of reinforcement learning, and a self-healing strategy model is generated in this space. The self-healing strategy model is compressed into a lightweight decision network through knowledge distillation and then transmitted to the edge, where the self-healing operation is performed.
[0005] Secondly, the technical solution of the present invention provides an intelligent manufacturing anomaly handling system for the above-mentioned method, including edge computing and cloud computing; Edge: Used for real-time collection of multi-source heterogeneous data and anomaly detection. When an anomaly is detected, the associated subgraph within the N-hop neighborhood is extracted from the local lightweight knowledge subgraph centered on the abnormal device node, and packaged with the multimodal feature data of the abnormal period and uploaded to the cloud. In the cloud: This process receives association subgraphs and multimodal feature data, extracts prior causal edge relationships from the association subgraphs, transforms them into causal attention bias vectors, and uses these bias vectors to perform cross-modal transformer weighted fusion of the multimodal feature data to obtain a fused multimodal feature vector. Additionally, using physical sensor signals and the fused multimodal feature vector as physical constraints, it performs GCN multi-hop inference in a dynamic knowledge graph maintained in the cloud. The inference process includes: calculating temporal alignment using physical sensor signals and semantic similarity using the fused multimodal feature vector during message passing, and then weighting and fusing the two. Collaboration is used to screen propagation paths for gating factors, obtaining candidate root cause paths; counterfactual verification is performed on the candidate root cause paths to calculate the decrease in the probability of anomalies after virtual cutoff. When the decrease exceeds a preset threshold, the root cause is confirmed, and the root cause node is obtained; and, using the root cause node as input, regulation or repair relationship edges connected to the root cause node are extracted from the dynamic knowledge graph; the relationship edges are mapped to a legal action space for reinforcement learning, and a self-healing strategy model is generated in this space; and the self-healing strategy model is compressed into a lightweight decision network through knowledge distillation and transmitted to the edge, where the self-healing operation is performed.
[0006] As can be seen from the above technical solutions, this application has the following advantages: By guiding the attention allocation of the cross-modal transformer with the prior causal edge relationships in the knowledge graph, modal features with causal relationships are given higher fusion weights. Compared with the mode of using multi-source data in isolation, this application can realize the collaborative utilization of multiple modal data and improve the comprehensiveness of anomaly handling. By introducing a gating factor based on the temporal cross-correlation of physical sensor signals during message passing, strong message passing is only allowed for paths that are connected in the graph topology and whose physical signal temporal sequences are highly aligned. Combined with counterfactual verification, virtual cut-off verification is performed on candidate root causes. Compared with the reasoning method of pure graph topology, this method can effectively suppress pseudo-causal paths and improve the accuracy and reliability of root cause localization. By mapping the regulation / repair relationship edges connected to root cause nodes in the knowledge graph to the legal action space of reinforcement learning, the agent is prohibited from exploring unauthorized actions in the graph. Furthermore, a composite safety reward function that includes anomaly elimination rate, device safety margin, and graph conflict penalty is designed to provide a safety fence based on prior knowledge and reduce the risk of device damage when self-healing strategies are implemented. Attached Figure Description
[0007] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0008] Figure 1 This is a schematic diagram of a smart manufacturing anomaly handling method provided in an embodiment of the present invention. Detailed Implementation
[0009] To make the purpose, features, and advantages of this application more apparent and understandable, specific embodiments and accompanying drawings will be used to clearly and completely describe the technical solution protected by this application. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0010] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this application and in the specification of this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0011] Figure 1 This is a schematic flowchart of an intelligent manufacturing anomaly handling method provided by an embodiment of the present invention. Figure 1The executing entity can be an intelligent manufacturing anomaly handling system. The intelligent manufacturing anomaly handling method provided in this embodiment of the invention is executed by a computer device; correspondingly, the intelligent manufacturing anomaly handling system runs within the computer device. Depending on different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.
[0012] like Figure 1 As shown, the method includes the following steps.
[0013] S1: The edge device collects multi-source heterogeneous data in real time and performs anomaly detection. When an anomaly is detected, the device takes the abnormal device node as the center, extracts the associated subgraph within the N-hop neighborhood from the local lightweight knowledge subgraph, and packages it with the multimodal feature data of the abnormal period and uploads it to the cloud.
[0014] In this embodiment, the real-time acquisition of multi-source heterogeneous data and anomaly detection specifically includes the following steps S101 to S103.
[0015] S101 acquires multi-source heterogeneous data in real time, including numerical parameters, visual image sequences, and voiceprint signals.
[0016] The edge-side data acquisition module acquires multi-source heterogeneous data in real time at a preset sampling period, including equipment operating parameters, production process data, visual image sequences, and acoustic signals. Equipment operating parameters include temperature, pressure, vibration, and current, while production process data includes process setpoints and actual feedback values.
[0017] Edge computing nodes preprocess the collected data, including filling missing values and normalizing numerical parameters; extracting time-series frame sequences after normalizing the size and pixel values of visual images; and pre-emphasizing, framing and windowing, and extracting Mel spectrum features from the voiceprint signal.
[0018] S102, execute the first-level processing steps, including: performing SCADA rule threshold detection on numerical parameters; if any numerical parameter exceeds the preset emergency threshold, an emergency stop command is directly output and the process terminates; if any numerical parameter exceeds the preset non-emergency threshold, it is marked as an abnormal candidate and enters the second-level processing; if no threshold is exceeded, the process enters the second-level processing.
[0019] First, SCADA rule threshold detection is performed on numerical parameters. Numerical variables from the input equipment operating parameters and production process data are used. For each variable, a preset upper and lower threshold is established, and the real-time value is checked to see if it exceeds the limit. Numerical parameters exceeding the threshold range include both emergency and non-emergency exceedances. If the exceedance is an emergency exceedance, an emergency stop command is issued, and the process terminates. If the exceedance is a non-emergency exceedance, the parameter is marked as an anomaly candidate and proceeds to the second layer of detection.
[0020] S103, execute the second layer processing steps, including: perform single-modal LSTM time series detection on all data types respectively, input the time series data within the target time window of each data stream into the corresponding LSTM model, calculate the reconstruction error or prediction residual of each data stream as the anomaly score, and if the anomaly score of a data stream exceeds the corresponding threshold, output the abnormal device node identifier and the anomaly occurrence timestamp.
[0021] The second layer performs single-modal LSTM time-series detection on all data types. For numerical parameters, the input to the LSTM is the time-series value within the most recent time window. For visual images, the input to the LSTM is the image feature vector sequence of consecutive frames. For speaker signals, the input to the LSTM is the Mel-spectrum feature sequence within a consecutive time window.
[0022] It should be noted that the LSTM model is trained independently for each data stream. During training, normal data is used, with L consecutive historical sampling points as input, to predict the value of the next sampling point. The training objective is to minimize the mean squared error between the predicted and true values.
[0023] During inference, for each newly arrived sampling point, its previous L historical sampling points are input into the LSTM model to obtain the predicted value at the current time step. Calculate the predicted residual Where x(t) is the true value at the current moment. The prediction residual r(t) is used as the anomaly score. To eliminate the influence of dimensions, a normalized residual can be further calculated. When the anomaly score exceeds a preset threshold, it is determined to be an abnormal state, and the abnormal device node identifier and the timestamp of the anomaly occurrence are output.
[0024] In this embodiment, the process of acquiring the associated subgraph of the abnormal device and the corresponding multimodal feature data, packaging them, and uploading them to the cloud includes the following steps S111 to S113.
[0025] S111 extracts multimodal data within a preset time window centered on the timestamp of the anomaly occurrence, extracts temporal differences and statistical features from numerical parameters, extracts optical flow or CNN descriptors from visual images, extracts MFCC features from voiceprint signals, and splices them together to form a multimodal feature package.
[0026] Specifically, the edge endpoint uses the timestamp of the anomaly occurrence as the center, extending forward and backward by a preset time window to extract multimodal raw data within that time period. Feature extraction is then performed on the extracted data.
[0027] For numerical time series parameters, calculate statistical characteristics such as time series differences, mean and variance within the sliding window, and rate of change.
[0028] For visual image sequences, optical flow features between consecutive frames or the intermediate layer output of a pre-trained CNN model are extracted as image descriptors.
[0029] For voiceprint signals, Mel frequency cepstral coefficients (MFCC) and their first and second order differences are extracted as voiceprint features.
[0030] After dimensionality normalization, each feature is spliced together to form a multimodal feature package for the abnormal period.
[0031] S112, with the abnormal device node as the central node, perform an N-hop breadth-first traversal on the local lightweight knowledge subgraph on the edge side to extract all nodes and edges in the N-hop neighborhood and form an associated subgraph; where N is a preset positive integer.
[0032] The edge node pre-stores a local lightweight knowledge subgraph, which is a partial projection of the full knowledge graph in the cloud. It only contains entity nodes related to the devices under the jurisdiction of this edge node and their relationships within their N-hop neighborhood. The local lightweight knowledge subgraph contains device nodes, parameter nodes, abnormal nodes, action nodes that are directly or indirectly related to the abnormal device, as well as causal edges (representing abnormal propagation relationships) and control edges (representing executable self-healing actions) connecting these nodes.
[0033] Using the abnormal device node as the central node, perform a breadth-first traversal on the local lightweight knowledge subgraph to extract all nodes reachable within N hops from that node and the edges connecting these nodes, forming a local association subgraph.
[0034] S113 packages the multimodal feature package and associated subgraphs and uploads them to the cloud.
[0035] The multimodal feature package generated in step S111 and the associated subgraph generated in step S112 are serialized and packaged, and the current subgraph version number and timestamp are attached. The package is then uploaded to the cloud processing link via message queue or HTTP protocol.
[0036] S2: The cloud receives the associated subgraph and multimodal feature data, extracts the prior causal edge relationships in the associated subgraph, converts them into causal attention bias vectors, and performs cross-modal transformer weighted fusion on the multimodal feature data based on the bias vectors to obtain the fused multimodal feature vectors.
[0037] S201, traverse the associated subgraph and extract all prior causal edges in the associated subgraph. Each causal edge contains a cause node, a result node, and the weight of the causal edge.
[0038] Each edge in the associated subgraph is represented as Where i is the index of the cause node and j is the index of the result node. The weights of causal edges; all causal edges form a set. .
[0039] After receiving the data packet, the cloud parses out the correlation subgraph. This subgraph is a directed heterogeneous graph, where nodes represent devices, parameters, exception types, or actions, and directed edges represent causal relationships between nodes. The process involves traversing all causal edges in the correlation subgraph and extracting the source node index i, target node index j, and confidence weight for each causal edge. This forms a set of prior causal edges, represented as:
[0040] Where i represents the cause node and j represents the result node. It represents the strength of causality; the larger the value, the higher the probability that i causes j.
[0041] S202, For each modality, calculate the sum of the weights of all causal edges pointing to the corresponding node of that modality, and use it as the causal attention bias value. The bias values of all modalities constitute the causal attention bias vector.
[0042] For each modality m, determine its corresponding node and calculate the causal attention bias value. ,in The set of all source node indices pointing to node m; concatenating them yields the bias vector. .
[0043] Specifically, this step transforms the extracted prior causal edges into causal attention bias vectors. For each modal feature vector in the multimodal feature bag (m=1,…,M, where M is the total number of modalities), determine the corresponding knowledge graph node, and calculate the sum of the weights of all causal edges pointing to that node, which is the causal attention bias value. The bias values of all modalities are concatenated into a causal attention bias vector. .
[0044] S203 stacks the modal features into a feature matrix, and calculates the query matrix, key matrix, and value matrix through the learnable projection matrix.
[0045] Modal features Stacked into feature matrices The query matrix is calculated using the learnable projection matrix. Key matrix Value matrix ,in, It is a learnable projection matrix.
[0046] S204, calculate the causal-driven attention weight matrix using the following formula. :
[0047] This embodiment uses a causal attention bias vector. Modulating the standard scaled dot product attention yields a causal-driven attention weight matrix. .in, For the standard scaled dot product attention score matrix, It is a vector of all 1s. Expand the bias vector into a bias matrix, where each column is a bias vector. . This is the causal bias strength coefficient, which controls the degree of influence of causal priors on attention scores; Transform the bias matrix into logarithmic space to ensure it is additive with the attention score.
[0048] S205, multiply the attention weight matrix by the value matrix to obtain the fused multimodal feature vector. .
[0049] S3, using the fused multimodal feature vector as physical constraints, performs GCN multi-hop inference in the dynamic knowledge graph maintained in the cloud; the inference process includes: during message transmission, using the fused multimodal feature vector to calculate the temporal cross-correlation maxima of the corresponding physical sensing signals between nodes, using them as temporal alignment gating factors to screen propagation paths and obtain candidate root cause paths; performing counterfactual verification on the candidate root cause paths, calculating the abnormal probability decrease value after virtual cutoff, and confirming the root cause when the decrease value exceeds a preset threshold, thus obtaining the root cause node.
[0050] Maintain a dynamic knowledge graph in the cloud ,in For a set of nodes, This is a set of edges. Node types include: equipment nodes (corresponding to physical equipment in the production line), parameter nodes (corresponding to the process parameters of the equipment, such as temperature and pressure), anomaly nodes (corresponding to abnormal event types, such as temperature exceeding limits or sudden pressure drop), and action nodes (corresponding to executable self-healing actions, such as cooling commands or equipment reset). Edge types include: causal edges. , indicating the causal relationship where node i causes node j to be abnormal. Causal strength weight; regulating edge , represents the self-healing action 'a' that can be executed for node v. The edge weights are used as prior weights for action validity. The edge weights of this dynamic knowledge graph are updated based on the feedback results after the self-healing strategy is executed (see step S6 for details), realizing the continuous evolution of knowledge. The local lightweight knowledge subgraph on the edge side is a local projection of this dynamic knowledge graph, which only contains nodes and edges related to the devices under the jurisdiction of the edge nodes.
[0051] In this embodiment, cross-modal causal gating multi-hop root cause reasoning, counterfactual verification, and root cause confirmation are performed during the reasoning process. Cross-modal causal gating multi-hop root cause reasoning specifically includes the following steps S301 to S305.
[0052] S301, for any two adjacent nodes in the dynamic knowledge graph , For a set of nodes, calculate the graph structure attention coefficient. .
[0053] It should be noted that the attention coefficient of graph structures The formula used to measure the importance of node v to node u in a graph topology is as follows:
[0054] in, Let be the initial embedding vectors for nodes u and v. A learnable shared weight matrix is used to map node embeddings into the latent space; This is a learnable attention vector; This represents a vector concatenation operation; Let be the set of neighboring nodes of node u; LeakyReLU is a non-linear activation function.
[0055] S302 uses the physical sensing signals corresponding to the nodes to calculate the temporal cross-correlation maxima, which are then used as the physical alignment gating factor.
[0056] For nodes u and v, if both correspond to device nodes with physical sensing signals, then the continuous sampled values within a preset time window before and after the timestamp of the anomaly are retrieved from the cloud time series database to form a time series, represented as:
[0057] Where T is the number of sampling points within the time window.
[0058] The temporal cross-correlation function of the physical sensing signals corresponding to node u and node v is calculated using the following formula:
[0059] in, , The signal value at time t, The mean of the signal. This is the time delay parameter; To maximize the consideration of delay.
[0060] The maximum value of the cross-correlation function is taken as the physical alignment gating factor. .
[0061] in, The closer the value is to 1, the more aligned and positively correlated the two signals are in time, indicating a higher probability of causal propagation between node u and node v; the closer the value is to 0 or a negative number, the less aligned or negatively correlated the two signals are in time, and their propagation should be suppressed.
[0062] It should be noted that physical sensing signals refer to numerical time-series data with physical dimensions obtained from sensors, such as temperature, pressure, vibration, current, voltage, etc. These signals are used to calculate the physical time alignment between nodes.
[0063] If any node does not have a corresponding physical sensor signal, the average signal value of its adjacent sensor nodes is used as a substitute, or a preset value is set directly, such as 0.5.
[0064] S303 uses the fused multimodal feature vectors to calculate the embedding cosine similarity between nodes, which serves as a semantic similarity gating factor.
[0065] From the fused multimodal feature vector In the process, extract the embedding vectors corresponding to nodes u and v. and The cosine similarity is calculated as a semantic similarity gating factor using the following formula:
[0066] in, The closer the value is to 1, the more similar the multimodal features of the two nodes are, and the more likely they are to be semantically related; a value close to 0 or a negative number indicates that they are semantically unrelated.
[0067] S304, the physical alignment gating factor and the semantic similarity gating factor are weighted and summed to obtain the comprehensive gating factor. .
[0068] This embodiment employs a dual-gating factor to evaluate the association strength between nodes from two aspects: physical signal alignment and multimodal semantic similarity. Finally, the two factors are weighted and fused to form the final gating factor. . These are the weighting coefficients.
[0069] S305, based on graph structure attention coefficient With comprehensive gating factor Obtain the edge propagation weights ,in Ensure that messages are allowed to propagate only when the timing alignment is positive; negative or zero alignment values will cut off the propagation path.
[0070] In each layer of the graph convolutional network, the neighborhood aggregation message of node u is calculated as follows:
[0071] in, For the first The embedding vector of node v in the layer; For the first The learnable weight matrix of the layer; It is a non-linear activation function; Let u be the set of neighboring nodes; This is the message vector aggregated from node u.
[0072] Through gating factors The filtering process allows strong message passing only for node pairs that simultaneously satisfy the conditions of graph topological connectivity and a positive comprehensive gating factor. This effectively suppresses common pseudo-causal paths in pure graph topological reasoning, such as two signals that change synchronously due to accidental factors but have no actual causal relationship, or semantically unrelated but redundantly connected in the graph.
[0073] S306, in GCN multi-hop inference, according to By weighted aggregation of neighborhood messages and backtracking along the direction of high propagation weight starting from the anomalous node, a set of candidate root cause paths can be obtained. .
[0074] After performing K-hop (K=3) multi-hop inference, starting from the anomalous node, propagation weights are used... Higher-order backtracking yields several candidate root cause paths. Each path This represents the causal propagation path from the root cause node to the current anomalous node, where As a candidate root cause node, These are the abnormal nodes detected in step 1.
[0075] In this embodiment, the candidate root cause path set obtained in step S306 Each step involves performing counterfactual verification to identify the true root cause node. This specifically includes the following steps, S311 to S314.
[0076] S311, take the LSTM prediction residual value of the original abnormal node at the time of the abnormality occurrence as the degree of abnormality before severance. .
[0077] Specifically, for each candidate root cause node A virtual cutoff operation is performed, which sets the abnormal state of the node back to normal. In this embodiment, the prediction residual of the LSTM single-step prediction model is used as a measure of the degree of anomaly. The prediction residual has been calculated in step S103, specifically: for each sampling time t, the value at the current time is predicted using the L historical sampling points before that time as input, and the absolute error between the predicted value and the true value is calculated as the prediction residual r(t).
[0078] Get abnormal nodes The predicted residual value of the anomaly at time t is used as the degree of anomaly before disconnection. .
[0079] S312, Select the corresponding historical signal segment from the historical data when the candidate root cause node is in a normal state, and calculate the mean of the LSTM prediction residual within the segment as the degree of abnormality after cutoff. .
[0080] Candidate root cause nodes are selected from historical data. Normal state, abnormal node For the corresponding historical signal segment from the same period, the mean of the prediction residuals at each time point within that segment is used as the degree of anomaly after the cutoff. ,in For historical data The continuous sampling time within the normal period and the same length as the abnormal window, where NN is the number of sampling points.
[0081] S313, Calculate the decrease in anomaly level. ,in, It is a very small positive number.
[0082] Used to prevent division by zero errors. Decreasing value. The larger the value, the greater the contribution of the candidate root cause node to the original anomaly.
[0083] S314, will decrease the value Compared with a preset threshold, if If the value is greater than or equal to a preset threshold, the corresponding candidate root cause node is determined to be the root cause node; otherwise, the corresponding candidate root cause node is excluded as the root cause.
[0084] The final output confirms the root cause node. And the causal path corresponding to that node.
[0085] S4 takes the root cause node as input, extracts the regulation or repair relationship edges connected to the root cause node from the dynamic knowledge graph, maps the relationship edges to the legal action space of reinforcement learning, and generates a self-healing strategy model in this space.
[0086] S401, query the dynamic knowledge graph for relational edges that are directly connected to the root cause node and whose edge type is regulation, and extract the corresponding action node set.
[0087] Root cause node Centered on a node, query all control relationship edges directly connected to that node in the dynamic knowledge graph. Let... From The set of edges that originate from and whose edge type is "control" is represented as:
[0088] in This indicates executable self-healing action nodes, such as "cooling command", "pressure reduction command", "equipment reset", etc. The confidence weight of the action edge represents the prior effectiveness of the action in resolving the anomaly.
[0089] Map the action nodes corresponding to the above edges to the legal action space of reinforcement learning. .
[0090] S402, take the difference between the set of action nodes and the preset blacklist of absolutely prohibited actions to obtain the final legal action space.
[0091] legal action space With a pre-set blacklist of absolutely prohibited actions Taking the difference between the sets yields the final legal action space. The absolute prohibited actions blacklist is configured offline by process experts and includes parameter adjustments exceeding physical limits and operations that violate safety procedures. The action selection of the reinforcement learning agent is restricted to... Within this area, unauthorized actions on the map are prohibited.
[0092] S403, Construct a state representation for reinforcement learning, wherein the state includes at least the embedding vector of the root cause node.
[0093] The state s in reinforcement learning is used to represent the current anomaly handling scenario and serves as input to the policy network. In this embodiment, state s at least includes the root cause node. Embedded vector The embedding vector is encoded from information such as node type, current real-time parameter value, and historical anomaly statistics.
[0094] S404, employs a composite security reward function. Perform reward calculations. The reward for eliminating anomalies is based on the magnitude of the abnormal score decrease. As a device safety margin reward based on physical boundary distance, Conflict penalty based on negative associations in the knowledge graph; These are the weighting coefficients.
[0095] Anomaly Removal Reward The anomaly elimination rate is defined as the ratio of the decrease in the anomaly score of an anomaly node after executing action a to the original anomaly score. If the anomaly is completely eliminated, then... If it has no effect, then If it deteriorates abnormally, then .
[0096] Equipment safety margin bonus This award is used to assess whether equipment parameters are within safe limits after an action is performed. This award applies to equipment parameter nodes with clearly defined physical safety boundaries. Let the lower limit of normal operation for the equipment parameters be... The maximum running limit is The absolute safety lower limit is The absolute safety limit is The parameter value after the action is executed is The safety margin bonus is then calculated as follows:
[0097] The first term assesses cases below the normal lower limit, and the second term assesses cases above the normal upper limit. Taking the minimum value ensures that the reward is limited to the side closest to the safety boundary.
[0098] When the current value is within the normal operating range When the current value approaches the safety boundary, When the current value exceeds the safety boundary, This triggers an emergency stop.
[0099] Map conflict penalty , These are known target nodes in the knowledge graph that may cause negative effects after performing action a; The weight of this negative effect; This is an indicator function that takes the value 1 when a negative action occurs and 0 otherwise. This penalty term encourages agents to avoid performing actions that have negative associations recorded in the knowledge graph.
[0100] S405, within the final legal action space, optimizes the policy network through a reinforcement learning algorithm to generate a self-healing policy model.
[0101] Employing Deep Q-Network (DQN) or Proximal Policy Optimization (PPO) algorithms within the legal action space The agent learns a strategy internally. It selects an action based on its current state s. After execution, it receives a reward R(s,a) from the environment and transitions to the next state. The network parameters of the strategy are optimized by maximizing the cumulative expected reward.
[0102] in, Let T be the discount factor, and T be the decision time domain.
[0103] After training convergence, the optimal self-healing strategy model is obtained. This model takes state s as input and outputs the optimal action. :
[0104] in, This is the optimal action value function.
[0105] S5 compresses the self-healing strategy model into a lightweight decision network through knowledge distillation and then transmits it to the edge, where the self-healing operation is performed.
[0106] A complex model trained in the cloud is used as the teacher network, and a lightweight multilayer perceptron is used as the student network. The action probability distribution (soft label) output by the teacher network is used as the supervision signal to train the student network to imitate the behavior of the teacher network. After training, the student network retains only a small number of neurons and network layers, significantly reducing the model size. The distilled lightweight decision network is then distributed to the local actuator at the edge. The edge device directly executes the received lightweight network and outputs the optimal self-healing action.
[0107] In this embodiment, after the self-healing strategy is executed, the edge device feeds back the anomaly handling results to the cloud, including whether the anomaly has been eliminated, the change in the degree of the anomaly, and whether a new anomaly has been generated. The cloud updates the dynamic knowledge graph based on the feedback anomaly handling results, specifically including the following steps S6.
[0108] S6 collects the execution results of the self-healing strategy and adjusts the edge weights related to the root cause in the dynamic knowledge graph based on the execution results.
[0109] S601, Obtain the LSTM prediction residual value of the abnormal node at the time of the abnormality occurrence, denoted as . .
[0110] Suppose that before the self-healing action is performed, the abnormal node... The LSTM prediction residual is .
[0111] S602, collect the LSTM prediction residuals of the same node after the self-healing strategy has been implemented and after a preset time window, denoted as... .
[0112] After the self-healing action is performed, and after a preset time window, the LSTM prediction residual of the same node is collected again at the edge, denoted as . .
[0113] S603, Calculate the feedback reward value ,in, It is a very small positive number used to prevent division by zero errors.
[0114] S604 will provide a reward value. Uploaded to the cloud, the cloud provides a reward value based on the feedback. Update the weights of relevant causal edges in the knowledge graph: if If the value is greater than zero, the edge weights are increased according to the positive intervention rule. If the weight is less than zero, the edge weight is weakened according to the negative intervention rule; if If the value is zero, the original weight remains unchanged.
[0115] Specifically, if This indicates positive intervention, a reduction in the degree of abnormality, and the effectiveness of the self-healing strategy; if This indicates that the intervention was ineffective and the degree of abnormality remained unchanged; if This indicates negative intervention, an increase in the degree of abnormality or the initiation of new abnormalities, and that the self-healing strategy is harmful.
[0116] The cloud received the feedback reward value Then, the root cause node targeted by this self-healing action is identified, and the causal edge related to that node in the knowledge graph is located.
[0117] For each causal edge (i,j) in the knowledge graph (where i is the cause node and j is the result node), if the current self-healing action is performed on node i, the edge weight is updated according to the following rules based on the positive or negative feedback reward value.
[0118] When the self-healing action is effective, it indicates that the causal path from node i to node j has been validated, thus increasing the weight of the causal edge: ;in, The learning rate controls the step size for weight updates.
[0119] When the self-healing action is ineffective or leads to deterioration, it indicates that the causal path from node i to node j may not hold or that there are interfering factors, thus weakening the weight of the causal edge. .
[0120] When intervention is ineffective, the weight of the causal edge is not updated. .
[0121] The foregoing has described in detail an embodiment of a smart manufacturing anomaly handling method. Based on the smart manufacturing anomaly handling method described above, this invention also provides a corresponding smart manufacturing anomaly handling system. This system includes an edge device and a cloud device.
[0122] Edge: Used for real-time collection of multi-source heterogeneous data and anomaly detection. When an anomaly is detected, the associated subgraph within the N-hop neighborhood is extracted from the local lightweight knowledge subgraph centered on the abnormal device node, and packaged with the multimodal feature data of the abnormal period and uploaded to the cloud. In the cloud: This process receives association subgraphs and multimodal feature data, extracts prior causal edge relationships from the association subgraphs, transforms them into causal attention bias vectors, and uses these bias vectors to perform cross-modal transformer weighted fusion of the multimodal feature data to obtain a fused multimodal feature vector. Additionally, using physical sensor signals and the fused multimodal feature vector as physical constraints, it performs GCN multi-hop inference in a dynamic knowledge graph maintained in the cloud. The inference process includes: calculating temporal alignment using physical sensor signals and semantic similarity using the fused multimodal feature vector during message passing, and then weighting and fusing the two. Collaboration is used to screen propagation paths for gating factors, obtaining candidate root cause paths; counterfactual verification is performed on the candidate root cause paths to calculate the decrease in the probability of anomalies after virtual cutoff. When the decrease exceeds a preset threshold, the root cause is confirmed, and the root cause node is obtained; and, using the root cause node as input, regulation or repair relationship edges connected to the root cause node are extracted from the dynamic knowledge graph; the relationship edges are mapped to a legal action space for reinforcement learning, and a self-healing strategy model is generated in this space; and the self-healing strategy model is compressed into a lightweight decision network through knowledge distillation and transmitted to the edge, where the self-healing operation is performed.
[0123] The intelligent manufacturing anomaly handling system of this embodiment is used to implement the aforementioned intelligent manufacturing anomaly handling method. Therefore, the specific implementation of this system can be found in the embodiment section of the intelligent manufacturing anomaly handling method above. Thus, its specific implementation can be referred to the description of the corresponding embodiments, and will not be elaborated here.
[0124] Furthermore, since the intelligent manufacturing anomaly handling system in this embodiment is used to implement the aforementioned intelligent manufacturing anomaly handling method, its function corresponds to the function of the above method, and will not be repeated here.
[0125] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for handling anomalies in intelligent manufacturing, characterized in that, Includes the following steps: The edge device collects multi-source heterogeneous data in real time and performs anomaly detection. When an anomaly is detected, the device takes the abnormal device node as the center, extracts the associated subgraph within the N-hop neighborhood from the local lightweight knowledge subgraph, and packages it with the multimodal feature data of the abnormal period and uploads it to the cloud. The cloud receives the associated subgraph and multimodal feature data, extracts the prior causal edge relationships in the associated subgraph, transforms them into a causal attention bias vector, and performs cross-modal transformer weighted fusion on the multimodal feature data based on this bias vector to obtain the fused multimodal feature vector. Using physical sensor signals and fused multimodal feature vectors as physical constraints, GCN multi-hop inference is performed in a dynamic knowledge graph maintained in the cloud. The inference process includes: during message transmission, calculating temporal alignment using physical sensor signals and semantic similarity using fused multimodal feature vectors; weighting and fusing the two as a gating factor to screen propagation paths and obtain candidate root cause paths; performing counterfactual verification on candidate root cause paths, calculating the decrease in anomaly probability after virtual cutoff, and confirming the root cause when the decrease exceeds a preset threshold, thus obtaining the root cause node. Using the root cause node as input, the regulatory relationship edges connected to the root cause node are extracted from the dynamic knowledge graph; the relationship edges are mapped to the legal action space of reinforcement learning, and a self-healing strategy model is generated in this space. The self-healing strategy model is compressed into a lightweight decision network through knowledge distillation and then transmitted to the edge, where the self-healing operation is performed.
2. The intelligent manufacturing anomaly handling method according to claim 1, characterized in that, Real-time acquisition of multi-source heterogeneous data and anomaly detection, specifically including: Real-time acquisition of multi-source heterogeneous data, including numerical parameters, visual image sequences, and voiceprint signals; The first-level processing steps include: performing SCADA rule threshold detection on numerical parameters; if any numerical parameter exceeds the preset emergency threshold, an emergency stop command is directly output and the process terminates; if any numerical parameter exceeds the preset non-emergency threshold, it is marked as an abnormal candidate and enters the second-level processing; if no threshold is exceeded, the process enters the second-level processing. The second-layer processing steps include: performing single-modal LSTM time series detection on all data types, inputting the time series data within the target time window of each data stream into the corresponding LSTM model, calculating the reconstruction error or prediction residual of each data stream as anomaly score, and outputting the abnormal device node identifier and anomaly occurrence timestamp if the anomaly score of any data stream exceeds the corresponding threshold.
3. The intelligent manufacturing anomaly handling method according to claim 2, characterized in that, When an anomaly is detected, taking the abnormal device node as the center, the associated subgraph within the N-hop neighborhood is extracted from the local lightweight knowledge subgraph, and packaged with the multimodal feature data of the abnormal period and uploaded to the cloud. Specifically, this includes: Multimodal data within a preset time window is extracted with the timestamp of the anomaly occurrence as the center. Temporal differences and statistical features are extracted from numerical parameters, optical flow or CNN descriptors are extracted from visual images, and MFCC features are extracted from voiceprint signals. These are then spliced together to form a multimodal feature package. Using the abnormal device node as the central node, perform an N-hop breadth-first traversal on the local lightweight knowledge subgraph on the edge side to extract all nodes and edges in the N-hop neighborhood and form an associated subgraph; where N is a preset positive integer. The multimodal feature package and associated subgraphs are packaged and uploaded to the cloud.
4. The intelligent manufacturing anomaly handling method according to claim 1, characterized in that, The prior causal edge relationships in the correlation subgraph are extracted and transformed into a causal attention bias vector. Based on this bias vector, the multimodal feature data is weighted and fused using a cross-modal transformer to obtain the fused multimodal feature vector, specifically including: Traverse the associated subgraph and extract all prior causal edges in the associated subgraph. Each causal edge contains a cause node, a result node, and the weight of the causal edge. For each modality, the sum of the weights of all causal edges pointing to the corresponding node of that modality is calculated as the causal attention bias value. The bias values of all modalities constitute the causal attention bias vector. The modal features are stacked into a feature matrix, and the query matrix, key matrix, and value matrix are calculated using the learnable projection matrix. The causal-driven attention weight matrix is calculated using the following formula: in, These are the query matrix and the key matrix, respectively. The dimension of the key vector. This is the causal bias strength coefficient. For causal attention bias vectors, It is a vector consisting entirely of 1s; Multiply the attention weight matrix with the value matrix to obtain the fused multimodal feature vector.
5. The intelligent manufacturing anomaly handling method according to claim 1, characterized in that, During message transmission, temporal alignment is calculated using physical sensor signals, and semantic similarity is calculated using fused multimodal feature vectors. The weighted fusion of these two methods serves as a gating factor to screen propagation paths, obtaining candidate root cause paths. Specifically, this includes: For any two adjacent nodes in a dynamic knowledge graph , For a set of nodes, calculate the graph structure attention coefficient. ; The temporal cross-correlation maxima are calculated using the physical sensing signals corresponding to the nodes, and used as the physical alignment gating factor. The embedding cosine similarity between nodes is calculated using the fused multimodal feature vectors and used as a semantic similarity gating factor. The physical alignment gating factor and the semantic similarity gating factor are weighted and summed to obtain the comprehensive gating factor. ; Based on the attention coefficient of the graph structure With comprehensive gating factor , Obtain the edge propagation weights ,in Ensure that messages are allowed to propagate only when the timing alignment is positive; negative or zero alignment values will cut off the propagation path. In GCN multi-hop inference, according to By weighted aggregation of neighborhood messages and backtracking along the direction of high propagation weight starting from the anomalous node, a set of candidate root cause paths can be obtained. .
6. The intelligent manufacturing anomaly handling method according to claim 1, characterized in that, Counterfactual verification is performed on candidate root cause paths, and the decrease in anomaly probability after virtual cutoff is calculated. When this decrease exceeds a preset threshold, the root cause is confirmed, and the root cause node is obtained, specifically including: Obtain the LSTM prediction residual value of the abnormal node at the moment of the abnormality, as the degree of abnormality before disconnection. ; From historical data, select historical signal segments corresponding to the abnormal nodes when the corresponding candidate root cause nodes are in a normal state, and calculate the mean of the LSTM prediction residuals within these segments as the degree of abnormality after cutoff. ; Calculate the decrease in the degree of abnormality ,in, It is a very small positive number, used to prevent division by zero errors; Decrease value Compared with a preset threshold, if If the value is greater than or equal to a preset threshold, the corresponding candidate root cause node is determined to be the root cause node; otherwise, the corresponding candidate root cause node is excluded as the root cause.
7. The intelligent manufacturing anomaly handling method according to claim 1, characterized in that, The relation edges are mapped to a legal action space for reinforcement learning, within which a self-healing policy model is generated, specifically including: From the dynamic knowledge graph, query the relationship edges that are directly connected to the root cause node and whose edge type is regulation, and extract the corresponding action node set; The final legal action space is obtained by taking the difference between the set of action nodes and the pre-defined blacklist of absolutely prohibited actions. Construct a state representation for reinforcement learning, wherein the state includes at least the embedding vector of the root cause node; Using a composite security reward function Perform reward calculations. The reward for eliminating anomalies is based on the magnitude of the abnormal score decrease. As a device safety margin reward based on physical boundary distance, Conflict penalty based on negative associations in the knowledge graph; These are the weighting coefficients; Within the final legal action space, a self-healing policy model is generated by optimizing the policy network through reinforcement learning algorithms.
8. The intelligent manufacturing anomaly handling method according to claim 1, characterized in that, The method also includes: Collect the execution results of the self-healing strategy and adjust the edge weights related to the root cause in the dynamic knowledge graph based on the execution results.
9. The intelligent manufacturing anomaly handling method according to claim 8, characterized in that, Adjust the edge weights related to the root cause in the dynamic knowledge graph based on the execution results, specifically including: Obtain the LSTM prediction residual value of the abnormal node at the time of the abnormality occurrence, denoted as . ; The LSTM prediction residuals of the same node after the self-healing strategy is implemented and a preset time window is passed, denoted as [missing information]. ; Calculate feedback reward value ,in, It is a very small positive number, used to prevent division by zero errors; Feedback reward value Uploaded to the cloud, the cloud provides a reward value based on the feedback. Update the weights of relevant causal edges in the knowledge graph: if If the value is greater than zero, the edge weights are increased according to the positive intervention rule. If the weight is less than zero, the edge weight is weakened according to the negative intervention rule; if If the value is zero, the original weight remains unchanged.
10. An intelligent manufacturing anomaly handling system, characterized in that, For performing the method of claim 1, including an edge terminal and a cloud terminal; Edge: Used for real-time collection of multi-source heterogeneous data and anomaly detection. When an anomaly is detected, the associated subgraph within the N-hop neighborhood is extracted from the local lightweight knowledge subgraph centered on the abnormal device node, and packaged with the multimodal feature data of the abnormal period and uploaded to the cloud. In the cloud: This process receives association subgraphs and multimodal feature data, extracts prior causal edge relationships from the association subgraphs, transforms them into causal attention bias vectors, and uses these bias vectors to perform cross-modal transformer weighted fusion of the multimodal feature data to obtain a fused multimodal feature vector. Additionally, using physical sensor signals and the fused multimodal feature vector as physical constraints, it performs GCN multi-hop inference in a dynamic knowledge graph maintained in the cloud. The inference process includes: calculating temporal alignment using physical sensor signals and semantic similarity using the fused multimodal feature vector during message passing, and then weighting and fusing the two. Collaboration is used to screen propagation paths for gating factors, obtaining candidate root cause paths; counterfactual verification is performed on the candidate root cause paths to calculate the decrease in the probability of anomalies after virtual cutoff. When the decrease exceeds a preset threshold, the root cause is confirmed, and the root cause node is obtained; and, using the root cause node as input, regulation or repair relationship edges connected to the root cause node are extracted from the dynamic knowledge graph; the relationship edges are mapped to a legal action space for reinforcement learning, and a self-healing strategy model is generated in this space; and the self-healing strategy model is compressed into a lightweight decision network through knowledge distillation and transmitted to the edge, where the self-healing operation is performed.