Electromechanical equipment abnormal behavior detection and fault prediction method based on causal space-time Transform

Through the causal spatiotemporal Transformer method, the causal graph is constructed and corrected and combined with the spatiotemporal attention mechanism, which solves the problem of difficulty in capturing causal correlation and spatiotemporal cross-scale propagation laws in anomaly detection of electromechanical equipment, and realizes efficient anomaly detection and fault prediction.

CN120705784AActive Publication Date: 2025-09-26中国水利水电第七工程局有限公司 +2

Patent Information

Application Number
CN202511197144.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-09-26
Estimated Expiration
2045-08-26

AI Technical Summary

Technical Problem

Existing electromechanical equipment anomaly detection and fault prediction technologies are difficult to effectively capture the causal relationships between devices and the laws of fault propagation across time and space scales. Traditional methods have high noise and difficulty in feature extraction when dealing with complex electromechanical systems. Deep learning methods have shortcomings in sample imbalance and model interpretability.

Method used

A method based on causal spatiotemporal Transformer is adopted. By constructing an initial causal graph and correcting it based on historical data, the causal graph is introduced as prior information into the Transformer model. The spatiotemporal attention mechanism is combined for feature modeling to achieve explicit modeling of the chain propagation mechanism of equipment failures.

Benefits of technology

It improves the accuracy of anomaly detection in electromechanical equipment and the flexibility of fault prediction, enables timely response to equipment failures, reduces potential losses, and enhances the sensitivity to small abnormal fluctuations and the ability to detect a small number of abnormal categories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705784A_ABST
    Figure CN120705784A_ABST
Patent Text Reader

Abstract

The invention discloses an electromechanical equipment abnormal behavior detection and fault prediction method based on a causal time-space Transform, and belongs to the technical field of electromechanical equipment abnormal detection, and the method comprises the steps: S1, constructing an initial causal graph according to the causal relationship between the physical structure and the functional part of electromechanical equipment; s2, correcting the initial causal graph based on historical operation data of the electromechanical equipment to generate a causal graph; s3, introducing the causal graph as prior information into a Transform model, predicting sensor time sequence data of the electromechanical equipment to be detected through the trained Transform model, and outputting corresponding high-dimensional feature representation; and S4, according to the high-dimensional feature representation, calculating the abnormal weight of each component, and carrying out component-level abnormal identification and fault prediction. The method breaks through the limitation that only the data correlation is fitted and the causal relationship is ignored in the electromechanical equipment anomaly detection of a traditional time sequence model, and explicit modeling of an equipment fault chain propagation mechanism is realized by fusing a causal reasoning mechanism and feature modeling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electromechanical equipment anomaly detection, and specifically relates to a method for abnormal behavior detection and fault prediction of electromechanical equipment based on a causal spatiotemporal Transformer. Background Art

[0002] Existing technologies for anomaly detection and fault prediction in electromechanical equipment primarily rely on traditional signal processing and statistical models. These methods, including time-domain analysis, frequency-domain analysis, and threshold-based alarm mechanisms, can identify some abnormal behaviors. However, the complex dynamic characteristics and variable operating conditions of electromechanical systems lead to high signal noise and difficulty in extracting effective features. Traditional statistical models, such as ARIMA (autoregressive integrated moving average), often perform poorly when processing non-stationary time series signals due to their inability to model long-range dependencies. Furthermore, current deep learning methods face challenges when processing equipment monitoring data, such as sample imbalance, poor model interpretability, and insufficient cross-device generalization.

[0003] To address these issues in electromechanical equipment health management, recent research has attempted to use machine learning techniques such as convolutional neural networks (CNNs), long short-term memory networks (LSTMs), and isolation forests. However, these methods are limited in capturing the causal relationships between equipment anomalies and failures, and struggle to model fault propagation across time and space scales. Summary of the Invention

[0004] In response to the above-mentioned deficiencies in the prior art, the method for abnormal behavior detection and fault prediction of electromechanical equipment based on causal spatiotemporal Transformer provided by the present invention breaks through the limitations of traditional time series models in electromechanical equipment anomaly detection that only fits data correlations but ignores causal relationships. By integrating causal reasoning mechanisms with feature modeling, it realizes explicit modeling of the chain propagation mechanism of equipment failures.

[0005] In order to achieve the above-mentioned purpose, the technical solution adopted by the present invention is: a method for abnormal behavior detection and fault prediction of electromechanical equipment based on causal spatiotemporal Transformer, comprising the following steps: S1. Construct an initial causal diagram based on the physical structure of the electromechanical equipment and the causal relationship between the functional components; S2. Modify the initial cause-effect diagram based on the historical operation data of the electromechanical equipment to generate a cause-effect diagram; S3. Introduce the causal graph as prior information into the Transformer model, and use the trained Transformer model to predict the sensor time series data of the electromechanical equipment to be tested, and output the corresponding high-dimensional feature representation; S4. Based on the high-dimensional feature representation, calculate the abnormality weight of each component, and perform component-level abnormality identification and fault prediction.

[0006] Furthermore, in the step S1, in the initial causal graph A(V,E), the node V represents a key mechanical component of the electromechanical equipment, and the edge E represents a fault propagation path; In the initial causal graph A(V,E), components To components The edge weight for: For the invisible causal relationship in the initial causal graph A(V,E), the corresponding components To components The implicit edge weight of for: Where, represents the adjustment coefficient of the initial edge weight, Represents the components identified based on historical operating data X Existing data and components Existing data The actual strength of the fault transmission, Represent components separately and components The existing data, Representation components To components The initial edge weights of represents the weight adjustment coefficient of the initial implicit edge, Represents the components identified based on historical operating data X Existing data and components Existing data The strength of the implicit causal relationship, Representation components To components The initial implicit edge weights of .

[0007] Furthermore, in step S2, based on the historical operating data of the electromechanical equipment, a statistical method is used to modify the edge weights in the initial causal graph, thereby obtaining a causal graph; The statistical methods include Granger causality test, mutual information calculation and partial correlation calculation.

[0008] Furthermore, in the cause-effect diagram, the corrected component To components The edge weight for: Where, Represents the components in the initial causal graph To components The edge weights of represents the Granger causality weight coefficient, Representation components Existing data and components Existing data The control function of the existence of Granger causality is 1, which means there is Granger causality, and 0 means there is no Granger causality. represents the mutual information weight adjustment coefficient, Representation components Existing data and components Existing data The mutual information of represents the weight adjustment coefficient of the partial correlation coefficient, Representation components Existing data and components Existing data The partial correlation coefficient of represents the weight adjustment coefficient of implicit causal relationship, Represents the components identified based on historical operating data X Existing data and components Existing data The strength of the implicit causal relationship.

[0009] Furthermore, in step S3, the processing process of the input sensor time series data by the Transformer model is specifically as follows: S31, map the sensor time series data to a high-dimensional feature space through the embedding layer, and introduce position encoding to obtain the initial input representation; S32. In each layer of the multi-head self-attention mechanism, the initial input representation is mapped into a query vector, a key vector, and a value vector respectively; S33, calculating the attention weight based on the query vector, the key vector and the value vector, and calculating the attention weight based on the mask matrix constructed by the causal graph; S34: Based on the attention weights, multiple attention heads are calculated in parallel and concatenated, and then output after linear mapping. S35. Input the linearly mapped output into the feedforward neural network for processing, and output the corresponding high-dimensional feature representation through residual connection and layer normalization.

[0010] Furthermore, in step S33, the attention weight for: Where, represents the query vector, represents the key vector, represents a value vector, represents the mask matrix constructed according to the causal graph, which is used to control the attention path. represents the dimension of the key vector K, represents element-wise multiplication, express Activation function.

[0011] Furthermore, the loss function of the Transformer model is for: Where, represents the actual labeling result, Represents the model output value, represents the weighting factor based on sample imbalance adjustment, Represents the logarithmic function.

[0012] Furthermore, the step S4 includes the following sub-steps: S41. Normalize the high-dimensional feature representation output by the Transformer model; The high-dimensional features are expressed as , n represents the number of components, and m represents the feature dimension; S42. Calculate the abnormality score of each component based on the normalized high-dimensional feature representation ; S43. Abnormality Scoring After Z-score standardization, the abnormal component is determined through binary judgment, and the propagation path of the abnormal component is determined in combination with the causal graph to deduce the fault impact range, thereby realizing abnormality identification and fault prediction.

[0013] Furthermore, in step S42, the abnormality score of each component for: Where, represents the set of adjacent components related to component i, Represents the modified component in the cause-effect diagram To components The edge weights of represents the feature vector of component j, represents the function for calculating the abnormality score of component j, , Indicates norm calculation.

[0014] Furthermore, in step S43, the formula for determining abnormal components is: Where, Representation components The corresponding normalized anomaly score, Indicates setting the abnormal component judgment threshold. Representation components The abnormal weight of hour, Representation components For abnormal parts, hour, Representation components It is a normal component; When the components When it is an abnormal component, the scope of its failure is: Where, Represents the feature vector within the fault impact range, Represents the causal relationship matrix between components in a causal graph.

[0015] The beneficial effects of the present invention are: (1) By combining time series data and causal graphs, the spatiotemporal Transformer can simultaneously process dynamic changes and spatial dependencies in time series. This integration enables the model to fully capture the complexity of device operating states, thereby improving the accuracy of anomaly detection.

[0016] (2) In this paper, a causal mask mechanism is introduced into the attention calculation of the Transformer model to ensure that the model follows the causal relationship when processing time series data and avoids the interference of future information on the current state. This mechanism enables the model to more realistically reflect the fault propagation process and improve its sensitivity to small abnormal fluctuations.

[0017] (3) In the present invention, the self-attention mechanism of the Transformer model also allows the model to dynamically focus on important features in the input data. By calculating the high-dimensional feature representation of each component, it automatically identifies the key factors related to abnormal conditions. This feature extraction capability enables the model to adapt to the operating modes of different equipment and enhance the flexibility of fault prediction.

[0018] (4) In terms of abnormality weight calculation, based on the features extracted by the Transformer model, the abnormality weight of each mechanical component can be calculated in real time, and abnormality judgment can be made according to the set threshold. This real-time update capability enables the model to respond to equipment failures in a timely manner and reduce potential losses.

[0019] (5) The cross entropy loss function is used to optimize the model in the present invention, which can effectively process unbalanced data and improve the detection ability of a few abnormal categories; through the back propagation algorithm, the model continuously adjusts the parameters to further improve the accuracy of anomaly detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 The present invention provides a method for detecting abnormal behavior and predicting faults in electromechanical equipment based on a causal spatiotemporal Transformer. DETAILED DESCRIPTION

[0021] The specific embodiments of the present invention are described below to facilitate understanding of the present invention by those skilled in the art. However, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the appended claims, these changes are obvious, and all inventions and creations utilizing the concepts of the present invention are protected.

[0022] This paper is based on a model architecture that integrates causal graphs and spatiotemporal Transformers, aiming to improve the abnormal behavior detection and fault prediction capabilities of electromechanical equipment under complex working conditions. Traditional equipment status monitoring methods mostly rely on signal threshold settings or time series models, which make it difficult to capture the potential causal relationships and fault propagation paths between multiple components. To this end, this paper introduces a fusion path of explicit modeling and spatiotemporal attention mechanism in the modeling process; Figure 1 As shown, the method for detecting abnormal behavior and predicting faults of electromechanical equipment based on causal spatiotemporal Transformer in the present invention is characterized by comprising the following steps: S1. Construct an initial causal diagram based on the physical structure of the electromechanical equipment and the causal relationship between the functional components; S2. Modify the initial cause-effect diagram based on the historical operation data of the electromechanical equipment to generate a cause-effect diagram; S3. Introduce the causal graph as prior information into the Transformer model, and use the trained Transformer model to predict the sensor time series data of the electromechanical equipment to be tested, and output the corresponding high-dimensional feature representation; S4. Based on the high-dimensional feature representation, calculate the abnormality weight of each component, and perform component-level abnormality identification and fault prediction.

[0023] In step S1 of the embodiment of the present invention, an initial causal graph A(V,E) is first defined based on the physical structure of the electromechanical equipment and the topological relationship between the functional components. In the initial causal graph A(V,E), the node V represents the key mechanical components of the electromechanical equipment (such as the main shaft, bearings, cooling pumps, windings, etc.), and the edge E represents the fault propagation path (such as "bearing wear → increased vibration → increased motor temperature"). The initial causal graph reflects the understanding of the equipment operation logic at the design level, but does not fully include all potential dynamic interaction relationships, especially in complex or aging equipment, where implicit causal paths may exist.

[0024] In the initial causal graph A(V,E), components To components The edge weight for: For the invisible causal relationship in the initial causal graph A(V,E), the corresponding components To components The implicit edge weight of for: Where, represents the adjustment coefficient of the initial edge weight, Represents the components identified based on historical operating data X Existing data and components Existing data The actual strength of the fault transmission, Represent components separately and components The existing data, Representation components To components The initial edge weights of represents the weight adjustment coefficient of the initial implicit edge, Represents the components identified based on historical operating data X Existing data and components Existing data The strength of the implicit causal relationship, Representation components To components The initial implicit edge weights of .

[0025] In step S2 of the embodiment of the present invention, in order to overcome the limitations of ideal physical connections, a data-driven causal inference mechanism is introduced in this embodiment. By collecting a large amount of historical operating data of electromechanical equipment in normal and abnormal conditions, the data is statistically processed to correct the edge weights in the initial causal graph.

[0026] In this embodiment, based on the historical operating data of the electromechanical equipment, a statistical method is used to correct the edge weights in the initial causal graph to obtain a causal graph; the statistical method includes Granger causality test, mutual information calculation, and partial correlation calculation.

[0027] In a specific example of an embodiment of the present invention, in actual operating conditions, there may be an implicit causal relationship: "lubricant contamination → bearing overheating → motor failure." This relationship cannot be directly modeled using physical structures and must be mined from data. The resulting modified causal diagram is more consistent with the actual operating logic of the device.

[0028] In this embodiment, in the initial causal graph A(V,E), components To components The edge weight It can be set by expert knowledge or physical models.

[0029] In this embodiment, the following statistical method is used to correct edge weights: Granger Causality Test: Determine whether one time series can successfully predict another time series.

[0030] Mutual Information: It is used to measure the dependence between two random variables.

[0031] Partial correlation coefficient: used to measure the linear relationship between two variables while controlling for other variables.

[0032] Furthermore, in actual working conditions, there may be some implicit causal relationships, such as "lubricating oil contamination → bearing overheating → motor failure". In order to identify these implicit relationships, we can define an implicit causal graph , and its edge weight is expressed as: Where, represents the weight adjustment coefficient of implicit causal relationship, Represents the components identified based on historical operating data X Existing data and components Existing data The strength of the implicit causal relationship.

[0033] Based on the above correction method, in the causal graph, the corrected edge weights for: Where, Represents the components in the initial causal graph To components The edge weights of represents the Granger causality weight coefficient, Representation components Existing data and components Existing data The control function of the existence of Granger causality is 1, which means there is Granger causality, and 0 means there is no Granger causality. represents the mutual information weight adjustment coefficient, Representation components Existing data and components Existing data The mutual information of represents the weight adjustment coefficient of the partial correlation coefficient, Representation components Existing data and components Existing data The partial correlation coefficient of represents the weight adjustment coefficient of implicit causal relationship, Represents the components identified based on historical operating data X Existing data and components Existing data The strength of the implicit causal relationship.

[0034] In step S3 of the embodiment of the present invention, the modified causal graph is introduced into the Transformer model as prior structure information to jointly model the sensor data time series of the electromechanical device. Specifically, the attention mechanism of the Transformer model is The adjacency matrix of the causal graph is introduced into the computation process to construct a causal masked attention mechanism. This mechanism calculates attention weights only between nodes with causal edges, thereby improving the ability to model fault propagation paths. This mechanism not only retains the Transformer's strong ability to represent temporal patterns, but also introduces causal constraints in the spatial dimension, making the model more physically interpretable.

[0035] In this embodiment, deeply embedding the physical characteristics and failure mechanisms of electromechanical equipment into the model architecture is key to improving fault prediction accuracy and engineering practicality. At the encoder stage, a graph attention mechanism based on device topology is constructed to encode the propagation paths of typical failure modes such as bearing wear and gear meshing failure into a causal adjacency matrix, guiding the model to learn potential representations that conform to the laws of mechanical transmission. At the spatiotemporal decoder stage, a physical constraint loss function is constructed using device dynamics equations (such as the rotor unbalance force equation and the gear vibration transfer function) to ensure that the reconstructed vibration signal satisfies the energy conservation characteristics of the mechanical system. Furthermore, operating parameters (load, speed, etc.) recorded by the SCADA system are introduced as conditional variables, and a multi-head attention mechanism is used to achieve fault feature decoupling that is adaptive to the operating state.

[0036] In step S3 of this embodiment, the Transformer model primarily consists of three core modules: an embedding layer, a multi-head self-attention mechanism, and a feed-forward network. Each module appears as a stacked layer in the encoder or decoder. Based on this structure, the Transformer model accurately predicts abnormal behavior or future failures by modeling the long-term dependencies and spatiotemporal correlations in the input sensor time series data (composed of multidimensional state vectors collected from device sensors at different times).

[0037] Based on the above model structure, the processing process of the input sensor time series data in this embodiment is specifically as follows: S31, map the sensor time series data to a high-dimensional feature space through the embedding layer, and introduce position encoding to obtain the initial input representation; Specifically, the embedding layer maps the input sensor time series data to a high-dimensional feature space to obtain the initial input representation. In order to retain the temporal order information of the sequence, position encoding is introduced and added to the embedded features to form the final input sequence representation.

[0038] S32. In each layer of the multi-head self-attention mechanism, the input representation is mapped into a query vector, a key vector, and a value vector respectively; S33, calculating the attention weight based on the query vector, the key vector and the value vector, and calculating the attention weight based on the mask matrix constructed by the causal graph; Among them, the attention weight for: Where, represents the query vector, represents the key vector, represents a value vector, represents the mask matrix constructed according to the causal graph, which is used to control the attention path. represents the dimension of the key vector K, a factor used to scale the attention weights, express activation function, Represents element-wise multiplication, which is used to multiply the attention weight matrix with the causal mask matrix M, thereby masking the attention connections that do not conform to the causal structure.

[0039] The mask matrix in this embodiment ensures that attention computation occurs only between components with causal relationships; S34, based on the attention weight, multiple attention heads are calculated in parallel and spliced, and then output after linear mapping , which is expressed as; in, represents the hth attention head, represents the output linear mapping matrix, Represents a splicing operation.

[0040] S35. Input the linearly mapped output into the feedforward neural network for processing, and output the corresponding high-dimensional feature representation through residual connection and layer normalization.

[0041] In this embodiment, the Transformer model architecture can effectively capture the multi-level spatiotemporal features in the equipment operation data through its unique self-attention mechanism. In the time dimension, the model uses a multi-head self-attention mechanism to automatically learn the long-range dependencies in the vibration signal, while combining the temporal position encoding technology to accurately retain the time series characteristics of the signal; in the spatial dimension, by encoding the physical topology of the equipment into a causal graph structure, explicit modeling of the fault propagation path between mechanical components is achieved. This spatiotemporal coupled Transformer model architecture can not only simultaneously process millisecond-level instantaneous vibration characteristics and hour-level progressive degradation patterns, but also establish dynamic associations between different component states through a cross-attention mechanism, allowing the model to capture complex interaction patterns between any positions in the sequence.

[0042] In step S4 of this embodiment, the high-dimensional feature representation output by the Transformer model is normalized and the degree of abnormality is quantified for each component's feature vector, and its corresponding abnormality weight is calculated. When the abnormality weight of a component within a certain time window exceeds a set threshold, it is determined to be in a possible abnormal state. Combined with the propagation path in the causal graph, the possible scope of the fault's impact is deduced and explained.

[0043] Specifically, step S4 of this embodiment includes the following sub-steps: S41. Normalize the high-dimensional feature representation output by the Transformer model; High-dimensional features are represented as , n represents the number of components, and m represents the feature dimension; S42. Calculate the abnormality score of each component based on the normalized high-dimensional feature representation ; The anomaly score of each component is the weighted sum of the anomaly scores of all adjacent components of the component multiplied by the transfer weight, and the anomaly score of component i is obtained. for: Where, represents the set of adjacent components related to component i, Represents the modified component in the cause-effect diagram To components The edge weights of represents the feature vector of component j, represents the function for calculating the abnormality score of component j, , Indicates norm calculation.

[0044] S43. Abnormality Scoring After Z-score standardization, the abnormal component is identified through binary judgment. The propagation path of the abnormal component is determined in combination with the cause-effect diagram to deduce the scope of the fault impact, thereby achieving abnormality identification and fault prediction. The formula for determining abnormal parts is: Where, Representation components The corresponding normalized anomaly score, Indicates setting the abnormal component judgment threshold. Representation components The abnormal weight of hour, Representation components For abnormal parts, hour, Representation components It is a normal component; When the components When it is an abnormal component, the scope of its failure is: Where, Represents the feature vector within the fault impact range, Represents the causal relationship matrix between components in a causal graph.

[0045] In this embodiment, to accurately classify the abnormal state of each component, a binary classification strategy based on the cross-entropy loss function is employed to optimize component-level anomaly detection performance during the model training phase. The difference between the model output and the ground truth is measured using cross-entropy and back-propagated for optimization, effectively increasing the model's sensitivity to subtle anomaly fluctuations. Ultimately, this enables time-based prediction and precise diagnosis of critical equipment components. If the system detects an anomaly score consistently exceeding a threshold, it issues an alert, precisely identifying the component type and potential propagation path of the anomaly.

[0046] In this embodiment, the model output value is set to , the actual labeling result is (label, 0 or 1), since the two-classification strategy is adopted, pass Function is obtained, and the cross entropy loss function is Defined as: Where, represents the actual labeling result, Represents the model output value, Represents the logarithmic function.

[0047] During the model training phase, the training goal is to minimize the cross entropy loss function. Through the back-propagation algorithm, the gradient of the loss function with respect to the model parameters is calculated, and then the model parameters are updated using the gradient descent method.

[0048] By optimizing the cross entropy loss function, the model can better capture small abnormal fluctuations. In order to improve the model's sensitivity to abnormal fluctuations, a weighting factor can be introduced Based on this, the loss function of the Transformer model in this embodiment is obtained for: Where, represents the actual labeling result, Represents the model output value, represents the weighting factor based on sample imbalance adjustment, Represents the logarithmic function.

[0049] In this implementation, existing deep learning methods typically rely on massive amounts of training data, but critical failure modes of electromechanical equipment (such as bearing fractures and motor winding short circuits) occur very rarely in actual operation, resulting in a scarcity and uneven distribution of abnormal samples. By introducing a causal spatiotemporal Transformer, a causal graph model of equipment failures is constructed under limited sample conditions. This allows the model to distinguish between true fault causal chains (such as insufficient lubrication → bearing overheating → abnormal vibration spectrum) and false associations. By combining a spatiotemporal attention mechanism with causal intervention techniques, a more physically interpretable feature representation can be learned from a small number of fault cases, significantly improving the model's generalization ability under unknown failure modes.

[0050] The causal spatiotemporal Transformer in this embodiment decouples spatiotemporal confounding factors from multi-sensor data (such as the interference of ambient temperature on vibration signals) to more accurately capture nonlinear causal effects in fault evolution (such as the directional influence of early microcracks on harmonic components). This improves the early warning capability for progressive faults, provides a traceable and intervention-enabled intelligent diagnostic system for high-value electromechanical equipment (such as wind turbines and aircraft engines), and promotes the upgrade of industrial equipment health management from "correlation prediction" to "causal decision-making."

[0051] Specific embodiments are used in the present invention to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.

[0052] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and it should be understood that the scope of protection of the present invention is not limited to such specific descriptions and embodiments. Those skilled in the art can make various other specific variations and combinations based on the technical teachings disclosed in the present invention without departing from the essence of the present invention, and such variations and combinations are still within the scope of protection of the present invention.

Claims

1. A method for abnormal behavior detection and fault prediction of electromechanical equipment based on causal spatiotemporal transformer, characterized by: The following steps are involved: S1. Construct an initial causal diagram based on the physical structure of the electromechanical equipment and the causal relationship between the functional components; S2. Modify the initial cause-effect diagram based on the historical operation data of the electromechanical equipment to generate a cause-effect diagram; S3. Introduce the causal graph as prior information into the Transformer model, and use the trained Transformer model to predict the sensor time series data of the electromechanical equipment to be tested, and output the corresponding high-dimensional feature representation; S4. Based on the high-dimensional feature representation, calculate the abnormality weight of each component, and perform component-level abnormality identification and fault prediction.

2. The method for abnormal behavior detection and fault prediction of electromechanical equipment based on causal spatiotemporal Transformer according to claim 1 is characterized in that: In the step S1, in the initial causal graph A(V,E), the node V represents the key mechanical component of the electromechanical equipment, and the edge E represents the fault propagation path; In the initial causal graph A(V,E), components To component The edge weight for: For the invisible causal relationship in the initial causal graph A(V,E), the corresponding components To component The implicit edge weight of for: Where, represents the adjustment coefficient of the initial edge weight, Represents the components identified based on historical operating data X Existing data and components Existing data The actual strength of the fault transmission, Represent components separately and components The existing data, Representation components To component The initial edge weights of represents the weight adjustment coefficient of the initial implicit edge, Represents the components identified based on historical operating data X Existing data and components Existing data The strength of the implicit causal relationship, Representation components To component The initial implicit edge weights of .

3. The method for abnormal behavior detection and fault prediction of electromechanical equipment based on causal spatiotemporal Transformer according to claim 2 is characterized in that: In step S2, based on the historical operating data of the electromechanical equipment, a statistical method is used to modify the edge weights in the initial causal graph, thereby obtaining a causal graph; The statistical methods include Granger causality test, mutual information calculation and partial correlation calculation.

4. The method for abnormal behavior detection and fault prediction of electromechanical equipment based on causal spatiotemporal transformer according to claim 3 is characterized in that: In the cause-effect diagram, the corrected components To component The edge weight for: Where, Represents the components in the initial causal graph To component The edge weights of represents the Granger causality weight coefficient, Representation components Existing data and components Existing data The control function of the existence of Granger causality is 1, which means there is Granger causality, and 0 means there is no Granger causality. represents the mutual information weight adjustment coefficient, Representation components Existing data and components Existing data The mutual information of represents the weight adjustment coefficient of the partial correlation coefficient, Representation components Existing data and components Existing data The partial correlation coefficient of represents the weight adjustment coefficient of implicit causal relationship, Represents the components identified based on historical operating data X Existing data and components Existing data The strength of the implicit causal relationship.

5. The method for abnormal behavior detection and fault prediction of electromechanical equipment based on causal spatiotemporal transformer according to claim 1 is characterized in that: In step S3, the Transformer model processes the input sensor time series data as follows: S31, map the sensor time series data to a high-dimensional feature space through the embedding layer, and introduce position encoding to obtain the initial input representation; S32. In each layer of the multi-head self-attention mechanism, the initial input representation is mapped into a query vector, a key vector, and a value vector respectively; S33, calculating the attention weight based on the query vector, the key vector and the value vector, and calculating the attention weight based on the mask matrix constructed by the causal graph; S34: Based on the attention weights, multiple attention heads are calculated in parallel and concatenated, and then output after linear mapping. S35. Input the linearly mapped output into the feedforward neural network for processing, and output the corresponding high-dimensional feature representation through residual connection and layer normalization.

6. The method for abnormal behavior detection and fault prediction of electromechanical equipment based on causal spatiotemporal transformer according to claim 5 is characterized in that: In step S33, the attention weight for: Where, represents the query vector, represents the key vector, represents a value vector, represents the mask matrix constructed according to the causal graph, which is used to control the attention path. represents the dimension of the key vector K, represents element-wise multiplication, express Activation function.

7. The method for abnormal behavior detection and fault prediction of electromechanical equipment based on causal spatiotemporal transformer according to claim 1 is characterized in that: The loss function of the Transformer model for: Where, represents the actual labeling result, Represents the model output value, represents the weighting factor based on sample imbalance adjustment, Represents a logarithmic function.

8. The method for abnormal behavior detection and fault prediction of electromechanical equipment based on causal spatiotemporal transformer according to claim 1 is characterized in that: The step S4 comprises the following sub-steps: S41. Normalize the high-dimensional feature representation output by the Transformer model; The high-dimensional features are expressed as , n represents the number of components, and m represents the feature dimension; S42. Calculate the abnormality score of each component based on the normalized high-dimensional feature representation ; S43. Abnormality Scoring After Z-score standardization, the abnormal component is determined through binary judgment, and the propagation path of the abnormal component is determined in combination with the causal graph to deduce the fault impact range, thereby realizing abnormality identification and fault prediction.

9. The method for abnormal behavior detection and fault prediction of electromechanical equipment based on causal spatiotemporal Transformer according to claim 8 is characterized in that: In step S42, the abnormality score of each component for: Where, represents the set of adjacent components related to component i, Represents the modified component in the cause-effect diagram To component The edge weights of represents the feature vector of component j, represents the function for calculating the abnormality score of component j, , Indicates norm calculation.

10. The method for abnormal behavior detection and fault prediction of electromechanical equipment based on causal spatiotemporal transformer according to claim 9 is characterized in that: In step S43, the formula for determining abnormal components is: Where, Representation components The corresponding normalized anomaly score, Indicates setting the abnormal component judgment threshold. Representation components The abnormal weight of hour, Representation components For abnormal parts, hour, Representation components It is a normal component; When the components If it is an abnormal component, the scope of its failure is: Where, Represents the feature vector within the fault impact range, Represents the causal relationship matrix between components in a causal graph.

Citation Information

Patent Citations

  • Transform-based method and device for constructing sample efficient world model

    CN119271974A

  • Charging pile operation state prediction system and method based on time series data analysis

    CN120338262A

  • Anomaly detection method and semiconductor device manufacturing method including the same

    US20250079211A1

Cited By

  • Root cause analysis method and system for edge gateway anomaly detection result

    CN120934987A

  • Method and device for measuring multiple physical quantities of passive multi-parameter optical fiber sensing unit

    CN121089825A

  • Wind turbine generator fault prediction method based on fault propagation path

    CN121479621A

  • Wind turbine fault prediction method based on fault propagation path

    CN121479621B

  • Abnormal behavior sample data generation method based on generative adversarial network

    CN121859003A