Complex working condition intelligent diagnosis method based on dynamic causal knowledge graph
By constructing a dynamic causal knowledge graph and using causal channels and time attention mechanisms, the problem of insufficient accuracy of traditional diagnostic models under complex operating conditions is solved, and higher diagnostic accuracy and adaptability are achieved.
Patent Information
- Application Number
- CN202510429136.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-04-08
AI Technical Summary
The prior art is difficult to maintain high diagnostic accuracy under complex and changing operating conditions, and traditional diagnostic models lack the flexibility to adapt to changes in operating conditions, resulting in misjudgment and misreporting faults.
A complex situation intelligent diagnosis method based on dynamic causal knowledge graph is adopted. By obtaining the timing data of the driver variables and system variables, a driver causal graph and a system causal graph are constructed, the causal intensity and stability weights are extracted, and input into the causal channel attention mechanism and causal time attention mechanism, a prediction model is generated and real-time diagnosis is performed.
It significantly improves diagnostic accuracy and generalization capabilities, can better adapt to changes in complex working conditions, reduce misjudgment and misreport, and provide interpretability for fault propagation paths.
Smart Images

Figure CN119939375A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of equipment status diagnosis, and specifically to an intelligent diagnosis method for complex working conditions based on a dynamic causal knowledge graph. Background Art
[0002] Diagnostic systems play a key role in monitoring equipment operating status, predicting faults, and providing alarms or maintenance suggestions. However, changes in equipment operating conditions have become an important factor affecting its performance and accuracy. In actual operation, the temperature, vibration, pressure and other parameters of the equipment will fluctuate significantly under different loads. In the prior art, most traditional diagnostic models are built based on fixed patterns and parameters, lacking the ability to flexibly adapt to changes in operating conditions. When the operating conditions change greatly, it is difficult for these models to accurately distinguish whether parameter fluctuations are normal operating response or signs of faults. For example, in wind power generation scenarios, large changes in wind speed can cause generator load fluctuations. Traditional diagnostic models may misjudge normal vibration increases as faults, or fail to promptly identify real faults that are masked by changes in operating conditions. This lack of ability to identify operating condition fluctuations greatly reduces the accuracy of diagnosis and cannot meet the needs of accurate fault judgment in actual applications. Under complex working conditions, it may even lead to incorrect maintenance suggestions or omission of key faults, bringing potential risks to equipment operation.
[0003] Therefore, the diagnostic system needs to have the ability to adjust and update the model in real time, or use advanced methods such as machine learning to automatically adapt to these changes. However, under existing technical conditions, real-time adjustment of models faces challenges in computing resources and algorithm complexity. Many systems find it difficult to achieve accurate model updates while ensuring real-time performance. Although machine learning methods have certain adaptive capabilities, their diagnostic effects will be seriously affected when data is insufficient or operating conditions change beyond the coverage of training data. For example, when the equipment enters a new operating mode, the machine learning model may not be able to make accurate judgments due to the lack of corresponding data training, resulting in diagnostic errors. It can be seen that traditional methods have obvious limitations in dealing with complex and changeable working conditions. They rely on historical data and fixed-mode diagnostic logic, and it is difficult to maintain high accuracy in dynamically changing working conditions.
[0004] This shows that more advanced technical means are urgently needed to overcome the dilemma of low diagnostic accuracy in existing technologies. Summary of the invention
[0005] In order to avoid and overcome the technical problems existing in the prior art, the present invention provides an intelligent diagnosis method for complex working conditions based on a dynamic causal knowledge graph, which can effectively improve the accuracy of diagnosis.
[0006] To achieve the above object, the present invention provides the following technical solutions: An intelligent diagnosis method for complex working conditions based on a dynamic causal knowledge graph includes the following diagnosis steps: S1. Obtain the time series data of driving variables and system variables, traverse all the time series data by sliding windows, and obtain the initial causal strength of the time series data in each window; S2, using the initial causal strength to construct a driving causal graph between driving variables and system variables in each window, as well as a system causal graph between system variables and system variables; S3, extracting the causal strength of different driving variables on each system variable from the driving causal graph, and obtaining the causal correction weights of different degrees of the driving variables on different system variables under the causal strength through inverse normalization, and then inputting the causal correction weights into the causal channel attention mechanism to obtain the corresponding channel attention correction weights; S4, extracting the causal stability weights between system variables from the system causal graph, and then inputting the causal stability weights into the causal temporal attention mechanism to obtain the corresponding temporal attention correction weights; S5, inputting the channel attention correction weight and the time attention correction weight into the diagnosis framework for training to obtain a prediction model; S6. Acquire real-time time series data, and input the real-time time series data into the prediction model to predict the corresponding system state.
[0007] As a further solution of the present invention: the specific steps of step S1 are as follows: S11, obtaining time series data of driving variables and system variables; S12, set the window size to , the sliding step length is , and slide in sequence; the time period corresponding to each window can be expressed as , It can indicate the start time of the current window; S13, based on the delay embedding theory, set the current lag time to , and combine the window to construct the time period within dimensional embedding vector: ; in, Indicates the time sub-variation; Indicates variables In time period within dimensional embedding vector; Representation variables In time period Time series data within Representation variables In time period Time series data within Representation variables In time period Time series data within S14. According to KNN Algorithm acquisition of k nearest neighbors, and form the following nearest neighbor set: ; In the formula, Indicates the time period within pass KNN The algorithm obtains k The nearest neighbor set consists of nearest neighbors; express pass KNN The first one obtained by the algorithm dimensional embedding vector; express pass KNN The second one obtained by the algorithm dimensional embedding vector; express pass KNN The algorithm obtains the k indivual dimensional embedding vector; S15. Projection to lag time After variables of dimensional embedding vector In , the projection process is as follows: ; In the formula, Indicates the time period within Project to dimensional embedding vector The set formed after that means in the time period within pass KNN The algorithm obtains k The nearest neighbor set consists of the nearest neighbors. Indicates the time period Neidi variables of dimensional embedding vector; express Project to back, pass KNN The first one obtained by the algorithm dimensional embedding vector; express Project to back, pass KNN The second one obtained by the algorithm dimensional embedding vector; express Project to back, pass KNN The algorithm obtains the k indivual dimensional embedding vector; S16, according to the current lag time Variables during the projection process Does the change in the variable Changes, build Model and Model; Model Assumptions Variables Changes in the variable will not cause changes, i.e. variables and variables There is no causal relationship between them; Model Assumptions Variables The change will cause the variable changes, i.e. variables and variables There is a causal relationship between them; S17, area under the binding curve ,definition The calculation results of the model are ,definition The calculation results of the model are , defined from the variable To variable The causal strength is ;in, express KNN The radius value of the algorithm; S18: Construct a lag time set and calculate the time intervals in each time period according to the contents of steps S13 to S17. From the variables at different lag times To variable The causal strength of each time period is obtained by selecting the maximum value. Internal variables To variable the maximum causal strength of ; In the formula, Indicates that from the variable To variable the maximum causal strength of Indicates the maximum value operation; Indicates the lag time When, from the variable To variable the causal strength of Indicates the lag time The maximum delay time When, from the variable To variable the causal strength of S19: Calculate each time period according to the contents of steps S13 to S18 The maximum causal strength between each driving variable and each system variable, as well as the maximum causal strength between each system variable, is used as the initial causal strength between each variable.
[0008] As a further solution of the present invention: the specific content of step S2 is as follows: S21. Using the initial causal strength between the driving variable and the system variable as the edge weight, construct the The driving cause-effect diagram between each driving variable and each system variable; S22. Use the initial causal strength between system variables as the edge weight to construct each time period That is, the system cause-and-effect diagram between each system variable in each window.
[0009] As a further solution of the present invention: the specific steps of step S3 are as follows: S31. Calculate each time period according to the driving cause and effect diagram The causal correction weights between each driving variable and each system variable; S32, use the current system variables in each time period The value at the start time of the period replaces all the values of the variable in the period, and then global average pooling is applied along the time dimension to average the system variables in the whole period. The results are shown as follows: ; In the formula, Indicates system variables In the Time period That is The value at the start time of the window; Represents the full cycle Medium time period The number of, that is, the number of windows; Indicates system variables The average pooling value of S33, based on the causal channel attention mechanism, uses the average pooling value and the score of the corresponding channel through the score function; the score function is expressed as follows: ; In the formula, represents the first channels; Represents the query vector No. elements; Represents the channel in the causal channel attention mechanism score; S34, calculating the channel weights of each channel in the causal channel attention mechanism; S35. Calculate the initial attention weights of each channel in each window in the causal channel attention mechanism in combination with the channel weights, and store them in the initial attention weight matrix; ; In the formula, Represents the channel in the causal channel attention mechanism The initial weight of Indicates the channel in the causal channel attention mechanism at the first window ; express The initial attention weight of Indicated in When the window is , the channel in the causal channel attention mechanism ; express The initial attention weight of Indicated in When the window is , the channel in the causal channel attention mechanism ; express The initial attention weight of S36, embedding the causal correction weight into the corresponding channel and aligning it with the time position to obtain the corrected channel attention correction weight of each channel in the causal channel attention mechanism, and storing the channel attention correction weight in the channel attention matrix; ; In the formula, Indicates all time periods That is, all windows in the driving variables and System variables The causal modification weights between are arranged in sequence to form a causal modification weight matrix; represents the Hadamard product; Indicates the driving variable in the first window and system variables The causal modification weight between them; Indicates that in the first window, Affected channels The channel attention correction weight of ; Indicates Window driven variables and system variables The causal modification weight between them; Indicated in When a window is Affected channels The channel attention correction weight of ; Indicates Window driven variables and system variables The causal modification weight between them; Indicated in When a window is Affected channels Channel attention correction weight.
[0010] As a further solution of the present invention: the calculation formula of the causal correction weight is expressed as follows: ; In the formula, Indicates the time period Neidi driving variables and System variables The causal modification weight between them; represents the total number of driving variables, ; represents the total number of all variables, ; Indicates the time period Inside and The initial causal weight between Represents a natural constant.
[0011] As a further solution of the present invention: the calculation formula of the channel weight is expressed as follows: ; In the formula, Represents the channel in the causal channel attention mechanism The initial weight of represents the normalized exponential function; Represents an exponential function with a natural constant as its base.
[0012] As a further solution of the present invention: the specific content of step S4 is as follows: S41, calculating the causal stability weights between various system variables in adjacent windows according to the system causal graph; S42. Based on the causal time attention mechanism, for the channel Apply a linear layer to the data in each window to generate the corresponding weight vector; S43. Use softmax The function normalizes each weight vector separately; ; In the formula, express pass softmax Normalized value after function processing; express The weight vector of S44. Embed the causal stability weight of each window into the causal time attention mechanism to obtain the time attention correction weight of each channel in each window ; Indicates The causal stability weight of the window.
[0013] As a further solution of the present invention: the calculation formula of the causal stability weight is expressed as follows: ; In the formula, Indicates time period The causal stability weights between the corresponding window and the system variables in the windows adjacent to the window; Indicates time period The corresponding window; Indicates time period The corresponding window.
[0014] As a further solution of the present invention: the calculation formula of the weight vector is expressed as follows: ; In the formula, and Both represent the initial attention weight The corresponding learnable parameters.
[0015] As a further solution of the present invention: the diagnosis framework adopts a multi-layer temporal causal network, and its training process is as follows: S41, inputting the channel attention correction weight and the time attention correction weight into the multi-layer temporal causal network to obtain corresponding channel causal features and temporal causal features; S42. Use channel causal features and temporal causal features to train a multi-layer temporal causal network, and obtain a prediction model that meets the prediction accuracy requirements.
[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention systematically solves the problem of diagnostic deviation under complex working conditions by traversing data through sliding windows, constructing dual causal graphs (driving causal graphs and system causal graphs), extracting dual causal parameters (correction weights and stability weights) and embedding a dual-channel attention mechanism. Its advantages are that it decouples the dynamic impact of working condition variables from the internal fluctuations of the system, combines the attention mechanism to correct feature extraction deviations in real time, significantly improves diagnostic accuracy and generalization ability, and provides explainability for fault propagation paths.
[0017] 2. Construct high-dimensional embedding vectors through delayed embedding theory, and combine KNN algorithm with AUC index to quantify causal relationship. Use delayed embedding of time series to capture dynamic evolution, and use nearest neighbor search and hypothesis testing ( Model) quantifies the strength of causal relationships, ensures the objectivity and verifiability of causal relationships, and provides a reliable data foundation for subsequent map construction.
[0018] 3. Based on the initial causal strength, the driving causal diagram and the system causal diagram are constructed to reflect the impact of the operating condition variables on the system variables and the interaction between the system variables. The driving causal diagram focuses on the impact of the operating condition disturbance on the diagnostic features, and the system causal diagram captures the internal stability of the system, providing structured knowledge representation for subsequent parameter extraction, and effectively separating the contribution of different factors to the diagnostic results.
[0019] 4. Obtain causal correction weights through inverse normalization and integrate them into the channel attention mechanism. Its advantage lies in the dynamic weight adjustment strategy: exponential decay normalization based on causal strength, suppressing channels that are greatly affected by working conditions, highlighting stable features, solving the problem that traditional fixed weights cannot adapt to changes in working conditions, and enhancing the model's robustness to interference.
[0020] 5. Index normalization is performed based on the maximum causal strength, which can clearly show the weight calculation method. The greater the maximum causal strength, the stronger the impact of the working condition on the channel. Reverse weighting is achieved through the index, which meets the diagnostic requirements of "suppressing strong interference channels" and ensures the rationality and explainability of the modified weights.
[0021] 6. Dynamically adjust channel weights through learnable parameters to highlight features with high fault correlation, avoid the subjectivity of manual feature selection, and improve feature utilization efficiency.
[0022] 7. The system fluctuations are quantified by the structural difference (SHD) of the causal graph of adjacent windows, combined with the time weight adjustment, so that the model pays more attention to the moment of sudden change of system state and enhances the ability to capture dynamic faults. SHD directly reflects the structural changes of causal relationships, and is normalized by dividing by the maximum possible number of edges to ensure the comparability and numerical stability of stability weights.
[0023] 8. Use a multi-layer temporal causal network (TCN) as a diagnostic framework, combined with channel and time series feature fusion. Its advantage lies in the collaborative modeling of spatiotemporal features: TCN's dilated convolution captures long-distance dependencies, residual connections support deep network training, and dual-channel feature fusion integrates channel information and time trends after working condition correction, improving the ability to identify complex fault modes and ensuring the efficiency and accuracy of the diagnostic model. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a diagnostic flow chart of the present invention.
[0025] Figure 2 In the manifold space, Project to Process diagram.
[0026] Figure 3 This is a diagram of the process of obtaining causal parameters in the present invention.
[0027] Figure 4 It is the dynamic causal knowledge graph in the present invention.
[0028] Figure 5 This is a comparison chart of the diagnostic accuracy of each diagnostic framework in the present invention. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0030] See also Figure 1~Figure 5 , the diagnostic method of the present invention includes the following contents.
[0031] 1. Calculating Initial Causal Strength Get the time series data of the driving variables and system variables. The data set of the time series variables is defined as ,Depend on continuous time series variables. Each variable is represented as a time length of Time Series ,in, Representation variables At time step The causal structure is shown in the figure It indicates that, It includes synchronous lag (lag time is 0) and sequential lag (lag time from 1 to )relation.
[0032] The present invention takes the rolling bearing fault diagnosis system as an example, and uses multiple different types of sensors to collect data on the faulty bearing during the experiment. The types of sensors include: three-axis vibration acceleration sensor (X-axis direction, Y-axis direction, Z bearing direction), vibration velocity sensor, vibration displacement sensor, pressure sensor, temperature sensor, speed sensor, torque sensor, etc. The time series data, drive variables and system variables in the rolling bearing fault diagnosis system are as follows: Driving variable: In the rolling bearing fault diagnosis system, the driving variable refers to the variable that reflects the change of the working condition itself, such as the collected speed signal ( ) and torque signal ( ) and pressure signal ( ) etc. They can represent the changes in working conditions and can also be presented by sensors in the form of time series data of voltage values.
[0033] System variables: In the rolling bearing fault diagnosis system, system variables refer to common sensor vibration signals that can reflect the fault response characteristics of different bearing faults, including three-dimensional vibration acceleration time series data ( ), and the vibration speed ( ) and vibration displacement ( ), etc. These system variable time series data often have the ability to characterize different faults.
[0034] Time series data: includes time series data of different sensors collecting voltage values at the same time and at the same sampling frequency. They are recorded as: (X-axis vibration acceleration), (Y-axis vibration acceleration), (Vibration acceleration in the Z-axis direction), (vibration speed), (Vibration displacement), (pressure), (temperature), (speed), (torque), etc.
[0035] In view of the indivisible nature of fault dynamic systems, the present invention uses the CMC algorithm to infer causal relationships. The sliding window method is used to estimate the causal strength between different windows, and the maximum causal strength is determined by testing at different lag times. The window size is set to , the sliding step length is In the present invention and are equal and slide in sequence. The time period corresponding to each window can be expressed as , It indicates the start time of the current window. A total of H windows, that is, a total of H Time period .
[0036] According to the delay embedding theory, the current lag time is set to , for time series data , which can be embedded in the delayed space C Build in as follows: ; In the delayed embedding space, let the embedding dimension be , the time delay interval is , construct a time series express dimensional embedding vector. Among them, Indicates the time sub-variation; Indicates variables In time period within dimensional embedding vector; Representation variables In time period Time series data within Representation variables In time period Time series data within Representation variables In time period Time series data within.
[0037] Using the constructed time series and Form corresponding manifold spaces respectively and For any point , can be KNN The algorithm finds its The set of nearest neighbors is defined as follows: ; in, Indicates the time period within pass KNN The algorithm obtains k The nearest neighbor set consists of nearest neighbors; express pass KNN The first one obtained by the algorithm dimensional embedding vector; express pass KNN The second one obtained by the algorithm dimensional embedding vector; express pass KNN The algorithm obtains the k indivual dimensional embedding vector. express Project to back, pass KNN The first one obtained by the algorithm dimensional embedding vector; express Project to back, pass KNN The second one obtained by the algorithm dimensional embedding vector; express Project to back, pass KNN The algorithm obtains the k indivual dimensional embedding vector.
[0038] Project to The process can be expressed as: ; According to the dynamic causal framework, arrive The causal strength of Model and The distance between model indices is defined using the area under the curve ( ) to evaluate the model performance, and its causal model is described as follows: Based on the current lag time Variables during the projection process Does the change in the variable Changes, build Model and Model; Model Assumptions Variables Changes in the variable will not cause changes, i.e. variables and variables There is no causal relationship between them; Model Assumptions Variables The change will cause the variable changes, i.e. variables and variables There is a causal relationship between them.
[0039] Area under the binding curve ,definition The calculation results of the model are ,definition The calculation results of the model are , defined from the variable To variable The causal strength is ;in, express KNN The radius value of the algorithm.
[0040] variable At different lag times The maximum causal strength It is expressed as: ; In the formula, Indicates that from the variable To variable the maximum causal strength of Indicates the maximum value operation; Indicates the lag time When, from the variable To variable the causal strength of Indicates the lag time The maximum delay time When, from the variable To variable causal strength.
[0041] According to the above content, the maximum causal strength between each driving variable and each system variable in each time period, as well as the maximum causal strength between each system variable are calculated, and the maximum causal strength is used as the initial causal strength between each variable.
[0042] After obtaining the initial causal strength, the knowledge graph can be further constructed. The present invention constructs multiple knowledge graphs based on different fault types, with sensor categories as nodes and causal relationships as edges. Each fault type is represented by a unique graph pattern. By quantifying the impact of operating condition variables (such as speed, torque, and load) on different sensor signals, we can gain a deep understanding of the fault characteristics of different fault types under different operating conditions.
[0043] 2. Building a Knowledge Graph In order to further study the interaction between variables in the dynamic causal knowledge graph, the present invention divides the variables into two groups: and ,in, Contains driver variables, Contains system variables. Based on these two types of variables, causal knowledge graphs are divided into two types: dominant causal graphs (i.e., driver causal diagram) and system causal diagram . Include and , capturing the dynamic impact of driving variables on system variables through continuous dynamic causal modeling; Contains only , modeling the dynamic causal relationships between system variables to capture the overall fluctuations of the causal system. Ultimately, by building a causally complete knowledge graph, the model can be provided with causal interpretability through the dynamic causal state changes between variables.
[0044] 3. Obtaining Causal Parameters In diagnostic scenarios with complex operating conditions, model performance is often significantly limited. Further analysis of the dynamic causal knowledge graph reveals two key causal parameters: dominant causal strength and the system causal mutation index These two parameters help quantify the impact of fault states and changes in operating conditions on the fault dynamic system. By incorporating these dynamic effects into the model, causal corrections can be made to reduce diagnostic bias caused by changes in operating conditions. The process of obtaining these two causal parameters is as follows: Figure 3 shown.
[0045] like Figure 3 As shown in the figure, there are three consecutive fixed-length time slices in the dynamic causal knowledge graph. The blue causal edges and the variables they connect form , the green causal edges and the variables they connect form . Calculate within the time window and The causal strength between them, and the maximum causal strength is taken as .
[0046] Causal Parameters The acquisition process is as follows: Figure 3 In It consists of two driving variables and three system variables. In the corresponding window, the driver variable The impact on each system variable is , and 0. Therefore, within this window, The influence on these system variables is different. When using operating condition variables (such as speed, torque, load, etc.) as driving variables, a larger weight should be given to the system variables that are less affected by them in order to correct the influence of the driving variables. , for system variables , the causal correction weight in the current window is defined as: ; In the formula, Indicates the time period Neidi driving variables and System variables The causal modification weight between them; Indicates In the window, the driver variable and system variables The causal correction weight between them. represents the total number of driving variables, ; represents the total number of all variables, ; Indicates the time period Inside and The initial causal weight between Represents a natural constant.
[0047] Use the current system variables in each time period The value at the start time of the window replaces all the values of the variable in the time period, that is, all time points in the same window are given the same causal correction weight. The final causal parameter Throughout the cycle The inner representation is: ;
[0048] The index set Defined as: ; in, Indicates that in the first window, the driving variable and system variables The causal correction weight between them. Indicates that in the second window, the driving variable and system variables The causal correction weight between them. Indicates In the window, the driver variable and system variables The causal correction weight between them. Indicates that in the first window, the driving variable and system variables The causal correction weight between them. Indicates that in the second window, the driving variable and system variables The causal correction weight between them. Indicates In the window, the driver variable and system variables The causal correction weight between them. Indicates that in the first window, the driving variable and system variables The causal correction weight between them. Indicates that in the second window, the driving variable and system variables The causal correction weight between them. Indicates In the window, the driver variable and system variables The causal correction weight between them.
[0049] Another causal parameter The acquisition process is as follows. Figure 3 In Contains three system variables .in By calculating the current window The Structural Hamming Distance (SHD) between the previous window or the next window is used to obtain the causal stability between the previous window and the next window. This embodiment uses the SHD between the next window. This distance measures the causal state transition within each window and quantifies the causal stability weight between consecutive time windows: ; in, Represents the maximum possible change of the edge in the system causal graph and is used to normalize the SHD. This normalization ensures a stable range of the variation index and enhances the stability of subsequent calculations. All time points within the same window share the same variation index.
[0050] The dynamic causal knowledge graph constructed by merging the dominant causal graph and the system causal graph is as follows: Figure 4 The causal parameters of the dynamically changing system causal graph are output as shown in Figure 2. In the dominant causal graph, the same windows are aggregated. The same dominant causal graph windows are aggregated to simplify the calculation. Finally, the causal parameters are obtained based on the dynamically changing dominant causal graph. .
[0051] 4. Dual Causal Attention Correction Module In order to cope with the impact of fault mechanism and working condition changes on the diagnosis process, the present invention adopts a parallel method. and They are embedded in the causal channel attention mechanism and the causal temporal attention mechanism respectively. The attention weights are adjusted to take into account the influence of multi-source data and the fault feature extraction deviation caused by changes in working conditions, thereby obtaining the ability to obtain stable spatiotemporal causal features and improving the interpretability of the causal correction model.
[0052] The causal channel attention mechanism focuses on the time series fault data from different channels and extracts a set of system variables from them. , which is then input into the diagnostic model. In order to capture the representative features of each channel, global average pooling is applied along the time dimension, resulting in: ; In the formula, Indicates system variables In the Time period That is The value at the start time of the window; Represents the full cycle Medium time period The number of, that is, the number of windows; Indicates system variables The average pooling value of .
[0053] Then calculate the score function: ; In the formula, represents the first channels; Represents the query vector No. elements; Represents the channel in the causal channel attention mechanism score. As a scaling factor for numerical stability. To model the relative importance of each channel, an attention mechanism is applied. Each channel The initial weight Calculated by the following formula: ; In the formula, Represents the channel in the causal channel attention mechanism The initial weight of represents the normalized exponential function; Represents an exponential function with a natural constant as its base.
[0054] Furthermore, the initial attention weight of each channel can be expressed as: ; Finally, the causal parameters are embedded into the corresponding channels and aligned with the time position. The weight parameter is defined as ,Depend on Affected channels The channel attention can be expressed as: ; In the formula, Indicates all time periods That is, all windows in the driving variables and System variables The causal modification weights between are arranged in sequence to form a causal modification weight matrix; represents the Hadamard product; Indicates the driving variable in the first window and system variables The causal modification weight between them; Indicates that in the first window, Affected channels The channel attention correction weight of ; Indicates Window driven variables and system variables The causal modification weight between them; Indicated in When a window is Affected channels The channel attention correction weight of ; Indicates Window driven variables and system variables The causal modification weight between them; Indicated in When a window is Affected channels Channel attention correction weight.
[0055] The core of the causal temporal attention mechanism is to evaluate the importance of each time point in each channel. Time series data, apply a simple linear layer to generate the weight vector , to reflect the importance of each time point.
[0056] ; In the formula, and Both represent the initial attention weight The corresponding learnable parameters.
[0057] Then, use softmax Function on weight vector Normalize it and get the vector : ; In the formula, express pass softmax Normalized value after function processing; express The weight vector of .
[0058] Similarly, is embedded into the temporal attention mechanism to adjust the weight bias. It is worth noting that different time series channels share the same causal parameters . System variables The modified result of the causal time attention mechanism can be expressed as .
[0059] 5. Network Architecture In the dual-path structure, the channel attention correction weight and the time attention correction weight are first input into the multi-layer temporal causal network to extract the temporal causal features and channel causal features. Then, the features of the two paths are fused to obtain richer spatiotemporal causal features, which are finally input into the fully connected layer for fault classification. The multi-layer temporal causal network is used as the backbone network to learn and fuse local fault features, thereby constructing global features that reflect the process state. After being processed by the multi-layer temporal causal network, the features from the two paths are represented as channel causal features. and temporal causal characteristics Next, the output features of different paths are concatenated to form new spatiotemporal causal features. The concatenation definition is as follows: ;
[0060] in, Indicates iinput feature vector, Represents the elements of the first concatenated vector; Represents the elements of the second concatenated vector; Indicates The elements of the concatenated vector. represents the spatiotemporal causal characteristics formed after splicing. Here, represents the number of concatenated vectors, is a concatenation function that concatenates vectors along a defined dimension, in which only and When entering features, It can be expressed as .
[0061] The training loss function of the diagnostic framework consists of the cross entropy loss and the non-stationary data reconstruction loss. The final loss function is defined as follows: ; in, N is the total number of samples, M is the number of categories. and Respectively represent samples i Belongs to category j The true and predicted probabilities.
[0062] 6. Test data In the rolling bearing fault diagnosis system, in order to verify the diagnostic performance of the proposed diagnostic framework, it is compared with five other diagnostic frameworks, including multi-convolutional neural network-long short-term memory network (MCNN-LSTM), adaptive multi-attention one-dimensional convolutional neural network (MA1DCNN), multi-domain pattern synthesis (MDPS), quantum-inspired convolutional neural network (QCNN) and wide-deep convolutional neural network (WDCNN). Among them, MA1DCNN, MDPS, QCNN and WDCNN are single-signal fault diagnosis architectures, while MCNN-LSTM uses multi-signal input. To ensure fairness, single-channel input is generated by uniformly sampling multiple sensor data and fusing them. All frameworks are tested on the C1, C2, C3, C4 and C5 datasets of rolling bearing fault diagnosis, and the experiment is repeated 10 times under the same conditions to take the average value. During training, the initial learning rate is set to 0.006, the batch size is 64, and 100 rounds of training are performed. The same data preprocessing method is used for all models.
[0063] The proposed method achieves 100% accuracy on the C1 dataset and performs well on C2 (99.33%) and C5 (96.64%), showing excellent diagnostic capabilities. In contrast, the accuracy of MCNN-LSTM and MDPS on the C5 dataset drops significantly, while the proposed method outperforms all other methods by 23.11%.
[0064] The present invention improves the interpretability of the model by performing dynamic causal modeling on multi-source time series data and constructing a dynamic causal knowledge graph. Two causal parameters are extracted from the graph. and , and embed it into the diagnostic framework to correct the diagnostic deviation caused by the change of working conditions, and capture the spatiotemporal causal characteristics, thereby improving the diagnostic accuracy and generalization ability. Experimental results show that the diagnostic framework is superior to the existing methods in terms of diagnostic accuracy and generalization ability, and provides an important reference for the optimization of diagnosis under actual complex working conditions.
[0065] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. An intelligent diagnosis method for complex working conditions based on dynamic causal knowledge graph, characterized in that: The diagnostic steps include: S1. Obtain the time series data of driving variables and system variables, traverse all the time series data by sliding windows, and obtain the initial causal strength of the time series data in each window; S2, using the initial causal strength to construct a driving causal graph between driving variables and system variables in each window, as well as a system causal graph between system variables and system variables; S3, extracting the causal strength of different driving variables on each system variable from the driving causal graph, and obtaining the causal correction weights of different degrees of the driving variables on different system variables under the causal strength through inverse normalization, and then inputting the causal correction weights into the causal channel attention mechanism to obtain the corresponding channel attention correction weights; S4, extracting the causal stability weights between system variables from the system causal graph, and then inputting the causal stability weights into the causal temporal attention mechanism to obtain the corresponding temporal attention correction weights; S5, inputting the channel attention correction weight and the time attention correction weight into the diagnosis framework for training to obtain a prediction model; S6. Acquire real-time time series data, and input the real-time time series data into the prediction model to predict the corresponding system state.
2. According to claim 1, a complex working condition intelligent diagnosis method based on dynamic causal knowledge graph is characterized in that: The specific steps of step S1 are as follows: S11, obtaining time series data of driving variables and system variables; S12, set the window size to , the sliding step length is , and slide in sequence; S13, based on the delay embedding theory, set the current lag time to , and combined with the window construction dimensional embedding vector: ; in, Indicates the start time of the current window; Indicates the time sub-variation; Indicates variables In time period within dimensional embedding vector; , and Respectively In time period , and Time series data within S14. According to KNN Algorithm acquisition of k nearest neighbors, and form the following nearest neighbor set: ; In the formula, Indicates the time period within pass KNN The algorithm obtains k The nearest neighbor set consists of nearest neighbors; , and Respectively pass KNN The 1st, 2nd and k indivual dimensional embedding vector S15. Projection to lag time After variables of dimensional embedding vector In , the projection process is as follows: ; In the formula, Indicates the time period within pass KNN The algorithm obtains k The nearest neighbor set consists of nearest neighbors; , and Respectively Project to back, pass KNN The 1st, 2nd and k indivual dimensional embedding vector; S16, according to the current lag time During the projection Does the change cause Changes, build Model and Model; Model Assumptions The changes will not cause changes, that is and There is no causal relationship between them; Model Assumptions The changes will cause changes, that is and There is a causal relationship between them; S17, area under the binding curve ,definition The calculation results of the model are ,definition The calculation results of the model are , defined from arrive The causal strength is ;in, express KNN The radius value of the algorithm; S18: Construct a lag time set and calculate the time intervals in each time period according to the contents of steps S13 to S17. Under different lag times arrive The causal strength of each time period is obtained by selecting the maximum value. Internal arrive the maximum causal strength of ; In the formula, Indicates from arrive the maximum causal strength of Indicates the maximum value operation; and Respectively represent the lag time 0 and the maximum value When, from arrive the causal strength of S19: Calculate each time period according to the contents of steps S13 to S18 The maximum causal strength between each driving variable and each system variable, as well as the maximum causal strength between each system variable, is used as the initial causal strength between each variable.
3. According to claim 2, a complex working condition intelligent diagnosis method based on dynamic causal knowledge graph is characterized in that: The specific content of step S2 is as follows: S21. Using the initial causal strength between the driving variable and the system variable as the edge weight, construct the The driving cause-effect diagram between each driving variable and each system variable; S22. Use the initial causal strength between system variables as the edge weight to construct each time period A system cause-and-effect diagram between various system variables within the system.
4. According to claim 3, a complex working condition intelligent diagnosis method based on dynamic causal knowledge graph is characterized in that: The specific steps of step S3 are as follows: S31. Calculate each time period according to the driving cause and effect diagram The causal correction weights between each driving variable and each system variable; S32, use the current system variables in each time period The value at the start time of the period replaces all the values of the variable in the period, and then global average pooling is applied along the time dimension to average the system variables in the whole period. The results are shown as follows: ; In the formula, Indicates System variables In the Time period That is The value at the start time of the window; Represents the full cycle Medium time period The number of, that is, the number of windows; Indicates system variables The average pooling value of S33, based on the causal channel attention mechanism, uses the average pooling value and the score of the corresponding channel through the score function; the score function is expressed as follows: ; In the formula, represents the first channels; Represents the query vector No. elements; Represents the channel in the causal channel attention mechanism score; S34, calculating the channel weights of each channel in the causal channel attention mechanism; S35. Calculate the initial attention weights of each channel in each window in the causal channel attention mechanism in combination with the channel weights, and store them in the initial attention weight matrix; ; In the formula, Represents the channel in the causal channel attention mechanism The initial weight of , and Respectively indicated in the 1st, and When the window is , the channel in the causal channel attention mechanism ; , and Respectively , and The initial attention weight of S36, embedding the causal correction weight into the corresponding channel and aligning it with the time position to obtain the corrected channel attention correction weight of each channel in the causal channel attention mechanism, and storing the channel attention correction weight in the channel attention matrix; ; In the formula, Indicates that all windows and driving variables The causal modification weights between are arranged in sequence to form a causal modification weight matrix; represents the Hadamard product; , and Respectively represent the 1st, and In the window and The causal modification weight between them; , and Respectively indicated in the 1st, and When a window is Influence The channel attention correction weight of .
5. The complex working condition intelligent diagnosis method based on dynamic causal knowledge graph according to claim 4 is characterized in that: The calculation formula of causal modification weight is as follows: ; In the formula, Indicates the time period Inside and The causal modification weight between them; represents the total number of driving variables, ; represents the total number of all variables, ; Indicates the time period Inside and The initial causal weight between Represents a natural constant.
6. The complex working condition intelligent diagnosis method based on dynamic causal knowledge graph according to claim 5 is characterized in that: The calculation formula of channel weight is as follows: ; In the formula, Represents the causal channel attention mechanism The initial weight of represents the normalized exponential function; Represents an exponential function with a natural constant as its base.
7. The complex working condition intelligent diagnosis method based on dynamic causal knowledge graph according to claim 6 is characterized in that: The specific content of step S4 is as follows: S41, calculating the causal stability weights between various system variables in adjacent windows according to the system causal graph; S42. Based on the causal time attention mechanism, for Apply a linear layer to the data in each window to generate the corresponding weight vector; S43. Use softmax The function normalizes each weight vector separately; ; In the formula, express pass softmax Normalized value after function processing; express The weight vector of S44. Embed the causal stability weight of each window into the causal time attention mechanism to obtain the time attention correction weight of each channel in each window ; Indicates The causal stability weight of the window.
8. The complex working condition intelligent diagnosis method based on dynamic causal knowledge graph according to claim 7 is characterized in that: The calculation formula of causal stability weight is as follows: ; In the formula, Indicates time period The causal stability weights between the corresponding window and the system variables in the windows adjacent to the window; Indicates time period The corresponding window; Indicates time period The corresponding window.
9. The complex working condition intelligent diagnosis method based on dynamic causal knowledge graph according to claim 8 is characterized in that: The calculation formula of the weight vector is as follows: ; In the formula, and Both represent the initial attention weight The corresponding learnable parameters.
10. The complex working condition intelligent diagnosis method based on dynamic causal knowledge graph according to claim 9 is characterized in that: The diagnostic framework uses a multi-layer temporal causal network, and its training process is as follows: S41, inputting the channel attention correction weight and the time attention correction weight into the multi-layer temporal causal network to obtain corresponding channel causal features and temporal causal features; S42. Use channel causal features and temporal causal features to train a multi-layer temporal causal network, and obtain a prediction model that meets the prediction accuracy requirements.
Citation Information
Patent Citations
Rolling bearing fault diagnosis method fusing attention mechanism and twin network structure
CN113191215A
Power grid data intelligent restoration method and system based on graph attention network
CN117992740A
Petrochemical production process anomaly diagnosis and optimization method and system integrated with knowledge graph
CN119668245A
Control Method of Sealing Device Of Caulking Material Cartridge
KR102488204B1
Trigger point detection for online root cause analysis and system fault diagnosis
US20240054043A1
Cited By
Intelligent energy consumption distribution method for multi-source energy system
CN120542882A
Multi-element data analysis and job discrimination method and system
CN120950913A