Causal-driven credible cross-component mechanical fault diagnosis method and system

By using a causal-driven, reliable cross-component mechanical fault diagnosis model, combining causal theory and few-shot learning, and extracting instrumental variables, confounding factors, and adjustment variables, the problem of insufficient interpretability and generalization ability of few-shot learning methods in cross-component diagnosis is solved, achieving high-precision and efficient cross-component fault diagnosis.

CN121278352APending Publication Date: 2026-01-06江淮前沿技术协同创新中心 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511395719.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

Existing few-shot learning methods lack interpretability and generalization ability in mechanical fault diagnosis, especially when performing poorly in cross-component diagnosis tasks. Furthermore, the stability of causal feature estimation depends on a large number of samples, limiting its applicability in cross-component scenarios.

Method used

By combining causal theory and few-sample learning, a causal-driven, reliable cross-component mechanical fault diagnosis model is constructed. Instrumental variables, confounding factors, and adjustment variables are extracted, and multi-relationship metrics and loss functions are used for optimization. Features are decomposed and causal relationships are captured, thereby improving the interpretability of the model and the accuracy of cross-component diagnosis.

Benefits of technology

It significantly improves the accuracy and generalization ability of cross-component fault diagnosis under small sample conditions, enhances the interpretability and diagnostic efficiency of the model, and adapts quickly to new target component tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121278352A_ABST
    Figure CN121278352A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of machine learning and fault diagnosis, in particular to a causal-driven credible cross-component mechanical fault diagnosis method and system. According to the method, a causal structure model composed of a feature extraction module and a relation measurement module is constructed under a meta-learning framework to guide a causal decomposition module to mine an internal causal mechanism of vibration signal and fault category mapping, and relation measurement function prediction and fault category prediction are improved by using multi-task collaborative optimization. Therefore, the model can quickly adapt to a new target component task, the overall diagnosis efficiency is improved, and the classification accuracy and robustness are excellent. The problem that the application range of combination of small sample learning and a causal theory is small or a causal path is easy to omit in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical fields of machine learning and fault diagnosis, and in particular to a causal-driven, reliable cross-component mechanical fault diagnosis method and system. Background Technology

[0002] In industrial applications, mechanical fault diagnosis is of significant practical value in ensuring equipment stability and personnel safety. Due to the diversity of industrial equipment components (such as bearings, gears, and motors), the distribution of sample data varies considerably, failing to satisfy the independent and identically distributed assumption. Therefore, few-shot learning (FSL) has received widespread attention in mechanical fault diagnosis.

[0003] Existing few-shot learning methods only focus on the correlation between sample input data and fault categories rather than extracting causal representations from the input data based on the causal relationship with the fault categories. This not only makes the model's prediction process lack interpretability, but also makes the model unable to remove features that are relevant to the task but have no causal relationship. When faced with cross-component few-shot diagnostic tasks, they often perform poorly.

[0004] Causal theory, by revealing the causal mechanisms between variables rather than superficial correlations, provides an effective approach to addressing the problems of insufficient model interpretability and limited generalization ability. Methods based on causal features can effectively isolate noise interference and directly model the essential characteristics of faults. CIS2N, proposed by Chang et al., decomposes causal and non-causal feature sets through sample intervention and optimizes the distance between feature pairs sharing the same causal features to achieve shift sparsity. However, this method has two main limitations: 1) it requires a large number of samples to ensure the stability of causal feature estimation; 2) its strong assumption (i.e., the causal features of faults are completely independent of domain-related factors) may not hold in cross-component tasks because domain factors such as components may be coupled with the causal features of faults. Therefore, the applicability of this causal structure model, CIS2N, is limited in small-sample cross-component scenarios.

[0005] To address these issues, researchers have combined causal theory with few-shot learning, enabling models to extract causal features relevant to the nature of faults from observational data. This breaks away from the traditional inference paradigm that relies solely on variable correlations, reducing the model's dependence on component-specific features and enhancing its generalization ability across components. Based on this, the CIRNet model combines causal theory and few-shot learning, using meta-training knowledge learned in meta-learning methods as the primary confounding factor. It eliminates this confounding factor through hierarchical feature decomposition and backdoor adjustment. However, this method only considers confounding factors from meta-training; its causal network does not integrate other variables such as instrumental and adjustment variables, leading to the omission of some causal paths. Summary of the Invention

[0006] To overcome the limitations of existing technologies that combine small-sample learning with causal theory, such as limited applicability or the tendency to miss causal paths, this invention proposes a causal-driven, reliable cross-component mechanical fault diagnosis model. This model can fully capture the causal relationships between components, improving the interpretability of the model and the accuracy of cross-component fault diagnosis.

[0007] This invention proposes a causal-driven, reliable cross-component mechanical fault diagnosis method. First, a query set and labeled sample set are constructed on the source component to train a fault diagnosis model. The fault diagnosis model extracts instrumental variables, confounding factors, and adjustment variables from the input data. The instrumental variables are analyzed using a correlation measurement function, and the confounding factors influence the correlation measurement function and fault category. The adjustment variables also influence the fault category.

[0008] Extract the confounding factors and adjustment variables of each data sample in the labeled sample set, calculate the mean of each, and then concatenate them to form the category feature of the fault category in the labeled sample set; concatenate the confounding factors and adjustment variables of the input data as features;

[0009] The fault diagnosis model determines the relation measurement method based on the instrumental variables of the input data, then calculates the relation scores between the features of the input data and the features of each category in the labeled sample set, and outputs the category corresponding to the maximum relation score as the model's predicted label for the input sample;

[0010] Then, a labeled sample set is constructed on the target component to be diagnosed; the fault diagnosis model is then combined with the labeled sample set of the target component to predict the fault category of the signal to be diagnosed in the target component.

[0011] Preferably, the fault diagnosis model includes a feature extraction module, a metric function prediction module, and a relation measurement module; the relation measurement module has multiple relation measurement functions; the feature extraction module is used to extract instrumental variables, confounding factors, and adjustment variables from the input data; the metric function prediction module selects a target relation measurement function based on the instrumental variables; the relation measurement module uses the target relation measurement function to calculate the correlation scores between the features of the input data and the features of each category in the labeled sample set.

[0012] Preferably, the loss function during the training process of the fault diagnosis model is:

[0013] L = L R +α·L A +β·L I +μ·L O +γ·L C_B +∈·L C

[0014] Among them, L A and L I L is used to guide the decomposition of adjustment variables and instrumental variables, respectively. C_BThe balancing loss used to balance the influence of confounding factors on the classification results; L O Orthogonal constraint loss for instrumental variables, confounding factors, and adjustment variables; L R The loss function used to guide the predicted labels toward the true labels; L C is the contrastive loss used to constrain intra-class and inter-class distances; α, β, μ, γ, ∈ are hyperparameters representing the weights of the corresponding loss functions.

[0015] Preferred:

[0016]

[0017] Where M is the set minimum distance; c is the number of fault categories in the labeled sample set; K is the number of training samples in a single round; and V is a binary number, if the training sample x j If the true label is fault category i in the labeled sample set, then V = 1; otherwise, V = 0. i To label the category features obtained by concatenating the confounding factor mean and the adjustment variable mean for fault category i in the sample set, p j For training sample x j The sample features are obtained by splicing together confounding factors and adjustment variables.

[0018] Preferred:

[0019]

[0020] Where i is the fault category number in the labeled sample set, and r i,j For training sample x j The score relating to fault category i in the labeled sample set; For training sample x j Fault category y in the labeled sample set j Relationship score, y j For x j The real label is y j .

[0021] Preferably, L A This refers to the sum of the distances between adjustment variables and the distances between predicted and true labels when choosing different relational measurement functions; L C_B The distance between confounding factors when choosing different relation measurement functions after balancing through an attention mechanism; L I The mutual information representation between instrumental variables and real labels corresponding to different relational measurement functions is used.

[0022] Preferably, the feature extraction module includes an adjustment variable representation network, a confounding factor representation network, and an instrumental variable representation network, all of which have the same structure;

[0023]

[0024] The superscript T indicates transpose; and These represent the average weights of the data samples on each dimension of the instrumental variable representation network, each dimension of the confounding factor representation network, and each dimension of the adjusted variable representation network, respectively.

[0025] Preferably, the adjusted variable representation network includes: a first convolutional unit, a second convolutional unit, a third convolutional unit, a fourth convolutional unit, and an adaptive max pooling layer connected in sequence; the first and second convolutional units have the same structure, including a convolutional layer, a batch normalization layer, an activation layer, and a max pooling layer connected in sequence; the thirteenth and fourth convolutional units have the same structure, including a convolutional layer, a batch normalization layer, and an activation layer connected in sequence.

[0026] Preferably, the fault category diagnosis stage for the target component includes the following steps:

[0027] Step 1: Obtain vibration signal samples of the target component to be diagnosed and manually label the fault categories to form a labeled sample set of known fault categories; extract the sample features of each vibration signal sample in the labeled sample set through the feature extraction module of the fault diagnosis model, and calculate the average sample features of each fault category in the labeled sample set.

[0028] St2, collect vibration signal samples of the target component to be diagnosed as the sample to be diagnosed, x;

[0029] St3, the feature extraction module collects the instrumental variable I(x), confounding factor C(x), and adjustment variable A(x) of the sample to be diagnosed x; the measurement function prediction module calculates the score of each relation measurement function based on the instrumental variable I(x), and selects the relation measurement function with the highest score as the target relation measurement function T;

[0030] St4, the relation measurement module uses the target relation measurement function T to calculate the relation score between the sample features (C(x), A(x)) of the sample to be diagnosed x and the sample splicing features of each fault category in the labeled sample set, and takes the fault category with the highest relation score as the model prediction label.

[0031] The present invention proposes a causal-driven reliable cross-component mechanical fault diagnosis system, comprising a memory and a processor. The memory stores a computer program, and the processor is connected to the memory. The processor is used to execute the computer program to realize the causal-driven reliable cross-component mechanical fault diagnosis method.

[0032] The advantages of this invention are:

[0033] (1) In this invention, the feature extraction module and the relation measurement module constitute a causal disentanglement network (CDRN). Within this framework, the feature extraction module extracts the instrumental variable I, confounding factor C, and adjustment variable A across components to improve the interpretability of the model and the accuracy of cross-component fault diagnosis. Unlike traditional fault diagnosis methods, this invention constructs a feature extraction module to perform causal decomposition. By extracting and decomposing the representations of different parts of the vibration signal, it captures the causal relationships existing across components, thereby effectively solving the problem of scarce sample size in the target domain. This invention explores the application of few-shot learning (FSL) in cross-component mechanical fault diagnosis (MFD) from the perspective of causal relationships.

[0034] (2) Under the meta-task learning framework, this invention assumes that the causal relationship between features and fault categories does not change across components, and that these features should have a certain degree of independence in the causal structure. Based on the above assumptions, this invention combines the idea of ​​causal decomposition and designs a loss function that jointly optimizes the fault diagnosis task and the relationship measurement function selection task, strengthens the decoupling of causal features across components, and thus improves the generalization ability of the model.

[0035] (3) When dealing with cross-component fault diagnosis, the present invention has significant advantages over other existing methods, especially in low sample size environments, it can better capture causal relationships and improve prediction accuracy.

[0036] (4) Under the framework of meta-learning, this invention constructs a causal structure model consisting of a feature extraction module and a relation measurement module to guide the causal decomposition module to explore the intrinsic causal mechanism of the mapping between vibration signal and fault category. Multi-task collaborative optimization is used to improve the prediction of relation measurement function and fault category, thereby enabling the model to quickly adapt to new target component tasks, improve the overall diagnostic efficiency, and perform well in terms of classification accuracy and robustness. Attached Figure Description

[0037] Figure 1 This is a structural diagram of the causal-driven reliable cross-component mechanical fault diagnosis model proposed in this invention.

[0038] Figure 2 for Figure 1 The representation network structure diagram of the feature extraction module;

[0039] Figure 3 This invention proposes a causal-driven, reliable cross-component mechanical fault diagnosis method.

[0040] Figure 4 To test the average accuracy of the task;

[0041] Figure 5(a) shows the confusion matrix for task A1;

[0042] Figure 5(b) shows the confusion matrix for task A2;

[0043] Figure 5(c) shows the confusion matrix for task A3.

[0044] Figure 6(a) shows the accuracy change for task A1;

[0045] Figure 6(b) shows the change in loss for task A1;

[0046] Figure 7(a) shows the distribution of sample features (C(x), A(x)) of the model of the present invention on task A1;

[0047] Figure 7(b) shows the feature distribution of the ablation module on task A1;

[0048] Figure 7(c) shows the distribution of sample features (C(x), A(x)) of the model of the present invention on task C1;

[0049] Figure 7(d) shows the feature distribution of the ablation module on task C1. Detailed Implementation

[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0051] like Figure 1 , Figure 2 As shown, this embodiment proposes a causal-driven, reliable cross-component mechanical fault diagnosis model that predicts fault categories based on component data samples. Furthermore, this fault diagnosis model is trained on a source component dataset with a large number of labeled samples, and then used to predict the fault categories of target components with fewer labeled samples. The data samples are vibration signal data of the components.

[0052] The fault diagnosis model includes a feature extraction module, a metric function prediction module, and a relation measurement module.

[0053] The feature extraction module includes an instrumental variable representation network, a confounding factor representation network, and an adjustment variable representation network, which are used to analyze the instrumental variable I, confounding factor C, and adjustment variable A of the data sample, respectively.

[0054] Instrumental variable I only affects the relation measurement method; that is, instrumental variable I determines the relation measurement function T applicable to the data samples, and does not directly affect the fault category Y, but only indirectly affects the fault category through T. Instrumental variable I may include set speed, installation error, data processing method, etc.

[0055] Confounding factor C is a common cause of both the relational measurement method T and the fault category Y. It will affect the relationship between the instrumental variable I and the relational measurement function T, and between the adjustment variable A and the fault category Y. Confounding factor C may include factors such as speed drift, workpiece temperature change, and load fluctuation.

[0056] Adjustment variable A only affects fault category Y. Adjustment variable A may include factors such as the amplitude trend and frequency change of the vibration signal.

[0057] Reference Figure 2 The adjusted variable representation network includes: a first convolutional unit, a second convolutional unit, a third convolutional unit, a fourth convolutional unit, and an adaptive max-pooling layer connected in sequence; the first and second convolutional units have the same structure, containing a convolutional layer, a batch normalization layer, an activation layer, and a max-pooling layer connected in sequence; the third and fourth convolutional units have the same structure, containing a convolutional layer, a batch normalization layer, and an activation layer connected in sequence. In subsequent embodiments, the activation layer uses the ReLU activation function.

[0058] The relation measurement module stores multiple relation measurement functions. The measurement function prediction module selects the target relation measurement function based on the instrumental variable I. The relation measurement module executes the target relation measurement function, combines the confounding factor C and the adjustment variable A, calculates the similarity between the data sample and each category of samples in the labeled sample set, and obtains the category most similar to the data sample as the predicted category of the data sample.

[0059] That is, the sample to be tested is ultimately classified into the category to which the labeled sample set with the highest relation score belongs, as expressed by the formula:

[0060]

[0061] in, For data sample x j Predicted labels, To label the fault category i in the sample set and the data sample x j Relationship score.

[0062] The training process of this fault diagnosis model includes the following steps:

[0063] S1. Divide the dataset of the source component into a query set D and a labeled sample set Q; both the query set and the labeled sample set contain samples of each fault category of the source component; initialize the fault diagnosis model;

[0064] S2. Process the labeled sample set samples through the feature extraction module to obtain the instrumental variable I, confounding factor C, and adjustment variable A for each labeled sample set sample; take the mean of the confounding factor C and adjustment variable A for the labeled sample set samples under the same category as the sample average feature of that category; that is, the sample average feature of fault category i in the labeled sample set is denoted as (C(X)). i ),A(X i ), where C(X) i A(X) represents the mean of the confounding factor C for each data sample under fault category i in the labeled sample set. i ) represents the mean of the adjustment variable A for each data sample under fault category i in the labeled sample set;

[0065] S3. Extract training samples from the query set and substitute them into the fault diagnosis model, and calculate the loss function L;

[0066] The loss function L includes the adjustment variable loss L A Balanced confounding variable loss L C-B Instrumental variable loss L I Orthogonal constraint loss L0, prediction category loss L R And contrast loss L C .

[0067] Variable loss L A The goal of the network is to guide the representation of the adjusting variable, ensuring that the representation of the adjusting variable is decomposed as much as possible and not left in other parts (i.e., confounding factors and instrumental variables);

[0068]

[0069] The relation measurement module includes two relation measurement functions. Predicting network G for metric function I The selected relational measurement function number; A(x j ) is the training sample x j The adjustment variable A, yes Adjustment variable A(x) j The distribution of ) yes Adjustment variable A(x) j The distribution of G, where disc(·) is the distance representation function; A For the relation measurement module, G A (A(x j )) indicates that the fault diagnosis model is based on the training sample x j Predicted fault category, y j For x j Authentic labels; G[y j GA (A(x j ))] is x j Predicted fault categories and true labels y j The distance is calculated using the cross-entropy function.

[0070] G I For predicting networks using metric functions, G I [I(x)] represents the relational measure function score vector predicted based on the instrumental variable I of the data sample x, and argmax represents selecting the relational measure function with the largest score as the target measure function.

[0071] L C_B Used to balance the influence of confounding factors on classification results;

[0072]

[0073] Wherein, C(x) j ) is the training sample x j Confounding factor C yes Confounding factors C(x) balanced through attention mechanisms j The distribution of ) = yes Confounding factors C(x) balanced through attention mechanisms j The distribution of ), where disc(·) is the distance function.

[0074] Instrumental variable loss L I This is used to decompose the instrumental variable I from the data sample. Therefore, the instrumental variable loss L I The mutual information between the instrumental variable I and the true label Y can be used, as expressed by the following formula:

[0075]

[0076] Where I(x) j ) represents the training sample x j The instrumental variable, MI, represents the mutual information function; The metric function predicts the network G. I The selected target relational network function is T. l When I(x) j ) and y j Mutual information.

[0077] Orthogonal constraint loss L O This is used to reduce the overlap of information in the three parts: instrumental variables, confounding factors, and adjustment variables;

[0078]

[0079] W z W represents the contribution matrix of the data samples to the variable Z, where z∈{I,C,A}; z ={w z,r,e ;1≤r≤R,1≤e≤E},w z,r,e Let R be the contribution of the r-th component of the data sample to the e-th dimension of the network; E represents the vector dimension, and R represents the number of components in the data sample.

[0080] This represents the average weight of the data sample with respect to the variable z, which characterizes each dimension of the network. in, This represents the mean contribution of the e-dimensional components of the data sample, i.e.

[0081] Right now, and These represent the average weights of the data samples on each dimension of the instrumental variable representation network, each dimension of the confounding factor representation network, and each dimension of the adjusted variable representation network, respectively.

[0082] The instrumental variable representation network, confounding factor representation network, and adjustment variable representation network have the same structure and the three average weight vectors have the same dimension. Therefore, an orthogonality constraint is applied to each pair of vectors to achieve hard decomposition.

[0083] The feature extraction module performs causal decomposition on the input data sample x to obtain the instrumental variable I(x), confounding factors C(x), and adjustment variable A(x). The metric function prediction module uses the instrumental variable I(x) to select the corresponding relational metric function T. l The relation measurement module uses this relation measurement function T. l The attention mechanism Att[C(x),A(x)] of the sample features (C(x),A(x)) is used to calculate the relationship score between the average feature of each fault category sample in the labeled sample set, and the relationship score is weighted by the selection probability t of the relationship metric function:

[0084]

[0085]

[0086] Among them, U i This indicates the number of samples under fault category i in the labeled sample set. This represents the u-th data sample under fault category i in the labeled sample set; for Mixed factors, for Adjustment variables; To label the average confounding factor of fault category i in the sample set, The average adjustment variable for fault category i in the labeled sample set;

[0087] To integrate complementary information from different feature extractors (i.e., representation networks), the model concatenates the features:

[0088]

[0089] Where, p i To label the category features of fault category i in the sample set; p j For training sample x j Features; This indicates vector concatenation.

[0090] r i,j,l =T l [Att(p i );Att(p j (10)

[0091]

[0092] Among them, Att(p i ) represents feature p i Feature data processed by the attention mechanism; Att(p j ) represents feature p j Feature data processed by the attention mechanism; T l Let r represent the relational metric function. i,j,l Indicates the use of T l The calculated training sample x j The relationship score between the fault category i in the labeled sample set; t j,l Calculate training sample x j When choosing T l The probability of t; j,l =G I [I(x j )] softmax , indicating G I [I(x j The probability distribution obtained by normalization; G I [I(x j )] represents the input sample x j At that time, the set of scores for each relation metric function output by the metric function prediction module. c represents the number of categories in the labeled sample set; For training sample x j Fault category y in the labeled sample set j Relationship score, y j For x j Real labels; r i,j For training sample xj The score relating to fault category i in the labeled sample set; K is the number of training samples in a single training batch. L R Used to guide predicted labels toward the true labels;

[0093] Comparison loss L C This is used to constrain intra-class distance and inter-class distance, so that the distance between a sample feature and the average intra-class sample feature is as small as possible, and the distance between a sample feature and the average inter-class sample feature is not less than M.

[0094]

[0095] Where M is the minimum distance between two different categories of sample features; c is the number of fault categories; V = 1 (y i =y j ) is a binary number, if the training sample x j Real Labels j To label the fault category i in the sample set, then 1(y i =y j ) = 1, conversely 1(y) i =y j ) = 0; ||.|| represents the L2 norm.

[0096] It is worth noting that the labeled sample set contains all categories of data samples. In order to improve the convergence speed of the model, during the training process, each batch of training samples can be set to contain all fault categories, and the number of training samples for each fault category in the same batch is equal. For example, m training samples are extracted from each fault category in a single batch for training, that is, the number of training samples in a single batch is c×m, that is, in formula (12) and formula (13), K=c×m.

[0097] The formula for calculating the loss function L is:

[0098] L = L R +α·L A +β·L I +μ·L O +γ·L C_B +∈·L C (10)

[0099] α, β, μ, γ, ∈ are hyperparameters representing the weights of the corresponding loss function parts, and can take values ​​in the interval (0,1).

[0100] S4. Update the fault diagnosis model by backpropagation based on the loss function L;

[0101] S5. Determine whether the fault diagnosis model has converged; if not, return to step S3; if yes, the fault diagnosis model is used to diagnose the fault category of the target component based on the vibration signal sample of the target component.

[0102] The convergence condition of the fault diagnosis model is: the number of model iterations reaches a set value, or the loss function L converges, that is, the range of the loss function L in the most recent three iterations is less than the set value.

[0103] Reference Figure 3 The causal-driven reliable cross-component mechanical fault diagnosis method proposed in this embodiment first performs the above-mentioned model training method on the dataset of the source component to obtain the trained fault diagnosis model, and then performs the following steps St1-St4 to diagnose the fault category of the target component.

[0104] Step 1: Obtain vibration signal samples of the target component to be diagnosed and manually label the fault categories to form a labeled sample set of known fault categories; extract the sample features of each vibration signal sample in the labeled sample set through the feature extraction module of the fault diagnosis model, and calculate the average feature of each fault category in the labeled sample set.

[0105] St2, collect vibration signal samples of the target component to be diagnosed as the sample to be diagnosed, x;

[0106] St3, the feature extraction module collects the instrumental variable I(x), confounding factor C(x), and adjustment variable A(x) of the sample to be diagnosed x; the measurement function prediction module calculates the score of each relation measurement function based on the instrumental variable I(x), and selects the relation measurement function with the highest score as the target relation measurement function T;

[0107] St4, the relation measurement module uses the target relation measurement function T to calculate the relation score between the sample features (C(x), A(x)) of the sample to be diagnosed x and the sample splicing features of each fault category in the labeled sample set, and takes the fault category with the highest relation score as the model prediction label.

[0108] During model training, class labels are provided by the labeled sample set of source components (also known as the sample set); during model application, class labels are provided by the labeled sample set of target components (also known as the support set).

[0109] The calculation process of the relationship score is shown in formulas (6)-(11).

[0110] The above fault diagnosis model will be described and verified in conjunction with specific embodiments below.

[0111] In this embodiment, the fault diagnosis model is trained using steps S1-S5 as described above, with hyperparameters set as follows: ∈ = 0.01; α = 0.2; β = 1; γ = 0.03; μ = 0.7; M = 1. In this embodiment, the relation measurement functions T0 and T1 in the relation measurement module are Euclidean distance and Pearson correlation coefficient, respectively.

[0112] In this embodiment, three sets of experiments were constructed using three known datasets, which are as follows:

[0113] The bearing dataset CWRU contains 80 fault categories;

[0114] The gear dataset UConn contains five fault categories: Spall, Crack, Health, Missing, and Chip5a.

[0115] The bearing dataset Lab-built contains five fault categories: N (Normal), IF (Inner Ring Fault), OF (Outer Ring Fault), BF (Rolling Body Fault), and BOF (Ball Out Fault).

[0116] In this embodiment, three diagnostic tests and nine diagnostic tasks were constructed, and the statistics are shown in Table 1.

[0117] Table 1: Statistics of Experimental Tasks

[0118]

[0119] 5-way 1-shot means that both the source component dataset and the labeled sample set during testing contain 5 classes, with 1 sample per class; 5-way 3-shot means that both the source component dataset and the labeled sample set during testing contain 5 classes, with 3 samples per class; 5-way 5-shot means that both the source component dataset and the labeled sample set during testing contain 5 classes, with 5 samples per class.

[0120] In this embodiment, the average accuracy of each task on the test set is shown in Table 2 below. Figure 4 As shown.

[0121] Table 2: Average accuracy for each task

[0122]

[0123]

[0124] From Table 2 and Figure 4 It can be seen that, under small sample conditions, all cross-component fault diagnosis tasks achieved good accuracy. Among them, task A 5-way 5-shot (i.e., task A3) had the highest accuracy at 98.4%, while task C 5-way 1-shot (i.e., task C1) had the lowest accuracy at 89.27%.

[0125] Figures 5(a), 5(b), and 5(c) are the confusion matrices for tasks A1, A2, and A3, respectively. The vertical axis corresponds to the true label, and the horizontal axis corresponds to the predicted label. It can be seen that in task A1, except for the gear fault Chip5a, where the classification accuracy is slightly lower (93%), the model's classification accuracy for all other fault categories exceeds 95%, with the classification accuracy for healthy, missing, and cracked faults even reaching 98%. In tasks A2 and A3, the accuracy for each fault category reaches 98% and 99%, respectively.

[0126] Figures 6(a) and 6(b) illustrate the changes in accuracy and loss for tasks A1, A2, and A3 over 400 iterations. The accuracy for tasks A1, A2, and A3 significantly improves after approximately 50 iterations, and the model achieves peak test accuracies of 97.5%, 99.0%, and 99.3% on tasks A1, A2, and A3, respectively, at iterations 272, 107, and 379. The accuracy plateauses after approximately 150 iterations. These results demonstrate that the model achieves good training and testing efficiency on task A.

[0127] In this embodiment, an ablation experiment was also conducted. The ablation model consists of a feature extraction module and a relation measurement module. The feature extraction module is as follows: Figure 2 As shown, the module extracts sample features from the input sample and average features from the labeled sample set; the relation measurement module calculates the correlation score between the sample features and the average features, and outputs the label with the highest score as the predicted label. It is worth noting that the feature extraction module of the ablation module contains only one... Figure 2 The network shown does not distinguish between instrumental variables, confounding factors, and adjustment variables in its feature extraction; the relation measurement module does not incorporate an attention mechanism. During ablation model training, the loss function is the cross-entropy loss between the true and predicted labels.

[0128] Figure 7(a) shows the distribution of sample features (C(x), A(x)) of the model of the present invention on task A1, and Figure 7(b) shows the feature distribution of the ablation module on task A1;

[0129] Figure 7(c) shows the distribution of sample features (C(x), A(x)) of the model of the present invention on task C1, and Figure 7(d) shows the feature distribution of the ablation module on task C1.

[0130] As can be seen, after introducing causal separation, the overall feature space is expanded, and the intra-cluster distance decreases, indicating that the clusters are more compact. Specifically, the model of this invention is applied to the feature distribution of task A1, where the distinction between the three categories (deleted, chip5a, and normal) is significantly better than their distribution in the ablation model. On task C1, the inter-class distance of the model of this invention is larger, and the intra-class compactness is also more significant than that of the ablation model.

[0131] Of course, those skilled in the art will recognize that the present invention is not limited to the details of the exemplary embodiments described above, but also includes the same or similar structures that can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0132] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

[0133] The technologies, shapes, and structures not described in detail in this invention are all known technologies.

Claims

1. A cause-effect driven trusted cross-component mechanical failure diagnosis method, characterized in that, First, a query set and a labeled sample set are constructed on the source component for training a fault diagnosis model; the fault diagnosis model extracts tool variables, confounding factors and adjustment variables of input data; a tool variable correlation measure function, a confounding factor influence relationship measure function and a fault category; adjustment variables influence fault categories; The mean values of the confounding factors and adjustment variables of each data sample in the labeled sample set are extracted and calculated, and then spliced to form the class features of the fault category in the labeled sample set; the confounding factors and adjustment variables of the input data are spliced as features; The fault diagnosis model determines the relationship measure mode based on the tool variables of the input data, then calculates the relationship scores of the features of the input data and the class features in the labeled sample set, and outputs the category corresponding to the maximum relationship score as the model prediction label of the input sample; Then, a labeled sample set is constructed on the target component to be diagnosed; The fault diagnosis model combines the labeled sample set of the target component to predict the fault category of the signal to be diagnosed of the target component.

2. The causally driven trusted cross-component mechanical failure diagnostic method of claim 1, wherein, The fault diagnosis model includes a feature extraction module, a measure function prediction module and a relationship measure module; the relationship measure module is provided with a plurality of relationship measure functions; the feature extraction module is used to extract tool variables, confounding factors and adjustment variables of input data; The measure function prediction module selects a target relationship measure function based on the tool variables; the relationship measure module calculates the correlation scores of the features of the input data and the class features in the labeled sample set by using the target relationship measure function.

3. The causally-driven, trustworthy cross-component mechanical fault diagnostic method of claim 2, wherein, The loss function in the training process of the fault diagnosis model is: L = L R + α · L A + β · L I + μ · L O + γ · L C_B + ∈ · L C where L A and L I are used to guide the decomposition of adjustment variables and instrumental variables, respectively, L C_B is a balance loss used to balance the influence of confounders on the classification result; L O is an orthogonal constraint loss of instrumental variables, confounders and adjustment variables; L R is a loss used to guide the predicted label to tend to the true label; L C is a contrastive loss used to constrain the intra-class distance and inter-class distance; α, β, μ, γ, ∈ are hyperparameters representing the weights of the corresponding partial loss functions, respectively.

4. The causally-driven trusted cross-component mechanical fault diagnosis method according to claim 3, characterized in that: wherein M is a set minimum distance; c is a number of fault categories in the labeled sample set, K is a number of single round training samples; V is a binary number, if the true label of the training sample x j is a fault category i in the labeled sample set, then V = 1, otherwise V = 0; p i is a category feature obtained by splicing the average of the confounding factor of the fault category i in the labeled sample set and the average of the adjustment variable, p j is a sample feature obtained by splicing the confounding factor and the adjustment variable of the training sample x j .

5. The causally-driven trusted cross-component mechanical fault diagnosis method according to claim 4, characterized in that: wherein i is the serial number of the fault category in the labeled sample set, r i,j is the relationship score of the training sample x j with the fault category i in the labeled sample set; ry j is the relationship score of the training sample x j with the fault category y j in the labeled sample set, y j is the true label of x j is y j .

6. The causally-driven, trustworthy cross-component mechanical fault diagnostic method of claim 3, wherein, L A the distance between the adjustment variables when selecting different relationship measure functions and the distance between the predicted labels and the true labels;L C_B the distance between the mixed factors when selecting different relationship measure functions after balancing by the attention mechanism;L I the mutual information between the instrumental variables corresponding to different relationship measure functions and the true labels.

7. The causally-driven, trustworthy cross-component mechanical fault diagnostic method of claim 3, wherein, The feature extraction module includes an adjustment variable representation network, a confounding factor representation network and a tool variable representation network, which have the same structure; where the superscript T denotes the transpose; and denote the average weight of the data sample on the instrumental variable representation of each dimension of the network, the confounder representation of each dimension of the network, and the adjustment variable representation of each dimension of the network, respectively.

8. The causally-driven, trustworthy cross-component mechanical fault diagnostic method of claim 7, wherein, The adjustment variable representation network comprises a first convolution unit, a second convolution unit, a third convolution unit, a fourth convolution unit and an adaptive maximum pooling layer connected in sequence; the first convolution unit and the second convolution unit have the same structure and comprise a convolution layer, a batch normalization layer, an activation layer and a maximum pooling layer connected in sequence; the thirteenth convolution unit and the fourth convolution unit have the same structure and comprise a convolution layer, a batch normalization layer and an activation layer connected in sequence.

9. The causally-driven, trustworthy cross-component mechanical fault diagnostic method of claim 2, wherein, The fault category diagnosis stage of the target component comprises the following steps: St1, obtaining a vibration signal sample of a target component to be diagnosed and manually labeling a fault category to form a labeled sample set with known fault categories; extracting sample features of each vibration signal sample in the labeled sample set by the feature extraction module of the fault diagnosis model, and calculating sample average features of each fault category in the labeled sample set; St2, collecting a vibration signal sample of the target component to be diagnosed as a to-be-diagnosed sample x; St3, the feature extraction module collects tool variables I(x), confounding factors C(x) and adjustment variables A(x) of the to-be-diagnosed sample x; the measure function prediction module calculates the scores of each relationship measure function based on the tool variables I(x), and selects the relationship measure function with the highest score as the target relationship measure function T; St4, the relationship measurement module adopts a target relationship measurement function T to calculate the relationship score of the sample feature (C(x), A(x)) of the sample to be diagnosed x and the sample splicing feature of each fault category in the labeled sample set, and takes the fault category with the highest relationship score as the model prediction label.

10. A causally driven, trustworthy cross-component mechanical fault diagnostic system, comprising: The memory stores a computer program, and the processor is connected to the memory and is used to execute the computer program to implement the causal driving trusted cross-component mechanical fault diagnosis method according to any one of claims 1-8. The memory stores a computer program, and the processor is connected to the memory and is used to execute the computer program to implement the causal driving trusted cross-component mechanical fault diagnosis method according to any one of claims 1-8.